@forge/cli-shared 2.3.0-next.0 → 2.3.0-next.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,88 @@
1
1
  # @forge/cli-shared
2
2
 
3
+ ## 2.3.0-next.11
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [720953f]
8
+ - @forge/manifest@3.3.0-next.9
9
+
10
+ ## 2.3.0-next.10
11
+
12
+ ### Patch Changes
13
+
14
+ - 47a71a62: Upgrade graphql-request for node 16 compatibility
15
+ - Updated dependencies [fcd95803]
16
+ - Updated dependencies [e65d33e6]
17
+ - @forge/manifest@3.3.0-next.8
18
+
19
+ ## 2.3.0-next.9
20
+
21
+ ### Minor Changes
22
+
23
+ - cf2420d2: Added root package.json and lock files to app bundle.
24
+
25
+ ## 2.3.0-next.8
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies [8e35955]
30
+ - @forge/manifest@3.3.0-next.7
31
+
32
+ ## 2.3.0-next.7
33
+
34
+ ### Patch Changes
35
+
36
+ - Updated dependencies [ad94136]
37
+ - @forge/manifest@3.3.0-next.6
38
+
39
+ ## 2.3.0-next.6
40
+
41
+ ### Patch Changes
42
+
43
+ - Updated dependencies [e95919f]
44
+ - Updated dependencies [f894871]
45
+ - @forge/manifest@3.3.0-next.5
46
+
47
+ ## 2.3.0-next.5
48
+
49
+ ### Patch Changes
50
+
51
+ - Updated dependencies [ae111cd]
52
+ - @forge/manifest@3.3.0-next.4
53
+
54
+ ## 2.3.0-next.4
55
+
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies [6c44d2b]
59
+ - Updated dependencies [051ed1f]
60
+ - @forge/manifest@3.3.0-next.3
61
+
62
+ ## 2.3.0-next.3
63
+
64
+ ### Patch Changes
65
+
66
+ - Updated dependencies [88e57a1]
67
+ - Updated dependencies [e822a8a]
68
+ - Updated dependencies [c255b24]
69
+ - @forge/util@1.2.0-next.0
70
+ - @forge/manifest@3.3.0-next.2
71
+
72
+ ## 2.3.0-next.2
73
+
74
+ ### Patch Changes
75
+
76
+ - Updated dependencies [24203783]
77
+ - @forge/manifest@3.3.0-next.1
78
+
79
+ ## 2.3.0-next.1
80
+
81
+ ### Patch Changes
82
+
83
+ - Updated dependencies [c145946]
84
+ - @forge/manifest@3.3.0-next.0
85
+
3
86
  ## 2.3.0-next.0
4
87
 
5
88
  ### Minor Changes
@@ -30,23 +30,23 @@ class ConfigFile {
30
30
  return functions.map((funcs) => funcs.handler.split('.')[0]);
31
31
  }
32
32
  async readConfig() {
33
- const manifestFileContents = this.fileReader.readFile(_1.manifestFilename);
33
+ const manifestFileContents = this.fileReader.readFile(_1.manifestFileName);
34
34
  try {
35
35
  yaml_1.default.scalarOptions.null.nullStr = '';
36
36
  return yaml_1.parse(manifestFileContents);
37
37
  }
38
38
  catch (_a) {
39
- throw new ui_1.ValidationError(ui_1.Text.artifact.error.invalidYaml(_1.manifestFilename));
39
+ throw new ui_1.ValidationError(ui_1.Text.artifact.error.invalidYaml(_1.manifestFileName));
40
40
  }
41
41
  }
42
42
  async readConfigToDocument() {
43
- const manifestFileContents = this.fileReader.readFile(_1.manifestFilename);
43
+ const manifestFileContents = this.fileReader.readFile(_1.manifestFileName);
44
44
  if (manifestFileContents) {
45
45
  try {
46
46
  return yaml_1.parseDocument(manifestFileContents);
47
47
  }
48
48
  catch (_a) {
49
- throw new ui_1.ValidationError(ui_1.Text.artifact.error.invalidYaml(_1.manifestFilename));
49
+ throw new ui_1.ValidationError(ui_1.Text.artifact.error.invalidYaml(_1.manifestFileName));
50
50
  }
51
51
  }
52
52
  }
@@ -76,18 +76,18 @@ class ConfigFile {
76
76
  return actualModules;
77
77
  }
78
78
  async prependAppNameToModules(name) {
79
- const manifestFileContents = this.fileReader.readFile(_1.manifestFilename);
79
+ const manifestFileContents = this.fileReader.readFile(_1.manifestFileName);
80
80
  const currentConfigDoc = yaml_1.parseDocument(manifestFileContents || '');
81
81
  const modules = currentConfigDoc.get('modules');
82
82
  if (modules && modules.type === util_1.Type.MAP) {
83
83
  const modulesObject = modules.toJSON();
84
84
  const modulesWithUniqueName = this.makeManifestUnique(modulesObject, name);
85
85
  currentConfigDoc.set('modules', modulesWithUniqueName);
86
- this.fileWriter.writeStringToFile(currentConfigDoc.toString(), _1.manifestFilename);
86
+ this.fileWriter.writeStringToFile(currentConfigDoc.toString(), _1.manifestFileName);
87
87
  }
88
88
  }
89
89
  async writeToConfigFile(configKey, config) {
90
- const manifestFileContents = this.fileReader.readFile(_1.manifestFilename);
90
+ const manifestFileContents = this.fileReader.readFile(_1.manifestFileName);
91
91
  const currentConfigDoc = yaml_1.parseDocument(manifestFileContents || '');
92
92
  Object.keys(config).forEach((key) => {
93
93
  if (config[key] === undefined) {
@@ -95,7 +95,7 @@ class ConfigFile {
95
95
  }
96
96
  });
97
97
  currentConfigDoc.set(configKey, config);
98
- this.fileWriter.writeStringToFile(currentConfigDoc.toString(), _1.manifestFilename);
98
+ this.fileWriter.writeStringToFile(currentConfigDoc.toString(), _1.manifestFileName);
99
99
  }
100
100
  getHostedResourceKeys(modules) {
101
101
  const resourceKeys = [];
@@ -1,5 +1,6 @@
1
1
  import { ManifestSchema, Resources } from '@forge/manifest';
2
- export declare const manifestFilename = "manifest.yml";
2
+ export declare const manifestFileName = "manifest.yml";
3
+ export declare const dependencyFileNames: string[];
3
4
  export interface BaseModule {
4
5
  key: string;
5
6
  }
@@ -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;AAE5D,eAAO,MAAM,gBAAgB,iBAAiB,CAAC;AAE/C,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,qBAAsB,SAAQ,UAAU;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;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@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isHostedResourceModule = exports.validateResource = exports.manifestFilename = void 0;
4
- exports.manifestFilename = 'manifest.yml';
3
+ exports.isHostedResourceModule = exports.validateResource = exports.dependencyFileNames = exports.manifestFileName = void 0;
4
+ exports.manifestFileName = 'manifest.yml';
5
+ exports.dependencyFileNames = [exports.manifestFileName, 'package.json', 'package-lock.json', 'yarn.lock'];
5
6
  exports.validateResource = (resource) => {
6
7
  const { key, path } = resource;
7
8
  return typeof key === 'string' && typeof path === 'string';