@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.cjs
CHANGED
|
@@ -1624,12 +1624,19 @@ async function createServer(inlineConfig = {}) {
|
|
|
1624
1624
|
app.use((0, import_sirv.default)(config.root, { dev: true, etag: true }));
|
|
1625
1625
|
const httpServer = import_node_http.default.createServer(app);
|
|
1626
1626
|
const ws = createWebSocketServer(httpServer);
|
|
1627
|
+
const ignoredSegments = /* @__PURE__ */ new Set(["node_modules", ".git", ".nasti"]);
|
|
1628
|
+
const outDirAbs = import_node_path9.default.resolve(config.root, config.build.outDir);
|
|
1627
1629
|
const watcher = (0, import_chokidar.watch)(config.root, {
|
|
1628
|
-
ignored:
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1630
|
+
ignored: (filePath) => {
|
|
1631
|
+
if (filePath === config.root) return false;
|
|
1632
|
+
if (filePath === outDirAbs || filePath.startsWith(outDirAbs + import_node_path9.default.sep)) return true;
|
|
1633
|
+
const rel = import_node_path9.default.relative(config.root, filePath);
|
|
1634
|
+
if (!rel || rel.startsWith("..") || import_node_path9.default.isAbsolute(rel)) return false;
|
|
1635
|
+
for (const seg of rel.split(import_node_path9.default.sep)) {
|
|
1636
|
+
if (ignoredSegments.has(seg)) return true;
|
|
1637
|
+
}
|
|
1638
|
+
return false;
|
|
1639
|
+
},
|
|
1633
1640
|
ignoreInitial: true
|
|
1634
1641
|
});
|
|
1635
1642
|
let server;
|
|
@@ -1657,7 +1664,7 @@ async function createServer(inlineConfig = {}) {
|
|
|
1657
1664
|
const localUrl = `http://localhost:${actualPort}`;
|
|
1658
1665
|
const networkUrl = host === "0.0.0.0" ? `http://${getNetworkAddress()}:${actualPort}` : null;
|
|
1659
1666
|
console.log();
|
|
1660
|
-
console.log(import_picocolors.default.cyan(" nasti dev server") + import_picocolors.default.dim(` v${"1.
|
|
1667
|
+
console.log(import_picocolors.default.cyan(" nasti dev server") + import_picocolors.default.dim(` v${"1.6.0"}`));
|
|
1661
1668
|
console.log();
|
|
1662
1669
|
console.log(` ${import_picocolors.default.green(">")} Local: ${import_picocolors.default.cyan(localUrl)}`);
|
|
1663
1670
|
if (networkUrl) {
|
|
@@ -1784,7 +1791,7 @@ __export(build_exports, {
|
|
|
1784
1791
|
async function build(inlineConfig = {}) {
|
|
1785
1792
|
const config = await resolveConfig(inlineConfig, "build");
|
|
1786
1793
|
const startTime = performance.now();
|
|
1787
|
-
console.log(import_picocolors2.default.cyan("\n\u{1F528} nasti build") + import_picocolors2.default.dim(` v${"1.
|
|
1794
|
+
console.log(import_picocolors2.default.cyan("\n\u{1F528} nasti build") + import_picocolors2.default.dim(` v${"1.6.0"}`));
|
|
1788
1795
|
console.log(import_picocolors2.default.dim(` root: ${config.root}`));
|
|
1789
1796
|
console.log(import_picocolors2.default.dim(` mode: ${config.mode}`));
|
|
1790
1797
|
const outDir = import_node_path10.default.resolve(config.root, config.build.outDir);
|
|
@@ -1945,7 +1952,7 @@ async function buildElectron(inlineConfig = {}) {
|
|
|
1945
1952
|
const config = await resolveConfig({ ...inlineConfig, target: "electron" }, "build");
|
|
1946
1953
|
const startTime = performance.now();
|
|
1947
1954
|
assertElectronVersion(config);
|
|
1948
|
-
console.log(import_picocolors3.default.cyan("\n\u26A1 nasti build (electron)") + import_picocolors3.default.dim(` v${"1.
|
|
1955
|
+
console.log(import_picocolors3.default.cyan("\n\u26A1 nasti build (electron)") + import_picocolors3.default.dim(` v${"1.6.0"}`));
|
|
1949
1956
|
console.log(import_picocolors3.default.dim(` root: ${config.root}`));
|
|
1950
1957
|
console.log(import_picocolors3.default.dim(` mode: ${config.mode}`));
|
|
1951
1958
|
console.log(import_picocolors3.default.dim(` target: electron (\u2265 ${config.electron.minVersion})`));
|
|
@@ -2036,7 +2043,7 @@ async function bundleNode(config, entry, opts) {
|
|
|
2036
2043
|
format: opts.format === "cjs" ? "cjs" : "esm",
|
|
2037
2044
|
sourcemap: !!config.build.sourcemap,
|
|
2038
2045
|
minify: !!config.build.minify,
|
|
2039
|
-
|
|
2046
|
+
codeSplitting: false
|
|
2040
2047
|
});
|
|
2041
2048
|
await bundle.close();
|
|
2042
2049
|
console.log(import_picocolors3.default.dim(` \u2713 ${opts.label} \u2192 ${import_node_path11.default.relative(config.root, opts.outFile)}`));
|
|
@@ -2097,7 +2104,7 @@ async function startElectronDev(inlineConfig = {}) {
|
|
|
2097
2104
|
const { noSpawn, ...rest } = inlineConfig;
|
|
2098
2105
|
const config = await resolveConfig({ ...rest, target: "electron" }, "serve");
|
|
2099
2106
|
warnElectronVersion(config);
|
|
2100
|
-
console.log(import_picocolors4.default.cyan("\n\u26A1 nasti electron dev") + import_picocolors4.default.dim(` v${"1.
|
|
2107
|
+
console.log(import_picocolors4.default.cyan("\n\u26A1 nasti electron dev") + import_picocolors4.default.dim(` v${"1.6.0"}`));
|
|
2101
2108
|
const { createServer: createServer2 } = await Promise.resolve().then(() => (init_server(), server_exports));
|
|
2102
2109
|
const server = await createServer2({ ...rest, target: "electron" });
|
|
2103
2110
|
await server.listen();
|
|
@@ -2240,7 +2247,9 @@ async function compileNode(config, entry, opts) {
|
|
|
2240
2247
|
format: opts.format === "cjs" ? "cjs" : "esm",
|
|
2241
2248
|
sourcemap: false,
|
|
2242
2249
|
minify: false,
|
|
2243
|
-
inlineDynamicImports:
|
|
2250
|
+
// rolldown 已弃用 inlineDynamicImports,改用 codeSplitting:false 表达
|
|
2251
|
+
// 同样语义(单 chunk、内联 dynamic import)
|
|
2252
|
+
codeSplitting: false
|
|
2244
2253
|
});
|
|
2245
2254
|
await bundle.close();
|
|
2246
2255
|
}
|
|
@@ -2430,6 +2439,6 @@ cli.command("preview [root]", "Preview production build").option("--port <port>"
|
|
|
2430
2439
|
}
|
|
2431
2440
|
});
|
|
2432
2441
|
cli.help();
|
|
2433
|
-
cli.version("1.
|
|
2442
|
+
cli.version("1.6.0");
|
|
2434
2443
|
cli.parse();
|
|
2435
2444
|
//# sourceMappingURL=cli.cjs.map
|