npm package diff
Package: @forge/manifest
Versions: 8.4.1 - 8.4.1-experimental-f38fac9
File: package/out/interpolator/string-resource-interpolator.js
Index: package/out/interpolator/string-resource-interpolator.js
===================================================================
--- package/out/interpolator/string-resource-interpolator.js
+++ package/out/interpolator/string-resource-interpolator.js
@@ -18,8 +18,12 @@
}
exports.StringResourceInterpolatorError = StringResourceInterpolatorError;
class StringResourceInterpolator {
type = manifest_interpolator_1.InterpolatorType.STRING_RESOURCE;
+ manifestPath;
+ constructor(manifestPath) {
+ this.manifestPath = manifestPath;
+ }
interpolate(manifest) {
MODULE_PROPERTIES_TO_INTERPOLATE.forEach(({ moduleType, property }) => {
const modules = manifest.modules?.[moduleType];
modules?.forEach((module) => {
@@ -35,9 +39,9 @@
return manifest;
}
fetchContentFromResourceFile(modulePropertyWithStringResource, manifest) {
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 {
return (0, fs_1.readFileSync)((0, path_1.resolve)(manifestDir, resourcePath), 'utf8');
}
catch (error) {