@forge/manifest 8.4.1-experimental-f38fac9 → 8.4.1-experimental-147ff14

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,10 +1,10 @@
1
1
  # @forge/manifest
2
2
 
3
- ## 8.4.1-experimental-f38fac9
3
+ ## 8.4.1-experimental-147ff14
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - 49e01e5: Patch for nx-forge usage
7
+ - f93c4d3: Update manifest definitions
8
8
 
9
9
  ## 8.4.1
10
10
 
@@ -5,8 +5,6 @@ export declare class StringResourceInterpolatorError extends ManifestInterpolato
5
5
  }
6
6
  export declare class StringResourceInterpolator implements ManifestInterpolator {
7
7
  type: InterpolatorType;
8
- manifestPath: string;
9
- constructor(manifestPath: string);
10
8
  interpolate(manifest: ManifestSchema): ManifestSchema;
11
9
  private fetchContentFromResourceFile;
12
10
  private getResourcePath;
@@ -1 +1 @@
1
- {"version":3,"file":"string-resource-interpolator.d.ts","sourceRoot":"","sources":["../../src/interpolator/string-resource-interpolator.ts"],"names":[],"mappings":"AACA,OAAO,EAAyB,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAG3E,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAa5G,qBAAa,+BAAgC,SAAQ,yBAAyB;gBAChE,OAAO,EAAE,MAAM;CAI5B;AAKD,qBAAa,0BAA2B,YAAW,oBAAoB;IACrE,IAAI,EAAE,gBAAgB,CAAoC;IAC1D,YAAY,EAAE,MAAM,CAAC;gBAET,YAAY,EAAE,MAAM;IAIhC,WAAW,CAAC,QAAQ,EAAE,cAAc,GAAG,cAAc;IAiBrD,OAAO,CAAC,4BAA4B;IAUpC,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,sBAAsB;IAc9B,OAAO,CAAC,8BAA8B;CAOvC"}
1
+ {"version":3,"file":"string-resource-interpolator.d.ts","sourceRoot":"","sources":["../../src/interpolator/string-resource-interpolator.ts"],"names":[],"mappings":"AACA,OAAO,EAAyB,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAG3E,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAa5G,qBAAa,+BAAgC,SAAQ,yBAAyB;gBAChE,OAAO,EAAE,MAAM;CAI5B;AAKD,qBAAa,0BAA2B,YAAW,oBAAoB;IACrE,IAAI,EAAE,gBAAgB,CAAoC;IAE1D,WAAW,CAAC,QAAQ,EAAE,cAAc,GAAG,cAAc;IAiBrD,OAAO,CAAC,4BAA4B;IAUpC,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,sBAAsB;IAc9B,OAAO,CAAC,8BAA8B;CAOvC"}
@@ -19,10 +19,6 @@ class StringResourceInterpolatorError extends manifest_interpolator_1.ManifestIn
19
19
  exports.StringResourceInterpolatorError = StringResourceInterpolatorError;
20
20
  class StringResourceInterpolator {
21
21
  type = manifest_interpolator_1.InterpolatorType.STRING_RESOURCE;
22
- manifestPath;
23
- constructor(manifestPath) {
24
- this.manifestPath = manifestPath;
25
- }
26
22
  interpolate(manifest) {
27
23
  MODULE_PROPERTIES_TO_INTERPOLATE.forEach(({ moduleType, property }) => {
28
24
  const modules = manifest.modules?.[moduleType];
@@ -40,7 +36,7 @@ class StringResourceInterpolator {
40
36
  }
41
37
  fetchContentFromResourceFile(modulePropertyWithStringResource, manifest) {
42
38
  const resourcePath = this.getResourcePath(manifest, modulePropertyWithStringResource);
43
- const manifestDir = (0, path_1.dirname)(this.manifestPath);
39
+ const manifestDir = (0, path_1.dirname)(types_1.MANIFEST_FILE);
44
40
  try {
45
41
  return (0, fs_1.readFileSync)((0, path_1.resolve)(manifestDir, resourcePath), 'utf8');
46
42
  }
@@ -13147,6 +13147,40 @@
13147
13147
  }
13148
13148
  ]
13149
13149
  },
13150
+ "resolver": {
13151
+ "anyOf": [
13152
+ {
13153
+ "additionalProperties": false,
13154
+ "type": "object",
13155
+ "properties": {
13156
+ "function": {
13157
+ "type": "string",
13158
+ "minLength": 1,
13159
+ "maxLength": 255,
13160
+ "pattern": "^[a-zA-Z0-9-_]+$"
13161
+ }
13162
+ },
13163
+ "required": [
13164
+ "function"
13165
+ ]
13166
+ },
13167
+ {
13168
+ "additionalProperties": false,
13169
+ "type": "object",
13170
+ "properties": {
13171
+ "endpoint": {
13172
+ "type": "string",
13173
+ "minLength": 1,
13174
+ "maxLength": 255,
13175
+ "pattern": "^[a-zA-Z0-9-_]+$"
13176
+ }
13177
+ },
13178
+ "required": [
13179
+ "endpoint"
13180
+ ]
13181
+ }
13182
+ ]
13183
+ },
13150
13184
  "resourceUploadId": {
13151
13185
  "type": "string",
13152
13186
  "minLength": 1,
@@ -8533,6 +8533,13 @@ export interface Modules {
8533
8533
  render?: 'default' | 'native';
8534
8534
  [k: string]: unknown;
8535
8535
  };
8536
+ resolver?:
8537
+ | {
8538
+ function: string;
8539
+ }
8540
+ | {
8541
+ endpoint: string;
8542
+ };
8536
8543
  resourceUploadId?: string;
8537
8544
  key: ModuleKeySchema;
8538
8545
  },
@@ -8556,6 +8563,13 @@ export interface Modules {
8556
8563
  render?: 'default' | 'native';
8557
8564
  [k: string]: unknown;
8558
8565
  };
8566
+ resolver?:
8567
+ | {
8568
+ function: string;
8569
+ }
8570
+ | {
8571
+ endpoint: string;
8572
+ };
8559
8573
  resourceUploadId?: string;
8560
8574
  key: ModuleKeySchema;
8561
8575
  }[]
@@ -2,7 +2,7 @@ import { ManifestParser } from './manifest-parser';
2
2
  export declare class ManifestParserBuilder {
3
3
  private manifestInterpolatorManager;
4
4
  constructor();
5
- withInterpolators(manifestPath: string): ManifestParserBuilder;
5
+ withInterpolators(): ManifestParserBuilder;
6
6
  build(): ManifestParser;
7
7
  }
8
8
  //# sourceMappingURL=manifest-parser-builder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"manifest-parser-builder.d.ts","sourceRoot":"","sources":["../../src/utils/manifest-parser-builder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD,qBAAa,qBAAqB;IAChC,OAAO,CAAC,2BAA2B,CAA8B;;IAcjE,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,qBAAqB;IAU9D,KAAK,IAAI,cAAc;CAGxB"}
1
+ {"version":3,"file":"manifest-parser-builder.d.ts","sourceRoot":"","sources":["../../src/utils/manifest-parser-builder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD,qBAAa,qBAAqB;IAChC,OAAO,CAAC,2BAA2B,CAA8B;;IAcjE,iBAAiB,IAAI,qBAAqB;IAU1C,KAAK,IAAI,cAAc;CAGxB"}
@@ -10,9 +10,9 @@ class ManifestParserBuilder {
10
10
  constructor() {
11
11
  this.manifestInterpolatorManager = new manifest_interpolator_manager_1.ManifestInterpolatorManager();
12
12
  }
13
- withInterpolators(manifestPath) {
13
+ withInterpolators() {
14
14
  this.manifestInterpolatorManager.addInterpolator(new environment_variable_interpolator_1.EnvironmentVariableInterpolator(process.env));
15
- this.manifestInterpolatorManager.addInterpolator(new string_resource_interpolator_1.StringResourceInterpolator(manifestPath));
15
+ this.manifestInterpolatorManager.addInterpolator(new string_resource_interpolator_1.StringResourceInterpolator());
16
16
  return this;
17
17
  }
18
18
  build() {
@@ -1 +1 @@
1
- {"version":3,"file":"yaml-validator.d.ts","sourceRoot":"","sources":["../../src/validators/yaml-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAIpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG3D,qBAAa,aAAa,CAAC,CAAC,CAAE,YAAW,kBAAkB,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,CAAC,CAAC;IACrF,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC;CAoD9F"}
1
+ {"version":3,"file":"yaml-validator.d.ts","sourceRoot":"","sources":["../../src/validators/yaml-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAIpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG3D,qBAAa,aAAa,CAAC,CAAC,CAAE,YAAW,kBAAkB,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,CAAC,CAAC;IACrF,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC;CAiD9F"}
@@ -16,10 +16,7 @@ class YamlValidator {
16
16
  }
17
17
  try {
18
18
  const content = fs_1.default.readFileSync(manifest.filePath, 'utf8');
19
- const manifestContent = new utils_1.ManifestParserBuilder()
20
- .withInterpolators(manifest.filePath)
21
- .build()
22
- .parseManifest(content);
19
+ const manifestContent = new utils_1.ManifestParserBuilder().withInterpolators().build().parseManifest(content);
23
20
  return {
24
21
  success: true,
25
22
  manifestObject: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/manifest",
3
- "version": "8.4.1-experimental-f38fac9",
3
+ "version": "8.4.1-experimental-147ff14",
4
4
  "description": "Definitions and validations of the Forge manifest",
5
5
  "main": "out/index.js",
6
6
  "scripts": {