@atlaspack/core 2.24.1 → 2.24.2
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 +24 -0
- package/dist/AssetGraph.js +591 -0
- package/dist/Atlaspack.js +656 -0
- package/dist/AtlaspackConfig.js +324 -0
- package/dist/AtlaspackConfig.schema.js +108 -0
- package/dist/BundleGraph.js +1628 -0
- package/dist/CommittedAsset.js +142 -0
- package/dist/Dependency.js +125 -0
- package/dist/Environment.js +132 -0
- package/dist/EnvironmentManager.js +108 -0
- package/dist/IdentifierRegistry.js +38 -0
- package/dist/InternalConfig.js +37 -0
- package/dist/PackagerRunner.js +531 -0
- package/dist/ReporterRunner.js +151 -0
- package/dist/RequestTracker.js +1368 -0
- package/dist/SymbolPropagation.js +617 -0
- package/dist/TargetDescriptor.schema.js +143 -0
- package/dist/Transformation.js +487 -0
- package/dist/UncommittedAsset.js +315 -0
- package/dist/Validation.js +196 -0
- package/dist/applyRuntimes.js +305 -0
- package/dist/assetUtils.js +168 -0
- package/dist/atlaspack-v3/AtlaspackV3.js +70 -0
- package/dist/atlaspack-v3/NapiWorkerPool.js +57 -0
- package/dist/atlaspack-v3/fs.js +52 -0
- package/dist/atlaspack-v3/index.js +25 -0
- package/dist/atlaspack-v3/jsCallable.js +16 -0
- package/dist/atlaspack-v3/worker/compat/asset-symbols.js +190 -0
- package/dist/atlaspack-v3/worker/compat/bitflags.js +94 -0
- package/dist/atlaspack-v3/worker/compat/dependency.js +43 -0
- package/dist/atlaspack-v3/worker/compat/environment.js +57 -0
- package/dist/atlaspack-v3/worker/compat/index.js +25 -0
- package/dist/atlaspack-v3/worker/compat/mutable-asset.js +152 -0
- package/dist/atlaspack-v3/worker/compat/plugin-config.js +76 -0
- package/dist/atlaspack-v3/worker/compat/plugin-logger.js +26 -0
- package/dist/atlaspack-v3/worker/compat/plugin-options.js +122 -0
- package/dist/atlaspack-v3/worker/compat/plugin-tracer.js +10 -0
- package/dist/atlaspack-v3/worker/compat/target.js +14 -0
- package/dist/atlaspack-v3/worker/worker.js +292 -0
- package/dist/constants.js +17 -0
- package/dist/dumpGraphToGraphViz.js +281 -0
- package/dist/index.js +62 -0
- package/dist/loadAtlaspackPlugin.js +128 -0
- package/dist/loadDotEnv.js +41 -0
- package/dist/projectPath.js +83 -0
- package/dist/public/Asset.js +279 -0
- package/dist/public/Bundle.js +224 -0
- package/dist/public/BundleGraph.js +359 -0
- package/dist/public/BundleGroup.js +53 -0
- package/dist/public/Config.js +286 -0
- package/dist/public/Dependency.js +138 -0
- package/dist/public/Environment.js +278 -0
- package/dist/public/MutableBundleGraph.js +277 -0
- package/dist/public/PluginOptions.js +80 -0
- package/dist/public/Symbols.js +248 -0
- package/dist/public/Target.js +69 -0
- package/dist/registerCoreWithSerializer.js +38 -0
- package/dist/requests/AssetGraphRequest.js +429 -0
- package/dist/requests/AssetGraphRequestRust.js +246 -0
- package/dist/requests/AssetRequest.js +130 -0
- package/dist/requests/AtlaspackBuildRequest.js +60 -0
- package/dist/requests/AtlaspackConfigRequest.js +490 -0
- package/dist/requests/BundleGraphRequest.js +441 -0
- package/dist/requests/ConfigRequest.js +222 -0
- package/dist/requests/DevDepRequest.js +204 -0
- package/dist/requests/EntryRequest.js +314 -0
- package/dist/requests/PackageRequest.js +65 -0
- package/dist/requests/PathRequest.js +349 -0
- package/dist/requests/TargetRequest.js +1310 -0
- package/dist/requests/ValidationRequest.js +49 -0
- package/dist/requests/WriteBundleRequest.js +254 -0
- package/dist/requests/WriteBundlesRequest.js +165 -0
- package/dist/requests/asset-graph-diff.js +126 -0
- package/dist/requests/asset-graph-dot.js +131 -0
- package/dist/resolveOptions.js +268 -0
- package/dist/rustWorkerThreadDylibHack.js +19 -0
- package/dist/serializerCore.browser.js +43 -0
- package/dist/summarizeRequest.js +39 -0
- package/dist/types.js +31 -0
- package/dist/utils.js +172 -0
- package/dist/worker.js +123 -0
- package/lib/AssetGraph.js +1 -0
- package/lib/SymbolPropagation.js +3 -12
- package/lib/worker.js +0 -7
- package/package.json +13 -14
- package/src/AssetGraph.ts +1 -0
- package/src/SymbolPropagation.ts +5 -9
- package/src/worker.ts +0 -8
- package/tsconfig.json +55 -2
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
var _Environment_environment, _Environment_options;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ISOLATED_ENVS = exports.BROWSER_ENVS = void 0;
|
|
19
|
+
exports.environmentToInternalEnvironment = environmentToInternalEnvironment;
|
|
20
|
+
const nullthrows_1 = __importDefault(require("nullthrows"));
|
|
21
|
+
const browserslist_1 = __importDefault(require("browserslist"));
|
|
22
|
+
const semver_1 = __importDefault(require("semver"));
|
|
23
|
+
const utils_1 = require("../utils");
|
|
24
|
+
const inspect = Symbol.for('nodejs.util.inspect.custom');
|
|
25
|
+
exports.BROWSER_ENVS = new Set([
|
|
26
|
+
'browser',
|
|
27
|
+
'web-worker',
|
|
28
|
+
'service-worker',
|
|
29
|
+
'worklet',
|
|
30
|
+
'tesseract',
|
|
31
|
+
'electron-renderer',
|
|
32
|
+
]);
|
|
33
|
+
const ELECTRON_ENVS = new Set(['electron-main', 'electron-renderer']);
|
|
34
|
+
const NODE_ENVS = new Set(['node', ...ELECTRON_ENVS]);
|
|
35
|
+
const WORKER_ENVS = new Set(['web-worker', 'service-worker']);
|
|
36
|
+
exports.ISOLATED_ENVS = new Set([
|
|
37
|
+
...WORKER_ENVS,
|
|
38
|
+
'worklet',
|
|
39
|
+
'tesseract',
|
|
40
|
+
]);
|
|
41
|
+
const ALL_BROWSERS = [
|
|
42
|
+
'chrome',
|
|
43
|
+
'and_chr',
|
|
44
|
+
'edge',
|
|
45
|
+
'firefox',
|
|
46
|
+
'and_ff',
|
|
47
|
+
'safari',
|
|
48
|
+
'ios',
|
|
49
|
+
'samsung',
|
|
50
|
+
'opera',
|
|
51
|
+
'ie',
|
|
52
|
+
'op_mini',
|
|
53
|
+
'blackberry',
|
|
54
|
+
'op_mob',
|
|
55
|
+
'ie_mob',
|
|
56
|
+
'and_uc',
|
|
57
|
+
'and_qq',
|
|
58
|
+
'baidu',
|
|
59
|
+
'kaios',
|
|
60
|
+
];
|
|
61
|
+
// See require("caniuse-api").getSupport(<feature name>)
|
|
62
|
+
const supportData = {
|
|
63
|
+
esmodules: {
|
|
64
|
+
edge: '16',
|
|
65
|
+
firefox: '60',
|
|
66
|
+
chrome: '61',
|
|
67
|
+
safari: '10.1',
|
|
68
|
+
opera: '48',
|
|
69
|
+
ios: '10.3',
|
|
70
|
+
android: '76',
|
|
71
|
+
and_chr: '76',
|
|
72
|
+
and_ff: '68',
|
|
73
|
+
samsung: '8.2',
|
|
74
|
+
and_qq: '10.4',
|
|
75
|
+
op_mob: '64',
|
|
76
|
+
},
|
|
77
|
+
'dynamic-import': {
|
|
78
|
+
edge: '76',
|
|
79
|
+
firefox: '67',
|
|
80
|
+
chrome: '63',
|
|
81
|
+
safari: '11.1',
|
|
82
|
+
opera: '50',
|
|
83
|
+
ios: '11.3',
|
|
84
|
+
android: '63',
|
|
85
|
+
and_chr: '63',
|
|
86
|
+
and_ff: '67',
|
|
87
|
+
samsung: '8',
|
|
88
|
+
and_qq: '10.4',
|
|
89
|
+
op_mob: '64',
|
|
90
|
+
},
|
|
91
|
+
'worker-module': {
|
|
92
|
+
edge: '80',
|
|
93
|
+
chrome: '80',
|
|
94
|
+
opera: '67',
|
|
95
|
+
android: '81',
|
|
96
|
+
and_chr: '86',
|
|
97
|
+
},
|
|
98
|
+
'service-worker-module': {
|
|
99
|
+
// TODO: Safari 14.1??
|
|
100
|
+
},
|
|
101
|
+
'import-meta-url': {
|
|
102
|
+
edge: '79',
|
|
103
|
+
firefox: '62',
|
|
104
|
+
chrome: '64',
|
|
105
|
+
safari: '11.1',
|
|
106
|
+
opera: '51',
|
|
107
|
+
ios: '12',
|
|
108
|
+
android: '64',
|
|
109
|
+
and_chr: '64',
|
|
110
|
+
and_ff: '62',
|
|
111
|
+
samsung: '9.2',
|
|
112
|
+
and_qq: '10.4',
|
|
113
|
+
op_mob: '64',
|
|
114
|
+
},
|
|
115
|
+
'arrow-functions': {
|
|
116
|
+
chrome: '47',
|
|
117
|
+
opera: '34',
|
|
118
|
+
edge: '13',
|
|
119
|
+
firefox: '45',
|
|
120
|
+
safari: '10',
|
|
121
|
+
node: '6',
|
|
122
|
+
ios: '10',
|
|
123
|
+
samsung: '5',
|
|
124
|
+
electron: '0.36',
|
|
125
|
+
android: '50',
|
|
126
|
+
qq: '10.4',
|
|
127
|
+
baidu: '7.12',
|
|
128
|
+
kaios: '2.5',
|
|
129
|
+
and_chr: '50',
|
|
130
|
+
and_qq: '12.12',
|
|
131
|
+
op_mob: '64',
|
|
132
|
+
},
|
|
133
|
+
'global-this': {
|
|
134
|
+
chrome: '75',
|
|
135
|
+
edge: '79',
|
|
136
|
+
safari: '12.1',
|
|
137
|
+
firefox: '65',
|
|
138
|
+
opera: '58',
|
|
139
|
+
node: '12',
|
|
140
|
+
and_chr: '71',
|
|
141
|
+
ios: '12.2',
|
|
142
|
+
android: '71',
|
|
143
|
+
samsung: '10.1',
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
const internalEnvironmentToEnvironment = new WeakMap();
|
|
147
|
+
const _environmentToInternalEnvironment = new WeakMap();
|
|
148
|
+
function environmentToInternalEnvironment(environment) {
|
|
149
|
+
return (0, nullthrows_1.default)(_environmentToInternalEnvironment.get(environment));
|
|
150
|
+
}
|
|
151
|
+
class Environment {
|
|
152
|
+
constructor(env, options) {
|
|
153
|
+
// @ts-expect-error TS2564
|
|
154
|
+
_Environment_environment.set(this, void 0);
|
|
155
|
+
// @ts-expect-error TS2564
|
|
156
|
+
_Environment_options.set(this, void 0);
|
|
157
|
+
let existing = internalEnvironmentToEnvironment.get(env);
|
|
158
|
+
if (existing != null) {
|
|
159
|
+
return existing;
|
|
160
|
+
}
|
|
161
|
+
__classPrivateFieldSet(this, _Environment_environment, env, "f");
|
|
162
|
+
__classPrivateFieldSet(this, _Environment_options, options, "f");
|
|
163
|
+
_environmentToInternalEnvironment.set(this, env);
|
|
164
|
+
internalEnvironmentToEnvironment.set(env, this);
|
|
165
|
+
return this;
|
|
166
|
+
}
|
|
167
|
+
get id() {
|
|
168
|
+
return __classPrivateFieldGet(this, _Environment_environment, "f").id;
|
|
169
|
+
}
|
|
170
|
+
get context() {
|
|
171
|
+
return __classPrivateFieldGet(this, _Environment_environment, "f").context;
|
|
172
|
+
}
|
|
173
|
+
get engines() {
|
|
174
|
+
return __classPrivateFieldGet(this, _Environment_environment, "f").engines;
|
|
175
|
+
}
|
|
176
|
+
get includeNodeModules() {
|
|
177
|
+
return __classPrivateFieldGet(this, _Environment_environment, "f").includeNodeModules;
|
|
178
|
+
}
|
|
179
|
+
get outputFormat() {
|
|
180
|
+
return __classPrivateFieldGet(this, _Environment_environment, "f").outputFormat;
|
|
181
|
+
}
|
|
182
|
+
get sourceType() {
|
|
183
|
+
return __classPrivateFieldGet(this, _Environment_environment, "f").sourceType;
|
|
184
|
+
}
|
|
185
|
+
get isLibrary() {
|
|
186
|
+
return __classPrivateFieldGet(this, _Environment_environment, "f").isLibrary;
|
|
187
|
+
}
|
|
188
|
+
get shouldOptimize() {
|
|
189
|
+
return __classPrivateFieldGet(this, _Environment_environment, "f").shouldOptimize;
|
|
190
|
+
}
|
|
191
|
+
get shouldScopeHoist() {
|
|
192
|
+
return __classPrivateFieldGet(this, _Environment_environment, "f").shouldScopeHoist;
|
|
193
|
+
}
|
|
194
|
+
get sourceMap() {
|
|
195
|
+
return __classPrivateFieldGet(this, _Environment_environment, "f").sourceMap;
|
|
196
|
+
}
|
|
197
|
+
get loc() {
|
|
198
|
+
return (0, utils_1.fromInternalSourceLocation)(__classPrivateFieldGet(this, _Environment_options, "f").projectRoot, __classPrivateFieldGet(this, _Environment_environment, "f").loc);
|
|
199
|
+
}
|
|
200
|
+
get unstableSingleFileOutput() {
|
|
201
|
+
return __classPrivateFieldGet(this, _Environment_environment, "f").unstableSingleFileOutput;
|
|
202
|
+
}
|
|
203
|
+
get customEnv() {
|
|
204
|
+
return __classPrivateFieldGet(this, _Environment_environment, "f").customEnv;
|
|
205
|
+
}
|
|
206
|
+
[(_Environment_environment = new WeakMap(), _Environment_options = new WeakMap(), inspect)]() {
|
|
207
|
+
return `Env(${__classPrivateFieldGet(this, _Environment_environment, "f").context})`;
|
|
208
|
+
}
|
|
209
|
+
isBrowser() {
|
|
210
|
+
return exports.BROWSER_ENVS.has(__classPrivateFieldGet(this, _Environment_environment, "f").context);
|
|
211
|
+
}
|
|
212
|
+
isNode() {
|
|
213
|
+
return NODE_ENVS.has(__classPrivateFieldGet(this, _Environment_environment, "f").context);
|
|
214
|
+
}
|
|
215
|
+
isElectron() {
|
|
216
|
+
return ELECTRON_ENVS.has(__classPrivateFieldGet(this, _Environment_environment, "f").context);
|
|
217
|
+
}
|
|
218
|
+
isIsolated() {
|
|
219
|
+
return exports.ISOLATED_ENVS.has(__classPrivateFieldGet(this, _Environment_environment, "f").context);
|
|
220
|
+
}
|
|
221
|
+
isWorker() {
|
|
222
|
+
return WORKER_ENVS.has(__classPrivateFieldGet(this, _Environment_environment, "f").context);
|
|
223
|
+
}
|
|
224
|
+
isWorklet() {
|
|
225
|
+
return __classPrivateFieldGet(this, _Environment_environment, "f").context === 'worklet';
|
|
226
|
+
}
|
|
227
|
+
isTesseract() {
|
|
228
|
+
return __classPrivateFieldGet(this, _Environment_environment, "f").context === 'tesseract';
|
|
229
|
+
}
|
|
230
|
+
matchesEngines(minVersions, defaultValue = false) {
|
|
231
|
+
// Determine if the environment matches some minimum version requirements.
|
|
232
|
+
// For browsers, we run a browserslist query with and without the minimum
|
|
233
|
+
// required browsers and compare the lists. For node, we just check semver.
|
|
234
|
+
if (this.isBrowser() && this.engines.browsers != null) {
|
|
235
|
+
let targetBrowsers = this.engines.browsers;
|
|
236
|
+
let browsers = targetBrowsers != null && !Array.isArray(targetBrowsers)
|
|
237
|
+
? [targetBrowsers]
|
|
238
|
+
: targetBrowsers;
|
|
239
|
+
// If outputting esmodules, exclude browsers without support.
|
|
240
|
+
if (this.outputFormat === 'esmodule') {
|
|
241
|
+
browsers = [...browsers, ...getExcludedBrowsers(supportData.esmodules)];
|
|
242
|
+
}
|
|
243
|
+
let matchedBrowsers = (0, browserslist_1.default)(browsers);
|
|
244
|
+
if (matchedBrowsers.length === 0) {
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
247
|
+
let minBrowsers = getExcludedBrowsers(minVersions);
|
|
248
|
+
let withoutMinBrowsers = (0, browserslist_1.default)([...browsers, ...minBrowsers]);
|
|
249
|
+
return matchedBrowsers.length === withoutMinBrowsers.length;
|
|
250
|
+
}
|
|
251
|
+
else if (this.isNode() && this.engines.node != null) {
|
|
252
|
+
return (minVersions.node != null &&
|
|
253
|
+
!semver_1.default.intersects(`< ${minVersions.node}`, this.engines.node));
|
|
254
|
+
}
|
|
255
|
+
return defaultValue;
|
|
256
|
+
}
|
|
257
|
+
supports(feature, defaultValue) {
|
|
258
|
+
let engines = supportData[feature];
|
|
259
|
+
if (!engines) {
|
|
260
|
+
throw new Error('Unknown environment feature: ' + feature);
|
|
261
|
+
}
|
|
262
|
+
return this.matchesEngines(engines, defaultValue);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
exports.default = Environment;
|
|
266
|
+
function getExcludedBrowsers(minVersions) {
|
|
267
|
+
let browsers = [];
|
|
268
|
+
for (let browser of ALL_BROWSERS) {
|
|
269
|
+
let version = minVersions[browser];
|
|
270
|
+
if (version) {
|
|
271
|
+
browsers.push(`not ${browser} < ${version}`);
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
browsers.push(`not ${browser} > 0`);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
return browsers;
|
|
278
|
+
}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
36
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
37
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
38
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
39
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
40
|
+
};
|
|
41
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
42
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
43
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
44
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
45
|
+
};
|
|
46
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
47
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
48
|
+
};
|
|
49
|
+
var _MutableBundleGraph_graph, _MutableBundleGraph_options, _MutableBundleGraph_bundlePublicIds;
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
const assert_1 = __importDefault(require("assert"));
|
|
52
|
+
const nullthrows_1 = __importDefault(require("nullthrows"));
|
|
53
|
+
const rust_1 = require("@atlaspack/rust");
|
|
54
|
+
const BundleGraph_1 = __importDefault(require("./BundleGraph"));
|
|
55
|
+
const BundleGraph_2 = require("../BundleGraph");
|
|
56
|
+
const Bundle_1 = require("./Bundle");
|
|
57
|
+
const Asset_1 = require("./Asset");
|
|
58
|
+
const utils_1 = require("../utils");
|
|
59
|
+
const Dependency_1 = __importStar(require("./Dependency"));
|
|
60
|
+
const Environment_1 = require("./Environment");
|
|
61
|
+
const Target_1 = require("./Target");
|
|
62
|
+
const constants_1 = require("../constants");
|
|
63
|
+
const projectPath_1 = require("../projectPath");
|
|
64
|
+
const types_1 = require("../types");
|
|
65
|
+
const BundleGroup_1 = __importStar(require("./BundleGroup"));
|
|
66
|
+
const IdentifierRegistry_1 = require("../IdentifierRegistry");
|
|
67
|
+
const EnvironmentManager_1 = require("../EnvironmentManager");
|
|
68
|
+
const feature_flags_1 = require("@atlaspack/feature-flags");
|
|
69
|
+
function createBundleId(data) {
|
|
70
|
+
const { entryAssetId, uniqueKey, distDir, bundleBehavior } = data;
|
|
71
|
+
const id = (0, rust_1.hashString)(`bundle:${String(entryAssetId != null ? entryAssetId : uniqueKey)}${(0, projectPath_1.fromProjectPathRelative)(distDir)}${bundleBehavior ?? ''}`);
|
|
72
|
+
IdentifierRegistry_1.identifierRegistry.addIdentifier('bundle', id, data);
|
|
73
|
+
return id;
|
|
74
|
+
}
|
|
75
|
+
class MutableBundleGraph extends BundleGraph_1.default {
|
|
76
|
+
constructor(graph, options) {
|
|
77
|
+
super(graph, Bundle_1.Bundle.get.bind(Bundle_1.Bundle), options);
|
|
78
|
+
_MutableBundleGraph_graph.set(this, void 0);
|
|
79
|
+
_MutableBundleGraph_options.set(this, void 0);
|
|
80
|
+
_MutableBundleGraph_bundlePublicIds.set(this, new Set());
|
|
81
|
+
__classPrivateFieldSet(this, _MutableBundleGraph_graph, graph, "f");
|
|
82
|
+
__classPrivateFieldSet(this, _MutableBundleGraph_options, options, "f");
|
|
83
|
+
}
|
|
84
|
+
addAssetToBundle(asset, bundle) {
|
|
85
|
+
__classPrivateFieldGet(this, _MutableBundleGraph_graph, "f").addAssetToBundle((0, Asset_1.assetToAssetValue)(asset), (0, Bundle_1.bundleToInternalBundle)(bundle));
|
|
86
|
+
}
|
|
87
|
+
addAssetGraphToBundle(asset, bundle, shouldSkipDependency) {
|
|
88
|
+
__classPrivateFieldGet(this, _MutableBundleGraph_graph, "f").addAssetGraphToBundle((0, Asset_1.assetToAssetValue)(asset), (0, Bundle_1.bundleToInternalBundle)(bundle),
|
|
89
|
+
// @ts-expect-error TS2345
|
|
90
|
+
shouldSkipDependency
|
|
91
|
+
? (d) =>
|
|
92
|
+
// @ts-expect-error TS2345
|
|
93
|
+
shouldSkipDependency(new Dependency_1.default(d, __classPrivateFieldGet(this, _MutableBundleGraph_options, "f")))
|
|
94
|
+
: undefined);
|
|
95
|
+
}
|
|
96
|
+
addEntryToBundle(asset, bundle, shouldSkipDependency) {
|
|
97
|
+
__classPrivateFieldGet(this, _MutableBundleGraph_graph, "f").addEntryToBundle((0, Asset_1.assetToAssetValue)(asset), (0, Bundle_1.bundleToInternalBundle)(bundle),
|
|
98
|
+
// @ts-expect-error TS2345
|
|
99
|
+
shouldSkipDependency
|
|
100
|
+
? (d) =>
|
|
101
|
+
// @ts-expect-error TS2345
|
|
102
|
+
shouldSkipDependency(new Dependency_1.default(d, __classPrivateFieldGet(this, _MutableBundleGraph_options, "f")))
|
|
103
|
+
: undefined);
|
|
104
|
+
}
|
|
105
|
+
createBundleGroup(dependency, target) {
|
|
106
|
+
let dependencyNode = __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.getNodeByContentKey(dependency.id);
|
|
107
|
+
if (!dependencyNode) {
|
|
108
|
+
throw new Error('Dependency not found');
|
|
109
|
+
}
|
|
110
|
+
(0, assert_1.default)(dependencyNode.type === 'dependency');
|
|
111
|
+
let resolved = __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f").getResolvedAsset((0, Dependency_1.dependencyToInternalDependency)(dependency));
|
|
112
|
+
if (!resolved) {
|
|
113
|
+
throw new Error('Dependency did not resolve to an asset ' + dependency.id);
|
|
114
|
+
}
|
|
115
|
+
let bundleGroup = {
|
|
116
|
+
target: (0, Target_1.targetToInternalTarget)(target),
|
|
117
|
+
entryAssetId: resolved.id,
|
|
118
|
+
};
|
|
119
|
+
let bundleGroupKey = (0, utils_1.getBundleGroupId)(bundleGroup);
|
|
120
|
+
let bundleGroupNodeId = __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.hasContentKey(bundleGroupKey)
|
|
121
|
+
? __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.getNodeIdByContentKey(bundleGroupKey)
|
|
122
|
+
: __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.addNodeByContentKey(bundleGroupKey, {
|
|
123
|
+
id: bundleGroupKey,
|
|
124
|
+
type: 'bundle_group',
|
|
125
|
+
value: bundleGroup,
|
|
126
|
+
});
|
|
127
|
+
let dependencyNodeId = __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.getNodeIdByContentKey(dependencyNode.id);
|
|
128
|
+
let resolvedNodeId = __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.getNodeIdByContentKey(resolved.id);
|
|
129
|
+
let assetNodes = __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.getNodeIdsConnectedFrom(dependencyNodeId);
|
|
130
|
+
__classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.addEdge(dependencyNodeId, bundleGroupNodeId);
|
|
131
|
+
__classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.replaceNodeIdsConnectedTo(bundleGroupNodeId, assetNodes);
|
|
132
|
+
__classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.addEdge(dependencyNodeId, resolvedNodeId, BundleGraph_2.bundleGraphEdgeTypes.references);
|
|
133
|
+
if (
|
|
134
|
+
// This check is needed for multiple targets, when we go over the same nodes twice
|
|
135
|
+
__classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.hasEdge(dependencyNodeId, resolvedNodeId, BundleGraph_2.bundleGraphEdgeTypes.null)) {
|
|
136
|
+
//nullEdgeType
|
|
137
|
+
__classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.removeEdge(dependencyNodeId, resolvedNodeId);
|
|
138
|
+
}
|
|
139
|
+
if (dependency.isEntry) {
|
|
140
|
+
__classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.addEdge((0, nullthrows_1.default)(__classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.rootNodeId), bundleGroupNodeId, BundleGraph_2.bundleGraphEdgeTypes.bundle);
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
let inboundBundleNodeIds = __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.getNodeIdsConnectedTo(dependencyNodeId, BundleGraph_2.bundleGraphEdgeTypes.contains);
|
|
144
|
+
for (let inboundBundleNodeId of inboundBundleNodeIds) {
|
|
145
|
+
(0, assert_1.default)(__classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.getNode(inboundBundleNodeId)?.type === 'bundle');
|
|
146
|
+
__classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.addEdge(inboundBundleNodeId, bundleGroupNodeId, BundleGraph_2.bundleGraphEdgeTypes.bundle);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return new BundleGroup_1.default(bundleGroup, __classPrivateFieldGet(this, _MutableBundleGraph_options, "f"));
|
|
150
|
+
}
|
|
151
|
+
removeBundleGroup(bundleGroup) {
|
|
152
|
+
__classPrivateFieldGet(this, _MutableBundleGraph_graph, "f").removeBundleGroup((0, BundleGroup_1.bundleGroupToInternalBundleGroup)(bundleGroup));
|
|
153
|
+
}
|
|
154
|
+
internalizeAsyncDependency(bundle, dependency) {
|
|
155
|
+
__classPrivateFieldGet(this, _MutableBundleGraph_graph, "f").internalizeAsyncDependency((0, Bundle_1.bundleToInternalBundle)(bundle), (0, Dependency_1.dependencyToInternalDependency)(dependency));
|
|
156
|
+
}
|
|
157
|
+
createBundle(opts) {
|
|
158
|
+
// @ts-expect-error TS2339
|
|
159
|
+
let entryAsset = opts.entryAsset
|
|
160
|
+
? // @ts-expect-error TS2339
|
|
161
|
+
(0, Asset_1.assetToAssetValue)(opts.entryAsset)
|
|
162
|
+
: null;
|
|
163
|
+
let target = (0, Target_1.targetToInternalTarget)(opts.target);
|
|
164
|
+
let bundleId = createBundleId({
|
|
165
|
+
entryAssetId: entryAsset?.id ?? null,
|
|
166
|
+
// @ts-expect-error TS2339
|
|
167
|
+
uniqueKey: opts.uniqueKey ?? null,
|
|
168
|
+
distDir: target.distDir,
|
|
169
|
+
bundleBehavior: opts.bundleBehavior ?? null,
|
|
170
|
+
});
|
|
171
|
+
let existing = __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.getNodeByContentKey(bundleId);
|
|
172
|
+
if (existing != null) {
|
|
173
|
+
(0, assert_1.default)(existing.type === 'bundle');
|
|
174
|
+
return Bundle_1.Bundle.get(existing.value, __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f"), __classPrivateFieldGet(this, _MutableBundleGraph_options, "f"));
|
|
175
|
+
}
|
|
176
|
+
let publicId = (0, utils_1.getPublicId)(bundleId, (existing) => __classPrivateFieldGet(this, _MutableBundleGraph_bundlePublicIds, "f").has(existing));
|
|
177
|
+
__classPrivateFieldGet(this, _MutableBundleGraph_bundlePublicIds, "f").add(publicId);
|
|
178
|
+
let isPlaceholder = false;
|
|
179
|
+
if (entryAsset) {
|
|
180
|
+
let entryAssetNode = __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.getNodeByContentKey(entryAsset.id);
|
|
181
|
+
(0, assert_1.default)(entryAssetNode?.type === 'asset', 'Entry asset does not exist');
|
|
182
|
+
isPlaceholder = entryAssetNode.requested === false;
|
|
183
|
+
}
|
|
184
|
+
let entryAssetIds = [];
|
|
185
|
+
if (entryAsset) {
|
|
186
|
+
entryAssetIds = [entryAsset.id];
|
|
187
|
+
if ((0, feature_flags_1.getFeatureFlag)('supportWebpackChunkName')) {
|
|
188
|
+
// @ts-expect-error TS2339
|
|
189
|
+
let bundleRoots = opts.bundleRoots ?? [entryAsset];
|
|
190
|
+
let bundleRootIds = bundleRoots
|
|
191
|
+
.map(({ id }) => id)
|
|
192
|
+
.filter((assetId) => assetId !== entryAsset.id);
|
|
193
|
+
entryAssetIds.push(...bundleRootIds);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
let bundleNode = {
|
|
197
|
+
type: 'bundle',
|
|
198
|
+
id: bundleId,
|
|
199
|
+
value: {
|
|
200
|
+
id: bundleId,
|
|
201
|
+
hashReference: __classPrivateFieldGet(this, _MutableBundleGraph_options, "f").shouldContentHash
|
|
202
|
+
? constants_1.HASH_REF_PREFIX + bundleId
|
|
203
|
+
: bundleId.slice(-8),
|
|
204
|
+
// @ts-expect-error TS2339
|
|
205
|
+
type: opts.entryAsset ? opts.entryAsset.type : opts.type,
|
|
206
|
+
// @ts-expect-error TS2339
|
|
207
|
+
env: opts.env
|
|
208
|
+
? // @ts-expect-error TS2339
|
|
209
|
+
(0, EnvironmentManager_1.toEnvironmentRef)((0, Environment_1.environmentToInternalEnvironment)(opts.env))
|
|
210
|
+
: (0, nullthrows_1.default)(entryAsset).env,
|
|
211
|
+
entryAssetIds,
|
|
212
|
+
mainEntryId: entryAsset?.id,
|
|
213
|
+
// @ts-expect-error TS2339
|
|
214
|
+
pipeline: opts.entryAsset ? opts.entryAsset.pipeline : opts.pipeline,
|
|
215
|
+
needsStableName: opts.needsStableName,
|
|
216
|
+
bundleBehavior: opts.bundleBehavior != null
|
|
217
|
+
? types_1.BundleBehavior[opts.bundleBehavior]
|
|
218
|
+
: null,
|
|
219
|
+
// @ts-expect-error TS2339
|
|
220
|
+
isSplittable: opts.entryAsset
|
|
221
|
+
? // @ts-expect-error TS2339
|
|
222
|
+
opts.entryAsset.isBundleSplittable
|
|
223
|
+
: // @ts-expect-error TS2339
|
|
224
|
+
opts.isSplittable,
|
|
225
|
+
isPlaceholder,
|
|
226
|
+
target,
|
|
227
|
+
name: null,
|
|
228
|
+
displayName: null,
|
|
229
|
+
publicId,
|
|
230
|
+
manualSharedBundle: opts.manualSharedBundle,
|
|
231
|
+
},
|
|
232
|
+
};
|
|
233
|
+
let bundleNodeId = __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.addNodeByContentKey(bundleId, bundleNode);
|
|
234
|
+
for (let assetId of entryAssetIds) {
|
|
235
|
+
__classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.addEdge(bundleNodeId, __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")._graph.getNodeIdByContentKey(assetId));
|
|
236
|
+
}
|
|
237
|
+
return Bundle_1.Bundle.get(bundleNode.value, __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f"), __classPrivateFieldGet(this, _MutableBundleGraph_options, "f"));
|
|
238
|
+
}
|
|
239
|
+
addBundleToBundleGroup(bundle, bundleGroup) {
|
|
240
|
+
__classPrivateFieldGet(this, _MutableBundleGraph_graph, "f").addBundleToBundleGroup((0, Bundle_1.bundleToInternalBundle)(bundle), (0, BundleGroup_1.bundleGroupToInternalBundleGroup)(bundleGroup));
|
|
241
|
+
}
|
|
242
|
+
createAssetReference(dependency, asset, bundle) {
|
|
243
|
+
return __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f").createAssetReference((0, Dependency_1.dependencyToInternalDependency)(dependency), (0, Asset_1.assetToAssetValue)(asset), (0, Bundle_1.bundleToInternalBundle)(bundle));
|
|
244
|
+
}
|
|
245
|
+
createBundleReference(from, to) {
|
|
246
|
+
return __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f").createBundleReference((0, Bundle_1.bundleToInternalBundle)(from), (0, Bundle_1.bundleToInternalBundle)(to));
|
|
247
|
+
}
|
|
248
|
+
createBundleConditionalReference(from, to) {
|
|
249
|
+
return __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f").createBundleConditionalReference((0, Bundle_1.bundleToInternalBundle)(from), (0, Bundle_1.bundleToInternalBundle)(to));
|
|
250
|
+
}
|
|
251
|
+
getDependencyAssets(dependency) {
|
|
252
|
+
return __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")
|
|
253
|
+
.getDependencyAssets((0, Dependency_1.dependencyToInternalDependency)(dependency))
|
|
254
|
+
.map((asset) => (0, Asset_1.assetFromValue)(asset, __classPrivateFieldGet(this, _MutableBundleGraph_options, "f")));
|
|
255
|
+
}
|
|
256
|
+
getBundleGroupsContainingBundle(bundle) {
|
|
257
|
+
return __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")
|
|
258
|
+
.getBundleGroupsContainingBundle((0, Bundle_1.bundleToInternalBundle)(bundle))
|
|
259
|
+
.map((bundleGroup) => new BundleGroup_1.default(bundleGroup, __classPrivateFieldGet(this, _MutableBundleGraph_options, "f")));
|
|
260
|
+
}
|
|
261
|
+
getParentBundlesOfBundleGroup(bundleGroup) {
|
|
262
|
+
return __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f")
|
|
263
|
+
.getParentBundlesOfBundleGroup((0, BundleGroup_1.bundleGroupToInternalBundleGroup)(bundleGroup))
|
|
264
|
+
.map((bundle) => Bundle_1.Bundle.get(bundle, __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f"), __classPrivateFieldGet(this, _MutableBundleGraph_options, "f")));
|
|
265
|
+
}
|
|
266
|
+
getTotalSize(asset) {
|
|
267
|
+
return __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f").getTotalSize((0, Asset_1.assetToAssetValue)(asset));
|
|
268
|
+
}
|
|
269
|
+
isAssetReachableFromBundle(asset, bundle) {
|
|
270
|
+
return __classPrivateFieldGet(this, _MutableBundleGraph_graph, "f").isAssetReachableFromBundle((0, Asset_1.assetToAssetValue)(asset), (0, Bundle_1.bundleToInternalBundle)(bundle));
|
|
271
|
+
}
|
|
272
|
+
removeAssetGraphFromBundle(asset, bundle) {
|
|
273
|
+
__classPrivateFieldGet(this, _MutableBundleGraph_graph, "f").removeAssetGraphFromBundle((0, Asset_1.assetToAssetValue)(asset), (0, Bundle_1.bundleToInternalBundle)(bundle));
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
_MutableBundleGraph_graph = new WeakMap(), _MutableBundleGraph_options = new WeakMap(), _MutableBundleGraph_bundlePublicIds = new WeakMap();
|
|
277
|
+
exports.default = MutableBundleGraph;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
+
};
|
|
13
|
+
var _PluginOptions_options;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
let parcelOptionsToPluginOptions = new WeakMap();
|
|
16
|
+
class PluginOptions {
|
|
17
|
+
constructor(options) {
|
|
18
|
+
// @ts-expect-error TS2564
|
|
19
|
+
_PluginOptions_options.set(this, void 0);
|
|
20
|
+
let existing = parcelOptionsToPluginOptions.get(options);
|
|
21
|
+
if (existing != null) {
|
|
22
|
+
return existing;
|
|
23
|
+
}
|
|
24
|
+
__classPrivateFieldSet(this, _PluginOptions_options, options, "f");
|
|
25
|
+
parcelOptionsToPluginOptions.set(options, this);
|
|
26
|
+
return this;
|
|
27
|
+
}
|
|
28
|
+
get instanceId() {
|
|
29
|
+
return __classPrivateFieldGet(this, _PluginOptions_options, "f").instanceId;
|
|
30
|
+
}
|
|
31
|
+
get mode() {
|
|
32
|
+
return __classPrivateFieldGet(this, _PluginOptions_options, "f").mode;
|
|
33
|
+
}
|
|
34
|
+
get env() {
|
|
35
|
+
return __classPrivateFieldGet(this, _PluginOptions_options, "f").env;
|
|
36
|
+
}
|
|
37
|
+
get parcelVersion() {
|
|
38
|
+
return __classPrivateFieldGet(this, _PluginOptions_options, "f").parcelVersion;
|
|
39
|
+
}
|
|
40
|
+
get hmrOptions() {
|
|
41
|
+
return __classPrivateFieldGet(this, _PluginOptions_options, "f").hmrOptions;
|
|
42
|
+
}
|
|
43
|
+
get serveOptions() {
|
|
44
|
+
return __classPrivateFieldGet(this, _PluginOptions_options, "f").serveOptions;
|
|
45
|
+
}
|
|
46
|
+
get shouldBuildLazily() {
|
|
47
|
+
return __classPrivateFieldGet(this, _PluginOptions_options, "f").shouldBuildLazily;
|
|
48
|
+
}
|
|
49
|
+
get shouldAutoInstall() {
|
|
50
|
+
return __classPrivateFieldGet(this, _PluginOptions_options, "f").shouldAutoInstall;
|
|
51
|
+
}
|
|
52
|
+
get logLevel() {
|
|
53
|
+
return __classPrivateFieldGet(this, _PluginOptions_options, "f").logLevel;
|
|
54
|
+
}
|
|
55
|
+
get cacheDir() {
|
|
56
|
+
// TODO: remove this. Probably bad if there are other types of caches.
|
|
57
|
+
// Maybe expose the Cache object instead?
|
|
58
|
+
return __classPrivateFieldGet(this, _PluginOptions_options, "f").cacheDir;
|
|
59
|
+
}
|
|
60
|
+
get projectRoot() {
|
|
61
|
+
return __classPrivateFieldGet(this, _PluginOptions_options, "f").projectRoot;
|
|
62
|
+
}
|
|
63
|
+
get inputFS() {
|
|
64
|
+
return __classPrivateFieldGet(this, _PluginOptions_options, "f").inputFS;
|
|
65
|
+
}
|
|
66
|
+
get outputFS() {
|
|
67
|
+
return __classPrivateFieldGet(this, _PluginOptions_options, "f").outputFS;
|
|
68
|
+
}
|
|
69
|
+
get packageManager() {
|
|
70
|
+
return __classPrivateFieldGet(this, _PluginOptions_options, "f").packageManager;
|
|
71
|
+
}
|
|
72
|
+
get detailedReport() {
|
|
73
|
+
return __classPrivateFieldGet(this, _PluginOptions_options, "f").detailedReport;
|
|
74
|
+
}
|
|
75
|
+
get featureFlags() {
|
|
76
|
+
return __classPrivateFieldGet(this, _PluginOptions_options, "f").featureFlags;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
_PluginOptions_options = new WeakMap();
|
|
80
|
+
exports.default = PluginOptions;
|