@twin-build-orchestrate/cli 1.0.0-prerelease.1 → 1.0.0-prerelease.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.js +10 -7
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2941,8 +2941,8 @@ async function runInit(opts) {
|
|
|
2941
2941
|
JSON.stringify(merged, null, 2) + "\n",
|
|
2942
2942
|
"utf8"
|
|
2943
2943
|
);
|
|
2944
|
-
filesWritten.push(TWIN_BUILD_JSON);
|
|
2945
2944
|
}
|
|
2945
|
+
filesWritten.push(TWIN_BUILD_JSON);
|
|
2946
2946
|
const settingsPath = join8(opts.repoRoot, SETTINGS_JSON);
|
|
2947
2947
|
let existingSettings = {};
|
|
2948
2948
|
if (existsSync7(settingsPath)) {
|
|
@@ -2960,20 +2960,20 @@ async function runInit(opts) {
|
|
|
2960
2960
|
if (!opts.dryRun) {
|
|
2961
2961
|
mkdirSync4(dirname3(settingsPath), { recursive: true });
|
|
2962
2962
|
writeFileSync3(settingsPath, stringifySettings(mergedSettings), "utf8");
|
|
2963
|
-
filesWritten.push(SETTINGS_JSON);
|
|
2964
2963
|
}
|
|
2964
|
+
filesWritten.push(SETTINGS_JSON);
|
|
2965
2965
|
if (!opts.dryRun) {
|
|
2966
2966
|
ensureGitignoreEntry(
|
|
2967
2967
|
opts.repoRoot,
|
|
2968
2968
|
".claude/settings.json merge=json",
|
|
2969
2969
|
join8(opts.repoRoot, GITATTRIBUTES)
|
|
2970
2970
|
);
|
|
2971
|
-
filesWritten.push(GITATTRIBUTES);
|
|
2972
2971
|
}
|
|
2972
|
+
filesWritten.push(GITATTRIBUTES);
|
|
2973
2973
|
if (!opts.dryRun) {
|
|
2974
2974
|
ensureCacheStructure(opts.repoRoot);
|
|
2975
|
-
filesWritten.push(".twin-build/cache/.gitignore");
|
|
2976
2975
|
}
|
|
2976
|
+
filesWritten.push(".twin-build/cache/.gitignore");
|
|
2977
2977
|
if (opts.ci) {
|
|
2978
2978
|
if (!opts.dryRun) {
|
|
2979
2979
|
const devcontainerWritten = writeDevcontainerTemplate(opts.repoRoot);
|
|
@@ -2990,6 +2990,7 @@ async function runInit(opts) {
|
|
|
2990
2990
|
twinBuildJson: merged,
|
|
2991
2991
|
settingsJson: mergedSettings,
|
|
2992
2992
|
filesWritten,
|
|
2993
|
+
dryRun: Boolean(opts.dryRun),
|
|
2993
2994
|
warnings
|
|
2994
2995
|
};
|
|
2995
2996
|
}
|
|
@@ -3039,10 +3040,11 @@ echo "\u6B21\u306E\u30B9\u30C6\u30C3\u30D7: Claude Code \u3067 /plugin install t
|
|
|
3039
3040
|
`;
|
|
3040
3041
|
function renderInitNextSteps(result) {
|
|
3041
3042
|
const wroteGitattributes = result.filesWritten.includes(GITATTRIBUTES);
|
|
3043
|
+
const headline = result.dryRun ? `\u2713 twin-build init dry-run for ${result.projectName} (no files written)` : `\u2713 twin-build initialised in ${result.projectName}`;
|
|
3042
3044
|
const lines = [
|
|
3043
|
-
|
|
3045
|
+
headline,
|
|
3044
3046
|
"",
|
|
3045
|
-
"Files written:",
|
|
3047
|
+
result.dryRun ? "Would write:" : "Files written:",
|
|
3046
3048
|
...result.filesWritten.map((f) => ` - ${f}`),
|
|
3047
3049
|
"",
|
|
3048
3050
|
"Next steps:",
|
|
@@ -5473,7 +5475,7 @@ program.command("status").description("Show dispatcher and worker session status
|
|
|
5473
5475
|
}
|
|
5474
5476
|
process.exit(0);
|
|
5475
5477
|
});
|
|
5476
|
-
program.command("init").description("Initialize twin-build in this project").option("--name <name>", "project name (default: basename of cwd)").option("--plugin-version <version>", "pin Plugin version", "0.1.0-prerelease.1").option("--cli-version <version>", "pin CLI version", "1.0.0-prerelease.1").option("--rules-schema-version <version>", "pin rules schema version", "1.0.0").option("--mcp-tool-schema-version <version>", "pin MCP tool schema version").option("--link-strategy <strategy>", "symlink | copy (default: auto)").option("--marketplace-path <path>", "absolute path of marketplace clone (for extraKnownMarketplaces)").option("--dry-run", "print what would be written without touching files").action(async (options) => {
|
|
5478
|
+
program.command("init").description("Initialize twin-build in this project").option("--name <name>", "project name (default: basename of cwd)").option("--plugin-version <version>", "pin Plugin version", "0.1.0-prerelease.1").option("--cli-version <version>", "pin CLI version", "1.0.0-prerelease.1").option("--rules-schema-version <version>", "pin rules schema version", "1.0.0").option("--mcp-tool-schema-version <version>", "pin MCP tool schema version").option("--link-strategy <strategy>", "symlink | copy (default: auto)").option("--marketplace-path <path>", "absolute path of marketplace clone (for extraKnownMarketplaces)").option("--ci", "CI / non-interactive mode: also emit a .devcontainer/ template (P3-F)").option("--dry-run", "print what would be written without touching files").action(async (options) => {
|
|
5477
5479
|
try {
|
|
5478
5480
|
const result = await runInit({
|
|
5479
5481
|
repoRoot: process.cwd(),
|
|
@@ -5484,6 +5486,7 @@ program.command("init").description("Initialize twin-build in this project").opt
|
|
|
5484
5486
|
mcpToolSchemaVersion: options.mcpToolSchemaVersion,
|
|
5485
5487
|
linkStrategy: options.linkStrategy,
|
|
5486
5488
|
marketplacePath: options.marketplacePath,
|
|
5489
|
+
ci: Boolean(options.ci),
|
|
5487
5490
|
dryRun: Boolean(options.dryRun)
|
|
5488
5491
|
});
|
|
5489
5492
|
console.log(renderInitNextSteps(result));
|