@forge/bundler 4.20.6-next.2 → 4.20.6-next.3
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 +8 -0
- package/out/index.d.ts +1 -1
- package/out/index.d.ts.map +1 -1
- package/out/index.js +1 -2
- package/out/runtime.d.ts +1 -4
- package/out/runtime.d.ts.map +1 -1
- package/out/runtime.js +3 -11
- package/out/types.d.ts +0 -1
- package/out/types.d.ts.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/out/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { NativeUIBundler, NativeUIBundleResult } from './nativeui';
|
|
2
|
-
export { SandboxBundler, NodeBundler
|
|
2
|
+
export { SandboxBundler, NodeBundler } from './runtime';
|
|
3
3
|
export { Bundler, BundlerError, BundlerOutput, BundlerWatch, EntryPoint, WatcherMonitor } from './types';
|
|
4
4
|
export { getCompiler, handleWebpackCompilationResult, runLinter } from './webpack';
|
|
5
5
|
export { getEntryPoints } from './config/common';
|
package/out/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzG,OAAO,EAAE,WAAW,EAAE,8BAA8B,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/out/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LocalWrapperProvider = exports.getWrapperProvider = exports.getNativeUiBuildConfig = exports.getEntryPoints = exports.runLinter = exports.handleWebpackCompilationResult = exports.getCompiler = exports.BundlerError = exports.
|
|
3
|
+
exports.LocalWrapperProvider = exports.getWrapperProvider = exports.getNativeUiBuildConfig = exports.getEntryPoints = exports.runLinter = exports.handleWebpackCompilationResult = exports.getCompiler = exports.BundlerError = exports.NodeBundler = exports.SandboxBundler = exports.NativeUIBundler = void 0;
|
|
4
4
|
var nativeui_1 = require("./nativeui");
|
|
5
5
|
Object.defineProperty(exports, "NativeUIBundler", { enumerable: true, get: function () { return nativeui_1.NativeUIBundler; } });
|
|
6
6
|
var runtime_1 = require("./runtime");
|
|
7
7
|
Object.defineProperty(exports, "SandboxBundler", { enumerable: true, get: function () { return runtime_1.SandboxBundler; } });
|
|
8
8
|
Object.defineProperty(exports, "NodeBundler", { enumerable: true, get: function () { return runtime_1.NodeBundler; } });
|
|
9
|
-
Object.defineProperty(exports, "NODE_RUNTIME_VERSION_FILE", { enumerable: true, get: function () { return runtime_1.NODE_RUNTIME_VERSION_FILE; } });
|
|
10
9
|
var types_1 = require("./types");
|
|
11
10
|
Object.defineProperty(exports, "BundlerError", { enumerable: true, get: function () { return types_1.BundlerError; } });
|
|
12
11
|
var webpack_1 = require("./webpack");
|
package/out/runtime.d.ts
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { BundleLogger, BundlerOutput, BundlerArgs } from './types';
|
|
1
|
+
import { BundleLogger, BundlerArgs } from './types';
|
|
3
2
|
import { ConfigWithOutput, WebpackBundler } from './webpack';
|
|
4
3
|
import { WrapperProvider } from './wrapper-provider';
|
|
5
4
|
export declare class SandboxBundler extends WebpackBundler {
|
|
6
5
|
constructor(logger: BundleLogger);
|
|
7
6
|
getConfig(args: BundlerArgs): ConfigWithOutput;
|
|
8
7
|
}
|
|
9
|
-
export declare const NODE_RUNTIME_VERSION_FILE = "runtime.json";
|
|
10
8
|
export declare class NodeBundler extends WebpackBundler {
|
|
11
9
|
private readonly wrapperProvider;
|
|
12
10
|
constructor(logger: BundleLogger, wrapperProvider: WrapperProvider);
|
|
13
|
-
protected getOutput(config: ConfigWithOutput, stats: webpack.Stats): BundlerOutput;
|
|
14
11
|
getConfig(args: BundlerArgs): ConfigWithOutput;
|
|
15
12
|
private insertWrapperBundle;
|
|
16
13
|
}
|
package/out/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAc,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAAa,cAAe,SAAQ,cAAc;gBACpC,MAAM,EAAE,YAAY;IAIhC,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,gBAAgB;CAG/C;AAUD,qBAAa,WAAY,SAAQ,cAAc;IAG3C,OAAO,CAAC,QAAQ,CAAC,eAAe;gBADhC,MAAM,EAAE,YAAY,EACH,eAAe,EAAE,eAAe;IAKnD,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,gBAAgB;IAyC9C,OAAO,CAAC,mBAAmB;CAkC5B"}
|
package/out/runtime.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NodeBundler = exports.
|
|
3
|
+
exports.NodeBundler = exports.SandboxBundler = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const fs_1 = require("fs");
|
|
6
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
5
|
const webpack_1 = tslib_1.__importDefault(require("webpack"));
|
|
8
6
|
var RawSource = webpack_1.default.sources.RawSource;
|
|
9
7
|
const common_1 = require("./config/common");
|
|
@@ -18,7 +16,7 @@ class SandboxBundler extends webpack_2.WebpackBundler {
|
|
|
18
16
|
}
|
|
19
17
|
}
|
|
20
18
|
exports.SandboxBundler = SandboxBundler;
|
|
21
|
-
|
|
19
|
+
const NODE_RUNTIME_VERSION_FILE = 'runtime.json';
|
|
22
20
|
const NODE_WEBPACK_USER_CODE_DIR = 'bundled';
|
|
23
21
|
class NodeBundler extends webpack_2.WebpackBundler {
|
|
24
22
|
wrapperProvider;
|
|
@@ -26,12 +24,6 @@ class NodeBundler extends webpack_2.WebpackBundler {
|
|
|
26
24
|
super(logger);
|
|
27
25
|
this.wrapperProvider = wrapperProvider;
|
|
28
26
|
}
|
|
29
|
-
getOutput(config, stats) {
|
|
30
|
-
const result = super.getOutput(config, stats);
|
|
31
|
-
result.metadata = result.metadata || {};
|
|
32
|
-
result.metadata.nodeRuntimeVersion = (0, fs_1.readFileSync)(path_1.default.join(result.outputDir, exports.NODE_RUNTIME_VERSION_FILE)).toString();
|
|
33
|
-
return result;
|
|
34
|
-
}
|
|
35
27
|
getConfig(args) {
|
|
36
28
|
const webpackConfig = (0, common_1.getCommonWebpackConfig)(args);
|
|
37
29
|
const newEntries = {};
|
|
@@ -73,7 +65,7 @@ class NodeBundler extends webpack_2.WebpackBundler {
|
|
|
73
65
|
compilation.emitAsset(`${entrypoint.name}.cjs`, source);
|
|
74
66
|
}
|
|
75
67
|
}
|
|
76
|
-
compilation.emitAsset(
|
|
68
|
+
compilation.emitAsset(NODE_RUNTIME_VERSION_FILE, new RawSource(JSON.stringify({
|
|
77
69
|
version: loader ? loader.version : wrapper.version
|
|
78
70
|
}, null, 2)));
|
|
79
71
|
};
|
package/out/types.d.ts
CHANGED
package/out/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,oBAAY,eAAe,GAAG;IAC5B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,oBAAY,eAAe,GAAG;IAC5B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B;AAED,oBAAY,YAAY,GAAG,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;AAE7E,oBAAY,gBAAgB,GAAG,OAAO,GAAG,OAAO,CAAC;AAEjD,oBAAY,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,WAAW,GAAG;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF,oBAAY,gBAAgB,GAAG,WAAW,GAAG;IAC3C,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,gBAAgB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,eAAe,EAAE,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;CAC1G,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,IAAI,IAAI,IAAI,CAAC;CACd;AAED,oBAAY,kBAAkB,GAAG,cAAc,GAAG;IAChD,MAAM,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF,oBAAY,OAAO,GAAG;IACpB,MAAM,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAClD,KAAK,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACjF,CAAC;AAEF,qBAAa,YAAa,SAAQ,SAAS;CAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/bundler",
|
|
3
|
-
"version": "4.20.6-next.
|
|
3
|
+
"version": "4.20.6-next.3",
|
|
4
4
|
"description": "Default bundler for Forge apps",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Atlassian",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@babel/plugin-transform-optional-chaining": "^7.23.4",
|
|
20
20
|
"@babel/plugin-transform-react-jsx": "^7.23.4",
|
|
21
21
|
"@babel/preset-typescript": "^7.23.3",
|
|
22
|
-
"@forge/api": "4.
|
|
22
|
+
"@forge/api": "4.3.0-next.1",
|
|
23
23
|
"@forge/babel-plugin-transform-ui": "1.1.19",
|
|
24
24
|
"@forge/cli-shared": "6.5.3-next.1",
|
|
25
25
|
"@forge/i18n": "0.0.2",
|