@appsemble/cli 0.20.13 → 0.20.14
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 +5 -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/commands/config/set.d.ts
CHANGED
package/commands/config/set.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const node_utils_1 = require("@appsemble/node-utils");
|
|
9
|
-
const utils_1 = require("@appsemble/utils");
|
|
10
|
-
const read_pkg_up_1 = __importDefault(require("read-pkg-up"));
|
|
11
|
-
exports.command = 'set <key> <value>';
|
|
12
|
-
exports.description = 'Set an Appsemble configuration option in package.json.';
|
|
13
|
-
function builder(yargs) {
|
|
1
|
+
import { inspect } from 'util';
|
|
2
|
+
import { logger, writeData } from '@appsemble/node-utils';
|
|
3
|
+
import { has } from '@appsemble/utils';
|
|
4
|
+
import { readPackageUp } from 'read-pkg-up';
|
|
5
|
+
export const command = 'set <key> <value>';
|
|
6
|
+
export const description = 'Set an Appsemble configuration option in package.json.';
|
|
7
|
+
export function builder(yargs) {
|
|
14
8
|
return yargs
|
|
15
9
|
.positional('key', {
|
|
16
10
|
describe: 'The key whose value to set',
|
|
@@ -19,11 +13,11 @@ function builder(yargs) {
|
|
|
19
13
|
describe: 'The value to set',
|
|
20
14
|
});
|
|
21
15
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
if (!
|
|
26
|
-
|
|
16
|
+
export async function handler({ key, value }) {
|
|
17
|
+
const { packageJson, path } = await readPackageUp({ normalize: false });
|
|
18
|
+
const pkg = packageJson;
|
|
19
|
+
if (!has(pkg, 'appsembleServer')) {
|
|
20
|
+
pkg.appsembleServer = {};
|
|
27
21
|
}
|
|
28
22
|
let parsed;
|
|
29
23
|
try {
|
|
@@ -32,9 +26,8 @@ async function handler({ key, value }) {
|
|
|
32
26
|
catch {
|
|
33
27
|
parsed = value;
|
|
34
28
|
}
|
|
35
|
-
|
|
36
|
-
await
|
|
37
|
-
|
|
29
|
+
pkg.appsembleServer[key] = parsed;
|
|
30
|
+
await writeData(path, packageJson);
|
|
31
|
+
logger.info(`Set option appsembleServer.${key} to ${inspect(parsed, { colors: true })} in ${path}`);
|
|
38
32
|
}
|
|
39
|
-
exports.handler = handler;
|
|
40
33
|
//# sourceMappingURL=set.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set.js","sourceRoot":"","sources":["set.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"set.js","sourceRoot":"","sources":["set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAU5C,MAAM,CAAC,MAAM,OAAO,GAAG,mBAAmB,CAAC;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,wDAAwD,CAAC;AAEpF,MAAM,UAAU,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK;SACT,UAAU,CAAC,KAAK,EAAE;QACjB,QAAQ,EAAE,4BAA4B;KACvC,CAAC;SACD,UAAU,CAAC,OAAO,EAAE;QACnB,QAAQ,EAAE,kBAAkB;KAC7B,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,EAAE,GAAG,EAAE,KAAK,EAAsB;IAC9D,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,MAAM,aAAa,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IACxE,MAAM,GAAG,GAAG,WAAkC,CAAC;IAC/C,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,iBAAiB,CAAC,EAAE;QAChC,GAAG,CAAC,eAAe,GAAG,EAAE,CAAC;KAC1B;IACD,IAAI,MAAM,CAAC;IACX,IAAI;QACF,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KAC5B;IAAC,MAAM;QACN,MAAM,GAAG,KAAK,CAAC;KAChB;IACD,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;IAClC,MAAM,SAAS,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACnC,MAAM,CAAC,IAAI,CACT,8BAA8B,GAAG,OAAO,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,OAAO,IAAI,EAAE,CACvF,CAAC;AACJ,CAAC"}
|
package/commands/config/set.ts
CHANGED
|
@@ -2,10 +2,10 @@ import { inspect } from 'util';
|
|
|
2
2
|
|
|
3
3
|
import { logger, writeData } from '@appsemble/node-utils';
|
|
4
4
|
import { has } from '@appsemble/utils';
|
|
5
|
-
import
|
|
5
|
+
import { readPackageUp } from 'read-pkg-up';
|
|
6
6
|
import { Argv } from 'yargs';
|
|
7
7
|
|
|
8
|
-
import { BaseArguments, MonoRepoPackageJson } from '../../types';
|
|
8
|
+
import { BaseArguments, MonoRepoPackageJson } from '../../types.js';
|
|
9
9
|
|
|
10
10
|
interface ConfigSetArguments extends BaseArguments {
|
|
11
11
|
key: string;
|
|
@@ -26,9 +26,10 @@ export function builder(yargs: Argv): Argv<any> {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export async function handler({ key, value }: ConfigSetArguments): Promise<void> {
|
|
29
|
-
const { packageJson, path } = await
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
const { packageJson, path } = await readPackageUp({ normalize: false });
|
|
30
|
+
const pkg = packageJson as MonoRepoPackageJson;
|
|
31
|
+
if (!has(pkg, 'appsembleServer')) {
|
|
32
|
+
pkg.appsembleServer = {};
|
|
32
33
|
}
|
|
33
34
|
let parsed;
|
|
34
35
|
try {
|
|
@@ -36,7 +37,7 @@ export async function handler({ key, value }: ConfigSetArguments): Promise<void>
|
|
|
36
37
|
} catch {
|
|
37
38
|
parsed = value;
|
|
38
39
|
}
|
|
39
|
-
|
|
40
|
+
pkg.appsembleServer[key] = parsed;
|
|
40
41
|
await writeData(path, packageJson);
|
|
41
42
|
logger.info(
|
|
42
43
|
`Set option appsembleServer.${key} to ${inspect(parsed, { colors: true })} in ${path}`,
|
package/commands/login.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { login as handler } from '../lib/authentication';
|
|
1
|
+
export { login as handler } from '../lib/authentication.js';
|
|
2
2
|
export declare const command = "login";
|
|
3
3
|
export declare const description = "Save OAuth2 client credentials in the key chain for future sessions on this machine.";
|
package/commands/login.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var authentication_1 = require("../lib/authentication");
|
|
5
|
-
Object.defineProperty(exports, "handler", { enumerable: true, get: function () { return authentication_1.login; } });
|
|
6
|
-
exports.command = 'login';
|
|
7
|
-
exports.description = 'Save OAuth2 client credentials in the key chain for future sessions on this machine.';
|
|
1
|
+
export { login as handler } from '../lib/authentication.js';
|
|
2
|
+
export const command = 'login';
|
|
3
|
+
export const description = 'Save OAuth2 client credentials in the key chain for future sessions on this machine.';
|
|
8
4
|
//# sourceMappingURL=login.js.map
|
package/commands/login.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["login.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"login.js","sourceRoot":"","sources":["login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAE5D,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAC/B,MAAM,CAAC,MAAM,WAAW,GACtB,sFAAsF,CAAC"}
|
package/commands/login.ts
CHANGED
package/commands/logout.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { remove as handler } from '../lib/authentication';
|
|
1
|
+
export { remove as handler } from '../lib/authentication.js';
|
|
2
2
|
export declare const command = "logout";
|
|
3
3
|
export declare const description = "Remove OAuth2 client credentials from the key chain using an interactive prompt. Beware this will not revoke them.";
|
package/commands/logout.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var authentication_1 = require("../lib/authentication");
|
|
5
|
-
Object.defineProperty(exports, "handler", { enumerable: true, get: function () { return authentication_1.remove; } });
|
|
6
|
-
exports.command = 'logout';
|
|
7
|
-
exports.description = 'Remove OAuth2 client credentials from the key chain using an interactive prompt. Beware this will not revoke them.';
|
|
1
|
+
export { remove as handler } from '../lib/authentication.js';
|
|
2
|
+
export const command = 'logout';
|
|
3
|
+
export const description = 'Remove OAuth2 client credentials from the key chain using an interactive prompt. Beware this will not revoke them.';
|
|
8
4
|
//# sourceMappingURL=logout.js.map
|
package/commands/logout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logout.js","sourceRoot":"","sources":["logout.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logout.js","sourceRoot":"","sources":["logout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAChC,MAAM,CAAC,MAAM,WAAW,GACtB,oHAAoH,CAAC"}
|
package/commands/logout.ts
CHANGED
package/commands/migrate.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Argv } from 'yargs';
|
|
2
|
-
import { BaseArguments } from '../types';
|
|
2
|
+
import { BaseArguments } from '../types.js';
|
|
3
3
|
export declare const command = "migrate [migrate-to]";
|
|
4
4
|
export declare const description = "Migrate the Appsemble database";
|
|
5
5
|
export declare function builder(yargs: Argv): Argv<any>;
|
package/commands/migrate.js
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.handler = exports.builder = exports.description = exports.command = void 0;
|
|
7
|
-
const serverImport_1 = require("../lib/serverImport");
|
|
8
|
-
const package_json_1 = __importDefault(require("../package.json"));
|
|
9
|
-
exports.command = 'migrate [migrate-to]';
|
|
10
|
-
exports.description = 'Migrate the Appsemble database';
|
|
11
|
-
function builder(yargs) {
|
|
1
|
+
import { serverImport } from '../lib/serverImport.js';
|
|
2
|
+
import pkg from '../package.json' assert { type: 'json' };
|
|
3
|
+
export const command = 'migrate [migrate-to]';
|
|
4
|
+
export const description = 'Migrate the Appsemble database';
|
|
5
|
+
export function builder(yargs) {
|
|
12
6
|
return yargs
|
|
13
7
|
.positional('migrate-to', {
|
|
14
8
|
desc: 'The database version to migrate to.',
|
|
15
|
-
default:
|
|
9
|
+
default: pkg.version,
|
|
16
10
|
})
|
|
17
11
|
.option('database-host', {
|
|
18
12
|
desc: 'The host of the database to connect to. This defaults to the connected database container.',
|
|
@@ -43,11 +37,9 @@ function builder(yargs) {
|
|
|
43
37
|
conflicts: ['database-host', 'database-name', 'database-user', 'database-password'],
|
|
44
38
|
});
|
|
45
39
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const { migrate, setArgv } = await (0, serverImport_1.serverImport)('setArgv', 'migrate');
|
|
40
|
+
export async function handler(argv) {
|
|
41
|
+
const { migrate, setArgv } = await serverImport('setArgv', 'migrate');
|
|
49
42
|
setArgv(argv);
|
|
50
43
|
return migrate();
|
|
51
44
|
}
|
|
52
|
-
exports.handler = handler;
|
|
53
45
|
//# sourceMappingURL=migrate.js.map
|
package/commands/migrate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["migrate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["migrate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,GAAG,MAAM,iBAAiB,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC;AAG1D,MAAM,CAAC,MAAM,OAAO,GAAG,sBAAsB,CAAC;AAC9C,MAAM,CAAC,MAAM,WAAW,GAAG,gCAAgC,CAAC;AAE5D,MAAM,UAAU,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK;SACT,UAAU,CAAC,YAAY,EAAE;QACxB,IAAI,EAAE,qCAAqC;QAC3C,OAAO,EAAE,GAAG,CAAC,OAAO;KACrB,CAAC;SACD,MAAM,CAAC,eAAe,EAAE;QACvB,IAAI,EAAE,4FAA4F;KACnG,CAAC;SACD,MAAM,CAAC,eAAe,EAAE;QACvB,IAAI,EAAE,yCAAyC;QAC/C,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,IAAI;KACd,CAAC;SACD,MAAM,CAAC,cAAc,EAAE;QACtB,IAAI,EAAE,qCAAqC;QAC3C,IAAI,EAAE,SAAS;KAChB,CAAC;SACD,MAAM,CAAC,eAAe,EAAE;QACvB,IAAI,EAAE,yCAAyC;QAC/C,OAAO,EAAE,CAAC,eAAe,EAAE,mBAAmB,CAAC;KAChD,CAAC;SACD,MAAM,CAAC,eAAe,EAAE;QACvB,IAAI,EAAE,2CAA2C;QACjD,OAAO,EAAE,CAAC,eAAe,EAAE,mBAAmB,CAAC;KAChD,CAAC;SACD,MAAM,CAAC,mBAAmB,EAAE;QAC3B,IAAI,EAAE,+CAA+C;QACrD,OAAO,EAAE,CAAC,eAAe,EAAE,eAAe,CAAC;KAC5C,CAAC;SACD,MAAM,CAAC,cAAc,EAAE;QACtB,IAAI,EAAE,wHAAwH;QAC9H,SAAS,EAAE,CAAC,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,mBAAmB,CAAC;KACpF,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,IAAmB;IAC/C,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,MAAM,YAAY,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACtE,OAAO,CAAC,IAAI,CAAC,CAAC;IACd,OAAO,OAAO,EAAE,CAAC;AACnB,CAAC"}
|
package/commands/migrate.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Argv } from 'yargs';
|
|
2
2
|
|
|
3
|
-
import { serverImport } from '../lib/serverImport';
|
|
4
|
-
import pkg from '../package.json';
|
|
5
|
-
import { BaseArguments } from '../types';
|
|
3
|
+
import { serverImport } from '../lib/serverImport.js';
|
|
4
|
+
import pkg from '../package.json' assert { type: 'json' };
|
|
5
|
+
import { BaseArguments } from '../types.js';
|
|
6
6
|
|
|
7
7
|
export const command = 'migrate [migrate-to]';
|
|
8
8
|
export const description = 'Migrate the Appsemble database';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { ReadStream } from 'fs';
|
|
3
3
|
import { Argv } from 'yargs';
|
|
4
|
-
import { BaseArguments } from '../../types';
|
|
4
|
+
import { BaseArguments } from '../../types.js';
|
|
5
5
|
interface CreateOrganizationArguments extends BaseArguments {
|
|
6
6
|
description: string;
|
|
7
7
|
email: string;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
exports.command = 'create <id>';
|
|
8
|
-
exports.description = 'Register a new organization. You will be the owner of the new organization.';
|
|
9
|
-
function builder(yargs) {
|
|
1
|
+
import { authenticate } from '../../lib/authentication.js';
|
|
2
|
+
import { coerceFile } from '../../lib/coercers.js';
|
|
3
|
+
import { createOrganization } from '../../lib/organization.js';
|
|
4
|
+
export const command = 'create <id>';
|
|
5
|
+
export const description = 'Register a new organization. You will be the owner of the new organization.';
|
|
6
|
+
export function builder(yargs) {
|
|
10
7
|
return yargs
|
|
11
8
|
.positional('id', {
|
|
12
9
|
describe: 'The id for the newly created organization',
|
|
@@ -25,13 +22,12 @@ function builder(yargs) {
|
|
|
25
22
|
})
|
|
26
23
|
.option('icon', {
|
|
27
24
|
describe: 'The file location of the icon representing the organization.',
|
|
28
|
-
coerce:
|
|
25
|
+
coerce: coerceFile,
|
|
29
26
|
});
|
|
30
27
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
await (
|
|
34
|
-
await (0, organization_1.createOrganization)({
|
|
28
|
+
export async function handler({ clientCredentials, description: desc, email, icon, id, name, remote, website, }) {
|
|
29
|
+
await authenticate(remote, 'organizations:write', clientCredentials);
|
|
30
|
+
await createOrganization({
|
|
35
31
|
description: desc,
|
|
36
32
|
email,
|
|
37
33
|
icon,
|
|
@@ -40,5 +36,4 @@ async function handler({ clientCredentials, description: desc, email, icon, id,
|
|
|
40
36
|
website,
|
|
41
37
|
});
|
|
42
38
|
}
|
|
43
|
-
exports.handler = handler;
|
|
44
39
|
//# 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":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAY/D,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC;AACrC,MAAM,CAAC,MAAM,WAAW,GACtB,6EAA6E,CAAC;AAEhF,MAAM,UAAU,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK;SACT,UAAU,CAAC,IAAI,EAAE;QAChB,QAAQ,EAAE,2CAA2C;KACtD,CAAC;SACD,MAAM,CAAC,MAAM,EAAE;QACd,QAAQ,EAAE,8BAA8B;KACzC,CAAC;SACD,MAAM,CAAC,OAAO,EAAE;QACf,QAAQ,EAAE,6DAA6D;KACxE,CAAC;SACD,MAAM,CAAC,SAAS,EAAE;QACjB,QAAQ,EAAE,iCAAiC;KAC5C,CAAC;SACD,MAAM,CAAC,aAAa,EAAE;QACrB,QAAQ,EAAE,6BAA6B;KACxC,CAAC;SACD,MAAM,CAAC,MAAM,EAAE;QACd,QAAQ,EAAE,8DAA8D;QACxE,MAAM,EAAE,UAAU;KACnB,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,EAC5B,iBAAiB,EACjB,WAAW,EAAE,IAAI,EACjB,KAAK,EACL,IAAI,EACJ,EAAE,EACF,IAAI,EACJ,MAAM,EACN,OAAO,GACqB;IAC5B,MAAM,YAAY,CAAC,MAAM,EAAE,qBAAqB,EAAE,iBAAiB,CAAC,CAAC;IACrE,MAAM,kBAAkB,CAAC;QACvB,WAAW,EAAE,IAAI;QACjB,KAAK;QACL,IAAI;QACJ,EAAE;QACF,IAAI;QACJ,OAAO;KACR,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -2,10 +2,10 @@ import { ReadStream } from 'fs';
|
|
|
2
2
|
|
|
3
3
|
import { Argv } from 'yargs';
|
|
4
4
|
|
|
5
|
-
import { authenticate } from '../../lib/authentication';
|
|
6
|
-
import { coerceFile } from '../../lib/coercers';
|
|
7
|
-
import { createOrganization } from '../../lib/organization';
|
|
8
|
-
import { BaseArguments } from '../../types';
|
|
5
|
+
import { authenticate } from '../../lib/authentication.js';
|
|
6
|
+
import { coerceFile } from '../../lib/coercers.js';
|
|
7
|
+
import { createOrganization } from '../../lib/organization.js';
|
|
8
|
+
import { BaseArguments } from '../../types.js';
|
|
9
9
|
|
|
10
10
|
interface CreateOrganizationArguments extends BaseArguments {
|
|
11
11
|
description: string;
|
|
@@ -1,37 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
o[k2] = m[k];
|
|
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 update = __importStar(require("./update"));
|
|
29
|
-
var utils_1 = require("@appsemble/utils");
|
|
30
|
-
Object.defineProperty(exports, "handler", { enumerable: true, get: function () { return utils_1.noop; } });
|
|
31
|
-
exports.command = 'organization';
|
|
32
|
-
exports.description = 'Commands related to organizations.';
|
|
33
|
-
function builder(yargs) {
|
|
34
|
-
return yargs.command(create).command(update).demandCommand(1);
|
|
1
|
+
import * as create from './create.js';
|
|
2
|
+
import * as update from './update.js';
|
|
3
|
+
export { noop as handler } from '@appsemble/utils';
|
|
4
|
+
export const command = 'organization';
|
|
5
|
+
export const description = 'Commands related to organizations.';
|
|
6
|
+
export function builder(yargs) {
|
|
7
|
+
return yargs
|
|
8
|
+
.command(create)
|
|
9
|
+
.command(update)
|
|
10
|
+
.demandCommand(1);
|
|
35
11
|
}
|
|
36
|
-
exports.builder = builder;
|
|
37
12
|
//# 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,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC;AACtC,MAAM,CAAC,MAAM,WAAW,GAAG,oCAAoC,CAAC;AAEhE,MAAM,UAAU,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK;SACT,OAAO,CAAC,MAAkC,CAAC;SAC3C,OAAO,CAAC,MAAkC,CAAC;SAC3C,aAAa,CAAC,CAAC,CAAC,CAAC;AACtB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Argv } from 'yargs';
|
|
1
|
+
import { Argv, CommandModule } from 'yargs';
|
|
2
2
|
|
|
3
|
-
import * as create from './create';
|
|
4
|
-
import * as update from './update';
|
|
3
|
+
import * as create from './create.js';
|
|
4
|
+
import * as update from './update.js';
|
|
5
5
|
|
|
6
6
|
export { noop as handler } from '@appsemble/utils';
|
|
7
7
|
|
|
@@ -9,5 +9,8 @@ export const command = 'organization';
|
|
|
9
9
|
export const description = 'Commands related to organizations.';
|
|
10
10
|
|
|
11
11
|
export function builder(yargs: Argv): Argv {
|
|
12
|
-
return yargs
|
|
12
|
+
return yargs
|
|
13
|
+
.command(create as unknown as CommandModule)
|
|
14
|
+
.command(update as unknown as CommandModule)
|
|
15
|
+
.demandCommand(1);
|
|
13
16
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { ReadStream } from 'fs';
|
|
3
3
|
import { Argv } from 'yargs';
|
|
4
|
-
import { BaseArguments } from '../../types';
|
|
4
|
+
import { BaseArguments } from '../../types.js';
|
|
5
5
|
interface UpdateOrganizationArguments extends BaseArguments {
|
|
6
6
|
description: string;
|
|
7
7
|
email: string;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
exports.command = 'update <id>';
|
|
8
|
-
exports.description = 'Update an existing organization. You must be an owner of the organization.';
|
|
9
|
-
function builder(yargs) {
|
|
1
|
+
import { authenticate } from '../../lib/authentication.js';
|
|
2
|
+
import { coerceFile } from '../../lib/coercers.js';
|
|
3
|
+
import { updateOrganization } from '../../lib/organization.js';
|
|
4
|
+
export const command = 'update <id>';
|
|
5
|
+
export const description = 'Update an existing organization. You must be an owner of the organization.';
|
|
6
|
+
export function builder(yargs) {
|
|
10
7
|
return yargs
|
|
11
8
|
.positional('id', {
|
|
12
9
|
describe: 'The ID of the organization',
|
|
@@ -25,13 +22,12 @@ function builder(yargs) {
|
|
|
25
22
|
})
|
|
26
23
|
.option('icon', {
|
|
27
24
|
describe: 'The file location of the icon representing the organization.',
|
|
28
|
-
coerce:
|
|
25
|
+
coerce: coerceFile,
|
|
29
26
|
});
|
|
30
27
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
await (
|
|
34
|
-
await (0, organization_1.updateOrganization)({
|
|
28
|
+
export async function handler({ clientCredentials, description: desc, email, icon, id, name, remote, website, }) {
|
|
29
|
+
await authenticate(remote, 'organizations:write', clientCredentials);
|
|
30
|
+
await updateOrganization({
|
|
35
31
|
description: desc,
|
|
36
32
|
email,
|
|
37
33
|
icon,
|
|
@@ -40,5 +36,4 @@ async function handler({ clientCredentials, description: desc, email, icon, id,
|
|
|
40
36
|
website,
|
|
41
37
|
});
|
|
42
38
|
}
|
|
43
|
-
exports.handler = handler;
|
|
44
39
|
//# sourceMappingURL=update.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sourceRoot":"","sources":["update.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["update.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAY/D,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC;AACrC,MAAM,CAAC,MAAM,WAAW,GACtB,4EAA4E,CAAC;AAE/E,MAAM,UAAU,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK;SACT,UAAU,CAAC,IAAI,EAAE;QAChB,QAAQ,EAAE,4BAA4B;KACvC,CAAC;SACD,MAAM,CAAC,MAAM,EAAE;QACd,QAAQ,EAAE,+BAA+B;KAC1C,CAAC;SACD,MAAM,CAAC,OAAO,EAAE;QACf,QAAQ,EAAE,6DAA6D;KACxE,CAAC;SACD,MAAM,CAAC,SAAS,EAAE;QACjB,QAAQ,EAAE,iCAAiC;KAC5C,CAAC;SACD,MAAM,CAAC,aAAa,EAAE;QACrB,QAAQ,EAAE,6BAA6B;KACxC,CAAC;SACD,MAAM,CAAC,MAAM,EAAE;QACd,QAAQ,EAAE,8DAA8D;QACxE,MAAM,EAAE,UAAU;KACnB,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,EAC5B,iBAAiB,EACjB,WAAW,EAAE,IAAI,EACjB,KAAK,EACL,IAAI,EACJ,EAAE,EACF,IAAI,EACJ,MAAM,EACN,OAAO,GACqB;IAC5B,MAAM,YAAY,CAAC,MAAM,EAAE,qBAAqB,EAAE,iBAAiB,CAAC,CAAC;IACrE,MAAM,kBAAkB,CAAC;QACvB,WAAW,EAAE,IAAI;QACjB,KAAK;QACL,IAAI;QACJ,EAAE;QACF,IAAI;QACJ,OAAO;KACR,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -2,10 +2,10 @@ import { ReadStream } from 'fs';
|
|
|
2
2
|
|
|
3
3
|
import { Argv } from 'yargs';
|
|
4
4
|
|
|
5
|
-
import { authenticate } from '../../lib/authentication';
|
|
6
|
-
import { coerceFile } from '../../lib/coercers';
|
|
7
|
-
import { updateOrganization } from '../../lib/organization';
|
|
8
|
-
import { BaseArguments } from '../../types';
|
|
5
|
+
import { authenticate } from '../../lib/authentication.js';
|
|
6
|
+
import { coerceFile } from '../../lib/coercers.js';
|
|
7
|
+
import { updateOrganization } from '../../lib/organization.js';
|
|
8
|
+
import { BaseArguments } from '../../types.js';
|
|
9
9
|
|
|
10
10
|
interface UpdateOrganizationArguments extends BaseArguments {
|
|
11
11
|
description: string;
|
|
@@ -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 resource_1 = require("../../lib/resource");
|
|
13
|
-
exports.command = 'create <resource-name> <paths...>';
|
|
14
|
-
exports.description = 'Create resources based on a specified JSON 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 { resolveAppIdAndRemote } from '../../lib/app.js';
|
|
5
|
+
import { authenticate } from '../../lib/authentication.js';
|
|
6
|
+
import { createResource } from '../../lib/resource.js';
|
|
7
|
+
export const command = 'create <resource-name> <paths...>';
|
|
8
|
+
export const description = 'Create resources based on a specified JSON file or directory.';
|
|
9
|
+
export function builder(yargs) {
|
|
16
10
|
return yargs
|
|
17
11
|
.positional('resource-name', {
|
|
18
12
|
describe: 'The name of the resource that should be created.',
|
|
@@ -36,19 +30,18 @@ function builder(yargs) {
|
|
|
36
30
|
demandOption: 'app',
|
|
37
31
|
});
|
|
38
32
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
const files = (await (0, fast_glob_1.default)(normalizedPaths, { absolute: true, onlyFiles: true })).filter((file) => file.endsWith('.json') || file.endsWith('.csv'));
|
|
33
|
+
export async function handler({ app, appId, clientCredentials, context, paths, remote, resourceName, }) {
|
|
34
|
+
const [resolvedAppId, resolvedRemote] = await resolveAppIdAndRemote(app, context, remote, appId);
|
|
35
|
+
await authenticate(resolvedRemote, 'resources:write', clientCredentials);
|
|
36
|
+
const normalizedPaths = paths.map((path) => normalizePath(path));
|
|
37
|
+
const files = (await fg(normalizedPaths, { absolute: true, onlyFiles: true })).filter((file) => file.endsWith('.json') || file.endsWith('.csv'));
|
|
45
38
|
if (!files.length) {
|
|
46
|
-
throw new
|
|
39
|
+
throw new AppsembleError('No .json or .csv files found.');
|
|
47
40
|
}
|
|
48
|
-
|
|
41
|
+
logger.info(`Creating resources based on ${files.length} files`);
|
|
49
42
|
for (const path of files) {
|
|
50
|
-
|
|
51
|
-
await
|
|
43
|
+
logger.info('');
|
|
44
|
+
await createResource({
|
|
52
45
|
resourceName,
|
|
53
46
|
appId: resolvedAppId,
|
|
54
47
|
path,
|
|
@@ -56,5 +49,4 @@ async function handler({ app, appId, clientCredentials, context, paths, remote,
|
|
|
56
49
|
});
|
|
57
50
|
}
|
|
58
51
|
}
|
|
59
|
-
exports.handler = handler;
|
|
60
52
|
//# 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,cAAc,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,MAAM,WAAW,CAAC;AAC3B,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAG3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAWvD,MAAM,CAAC,MAAM,OAAO,GAAG,mCAAmC,CAAC;AAC3D,MAAM,CAAC,MAAM,WAAW,GAAG,+DAA+D,CAAC;AAE3F,MAAM,UAAU,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK;SACT,UAAU,CAAC,eAAe,EAAE;QAC3B,QAAQ,EAAE,kDAAkD;QAC5D,YAAY,EAAE,IAAI;KACnB,CAAC;SACD,UAAU,CAAC,OAAO,EAAE;QACnB,QAAQ,EAAE,qCAAqC;QAC/C,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,IAAI;KACnB,CAAC;SACD,MAAM,CAAC,QAAQ,EAAE;QAChB,QAAQ,EAAE,gDAAgD;QAC1D,IAAI,EAAE,QAAQ;KACf,CAAC;SACD,MAAM,CAAC,KAAK,EAAE;QACb,QAAQ,EAAE,sBAAsB;QAChC,YAAY,EAAE,SAAS;KACxB,CAAC;SACD,MAAM,CAAC,SAAS,EAAE;QACjB,QAAQ,EAAE,gEAAgE;QAC1E,YAAY,EAAE,KAAK;KACpB,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,EAC5B,GAAG,EACH,KAAK,EACL,iBAAiB,EACjB,OAAO,EACP,KAAK,EACL,MAAM,EACN,YAAY,GACY;IACxB,MAAM,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG,MAAM,qBAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACjG,MAAM,YAAY,CAAC,cAAc,EAAE,iBAAiB,EAAE,iBAAiB,CAAC,CAAC;IAEzE,MAAM,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;IACjE,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CACnF,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAC1D,CAAC;IAEF,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;QACjB,MAAM,IAAI,cAAc,CAAC,+BAA+B,CAAC,CAAC;KAC3D;IAED,MAAM,CAAC,IAAI,CAAC,+BAA+B,KAAK,CAAC,MAAM,QAAQ,CAAC,CAAC;IACjE,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChB,MAAM,cAAc,CAAC;YACnB,YAAY;YACZ,KAAK,EAAE,aAAa;YACpB,IAAI;YACJ,MAAM,EAAE,cAAc;SACvB,CAAC,CAAC;KACJ;AACH,CAAC"}
|
|
@@ -3,10 +3,10 @@ import fg from 'fast-glob';
|
|
|
3
3
|
import normalizePath from 'normalize-path';
|
|
4
4
|
import { Argv } from 'yargs';
|
|
5
5
|
|
|
6
|
-
import { resolveAppIdAndRemote } from '../../lib/app';
|
|
7
|
-
import { authenticate } from '../../lib/authentication';
|
|
8
|
-
import { createResource } from '../../lib/resource';
|
|
9
|
-
import { BaseArguments } from '../../types';
|
|
6
|
+
import { resolveAppIdAndRemote } from '../../lib/app.js';
|
|
7
|
+
import { authenticate } from '../../lib/authentication.js';
|
|
8
|
+
import { createResource } from '../../lib/resource.js';
|
|
9
|
+
import { BaseArguments } from '../../types.js';
|
|
10
10
|
|
|
11
11
|
interface CreateResourceArguments extends BaseArguments {
|
|
12
12
|
resourceName: string;
|