@appsemble/cli 0.20.13 → 0.20.15
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/README.md +4 -4
- package/__fixtures__/getBlockConfigFromTypeScript/comments/tsconfig.json +1 -1
- package/__fixtures__/getBlockConfigFromTypeScript/duplicateActions/tsconfig.json +1 -1
- package/__fixtures__/getBlockConfigFromTypeScript/duplicateEventEmitters/tsconfig.json +1 -1
- package/__fixtures__/getBlockConfigFromTypeScript/duplicateEventListeners/tsconfig.json +1 -1
- package/__fixtures__/getBlockConfigFromTypeScript/duplicateParameters/tsconfig.json +1 -1
- package/__fixtures__/getBlockConfigFromTypeScript/fontawesomeParameters/tsconfig.json +1 -1
- package/__fixtures__/getBlockConfigFromTypeScript/tsError/tsconfig.json +1 -1
- package/__fixtures__/getBlockConfigFromTypeScript/valid/tsconfig.json +1 -1
- package/commands/app/create.d.ts +1 -1
- package/commands/app/create.js +16 -24
- package/commands/app/create.js.map +1 -1
- package/commands/app/create.ts +3 -3
- package/commands/app/extract-messages.d.ts +1 -1
- package/commands/app/extract-messages.js +12 -20
- package/commands/app/extract-messages.js.map +1 -1
- package/commands/app/extract-messages.ts +2 -2
- package/commands/app/index.js +12 -36
- package/commands/app/index.js.map +1 -1
- package/commands/app/index.ts +9 -5
- package/commands/app/update.d.ts +1 -1
- package/commands/app/update.js +18 -26
- package/commands/app/update.js.map +1 -1
- package/commands/app/update.ts +4 -4
- package/commands/asset/create.d.ts +1 -1
- package/commands/asset/create.js +20 -28
- package/commands/asset/create.js.map +1 -1
- package/commands/asset/create.ts +4 -4
- package/commands/asset/index.js +5 -33
- package/commands/asset/index.js.map +1 -1
- package/commands/asset/index.ts +3 -3
- package/commands/block/build.d.ts +1 -1
- package/commands/block/build.js +14 -22
- package/commands/block/build.js.map +1 -1
- package/commands/block/build.ts +2 -2
- package/commands/block/extract-messages.d.ts +1 -1
- package/commands/block/extract-messages.js +15 -23
- package/commands/block/extract-messages.js.map +1 -1
- package/commands/block/extract-messages.ts +2 -2
- package/commands/block/index.js +12 -36
- package/commands/block/index.js.map +1 -1
- package/commands/block/index.ts +9 -5
- package/commands/block/publish.d.ts +1 -1
- package/commands/block/publish.js +17 -25
- package/commands/block/publish.js.map +1 -1
- package/commands/block/publish.ts +3 -3
- package/commands/cleanupResources.d.ts +1 -1
- package/commands/cleanupResources.js +6 -11
- package/commands/cleanupResources.js.map +1 -1
- package/commands/cleanupResources.ts +2 -2
- package/commands/config/get.d.ts +1 -1
- package/commands/config/get.js +10 -17
- package/commands/config/get.js.map +1 -1
- package/commands/config/get.ts +6 -5
- package/commands/config/index.js +10 -35
- package/commands/config/index.js.map +1 -1
- package/commands/config/index.ts +7 -4
- package/commands/config/set.d.ts +1 -1
- package/commands/config/set.js +15 -22
- package/commands/config/set.js.map +1 -1
- package/commands/config/set.ts +7 -6
- package/commands/login.d.ts +1 -1
- package/commands/login.js +3 -7
- package/commands/login.js.map +1 -1
- package/commands/login.ts +1 -1
- package/commands/logout.d.ts +1 -1
- package/commands/logout.js +3 -7
- package/commands/logout.js.map +1 -1
- package/commands/logout.ts +1 -1
- package/commands/migrate.d.ts +1 -1
- package/commands/migrate.js +8 -16
- package/commands/migrate.js.map +1 -1
- package/commands/migrate.ts +3 -3
- package/commands/organization/create.d.ts +1 -1
- package/commands/organization/create.js +10 -15
- package/commands/organization/create.js.map +1 -1
- package/commands/organization/create.ts +4 -4
- package/commands/organization/index.js +10 -35
- package/commands/organization/index.js.map +1 -1
- package/commands/organization/index.ts +7 -4
- package/commands/organization/update.d.ts +1 -1
- package/commands/organization/update.js +10 -15
- package/commands/organization/update.js.map +1 -1
- package/commands/organization/update.ts +4 -4
- package/commands/resource/create.d.ts +1 -1
- package/commands/resource/create.js +18 -26
- package/commands/resource/create.js.map +1 -1
- package/commands/resource/create.ts +4 -4
- package/commands/resource/index.js +10 -35
- package/commands/resource/index.js.map +1 -1
- package/commands/resource/index.ts +7 -4
- package/commands/resource/update.d.ts +1 -1
- package/commands/resource/update.js +18 -26
- package/commands/resource/update.js.map +1 -1
- package/commands/resource/update.ts +4 -4
- package/commands/runCronJobs.d.ts +1 -1
- package/commands/runCronJobs.js +6 -11
- package/commands/runCronJobs.js.map +1 -1
- package/commands/runCronJobs.ts +2 -2
- package/commands/start.d.ts +1 -1
- package/commands/start.js +10 -15
- package/commands/start.js.map +1 -1
- package/commands/start.ts +4 -4
- package/commands/team/create.d.ts +1 -1
- package/commands/team/create.js +10 -15
- package/commands/team/create.js.map +1 -1
- package/commands/team/create.ts +4 -4
- package/commands/team/delete.d.ts +1 -1
- package/commands/team/delete.js +10 -15
- package/commands/team/delete.js.map +1 -1
- package/commands/team/delete.ts +4 -4
- package/commands/team/index.js +14 -37
- package/commands/team/index.js.map +1 -1
- package/commands/team/index.ts +11 -6
- package/commands/team/member/delete.d.ts +1 -1
- package/commands/team/member/delete.js +10 -15
- package/commands/team/member/delete.js.map +1 -1
- package/commands/team/member/delete.ts +4 -4
- package/commands/team/member/index.js +12 -36
- package/commands/team/member/index.js.map +1 -1
- package/commands/team/member/index.ts +9 -5
- package/commands/team/member/invite.d.ts +1 -1
- package/commands/team/member/invite.js +10 -15
- package/commands/team/member/invite.js.map +1 -1
- package/commands/team/member/invite.ts +4 -4
- package/commands/team/member/update.d.ts +1 -1
- package/commands/team/member/update.js +12 -17
- package/commands/team/member/update.js.map +1 -1
- package/commands/team/member/update.ts +4 -4
- package/commands/team/update.d.ts +1 -1
- package/commands/team/update.js +10 -15
- package/commands/team/update.js.map +1 -1
- package/commands/team/update.ts +4 -4
- package/index.js +66 -94
- package/index.js.map +1 -1
- package/index.ts +65 -65
- package/jest.config.js +3 -1
- package/jest.setup.js +3 -5
- package/jest.setup.js.map +1 -1
- package/jest.setup.ts +1 -1
- package/lib/__snapshots__/getBlockConfigFromTypeScript.test.ts.snap +42 -6
- package/lib/app.d.ts +1 -1
- package/lib/app.js +151 -163
- package/lib/app.js.map +1 -1
- package/lib/app.ts +7 -7
- package/lib/asset.js +11 -18
- package/lib/asset.js.map +1 -1
- package/lib/authentication.d.ts +1 -1
- package/lib/authentication.js +34 -65
- package/lib/authentication.js.map +1 -1
- package/lib/authentication.ts +3 -2
- package/lib/block.js +99 -113
- package/lib/block.js.map +1 -1
- package/lib/block.test.js +9 -14
- package/lib/block.test.js.map +1 -1
- package/lib/block.test.ts +1 -1
- package/lib/block.ts +5 -5
- package/lib/coercers.js +5 -13
- package/lib/coercers.js.map +1 -1
- package/lib/coercers.test.js +2 -4
- package/lib/coercers.test.js.map +1 -1
- package/lib/coercers.test.ts +1 -1
- package/lib/getBlockConfigFromTypeScript.js +49 -56
- package/lib/getBlockConfigFromTypeScript.js.map +1 -1
- package/lib/getBlockConfigFromTypeScript.test.js +42 -46
- package/lib/getBlockConfigFromTypeScript.test.js.map +1 -1
- package/lib/getBlockConfigFromTypeScript.test.ts +7 -6
- package/lib/initAxios.d.ts +1 -1
- package/lib/initAxios.js +7 -14
- package/lib/initAxios.js.map +1 -1
- package/lib/initAxios.ts +2 -2
- package/lib/loadWebpackConfig.js +14 -45
- package/lib/loadWebpackConfig.js.map +1 -1
- package/lib/loadWebpackConfig.ts +10 -17
- package/lib/organization.js +23 -31
- package/lib/organization.js.map +1 -1
- package/lib/output.js +5 -9
- package/lib/output.js.map +1 -1
- package/lib/processCss.js +11 -18
- package/lib/processCss.js.map +1 -1
- package/lib/resource.js +17 -25
- package/lib/resource.js.map +1 -1
- package/lib/serverImport.js +6 -34
- package/lib/serverImport.js.map +1 -1
- package/lib/serverImport.ts +0 -1
- package/lib/team.js +28 -41
- package/lib/team.js.map +1 -1
- package/package.json +11 -10
- package/tsconfig.json +0 -1
- package/types.js +1 -2
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#  Appsemble CLI
|
|
2
2
|
|
|
3
3
|
> Manage apps and blocks from the command line.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@appsemble/cli)
|
|
6
|
-
[](https://gitlab.com/appsemble/appsemble/-/releases/0.20.15)
|
|
7
|
+
[](https://codecov.io/gl/appsemble/appsemble)
|
|
8
8
|
[](https://prettier.io)
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
@@ -95,5 +95,5 @@ appsemble asset create --app-id 1 path/to/example-asset.png
|
|
|
95
95
|
|
|
96
96
|
## License
|
|
97
97
|
|
|
98
|
-
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.20.
|
|
98
|
+
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.20.15/LICENSE.md) ©
|
|
99
99
|
[Appsemble](https://appsemble.com)
|
package/commands/app/create.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ReadStream } from 'fs';
|
|
3
3
|
import { AppVisibility } from '@appsemble/types';
|
|
4
4
|
import { Argv } from 'yargs';
|
|
5
|
-
import { BaseArguments } from '../../types';
|
|
5
|
+
import { BaseArguments } from '../../types.js';
|
|
6
6
|
interface CreateAppArguments extends BaseArguments {
|
|
7
7
|
context: string;
|
|
8
8
|
icon: NodeJS.ReadStream | ReadStream;
|
package/commands/app/create.js
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const normalize_path_1 = __importDefault(require("normalize-path"));
|
|
10
|
-
const app_1 = require("../../lib/app");
|
|
11
|
-
const coercers_1 = require("../../lib/coercers");
|
|
12
|
-
exports.command = 'create <paths...>';
|
|
13
|
-
exports.description = 'Create a new App based on a specified YAML file or directory.';
|
|
14
|
-
function builder(yargs) {
|
|
1
|
+
import { logger } from '@appsemble/node-utils';
|
|
2
|
+
import fg from 'fast-glob';
|
|
3
|
+
import normalizePath from 'normalize-path';
|
|
4
|
+
import { createApp } from '../../lib/app.js';
|
|
5
|
+
import { coerceFile } from '../../lib/coercers.js';
|
|
6
|
+
export const command = 'create <paths...>';
|
|
7
|
+
export const description = 'Create a new App based on a specified YAML file or directory.';
|
|
8
|
+
export function builder(yargs) {
|
|
15
9
|
return yargs
|
|
16
10
|
.positional('paths', {
|
|
17
11
|
describe: 'The paths to the apps to create.',
|
|
@@ -24,7 +18,7 @@ function builder(yargs) {
|
|
|
24
18
|
})
|
|
25
19
|
.option('icon', {
|
|
26
20
|
describe: 'The icon to upload. By default "icon.png" in the app directory is used.',
|
|
27
|
-
coerce:
|
|
21
|
+
coerce: coerceFile,
|
|
28
22
|
})
|
|
29
23
|
.option('icon-background', {
|
|
30
24
|
describe: 'The background color to use for the icon in opaque contexts.',
|
|
@@ -32,7 +26,7 @@ function builder(yargs) {
|
|
|
32
26
|
})
|
|
33
27
|
.option('maskable-icon', {
|
|
34
28
|
describe: 'The maskable icon to upload. By default "maskable-icon.png" in the app directory is used.',
|
|
35
|
-
coerce:
|
|
29
|
+
coerce: coerceFile,
|
|
36
30
|
})
|
|
37
31
|
.option('visibility', {
|
|
38
32
|
describe: 'Visibility of the app in the public app store.',
|
|
@@ -66,18 +60,16 @@ function builder(yargs) {
|
|
|
66
60
|
implies: ['sentry-dsn'],
|
|
67
61
|
});
|
|
68
62
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
node_utils_1.logger.info(`Creating ${directories.length} apps`);
|
|
63
|
+
export async function handler({ paths, ...args }) {
|
|
64
|
+
const normalizedPaths = paths.map((path) => normalizePath(path));
|
|
65
|
+
const directories = await fg(normalizedPaths, { absolute: true, onlyDirectories: true });
|
|
66
|
+
logger.info(`Creating ${directories.length} apps`);
|
|
74
67
|
for (const dir of directories) {
|
|
75
|
-
|
|
76
|
-
await
|
|
68
|
+
logger.info('');
|
|
69
|
+
await createApp({
|
|
77
70
|
...args,
|
|
78
71
|
path: dir,
|
|
79
72
|
});
|
|
80
73
|
}
|
|
81
74
|
}
|
|
82
|
-
exports.handler = handler;
|
|
83
75
|
//# sourceMappingURL=create.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["create.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["create.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAE,MAAM,WAAW,CAAC;AAC3B,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAG3C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAoBnD,MAAM,CAAC,MAAM,OAAO,GAAG,mBAAmB,CAAC;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,+DAA+D,CAAC;AAE3F,MAAM,UAAU,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK;SACT,UAAU,CAAC,OAAO,EAAE;QACnB,QAAQ,EAAE,kCAAkC;KAC7C,CAAC;SACD,MAAM,CAAC,SAAS,EAAE;QACjB,QAAQ,EAAE,gEAAgE;KAC3E,CAAC;SACD,MAAM,CAAC,cAAc,EAAE;QACtB,QAAQ,EAAE,uCAAuC;KAClD,CAAC;SACD,MAAM,CAAC,MAAM,EAAE;QACd,QAAQ,EAAE,yEAAyE;QACnF,MAAM,EAAE,UAAU;KACnB,CAAC;SACD,MAAM,CAAC,iBAAiB,EAAE;QACzB,QAAQ,EAAE,8DAA8D;QACxE,OAAO,EAAE,SAAS;KACnB,CAAC;SACD,MAAM,CAAC,eAAe,EAAE;QACvB,QAAQ,EACN,2FAA2F;QAC7F,MAAM,EAAE,UAAU;KACnB,CAAC;SACD,MAAM,CAAC,YAAY,EAAE;QACpB,QAAQ,EAAE,gDAAgD;QAC1D,OAAO,EAAE,UAAU;QACnB,OAAO,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC;KAC3C,CAAC;SACD,MAAM,CAAC,UAAU,EAAE;QAClB,QA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from 'fast-glob';
|
|
|
6
6
|
import normalizePath from 'normalize-path';
|
|
7
7
|
import { Argv } from 'yargs';
|
|
8
8
|
|
|
9
|
-
import { createApp } from '../../lib/app';
|
|
10
|
-
import { coerceFile } from '../../lib/coercers';
|
|
11
|
-
import { BaseArguments } from '../../types';
|
|
9
|
+
import { createApp } from '../../lib/app.js';
|
|
10
|
+
import { coerceFile } from '../../lib/coercers.js';
|
|
11
|
+
import { BaseArguments } from '../../types.js';
|
|
12
12
|
|
|
13
13
|
interface CreateAppArguments extends BaseArguments {
|
|
14
14
|
context: string;
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
9
|
-
const normalize_path_1 = __importDefault(require("normalize-path"));
|
|
10
|
-
const app_1 = require("../../lib/app");
|
|
11
|
-
exports.command = 'extract-messages <paths...>';
|
|
12
|
-
exports.description = 'Extract messages from a block.';
|
|
13
|
-
function builder(yargs) {
|
|
1
|
+
import { logger } from '@appsemble/node-utils';
|
|
2
|
+
import fg from 'fast-glob';
|
|
3
|
+
import normalizePath from 'normalize-path';
|
|
4
|
+
import { writeAppMessages } from '../../lib/app.js';
|
|
5
|
+
export const command = 'extract-messages <paths...>';
|
|
6
|
+
export const description = 'Extract messages from a block.';
|
|
7
|
+
export function builder(yargs) {
|
|
14
8
|
return yargs
|
|
15
9
|
.positional('paths', {
|
|
16
10
|
describe: 'The paths to the apps to extract messages from.',
|
|
@@ -28,14 +22,12 @@ function builder(yargs) {
|
|
|
28
22
|
describe: 'A comma separated list of languages to verify. The CLI will fail if a message is missing for one of the given languages',
|
|
29
23
|
});
|
|
30
24
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
node_utils_1.logger.info(`Extracting messages from ${directories.length} apps`);
|
|
25
|
+
export async function handler({ format = 'json', languages = '', paths, verify = '', }) {
|
|
26
|
+
const normalizedPaths = paths.map((path) => normalizePath(path));
|
|
27
|
+
const directories = await fg(normalizedPaths, { absolute: true, onlyDirectories: true });
|
|
28
|
+
logger.info(`Extracting messages from ${directories.length} apps`);
|
|
36
29
|
for (const dir of directories) {
|
|
37
|
-
await
|
|
30
|
+
await writeAppMessages(dir, languages.split(',').filter(Boolean), verify.split(',').filter(Boolean), format);
|
|
38
31
|
}
|
|
39
32
|
}
|
|
40
|
-
exports.handler = handler;
|
|
41
33
|
//# sourceMappingURL=extract-messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-messages.js","sourceRoot":"","sources":["extract-messages.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extract-messages.js","sourceRoot":"","sources":["extract-messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,MAAM,WAAW,CAAC;AAC3B,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAG3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAUpD,MAAM,CAAC,MAAM,OAAO,GAAG,6BAA6B,CAAC;AACrD,MAAM,CAAC,MAAM,WAAW,GAAG,gCAAgC,CAAC;AAE5D,MAAM,UAAU,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK;SACT,UAAU,CAAC,OAAO,EAAE;QACnB,QAAQ,EAAE,iDAAiD;KAC5D,CAAC;SACD,MAAM,CAAC,WAAW,EAAE;QACnB,QAAQ,EAAE,qDAAqD;KAChE,CAAC;SACD,MAAM,CAAC,QAAQ,EAAE;QAChB,QAAQ,EAAE,gDAAgD;QAC1D,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;QACzB,OAAO,EAAE,MAAM;KAChB,CAAC;SACD,MAAM,CAAC,QAAQ,EAAE;QAChB,QAAQ,EACN,yHAAyH;KAC5H,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,EAC5B,MAAM,GAAG,MAAM,EACf,SAAS,GAAG,EAAE,EACd,KAAK,EACL,MAAM,GAAG,EAAE,GACS;IACpB,MAAM,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;IACjE,MAAM,WAAW,GAAG,MAAM,EAAE,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC;IACzF,MAAM,CAAC,IAAI,CAAC,4BAA4B,WAAW,CAAC,MAAM,OAAO,CAAC,CAAC;IACnE,KAAK,MAAM,GAAG,IAAI,WAAW,EAAE;QAC7B,MAAM,gBAAgB,CACpB,GAAG,EACH,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EACpC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EACjC,MAAM,CACP,CAAC;KACH;AACH,CAAC"}
|
|
@@ -3,8 +3,8 @@ import fg from 'fast-glob';
|
|
|
3
3
|
import normalizePath from 'normalize-path';
|
|
4
4
|
import { Argv } from 'yargs';
|
|
5
5
|
|
|
6
|
-
import { writeAppMessages } from '../../lib/app';
|
|
7
|
-
import { BaseArguments } from '../../types';
|
|
6
|
+
import { writeAppMessages } from '../../lib/app.js';
|
|
7
|
+
import { BaseArguments } from '../../types.js';
|
|
8
8
|
|
|
9
9
|
interface BuildBlockArguments extends BaseArguments {
|
|
10
10
|
paths: string[];
|
package/commands/app/index.js
CHANGED
|
@@ -1,38 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.builder = exports.description = exports.command = exports.handler = void 0;
|
|
27
|
-
const create = __importStar(require("./create"));
|
|
28
|
-
const extractMessages = __importStar(require("./extract-messages"));
|
|
29
|
-
const update = __importStar(require("./update"));
|
|
30
|
-
var utils_1 = require("@appsemble/utils");
|
|
31
|
-
Object.defineProperty(exports, "handler", { enumerable: true, get: function () { return utils_1.noop; } });
|
|
32
|
-
exports.command = 'app';
|
|
33
|
-
exports.description = 'Commands related to apps.';
|
|
34
|
-
function builder(yargs) {
|
|
35
|
-
return yargs.command(create).command(extractMessages).command(update).demandCommand(1);
|
|
1
|
+
import * as create from './create.js';
|
|
2
|
+
import * as extractMessages from './extract-messages.js';
|
|
3
|
+
import * as update from './update.js';
|
|
4
|
+
export { noop as handler } from '@appsemble/utils';
|
|
5
|
+
export const command = 'app';
|
|
6
|
+
export const description = 'Commands related to apps.';
|
|
7
|
+
export function builder(yargs) {
|
|
8
|
+
return yargs
|
|
9
|
+
.command(create)
|
|
10
|
+
.command(extractMessages)
|
|
11
|
+
.command(update)
|
|
12
|
+
.demandCommand(1);
|
|
36
13
|
}
|
|
37
|
-
exports.builder = builder;
|
|
38
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,eAAe,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC;AAC7B,MAAM,CAAC,MAAM,WAAW,GAAG,2BAA2B,CAAC;AAEvD,MAAM,UAAU,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK;SACT,OAAO,CAAC,MAAkC,CAAC;SAC3C,OAAO,CAAC,eAA2C,CAAC;SACpD,OAAO,CAAC,MAAkC,CAAC;SAC3C,aAAa,CAAC,CAAC,CAAC,CAAC;AACtB,CAAC"}
|
package/commands/app/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Argv } from 'yargs';
|
|
1
|
+
import { Argv, CommandModule } from 'yargs';
|
|
2
2
|
|
|
3
|
-
import * as create from './create';
|
|
4
|
-
import * as extractMessages from './extract-messages';
|
|
5
|
-
import * as update from './update';
|
|
3
|
+
import * as create from './create.js';
|
|
4
|
+
import * as extractMessages from './extract-messages.js';
|
|
5
|
+
import * as update from './update.js';
|
|
6
6
|
|
|
7
7
|
export { noop as handler } from '@appsemble/utils';
|
|
8
8
|
|
|
@@ -10,5 +10,9 @@ export const command = 'app';
|
|
|
10
10
|
export const description = 'Commands related to apps.';
|
|
11
11
|
|
|
12
12
|
export function builder(yargs: Argv): Argv {
|
|
13
|
-
return yargs
|
|
13
|
+
return yargs
|
|
14
|
+
.command(create as unknown as CommandModule)
|
|
15
|
+
.command(extractMessages as unknown as CommandModule)
|
|
16
|
+
.command(update as unknown as CommandModule)
|
|
17
|
+
.demandCommand(1);
|
|
14
18
|
}
|
package/commands/app/update.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ReadStream } from 'fs';
|
|
3
3
|
import { AppVisibility } from '@appsemble/types';
|
|
4
4
|
import { Argv } from 'yargs';
|
|
5
|
-
import { BaseArguments } from '../../types';
|
|
5
|
+
import { BaseArguments } from '../../types.js';
|
|
6
6
|
interface UpdateAppArguments extends BaseArguments {
|
|
7
7
|
context: string;
|
|
8
8
|
paths: string[];
|
package/commands/app/update.js
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const app_1 = require("../../lib/app");
|
|
11
|
-
const authentication_1 = require("../../lib/authentication");
|
|
12
|
-
const coercers_1 = require("../../lib/coercers");
|
|
13
|
-
exports.command = 'update <paths...>';
|
|
14
|
-
exports.description = 'Update an app based on a specified YAML file or directory.';
|
|
15
|
-
function builder(yargs) {
|
|
1
|
+
import { AppsembleError, logger } from '@appsemble/node-utils';
|
|
2
|
+
import fg from 'fast-glob';
|
|
3
|
+
import normalizePath from 'normalize-path';
|
|
4
|
+
import { updateApp } from '../../lib/app.js';
|
|
5
|
+
import { authenticate } from '../../lib/authentication.js';
|
|
6
|
+
import { coerceFile } from '../../lib/coercers.js';
|
|
7
|
+
export const command = 'update <paths...>';
|
|
8
|
+
export const description = 'Update an app based on a specified YAML file or directory.';
|
|
9
|
+
export function builder(yargs) {
|
|
16
10
|
return yargs
|
|
17
11
|
.positional('paths', {
|
|
18
12
|
describe: 'The path to the app to register',
|
|
@@ -27,7 +21,7 @@ function builder(yargs) {
|
|
|
27
21
|
})
|
|
28
22
|
.option('icon', {
|
|
29
23
|
describe: 'The icon to upload. By default "icon.png" in the app directory is used.',
|
|
30
|
-
coerce:
|
|
24
|
+
coerce: coerceFile,
|
|
31
25
|
})
|
|
32
26
|
.option('icon-background', {
|
|
33
27
|
describe: 'The background color to use for the icon in opaque contexts.',
|
|
@@ -35,7 +29,7 @@ function builder(yargs) {
|
|
|
35
29
|
})
|
|
36
30
|
.option('maskable-icon', {
|
|
37
31
|
describe: 'The maskable icon to upload. By default "maskable-icon.png" in the app directory is used.',
|
|
38
|
-
coerce:
|
|
32
|
+
coerce: coerceFile,
|
|
39
33
|
})
|
|
40
34
|
.option('visibility', {
|
|
41
35
|
describe: 'Visibility of the app in the public app store.',
|
|
@@ -63,17 +57,16 @@ function builder(yargs) {
|
|
|
63
57
|
implies: ['sentry-dsn'],
|
|
64
58
|
});
|
|
65
59
|
}
|
|
66
|
-
|
|
67
|
-
async function handler({ clientCredentials, id, paths, remote, ...args }) {
|
|
60
|
+
export async function handler({ clientCredentials, id, paths, remote, ...args }) {
|
|
68
61
|
if (id != null && paths.length > 1) {
|
|
69
|
-
throw new
|
|
62
|
+
throw new AppsembleError('Only one path may be specified when specifying an app id');
|
|
70
63
|
}
|
|
71
|
-
const normalizedPaths = paths.map((path) => (
|
|
72
|
-
const directories = await (
|
|
73
|
-
await
|
|
74
|
-
|
|
64
|
+
const normalizedPaths = paths.map((path) => normalizePath(path));
|
|
65
|
+
const directories = await fg(normalizedPaths, { absolute: true, onlyDirectories: true });
|
|
66
|
+
await authenticate(remote, 'apps:write', clientCredentials);
|
|
67
|
+
logger.info(`Updating ${directories.length} apps`);
|
|
75
68
|
for (const dir of directories) {
|
|
76
|
-
await
|
|
69
|
+
await updateApp({
|
|
77
70
|
...args,
|
|
78
71
|
clientCredentials,
|
|
79
72
|
id,
|
|
@@ -82,5 +75,4 @@ async function handler({ clientCredentials, id, paths, remote, ...args }) {
|
|
|
82
75
|
});
|
|
83
76
|
}
|
|
84
77
|
}
|
|
85
|
-
exports.handler = handler;
|
|
86
78
|
//# sourceMappingURL=update.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sourceRoot":"","sources":["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I,EAAE,GAAG;YACT,MAAM;SACP,CAAC,CAAC;KACJ;AACH,CAAC"}
|
package/commands/app/update.ts
CHANGED
|
@@ -6,10 +6,10 @@ import fg from 'fast-glob';
|
|
|
6
6
|
import normalizePath from 'normalize-path';
|
|
7
7
|
import { Argv } from 'yargs';
|
|
8
8
|
|
|
9
|
-
import { updateApp } from '../../lib/app';
|
|
10
|
-
import { authenticate } from '../../lib/authentication';
|
|
11
|
-
import { coerceFile } from '../../lib/coercers';
|
|
12
|
-
import { BaseArguments } from '../../types';
|
|
9
|
+
import { updateApp } from '../../lib/app.js';
|
|
10
|
+
import { authenticate } from '../../lib/authentication.js';
|
|
11
|
+
import { coerceFile } from '../../lib/coercers.js';
|
|
12
|
+
import { BaseArguments } from '../../types.js';
|
|
13
13
|
|
|
14
14
|
interface UpdateAppArguments extends BaseArguments {
|
|
15
15
|
context: string;
|
package/commands/asset/create.js
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const app_1 = require("../../lib/app");
|
|
12
|
-
const asset_1 = require("../../lib/asset");
|
|
13
|
-
const authentication_1 = require("../../lib/authentication");
|
|
14
|
-
exports.command = 'create <paths...>';
|
|
15
|
-
exports.description = 'Create assets for an existing app.';
|
|
16
|
-
function builder(yargs) {
|
|
1
|
+
import { parse } from 'path';
|
|
2
|
+
import { AppsembleError, logger } from '@appsemble/node-utils';
|
|
3
|
+
import fg from 'fast-glob';
|
|
4
|
+
import normalizePath from 'normalize-path';
|
|
5
|
+
import { resolveAppIdAndRemote } from '../../lib/app.js';
|
|
6
|
+
import { createAsset } from '../../lib/asset.js';
|
|
7
|
+
import { authenticate } from '../../lib/authentication.js';
|
|
8
|
+
export const command = 'create <paths...>';
|
|
9
|
+
export const description = 'Create assets for an existing app.';
|
|
10
|
+
export function builder(yargs) {
|
|
17
11
|
return yargs
|
|
18
12
|
.positional('paths', {
|
|
19
13
|
describe: 'The path to the resources to create',
|
|
@@ -39,25 +33,23 @@ function builder(yargs) {
|
|
|
39
33
|
describe: 'If specified, use the specified context from .appsemblerc.yaml',
|
|
40
34
|
});
|
|
41
35
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
const files = await (0, fast_glob_1.default)(normalizedPaths, { absolute: true, onlyFiles: true });
|
|
36
|
+
export async function handler({ app, appId, clientCredentials, context, name, paths, remote, useFileName, }) {
|
|
37
|
+
const [resolvedAppId, resolvedRemote] = await resolveAppIdAndRemote(app, context, remote, appId);
|
|
38
|
+
await authenticate(resolvedRemote, 'assets:write', clientCredentials);
|
|
39
|
+
const normalizedPaths = paths.map((path) => normalizePath(path));
|
|
40
|
+
const files = await fg(normalizedPaths, { absolute: true, onlyFiles: true });
|
|
48
41
|
if (name && files.length > 1) {
|
|
49
|
-
throw new
|
|
42
|
+
throw new AppsembleError('--name was specified but multiple files were found.');
|
|
50
43
|
}
|
|
51
|
-
|
|
44
|
+
logger.info(`Creating ${files.length} asset(s)`);
|
|
52
45
|
for (const path of files) {
|
|
53
|
-
|
|
54
|
-
await
|
|
55
|
-
name: name || (useFileName ?
|
|
46
|
+
logger.info('');
|
|
47
|
+
await createAsset({
|
|
48
|
+
name: name || (useFileName ? parse(path).name : null),
|
|
56
49
|
appId: resolvedAppId,
|
|
57
50
|
path,
|
|
58
51
|
remote: resolvedRemote,
|
|
59
52
|
});
|
|
60
53
|
}
|
|
61
54
|
}
|
|
62
|
-
exports.handler = handler;
|
|
63
55
|
//# sourceMappingURL=create.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["create.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAA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CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACjG,MAAM,YAAY,CAAC,cAAc,EAAE,cAAc,EAAE,iBAAiB,CAAC,CAAC;IAEtE,MAAM,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;IACjE,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE7E,IAAI,IAAI,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QAC5B,MAAM,IAAI,cAAc,CAAC,qDAAqD,CAAC,CAAC;KACjF;IAED,MAAM,CAAC,IAAI,CAAC,YAAY,KAAK,CAAC,MAAM,WAAW,CAAC,CAAC;IACjD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChB,MAAM,WAAW,CAAC;YAChB,IAAI,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;YACrD,KAAK,EAAE,aAAa;YACpB,IAAI;YACJ,MAAM,EAAE,cAAc;SACvB,CAAC,CAAC;KACJ;AACH,CAAC"}
|
package/commands/asset/create.ts
CHANGED
|
@@ -5,10 +5,10 @@ import fg from 'fast-glob';
|
|
|
5
5
|
import normalizePath from 'normalize-path';
|
|
6
6
|
import { Argv } from 'yargs';
|
|
7
7
|
|
|
8
|
-
import { resolveAppIdAndRemote } from '../../lib/app';
|
|
9
|
-
import { createAsset } from '../../lib/asset';
|
|
10
|
-
import { authenticate } from '../../lib/authentication';
|
|
11
|
-
import { BaseArguments } from '../../types';
|
|
8
|
+
import { resolveAppIdAndRemote } from '../../lib/app.js';
|
|
9
|
+
import { createAsset } from '../../lib/asset.js';
|
|
10
|
+
import { authenticate } from '../../lib/authentication.js';
|
|
11
|
+
import { BaseArguments } from '../../types.js';
|
|
12
12
|
|
|
13
13
|
interface CreateAssetArguments extends BaseArguments {
|
|
14
14
|
name: string;
|