@nasti-toolchain/nasti 1.5.2 → 1.6.0
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/dist/cli.cjs +21 -12
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +21 -12
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +21 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -814,7 +814,7 @@ __export(build_exports, {
|
|
|
814
814
|
async function build(inlineConfig = {}) {
|
|
815
815
|
const config = await resolveConfig(inlineConfig, "build");
|
|
816
816
|
const startTime = performance.now();
|
|
817
|
-
console.log(import_picocolors.default.cyan("\n\u{1F528} nasti build") + import_picocolors.default.dim(` v${"1.
|
|
817
|
+
console.log(import_picocolors.default.cyan("\n\u{1F528} nasti build") + import_picocolors.default.dim(` v${"1.6.0"}`));
|
|
818
818
|
console.log(import_picocolors.default.dim(` root: ${config.root}`));
|
|
819
819
|
console.log(import_picocolors.default.dim(` mode: ${config.mode}`));
|
|
820
820
|
const outDir = import_node_path7.default.resolve(config.root, config.build.outDir);
|
|
@@ -1786,12 +1786,19 @@ async function createServer(inlineConfig = {}) {
|
|
|
1786
1786
|
app.use((0, import_sirv.default)(config.root, { dev: true, etag: true }));
|
|
1787
1787
|
const httpServer = import_node_http.default.createServer(app);
|
|
1788
1788
|
const ws = createWebSocketServer(httpServer);
|
|
1789
|
+
const ignoredSegments = /* @__PURE__ */ new Set(["node_modules", ".git", ".nasti"]);
|
|
1790
|
+
const outDirAbs = import_node_path11.default.resolve(config.root, config.build.outDir);
|
|
1789
1791
|
const watcher = (0, import_chokidar.watch)(config.root, {
|
|
1790
|
-
ignored:
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1792
|
+
ignored: (filePath) => {
|
|
1793
|
+
if (filePath === config.root) return false;
|
|
1794
|
+
if (filePath === outDirAbs || filePath.startsWith(outDirAbs + import_node_path11.default.sep)) return true;
|
|
1795
|
+
const rel = import_node_path11.default.relative(config.root, filePath);
|
|
1796
|
+
if (!rel || rel.startsWith("..") || import_node_path11.default.isAbsolute(rel)) return false;
|
|
1797
|
+
for (const seg of rel.split(import_node_path11.default.sep)) {
|
|
1798
|
+
if (ignoredSegments.has(seg)) return true;
|
|
1799
|
+
}
|
|
1800
|
+
return false;
|
|
1801
|
+
},
|
|
1795
1802
|
ignoreInitial: true
|
|
1796
1803
|
});
|
|
1797
1804
|
let server;
|
|
@@ -1819,7 +1826,7 @@ async function createServer(inlineConfig = {}) {
|
|
|
1819
1826
|
const localUrl = `http://localhost:${actualPort}`;
|
|
1820
1827
|
const networkUrl = host === "0.0.0.0" ? `http://${getNetworkAddress()}:${actualPort}` : null;
|
|
1821
1828
|
console.log();
|
|
1822
|
-
console.log(import_picocolors3.default.cyan(" nasti dev server") + import_picocolors3.default.dim(` v${"1.
|
|
1829
|
+
console.log(import_picocolors3.default.cyan(" nasti dev server") + import_picocolors3.default.dim(` v${"1.6.0"}`));
|
|
1823
1830
|
console.log();
|
|
1824
1831
|
console.log(` ${import_picocolors3.default.green(">")} Local: ${import_picocolors3.default.cyan(localUrl)}`);
|
|
1825
1832
|
if (networkUrl) {
|
|
@@ -1963,7 +1970,7 @@ async function buildElectron(inlineConfig = {}) {
|
|
|
1963
1970
|
const config = await resolveConfig({ ...inlineConfig, target: "electron" }, "build");
|
|
1964
1971
|
const startTime = performance.now();
|
|
1965
1972
|
assertElectronVersion(config);
|
|
1966
|
-
console.log(import_picocolors2.default.cyan("\n\u26A1 nasti build (electron)") + import_picocolors2.default.dim(` v${"1.
|
|
1973
|
+
console.log(import_picocolors2.default.cyan("\n\u26A1 nasti build (electron)") + import_picocolors2.default.dim(` v${"1.6.0"}`));
|
|
1967
1974
|
console.log(import_picocolors2.default.dim(` root: ${config.root}`));
|
|
1968
1975
|
console.log(import_picocolors2.default.dim(` mode: ${config.mode}`));
|
|
1969
1976
|
console.log(import_picocolors2.default.dim(` target: electron (\u2265 ${config.electron.minVersion})`));
|
|
@@ -2054,7 +2061,7 @@ async function bundleNode(config, entry, opts) {
|
|
|
2054
2061
|
format: opts.format === "cjs" ? "cjs" : "esm",
|
|
2055
2062
|
sourcemap: !!config.build.sourcemap,
|
|
2056
2063
|
minify: !!config.build.minify,
|
|
2057
|
-
|
|
2064
|
+
codeSplitting: false
|
|
2058
2065
|
});
|
|
2059
2066
|
await bundle.close();
|
|
2060
2067
|
console.log(import_picocolors2.default.dim(` \u2713 ${opts.label} \u2192 ${import_node_path8.default.relative(config.root, opts.outFile)}`));
|
|
@@ -2110,7 +2117,7 @@ async function startElectronDev(inlineConfig = {}) {
|
|
|
2110
2117
|
const { noSpawn, ...rest } = inlineConfig;
|
|
2111
2118
|
const config = await resolveConfig({ ...rest, target: "electron" }, "serve");
|
|
2112
2119
|
warnElectronVersion(config);
|
|
2113
|
-
console.log(import_picocolors4.default.cyan("\n\u26A1 nasti electron dev") + import_picocolors4.default.dim(` v${"1.
|
|
2120
|
+
console.log(import_picocolors4.default.cyan("\n\u26A1 nasti electron dev") + import_picocolors4.default.dim(` v${"1.6.0"}`));
|
|
2114
2121
|
const { createServer: createServer2 } = await Promise.resolve().then(() => (init_server(), server_exports));
|
|
2115
2122
|
const server = await createServer2({ ...rest, target: "electron" });
|
|
2116
2123
|
await server.listen();
|
|
@@ -2253,7 +2260,9 @@ async function compileNode(config, entry, opts) {
|
|
|
2253
2260
|
format: opts.format === "cjs" ? "cjs" : "esm",
|
|
2254
2261
|
sourcemap: false,
|
|
2255
2262
|
minify: false,
|
|
2256
|
-
inlineDynamicImports:
|
|
2263
|
+
// rolldown 已弃用 inlineDynamicImports,改用 codeSplitting:false 表达
|
|
2264
|
+
// 同样语义(单 chunk、内联 dynamic import)
|
|
2265
|
+
codeSplitting: false
|
|
2257
2266
|
});
|
|
2258
2267
|
await bundle.close();
|
|
2259
2268
|
}
|
|
@@ -2359,7 +2368,7 @@ function monacoEditorPlugin(options = {}) {
|
|
|
2359
2368
|
format: "iife",
|
|
2360
2369
|
sourcemap: false,
|
|
2361
2370
|
minify: true,
|
|
2362
|
-
|
|
2371
|
+
codeSplitting: false
|
|
2363
2372
|
});
|
|
2364
2373
|
await bundle.close();
|
|
2365
2374
|
return cacheFile;
|