@atlaspack/cli 2.13.7-dev.72 → 2.13.7-dev.73
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 +4 -20
- package/package.json +14 -14
- package/src/cli.js +5 -30
package/lib/cli.js
CHANGED
|
@@ -116,30 +116,14 @@ command) {
|
|
|
116
116
|
entries = ['.'];
|
|
117
117
|
}
|
|
118
118
|
entries = entries.map(entry => _path().default.resolve(entry));
|
|
119
|
-
let fs = new (_fs().NodeFS)();
|
|
120
119
|
let Atlaspack = require('@atlaspack/core').default;
|
|
120
|
+
let fs = new (_fs().NodeFS)();
|
|
121
121
|
let options = await (0, _normalizeOptions.normalizeOptions)(command, fs);
|
|
122
122
|
let atlaspack = new Atlaspack({
|
|
123
123
|
entries,
|
|
124
|
-
defaultConfig: (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
let inbuiltDefaultConfig = _path().default.join( /*#__ATLASPACK_IGNORE__*/__dirname, '../../configs/default/index.json.js');
|
|
128
|
-
if (!fs.existsSync(inbuiltDefaultConfig)) {
|
|
129
|
-
throw new Error(`Missing inbuilt default config. Expected '${inbuiltDefaultConfig}' to exist`);
|
|
130
|
-
}
|
|
131
|
-
return inbuiltDefaultConfig;
|
|
132
|
-
}
|
|
133
|
-
for (let path of [fs.cwd(), __dirname]) {
|
|
134
|
-
let customRequire = require('module').createRequire(path);
|
|
135
|
-
try {
|
|
136
|
-
return customRequire.resolve('@atlaspack/config-default');
|
|
137
|
-
} catch (e) {
|
|
138
|
-
// Ignore error
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
throw new Error(`Can't resolve default config`);
|
|
142
|
-
})(),
|
|
124
|
+
defaultConfig: require.resolve('@atlaspack/config-default', {
|
|
125
|
+
paths: [fs.cwd(), __dirname]
|
|
126
|
+
}),
|
|
143
127
|
shouldPatchConsole: false,
|
|
144
128
|
...options
|
|
145
129
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/cli",
|
|
3
|
-
"version": "2.13.7-dev.
|
|
3
|
+
"version": "2.13.7-dev.73+84eec3484",
|
|
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.5-dev.
|
|
28
|
-
"@atlaspack/core": "2.16.2-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.5-dev.
|
|
33
|
-
"@atlaspack/logger": "2.14.5-dev.
|
|
34
|
-
"@atlaspack/package-manager": "2.14.5-dev.
|
|
35
|
-
"@atlaspack/reporter-cli": "2.15.1-dev.
|
|
36
|
-
"@atlaspack/reporter-dev-server": "2.14.5-dev.
|
|
37
|
-
"@atlaspack/reporter-tracer": "2.14.5-dev.
|
|
38
|
-
"@atlaspack/utils": "2.14.5-dev.
|
|
27
|
+
"@atlaspack/config-default": "3.1.5-dev.73+84eec3484",
|
|
28
|
+
"@atlaspack/core": "2.16.2-dev.73+84eec3484",
|
|
29
|
+
"@atlaspack/diagnostic": "2.14.1-dev.141+84eec3484",
|
|
30
|
+
"@atlaspack/events": "2.14.1-dev.141+84eec3484",
|
|
31
|
+
"@atlaspack/feature-flags": "2.14.1-dev.141+84eec3484",
|
|
32
|
+
"@atlaspack/fs": "2.14.5-dev.73+84eec3484",
|
|
33
|
+
"@atlaspack/logger": "2.14.5-dev.73+84eec3484",
|
|
34
|
+
"@atlaspack/package-manager": "2.14.5-dev.73+84eec3484",
|
|
35
|
+
"@atlaspack/reporter-cli": "2.15.1-dev.73+84eec3484",
|
|
36
|
+
"@atlaspack/reporter-dev-server": "2.14.5-dev.73+84eec3484",
|
|
37
|
+
"@atlaspack/reporter-tracer": "2.14.5-dev.73+84eec3484",
|
|
38
|
+
"@atlaspack/utils": "2.14.5-dev.73+84eec3484",
|
|
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": "84eec348413c647de4872f902c4bc8ff54c347f3"
|
|
49
49
|
}
|
package/src/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
|
|
3
|
-
import {BuildError
|
|
3
|
+
import {BuildError} from '@atlaspack/core';
|
|
4
4
|
import {NodeFS} from '@atlaspack/fs';
|
|
5
5
|
import {openInBrowser} from '@atlaspack/utils';
|
|
6
6
|
import {Disposable} from '@atlaspack/events';
|
|
@@ -132,39 +132,14 @@ async function run(
|
|
|
132
132
|
|
|
133
133
|
entries = entries.map((entry) => path.resolve(entry));
|
|
134
134
|
|
|
135
|
-
let fs = new NodeFS();
|
|
136
|
-
|
|
137
|
-
const resolveDefaultConfig = () => {
|
|
138
|
-
if (isSuperPackage()) {
|
|
139
|
-
// We're in the super package so resolve the inbuilt config
|
|
140
|
-
let inbuiltDefaultConfig = path.join(
|
|
141
|
-
/*#__ATLASPACK_IGNORE__*/ __dirname,
|
|
142
|
-
'../../configs/default/index.json.js',
|
|
143
|
-
);
|
|
144
|
-
if (!fs.existsSync(inbuiltDefaultConfig)) {
|
|
145
|
-
throw new Error(
|
|
146
|
-
`Missing inbuilt default config. Expected '${inbuiltDefaultConfig}' to exist`,
|
|
147
|
-
);
|
|
148
|
-
}
|
|
149
|
-
return inbuiltDefaultConfig;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
for (let path of [fs.cwd(), __dirname]) {
|
|
153
|
-
let customRequire = require('module').createRequire(path);
|
|
154
|
-
try {
|
|
155
|
-
return customRequire.resolve('@atlaspack/config-default');
|
|
156
|
-
} catch (e) {
|
|
157
|
-
// Ignore error
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
throw new Error(`Can't resolve default config`);
|
|
161
|
-
};
|
|
162
|
-
|
|
163
135
|
let Atlaspack = require('@atlaspack/core').default;
|
|
136
|
+
let fs = new NodeFS();
|
|
164
137
|
let options = await normalizeOptions(command, fs);
|
|
165
138
|
let atlaspack = new Atlaspack({
|
|
166
139
|
entries,
|
|
167
|
-
defaultConfig:
|
|
140
|
+
defaultConfig: require.resolve('@atlaspack/config-default', {
|
|
141
|
+
paths: [fs.cwd(), __dirname],
|
|
142
|
+
}),
|
|
168
143
|
shouldPatchConsole: false,
|
|
169
144
|
...options,
|
|
170
145
|
});
|