Skip to content

Commit

Permalink
Merge pull request #112 from StorytellerCZ/feature/betapass
Browse files Browse the repository at this point in the history
Betapass preview & remove Husky
  • Loading branch information
StorytellerCZ authored Oct 2, 2023
2 parents baaa616 + efa3fa6 commit 2d00bb7
Show file tree
Hide file tree
Showing 9 changed files with 174 additions and 59 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Lint test"

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
app:
name: "Lint checking app"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14'
- name: Install dependencies
run: npm ci
- name: Run lint
run: npm run lint-test-ci

1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* More async calls have been added through the codebase
* Minimum Meteor version is `2.9.11`
* Deprecated `lichthagel:accounts-discord` which will be removed in v3
* Betapass client preview added
* Supports Meteor 3 `alpha-15`

## v. 2.7.1-alpha.1 - 23.8.2023
Expand Down
31 changes: 31 additions & 0 deletions community-services/betapass.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { Meteor } from 'meteor/meteor'
import { Accounts } from 'meteor/accounts-base'

Meteor.linkWithBetapass = function (options, callback) {
if (!Meteor.userId()) {
throw new Meteor.Error(
402,
'Please login to an existing account before link.'
)
}
if (!Package['storyteller:accounts-betapass']) {
throw new Meteor.Error(
403,
'Please include storyteller:accounts-betapass package'
)
}

if (!callback && typeof options === 'function') {
callback = options
options = null
}

const credentialRequestCompleteCallback =
Accounts.oauth.linkCredentialRequestCompleteHandler(callback)
if (Package['storyteller:betapass-oauth']) {
Package['storyteller:betapass-oauth'].Betapass.requestCredential(
options,
credentialRequestCompleteCallback
)
}
}
1 change: 1 addition & 0 deletions link_accounts_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import './community-services/wechat'
import './community-services/line'
import './community-services/office365'
import './community-services/web3'
import './community-services/betapass'

Accounts.oauth.tryLinkAfterPopupClosed = function (
credentialToken,
Expand Down
151 changes: 116 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"scripts": {
"test": "npm run lint && meteor test-packages ./",
"lint": "./node_modules/.bin/standard --fix",
"lint-test-ci": "./node_modules/.bin/standard",
"publish": "meteor npm i && npm prune --production && meteor publish && meteor npm i",
"all-contributors": "./node_modules/.bin/all-contributors",
"all-contributors-generate": "./node_modules/.bin/all-contributors generate",
"prepare": "husky install"
"all-contributors-generate": "./node_modules/.bin/all-contributors generate"
},
"license": "MIT",
"standard": {
Expand All @@ -33,12 +33,11 @@
"url": "https://github.com/sponsors/StorytellerCZ"
},
"devDependencies": {
"@babel/core": "^7.22.20",
"@babel/core": "^7.23.0",
"@babel/eslint-parser": "^7.22.15",
"@babel/preset-env": "^7.22.20",
"@types/meteor": "^2.9.4",
"all-contributors-cli": "^6.26.1",
"husky": "^8.0.3",
"standard": "^17.1.0"
},
"dependencies": {}
Expand Down
15 changes: 0 additions & 15 deletions preCommit.sh

This file was deleted.

0 comments on commit 2d00bb7

Please sign in to comment.