@atlaspack/core 2.14.0 → 2.14.1-canary.11

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.
Files changed (89) hide show
  1. package/LICENSE +201 -0
  2. package/lib/AssetGraph.js +521 -0
  3. package/lib/Atlaspack.js +677 -0
  4. package/lib/AtlaspackConfig.js +298 -0
  5. package/lib/AtlaspackConfig.schema.js +103 -0
  6. package/lib/BundleGraph.js +1527 -0
  7. package/lib/CommittedAsset.js +155 -0
  8. package/lib/Dependency.js +136 -0
  9. package/lib/Environment.js +144 -0
  10. package/lib/IdentifierRegistry.js +36 -0
  11. package/lib/InternalConfig.js +56 -0
  12. package/lib/PackagerRunner.js +525 -0
  13. package/lib/ReporterRunner.js +151 -0
  14. package/lib/RequestTracker.js +1178 -0
  15. package/lib/SymbolPropagation.js +618 -0
  16. package/lib/TargetDescriptor.schema.js +118 -0
  17. package/lib/Transformation.js +522 -0
  18. package/lib/UncommittedAsset.js +348 -0
  19. package/lib/Validation.js +203 -0
  20. package/lib/applyRuntimes.js +355 -0
  21. package/lib/assetUtils.js +205 -0
  22. package/lib/atlaspack-v3/AtlaspackV3.js +66 -0
  23. package/lib/atlaspack-v3/NapiWorkerPool.js +71 -0
  24. package/lib/atlaspack-v3/fs.js +39 -0
  25. package/lib/atlaspack-v3/index.js +26 -0
  26. package/lib/atlaspack-v3/jsCallable.js +20 -0
  27. package/lib/atlaspack-v3/worker/compat/asset-symbols.js +197 -0
  28. package/lib/atlaspack-v3/worker/compat/bitflags.js +84 -0
  29. package/lib/atlaspack-v3/worker/compat/dependency.js +44 -0
  30. package/lib/atlaspack-v3/worker/compat/environment.js +57 -0
  31. package/lib/atlaspack-v3/worker/compat/index.js +104 -0
  32. package/lib/atlaspack-v3/worker/compat/mutable-asset.js +164 -0
  33. package/lib/atlaspack-v3/worker/compat/plugin-config.js +78 -0
  34. package/lib/atlaspack-v3/worker/compat/plugin-logger.js +29 -0
  35. package/lib/atlaspack-v3/worker/compat/plugin-options.js +113 -0
  36. package/lib/atlaspack-v3/worker/compat/plugin-tracer.js +12 -0
  37. package/lib/atlaspack-v3/worker/compat/target.js +17 -0
  38. package/lib/atlaspack-v3/worker/index.js +3 -0
  39. package/lib/atlaspack-v3/worker/worker.js +280 -0
  40. package/lib/constants.js +21 -0
  41. package/lib/dumpGraphToGraphViz.js +206 -0
  42. package/lib/index.js +70 -0
  43. package/lib/loadAtlaspackPlugin.js +110 -0
  44. package/lib/loadDotEnv.js +54 -0
  45. package/lib/projectPath.js +112 -0
  46. package/lib/public/Asset.js +259 -0
  47. package/lib/public/Bundle.js +236 -0
  48. package/lib/public/BundleGraph.js +279 -0
  49. package/lib/public/BundleGroup.js +50 -0
  50. package/lib/public/Config.js +202 -0
  51. package/lib/public/Dependency.js +131 -0
  52. package/lib/public/Environment.js +247 -0
  53. package/lib/public/MutableBundleGraph.js +204 -0
  54. package/lib/public/PluginOptions.js +71 -0
  55. package/lib/public/Symbols.js +247 -0
  56. package/lib/public/Target.js +64 -0
  57. package/lib/registerCoreWithSerializer.js +51 -0
  58. package/lib/requests/AssetGraphRequest.js +432 -0
  59. package/lib/requests/AssetGraphRequestRust.js +220 -0
  60. package/lib/requests/AssetRequest.js +132 -0
  61. package/lib/requests/AtlaspackBuildRequest.js +79 -0
  62. package/lib/requests/AtlaspackConfigRequest.js +479 -0
  63. package/lib/requests/BundleGraphRequest.js +485 -0
  64. package/lib/requests/ConfigRequest.js +203 -0
  65. package/lib/requests/DevDepRequest.js +193 -0
  66. package/lib/requests/EntryRequest.js +295 -0
  67. package/lib/requests/PackageRequest.js +88 -0
  68. package/lib/requests/PathRequest.js +357 -0
  69. package/lib/requests/TargetRequest.js +1179 -0
  70. package/lib/requests/ValidationRequest.js +66 -0
  71. package/lib/requests/WriteBundleRequest.js +252 -0
  72. package/lib/requests/WriteBundlesRequest.js +167 -0
  73. package/lib/requests/asset-graph-diff.js +128 -0
  74. package/lib/requests/asset-graph-dot.js +131 -0
  75. package/lib/resolveOptions.js +265 -0
  76. package/lib/serializerCore.browser.js +29 -0
  77. package/lib/summarizeRequest.js +55 -0
  78. package/lib/types.js +35 -0
  79. package/lib/utils.js +160 -0
  80. package/lib/worker.js +184 -0
  81. package/package.json +20 -19
  82. package/src/loadAtlaspackPlugin.js +5 -65
  83. package/test/AtlaspackConfig.test.js +0 -165
  84. package/test/fixtures/plugins/node_modules/atlaspack-transformer-bad-engines/index.js +0 -7
  85. package/test/fixtures/plugins/node_modules/atlaspack-transformer-bad-engines/package.json +0 -7
  86. package/test/fixtures/plugins/node_modules/atlaspack-transformer-bad-parcel-engines/index.js +0 -7
  87. package/test/fixtures/plugins/node_modules/atlaspack-transformer-bad-parcel-engines/package.json +0 -7
  88. package/test/fixtures/plugins/node_modules/atlaspack-transformer-no-engines/index.js +0 -7
  89. package/test/fixtures/plugins/node_modules/atlaspack-transformer-no-engines/package.json +0 -4
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ function _stream() {
8
+ const data = require("stream");
9
+ _stream = function () {
10
+ return data;
11
+ };
12
+ return data;
13
+ }
14
+ function _buildCache() {
15
+ const data = require("@atlaspack/build-cache");
16
+ _buildCache = function () {
17
+ return data;
18
+ };
19
+ return data;
20
+ }
21
+ function _utils() {
22
+ const data = require("@atlaspack/utils");
23
+ _utils = function () {
24
+ return data;
25
+ };
26
+ return data;
27
+ }
28
+ function _sourceMap() {
29
+ const data = _interopRequireDefault(require("@parcel/source-map"));
30
+ _sourceMap = function () {
31
+ return data;
32
+ };
33
+ return data;
34
+ }
35
+ var _assetUtils = require("./assetUtils");
36
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
37
+ class CommittedAsset {
38
+ constructor(value, options) {
39
+ this.value = value;
40
+ this.key = this.value.contentKey;
41
+ this.options = options;
42
+ }
43
+ getContent() {
44
+ if (this.content == null) {
45
+ if (this.key != null) {
46
+ if (this.value.isLargeBlob) {
47
+ return this.options.cache.getStream(this.key);
48
+ } else {
49
+ return this.options.cache.getBlob(this.key);
50
+ }
51
+ } else if (this.value.astKey != null) {
52
+ return (0, _utils().streamFromPromise)((0, _assetUtils.generateFromAST)(this).then(({
53
+ content
54
+ }) => {
55
+ if (!(content instanceof _stream().Readable)) {
56
+ this.content = Promise.resolve(content);
57
+ }
58
+ return content;
59
+ }));
60
+ } else {
61
+ throw new Error('Asset has no content');
62
+ }
63
+ }
64
+ return this.content;
65
+ }
66
+ async getCode() {
67
+ let content;
68
+ if (this.content == null && this.key != null) {
69
+ this.content = this.options.cache.getBlob(this.key);
70
+ content = await this.content;
71
+ } else {
72
+ content = await this.getContent();
73
+ }
74
+ if (typeof content === 'string' || content instanceof Buffer) {
75
+ return content.toString();
76
+ } else if (content != null) {
77
+ this.content = (0, _utils().bufferStream)(content);
78
+ return (await this.content).toString();
79
+ }
80
+ return '';
81
+ }
82
+ async getBuffer() {
83
+ let content = await this.getContent();
84
+ if (content == null) {
85
+ return Buffer.alloc(0);
86
+ } else if (typeof content === 'string' || content instanceof Buffer) {
87
+ return Buffer.from(content);
88
+ }
89
+ this.content = (0, _utils().bufferStream)(content);
90
+ return this.content;
91
+ }
92
+ getStream() {
93
+ let content = this.getContent();
94
+ return content instanceof Promise ? (0, _utils().streamFromPromise)(content) : (0, _utils().blobToStream)(content);
95
+ }
96
+ getMapBuffer() {
97
+ let mapKey = this.value.mapKey;
98
+ if (mapKey != null && this.mapBuffer == null) {
99
+ this.mapBuffer = (async () => {
100
+ try {
101
+ // Handle v3 assets that were processed by the native asset graph code (i.e. not runtime
102
+ // or helper assets)
103
+ if (this.options.featureFlags.atlaspackV3 && this.value.meta.isV3 === true) {
104
+ let buffer = await this.options.cache.getBuffer(mapKey);
105
+ if (!buffer) {
106
+ return buffer;
107
+ }
108
+
109
+ // We make the conversion from json to buffer here, since both js packagers lazily
110
+ // instantiate a sourcemap from the map buffer. This ensures we do not have to modify
111
+ // the packagers in any significant way. Additionally, storing the SourceMap objects
112
+ // upfront in these packagers appears to make larger builds more prone to failing.
113
+ let sourceMap = new (_sourceMap().default)(this.options.projectRoot);
114
+ sourceMap.addVLQMap(JSON.parse(buffer.toString()));
115
+ return sourceMap.toBuffer();
116
+ }
117
+ return await this.options.cache.getBlob(mapKey);
118
+ } catch (err) {
119
+ if (err.code === 'ENOENT' && this.value.astKey != null) {
120
+ var _await$generateFromAS;
121
+ return (_await$generateFromAS = (await (0, _assetUtils.generateFromAST)(this)).map) === null || _await$generateFromAS === void 0 ? void 0 : _await$generateFromAS.toBuffer();
122
+ } else {
123
+ throw err;
124
+ }
125
+ }
126
+ })();
127
+ }
128
+ return this.mapBuffer ?? Promise.resolve();
129
+ }
130
+ getMap() {
131
+ if (this.map == null) {
132
+ this.map = (async () => {
133
+ let mapBuffer = await this.getMapBuffer();
134
+ if (mapBuffer) {
135
+ // Get sourcemap from flatbuffer
136
+ return new (_sourceMap().default)(this.options.projectRoot, mapBuffer);
137
+ }
138
+ })();
139
+ }
140
+ return this.map;
141
+ }
142
+ getAST() {
143
+ if (this.value.astKey == null) {
144
+ return Promise.resolve(null);
145
+ }
146
+ if (this.ast == null) {
147
+ this.ast = this.options.cache.getBlob(this.value.astKey).then(serializedAst => (0, _buildCache().deserializeRaw)(serializedAst));
148
+ }
149
+ return this.ast;
150
+ }
151
+ getDependencies() {
152
+ return Array.from(this.value.dependencies.values());
153
+ }
154
+ }
155
+ exports.default = CommittedAsset;
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createDependency = createDependency;
7
+ exports.createDependencyId = createDependencyId;
8
+ exports.mergeDependencies = mergeDependencies;
9
+ function _rust() {
10
+ const data = require("@atlaspack/rust");
11
+ _rust = function () {
12
+ return data;
13
+ };
14
+ return data;
15
+ }
16
+ var _types = require("./types");
17
+ var _utils = require("./utils");
18
+ var _projectPath = require("./projectPath");
19
+ function _assert() {
20
+ const data = _interopRequireDefault(require("assert"));
21
+ _assert = function () {
22
+ return data;
23
+ };
24
+ return data;
25
+ }
26
+ var _IdentifierRegistry = require("./IdentifierRegistry");
27
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
28
+ function createDependencyId({
29
+ sourceAssetId,
30
+ specifier,
31
+ env,
32
+ target,
33
+ pipeline,
34
+ specifierType,
35
+ bundleBehavior,
36
+ priority,
37
+ packageConditions
38
+ }) {
39
+ (0, _assert().default)(typeof specifierType === 'string');
40
+ (0, _assert().default)(typeof priority === 'string' || priority == null);
41
+ const params = {
42
+ sourceAssetId,
43
+ specifier,
44
+ environmentId: env.id,
45
+ target,
46
+ pipeline,
47
+ specifierType: _types.SpecifierType[specifierType],
48
+ bundleBehavior,
49
+ priority: priority ? _types.Priority[priority] : _types.Priority.sync,
50
+ packageConditions
51
+ };
52
+ const id = (0, _rust().createDependencyId)(params);
53
+ _IdentifierRegistry.identifierRegistry.addIdentifier('dependency', id, params);
54
+ return id;
55
+ }
56
+ function createDependency(projectRoot, opts) {
57
+ let id = opts.id || createDependencyId({
58
+ bundleBehavior: opts.bundleBehavior,
59
+ env: opts.env,
60
+ packageConditions: opts.packageConditions,
61
+ pipeline: opts.pipeline,
62
+ priority: opts.priority,
63
+ sourceAssetId: opts.sourceAssetId,
64
+ specifier: opts.specifier,
65
+ specifierType: opts.specifierType,
66
+ target: opts.target
67
+ });
68
+ let dep = {
69
+ id,
70
+ specifier: opts.specifier,
71
+ specifierType: _types.SpecifierType[opts.specifierType],
72
+ priority: _types.Priority[opts.priority ?? 'sync'],
73
+ needsStableName: opts.needsStableName ?? false,
74
+ bundleBehavior: opts.bundleBehavior ? _types.BundleBehavior[opts.bundleBehavior] : null,
75
+ isEntry: opts.isEntry ?? false,
76
+ isOptional: opts.isOptional ?? false,
77
+ loc: (0, _utils.toInternalSourceLocation)(projectRoot, opts.loc),
78
+ env: opts.env,
79
+ meta: opts.meta || {},
80
+ target: opts.target,
81
+ sourceAssetId: opts.sourceAssetId,
82
+ sourcePath: (0, _projectPath.toProjectPath)(projectRoot, opts.sourcePath),
83
+ resolveFrom: (0, _projectPath.toProjectPath)(projectRoot, opts.resolveFrom),
84
+ range: opts.range,
85
+ symbols: opts.symbols && new Map([...opts.symbols].map(([k, v]) => [k, {
86
+ local: v.local,
87
+ meta: v.meta,
88
+ isWeak: v.isWeak,
89
+ loc: (0, _utils.toInternalSourceLocation)(projectRoot, v.loc)
90
+ }])),
91
+ pipeline: opts.pipeline
92
+ };
93
+ if (opts.packageConditions) {
94
+ convertConditions(opts.packageConditions, dep);
95
+ }
96
+ return dep;
97
+ }
98
+ function mergeDependencies(a, b) {
99
+ let {
100
+ meta,
101
+ symbols,
102
+ needsStableName,
103
+ isEntry,
104
+ isOptional,
105
+ ...other
106
+ } = b;
107
+ Object.assign(a, other);
108
+ Object.assign(a.meta, meta);
109
+ if (a.symbols && symbols) {
110
+ for (let [k, v] of symbols) {
111
+ a.symbols.set(k, v);
112
+ }
113
+ }
114
+ if (needsStableName) a.needsStableName = true;
115
+ if (isEntry) a.isEntry = true;
116
+ if (!isOptional) a.isOptional = false;
117
+ }
118
+ function convertConditions(conditions, dep) {
119
+ // Store common package conditions as bit flags to reduce size.
120
+ // Custom conditions are stored as strings.
121
+ let packageConditions = 0;
122
+ let customConditions = [];
123
+ for (let condition of conditions) {
124
+ if (_types.ExportsCondition[condition]) {
125
+ packageConditions |= _types.ExportsCondition[condition];
126
+ } else {
127
+ customConditions.push(condition);
128
+ }
129
+ }
130
+ if (packageConditions) {
131
+ dep.packageConditions = packageConditions;
132
+ }
133
+ if (customConditions.length) {
134
+ dep.customPackageConditions = customConditions;
135
+ }
136
+ }
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createEnvironment = createEnvironment;
7
+ exports.mergeEnvironments = mergeEnvironments;
8
+ function _rust() {
9
+ const data = require("@atlaspack/rust");
10
+ _rust = function () {
11
+ return data;
12
+ };
13
+ return data;
14
+ }
15
+ var _utils = require("./utils");
16
+ var _Environment = _interopRequireWildcard(require("./public/Environment"));
17
+ var _IdentifierRegistry = require("./IdentifierRegistry");
18
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
19
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
20
+ const DEFAULT_ENGINES = {
21
+ browsers: ['> 0.25%'],
22
+ node: '>= 8.0.0'
23
+ };
24
+ function createEnvironment({
25
+ context,
26
+ engines,
27
+ includeNodeModules,
28
+ outputFormat,
29
+ sourceType = 'module',
30
+ shouldOptimize = false,
31
+ isLibrary = false,
32
+ shouldScopeHoist = false,
33
+ sourceMap,
34
+ unstableSingleFileOutput = false,
35
+ loc
36
+ } = {
37
+ /*::...null*/
38
+ }) {
39
+ if (context == null) {
40
+ var _engines, _engines2;
41
+ if ((_engines = engines) !== null && _engines !== void 0 && _engines.node) {
42
+ context = 'node';
43
+ } else if ((_engines2 = engines) !== null && _engines2 !== void 0 && _engines2.browsers) {
44
+ context = 'browser';
45
+ } else {
46
+ context = 'browser';
47
+ }
48
+ }
49
+ if (engines == null) {
50
+ switch (context) {
51
+ case 'node':
52
+ case 'electron-main':
53
+ engines = {
54
+ node: DEFAULT_ENGINES.node
55
+ };
56
+ break;
57
+ case 'browser':
58
+ case 'web-worker':
59
+ case 'service-worker':
60
+ case 'electron-renderer':
61
+ engines = {
62
+ browsers: DEFAULT_ENGINES.browsers
63
+ };
64
+ break;
65
+ default:
66
+ engines = {};
67
+ }
68
+ }
69
+ if (includeNodeModules == null) {
70
+ switch (context) {
71
+ case 'node':
72
+ case 'electron-main':
73
+ case 'electron-renderer':
74
+ includeNodeModules = false;
75
+ break;
76
+ case 'browser':
77
+ case 'web-worker':
78
+ case 'service-worker':
79
+ default:
80
+ includeNodeModules = true;
81
+ break;
82
+ }
83
+ }
84
+ if (outputFormat == null) {
85
+ switch (context) {
86
+ case 'node':
87
+ case 'electron-main':
88
+ case 'electron-renderer':
89
+ outputFormat = 'commonjs';
90
+ break;
91
+ default:
92
+ outputFormat = 'global';
93
+ break;
94
+ }
95
+ }
96
+ let res = {
97
+ id: '',
98
+ context,
99
+ engines,
100
+ includeNodeModules,
101
+ outputFormat,
102
+ sourceType,
103
+ isLibrary,
104
+ shouldOptimize,
105
+ shouldScopeHoist,
106
+ sourceMap,
107
+ unstableSingleFileOutput,
108
+ loc
109
+ };
110
+ res.id = getEnvironmentHash(res);
111
+ return Object.freeze(res);
112
+ }
113
+ function mergeEnvironments(projectRoot, a, b) {
114
+ // If merging the same object, avoid copying.
115
+ if (a === b || !b) {
116
+ return a;
117
+ }
118
+ if (b instanceof _Environment.default) {
119
+ return (0, _Environment.environmentToInternalEnvironment)(b);
120
+ }
121
+
122
+ // $FlowFixMe - ignore the `id` that is already on a
123
+ return createEnvironment({
124
+ ...a,
125
+ ...b,
126
+ loc: b.loc ? (0, _utils.toInternalSourceLocation)(projectRoot, b.loc) : a.loc
127
+ });
128
+ }
129
+ function getEnvironmentHash(env) {
130
+ const data = {
131
+ context: env.context,
132
+ engines: env.engines,
133
+ includeNodeModules: env.includeNodeModules,
134
+ outputFormat: env.outputFormat,
135
+ sourceType: env.sourceType,
136
+ isLibrary: env.isLibrary,
137
+ shouldOptimize: env.shouldOptimize,
138
+ shouldScopeHoist: env.shouldScopeHoist,
139
+ sourceMap: env.sourceMap
140
+ };
141
+ const id = (0, _rust().createEnvironmentId)(data);
142
+ _IdentifierRegistry.identifierRegistry.addIdentifier('environment', id, data);
143
+ return id;
144
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.identifierRegistry = exports.IdentifierRegistry = void 0;
7
+ function _fs() {
8
+ const data = _interopRequireDefault(require("fs"));
9
+ _fs = function () {
10
+ return data;
11
+ };
12
+ return data;
13
+ }
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+ class IdentifierRegistry {
16
+ #enabled;
17
+ #createdDirectory = false;
18
+ constructor(enabled) {
19
+ this.#enabled = enabled;
20
+ }
21
+ addIdentifier(type, identifier, data) {
22
+ if (this.#enabled) {
23
+ if (!this.#createdDirectory) {
24
+ _fs().default.mkdirSync('./.atlaspack', {
25
+ recursive: true
26
+ });
27
+ this.#createdDirectory = true;
28
+ }
29
+ _fs().default.appendFile('./.atlaspack/atlaspack-identifiers.txt',
30
+ // $FlowFixMe
31
+ `${type} ${identifier} ${JSON.stringify(data)}\n`, () => {});
32
+ }
33
+ }
34
+ }
35
+ exports.IdentifierRegistry = IdentifierRegistry;
36
+ const identifierRegistry = exports.identifierRegistry = new IdentifierRegistry(process.env.ATLASPACK_IDENTIFIER_DEBUG === 'true');
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createConfig = createConfig;
7
+ var _projectPath = require("./projectPath");
8
+ var _Environment = require("./Environment");
9
+ function _rust() {
10
+ const data = require("@atlaspack/rust");
11
+ _rust = function () {
12
+ return data;
13
+ };
14
+ return data;
15
+ }
16
+ var _IdentifierRegistry = require("./IdentifierRegistry");
17
+ function createConfig({
18
+ plugin,
19
+ isSource,
20
+ searchPath,
21
+ env,
22
+ result,
23
+ invalidateOnFileChange,
24
+ invalidateOnConfigKeyChange,
25
+ invalidateOnFileCreate,
26
+ invalidateOnEnvChange,
27
+ invalidateOnOptionChange,
28
+ devDeps,
29
+ invalidateOnStartup,
30
+ invalidateOnBuild
31
+ }) {
32
+ let environment = env ?? (0, _Environment.createEnvironment)();
33
+ const configId = (0, _rust().hashString)(plugin + (0, _projectPath.fromProjectPathRelative)(searchPath) + environment.id + String(isSource));
34
+ _IdentifierRegistry.identifierRegistry.addIdentifier('config_request', configId, {
35
+ plugin,
36
+ searchPath,
37
+ environmentId: environment.id,
38
+ isSource
39
+ });
40
+ return {
41
+ id: configId,
42
+ isSource: isSource ?? false,
43
+ searchPath,
44
+ env: environment,
45
+ result: result ?? null,
46
+ cacheKey: null,
47
+ invalidateOnFileChange: invalidateOnFileChange ?? new Set(),
48
+ invalidateOnConfigKeyChange: invalidateOnConfigKeyChange ?? [],
49
+ invalidateOnFileCreate: invalidateOnFileCreate ?? [],
50
+ invalidateOnEnvChange: invalidateOnEnvChange ?? new Set(),
51
+ invalidateOnOptionChange: invalidateOnOptionChange ?? new Set(),
52
+ devDeps: devDeps ?? [],
53
+ invalidateOnStartup: invalidateOnStartup ?? false,
54
+ invalidateOnBuild: invalidateOnBuild ?? false
55
+ };
56
+ }