@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/cli.js
CHANGED
|
@@ -1604,12 +1604,19 @@ async function createServer(inlineConfig = {}) {
|
|
|
1604
1604
|
app.use(sirv(config.root, { dev: true, etag: true }));
|
|
1605
1605
|
const httpServer = http.createServer(app);
|
|
1606
1606
|
const ws = createWebSocketServer(httpServer);
|
|
1607
|
+
const ignoredSegments = /* @__PURE__ */ new Set(["node_modules", ".git", ".nasti"]);
|
|
1608
|
+
const outDirAbs = path9.resolve(config.root, config.build.outDir);
|
|
1607
1609
|
const watcher = watch(config.root, {
|
|
1608
|
-
ignored:
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1610
|
+
ignored: (filePath) => {
|
|
1611
|
+
if (filePath === config.root) return false;
|
|
1612
|
+
if (filePath === outDirAbs || filePath.startsWith(outDirAbs + path9.sep)) return true;
|
|
1613
|
+
const rel = path9.relative(config.root, filePath);
|
|
1614
|
+
if (!rel || rel.startsWith("..") || path9.isAbsolute(rel)) return false;
|
|
1615
|
+
for (const seg of rel.split(path9.sep)) {
|
|
1616
|
+
if (ignoredSegments.has(seg)) return true;
|
|
1617
|
+
}
|
|
1618
|
+
return false;
|
|
1619
|
+
},
|
|
1613
1620
|
ignoreInitial: true
|
|
1614
1621
|
});
|
|
1615
1622
|
let server;
|
|
@@ -1637,7 +1644,7 @@ async function createServer(inlineConfig = {}) {
|
|
|
1637
1644
|
const localUrl = `http://localhost:${actualPort}`;
|
|
1638
1645
|
const networkUrl = host === "0.0.0.0" ? `http://${getNetworkAddress()}:${actualPort}` : null;
|
|
1639
1646
|
console.log();
|
|
1640
|
-
console.log(pc.cyan(" nasti dev server") + pc.dim(` v${"1.
|
|
1647
|
+
console.log(pc.cyan(" nasti dev server") + pc.dim(` v${"1.6.0"}`));
|
|
1641
1648
|
console.log();
|
|
1642
1649
|
console.log(` ${pc.green(">")} Local: ${pc.cyan(localUrl)}`);
|
|
1643
1650
|
if (networkUrl) {
|
|
@@ -1760,7 +1767,7 @@ import pc2 from "picocolors";
|
|
|
1760
1767
|
async function build(inlineConfig = {}) {
|
|
1761
1768
|
const config = await resolveConfig(inlineConfig, "build");
|
|
1762
1769
|
const startTime = performance.now();
|
|
1763
|
-
console.log(pc2.cyan("\n\u{1F528} nasti build") + pc2.dim(` v${"1.
|
|
1770
|
+
console.log(pc2.cyan("\n\u{1F528} nasti build") + pc2.dim(` v${"1.6.0"}`));
|
|
1764
1771
|
console.log(pc2.dim(` root: ${config.root}`));
|
|
1765
1772
|
console.log(pc2.dim(` mode: ${config.mode}`));
|
|
1766
1773
|
const outDir = path10.resolve(config.root, config.build.outDir);
|
|
@@ -1920,7 +1927,7 @@ async function buildElectron(inlineConfig = {}) {
|
|
|
1920
1927
|
const config = await resolveConfig({ ...inlineConfig, target: "electron" }, "build");
|
|
1921
1928
|
const startTime = performance.now();
|
|
1922
1929
|
assertElectronVersion(config);
|
|
1923
|
-
console.log(pc3.cyan("\n\u26A1 nasti build (electron)") + pc3.dim(` v${"1.
|
|
1930
|
+
console.log(pc3.cyan("\n\u26A1 nasti build (electron)") + pc3.dim(` v${"1.6.0"}`));
|
|
1924
1931
|
console.log(pc3.dim(` root: ${config.root}`));
|
|
1925
1932
|
console.log(pc3.dim(` mode: ${config.mode}`));
|
|
1926
1933
|
console.log(pc3.dim(` target: electron (\u2265 ${config.electron.minVersion})`));
|
|
@@ -2011,7 +2018,7 @@ async function bundleNode(config, entry, opts) {
|
|
|
2011
2018
|
format: opts.format === "cjs" ? "cjs" : "esm",
|
|
2012
2019
|
sourcemap: !!config.build.sourcemap,
|
|
2013
2020
|
minify: !!config.build.minify,
|
|
2014
|
-
|
|
2021
|
+
codeSplitting: false
|
|
2015
2022
|
});
|
|
2016
2023
|
await bundle.close();
|
|
2017
2024
|
console.log(pc3.dim(` \u2713 ${opts.label} \u2192 ${path11.relative(config.root, opts.outFile)}`));
|
|
@@ -2074,7 +2081,7 @@ async function startElectronDev(inlineConfig = {}) {
|
|
|
2074
2081
|
const { noSpawn, ...rest } = inlineConfig;
|
|
2075
2082
|
const config = await resolveConfig({ ...rest, target: "electron" }, "serve");
|
|
2076
2083
|
warnElectronVersion(config);
|
|
2077
|
-
console.log(pc4.cyan("\n\u26A1 nasti electron dev") + pc4.dim(` v${"1.
|
|
2084
|
+
console.log(pc4.cyan("\n\u26A1 nasti electron dev") + pc4.dim(` v${"1.6.0"}`));
|
|
2078
2085
|
const { createServer: createServer2 } = await Promise.resolve().then(() => (init_server(), server_exports));
|
|
2079
2086
|
const server = await createServer2({ ...rest, target: "electron" });
|
|
2080
2087
|
await server.listen();
|
|
@@ -2217,7 +2224,9 @@ async function compileNode(config, entry, opts) {
|
|
|
2217
2224
|
format: opts.format === "cjs" ? "cjs" : "esm",
|
|
2218
2225
|
sourcemap: false,
|
|
2219
2226
|
minify: false,
|
|
2220
|
-
inlineDynamicImports:
|
|
2227
|
+
// rolldown 已弃用 inlineDynamicImports,改用 codeSplitting:false 表达
|
|
2228
|
+
// 同样语义(单 chunk、内联 dynamic import)
|
|
2229
|
+
codeSplitting: false
|
|
2221
2230
|
});
|
|
2222
2231
|
await bundle.close();
|
|
2223
2232
|
}
|
|
@@ -2399,6 +2408,6 @@ cli.command("preview [root]", "Preview production build").option("--port <port>"
|
|
|
2399
2408
|
}
|
|
2400
2409
|
});
|
|
2401
2410
|
cli.help();
|
|
2402
|
-
cli.version("1.
|
|
2411
|
+
cli.version("1.6.0");
|
|
2403
2412
|
cli.parse();
|
|
2404
2413
|
//# sourceMappingURL=cli.js.map
|