@forge/cli-shared 6.6.2-next.4 → 6.6.2-next.6
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 +13 -0
- package/out/apps/app-config.d.ts +1 -1
- package/out/apps/app-config.d.ts.map +1 -1
- package/out/apps/app-config.js +3 -6
- package/out/config/config-file-section-reader.d.ts +2 -0
- package/out/config/config-file-section-reader.d.ts.map +1 -1
- package/out/config/config-file-section-reader.js +6 -0
- package/out/config/config-file.d.ts +10 -0
- package/out/config/config-file.d.ts.map +1 -1
- package/out/config/config-file.js +29 -1
- package/out/config/config-section.d.ts +4 -0
- package/out/config/config-section.d.ts.map +1 -1
- package/out/config/config-section.js +6 -0
- package/out/config/config.d.ts +5 -1
- package/out/config/config.d.ts.map +1 -1
- package/out/graphql/graphql-types.d.ts +33 -3
- package/out/graphql/graphql-types.d.ts.map +1 -1
- package/out/graphql/graphql-types.js +18 -4
- package/out/service/statsig-service.d.ts +2 -4
- package/out/service/statsig-service.d.ts.map +1 -1
- package/out/service/statsig-service.js +2 -3
- package/out/ui/text.d.ts +3 -0
- package/out/ui/text.d.ts.map +1 -1
- package/out/ui/text.js +3 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @forge/cli-shared
|
|
2
2
|
|
|
3
|
+
## 6.6.2-next.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- dbc077f: Added config file utility method to only read appId and refactored commands to perform validation after command configuration
|
|
8
|
+
|
|
9
|
+
## 6.6.2-next.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [01ca857]
|
|
14
|
+
- @forge/manifest@8.7.1-next.2
|
|
15
|
+
|
|
3
16
|
## 6.6.2-next.4
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/out/apps/app-config.d.ts
CHANGED
|
@@ -9,5 +9,5 @@ export declare type AppConfigProvider = () => Promise<AppDetails>;
|
|
|
9
9
|
export declare function adjustLegacyAppId(legacyAppDetails: AppDetails): {
|
|
10
10
|
id: string;
|
|
11
11
|
};
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const assertiveConfigAppIdProvider: (appConfigReader: ConfigSectionReader<AppDetails>) => AppConfigProvider;
|
|
13
13
|
//# sourceMappingURL=app-config.d.ts.map
|
|
@@ -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;
|
|
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;AAE3D,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,4BAA4B,oBACrB,oBAAoB,UAAU,CAAC,KAAG,iBAEyB,CAAC"}
|
package/out/apps/app-config.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.assertiveConfigAppIdProvider = exports.adjustLegacyAppId = exports.appConfigKey = exports.appConfigShape = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
6
|
const ari_1 = require("../ari");
|
|
7
7
|
const config_1 = require("../config");
|
|
8
|
-
const ui_1 = require("../ui");
|
|
9
8
|
exports.appConfigShape = t.type({
|
|
10
9
|
id: t.string
|
|
11
10
|
});
|
|
@@ -20,7 +19,5 @@ function adjustLegacyAppId(legacyAppDetails) {
|
|
|
20
19
|
};
|
|
21
20
|
}
|
|
22
21
|
exports.adjustLegacyAppId = adjustLegacyAppId;
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
.then(adjustLegacyAppId);
|
|
26
|
-
exports.assertiveAppConfigProvider = assertiveAppConfigProvider;
|
|
22
|
+
const assertiveConfigAppIdProvider = (appConfigReader) => () => (0, config_1.assertive)(appConfigReader).readConfigAppIdOrThrow().then(adjustLegacyAppId);
|
|
23
|
+
exports.assertiveConfigAppIdProvider = assertiveConfigAppIdProvider;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as t from 'io-ts';
|
|
2
|
+
import { EcosystemAppAri } from '@forge/util/packages/ari';
|
|
2
3
|
import { ConfigReader } from './config';
|
|
3
4
|
import { Codec, CodecType, InnerType } from './config-codec-types';
|
|
4
5
|
import { ConfigSectionReader } from './config-section';
|
|
@@ -8,6 +9,7 @@ export declare class ConfigFileSectionReader {
|
|
|
8
9
|
private readonly configReader;
|
|
9
10
|
constructor(configReader: ConfigReader);
|
|
10
11
|
readConfigSection<K extends string, V extends Codec>(key: K, schema: CodecType<V>): Promise<InnerType<V> | 'missing' | 'invalid'>;
|
|
12
|
+
readAppId(): Promise<EcosystemAppAri>;
|
|
11
13
|
}
|
|
12
14
|
export declare const configFileReaderForSection: <K extends string, P extends Codec>(key: K, schema: CodecType<P>, configReader: ConfigReader) => ConfigSectionReader<InnerType<P>>;
|
|
13
15
|
//# sourceMappingURL=config-file-section-reader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,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;IAYnC,SAAS,IAAI,OAAO,CAAC,eAAe,CAAC;CAGnD;AAkBD,eAAO,MAAM,0BAA0B,kFAGvB,YAAY,sCAG3B,CAAC"}
|
|
@@ -22,6 +22,9 @@ class ConfigFileSectionReader {
|
|
|
22
22
|
return 'missing';
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
+
async readAppId() {
|
|
26
|
+
return await this.configReader.readAppId();
|
|
27
|
+
}
|
|
25
28
|
}
|
|
26
29
|
exports.ConfigFileSectionReader = ConfigFileSectionReader;
|
|
27
30
|
class ShapedConfigFileSectionReader {
|
|
@@ -36,6 +39,9 @@ class ShapedConfigFileSectionReader {
|
|
|
36
39
|
readConfigSection() {
|
|
37
40
|
return this.configSectionReader.readConfigSection(this.key, this.schema);
|
|
38
41
|
}
|
|
42
|
+
readAppId() {
|
|
43
|
+
return this.configSectionReader.readAppId();
|
|
44
|
+
}
|
|
39
45
|
}
|
|
40
46
|
const configFileReaderForSection = (key, schema, configReader) => {
|
|
41
47
|
return new ShapedConfigFileSectionReader(new ConfigFileSectionReader(configReader), key, schema);
|
|
@@ -3,12 +3,16 @@ import { ConfigReader, ConfigWriter } from './';
|
|
|
3
3
|
import { Modules, ManifestSchema, Resources } from '@forge/manifest';
|
|
4
4
|
import { UserError, ValidationError } from '../shared';
|
|
5
5
|
import { RuntimeType } from '../runtimes';
|
|
6
|
+
import { EcosystemAppAri } from '@forge/util/packages/ari';
|
|
6
7
|
export declare class InvalidManifestError extends ValidationError {
|
|
7
8
|
constructor();
|
|
8
9
|
}
|
|
9
10
|
export declare class ResourceDefinitionMissingError extends UserError {
|
|
10
11
|
constructor(resources: string[]);
|
|
11
12
|
}
|
|
13
|
+
export declare class InvalidConfigAppId extends UserError {
|
|
14
|
+
constructor(appId: string);
|
|
15
|
+
}
|
|
12
16
|
export interface Handler {
|
|
13
17
|
module: string;
|
|
14
18
|
func: string;
|
|
@@ -28,6 +32,7 @@ export declare class ConfigFile implements ConfigReader, ConfigWriter, ConfigInt
|
|
|
28
32
|
private readonly fileWriter;
|
|
29
33
|
private readonly manifestParser;
|
|
30
34
|
constructor(fileReader: FileSystemReader, fileWriter: FileSystemWriter);
|
|
35
|
+
readAppId(): Promise<EcosystemAppAri>;
|
|
31
36
|
getAppHandlers(): Promise<Array<Handler>>;
|
|
32
37
|
readConfig(): Promise<ManifestSchema>;
|
|
33
38
|
snapshotsEnabled(): Promise<boolean>;
|
|
@@ -52,4 +57,9 @@ export declare class ConfigFile implements ConfigReader, ConfigWriter, ConfigInt
|
|
|
52
57
|
getConnectKey(): Promise<string | undefined>;
|
|
53
58
|
private getResourceType;
|
|
54
59
|
}
|
|
60
|
+
export declare class RawConfigFile extends ConfigFile {
|
|
61
|
+
private rawFileReader;
|
|
62
|
+
constructor(fileReader: FileSystemReader, fileWriter: FileSystemWriter);
|
|
63
|
+
readConfig(): Promise<ManifestSchema>;
|
|
64
|
+
}
|
|
55
65
|
//# sourceMappingURL=config-file.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-file.d.ts","sourceRoot":"","sources":["../../src/config/config-file.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGpE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAoB,MAAM,IAAI,CAAC;AAGlE,OAAO,EACL,OAAO,EACP,cAAc,EACd,SAAS,EAMV,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,SAAS,EAAE,eAAe,EAAQ,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAkB,MAAM,aAAa,CAAC;
|
|
1
|
+
{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AAa,CAAmB;gBAC5B,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,gBAAgB;IAIzD,UAAU,IAAI,OAAO,CAAC,cAAc,CAAC;CAInD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConfigFile = exports.findUIKit1Modules = exports.ResourceDefinitionMissingError = exports.InvalidManifestError = void 0;
|
|
3
|
+
exports.RawConfigFile = exports.ConfigFile = exports.findUIKit1Modules = exports.InvalidConfigAppId = exports.ResourceDefinitionMissingError = exports.InvalidManifestError = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const yaml_1 = require("yaml");
|
|
6
6
|
const ui_1 = require("../ui");
|
|
@@ -11,6 +11,7 @@ const manifest_1 = require("@forge/manifest");
|
|
|
11
11
|
const url_1 = require("url");
|
|
12
12
|
const shared_1 = require("../shared");
|
|
13
13
|
const runtimes_1 = require("../runtimes");
|
|
14
|
+
const ari_1 = require("@forge/util/packages/ari");
|
|
14
15
|
class InvalidManifestError extends shared_1.ValidationError {
|
|
15
16
|
constructor() {
|
|
16
17
|
super(ui_1.Text.artifact.error.invalidYaml(_1.manifestFileName));
|
|
@@ -23,6 +24,12 @@ class ResourceDefinitionMissingError extends shared_1.UserError {
|
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
exports.ResourceDefinitionMissingError = ResourceDefinitionMissingError;
|
|
27
|
+
class InvalidConfigAppId extends shared_1.UserError {
|
|
28
|
+
constructor(appId) {
|
|
29
|
+
super(ui_1.Text.config.appId.invalid(appId));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.InvalidConfigAppId = InvalidConfigAppId;
|
|
26
33
|
const isUIKit1 = (module) => {
|
|
27
34
|
return (typeof module === 'object' &&
|
|
28
35
|
module !== null &&
|
|
@@ -100,6 +107,15 @@ class ConfigFile {
|
|
|
100
107
|
this.fileWriter = fileWriter;
|
|
101
108
|
this.manifestParser = new manifest_1.ManifestParserBuilder().withInterpolators().build();
|
|
102
109
|
}
|
|
110
|
+
async readAppId() {
|
|
111
|
+
const manifestFileContents = await this.readConfig();
|
|
112
|
+
try {
|
|
113
|
+
return ari_1.EcosystemAppAri.parse(manifestFileContents.app?.id);
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
throw new InvalidConfigAppId(manifestFileContents.app?.id);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
103
119
|
async getAppHandlers() {
|
|
104
120
|
const config = await this.readConfig();
|
|
105
121
|
const functions = config.modules?.function ?? [];
|
|
@@ -286,3 +302,15 @@ class ConfigFile {
|
|
|
286
302
|
}
|
|
287
303
|
}
|
|
288
304
|
exports.ConfigFile = ConfigFile;
|
|
305
|
+
class RawConfigFile extends ConfigFile {
|
|
306
|
+
rawFileReader;
|
|
307
|
+
constructor(fileReader, fileWriter) {
|
|
308
|
+
super(fileReader, fileWriter);
|
|
309
|
+
this.rawFileReader = fileReader;
|
|
310
|
+
}
|
|
311
|
+
async readConfig() {
|
|
312
|
+
const manifest = this.rawFileReader.readFile(_1.manifestFileName);
|
|
313
|
+
return (0, yaml_1.parse)(manifest);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
exports.RawConfigFile = RawConfigFile;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { EcosystemAppAri } from '@forge/util/packages/ari';
|
|
2
|
+
import { AppDetails } from '../index';
|
|
1
3
|
export interface ConfigSectionReader<V extends object> {
|
|
2
4
|
readConfigSection(): Promise<V | 'missing' | 'invalid'>;
|
|
5
|
+
readAppId(): Promise<EcosystemAppAri>;
|
|
3
6
|
}
|
|
4
7
|
export interface ConfigSectionWriter<V extends object> {
|
|
5
8
|
writeConfigSection(configSection: V): Promise<void>;
|
|
@@ -13,6 +16,7 @@ export declare class AssertiveConfigSectionReader<V extends object> {
|
|
|
13
16
|
private readonly configSectionReader;
|
|
14
17
|
constructor(configSectionReader: ConfigSectionReader<V>);
|
|
15
18
|
readConfigSectionOrThrow(missingMessage: string, invalidMessage: string): Promise<V>;
|
|
19
|
+
readConfigAppIdOrThrow(): Promise<AppDetails>;
|
|
16
20
|
}
|
|
17
21
|
export declare const assertive: <V extends object>(configSectionReader: ConfigSectionReader<V>) => AssertiveConfigSectionReader<V>;
|
|
18
22
|
//# sourceMappingURL=config-section.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-section.d.ts","sourceRoot":"","sources":["../../src/config/config-section.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,MAAM;IACnD,iBAAiB,IAAI,OAAO,CAAC,CAAC,GAAG,SAAS,GAAG,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"config-section.d.ts","sourceRoot":"","sources":["../../src/config/config-section.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,MAAM;IACnD,iBAAiB,IAAI,OAAO,CAAC,CAAC,GAAG,SAAS,GAAG,SAAS,CAAC,CAAC;IACxD,SAAS,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,MAAM;IACnD,kBAAkB,CAAC,aAAa,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtD;AAED,qBAAa,yBAA0B,SAAQ,KAAK;CAAG;AACvD,qBAAa,0BAA2B,SAAQ,KAAK;CAAG;AAExD,qBAAa,4BAA4B,CAAC,CAAC,SAAS,MAAM;IAC5C,OAAO,CAAC,QAAQ,CAAC,mBAAmB;gBAAnB,mBAAmB,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAE3D,wBAAwB,CAAC,cAAc,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAWpF,sBAAsB,IAAI,OAAO,CAAC,UAAU,CAAC;CAM3D;AAED,eAAO,MAAM,SAAS,oGAEwE,CAAC"}
|
|
@@ -24,6 +24,12 @@ class AssertiveConfigSectionReader {
|
|
|
24
24
|
return configValue;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
+
async readConfigAppIdOrThrow() {
|
|
28
|
+
const appId = await this.configSectionReader.readAppId();
|
|
29
|
+
return {
|
|
30
|
+
id: appId.toString()
|
|
31
|
+
};
|
|
32
|
+
}
|
|
27
33
|
}
|
|
28
34
|
exports.AssertiveConfigSectionReader = AssertiveConfigSectionReader;
|
|
29
35
|
const assertive = (configSectionReader) => new AssertiveConfigSectionReader(configSectionReader);
|
package/out/config/config.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ManifestSchema, Resources } from '@forge/manifest';
|
|
2
|
+
import { EcosystemAppAri } from '@forge/util/packages/ari';
|
|
2
3
|
export declare const manifestFileName = "manifest.yml";
|
|
3
4
|
export declare const dependencyFileNames: string[];
|
|
4
5
|
export declare const ModuleEntryPoints: readonly ["view", "edit", "create", "contextConfig", "config", "target"];
|
|
@@ -14,9 +15,12 @@ export declare type HostedResourcesModule = BaseModule & {
|
|
|
14
15
|
} & {
|
|
15
16
|
[entryPoint in ModuleEntryPoint]?: HostedResourcesModule;
|
|
16
17
|
};
|
|
17
|
-
export interface ConfigReader {
|
|
18
|
+
export interface ConfigReader extends ConfigAppIdReader {
|
|
18
19
|
readConfig(): Promise<ManifestSchema>;
|
|
19
20
|
}
|
|
21
|
+
export interface ConfigAppIdReader {
|
|
22
|
+
readAppId(): Promise<EcosystemAppAri>;
|
|
23
|
+
}
|
|
20
24
|
export interface ConfigWriter {
|
|
21
25
|
writeToConfigFile<K extends string, V extends object>(configKey: K, config: V): Promise<void>;
|
|
22
26
|
prependAppNameToModules(name: string): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,eAAO,MAAM,gBAAgB,iBAAiB,CAAC;AAC/C,eAAO,MAAM,mBAAmB,UAAqD,CAAC;AAEtF,eAAO,MAAM,iBAAiB,0EAA2E,CAAC;AAC1G,oBAAY,gBAAgB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,oBAAY,UAAU,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;CACb,GAAG;KACD,UAAU,IAAI,gBAAgB,CAAC,CAAC,EAAE,UAAU;CAC9C,CAAC;AAEF,oBAAY,qBAAqB,GAAG,UAAU,GAAG;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC/B,GAAG;KACD,UAAU,IAAI,gBAAgB,CAAC,CAAC,EAAE,qBAAqB;CACzD,CAAC;AAEF,MAAM,WAAW,YAAa,SAAQ,iBAAiB;IACrD,UAAU,IAAI,OAAO,CAAC,cAAc,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,YAAY;IAC3B,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9F,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtD;AAED,eAAO,MAAM,gBAAgB,aAAc,GAAG,0BAG7C,CAAC;AAEF,eAAO,MAAM,sBAAsB,WAAY,GAAG,oCAGjD,CAAC"}
|
|
@@ -35211,8 +35211,8 @@ export declare type GraphStoreAtlasGoalHasUpdateUpdateTypeFilterInput = {
|
|
|
35211
35211
|
is?: InputMaybe<Array<GraphStoreAtlasGoalHasUpdateUpdateType>>;
|
|
35212
35212
|
isNot?: InputMaybe<Array<GraphStoreAtlasGoalHasUpdateUpdateType>>;
|
|
35213
35213
|
};
|
|
35214
|
-
export declare type GraphStoreAtlasHomeFeedQueryToMetadataNodeUnion = ConfluencePage | JiraIssue | LoomComment | LoomVideo | TeamV2 | TownsquareGoal | TownsquareGoalUpdate | TownsquareProject | TownsquareProjectUpdate;
|
|
35215
|
-
export declare type GraphStoreAtlasHomeFeedQueryToNodeUnion = ConfluencePage | JiraIssue | LoomComment | LoomVideo | TeamV2 | TownsquareGoal | TownsquareGoalUpdate | TownsquareProject | TownsquareProjectUpdate;
|
|
35214
|
+
export declare type GraphStoreAtlasHomeFeedQueryToMetadataNodeUnion = ConfluenceBlogPost | ConfluencePage | JiraIssue | LoomComment | LoomVideo | TeamV2 | TownsquareGoal | TownsquareGoalUpdate | TownsquareProject | TownsquareProjectUpdate;
|
|
35215
|
+
export declare type GraphStoreAtlasHomeFeedQueryToNodeUnion = ConfluenceBlogPost | ConfluencePage | JiraIssue | LoomComment | LoomVideo | TeamV2 | TownsquareGoal | TownsquareGoalUpdate | TownsquareProject | TownsquareProjectUpdate;
|
|
35216
35216
|
export declare type GraphStoreAtlasHomeQueryConnection = {
|
|
35217
35217
|
__typename?: 'GraphStoreAtlasHomeQueryConnection';
|
|
35218
35218
|
nodes: Array<GraphStoreAtlasHomeQueryNode>;
|
|
@@ -49752,6 +49752,12 @@ export declare type HelpCenterPermissionSettings = {
|
|
|
49752
49752
|
allowedAccessGroups?: Maybe<Array<Scalars['String']['output']>>;
|
|
49753
49753
|
hydratedAllowedAccessGroups?: Maybe<JiraServiceManagementOrganizationConnection>;
|
|
49754
49754
|
};
|
|
49755
|
+
export declare type HelpCenterPermissionSettingsHydratedAllowedAccessGroupsArgs = {
|
|
49756
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
|
49757
|
+
before?: InputMaybe<Scalars['String']['input']>;
|
|
49758
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
49759
|
+
last?: InputMaybe<Scalars['Int']['input']>;
|
|
49760
|
+
};
|
|
49755
49761
|
export declare type HelpCenterPermissionSettingsInput = {
|
|
49756
49762
|
accessControlType: HelpCenterAccessControlType;
|
|
49757
49763
|
addedAllowedAccessGroups?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
@@ -71230,6 +71236,7 @@ export declare enum MarketplaceConsoleAppSoftwareVersionLicenseTypeId {
|
|
|
71230
71236
|
export declare type MarketplaceConsoleAppSoftwareVersionListing = {
|
|
71231
71237
|
__typename?: 'MarketplaceConsoleAppSoftwareVersionListing';
|
|
71232
71238
|
appSoftwareId: Scalars['String']['output'];
|
|
71239
|
+
approvalRejectionReason?: Maybe<Scalars['String']['output']>;
|
|
71233
71240
|
approvalStatus: Scalars['String']['output'];
|
|
71234
71241
|
buildNumber: Scalars['String']['output'];
|
|
71235
71242
|
createdAt: Scalars['String']['output'];
|
|
@@ -86415,14 +86422,28 @@ export declare type ShepherdAlertSnippet = {
|
|
|
86415
86422
|
__typename?: 'ShepherdAlertSnippet';
|
|
86416
86423
|
adf?: Maybe<Scalars['JSON']['output']>;
|
|
86417
86424
|
contentId: Scalars['ID']['output'];
|
|
86425
|
+
failureReason?: Maybe<ShepherdAlertSnippetRedactionFailureReason>;
|
|
86418
86426
|
field: Scalars['String']['output'];
|
|
86419
86427
|
redactable: Scalars['Boolean']['output'];
|
|
86420
86428
|
redactedOn?: Maybe<Scalars['DateTime']['output']>;
|
|
86421
86429
|
redactionStatus: ShepherdAlertSnippetRedactionStatus;
|
|
86422
86430
|
snippetTextBlocks?: Maybe<Array<ShepherdAlertSnippetTextBlock>>;
|
|
86423
86431
|
};
|
|
86432
|
+
export declare enum ShepherdAlertSnippetRedactionFailureReason {
|
|
86433
|
+
ContainerId = "CONTAINER_ID",
|
|
86434
|
+
ContainerIdFormat = "CONTAINER_ID_FORMAT",
|
|
86435
|
+
EntityId = "ENTITY_ID",
|
|
86436
|
+
HashMismatch = "HASH_MISMATCH",
|
|
86437
|
+
InvalidAdfPointer = "INVALID_ADF_POINTER",
|
|
86438
|
+
InvalidPointer = "INVALID_POINTER",
|
|
86439
|
+
MaxFieldLength = "MAX_FIELD_LENGTH",
|
|
86440
|
+
OverlappingRequestsForContentItem = "OVERLAPPING_REQUESTS_FOR_CONTENT_ITEM",
|
|
86441
|
+
TooManyRequestsPerContentItem = "TOO_MANY_REQUESTS_PER_CONTENT_ITEM",
|
|
86442
|
+
Unknown = "UNKNOWN"
|
|
86443
|
+
}
|
|
86424
86444
|
export declare enum ShepherdAlertSnippetRedactionStatus {
|
|
86425
86445
|
Redacted = "REDACTED",
|
|
86446
|
+
RedactedHistoryScanFailed = "REDACTED_HISTORY_SCAN_FAILED",
|
|
86426
86447
|
RedactionFailed = "REDACTION_FAILED",
|
|
86427
86448
|
RedactionPending = "REDACTION_PENDING",
|
|
86428
86449
|
Unredacted = "UNREDACTED"
|
|
@@ -90450,6 +90471,7 @@ export declare type TownsquareGoalType = Node & {
|
|
|
90450
90471
|
__typename?: 'TownsquareGoalType';
|
|
90451
90472
|
allowedChildTypes?: Maybe<TownsquareGoalTypeConnection>;
|
|
90452
90473
|
allowedParentTypes?: Maybe<TownsquareGoalTypeConnection>;
|
|
90474
|
+
canLinkToFocusArea?: Maybe<Scalars['Boolean']['output']>;
|
|
90453
90475
|
description?: Maybe<TownsquareGoalTypeDescription>;
|
|
90454
90476
|
icon?: Maybe<TownsquareGoalTypeIcon>;
|
|
90455
90477
|
id: Scalars['ID']['output'];
|
|
@@ -91685,6 +91707,7 @@ export declare type TrelloCardBadges = {
|
|
|
91685
91707
|
externalSource?: Maybe<TrelloCardExternalSource>;
|
|
91686
91708
|
lastUpdatedByAi?: Maybe<Scalars['Boolean']['output']>;
|
|
91687
91709
|
location?: Maybe<Scalars['Boolean']['output']>;
|
|
91710
|
+
maliciousAttachments?: Maybe<Scalars['Int']['output']>;
|
|
91688
91711
|
startedAt?: Maybe<Scalars['DateTime']['output']>;
|
|
91689
91712
|
viewer?: Maybe<TrelloCardViewer>;
|
|
91690
91713
|
votes?: Maybe<Scalars['Int']['output']>;
|
|
@@ -91802,18 +91825,24 @@ export declare type TrelloCardUpdated = {
|
|
|
91802
91825
|
cover?: Maybe<TrelloCardCoverUpdated>;
|
|
91803
91826
|
creation?: Maybe<TrelloCardCreationInfo>;
|
|
91804
91827
|
customFieldItems?: Maybe<TrelloCustomFieldItemUpdatedConnection>;
|
|
91805
|
-
description?: Maybe<
|
|
91828
|
+
description?: Maybe<TrelloUserGeneratedText>;
|
|
91806
91829
|
due?: Maybe<TrelloCardDueInfo>;
|
|
91807
91830
|
id: Scalars['ID']['output'];
|
|
91831
|
+
isTemplate?: Maybe<Scalars['Boolean']['output']>;
|
|
91808
91832
|
labels?: Maybe<TrelloLabelUpdatedConnection>;
|
|
91809
91833
|
lastActivityAt?: Maybe<Scalars['DateTime']['output']>;
|
|
91810
91834
|
location?: Maybe<TrelloCardLocation>;
|
|
91811
91835
|
members?: Maybe<TrelloMemberUpdatedConnection>;
|
|
91836
|
+
mirrorSourceId?: Maybe<Scalars['ID']['output']>;
|
|
91837
|
+
mirrorSourceObjectId?: Maybe<Scalars['ID']['output']>;
|
|
91812
91838
|
name?: Maybe<Scalars['String']['output']>;
|
|
91813
91839
|
objectId?: Maybe<Scalars['ID']['output']>;
|
|
91814
91840
|
onChecklistDeleted?: Maybe<Array<TrelloChecklistDeleted>>;
|
|
91815
91841
|
position?: Maybe<Scalars['Float']['output']>;
|
|
91842
|
+
role?: Maybe<TrelloCardRole>;
|
|
91843
|
+
shortLink?: Maybe<Scalars['TrelloShortLink']['output']>;
|
|
91816
91844
|
stickers?: Maybe<TrelloStickerUpdatedConnection>;
|
|
91845
|
+
url?: Maybe<Scalars['URL']['output']>;
|
|
91817
91846
|
};
|
|
91818
91847
|
export declare type TrelloCardUpdatedConnection = {
|
|
91819
91848
|
__typename?: 'TrelloCardUpdatedConnection';
|
|
@@ -92488,6 +92517,7 @@ export declare type TrelloPlannerCalendarAccount = Node & {
|
|
|
92488
92517
|
googleAccountAri?: Maybe<Scalars['ID']['output']>;
|
|
92489
92518
|
hasRequiredScopes?: Maybe<Scalars['Boolean']['output']>;
|
|
92490
92519
|
id: Scalars['ID']['output'];
|
|
92520
|
+
isExpired?: Maybe<Scalars['Boolean']['output']>;
|
|
92491
92521
|
outboundAuthId?: Maybe<Scalars['ID']['output']>;
|
|
92492
92522
|
providerCalendars?: Maybe<TrelloPlannerProviderCalendarConnection>;
|
|
92493
92523
|
};
|