npm package diff
Package: @forge/bundler
Versions: 4.17.6-next.4 - 4.17.6-next.5
File: package/out/config/node.js
Index: package/out/config/node.js
===================================================================
--- package/out/config/node.js
+++ package/out/config/node.js
@@ -1,9 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.getNodeRuntimeBuildConfig = exports.getWrapperProvider = exports.NetworkWrapperProvider = exports.LocalWrapperProvider = exports.ParseWrapperCDNIndexError = exports.WrapperNetworkError = exports.LocalWrapperNotFoundError = exports.LOCAL_WRAPPER_PATH = exports.NODE_RUNTIME_VERSION_FILE = exports.NODE_WEBPACK_USER_CODE_DIR = exports.NODE_WEBPACK_CONFIG_NAME = void 0;
+exports.getNodeRuntimeBuildConfig = exports.getWrapperProvider = exports.NetworkWrapperProvider = exports.LocalWrapperProvider = exports.ParseWrapperCDNIndexError = exports.WrapperNetworkError = exports.LocalWrapperNotFoundError = exports.NODE_RUNTIME_VERSION_FILE = exports.NODE_WEBPACK_USER_CODE_DIR = exports.NODE_WEBPACK_CONFIG_NAME = void 0;
const tslib_1 = require("tslib");
-const path_1 = tslib_1.__importDefault(require("path"));
const cheerio_1 = tslib_1.__importDefault(require("cheerio"));
const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
const cli_shared_1 = require("@forge/cli-shared");
const common_1 = require("./common");
@@ -17,9 +16,8 @@
RuntimeCDN["PROD"] = "https://forge-node-runtime.prod-east.frontend.public.atl-paas.net/";
RuntimeCDN["FEDRAMP_MODERATE_STAGING"] = "https://forge-node-runtime.prod-east.frontend.public.atl-paas.net/";
RuntimeCDN["FEDRAMP_MODERATE_PROD"] = "https://forge-node-runtime.prod-east.frontend.public.atl-paas.net/";
})(RuntimeCDN || (RuntimeCDN = {}));
-exports.LOCAL_WRAPPER_PATH = path_1.default.resolve(__dirname, '..', '..', '..', 'forge-node-runtime', 'dist', 'wrapper.js');
class LocalWrapperNotFoundError extends cli_shared_1.UserError {
constructor() {
super('Local node runtime wrapper not found.');
}
@@ -39,9 +37,9 @@
exports.ParseWrapperCDNIndexError = ParseWrapperCDNIndexError;
class LocalWrapperProvider {
filesystemReader;
path;
- constructor(filesystemReader, path = exports.LOCAL_WRAPPER_PATH) {
+ constructor(filesystemReader, path) {
this.filesystemReader = filesystemReader;
this.path = path;
}
async getNodeRuntimeWrapper() {
@@ -100,11 +98,8 @@
}
}
exports.NetworkWrapperProvider = NetworkWrapperProvider;
const getWrapperProvider = ({ fileSystemReader }) => {
- if (process.env.FORGE_USE_LOCAL_WRAPPER === 'true') {
- return new LocalWrapperProvider(fileSystemReader);
- }
if (process.env.FORGE_WRAPPER_PATH) {
return new LocalWrapperProvider(fileSystemReader, process.env.FORGE_WRAPPER_PATH);
}
return new NetworkWrapperProvider();