@atlaspack/cli 2.13.3-dev.16 → 2.13.3-dev.36
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/lib/cli.js +13 -1
- package/package.json +14 -14
- package/src/cli.js +15 -1
package/lib/cli.js
CHANGED
|
@@ -121,7 +121,19 @@ command) {
|
|
|
121
121
|
let options = await (0, _normalizeOptions.normalizeOptions)(command, fs);
|
|
122
122
|
let atlaspack = new Atlaspack({
|
|
123
123
|
entries,
|
|
124
|
-
defaultConfig:
|
|
124
|
+
defaultConfig: ((specifier, {
|
|
125
|
+
paths
|
|
126
|
+
}) => {
|
|
127
|
+
for (let path of paths) {
|
|
128
|
+
let customRequire = require('module').createRequire(path);
|
|
129
|
+
try {
|
|
130
|
+
return customRequire.resolve('@atlaspack/config-default');
|
|
131
|
+
} catch (e) {
|
|
132
|
+
// Ignore error
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
throw new Error(`Can't resolve "${specifier}" from any of [${paths.join(', ')}]`);
|
|
136
|
+
})('@atlaspack/config-default', {
|
|
125
137
|
paths: [fs.cwd(), __dirname]
|
|
126
138
|
}),
|
|
127
139
|
shouldPatchConsole: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/cli",
|
|
3
|
-
"version": "2.13.3-dev.
|
|
3
|
+
"version": "2.13.3-dev.36+b98b1df81",
|
|
4
4
|
"description": "Blazing fast, zero configuration web application bundler",
|
|
5
5
|
"license": "(MIT OR Apache-2.0)",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
"node": ">= 16.0.0"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@atlaspack/config-default": "3.1.1-dev.
|
|
28
|
-
"@atlaspack/core": "2.14.1-dev.
|
|
29
|
-
"@atlaspack/diagnostic": "2.14.1-dev.
|
|
30
|
-
"@atlaspack/events": "2.14.1-dev.
|
|
31
|
-
"@atlaspack/feature-flags": "2.14.1-dev.
|
|
32
|
-
"@atlaspack/fs": "2.14.1-dev.
|
|
33
|
-
"@atlaspack/logger": "2.14.1-dev.
|
|
34
|
-
"@atlaspack/package-manager": "2.14.1-dev.
|
|
35
|
-
"@atlaspack/reporter-cli": "2.14.1-dev.
|
|
36
|
-
"@atlaspack/reporter-dev-server": "2.14.1-dev.
|
|
37
|
-
"@atlaspack/reporter-tracer": "2.14.1-dev.
|
|
38
|
-
"@atlaspack/utils": "2.14.1-dev.
|
|
27
|
+
"@atlaspack/config-default": "3.1.1-dev.36+b98b1df81",
|
|
28
|
+
"@atlaspack/core": "2.14.1-dev.36+b98b1df81",
|
|
29
|
+
"@atlaspack/diagnostic": "2.14.1-dev.36+b98b1df81",
|
|
30
|
+
"@atlaspack/events": "2.14.1-dev.36+b98b1df81",
|
|
31
|
+
"@atlaspack/feature-flags": "2.14.1-dev.36+b98b1df81",
|
|
32
|
+
"@atlaspack/fs": "2.14.1-dev.36+b98b1df81",
|
|
33
|
+
"@atlaspack/logger": "2.14.1-dev.36+b98b1df81",
|
|
34
|
+
"@atlaspack/package-manager": "2.14.1-dev.36+b98b1df81",
|
|
35
|
+
"@atlaspack/reporter-cli": "2.14.1-dev.36+b98b1df81",
|
|
36
|
+
"@atlaspack/reporter-dev-server": "2.14.1-dev.36+b98b1df81",
|
|
37
|
+
"@atlaspack/reporter-tracer": "2.14.1-dev.36+b98b1df81",
|
|
38
|
+
"@atlaspack/utils": "2.14.1-dev.36+b98b1df81",
|
|
39
39
|
"chalk": "^4.1.0",
|
|
40
40
|
"commander": "^7.0.0",
|
|
41
41
|
"get-port": "^4.2.0"
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"@babel/core": "^7.22.11",
|
|
46
46
|
"rimraf": "^5.0.5"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "b98b1df81bc5ca2c1f977d250c958c137bd0b4ee"
|
|
49
49
|
}
|
package/src/cli.js
CHANGED
|
@@ -132,12 +132,26 @@ async function run(
|
|
|
132
132
|
|
|
133
133
|
entries = entries.map((entry) => path.resolve(entry));
|
|
134
134
|
|
|
135
|
+
const resolve = (specifier, {paths}) => {
|
|
136
|
+
for (let path of paths) {
|
|
137
|
+
let customRequire = require('module').createRequire(path);
|
|
138
|
+
try {
|
|
139
|
+
return customRequire.resolve('@atlaspack/config-default');
|
|
140
|
+
} catch (e) {
|
|
141
|
+
// Ignore error
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
throw new Error(
|
|
145
|
+
`Can't resolve "${specifier}" from any of [${paths.join(', ')}]`,
|
|
146
|
+
);
|
|
147
|
+
};
|
|
148
|
+
|
|
135
149
|
let Atlaspack = require('@atlaspack/core').default;
|
|
136
150
|
let fs = new NodeFS();
|
|
137
151
|
let options = await normalizeOptions(command, fs);
|
|
138
152
|
let atlaspack = new Atlaspack({
|
|
139
153
|
entries,
|
|
140
|
-
defaultConfig:
|
|
154
|
+
defaultConfig: resolve('@atlaspack/config-default', {
|
|
141
155
|
paths: [fs.cwd(), __dirname],
|
|
142
156
|
}),
|
|
143
157
|
shouldPatchConsole: false,
|