ryugi-artifacts 1.39.0 → 1.39.2
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 +6 -5
- package/dist/runtime/ryugi-ui.js +1 -1
- package/dist/server.cjs +6 -5
- package/dist/viewer-lib/index.js +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -460,17 +460,18 @@ function readConfig(file) {
|
|
|
460
460
|
return { config: defaults(), warning: `config.json is not valid JSON: ${err.message}` };
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
|
+
var IGNORED = ["config.json", "artifacts/*", "!artifacts/document/", "artifacts/document/*/.artifact-id"];
|
|
463
464
|
function ensureGitignore(dir) {
|
|
464
465
|
const file = import_node_path3.default.join(dir, ".gitignore");
|
|
465
466
|
let current = "";
|
|
466
467
|
try {
|
|
467
468
|
current = import_node_fs5.default.readFileSync(file, "utf8");
|
|
468
469
|
} catch {
|
|
469
|
-
import_node_fs5.default.writeFileSync(file, "config.json\n");
|
|
470
|
-
return;
|
|
471
470
|
}
|
|
472
|
-
|
|
473
|
-
|
|
471
|
+
const present = new Set(current.split(/\r?\n/).map((line) => line.trim()));
|
|
472
|
+
const missing = IGNORED.filter((line) => !present.has(line));
|
|
473
|
+
if (missing.length === 0) return;
|
|
474
|
+
import_node_fs5.default.writeFileSync(file, `${current}${current === "" || current.endsWith("\n") ? "" : "\n"}${missing.join("\n")}
|
|
474
475
|
`);
|
|
475
476
|
}
|
|
476
477
|
function ensureConfig(file) {
|
|
@@ -1477,7 +1478,7 @@ async function main(argv) {
|
|
|
1477
1478
|
return await monitor({ json: !!values.json }, emit);
|
|
1478
1479
|
}
|
|
1479
1480
|
if (command === "--version" || command === "-v") {
|
|
1480
|
-
console.log("1.39.
|
|
1481
|
+
console.log("1.39.2");
|
|
1481
1482
|
return 0;
|
|
1482
1483
|
}
|
|
1483
1484
|
if (command === "--help" || command === "-h") {
|