@forge/manifest
Advanced tools
Comparing version
@@ -8,2 +8,4 @@ import { ManifestSchema } from '../schema/manifest'; | ||
type: InterpolatorType; | ||
manifestPath: string; | ||
constructor(manifestPath: string); | ||
interpolate(manifest: ManifestSchema): ManifestSchema; | ||
@@ -10,0 +12,0 @@ private fetchContentFromResourceFile; |
@@ -22,2 +22,6 @@ "use strict"; | ||
type = manifest_interpolator_1.InterpolatorType.STRING_RESOURCE; | ||
manifestPath; | ||
constructor(manifestPath) { | ||
this.manifestPath = manifestPath; | ||
} | ||
interpolate(manifest) { | ||
@@ -40,3 +44,3 @@ MODULE_PROPERTIES_TO_INTERPOLATE.forEach(({ moduleType, property }) => { | ||
const resourcePath = this.getResourcePath(manifest, modulePropertyWithStringResource); | ||
const manifestDir = (0, path_1.dirname)(types_1.MANIFEST_FILE); | ||
const manifestDir = (0, path_1.dirname)(this.manifestPath); | ||
try { | ||
@@ -43,0 +47,0 @@ return (0, fs_1.readFileSync)((0, path_1.resolve)(manifestDir, resourcePath), 'utf8'); |
@@ -47,2 +47,12 @@ { | ||
}, | ||
"primaryProduct": { | ||
"type": "string", | ||
"enum": [ | ||
"confluence", | ||
"jira", | ||
"compass" | ||
], | ||
"title": "primaryProduct", | ||
"description": "The primary product for cross-product functionality. If not set, app is not a cross-product app." | ||
}, | ||
"licensing": { | ||
@@ -49,0 +59,0 @@ "additionalProperties": false, |
@@ -25,2 +25,6 @@ /* tslint:disable */ | ||
/** | ||
* The primary product for cross-product functionality. If not set, app is not a cross-product app. | ||
*/ | ||
export type PrimaryProduct = 'confluence' | 'jira' | 'compass'; | ||
/** | ||
* Whether to enable paid app licensing for production installations of this app. Default value of false. | ||
@@ -54,2 +58,3 @@ */ | ||
runtime: Runtime; | ||
primaryProduct?: PrimaryProduct; | ||
licensing?: Licensing; | ||
@@ -56,0 +61,0 @@ features?: Features; |
@@ -5,5 +5,5 @@ import { ManifestParser } from './manifest-parser'; | ||
constructor(); | ||
withInterpolators(): ManifestParserBuilder; | ||
withInterpolators(manifestPath: string): ManifestParserBuilder; | ||
build(): ManifestParser; | ||
} | ||
//# sourceMappingURL=manifest-parser-builder.d.ts.map |
@@ -13,5 +13,5 @@ "use strict"; | ||
} | ||
withInterpolators() { | ||
withInterpolators(manifestPath) { | ||
this.manifestInterpolatorManager.addInterpolator(new environment_variable_interpolator_1.EnvironmentVariableInterpolator(process.env)); | ||
this.manifestInterpolatorManager.addInterpolator(new string_resource_interpolator_1.StringResourceInterpolator()); | ||
this.manifestInterpolatorManager.addInterpolator(new string_resource_interpolator_1.StringResourceInterpolator(manifestPath)); | ||
return this; | ||
@@ -18,0 +18,0 @@ } |
@@ -19,3 +19,6 @@ "use strict"; | ||
const content = fs_1.default.readFileSync(manifest.filePath, 'utf8'); | ||
const manifestContent = new utils_1.ManifestParserBuilder().withInterpolators().build().parseManifest(content); | ||
const manifestContent = new utils_1.ManifestParserBuilder() | ||
.withInterpolators(manifest.filePath) | ||
.build() | ||
.parseManifest(content); | ||
return { | ||
@@ -22,0 +25,0 @@ success: true, |
{ | ||
"name": "@forge/manifest", | ||
"version": "8.4.0", | ||
"version": "8.4.1-experimental-f38fac9", | ||
"description": "Definitions and validations of the Forge manifest", | ||
@@ -5,0 +5,0 @@ "main": "out/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3503495
0.06%100009
0.04%2
100%