@forge/cli-shared 3.26.0 → 3.26.1-next.1
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/CHANGELOG.md +14 -0
- package/out/apps/app-config.d.ts.map +1 -1
- package/out/apps/app-config.js +3 -1
- package/out/apps/create-an-app.d.ts.map +1 -1
- package/out/apps/create-an-app.js +3 -1
- package/out/apps/register-app.d.ts +8 -4
- package/out/apps/register-app.d.ts.map +1 -1
- package/out/apps/register-app.js +6 -4
- package/out/config/config-file-section-reader.d.ts +3 -0
- package/out/config/config-file-section-reader.d.ts.map +1 -1
- package/out/config/config-file-section-reader.js +2 -1
- package/out/graphql/graphql-types.d.ts +553 -49
- package/out/graphql/graphql-types.d.ts.map +1 -1
- package/out/graphql/graphql-types.js +83 -8
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @forge/cli-shared
|
|
2
2
|
|
|
3
|
+
## 3.26.1-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [f8a4714]
|
|
8
|
+
- @forge/util@1.4.3-next.0
|
|
9
|
+
- @forge/manifest@7.0.1-next.0
|
|
10
|
+
|
|
11
|
+
## 3.26.1-next.0
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- c6f6422: Use runtime options from templates correctly
|
|
16
|
+
|
|
3
17
|
## 3.26.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-config.d.ts","sourceRoot":"","sources":["../../src/apps/app-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,OAAO,CAAC;AAG3B,OAAO,EAAa,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAG3D,eAAO,MAAM,cAAc;;EAEzB,CAAC;AAEH,oBAAY,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AACzD,eAAO,MAAM,YAAY,QAAQ,CAAC;AAElC,oBAAY,iBAAiB,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,CAAC;AAE1D,wBAAgB,iBAAiB,CAAC,gBAAgB,EAAE,UAAU;;EAQ7D;AAED,eAAO,MAAM,0BAA0B,oBACnB,oBAAoB,UAAU,CAAC,KAAG,
|
|
1
|
+
{"version":3,"file":"app-config.d.ts","sourceRoot":"","sources":["../../src/apps/app-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,OAAO,CAAC;AAG3B,OAAO,EAAa,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAG3D,eAAO,MAAM,cAAc;;EAEzB,CAAC;AAEH,oBAAY,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AACzD,eAAO,MAAM,YAAY,QAAQ,CAAC;AAElC,oBAAY,iBAAiB,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,CAAC;AAE1D,wBAAgB,iBAAiB,CAAC,gBAAgB,EAAE,UAAU;;EAQ7D;AAED,eAAO,MAAM,0BAA0B,oBACnB,oBAAoB,UAAU,CAAC,KAAG,iBAIxB,CAAC"}
|
package/out/apps/app-config.js
CHANGED
|
@@ -17,5 +17,7 @@ function adjustLegacyAppId(legacyAppDetails) {
|
|
|
17
17
|
return Object.assign(Object.assign({}, legacyAppDetails), { id: (0, ari_1.appIdToAriString)(legacyAppDetails.id) });
|
|
18
18
|
}
|
|
19
19
|
exports.adjustLegacyAppId = adjustLegacyAppId;
|
|
20
|
-
const assertiveAppConfigProvider = (appConfigReader) => () => (0, config_1.assertive)(appConfigReader)
|
|
20
|
+
const assertiveAppConfigProvider = (appConfigReader) => () => (0, config_1.assertive)(appConfigReader)
|
|
21
|
+
.readConfigSectionOrThrow(ui_1.Text.config.missing, ui_1.Text.config.invalid)
|
|
22
|
+
.then(adjustLegacyAppId);
|
|
21
23
|
exports.assertiveAppConfigProvider = assertiveAppConfigProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-an-app.d.ts","sourceRoot":"","sources":["../../src/apps/create-an-app.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB;IACjE,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,gBAAiB,SAAQ,KAAK;;CAI1C;AAED,oBAAY,sBAAsB,GAAG,iBAAiB,GAAG;IACvD,SAAS,EAAE;QACT,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,CAAC;AAEF,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;gBAFhB,SAAS,EAAE,SAAS,EACpB,kBAAkB,EAAE,kBAAkB,EACtC,gBAAgB,EAAE,gBAAgB;IAGxC,OAAO,CAAC,EACnB,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,SAAS,EACV,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"create-an-app.d.ts","sourceRoot":"","sources":["../../src/apps/create-an-app.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB;IACjE,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,gBAAiB,SAAQ,KAAK;;CAI1C;AAED,oBAAY,sBAAsB,GAAG,iBAAiB,GAAG;IACvD,SAAS,EAAE;QACT,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,CAAC;AAEF,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;gBAFhB,SAAS,EAAE,SAAS,EACpB,kBAAkB,EAAE,kBAAkB,EACtC,gBAAgB,EAAE,gBAAgB;IAGxC,OAAO,CAAC,EACnB,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,SAAS,EACV,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAY7C,qBAAqB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAQxD"}
|
|
@@ -16,7 +16,9 @@ class CreateAppCommand {
|
|
|
16
16
|
}
|
|
17
17
|
async execute({ name, description, template, directory }) {
|
|
18
18
|
await this.templater.downloadAndExtract(template, directory);
|
|
19
|
-
const result = await this.registerAppCommand.registerApp({ name, description }, directory,
|
|
19
|
+
const result = await this.registerAppCommand.registerApp({ name, description }, directory, {
|
|
20
|
+
shouldPrependAppName: true
|
|
21
|
+
});
|
|
20
22
|
await this.packageInstaller.install(directory);
|
|
21
23
|
return {
|
|
22
24
|
analytics: { template, appId: result.id, appName: name },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigSectionReader, ConfigSectionWriter } from '../config';
|
|
1
|
+
import { ConfigSectionReader, ConfigSectionWriter, NO_VALIDATION_TYPE } from '../config';
|
|
2
2
|
import { Logger } from '../ui';
|
|
3
3
|
import { AppDetails } from './app-config';
|
|
4
4
|
export interface CreateAppClientInput {
|
|
@@ -26,8 +26,12 @@ export declare class RegisterAppCommand {
|
|
|
26
26
|
private readonly appConfigReader;
|
|
27
27
|
private readonly appConfigWriter;
|
|
28
28
|
private readonly logger;
|
|
29
|
-
constructor(appClient: CreateAppClient, appConfigReader: ConfigSectionReader<
|
|
30
|
-
execute(input: CreateAppClientInput, shouldPrependAppName?:
|
|
31
|
-
|
|
29
|
+
constructor(appClient: CreateAppClient, appConfigReader: ConfigSectionReader<NO_VALIDATION_TYPE>, appConfigWriter: ConfigSectionWriter<AppDetails>, logger: Logger);
|
|
30
|
+
execute(input: CreateAppClientInput, { shouldPrependAppName }?: {
|
|
31
|
+
shouldPrependAppName?: boolean | undefined;
|
|
32
|
+
}): Promise<RegisterAppResult>;
|
|
33
|
+
registerApp(input: CreateAppClientInput, directory: string, { shouldPrependAppName }: {
|
|
34
|
+
shouldPrependAppName: boolean;
|
|
35
|
+
}): Promise<CreateAppResult>;
|
|
32
36
|
}
|
|
33
37
|
//# sourceMappingURL=register-app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-app.d.ts","sourceRoot":"","sources":["../../src/apps/register-app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"register-app.d.ts","sourceRoot":"","sources":["../../src/apps/register-app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEzF,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE;QACZ,GAAG,EAAE,MAAM,CAAC;KACb,EAAE,CAAC;CACL;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CAClE;AAED,oBAAY,iBAAiB,GAAG;IAC9B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE;QACT,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,qBAAa,kBAAkB;IAE3B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAHN,SAAS,EAAE,eAAe,EAC1B,eAAe,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,EACxD,eAAe,EAAE,mBAAmB,CAAC,UAAU,CAAC,EAChD,MAAM,EAAE,MAAM;IAGpB,OAAO,CAAC,KAAK,EAAE,oBAAoB,EAAE,EAAE,oBAA4B,EAAE;;KAAK,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAQvG,WAAW,CACtB,KAAK,EAAE,oBAAoB,EAC3B,SAAS,EAAE,MAAM,EACjB,EAAE,oBAAoB,EAAE,EAAE;QAAE,oBAAoB,EAAE,OAAO,CAAA;KAAE,GAC1D,OAAO,CAAC,eAAe,CAAC;CAwB5B"}
|
package/out/apps/register-app.js
CHANGED
|
@@ -10,19 +10,21 @@ class RegisterAppCommand {
|
|
|
10
10
|
this.appConfigWriter = appConfigWriter;
|
|
11
11
|
this.logger = logger;
|
|
12
12
|
}
|
|
13
|
-
async execute(input, shouldPrependAppName = false) {
|
|
14
|
-
const result = await this.registerApp(input, '.', shouldPrependAppName
|
|
13
|
+
async execute(input, { shouldPrependAppName = false } = {}) {
|
|
14
|
+
const result = await this.registerApp(input, '.', { shouldPrependAppName });
|
|
15
15
|
return {
|
|
16
16
|
analytics: { appId: result.id, appName: input.name },
|
|
17
17
|
environments: result.environments.map((env) => env.key)
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
async registerApp(input, directory, shouldPrependAppName
|
|
20
|
+
async registerApp(input, directory, { shouldPrependAppName }) {
|
|
21
21
|
this.logger.info(ui_1.Text.create.taskRegister);
|
|
22
22
|
const result = await this.appClient.createApp(input);
|
|
23
23
|
await (0, file_system_1.inDirectory)(directory, async () => {
|
|
24
24
|
const section = await this.appConfigReader.readConfigSection();
|
|
25
|
-
let newAppDetails =
|
|
25
|
+
let newAppDetails = {
|
|
26
|
+
id: result.id
|
|
27
|
+
};
|
|
26
28
|
if (section !== 'invalid' && section !== 'missing') {
|
|
27
29
|
newAppDetails = Object.assign(Object.assign({}, section), newAppDetails);
|
|
28
30
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import * as t from 'io-ts';
|
|
1
2
|
import { ConfigReader } from './config';
|
|
2
3
|
import { Codec, CodecType, InnerType } from './config-codec-types';
|
|
3
4
|
import { ConfigSectionReader } from './config-section';
|
|
5
|
+
export declare const NO_VALIDATION: t.TypeC<{}>;
|
|
6
|
+
export declare type NO_VALIDATION_TYPE = t.TypeOf<typeof NO_VALIDATION>;
|
|
4
7
|
export declare class ConfigFileSectionReader {
|
|
5
8
|
private readonly configReader;
|
|
6
9
|
constructor(configReader: ConfigReader);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-file-section-reader.d.ts","sourceRoot":"","sources":["../../src/config/config-file-section-reader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config-file-section-reader.d.ts","sourceRoot":"","sources":["../../src/config/config-file-section-reader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,eAAO,MAAM,aAAa,aAAa,CAAC;AACxC,oBAAY,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC;AAEhE,qBAAa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAAZ,YAAY,EAAE,YAAY;IAE1C,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,KAAK,EAC9D,GAAG,EAAE,CAAC,EACN,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,SAAS,CAAC;CAWjD;AAcD,eAAO,MAAM,0BAA0B,kFAGvB,YAAY,sCAG3B,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.configFileReaderForSection = exports.ConfigFileSectionReader = void 0;
|
|
3
|
+
exports.configFileReaderForSection = exports.ConfigFileSectionReader = exports.NO_VALIDATION = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
|
+
exports.NO_VALIDATION = t.type({});
|
|
6
7
|
class ConfigFileSectionReader {
|
|
7
8
|
constructor(configReader) {
|
|
8
9
|
this.configReader = configReader;
|