projectops 4.104.6 → 4.104.8
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/README.md +1 -1
- package/bin/projectops.js +4 -4
- package/package.json +1 -1
- package/src/cli/args.js +43 -43
- package/src/cli/errors.js +8 -8
- package/src/cli/help.js +4 -4
- package/src/commands/doctor.js +39 -39
- package/src/commands/full.js +29 -29
- package/src/commands/interactive.js +86 -86
- package/src/commands/issues.js +5 -5
- package/src/commands/skills.js +13 -13
- package/src/commands/version.js +8 -8
- package/src/commands/workflows.js +23 -22
- package/src/context.js +24 -24
- package/src/core/agent-guide.js +5 -5
- package/src/core/assets.js +11 -11
- package/src/core/baseline.js +24 -24
- package/src/core/branch-sub.js +23 -23
- package/src/core/breaking-check.js +21 -21
- package/src/core/breaking.js +6 -6
- package/src/core/ci-minutes-sub.js +13 -13
- package/src/core/constants.js +17 -17
- package/src/core/copy/coderabbit.js +10 -10
- package/src/core/copy/gitignore.js +9 -9
- package/src/core/copy/readme.js +7 -7
- package/src/core/copy/simple.js +35 -35
- package/src/core/copy/util.js +9 -9
- package/src/core/copy/workflows.js +99 -99
- package/src/core/detect-fs.js +21 -21
- package/src/core/detect.js +12 -12
- package/src/core/development-branch.js +11 -11
- package/src/core/exclusions.js +12 -12
- package/src/core/fsutil.js +9 -9
- package/src/core/git-branch.js +11 -11
- package/src/core/ide/adapter.js +23 -23
- package/src/core/ide/adapters/claude.js +12 -12
- package/src/core/ide/adapters/codex.js +4 -4
- package/src/core/ide/adapters/copilot.js +12 -12
- package/src/core/ide/adapters/cursor.js +7 -7
- package/src/core/ide/adapters/gemini.js +5 -5
- package/src/core/ide/adapters/pi-common.js +12 -12
- package/src/core/ide/adapters/pi-harness.js +7 -7
- package/src/core/ide/adapters/pi.js +3 -3
- package/src/core/ide/home-skills.js +6 -6
- package/src/core/ide/legacy.js +8 -8
- package/src/core/ide/registry.js +6 -6
- package/src/core/ide/runner.js +15 -15
- package/src/core/ide/skills-copy.js +34 -34
- package/src/core/ide/stable-entry.js +11 -11
- package/src/core/ide/util.js +4 -4
- package/src/core/incoming.js +13 -13
- package/src/core/label-style.js +12 -12
- package/src/core/migration-guide.js +19 -19
- package/src/core/migrations/index.js +16 -16
- package/src/core/migrations/registry.js +39 -39
- package/src/core/migrations/rules/legacy-dirs.js +6 -6
- package/src/core/migrations/rules/obsolete-workflows.js +4 -4
- package/src/core/migrations/rules/root-files.js +3 -3
- package/src/core/migrations/rules/settings-extractors.js +8 -8
- package/src/core/options-ask.js +104 -104
- package/src/core/options-schema.js +23 -23
- package/src/core/orphan-workflows.js +14 -14
- package/src/core/paths-resolve.js +54 -54
- package/src/core/paths.js +2 -2
- package/src/core/placeholder-triggers.js +10 -10
- package/src/core/repo-language.js +10 -10
- package/src/core/resolve-options.js +30 -30
- package/src/core/run-trace.js +54 -54
- package/src/core/store-locales-hint.js +13 -13
- package/src/core/verify.js +27 -27
- package/src/core/version-yml.js +117 -116
- package/src/core/wizard-env.js +42 -42
- package/src/core/wizard-labels.js +31 -31
- package/src/core/workflow-groups.js +14 -14
- package/src/i18n/core.en.js +1 -1
- package/src/i18n/doctor.en.js +1 -1
- package/src/i18n/ide.en.js +1 -1
- package/src/i18n/migrate.en.js +1 -1
- package/src/i18n/options.en.js +1 -1
- package/src/index.js +60 -60
- package/src/ui/ansi.js +5 -5
- package/src/ui/env-plan.js +44 -44
- package/src/ui/prompts.js +21 -21
- package/src/ui/readline-engine.js +38 -38
- package/src/ui/skills-prompts.js +4 -4
package/src/core/wizard-env.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
// @wizard env
|
|
2
|
-
// ⚠️ YAML
|
|
1
|
+
// @wizard env token engine: value substitution, leftover token substitution, unchanged check.
|
|
2
|
+
// ⚠️ No YAML parse/re-serialize — line-based string handling (keeping format and comments is a premise of the unchanged check).
|
|
3
3
|
import { substituteBranches } from "./branch-sub.js";
|
|
4
4
|
|
|
5
|
-
// KEY
|
|
5
|
+
// KEY regex: [A-Z_]+ (uppercase and underscore only). Only lines with an ask/auto marker.
|
|
6
6
|
const MARKER_RE = /#\s*@wizard\s+(ask|auto):(.*)$/;
|
|
7
7
|
const KEY_RE = /^(\s*)([A-Z_]+):/;
|
|
8
8
|
const PATHS_ANCHOR_RE = /#\s*@wizard\s+paths-anchor/;
|
|
9
9
|
|
|
10
|
-
//
|
|
10
|
+
// Parse one line and return {indent,key,action,arg}. null without an ask/auto marker.
|
|
11
11
|
export function parseWizardLine(line) {
|
|
12
12
|
const marker = line.match(MARKER_RE);
|
|
13
13
|
if (!marker) return null;
|
|
14
14
|
const km = line.match(KEY_RE);
|
|
15
|
-
if (!km) return null; // KEY:
|
|
15
|
+
if (!km) return null; // Ignore anything not in KEY: form (e.g. the paths-anchor comment)
|
|
16
16
|
return { indent: km[1], key: km[2], action: marker[1], arg: marker[2].trim() };
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
// `KEY: "..."`
|
|
20
|
-
//
|
|
19
|
+
// Replace the quoted value in `KEY: "..."` + drop the trailing `# @wizard ...` comment on that line.
|
|
20
|
+
// Works on a single line. Skips substitution when value is an empty string.
|
|
21
21
|
export function setEnvLine(line, key, value) {
|
|
22
22
|
if (value === "" || value == null) return line;
|
|
23
|
-
// CRLF
|
|
23
|
+
// CRLF safe: split off the trailing \r, process, then restore (for autocrlf projects)
|
|
24
24
|
const cr = line.endsWith("\r") ? "\r" : "";
|
|
25
25
|
const body = cr ? line.slice(0, -1) : line;
|
|
26
|
-
//
|
|
26
|
+
// Value substitution: KEY: "old" → KEY: "value"
|
|
27
27
|
let out = body.replace(
|
|
28
28
|
new RegExp(`^(\\s*${key}:\\s*")[^"]*(")`),
|
|
29
29
|
(_m, p1, p2) => `${p1}${value}${p2}`,
|
|
30
30
|
);
|
|
31
|
-
//
|
|
31
|
+
// Drop the trailing # @wizard ... comment on that line (including the leading space)
|
|
32
32
|
out = out.replace(/(\S)[^\S\r\n]*#[^\S\r\n]*@wizard[^\S\r\n].*$/, "$1");
|
|
33
33
|
return out + cr;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
//
|
|
36
|
+
// Extract real env values from the installed copy (#502 — update mode carryover).
|
|
37
|
+
// Substitution drops the @wizard comment but keeps the `KEY: "value"` line (setEnvLine) — collect that value.
|
|
38
|
+
// No template knowledge needed: substituteEnv looks up values only for ask keys, so unrelated keys are harmless.
|
|
39
|
+
// Empty values ("") are excluded — substituteEnv also ignores an empty choice and uses the default (same rule).
|
|
40
40
|
export function extractEnvValues(installedContent) {
|
|
41
41
|
const values = new Map();
|
|
42
42
|
for (const raw of String(installedContent || "").split(/\r?\n/)) {
|
|
@@ -46,47 +46,47 @@ export function extractEnvValues(installedContent) {
|
|
|
46
46
|
return values;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
//
|
|
49
|
+
// Sample defaults (#810) — deployed as is, requests would go to someone else's domain.
|
|
50
|
+
// On paths where the user picked no value (--force, defaults), leave __KEY__ unfilled.
|
|
51
|
+
// Post-install verification (verify.js) then flags it as unreplaced and the finish screen shows it as "fill in yourself".
|
|
52
52
|
export function isPlaceholderDefault(value) {
|
|
53
53
|
return /(^|\.)example\.(com|org|net)$/i.test(String(value || "").trim());
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
// resolver —
|
|
56
|
+
// resolver — value computation is delegated to injected resolvers (keeps it pure).
|
|
57
57
|
// resolvers: { repo, "spring-app-yml-dir"(type), "spring-app-yml-path"(type), "flutter-root" }
|
|
58
58
|
export function resolveToken(name, type, resolvers = {}) {
|
|
59
59
|
const fn = resolvers[name];
|
|
60
60
|
return typeof fn === "function" ? (fn(type) ?? "") : "";
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
//
|
|
64
|
-
//
|
|
63
|
+
// Leftover global token substitution — the file body, collected values (#489) and card display all use this rule.
|
|
64
|
+
// The single point that keeps values written to files and the version.yml deploy block memory in sync.
|
|
65
65
|
export function resolveGlobalTokens(s, repoName = "") {
|
|
66
66
|
if (typeof s !== "string" || (!s.includes("__PROJECT_NAME__") && !s.includes("__APP_ARTIFACT_NAME__"))) return s;
|
|
67
67
|
return s.replaceAll("__PROJECT_NAME__", repoName).replaceAll("__APP_ARTIFACT_NAME__", repoName);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
//
|
|
71
|
-
// content:
|
|
70
|
+
// Whole-file substitution.
|
|
71
|
+
// content: original workflow text. Returns: substituted text.
|
|
72
72
|
// opts:
|
|
73
|
-
// type -
|
|
74
|
-
// values - Map<key,value>:
|
|
75
|
-
// useDefaults - true
|
|
76
|
-
// resolvers - resolveToken
|
|
77
|
-
// repoName - __PROJECT_NAME__/__APP_ARTIFACT_NAME__
|
|
78
|
-
// projectPath - paths-anchor
|
|
79
|
-
// collectSubs -
|
|
73
|
+
// type - project type (for resolvers and value lookup)
|
|
74
|
+
// values - Map<key,value>: user choices for ask keys (default = arg or resolver when missing)
|
|
75
|
+
// useDefaults - when true, ask keys also use defaults (WF_USE_DEFAULTS=true, the premise of the unchanged comparison)
|
|
76
|
+
// resolvers - for resolveToken
|
|
77
|
+
// repoName - value for __PROJECT_NAME__/__APP_ARTIFACT_NAME__
|
|
78
|
+
// projectPath - for paths-anchor substitution ('.' leaves the anchor unchanged)
|
|
79
|
+
// collectSubs - if an array, push {key, action, before, after} per substitution (for the #494 trace)
|
|
80
80
|
export function substituteEnv(content, opts = {}) {
|
|
81
81
|
const { type = "", values = new Map(), useDefaults = true, resolvers = {}, repoName = "", projectPath = ".", collectAsks = null, collectSubs = null } = opts;
|
|
82
82
|
if (!content.includes("@wizard")) return content;
|
|
83
83
|
|
|
84
|
-
// CRLF
|
|
85
|
-
// (JS
|
|
84
|
+
// CRLF safe: split off EOLs, parse and substitute on LF, then restore the original EOL style.
|
|
85
|
+
// (A JS regex `.` does not match \r, so `(.*)$` marker parsing fails on CRLF.)
|
|
86
86
|
const usesCRLF = content.includes("\r\n");
|
|
87
87
|
const lines = content.split(/\r?\n/);
|
|
88
88
|
for (let i = 0; i < lines.length; i++) {
|
|
89
|
-
const p = parseWizardLine(lines[i]); //
|
|
89
|
+
const p = parseWizardLine(lines[i]); // Line already stripped of \r
|
|
90
90
|
if (!p) continue;
|
|
91
91
|
let val = "";
|
|
92
92
|
if (p.action === "auto") {
|
|
@@ -95,14 +95,14 @@ export function substituteEnv(content, opts = {}) {
|
|
|
95
95
|
let def = p.arg.startsWith("@") ? resolveToken(p.arg.slice(1), type, resolvers) : p.arg;
|
|
96
96
|
const chosen = values.get(p.key);
|
|
97
97
|
if (chosen != null && chosen !== "" && !useDefaults) val = chosen;
|
|
98
|
-
else if (isPlaceholderDefault(def)) continue; //
|
|
98
|
+
else if (isPlaceholderDefault(def)) continue; // Sample values are not written — token and marker stay (#810)
|
|
99
99
|
else val = def;
|
|
100
|
-
// ask
|
|
101
|
-
// #489 —
|
|
102
|
-
// version.yml deploy
|
|
100
|
+
// Collect ask keys only (auto is not saved). For the deploy block.
|
|
101
|
+
// #489 — the file body goes through the global token substitution below, so collected values get the same substitution
|
|
102
|
+
// to keep the version.yml deploy block byte-identical to the installed copy.
|
|
103
103
|
if (collectAsks) collectAsks.set(p.key, resolveGlobalTokens(val, repoName));
|
|
104
104
|
}
|
|
105
|
-
// #494
|
|
105
|
+
// #494 trace — record before/after values (after resolves global tokens too, matching the final file)
|
|
106
106
|
if (Array.isArray(collectSubs) && val !== "" && val != null) {
|
|
107
107
|
const before = (lines[i].match(/:\s*"([^"]*)"/) || [])[1] ?? "";
|
|
108
108
|
collectSubs.push({ key: p.key, action: p.action, before, after: resolveGlobalTokens(val, repoName) });
|
|
@@ -111,10 +111,10 @@ export function substituteEnv(content, opts = {}) {
|
|
|
111
111
|
}
|
|
112
112
|
let out = lines.join(usesCRLF ? "\r\n" : "\n");
|
|
113
113
|
|
|
114
|
-
//
|
|
114
|
+
// Leftover global tokens
|
|
115
115
|
out = resolveGlobalTokens(out, repoName);
|
|
116
116
|
|
|
117
|
-
// paths-anchor:
|
|
117
|
+
// paths-anchor: when the path is not '.', replace the whole comment line with a paths line
|
|
118
118
|
if (PATHS_ANCHOR_RE.test(out) && projectPath && projectPath !== ".") {
|
|
119
119
|
const eol = out.includes("\r\n") ? "\r\n" : "\n";
|
|
120
120
|
out = out.split(/\r?\n/).map((line) => {
|
|
@@ -128,10 +128,10 @@ export function substituteEnv(content, opts = {}) {
|
|
|
128
128
|
return out;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
//
|
|
131
|
+
// Unchanged check: byte-compare the installed copy with the original "virtually substituted with defaults".
|
|
132
132
|
export function isUnchanged(templateContent, installedContent, opts = {}) {
|
|
133
|
-
//
|
|
134
|
-
//
|
|
133
|
+
// Branch substitution (#477) is part of the virtual comparison — otherwise substituted installs are misjudged as "changed" and
|
|
134
|
+
// recopied on every update (.bak churn). No-op when opts.branches is unset or standard.
|
|
135
135
|
const virtual = substituteBranches(
|
|
136
136
|
substituteEnv(templateContent, { ...opts, useDefaults: true }),
|
|
137
137
|
opts.branches ?? null, opts.filename ?? "",
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
// wizard-prompts.yml
|
|
2
|
-
// ⚠️ YAML
|
|
1
|
+
// wizard-prompts.yml label metadata parser: file location, field lookup, workflow display names.
|
|
2
|
+
// ⚠️ No YAML library — line-based parsing only (zero external dependencies + format tolerance).
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import * as nodeFs from "node:fs";
|
|
5
5
|
import { PATHS } from "./paths.js";
|
|
6
6
|
import { getLang } from "../i18n/index.js";
|
|
7
7
|
|
|
8
|
-
// wizard-prompts.yml
|
|
8
|
+
// wizard-prompts.yml location (relative to the repo root)
|
|
9
9
|
export const LABELS_FILE = ".github/config/wizard-prompts.yml";
|
|
10
10
|
|
|
11
|
-
//
|
|
11
|
+
// Strip surrounding quotes and trim ("value" → value).
|
|
12
12
|
function unquote(s) {
|
|
13
13
|
const t = s.trim();
|
|
14
14
|
if (t.startsWith('"') && t.endsWith('"') && t.length >= 2) return t.slice(1, -1);
|
|
15
15
|
return t;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
// wizard-prompts.yml
|
|
19
|
-
//
|
|
20
|
-
// workflowNamesByLang: Map
|
|
21
|
-
// -
|
|
22
|
-
// -
|
|
23
|
-
// -
|
|
18
|
+
// wizard-prompts.yml text → parsed object (pure function — tests can use it directly).
|
|
19
|
+
// Returns { fields: Map<lookup key, {label?,help?,example?,label_ko?...}>, workflowNames: [{key,value}],
|
|
20
|
+
// workflowNamesByLang: Map<language, [{key,value}]> }
|
|
21
|
+
// - lookup key: "PROJECT_NAME" or "flutter.APP_ARTIFACT_NAME" (dotted type override)
|
|
22
|
+
// - per-language text (#976): label/help/example = English original, label_ko etc. = translation. _workflow_names_ko = translation block
|
|
23
|
+
// - old one-line form (KEY: "label") is absorbed as the label in fields (label only)
|
|
24
24
|
export function parseWizardPrompts(text) {
|
|
25
25
|
const fields = new Map();
|
|
26
26
|
const workflowNames = [];
|
|
27
27
|
const workflowNamesByLang = new Map();
|
|
28
|
-
let current = null; //
|
|
29
|
-
let currentWfNames = null; // _workflow_names(
|
|
28
|
+
let current = null; // fields entry of the current block (owner of indented lines)
|
|
29
|
+
let currentWfNames = null; // the list when inside a _workflow_names(_lang) block
|
|
30
30
|
|
|
31
31
|
for (const raw of String(text).split(/\r?\n/)) {
|
|
32
32
|
const line = raw.replace(/\r$/, "");
|
|
33
|
-
if (!line.trim() || line.trim().startsWith("#")) continue; //
|
|
33
|
+
if (!line.trim() || line.trim().startsWith("#")) continue; // Blank lines and comments do not end a block
|
|
34
34
|
|
|
35
35
|
if (!/^\s/.test(line)) {
|
|
36
|
-
//
|
|
36
|
+
// Top-level key line — ends the previous block
|
|
37
37
|
current = null; currentWfNames = null;
|
|
38
38
|
const m = line.match(/^([A-Za-z_][A-Za-z0-9_.\-]*):(.*)$/);
|
|
39
39
|
if (!m) continue;
|
|
@@ -51,7 +51,7 @@ export function parseWizardPrompts(text) {
|
|
|
51
51
|
}
|
|
52
52
|
const entry = fields.get(key) || {};
|
|
53
53
|
if (rest) {
|
|
54
|
-
//
|
|
54
|
+
// Old one-line form: KEY: "label" (used only as label)
|
|
55
55
|
const q = rest.match(/^"([^"]*)"\s*$/);
|
|
56
56
|
if (q) entry.label = q[1];
|
|
57
57
|
}
|
|
@@ -60,29 +60,29 @@ export function parseWizardPrompts(text) {
|
|
|
60
60
|
continue;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
//
|
|
63
|
+
// Indented line — belongs to the current block
|
|
64
64
|
const m = line.match(/^\s+([A-Za-z_][A-Za-z0-9_.\-]*):\s*(.*)$/);
|
|
65
65
|
if (!m) continue;
|
|
66
66
|
if (currentWfNames) {
|
|
67
|
-
// " KEY: "
|
|
67
|
+
// Only the " KEY: "value"" form is accepted
|
|
68
68
|
const q = m[2].match(/^"(.*)"\s*$/);
|
|
69
69
|
if (q) currentWfNames.push({ key: m[1], value: q[1] });
|
|
70
70
|
continue;
|
|
71
71
|
}
|
|
72
|
-
//
|
|
72
|
+
// Field name: label | help | example; translations use a _lang suffix (label_ko)
|
|
73
73
|
if (current && /^(label|help|example)(_[a-z]{2}(-[A-Z]{2})?)?$/.test(m[1])) {
|
|
74
|
-
//
|
|
74
|
+
// Take only the first occurrence in a block
|
|
75
75
|
if (current[m[1]] == null) current[m[1]] = unquote(m[2]);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
return { fields, workflowNames, workflowNamesByLang };
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
// wizard-prompts.yml
|
|
82
|
-
//
|
|
83
|
-
// WHY
|
|
84
|
-
//
|
|
85
|
-
// fs
|
|
81
|
+
// Find, read and parse wizard-prompts.yml.
|
|
82
|
+
// Priority: target project (targetRoot) → downloaded original (tempDir) fallback → null.
|
|
83
|
+
// WHY fallback: in a new integration, copy_config_folder runs after configure_workflow_env, so the
|
|
84
|
+
// target has no file yet — without the fallback, label/help/example are all empty (only KEY names shown).
|
|
85
|
+
// fs can be injected (for tests) — default node:fs.
|
|
86
86
|
export function loadWizardPrompts(targetRoot = ".", tempDir = "", fs = nodeFs) {
|
|
87
87
|
const candidates = [join(targetRoot, LABELS_FILE)];
|
|
88
88
|
if (tempDir) candidates.push(join(tempDir, LABELS_FILE));
|
|
@@ -92,9 +92,9 @@ export function loadWizardPrompts(targetRoot = ".", tempDir = "", fs = nodeFs) {
|
|
|
92
92
|
return null;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
//
|
|
96
|
-
//
|
|
97
|
-
//
|
|
95
|
+
// Field lookup. field: "label" | "help" | "example", lang: screen language (default: current CLI language)
|
|
96
|
+
// Priority: "{type}.KEY" block → "KEY" block (including the old one-line form) → fallback (KEY name for label, else "").
|
|
97
|
+
// Per block, translation (label_ko) first, else the English original (label)
|
|
98
98
|
export function wfField(prompts, type, key, field, lang = getLang()) {
|
|
99
99
|
if (prompts && prompts.fields) {
|
|
100
100
|
for (const q of [`${type}.${key}`, key]) {
|
|
@@ -108,11 +108,11 @@ export function wfField(prompts, type, key, field, lang = getLang()) {
|
|
|
108
108
|
return field === "label" ? key : "";
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
//
|
|
112
|
-
// _workflow_names
|
|
113
|
-
//
|
|
111
|
+
// Workflow file name → short human-readable name.
|
|
112
|
+
// Use the _workflow_names value whose "key is contained in the file name" — longest key first (tells REACT-CI from REACT-CICD).
|
|
113
|
+
// If none match, strip only the .yaml/.yml extension. If the language translation block (_workflow_names_ko) has the key, use that value
|
|
114
114
|
export function workflowDisplayName(prompts, filename, lang = getLang()) {
|
|
115
|
-
const base = String(filename).split("/").pop().split("\\").pop(); //
|
|
115
|
+
const base = String(filename).split("/").pop().split("\\").pop(); // Strip the path
|
|
116
116
|
const translated = new Map((prompts?.workflowNamesByLang?.get(lang) ?? []).map(({ key, value }) => [key, value]));
|
|
117
117
|
let best = null; let bestLen = 0;
|
|
118
118
|
for (const { key, value } of prompts?.workflowNames ?? []) {
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
//
|
|
1
|
+
// The single place that decides whether optional workflow groups are on or off (#851).
|
|
2
2
|
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
3
|
+
// Copy (copy/workflows.js), the conflict list (listWorkflowConflicts) and orphan detection (orphan-workflows.js) share these conditions.
|
|
4
|
+
// Keeping separate copies means fixing only one, giving "turned on but not installed" or "turned off but still runs" (#567).
|
|
5
|
+
// Add one line here for each new conditional folder. All three places follow.
|
|
6
6
|
import { readdirSync } from "node:fs";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
import { exists } from "./fsutil.js";
|
|
9
9
|
|
|
10
|
-
//
|
|
10
|
+
// Server deploy (<type>/server-deploy/) is installed only for docker-ssh (#439)
|
|
11
11
|
export const SERVER_DEPLOY_DIR = "server-deploy";
|
|
12
12
|
export function serverDeployEnabled(deployTarget) {
|
|
13
13
|
return (deployTarget || "docker-ssh") === "docker-ssh";
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
//
|
|
17
|
-
// policy: "bak-replace" —
|
|
18
|
-
// "new-only" —
|
|
19
|
-
// copyLabel / orphanLabel — trace
|
|
16
|
+
// Optional folders under common/. Order is copy order (do not change the order shown in logs and summaries).
|
|
17
|
+
// policy: "bak-replace" — if different from the template, keep a .bak and replace
|
|
18
|
+
// "new-only" — leave alone if it already exists (secret-backup: users edit the server path)
|
|
19
|
+
// copyLabel / orphanLabel — trace group name and orphan notice name. Keep them as in existing logs.
|
|
20
20
|
export function commonOptionalGroups(commonDir, opts = {}) {
|
|
21
21
|
const { includeSecretBackup = false, aiPrSummary = true, projectsSync = true, deployTarget = "docker-ssh" } = opts;
|
|
22
22
|
const selectedDeploy = deployTarget || "docker-ssh";
|
|
23
23
|
const groups = [];
|
|
24
24
|
|
|
25
|
-
// deploy/<target> —
|
|
25
|
+
// deploy/<target> — type-independent deploy targets (vercel, etc.). Only the chosen target folder is on.
|
|
26
26
|
const deployRoot = join(commonDir, "deploy");
|
|
27
27
|
const deployNames = exists(deployRoot)
|
|
28
28
|
? readdirSync(deployRoot, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name)
|
|
29
29
|
: [];
|
|
30
|
-
if (!deployNames.includes(selectedDeploy)) deployNames.push(selectedDeploy); //
|
|
30
|
+
if (!deployNames.includes(selectedDeploy)) deployNames.push(selectedDeploy); // A missing folder is filtered out below by exists
|
|
31
31
|
for (const name of deployNames) {
|
|
32
32
|
groups.push({ dir: join("deploy", name), enabled: name === selectedDeploy, policy: "bak-replace",
|
|
33
33
|
copyLabel: "common-deploy", orphanLabel: `deploy/${name}` });
|
|
34
34
|
}
|
|
35
35
|
groups.push(
|
|
36
|
-
// #566 — AI
|
|
36
|
+
// #566 — AI change summary. Works with no setup
|
|
37
37
|
{ dir: "pr-summary", enabled: aiPrSummary === true, policy: "bak-replace", copyLabel: "pr-summary", orphanLabel: "pr-summary" },
|
|
38
|
-
// #716 — Projects
|
|
38
|
+
// #716 — Projects board sync. Needs secrets and variables, so off by default for new installs
|
|
39
39
|
{ dir: "projects-sync", enabled: projectsSync === true, policy: "bak-replace", copyLabel: "projects-sync", orphanLabel: "projects-sync" },
|
|
40
|
-
// Secret
|
|
40
|
+
// Secret server backup
|
|
41
41
|
{ dir: "secret-backup", enabled: includeSecretBackup === true, policy: "new-only", copyLabel: "secret-backup", orphanLabel: "secret-backup" },
|
|
42
42
|
);
|
|
43
43
|
return groups;
|
package/src/i18n/core.en.js
CHANGED
package/src/i18n/doctor.en.js
CHANGED
package/src/i18n/ide.en.js
CHANGED
package/src/i18n/migrate.en.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// migrate
|
|
1
|
+
// migrate area messages (en). Keys use the <area>.<meaning> format.
|
|
2
2
|
export default {
|
|
3
3
|
"migrate.reason.gen1VersionControl": "1st-gen rename: running both bumps the version twice",
|
|
4
4
|
"migrate.reason.releasePublish1": "removed from the template; its trunk-based branch calls a command that no longer exists (changelog_manager.py ai-summary) and fails at release time",
|
package/src/i18n/options.en.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// options
|
|
1
|
+
// options area messages (en). Keys use the <area>.<meaning> format.
|
|
2
2
|
export default {
|
|
3
3
|
"options.branch.remoteOnly": "Branch '{branch}' exists on the remote but not locally. Run 'git switch {branch}' if you need it.",
|
|
4
4
|
"options.branch.missing": "Development (release source) branch '{branch}' does not exist. It is required for releases ({branch} to {base} PR) to work.",
|