@appsemble/cli 0.20.8 → 0.20.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__fixtures__/getBlockConfigFromTypeScript/comments/index.ts +40 -0
- package/__fixtures__/getBlockConfigFromTypeScript/comments/tsconfig.json +7 -0
- package/__fixtures__/getBlockConfigFromTypeScript/duplicateActions/index.ts +34 -0
- package/__fixtures__/getBlockConfigFromTypeScript/duplicateActions/tsconfig.json +7 -0
- package/__fixtures__/getBlockConfigFromTypeScript/duplicateEventEmitters/index.ts +34 -0
- package/__fixtures__/getBlockConfigFromTypeScript/duplicateEventEmitters/tsconfig.json +7 -0
- package/__fixtures__/getBlockConfigFromTypeScript/duplicateEventListeners/index.ts +34 -0
- package/__fixtures__/getBlockConfigFromTypeScript/duplicateEventListeners/tsconfig.json +7 -0
- package/__fixtures__/getBlockConfigFromTypeScript/duplicateParameters/index.ts +34 -0
- package/__fixtures__/getBlockConfigFromTypeScript/duplicateParameters/tsconfig.json +7 -0
- package/__fixtures__/getBlockConfigFromTypeScript/fontawesomeParameters/index.ts +11 -0
- package/__fixtures__/getBlockConfigFromTypeScript/fontawesomeParameters/tsconfig.json +7 -0
- package/__fixtures__/getBlockConfigFromTypeScript/tsError/index.ts +4 -0
- package/__fixtures__/getBlockConfigFromTypeScript/tsError/tsconfig.json +8 -0
- package/__fixtures__/getBlockConfigFromTypeScript/valid/index.ts +28 -0
- package/__fixtures__/getBlockConfigFromTypeScript/valid/tsconfig.json +7 -0
- package/__fixtures__/makePayload/no-icon/output/block.js +1 -0
- package/__fixtures__/makePayload/with-icon/icon.svg +2 -0
- package/__fixtures__/makePayload/with-icon/output/block.js +1 -0
- package/assets/appsemblerc.schema.json +150 -0
- package/changed/added/.gitkeep +0 -0
- package/changed/changed/.gitkeep +0 -0
- package/changed/deprecated/.gitkeep +0 -0
- package/changed/fixed/.gitkeep +0 -0
- package/changed/removed/.gitkeep +0 -0
- package/changed/security/.gitkeep +0 -0
- package/{dist/commands → commands}/app/create.d.ts +0 -0
- package/{dist/commands → commands}/app/create.js +0 -0
- package/commands/app/create.js.map +1 -0
- package/commands/app/create.ts +104 -0
- package/{dist/commands → commands}/app/extract-messages.d.ts +0 -0
- package/{dist/commands → commands}/app/extract-messages.js +0 -0
- package/commands/app/extract-messages.js.map +1 -0
- package/commands/app/extract-messages.ts +56 -0
- package/{dist/commands → commands}/app/index.d.ts +0 -0
- package/{dist/commands → commands}/app/index.js +0 -0
- package/commands/app/index.js.map +1 -0
- package/commands/app/index.ts +14 -0
- package/{dist/commands → commands}/app/update.d.ts +0 -0
- package/{dist/commands → commands}/app/update.js +0 -0
- package/commands/app/update.js.map +1 -0
- package/commands/app/update.ts +111 -0
- package/{dist/commands → commands}/asset/create.d.ts +0 -0
- package/{dist/commands → commands}/asset/create.js +0 -0
- package/commands/asset/create.js.map +1 -0
- package/commands/asset/create.ts +84 -0
- package/{dist/commands → commands}/asset/index.d.ts +0 -0
- package/{dist/commands → commands}/asset/index.js +0 -0
- package/commands/asset/index.js.map +1 -0
- package/commands/asset/index.ts +12 -0
- package/{dist/commands → commands}/block/build.d.ts +0 -0
- package/{dist/commands → commands}/block/build.js +0 -0
- package/commands/block/build.js.map +1 -0
- package/commands/block/build.ts +32 -0
- package/{dist/commands → commands}/block/extract-messages.d.ts +0 -0
- package/{dist/commands → commands}/block/extract-messages.js +0 -0
- package/commands/block/extract-messages.js.map +1 -0
- package/commands/block/extract-messages.ts +41 -0
- package/{dist/commands → commands}/block/index.d.ts +0 -0
- package/{dist/commands → commands}/block/index.js +0 -0
- package/commands/block/index.js.map +1 -0
- package/commands/block/index.ts +14 -0
- package/{dist/commands → commands}/block/publish.d.ts +0 -0
- package/{dist/commands → commands}/block/publish.js +0 -0
- package/commands/block/publish.js.map +1 -0
- package/commands/block/publish.ts +58 -0
- package/{dist/commands → commands}/cleanupResources.d.ts +0 -0
- package/{dist/commands → commands}/cleanupResources.js +0 -0
- package/commands/cleanupResources.js.map +1 -0
- package/commands/cleanupResources.ts +45 -0
- package/{dist/commands → commands}/config/get.d.ts +0 -0
- package/{dist/commands → commands}/config/get.js +0 -0
- package/commands/config/get.js.map +1 -0
- package/commands/config/get.ts +26 -0
- package/{dist/commands → commands}/config/index.d.ts +0 -0
- package/{dist/commands → commands}/config/index.js +0 -0
- package/commands/config/index.js.map +1 -0
- package/commands/config/index.ts +13 -0
- package/{dist/commands → commands}/config/set.d.ts +0 -0
- package/{dist/commands → commands}/config/set.js +0 -0
- package/commands/config/set.js.map +1 -0
- package/commands/config/set.ts +44 -0
- package/{dist/commands → commands}/login.d.ts +0 -0
- package/{dist/commands → commands}/login.js +0 -0
- package/commands/login.js.map +1 -0
- package/commands/login.ts +5 -0
- package/{dist/commands → commands}/logout.d.ts +0 -0
- package/{dist/commands → commands}/logout.js +0 -0
- package/commands/logout.js.map +1 -0
- package/commands/logout.ts +5 -0
- package/{dist/commands → commands}/migrate.d.ts +0 -0
- package/{dist/commands → commands}/migrate.js +5 -2
- package/commands/migrate.js.map +1 -0
- package/commands/migrate.ts +50 -0
- package/{dist/commands → commands}/organization/create.d.ts +0 -0
- package/{dist/commands → commands}/organization/create.js +0 -0
- package/commands/organization/create.js.map +1 -0
- package/commands/organization/create.ts +65 -0
- package/{dist/commands → commands}/organization/index.d.ts +0 -0
- package/{dist/commands → commands}/organization/index.js +0 -0
- package/commands/organization/index.js.map +1 -0
- package/commands/organization/index.ts +13 -0
- package/{dist/commands → commands}/organization/update.d.ts +0 -0
- package/{dist/commands → commands}/organization/update.js +0 -0
- package/commands/organization/update.js.map +1 -0
- package/commands/organization/update.ts +65 -0
- package/{dist/commands → commands}/resource/create.d.ts +0 -0
- package/{dist/commands → commands}/resource/create.js +0 -0
- package/commands/resource/create.js.map +1 -0
- package/commands/resource/create.ts +78 -0
- package/{dist/commands → commands}/resource/index.d.ts +0 -0
- package/{dist/commands → commands}/resource/index.js +0 -0
- package/commands/resource/index.js.map +1 -0
- package/commands/resource/index.ts +13 -0
- package/{dist/commands → commands}/resource/update.d.ts +0 -0
- package/{dist/commands → commands}/resource/update.js +0 -0
- package/commands/resource/update.js.map +1 -0
- package/commands/resource/update.ts +77 -0
- package/{dist/commands → commands}/runCronJobs.d.ts +0 -0
- package/{dist/commands → commands}/runCronJobs.js +0 -0
- package/commands/runCronJobs.js.map +1 -0
- package/commands/runCronJobs.ts +45 -0
- package/{dist/commands → commands}/start.d.ts +0 -0
- package/{dist/commands → commands}/start.js +4 -0
- package/commands/start.js.map +1 -0
- package/commands/start.ts +140 -0
- package/{dist/commands → commands}/team/create.d.ts +0 -0
- package/{dist/commands → commands}/team/create.js +0 -0
- package/commands/team/create.js.map +1 -0
- package/commands/team/create.ts +60 -0
- package/{dist/commands → commands}/team/delete.d.ts +0 -0
- package/{dist/commands → commands}/team/delete.js +0 -0
- package/commands/team/delete.js.map +1 -0
- package/commands/team/delete.ts +54 -0
- package/{dist/commands → commands}/team/index.d.ts +0 -0
- package/{dist/commands → commands}/team/index.js +0 -0
- package/commands/team/index.js.map +1 -0
- package/commands/team/index.ts +15 -0
- package/{dist/commands → commands}/team/member/delete.d.ts +0 -0
- package/{dist/commands → commands}/team/member/delete.js +0 -0
- package/commands/team/member/delete.js.map +1 -0
- package/commands/team/member/delete.ts +61 -0
- package/{dist/commands → commands}/team/member/index.d.ts +0 -0
- package/{dist/commands → commands}/team/member/index.js +0 -0
- package/commands/team/member/index.js.map +1 -0
- package/commands/team/member/index.ts +14 -0
- package/{dist/commands → commands}/team/member/invite.d.ts +0 -0
- package/{dist/commands → commands}/team/member/invite.js +0 -0
- package/commands/team/member/invite.js.map +1 -0
- package/commands/team/member/invite.ts +61 -0
- package/{dist/commands → commands}/team/member/update.d.ts +0 -0
- package/{dist/commands → commands}/team/member/update.js +0 -0
- package/commands/team/member/update.js.map +1 -0
- package/commands/team/member/update.ts +70 -0
- package/{dist/commands → commands}/team/update.d.ts +0 -0
- package/{dist/commands → commands}/team/update.js +0 -0
- package/commands/team/update.js.map +1 -0
- package/commands/team/update.ts +60 -0
- package/index.d.ts +2 -0
- package/{dist/index.js → index.js} +2 -6
- package/index.js.map +1 -0
- package/index.ts +74 -0
- package/jest.config.js +1 -0
- package/jest.setup.d.ts +1 -0
- package/jest.setup.js +6 -0
- package/jest.setup.js.map +1 -0
- package/jest.setup.ts +4 -0
- package/lib/__snapshots__/getBlockConfigFromTypeScript.test.ts.snap +3872 -0
- package/{dist/lib → lib}/app.d.ts +17 -17
- package/{dist/lib → lib}/app.js +29 -29
- package/lib/app.js.map +1 -0
- package/lib/app.ts +797 -0
- package/{dist/lib → lib}/asset.d.ts +0 -0
- package/{dist/lib → lib}/asset.js +0 -0
- package/lib/asset.js.map +1 -0
- package/lib/asset.ts +43 -0
- package/{dist/lib → lib}/authentication.d.ts +3 -3
- package/{dist/lib → lib}/authentication.js +47 -15
- package/lib/authentication.js.map +1 -0
- package/lib/authentication.ts +193 -0
- package/{dist/lib → lib}/block.d.ts +16 -16
- package/{dist/lib → lib}/block.js +35 -26
- package/lib/block.js.map +1 -0
- package/lib/block.test.d.ts +1 -0
- package/lib/block.test.js +106 -0
- package/lib/block.test.js.map +1 -0
- package/lib/block.test.ts +103 -0
- package/lib/block.ts +384 -0
- package/{dist/lib → lib}/coercers.d.ts +2 -2
- package/{dist/lib → lib}/coercers.js +2 -2
- package/lib/coercers.js.map +1 -0
- package/lib/coercers.test.d.ts +1 -0
- package/lib/coercers.test.js +28 -0
- package/lib/coercers.test.js.map +1 -0
- package/lib/coercers.test.ts +27 -0
- package/lib/coercers.ts +57 -0
- package/{dist/lib → lib}/getBlockConfigFromTypeScript.d.ts +1 -1
- package/{dist/lib → lib}/getBlockConfigFromTypeScript.js +38 -36
- package/lib/getBlockConfigFromTypeScript.js.map +1 -0
- package/lib/getBlockConfigFromTypeScript.test.d.ts +1 -0
- package/lib/getBlockConfigFromTypeScript.test.js +238 -0
- package/lib/getBlockConfigFromTypeScript.test.js.map +1 -0
- package/lib/getBlockConfigFromTypeScript.test.ts +281 -0
- package/lib/getBlockConfigFromTypeScript.ts +354 -0
- package/{dist/lib → lib}/initAxios.d.ts +1 -1
- package/{dist/lib → lib}/initAxios.js +3 -4
- package/lib/initAxios.js.map +1 -0
- package/lib/initAxios.ts +16 -0
- package/{dist/lib → lib}/loadWebpackConfig.d.ts +3 -3
- package/{dist/lib → lib}/loadWebpackConfig.js +3 -3
- package/lib/loadWebpackConfig.js.map +1 -0
- package/lib/loadWebpackConfig.ts +59 -0
- package/{dist/lib → lib}/organization.d.ts +1 -1
- package/{dist/lib → lib}/organization.js +0 -0
- package/lib/organization.js.map +1 -0
- package/lib/organization.ts +105 -0
- package/{dist/lib → lib}/output.d.ts +0 -0
- package/{dist/lib → lib}/output.js +0 -0
- package/lib/output.js.map +1 -0
- package/lib/output.ts +19 -0
- package/{dist/lib → lib}/processCss.d.ts +1 -1
- package/{dist/lib → lib}/processCss.js +3 -3
- package/lib/processCss.js.map +1 -0
- package/lib/processCss.ts +24 -0
- package/{dist/lib → lib}/resource.d.ts +0 -0
- package/{dist/lib → lib}/resource.js +1 -1
- package/lib/resource.js.map +1 -0
- package/lib/resource.ts +128 -0
- package/{dist/lib → lib}/serverImport.d.ts +1 -1
- package/{dist/lib → lib}/serverImport.js +2 -2
- package/lib/serverImport.js.map +1 -0
- package/lib/serverImport.ts +43 -0
- package/{dist/lib → lib}/team.d.ts +0 -0
- package/{dist/lib → lib}/team.js +0 -0
- package/lib/team.js.map +1 -0
- package/lib/team.ts +152 -0
- package/package.json +14 -12
- package/tsconfig.json +10 -0
- package/{dist/types.d.ts → types.d.ts} +0 -0
- package/{dist/types.js → types.js} +0 -0
- package/types.js.map +1 -0
- package/types.ts +110 -0
- package/dist/commands/app/create.js.map +0 -1
- package/dist/commands/app/extract-messages.js.map +0 -1
- package/dist/commands/app/index.js.map +0 -1
- package/dist/commands/app/update.js.map +0 -1
- package/dist/commands/asset/create.js.map +0 -1
- package/dist/commands/asset/index.js.map +0 -1
- package/dist/commands/block/build.js.map +0 -1
- package/dist/commands/block/extract-messages.js.map +0 -1
- package/dist/commands/block/index.js.map +0 -1
- package/dist/commands/block/publish.js.map +0 -1
- package/dist/commands/cleanupResources.js.map +0 -1
- package/dist/commands/config/get.js.map +0 -1
- package/dist/commands/config/index.js.map +0 -1
- package/dist/commands/config/set.js.map +0 -1
- package/dist/commands/login.js.map +0 -1
- package/dist/commands/logout.js.map +0 -1
- package/dist/commands/migrate.js.map +0 -1
- package/dist/commands/organization/create.js.map +0 -1
- package/dist/commands/organization/index.js.map +0 -1
- package/dist/commands/organization/update.js.map +0 -1
- package/dist/commands/resource/create.js.map +0 -1
- package/dist/commands/resource/index.js.map +0 -1
- package/dist/commands/resource/update.js.map +0 -1
- package/dist/commands/runCronJobs.js.map +0 -1
- package/dist/commands/start.js.map +0 -1
- package/dist/commands/team/create.js.map +0 -1
- package/dist/commands/team/delete.js.map +0 -1
- package/dist/commands/team/index.js.map +0 -1
- package/dist/commands/team/member/delete.js.map +0 -1
- package/dist/commands/team/member/index.js.map +0 -1
- package/dist/commands/team/member/invite.js.map +0 -1
- package/dist/commands/team/member/update.js.map +0 -1
- package/dist/commands/team/update.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js.map +0 -1
- package/dist/lib/app.js.map +0 -1
- package/dist/lib/asset.js.map +0 -1
- package/dist/lib/authentication.js.map +0 -1
- package/dist/lib/block.js.map +0 -1
- package/dist/lib/coercers.js.map +0 -1
- package/dist/lib/getBlockConfigFromTypeScript.js.map +0 -1
- package/dist/lib/initAxios.js.map +0 -1
- package/dist/lib/loadWebpackConfig.js.map +0 -1
- package/dist/lib/organization.js.map +0 -1
- package/dist/lib/output.js.map +0 -1
- package/dist/lib/processCss.js.map +0 -1
- package/dist/lib/readPackageJson.d.ts +0 -9
- package/dist/lib/readPackageJson.js +0 -16
- package/dist/lib/readPackageJson.js.map +0 -1
- package/dist/lib/resource.js.map +0 -1
- package/dist/lib/serverImport.js.map +0 -1
- package/dist/lib/team.js.map +0 -1
- package/dist/types.js.map +0 -1
package/index.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { configureLogger, handleError } from '@appsemble/node-utils';
|
|
3
|
+
import { cosmiconfig } from 'cosmiconfig';
|
|
4
|
+
import yargs from 'yargs';
|
|
5
|
+
|
|
6
|
+
import * as app from './commands/app';
|
|
7
|
+
import * as asset from './commands/asset';
|
|
8
|
+
import * as block from './commands/block';
|
|
9
|
+
import * as cleanupResources from './commands/cleanupResources';
|
|
10
|
+
import * as config from './commands/config';
|
|
11
|
+
import * as login from './commands/login';
|
|
12
|
+
import * as logout from './commands/logout';
|
|
13
|
+
import * as migrate from './commands/migrate';
|
|
14
|
+
import * as organization from './commands/organization';
|
|
15
|
+
import * as resource from './commands/resource';
|
|
16
|
+
import * as runCronJobs from './commands/runCronJobs';
|
|
17
|
+
import * as start from './commands/start';
|
|
18
|
+
import * as team from './commands/team';
|
|
19
|
+
import { CREDENTIALS_ENV_VAR } from './lib/authentication';
|
|
20
|
+
import { coerceRemote } from './lib/coercers';
|
|
21
|
+
import { initAxios } from './lib/initAxios';
|
|
22
|
+
|
|
23
|
+
process.title = 'appsemble';
|
|
24
|
+
|
|
25
|
+
async function main(argv: string[]): Promise<void> {
|
|
26
|
+
const explorer = cosmiconfig('appsembleServer');
|
|
27
|
+
const found = await explorer.search(process.cwd());
|
|
28
|
+
|
|
29
|
+
let parser = yargs
|
|
30
|
+
.option('verbose', {
|
|
31
|
+
alias: 'v',
|
|
32
|
+
describe: 'Increase verbosity',
|
|
33
|
+
type: 'count',
|
|
34
|
+
})
|
|
35
|
+
.option('quiet', {
|
|
36
|
+
alias: 'q',
|
|
37
|
+
describe: 'Decrease verbosity',
|
|
38
|
+
type: 'count',
|
|
39
|
+
})
|
|
40
|
+
.option('remote', {
|
|
41
|
+
description: 'The Appsemble host that should be used.',
|
|
42
|
+
default: 'https://appsemble.app',
|
|
43
|
+
coerce: coerceRemote,
|
|
44
|
+
})
|
|
45
|
+
.option('client-credentials', {
|
|
46
|
+
description: `OAuth2 client credentials formatted as "client_id:client_secret". This may also be defined in the ${CREDENTIALS_ENV_VAR} environment variable.`,
|
|
47
|
+
})
|
|
48
|
+
.middleware([configureLogger, initAxios])
|
|
49
|
+
.command(app)
|
|
50
|
+
.command(asset)
|
|
51
|
+
.command(block)
|
|
52
|
+
.command(cleanupResources)
|
|
53
|
+
.command(config)
|
|
54
|
+
.command(login)
|
|
55
|
+
.command(logout)
|
|
56
|
+
.command(migrate)
|
|
57
|
+
.command(organization)
|
|
58
|
+
.command(resource)
|
|
59
|
+
.command(runCronJobs)
|
|
60
|
+
.command(start)
|
|
61
|
+
.command(team)
|
|
62
|
+
.demandCommand(1)
|
|
63
|
+
// .strict() isn’t used because of https://github.com/yargs/yargs/issues/2058
|
|
64
|
+
.strictCommands()
|
|
65
|
+
.fail(handleError)
|
|
66
|
+
.help()
|
|
67
|
+
.completion();
|
|
68
|
+
if (found) {
|
|
69
|
+
parser = parser.config(found.config);
|
|
70
|
+
}
|
|
71
|
+
parser.parse(argv);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
main(process.argv.slice(2));
|
package/jest.config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../../config/jest/config')(__dirname);
|
package/jest.setup.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/jest.setup.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jest.setup.js","sourceRoot":"","sources":["jest.setup.ts"],"names":[],"mappings":";;AAAA,sDAAoE;AAEpE,IAAA,2BAAc,EAAC,SAAS,CAAC,CAAC;AAC1B,IAAA,wBAAW,EAAC,CAAC,CAAC,CAAC"}
|
package/jest.setup.ts
ADDED