@atlaspack/core 2.12.1-dev.3443 → 2.12.1-dev.3450
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.
|
@@ -18,6 +18,20 @@ function napi() {
|
|
|
18
18
|
};
|
|
19
19
|
return data;
|
|
20
20
|
}
|
|
21
|
+
function _fs() {
|
|
22
|
+
const data = require("@atlaspack/fs");
|
|
23
|
+
_fs = function () {
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
return data;
|
|
27
|
+
}
|
|
28
|
+
function _packageManager() {
|
|
29
|
+
const data = require("@atlaspack/package-manager");
|
|
30
|
+
_packageManager = function () {
|
|
31
|
+
return data;
|
|
32
|
+
};
|
|
33
|
+
return data;
|
|
34
|
+
}
|
|
21
35
|
function _worker_threads() {
|
|
22
36
|
const data = require("worker_threads");
|
|
23
37
|
_worker_threads = function () {
|
|
@@ -34,14 +48,17 @@ function _module() {
|
|
|
34
48
|
}
|
|
35
49
|
var _compat = require("./compat");
|
|
36
50
|
var _jsCallable = require("../jsCallable");
|
|
51
|
+
var _Environment = _interopRequireDefault(require("../../public/Environment"));
|
|
37
52
|
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); }
|
|
38
53
|
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; }
|
|
39
54
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
40
55
|
const CONFIG = Symbol.for('parcel-plugin-config');
|
|
41
56
|
class AtlaspackWorker {
|
|
42
57
|
#resolvers;
|
|
58
|
+
#fs;
|
|
43
59
|
constructor() {
|
|
44
60
|
this.#resolvers = new Map();
|
|
61
|
+
this.#fs = new (_fs().NodeFS)();
|
|
45
62
|
}
|
|
46
63
|
loadPlugin = (0, _jsCallable.jsCallable)(async ({
|
|
47
64
|
kind,
|
|
@@ -55,44 +72,118 @@ class AtlaspackWorker {
|
|
|
55
72
|
let instance = undefined;
|
|
56
73
|
if (resolvedModule.default && resolvedModule.default[CONFIG]) {
|
|
57
74
|
instance = resolvedModule.default[CONFIG];
|
|
58
|
-
} else if (resolvedModule.default && resolvedModule.default.default[CONFIG]) {
|
|
75
|
+
} else if (resolvedModule.default && resolvedModule.default.default && resolvedModule.default.default[CONFIG]) {
|
|
59
76
|
instance = resolvedModule.default.default[CONFIG];
|
|
60
77
|
} else {
|
|
61
78
|
throw new Error(`Plugin could not be resolved\n\t${kind}\n\t${resolveFrom}\n\t${specifier}`);
|
|
62
79
|
}
|
|
63
80
|
switch (kind) {
|
|
64
81
|
case 'resolver':
|
|
65
|
-
this.#resolvers.set(specifier,
|
|
82
|
+
this.#resolvers.set(specifier, {
|
|
83
|
+
resolver: instance
|
|
84
|
+
});
|
|
66
85
|
break;
|
|
67
86
|
}
|
|
68
87
|
});
|
|
69
88
|
runResolverResolve = (0, _jsCallable.jsCallable)(async ({
|
|
70
89
|
key,
|
|
71
90
|
dependency,
|
|
72
|
-
specifier
|
|
91
|
+
specifier,
|
|
92
|
+
pipeline,
|
|
93
|
+
projectRoot
|
|
73
94
|
}) => {
|
|
74
|
-
const
|
|
75
|
-
if (!
|
|
95
|
+
const state = this.#resolvers.get(key);
|
|
96
|
+
if (!state) {
|
|
76
97
|
throw new Error(`Resolver not found: ${key}`);
|
|
77
98
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
99
|
+
let packageManager = state.packageManager;
|
|
100
|
+
if (!packageManager) {
|
|
101
|
+
packageManager = new (_packageManager().NodePackageManager)(this.#fs, projectRoot);
|
|
102
|
+
state.packageManager = packageManager;
|
|
103
|
+
}
|
|
104
|
+
const defaultOptions = {
|
|
84
105
|
get logger() {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
get tracer() {
|
|
88
|
-
throw new Error('TODO: Resolver.resolve.tracer');
|
|
106
|
+
// $FlowFixMe
|
|
107
|
+
return globalThis.console;
|
|
89
108
|
},
|
|
90
|
-
|
|
91
|
-
|
|
109
|
+
tracer: {
|
|
110
|
+
enabled: false,
|
|
111
|
+
createMeasurement: () => null
|
|
92
112
|
},
|
|
93
|
-
|
|
94
|
-
|
|
113
|
+
options: {
|
|
114
|
+
get mode() {
|
|
115
|
+
throw new Error('Resolver.resolve.options.mode');
|
|
116
|
+
},
|
|
117
|
+
parcelVersion: 'TODO',
|
|
118
|
+
packageManager,
|
|
119
|
+
env: process.env,
|
|
120
|
+
get hmrOptions() {
|
|
121
|
+
throw new Error('Resolver.resolve.options.hmrOptions');
|
|
122
|
+
},
|
|
123
|
+
get serveOptions() {
|
|
124
|
+
throw new Error('Resolver.resolve.options.serveOptions');
|
|
125
|
+
},
|
|
126
|
+
get shouldBuildLazily() {
|
|
127
|
+
throw new Error('Resolver.resolve.options.shouldBuildLazily');
|
|
128
|
+
},
|
|
129
|
+
shouldAutoInstall: false,
|
|
130
|
+
get logLevel() {
|
|
131
|
+
throw new Error('Resolver.resolve.options.logLevel');
|
|
132
|
+
},
|
|
133
|
+
projectRoot,
|
|
134
|
+
get cacheDir() {
|
|
135
|
+
throw new Error('Resolver.resolve.options.cacheDir');
|
|
136
|
+
},
|
|
137
|
+
inputFS: this.#fs,
|
|
138
|
+
outputFS: this.#fs,
|
|
139
|
+
get instanceId() {
|
|
140
|
+
throw new Error('Resolver.resolve.options.instanceId');
|
|
141
|
+
},
|
|
142
|
+
get detailedReport() {
|
|
143
|
+
throw new Error('Resolver.resolve.options.detailedReport');
|
|
144
|
+
},
|
|
145
|
+
get featureFlags() {
|
|
146
|
+
throw new Error('Resolver.resolve.options.featureFlags');
|
|
147
|
+
}
|
|
95
148
|
}
|
|
149
|
+
};
|
|
150
|
+
if (!('config' in state)) {
|
|
151
|
+
var _state$resolver$loadC, _state$resolver;
|
|
152
|
+
state.config = await ((_state$resolver$loadC = (_state$resolver = state.resolver).loadConfig) === null || _state$resolver$loadC === void 0 ? void 0 : _state$resolver$loadC.call(_state$resolver, {
|
|
153
|
+
config: {
|
|
154
|
+
isSource: true,
|
|
155
|
+
searchPath: '',
|
|
156
|
+
// $FlowFixMe This isn't correct to flow but is enough to satisfy the runtime checks
|
|
157
|
+
env: new _Environment.default(dependency.env, {
|
|
158
|
+
projectRoot,
|
|
159
|
+
hmrOptions: undefined
|
|
160
|
+
}),
|
|
161
|
+
invalidateOnFileChange() {},
|
|
162
|
+
invalidateOnFileCreate() {},
|
|
163
|
+
invalidateOnEnvChange() {},
|
|
164
|
+
invalidateOnStartup() {},
|
|
165
|
+
invalidateOnBuild() {},
|
|
166
|
+
addDevDependency() {},
|
|
167
|
+
setCacheKey() {},
|
|
168
|
+
getConfig() {
|
|
169
|
+
throw new Error('Resolver.loadConfig.config.getConfig');
|
|
170
|
+
},
|
|
171
|
+
getConfigFrom() {
|
|
172
|
+
throw new Error('Resolver.loadConfig.config.getConfigFrom');
|
|
173
|
+
},
|
|
174
|
+
getPackage() {
|
|
175
|
+
throw new Error('Resolver.loadConfig.config.getPackage');
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
...defaultOptions
|
|
179
|
+
}));
|
|
180
|
+
}
|
|
181
|
+
const result = await state.resolver.resolve({
|
|
182
|
+
specifier,
|
|
183
|
+
dependency,
|
|
184
|
+
pipeline,
|
|
185
|
+
config: state.config,
|
|
186
|
+
...defaultOptions
|
|
96
187
|
});
|
|
97
188
|
if (!result) {
|
|
98
189
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/core",
|
|
3
|
-
"version": "2.12.1-dev.
|
|
3
|
+
"version": "2.12.1-dev.3450+58845ef87",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -20,20 +20,20 @@
|
|
|
20
20
|
"check-ts": "tsc --noEmit index.d.ts"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@atlaspack/cache": "2.12.1-dev.
|
|
24
|
-
"@atlaspack/diagnostic": "2.12.1-dev.
|
|
25
|
-
"@atlaspack/events": "2.12.1-dev.
|
|
26
|
-
"@atlaspack/feature-flags": "2.12.1-dev.
|
|
27
|
-
"@atlaspack/fs": "2.12.1-dev.
|
|
28
|
-
"@atlaspack/graph": "3.2.1-dev.
|
|
29
|
-
"@atlaspack/logger": "2.12.1-dev.
|
|
30
|
-
"@atlaspack/package-manager": "2.12.1-dev.
|
|
31
|
-
"@atlaspack/plugin": "2.12.1-dev.
|
|
32
|
-
"@atlaspack/profiler": "2.12.1-dev.
|
|
33
|
-
"@atlaspack/rust": "2.12.1-dev.
|
|
34
|
-
"@atlaspack/types": "2.12.1-dev.
|
|
35
|
-
"@atlaspack/utils": "2.12.1-dev.
|
|
36
|
-
"@atlaspack/workers": "2.12.1-dev.
|
|
23
|
+
"@atlaspack/cache": "2.12.1-dev.3450+58845ef87",
|
|
24
|
+
"@atlaspack/diagnostic": "2.12.1-dev.3450+58845ef87",
|
|
25
|
+
"@atlaspack/events": "2.12.1-dev.3450+58845ef87",
|
|
26
|
+
"@atlaspack/feature-flags": "2.12.1-dev.3450+58845ef87",
|
|
27
|
+
"@atlaspack/fs": "2.12.1-dev.3450+58845ef87",
|
|
28
|
+
"@atlaspack/graph": "3.2.1-dev.3450+58845ef87",
|
|
29
|
+
"@atlaspack/logger": "2.12.1-dev.3450+58845ef87",
|
|
30
|
+
"@atlaspack/package-manager": "2.12.1-dev.3450+58845ef87",
|
|
31
|
+
"@atlaspack/plugin": "2.12.1-dev.3450+58845ef87",
|
|
32
|
+
"@atlaspack/profiler": "2.12.1-dev.3450+58845ef87",
|
|
33
|
+
"@atlaspack/rust": "2.12.1-dev.3450+58845ef87",
|
|
34
|
+
"@atlaspack/types": "2.12.1-dev.3450+58845ef87",
|
|
35
|
+
"@atlaspack/utils": "2.12.1-dev.3450+58845ef87",
|
|
36
|
+
"@atlaspack/workers": "2.12.1-dev.3450+58845ef87",
|
|
37
37
|
"@mischnic/json-sourcemap": "^0.1.0",
|
|
38
38
|
"@parcel/source-map": "^2.1.1",
|
|
39
39
|
"base-x": "^3.0.8",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"browser": {
|
|
58
58
|
"./src/serializerCore.js": "./src/serializerCore.browser.js"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "58845ef87446fcedb7d7d8876440c64184645cbb"
|
|
61
61
|
}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
import assert from 'assert';
|
|
3
3
|
import * as napi from '@atlaspack/rust';
|
|
4
|
+
import {NodeFS} from '@atlaspack/fs';
|
|
5
|
+
import {NodePackageManager} from '@atlaspack/package-manager';
|
|
4
6
|
import type {
|
|
5
7
|
Resolver,
|
|
6
8
|
Transformer,
|
|
7
9
|
PluginOptions,
|
|
8
10
|
Dependency,
|
|
9
11
|
FilePath,
|
|
12
|
+
FileSystem,
|
|
13
|
+
ConfigResultWithFilePath,
|
|
14
|
+
PackageJSON,
|
|
10
15
|
} from '@atlaspack/types';
|
|
11
16
|
import {workerData} from 'worker_threads';
|
|
12
17
|
import * as module from 'module';
|
|
@@ -15,14 +20,17 @@ import {AssetCompat} from './compat';
|
|
|
15
20
|
import type {InnerAsset} from './compat';
|
|
16
21
|
import {jsCallable} from '../jsCallable';
|
|
17
22
|
import type {JsCallable} from '../jsCallable';
|
|
23
|
+
import Environment from '../../public/Environment';
|
|
18
24
|
|
|
19
25
|
const CONFIG = Symbol.for('parcel-plugin-config');
|
|
20
26
|
|
|
21
27
|
export class AtlaspackWorker {
|
|
22
|
-
#resolvers: Map<string,
|
|
28
|
+
#resolvers: Map<string, ResolverState<any>>;
|
|
29
|
+
#fs: FileSystem;
|
|
23
30
|
|
|
24
31
|
constructor() {
|
|
25
32
|
this.#resolvers = new Map();
|
|
33
|
+
this.#fs = new NodeFS();
|
|
26
34
|
}
|
|
27
35
|
|
|
28
36
|
loadPlugin: JsCallable<[LoadPluginOptions], Promise<void>> = jsCallable(
|
|
@@ -37,6 +45,7 @@ export class AtlaspackWorker {
|
|
|
37
45
|
instance = resolvedModule.default[CONFIG];
|
|
38
46
|
} else if (
|
|
39
47
|
resolvedModule.default &&
|
|
48
|
+
resolvedModule.default.default &&
|
|
40
49
|
resolvedModule.default.default[CONFIG]
|
|
41
50
|
) {
|
|
42
51
|
instance = resolvedModule.default.default[CONFIG];
|
|
@@ -48,7 +57,7 @@ export class AtlaspackWorker {
|
|
|
48
57
|
|
|
49
58
|
switch (kind) {
|
|
50
59
|
case 'resolver':
|
|
51
|
-
this.#resolvers.set(specifier, instance);
|
|
60
|
+
this.#resolvers.set(specifier, {resolver: instance});
|
|
52
61
|
break;
|
|
53
62
|
}
|
|
54
63
|
},
|
|
@@ -57,54 +66,128 @@ export class AtlaspackWorker {
|
|
|
57
66
|
runResolverResolve: JsCallable<
|
|
58
67
|
[RunResolverResolveOptions],
|
|
59
68
|
Promise<RunResolverResolveResult>,
|
|
60
|
-
> = jsCallable(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
69
|
+
> = jsCallable(
|
|
70
|
+
async ({key, dependency, specifier, pipeline, projectRoot}) => {
|
|
71
|
+
const state = this.#resolvers.get(key);
|
|
72
|
+
if (!state) {
|
|
73
|
+
throw new Error(`Resolver not found: ${key}`);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
let packageManager = state.packageManager;
|
|
77
|
+
if (!packageManager) {
|
|
78
|
+
packageManager = new NodePackageManager(this.#fs, projectRoot);
|
|
79
|
+
state.packageManager = packageManager;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const defaultOptions = {
|
|
83
|
+
get logger() {
|
|
84
|
+
// $FlowFixMe
|
|
85
|
+
return globalThis.console;
|
|
86
|
+
},
|
|
87
|
+
tracer: {
|
|
88
|
+
enabled: false,
|
|
89
|
+
createMeasurement: () => null,
|
|
90
|
+
},
|
|
91
|
+
options: {
|
|
92
|
+
get mode() {
|
|
93
|
+
throw new Error('Resolver.resolve.options.mode');
|
|
94
|
+
},
|
|
95
|
+
parcelVersion: 'TODO',
|
|
96
|
+
packageManager,
|
|
97
|
+
env: process.env,
|
|
98
|
+
get hmrOptions() {
|
|
99
|
+
throw new Error('Resolver.resolve.options.hmrOptions');
|
|
100
|
+
},
|
|
101
|
+
get serveOptions() {
|
|
102
|
+
throw new Error('Resolver.resolve.options.serveOptions');
|
|
103
|
+
},
|
|
104
|
+
get shouldBuildLazily() {
|
|
105
|
+
throw new Error('Resolver.resolve.options.shouldBuildLazily');
|
|
106
|
+
},
|
|
107
|
+
shouldAutoInstall: false,
|
|
108
|
+
get logLevel() {
|
|
109
|
+
throw new Error('Resolver.resolve.options.logLevel');
|
|
110
|
+
},
|
|
111
|
+
projectRoot,
|
|
112
|
+
get cacheDir() {
|
|
113
|
+
throw new Error('Resolver.resolve.options.cacheDir');
|
|
114
|
+
},
|
|
115
|
+
inputFS: this.#fs,
|
|
116
|
+
outputFS: this.#fs,
|
|
117
|
+
get instanceId() {
|
|
118
|
+
throw new Error('Resolver.resolve.options.instanceId');
|
|
119
|
+
},
|
|
120
|
+
get detailedReport() {
|
|
121
|
+
throw new Error('Resolver.resolve.options.detailedReport');
|
|
122
|
+
},
|
|
123
|
+
get featureFlags() {
|
|
124
|
+
throw new Error('Resolver.resolve.options.featureFlags');
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
if (!('config' in state)) {
|
|
130
|
+
state.config = await state.resolver.loadConfig?.({
|
|
131
|
+
config: {
|
|
132
|
+
isSource: true,
|
|
133
|
+
searchPath: '',
|
|
134
|
+
// $FlowFixMe This isn't correct to flow but is enough to satisfy the runtime checks
|
|
135
|
+
env: new Environment(dependency.env, {
|
|
136
|
+
projectRoot,
|
|
137
|
+
hmrOptions: undefined,
|
|
138
|
+
}),
|
|
139
|
+
invalidateOnFileChange(): void {},
|
|
140
|
+
invalidateOnFileCreate(): void {},
|
|
141
|
+
invalidateOnEnvChange(): void {},
|
|
142
|
+
invalidateOnStartup(): void {},
|
|
143
|
+
invalidateOnBuild(): void {},
|
|
144
|
+
addDevDependency(): void {},
|
|
145
|
+
setCacheKey(): void {},
|
|
146
|
+
getConfig<T>(): Promise<?ConfigResultWithFilePath<T>> {
|
|
147
|
+
throw new Error('Resolver.loadConfig.config.getConfig');
|
|
148
|
+
},
|
|
149
|
+
getConfigFrom<T>(): Promise<?ConfigResultWithFilePath<T>> {
|
|
150
|
+
throw new Error('Resolver.loadConfig.config.getConfigFrom');
|
|
151
|
+
},
|
|
152
|
+
getPackage(): Promise<?PackageJSON> {
|
|
153
|
+
throw new Error('Resolver.loadConfig.config.getPackage');
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
...defaultOptions,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const result = await state.resolver.resolve({
|
|
161
|
+
specifier,
|
|
162
|
+
dependency,
|
|
163
|
+
pipeline,
|
|
164
|
+
config: state.config,
|
|
165
|
+
...defaultOptions,
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
if (!result) {
|
|
169
|
+
return {
|
|
170
|
+
invalidations: [],
|
|
171
|
+
resolution: {type: 'unresolved'},
|
|
172
|
+
};
|
|
173
|
+
}
|
|
65
174
|
|
|
66
|
-
const result = await resolver.resolve({
|
|
67
|
-
specifier,
|
|
68
|
-
dependency,
|
|
69
|
-
get options() {
|
|
70
|
-
throw new Error('TODO: Resolver.resolve.options');
|
|
71
|
-
},
|
|
72
|
-
get logger() {
|
|
73
|
-
throw new Error('TODO: Resolver.resolve.logger');
|
|
74
|
-
},
|
|
75
|
-
get tracer() {
|
|
76
|
-
throw new Error('TODO: Resolver.resolve.tracer');
|
|
77
|
-
},
|
|
78
|
-
get pipeline() {
|
|
79
|
-
throw new Error('TODO: Resolver.resolve.pipeline');
|
|
80
|
-
},
|
|
81
|
-
get config() {
|
|
82
|
-
throw new Error('TODO: Resolver.resolve.config');
|
|
83
|
-
},
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
if (!result) {
|
|
87
175
|
return {
|
|
88
176
|
invalidations: [],
|
|
89
|
-
resolution: {
|
|
177
|
+
resolution: {
|
|
178
|
+
type: 'resolved',
|
|
179
|
+
filePath: result.filePath || '',
|
|
180
|
+
canDefer: result.canDefer || false,
|
|
181
|
+
sideEffects: result.sideEffects || false,
|
|
182
|
+
code: result.code || undefined,
|
|
183
|
+
meta: result.meta || undefined,
|
|
184
|
+
pipeline: result.pipeline || undefined,
|
|
185
|
+
priority: result.priority && PriorityMap[result.priority],
|
|
186
|
+
query: result.query && result.query.toString(),
|
|
187
|
+
},
|
|
90
188
|
};
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
return {
|
|
94
|
-
invalidations: [],
|
|
95
|
-
resolution: {
|
|
96
|
-
type: 'resolved',
|
|
97
|
-
filePath: result.filePath || '',
|
|
98
|
-
canDefer: result.canDefer || false,
|
|
99
|
-
sideEffects: result.sideEffects || false,
|
|
100
|
-
code: result.code || undefined,
|
|
101
|
-
meta: result.meta || undefined,
|
|
102
|
-
pipeline: result.pipeline || undefined,
|
|
103
|
-
priority: result.priority && PriorityMap[result.priority],
|
|
104
|
-
query: result.query && result.query.toString(),
|
|
105
|
-
},
|
|
106
|
-
};
|
|
107
|
-
});
|
|
189
|
+
},
|
|
190
|
+
);
|
|
108
191
|
|
|
109
192
|
ping() {
|
|
110
193
|
// console.log('Hi');
|
|
@@ -183,6 +266,12 @@ export class AtlaspackWorker {
|
|
|
183
266
|
|
|
184
267
|
napi.registerWorker(workerData.tx_worker, new AtlaspackWorker());
|
|
185
268
|
|
|
269
|
+
type ResolverState<T> = {|
|
|
270
|
+
resolver: Resolver<T>,
|
|
271
|
+
config?: T,
|
|
272
|
+
packageManager?: NodePackageManager,
|
|
273
|
+
|};
|
|
274
|
+
|
|
186
275
|
type LoadPluginOptions = {|
|
|
187
276
|
kind: 'resolver',
|
|
188
277
|
specifier: string,
|
|
@@ -193,6 +282,8 @@ type RunResolverResolveOptions = {|
|
|
|
193
282
|
key: string,
|
|
194
283
|
dependency: Dependency,
|
|
195
284
|
specifier: FilePath,
|
|
285
|
+
pipeline: ?string,
|
|
286
|
+
projectRoot: string,
|
|
196
287
|
|};
|
|
197
288
|
|
|
198
289
|
type RunResolverResolveResult = {|
|