Skip to content

Commit

Permalink
Publish packages
Browse files Browse the repository at this point in the history
  • Loading branch information
StorytellerCZ committed Dec 21, 2022
1 parent f072a4d commit 28ff157
Show file tree
Hide file tree
Showing 20 changed files with 148 additions and 121 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@

\.idea/

accounts-line/package-lock.json

line-config-ui/package-lock.json

line-oauth/package-lock.json
94 changes: 48 additions & 46 deletions accounts-line/.versions
Original file line number Diff line number Diff line change
@@ -1,58 +1,60 @@
accounts-base@1.9.0
accounts-oauth@1.2.0
allow-deny@1.1.0
babel-compiler@7.6.1
babel-runtime@1.5.0
accounts-base@2.2.6
accounts-oauth@1.4.2
allow-deny@1.1.1
babel-compiler@7.10.1
babel-runtime@1.5.1
base64@1.0.12
binary-heap@1.0.11
boilerplate-generator@1.7.1
callback-hook@1.3.0
check@1.3.1
ddp@1.4.0
ddp-client@2.4.0
callback-hook@1.4.0
check@1.3.2
ddp@1.4.1
ddp-client@2.6.1
ddp-common@1.4.0
ddp-rate-limiter@1.0.9
ddp-server@2.3.2
diff-sequence@1.1.1
dynamic-import@0.6.0
ecmascript@0.15.1
ecmascript-runtime@0.7.0
ecmascript-runtime-client@0.11.0
ecmascript-runtime-server@0.10.0
ejson@1.1.1
fetch@0.1.1
geojson-utils@1.0.10
id-map@1.1.0
ddp-rate-limiter@1.1.1
ddp-server@2.6.0
diff-sequence@1.1.2
dynamic-import@0.7.2
ecmascript@0.16.4
ecmascript-runtime@0.8.0
ecmascript-runtime-client@0.12.1
ecmascript-runtime-server@0.11.0
ejson@1.1.3
fetch@0.1.2
geojson-utils@1.0.11
id-map@1.1.1
inter-process-messaging@0.1.1
localstorage@1.2.0
logging@1.2.0
meteor@1.9.3
minimongo@1.6.2
modern-browsers@0.1.5
modules@0.16.0
modules-runtime@0.12.0
mongo@1.11.0
mongo-decimal@0.1.2
logging@1.3.1
meteor@1.10.3
minimongo@1.9.1
modern-browsers@0.1.9
modules@0.19.0
modules-runtime@0.13.1
mongo@1.16.3
mongo-decimal@0.1.3
mongo-dev-server@1.1.0
mongo-id@1.0.7
npm-mongo@3.9.0
oauth@1.3.2
oauth2@1.3.0
mongo-id@1.0.8
npm-mongo@4.12.1
oauth@2.1.3
oauth2@1.3.2
ordered-dict@1.1.0
promise@0.11.2
random@1.2.0
promise@0.12.2
random@1.2.1
rate-limit@1.0.9
react-fast-refresh@0.1.0
reactive-var@1.0.11
react-fast-refresh@0.2.3
reactive-var@1.0.12
reload@1.3.1
retry@1.1.0
routepolicy@1.1.0
service-configuration@1.0.11
socket-stream-client@0.3.1
storyteller:accounts-line@1.2.3
routepolicy@1.1.1
service-configuration@1.3.1
socket-stream-client@0.5.0
storyteller:accounts-line@1.3.0
storyteller:line-oauth@1.2.2
tracker@1.2.0
underscore@1.0.10
url@1.3.1
webapp@1.10.1
webapp-hashing@1.1.0
tracker@1.2.1
typescript@4.6.4
underscore@1.0.11
url@1.3.2
webapp@1.13.2
webapp-hashing@1.1.1
zodern:types@1.0.9
10 changes: 10 additions & 0 deletions accounts-line/definitions.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
declare module 'storyteller:accounts-line' {}

declare module 'meteor/meteor' {
namespace Meteor {
function loginWithLine(
options?: Meteor.LoginWithExternalServiceOptions,
callback?: (error?: Error | Meteor.Error | Meteor.TypedError) => void,
): void;
}
}
1 change: 1 addition & 0 deletions accounts-line/line.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Line } from 'meteor/storyteller:line-oauth';
Accounts.oauth.registerService('line');

if (Meteor.isClient) {
// TODO export this function, so that you can access it outside of the Meteor object?
const loginWithLine = (options, callback) => {
// support a callback without options
if (!callback && typeof options === 'function') {
Expand Down
2 changes: 0 additions & 2 deletions accounts-line/main.ts

This file was deleted.

2 changes: 1 addition & 1 deletion accounts-line/package-types.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"typesEntry": "main.ts"
"typesEntry": "definitions.d.ts"
}
2 changes: 1 addition & 1 deletion accounts-line/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Package.describe({
Package.onUse(api => {
api.versionsFrom('2.3');
api.use(['ecmascript', 'typescript']);
api.use('zodern:types')
api.use('zodern:types@1.0.9')
api.use('accounts-base', ['client', 'server']);
// Export Accounts (etc) to packages using this one.
api.imply('accounts-base', ['client', 'server']);
Expand Down
3 changes: 2 additions & 1 deletion jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"compilerOptions": {
"checkJs": true,
"allowJs": true,
"lib": ["es2015"],
"jsx": "react",
"baseUrl": ".",
"paths": {
Expand All @@ -19,4 +20,4 @@
"node_modules",
".meteor"
]
}
}
59 changes: 30 additions & 29 deletions line-config-ui/.versions
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
babel-compiler@7.6.1
babel-runtime@1.5.0
babel-compiler@7.10.1
babel-runtime@1.5.1
base64@1.0.12
blaze@2.5.0
blaze@2.6.0
blaze-tools@1.1.0
caching-compiler@1.2.2
caching-html-compiler@1.2.0
check@1.3.1
diff-sequence@1.1.1
dynamic-import@0.6.0
ecmascript@0.15.1
ecmascript-runtime@0.7.0
ecmascript-runtime-client@0.11.0
ecmascript-runtime-server@0.10.0
ejson@1.1.1
fetch@0.1.1
check@1.3.2
diff-sequence@1.1.2
dynamic-import@0.7.2
ecmascript@0.16.4
ecmascript-runtime@0.8.0
ecmascript-runtime-client@0.12.1
ecmascript-runtime-server@0.11.0
ejson@1.1.3
fetch@0.1.2
html-tools@1.1.0
htmljs@1.1.0
id-map@1.1.0
htmljs@1.1.1
inter-process-messaging@0.1.1
meteor@1.9.3
modern-browsers@0.1.5
modules@0.16.0
modules-runtime@0.12.0
mongo-id@1.0.7
meteor@1.10.3
modern-browsers@0.1.9
modules@0.19.0
modules-runtime@0.13.1
mongo-id@1.0.8
observe-sequence@1.0.16
ordered-dict@1.1.0
promise@0.11.2
random@1.2.0
react-fast-refresh@0.1.0
reactive-var@1.0.11
spacebars@1.2.0
promise@0.12.2
random@1.2.1
react-fast-refresh@0.2.3
reactive-var@1.0.12
spacebars@1.3.0
spacebars-compiler@1.2.0
storyteller:line-config-ui@1.1.2
templating@1.4.1
storyteller:line-config-ui@1.2.0
templating@1.4.2
templating-compiler@1.4.1
templating-runtime@1.5.0
templating-runtime@1.6.0
templating-tools@1.2.0
tracker@1.2.0
underscore@1.0.10
tracker@1.2.1
typescript@4.6.4
underscore@1.0.11
zodern:types@1.0.9
1 change: 1 addition & 0 deletions line-config-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Typescript
* `zodern:types` added
* Fix helper names
* Updated templating to v1.4.2

## 1.1.2 - 2021-06-24
* Update dependencies
Expand Down
Empty file added line-config-ui/definitions.d.ts
Empty file.
1 change: 0 additions & 1 deletion line-config-ui/main.ts

This file was deleted.

2 changes: 1 addition & 1 deletion line-config-ui/package-types.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"typesEntry": "main.ts"
"typesEntry": "definitions.d.ts"
}
4 changes: 2 additions & 2 deletions line-config-ui/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Package.describe({

Package.onUse(api => {
api.versionsFrom('2.3');
api.use('zodern:types', 'server')
api.use('zodern:types@1.0.9', 'server')
api.use(['ecmascript', 'typescript'], 'client');
api.use('templating', 'client');
api.use('templating@1.4.2', 'client');

api.addFiles('line_login_button.css', 'client');
api.addFiles(['line_configure.html', 'line_configure.ts'], 'client');
Expand Down
62 changes: 32 additions & 30 deletions line-oauth/.versions
Original file line number Diff line number Diff line change
@@ -1,56 +1,58 @@
accounts-base@2.2.4
accounts-base@2.2.6
allow-deny@1.1.1
babel-compiler@7.9.0
babel-compiler@7.10.1
babel-runtime@1.5.1
base64@1.0.12
binary-heap@1.0.11
boilerplate-generator@1.7.1
callback-hook@1.4.0
check@1.3.1
ddp@1.4.0
ddp-client@2.5.0
check@1.3.2
ddp@1.4.1
ddp-client@2.6.1
ddp-common@1.4.0
ddp-rate-limiter@1.1.0
ddp-server@2.5.0
diff-sequence@1.1.1
ddp-rate-limiter@1.1.1
ddp-server@2.6.0
diff-sequence@1.1.2
dynamic-import@0.7.2
ecmascript@0.16.2
ecmascript@0.16.4
ecmascript-runtime@0.8.0
ecmascript-runtime-client@0.12.1
ecmascript-runtime-server@0.11.0
ejson@1.1.2
fetch@0.1.1
geojson-utils@1.0.10
ejson@1.1.3
fetch@0.1.2
geojson-utils@1.0.11
id-map@1.1.1
inter-process-messaging@0.1.1
localstorage@1.2.0
logging@1.3.1
meteor@1.10.0
minimongo@1.8.0
modern-browsers@0.1.8
modules@0.18.0
modules-runtime@0.13.0
mongo@1.15.0
meteor@1.10.3
minimongo@1.9.1
modern-browsers@0.1.9
modules@0.19.0
modules-runtime@0.13.1
mongo@1.16.3
mongo-decimal@0.1.3
mongo-dev-server@1.1.0
mongo-id@1.0.8
npm-mongo@4.3.1
oauth@2.1.2
oauth2@1.3.1
npm-mongo@4.12.1
oauth@2.1.3
oauth2@1.3.2
ordered-dict@1.1.0
promise@0.12.0
random@1.2.0
promise@0.12.2
random@1.2.1
rate-limit@1.0.9
react-fast-refresh@0.2.3
reactive-var@1.0.11
reactive-var@1.0.12
reload@1.3.1
retry@1.1.0
routepolicy@1.1.1
service-configuration@1.3.0
service-configuration@1.3.1
socket-stream-client@0.5.0
storyteller:line-oauth@1.2.3
tracker@1.2.0
underscore@1.0.10
storyteller:line-oauth@1.3.0
tracker@1.2.1
typescript@4.6.4
underscore@1.0.11
url@1.3.2
webapp@1.13.1
webapp-hashing@1.1.0
webapp@1.13.2
webapp-hashing@1.1.1
zodern:types@1.0.9
7 changes: 7 additions & 0 deletions line-oauth/definition.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
declare module 'storyteller:line-oauth' {}

declare global {
interface Line {
retrieveCredential(credentialToken: string, credentialSecret: string): void
}
}
5 changes: 3 additions & 2 deletions line-oauth/line_server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { fetch, URLSearchParams } from 'meteor/fetch';
import { ServiceConfiguration } from 'meteor/service-configuration';
import { OAuth } from 'meteor/oauth'
const jsonwebtoken = Npm.require('jsonwebtoken');
Expand Down Expand Up @@ -28,7 +29,7 @@ OAuth.registerService('line', 2, null, async (query) => {
return data;
});

const getAccessToken = async (query, callback) => {
const getAccessToken = async (query) => {
const config = ServiceConfiguration.configurations.findOne({ service: 'line' });
if (!config) throw new ServiceConfiguration.ConfigError();
let request;
Expand Down Expand Up @@ -59,7 +60,7 @@ const getAccessToken = async (query, callback) => {
// if the response was a json object with an error attribute
throw new Error(`Failed to complete OAuth handshake with LINE. ${response.error_description}`);
} else {
callback(undefined, response);
return response
}
};

Expand Down
2 changes: 0 additions & 2 deletions line-oauth/main.ts

This file was deleted.

2 changes: 1 addition & 1 deletion line-oauth/package-types.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"typesEntry": "main.ts"
"typesEntry": "definition.d.ts"
}
Loading

0 comments on commit 28ff157

Please sign in to comment.