envshed 0.22.0 → 0.24.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/api.d.ts +10 -4
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +34 -82
- package/dist/api.js.map +1 -1
- package/dist/api.test.d.ts +2 -0
- package/dist/api.test.d.ts.map +1 -0
- package/dist/api.test.js +23 -0
- package/dist/api.test.js.map +1 -0
- package/dist/commands/agent.test.js +1 -0
- package/dist/commands/agent.test.js.map +1 -1
- package/dist/commands/branch.d.ts.map +1 -1
- package/dist/commands/branch.js +24 -45
- package/dist/commands/branch.js.map +1 -1
- package/dist/commands/branch.test.js +13 -80
- package/dist/commands/branch.test.js.map +1 -1
- package/dist/commands/completions.d.ts.map +1 -1
- package/dist/commands/completions.js +18 -7
- package/dist/commands/completions.js.map +1 -1
- package/dist/commands/definition.js +1 -1
- package/dist/commands/definition.js.map +1 -1
- package/dist/commands/env-selection.test.d.ts +2 -0
- package/dist/commands/env-selection.test.d.ts.map +1 -0
- package/dist/commands/env-selection.test.js +68 -0
- package/dist/commands/env-selection.test.js.map +1 -0
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +44 -3
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/env.test.js +6 -6
- package/dist/commands/env.test.js.map +1 -1
- package/dist/commands/import.d.ts.map +1 -1
- package/dist/commands/import.js +4 -41
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/import.test.js +9 -0
- package/dist/commands/import.test.js.map +1 -1
- package/dist/commands/init.d.ts +16 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +254 -326
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/init.test.js +225 -115
- package/dist/commands/init.test.js.map +1 -1
- package/dist/commands/login.d.ts +9 -0
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +56 -7
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/login.test.js +47 -4
- package/dist/commands/login.test.js.map +1 -1
- package/dist/commands/pull.js +1 -1
- package/dist/commands/pull.js.map +1 -1
- package/dist/commands/push.js +5 -5
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +3 -10
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/run.test.js +3 -3
- package/dist/commands/run.test.js.map +1 -1
- package/dist/commands/setup.process.test.d.ts +2 -0
- package/dist/commands/setup.process.test.d.ts.map +1 -0
- package/dist/commands/setup.process.test.js +116 -0
- package/dist/commands/setup.process.test.js.map +1 -0
- package/dist/commands/share.d.ts.map +1 -1
- package/dist/commands/share.js +2 -0
- package/dist/commands/share.js.map +1 -1
- package/dist/config.d.ts +49 -12
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +134 -45
- package/dist/config.js.map +1 -1
- package/dist/config.test.js +22 -0
- package/dist/config.test.js.map +1 -1
- package/dist/context-resolution.test.d.ts +2 -0
- package/dist/context-resolution.test.d.ts.map +1 -0
- package/dist/context-resolution.test.js +89 -0
- package/dist/context-resolution.test.js.map +1 -0
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/context-store.d.ts +15 -0
- package/dist/lib/context-store.d.ts.map +1 -0
- package/dist/lib/context-store.js +69 -0
- package/dist/lib/context-store.js.map +1 -0
- package/dist/lib/init-import.d.ts +74 -0
- package/dist/lib/init-import.d.ts.map +1 -0
- package/dist/lib/init-import.js +441 -0
- package/dist/lib/init-import.js.map +1 -0
- package/dist/lib/init-import.test.d.ts +2 -0
- package/dist/lib/init-import.test.d.ts.map +1 -0
- package/dist/lib/init-import.test.js +228 -0
- package/dist/lib/init-import.test.js.map +1 -0
- package/dist/lib/secret-push.d.ts +30 -0
- package/dist/lib/secret-push.d.ts.map +1 -0
- package/dist/lib/secret-push.js +67 -0
- package/dist/lib/secret-push.js.map +1 -0
- package/dist/lib/setup-discovery.d.ts +19 -0
- package/dist/lib/setup-discovery.d.ts.map +1 -0
- package/dist/lib/setup-discovery.js +101 -0
- package/dist/lib/setup-discovery.js.map +1 -0
- package/dist/lib/setup-discovery.test.d.ts +2 -0
- package/dist/lib/setup-discovery.test.d.ts.map +1 -0
- package/dist/lib/setup-discovery.test.js +39 -0
- package/dist/lib/setup-discovery.test.js.map +1 -0
- package/dist/lib/setup-guide.d.ts +15 -0
- package/dist/lib/setup-guide.d.ts.map +1 -0
- package/dist/lib/setup-guide.js +90 -0
- package/dist/lib/setup-guide.js.map +1 -0
- package/dist/lib/setup-guide.test.d.ts +2 -0
- package/dist/lib/setup-guide.test.d.ts.map +1 -0
- package/dist/lib/setup-guide.test.js +29 -0
- package/dist/lib/setup-guide.test.js.map +1 -0
- package/dist/lib/setup-plan.d.ts +23 -0
- package/dist/lib/setup-plan.d.ts.map +1 -0
- package/dist/lib/setup-plan.js +96 -0
- package/dist/lib/setup-plan.js.map +1 -0
- package/dist/locales/en.json +170 -12
- package/dist/locales/es.json +170 -12
- package/dist/locales/pt-BR.json +170 -12
- package/dist/personal-connection.test.d.ts +2 -0
- package/dist/personal-connection.test.d.ts.map +1 -0
- package/dist/personal-connection.test.js +103 -0
- package/dist/personal-connection.test.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import inquirer from "inquirer";
|
|
5
|
+
import open from "open";
|
|
6
|
+
import { apiGet, readJson as readApiJson } from "../api.js";
|
|
7
|
+
import { getApiUrl } from "../config.js";
|
|
8
|
+
import { t } from "../i18n.js";
|
|
9
|
+
import { startCommand, planSpawn, spawnErrorExitCode } from "./command-spawn.js";
|
|
10
|
+
import { readJson } from "./setup-discovery.js";
|
|
11
|
+
async function confirm(message) {
|
|
12
|
+
return (await inquirer.prompt([{ type: "confirm", name: "confirmed", message, default: false }])).confirmed;
|
|
13
|
+
}
|
|
14
|
+
/** Preserve the original script under a new name and show only generated metadata. */
|
|
15
|
+
export function scriptIntegration(dir, script, manager) {
|
|
16
|
+
const file = path.join(dir, "package.json");
|
|
17
|
+
const original = fs.readFileSync(file, "utf8");
|
|
18
|
+
const pkg = readJson(file);
|
|
19
|
+
const savedName = `${script}:local`;
|
|
20
|
+
if (typeof pkg.scripts?.[script] !== "string" || pkg.scripts[script].includes("envshed") || pkg.scripts[savedName] !== undefined)
|
|
21
|
+
return null;
|
|
22
|
+
const version = readJson(fileURLToPath(new URL("../../package.json", import.meta.url))).version;
|
|
23
|
+
const command = `npx --yes envshed@${version} run -- ${manager} run ${savedName}`;
|
|
24
|
+
const next = { ...pkg, scripts: { ...pkg.scripts, [savedName]: pkg.scripts[script], [script]: command } };
|
|
25
|
+
return { file, original, command, savedName, content: JSON.stringify(next, null, 2) + "\n" };
|
|
26
|
+
}
|
|
27
|
+
export async function runFirstCommand(root, target, words) {
|
|
28
|
+
const cwd = path.resolve(root, target.app.path);
|
|
29
|
+
const entry = fileURLToPath(new URL(import.meta.url.endsWith(".ts") ? "../entry.ts" : "../entry.js", import.meta.url));
|
|
30
|
+
const args = [...process.execArgv, entry, "run", "-o", target.org, "-p", target.project, "-e", target.env, "--", ...words];
|
|
31
|
+
return new Promise((resolve, reject) => {
|
|
32
|
+
// Run the existing consumption path, so session scope, OIDC and output masking remain enforced.
|
|
33
|
+
const child = startCommand(planSpawn([process.execPath, ...args]), { cwd, stdio: "inherit", env: { ...process.env, INIT_CWD: cwd, npm_lifecycle_event: "" } });
|
|
34
|
+
const stop = () => { child.kill("SIGTERM"); };
|
|
35
|
+
process.on("SIGTERM", stop);
|
|
36
|
+
child.on("spawn", () => console.log(t("setup.processStarted")));
|
|
37
|
+
child.once("error", (err) => { process.removeListener("SIGTERM", stop); process.exitCode = spawnErrorExitCode(err); reject(new Error(t("setup.processFailed"))); });
|
|
38
|
+
child.once("close", (code, signal) => { process.removeListener("SIGTERM", stop); resolve({ code, signal }); });
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
export async function guideSetup(root, targets) {
|
|
42
|
+
for (const target of targets) {
|
|
43
|
+
const dir = path.resolve(root, target.app.path);
|
|
44
|
+
console.log(t("setup.guideTarget", { path: target.app.path, org: target.org, project: target.project, env: target.env }));
|
|
45
|
+
const { secrets } = await readApiJson(await apiGet(`/secrets/${target.org}/${target.project}/${target.env}`));
|
|
46
|
+
if (!Object.keys(secrets).length) {
|
|
47
|
+
const url = new URL(`/${target.org}/${target.project}`, getApiUrl()).href;
|
|
48
|
+
console.log(t("setup.addSecrets", { url }));
|
|
49
|
+
if (await confirm(t("setup.openDashboard"))) {
|
|
50
|
+
try {
|
|
51
|
+
await open(url);
|
|
52
|
+
}
|
|
53
|
+
catch { /* Printed URL remains available. */ }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const script = target.app.script;
|
|
57
|
+
// A personal connection changes no file of the repository, package.json included.
|
|
58
|
+
if (script && !target.personal && /^[a-zA-Z0-9:_-]+$/.test(script)) {
|
|
59
|
+
const integration = scriptIntegration(dir, script, target.app.manager);
|
|
60
|
+
if (integration) {
|
|
61
|
+
console.log(t("setup.scriptPreview", { script, saved: integration.savedName, command: integration.command }));
|
|
62
|
+
if (await confirm(t("setup.integrateScript"))) {
|
|
63
|
+
if (fs.readFileSync(integration.file, "utf8") !== integration.original)
|
|
64
|
+
throw new Error(t("setup.configChanged", { file: integration.file }));
|
|
65
|
+
fs.writeFileSync(integration.file, integration.content);
|
|
66
|
+
console.log(t("setup.scriptSaved"));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
// If the original script was wrapped, execute its preserved local name inside a single run.
|
|
71
|
+
const pkg = target.app.kind === "node" ? readJson(path.join(dir, "package.json")) : undefined;
|
|
72
|
+
const effectiveScript = script && typeof pkg?.scripts?.[`${script}:local`] === "string" && pkg.scripts[script]?.includes("envshed") ? `${script}:local` : script;
|
|
73
|
+
const words = effectiveScript ? [target.app.manager, "run", effectiveScript] : target.app.kind === "go" && target.app.suggested ? ["go", "run", "."] : target.app.kind === "rust" && target.app.suggested ? ["cargo", "run"] : undefined;
|
|
74
|
+
if (!words) {
|
|
75
|
+
console.log(t("setup.manualRun"));
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
console.log(t("setup.nextRun", { directory: dir, command: `npx envshed@latest run -o ${target.org} -p ${target.project} -e ${target.env} -- ${words.join(" ")}` }));
|
|
79
|
+
if (await confirm(t("setup.runNow"))) {
|
|
80
|
+
const { code, signal } = await runFirstCommand(root, target, words);
|
|
81
|
+
if (code !== 0 && !signal) {
|
|
82
|
+
process.exitCode = code ?? 1;
|
|
83
|
+
console.log(t("setup.processFailed"));
|
|
84
|
+
}
|
|
85
|
+
const worked = await confirm(t("setup.confirmWorking"));
|
|
86
|
+
console.log(t(worked ? "setup.workingConfirmed" : "setup.resumeGuide"));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=setup-guide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-guide.js","sourceRoot":"","sources":["../../src/lib/setup-guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEjF,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,KAAK,UAAU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
|
|
2
|
+
import os from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { it, expect, vi, beforeEach, afterEach } from "vitest";
|
|
5
|
+
vi.mock("../api.js", () => ({ apiGet: vi.fn(), apiPut: vi.fn(), readJson: (res) => res.json() }));
|
|
6
|
+
vi.mock("inquirer", () => ({ default: { prompt: vi.fn() } }));
|
|
7
|
+
vi.mock("../i18n.js", () => ({ t: (key, args) => `${key}:${JSON.stringify(args ?? {})}` }));
|
|
8
|
+
import { scriptIntegration } from "./setup-guide.js";
|
|
9
|
+
let dir;
|
|
10
|
+
beforeEach(() => { dir = fs.mkdtempSync(path.join(os.tmpdir(), "envshed-guide-")); vi.spyOn(console, "log").mockImplementation(() => { }); });
|
|
11
|
+
afterEach(() => { vi.restoreAllMocks(); fs.rmSync(dir, { recursive: true, force: true }); });
|
|
12
|
+
it("preserves the original script and pins an on-demand CLI without a global dependency", () => {
|
|
13
|
+
fs.writeFileSync(path.join(dir, "package.json"), JSON.stringify({ scripts: { dev: "node app.js", test: "vitest" } }));
|
|
14
|
+
const integration = scriptIntegration(dir, "dev", "pnpm");
|
|
15
|
+
const next = JSON.parse(integration.content);
|
|
16
|
+
expect(next.scripts["dev:local"]).toBe("node app.js");
|
|
17
|
+
expect(next.scripts.test).toBe("vitest");
|
|
18
|
+
// Pinned to the version being released, read the same way the guide reads it.
|
|
19
|
+
const { version } = JSON.parse(fs.readFileSync(new URL("../../package.json", import.meta.url), "utf8"));
|
|
20
|
+
expect(next.scripts.dev).toBe(`npx --yes envshed@${version} run -- pnpm run dev:local`);
|
|
21
|
+
expect(fs.readFileSync(integration.file, "utf8")).not.toContain("envshed");
|
|
22
|
+
});
|
|
23
|
+
it("does not overwrite a reserved local script or wrap an existing envshed command", () => {
|
|
24
|
+
fs.writeFileSync(path.join(dir, "package.json"), JSON.stringify({ scripts: { dev: "node app.js", "dev:local": "custom" } }));
|
|
25
|
+
expect(scriptIntegration(dir, "dev", "npm")).toBeNull();
|
|
26
|
+
fs.writeFileSync(path.join(dir, "package.json"), JSON.stringify({ scripts: { dev: "envshed run -- node app.js" } }));
|
|
27
|
+
expect(scriptIntegration(dir, "dev", "npm")).toBeNull();
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=setup-guide.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-guide.test.js","sourceRoot":"","sources":["../../src/lib/setup-guide.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC/D,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,GAAa,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;AAC5G,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;AAC9D,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAW,EAAE,IAAc,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC9G,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,IAAI,GAAW,CAAC;AAChB,UAAU,CAAC,GAAG,EAAE,GAA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AM,CAAC,CAAwB,CAAC;IAC/H,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,qBAAqB,OAAO,4BAA4B,CAAC,CAAC;IACxF,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;AAC7E,CAAC,CAAC,CAAC;AACH,EAAE,CAAC,gFAAgF,EAAE,GAAG,EAAE;IACxF,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;IAC7H,MAAM,CAAC,iBAAiB,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IACxD,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,4BAA4B,EAAE,EAAE,CAAC,CAAC,CAAC;IACrH,MAAM,CAAC,iBAAiB,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;AAC1D,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ProjectConfig } from "../config.js";
|
|
2
|
+
import { type LocalApplication } from "./setup-discovery.js";
|
|
3
|
+
export interface SetupTarget {
|
|
4
|
+
app: LocalApplication;
|
|
5
|
+
org: string;
|
|
6
|
+
project: string;
|
|
7
|
+
projectName: string;
|
|
8
|
+
createProject: boolean;
|
|
9
|
+
env: string;
|
|
10
|
+
createEnv: boolean;
|
|
11
|
+
configFile: string;
|
|
12
|
+
/** Folder workspace paths are relative to; the file's folder when absent. */
|
|
13
|
+
configBase?: string;
|
|
14
|
+
/** Personal connection: stored outside the repository, readable only by the user. */
|
|
15
|
+
personal?: boolean;
|
|
16
|
+
removeLegacyApiUrl?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function readSetupConfig(file: string): ProjectConfig;
|
|
19
|
+
/** Reject concurrent edits and replace atomically. No values or tokens enter this file. */
|
|
20
|
+
export declare function persistTarget(root: string, target: SetupTarget, expected: string | undefined): string;
|
|
21
|
+
/** Re-read before creation so retries reuse successes after a lost response or partial failure. */
|
|
22
|
+
export declare function ensureTarget(target: SetupTarget): Promise<void>;
|
|
23
|
+
//# sourceMappingURL=setup-plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-plan.d.ts","sourceRoot":"","sources":["../../src/lib/setup-plan.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,gBAAgB,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AACD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAS3D;AAED,2FAA2F;AAC3F,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAoBrG;AAMD,mGAAmG;AACnG,wBAAsB,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBrE"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { randomUUID } from "node:crypto";
|
|
4
|
+
import { apiGet, readJson, apiPost, ApiError } from "../api.js";
|
|
5
|
+
import { t } from "../i18n.js";
|
|
6
|
+
export function readSetupConfig(file) {
|
|
7
|
+
if (!fs.existsSync(file))
|
|
8
|
+
return {};
|
|
9
|
+
try {
|
|
10
|
+
const data = JSON.parse(fs.readFileSync(file, "utf8"));
|
|
11
|
+
if (!data || typeof data !== "object" || Array.isArray(data))
|
|
12
|
+
throw new Error();
|
|
13
|
+
if (["token", "secrets", "password", "values"].some((key) => Object.hasOwn(data, key)))
|
|
14
|
+
throw new Error();
|
|
15
|
+
if (data.workspaces !== undefined && (!data.workspaces || typeof data.workspaces !== "object" || Array.isArray(data.workspaces)))
|
|
16
|
+
throw new Error();
|
|
17
|
+
return data;
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
throw new Error(t("context.invalidConfig", { file }));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** Reject concurrent edits and replace atomically. No values or tokens enter this file. */
|
|
24
|
+
export function persistTarget(root, target, expected) {
|
|
25
|
+
const file = target.configFile;
|
|
26
|
+
const actual = fs.existsSync(file) ? fs.readFileSync(file, "utf8") : undefined;
|
|
27
|
+
if (actual !== expected)
|
|
28
|
+
throw new Error(t("setup.configChanged", { file }));
|
|
29
|
+
const config = readSetupConfig(file);
|
|
30
|
+
if (target.removeLegacyApiUrl)
|
|
31
|
+
delete config.apiUrl;
|
|
32
|
+
const relative = path.relative(target.configBase ?? path.dirname(file), path.resolve(root, target.app.path)).replace(/\\/g, "/") || ".";
|
|
33
|
+
if (relative === ".") {
|
|
34
|
+
config.org = target.org;
|
|
35
|
+
config.project = target.project;
|
|
36
|
+
config.defaultEnv = target.env;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
config.org ??= target.org;
|
|
40
|
+
config.workspaces ??= {};
|
|
41
|
+
config.workspaces = { ...config.workspaces, [relative]: { ...config.workspaces[relative], org: target.org, project: target.project, defaultEnv: target.env } };
|
|
42
|
+
}
|
|
43
|
+
const content = JSON.stringify(config, null, 2) + "\n";
|
|
44
|
+
const temp = `${file}.${randomUUID()}.tmp`;
|
|
45
|
+
if (target.personal)
|
|
46
|
+
fs.mkdirSync(path.dirname(file), { recursive: true, mode: 0o700 });
|
|
47
|
+
try {
|
|
48
|
+
fs.writeFileSync(temp, content, { flag: "wx", mode: target.personal ? 0o600 : 0o644 });
|
|
49
|
+
fs.renameSync(temp, file);
|
|
50
|
+
}
|
|
51
|
+
finally {
|
|
52
|
+
fs.rmSync(temp, { force: true });
|
|
53
|
+
}
|
|
54
|
+
return content;
|
|
55
|
+
}
|
|
56
|
+
async function projects(org) {
|
|
57
|
+
return (await readJson(await apiGet(`/projects/${org}`))).projects;
|
|
58
|
+
}
|
|
59
|
+
/** Re-read before creation so retries reuse successes after a lost response or partial failure. */
|
|
60
|
+
export async function ensureTarget(target) {
|
|
61
|
+
let existing = (await projects(target.org)).find((project) => project.slug === target.project);
|
|
62
|
+
if (!existing) {
|
|
63
|
+
if (!target.createProject)
|
|
64
|
+
throw new Error(t("setup.projectMissing", { project: target.project }));
|
|
65
|
+
try {
|
|
66
|
+
const result = await apiPost(`/projects/${target.org}`, { name: target.projectName });
|
|
67
|
+
existing = result.project;
|
|
68
|
+
}
|
|
69
|
+
catch (err) {
|
|
70
|
+
// On ambiguous network failure, do not retry a write automatically. The next init re-lists.
|
|
71
|
+
if (!(err instanceof ApiError) || err.status !== 409)
|
|
72
|
+
throw err;
|
|
73
|
+
existing = (await projects(target.org)).find((project) => project.slug === target.project);
|
|
74
|
+
if (!existing)
|
|
75
|
+
throw err;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (existing.slug !== target.project)
|
|
79
|
+
throw new Error(t("setup.projectChanged"));
|
|
80
|
+
const { environments } = await readJson(await apiGet(`/environments/${target.org}/${target.project}`));
|
|
81
|
+
if (!environments.some((env) => env.slug === target.env)) {
|
|
82
|
+
if (!target.createEnv)
|
|
83
|
+
throw new Error(t("setup.envMissing", { env: target.env }));
|
|
84
|
+
try {
|
|
85
|
+
await apiPost(`/environments/${target.org}/${target.project}`, { name: target.env });
|
|
86
|
+
}
|
|
87
|
+
catch (err) {
|
|
88
|
+
if (!(err instanceof ApiError) || err.status !== 409)
|
|
89
|
+
throw err;
|
|
90
|
+
const data = await readJson(await apiGet(`/environments/${target.org}/${target.project}`));
|
|
91
|
+
if (!data.environments.some((env) => env.slug === target.env))
|
|
92
|
+
throw err;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=setup-plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-plan.js","sourceRoot":"","sources":["../../src/lib/setup-plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EAAE,CAAC,EAAE,MAAM,YAAY,CAAC;AAmB/B,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IACpC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAA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I,GAAG,CAAC,MAAM,KAAK,GAAG;gBAAE,MAAM,GAAG,CAAC;YAChE,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,MAAM,MAAM,CAAC,iBAAiB,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC,CAAyC,CAAC;YACnI,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,MAAM,CAAC,GAAG,CAAC;gBAAE,MAAM,GAAG,CAAC;QAC3E,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/locales/en.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"program": {
|
|
3
|
-
"description": "Envshed CLI
|
|
3
|
+
"description": "Envshed CLI: manage secrets from the terminal",
|
|
4
4
|
"localeOption": "Locale for CLI output (en, es, pt-BR)",
|
|
5
5
|
"workspaceOption": "Target a specific workspace by path",
|
|
6
6
|
"allOption": "Run for all workspaces (bulk mode)"
|
|
@@ -32,7 +32,11 @@
|
|
|
32
32
|
"authorized": "Authorized!",
|
|
33
33
|
"timedOut": "Authorization timed out.",
|
|
34
34
|
"loginFailed": "Login failed: {{message}}",
|
|
35
|
-
"tokenStdinOption": "Read the API token from stdin, so it never appears on the command line"
|
|
35
|
+
"tokenStdinOption": "Read the API token from stdin, so it never appears on the command line",
|
|
36
|
+
"denied": "Sign-in denied in the browser. Nothing was shared.",
|
|
37
|
+
"codeInvalid": "This code is no longer valid (expired or already used). Run envshed login again.",
|
|
38
|
+
"tokenLimit": "Your account has the most personal API tokens allowed. Revoke one in Account > Personal API tokens, then run envshed login again.",
|
|
39
|
+
"deviceFailed": "Could not start device authentication. Retry login."
|
|
36
40
|
},
|
|
37
41
|
"init": {
|
|
38
42
|
"description": "Create a .envshed.json project config in the current directory",
|
|
@@ -133,7 +137,7 @@
|
|
|
133
137
|
"prefetchComplete": "Remote state checked",
|
|
134
138
|
"noChangesWorkspace": "No changes to push for {{path}}",
|
|
135
139
|
"syncingAfterPush": "Syncing local files with propagated changes...",
|
|
136
|
-
"linkedConflictDetected": "Linked secret conflict
|
|
140
|
+
"linkedConflictDetected": "Linked secret conflict - the same linked key was changed in multiple workspaces:",
|
|
137
141
|
"linkedConflictChoose": "How to resolve {{key}}?",
|
|
138
142
|
"linkedConflictUseValue": "Use value from {{path}}",
|
|
139
143
|
"linkedConflictUnlink": "Unlink and push both values",
|
|
@@ -158,10 +162,10 @@
|
|
|
158
162
|
"watchOption": "Auto-restart command when remote secrets change",
|
|
159
163
|
"intervalOption": "Poll interval in seconds (default: 30, minimum: 10)",
|
|
160
164
|
"watchStarted": "Watching for secret changes every {{interval}}s. Press Ctrl+C to stop.",
|
|
161
|
-
"watchRestarting": "Secret version {{version}} detected
|
|
162
|
-
"watchRateLimit": "Rate limited
|
|
163
|
-
"watchPollError": "Poll error ({{status}})
|
|
164
|
-
"watchPollFailed": "Poll failed: {{message}}
|
|
165
|
+
"watchRestarting": "Secret version {{version}} detected - restarting...",
|
|
166
|
+
"watchRateLimit": "Rate limited - backing off for {{nextSec}}s",
|
|
167
|
+
"watchPollError": "Poll error ({{status}}) - will retry",
|
|
168
|
+
"watchPollFailed": "Poll failed: {{message}} - will retry",
|
|
165
169
|
"disabledSkipped_one": "{{count}} disabled secret skipped",
|
|
166
170
|
"disabledSkipped_other": "{{count}} disabled secrets skipped",
|
|
167
171
|
"redactOption": "Mask secret values in stdout and stderr (on by default in agent mode and with --oidc)",
|
|
@@ -381,7 +385,8 @@
|
|
|
381
385
|
},
|
|
382
386
|
"config": {
|
|
383
387
|
"noToken": "Not logged in. Run: envshed login",
|
|
384
|
-
"noConfig": "No .envshed.json found. Run: envshed init"
|
|
388
|
+
"noConfig": "No .envshed.json found. Run: envshed init",
|
|
389
|
+
"invalidGlobal": "Invalid ~/.envshed/config.json. Repair or move it before saving credentials or API settings; its contents were preserved."
|
|
385
390
|
},
|
|
386
391
|
"link": {
|
|
387
392
|
"description": "Link a secret to another project's environment",
|
|
@@ -492,7 +497,18 @@
|
|
|
492
497
|
"noChanges": "No changes specified. Use --name or --description."
|
|
493
498
|
},
|
|
494
499
|
"api": {
|
|
495
|
-
"
|
|
500
|
+
"invalidResponse": "The server sent an unexpected response. Check the API destination and try again.",
|
|
501
|
+
"error": "API error ({{status}}): {{text}}",
|
|
502
|
+
"status400": "Invalid request. Check the command options.",
|
|
503
|
+
"status401": "Authentication expired or invalid. Run envshed login.",
|
|
504
|
+
"status402": "Workspace subscription needs attention. Ask its owner.",
|
|
505
|
+
"status403": "Access denied or a plan limit was reached. Check permissions and plan limits.",
|
|
506
|
+
"status404": "Resource not found. Check organization, project and environment.",
|
|
507
|
+
"status409": "Resource already exists or conflicts with another change. Refresh and retry.",
|
|
508
|
+
"status429": "Too many requests. Wait before retrying.",
|
|
509
|
+
"statusOther": "The service could not complete this request. Retry later.",
|
|
510
|
+
"requestFailed": "Request failed ({{status}}): {{reason}}",
|
|
511
|
+
"networkFailed": "Could not reach the API. Check your connection and API destination, then retry."
|
|
496
512
|
},
|
|
497
513
|
"secret": {
|
|
498
514
|
"description": "Manage individual secrets",
|
|
@@ -541,6 +557,7 @@
|
|
|
541
557
|
"keyArg": "Secret key name",
|
|
542
558
|
"descriptionOption": "Definition description",
|
|
543
559
|
"requiredOption": "Mark the secret as required",
|
|
560
|
+
"notRequiredOption": "Mark the secret as not required",
|
|
544
561
|
"none": "No definitions found.",
|
|
545
562
|
"fetching": "Fetching definitions...",
|
|
546
563
|
"creating": "Creating definition...",
|
|
@@ -572,7 +589,7 @@
|
|
|
572
589
|
"fetching": "Fetching members...",
|
|
573
590
|
"none": "No members found.",
|
|
574
591
|
"inviting": "Inviting member...",
|
|
575
|
-
"invited": "Invitation sent to {{email}} with role '{{role}}'",
|
|
592
|
+
"invited": "Invitation sent to {{email}} with role '{{role}}'. They join the organization when they accept it (the link expires in 7 days).",
|
|
576
593
|
"changingRole": "Updating role...",
|
|
577
594
|
"roleChanged": "Role for {{email}} updated to '{{role}}'",
|
|
578
595
|
"removing": "Removing member...",
|
|
@@ -609,7 +626,7 @@
|
|
|
609
626
|
"created": "Webhook created (id: {{id}})",
|
|
610
627
|
"updated": "Webhook {{id}} updated",
|
|
611
628
|
"deleted": "Webhook {{id}} deleted",
|
|
612
|
-
"secretWarning": "Save this signing secret
|
|
629
|
+
"secretWarning": "Save this signing secret - it will not be shown again:",
|
|
613
630
|
"missingCreateArgs": "--name, --url, and --events are required",
|
|
614
631
|
"noChanges": "No changes specified. Use --name, --url, --events, or --active/--no-active.",
|
|
615
632
|
"deleteConfirm": "Are you sure you want to delete webhook {{id}}? This cannot be undone.",
|
|
@@ -656,7 +673,7 @@
|
|
|
656
673
|
"dopplerFetchFailed": "Doppler API request failed: {{message}}",
|
|
657
674
|
"dopplerNoConfigs": "No Doppler configs matched the filters. Nothing to import.",
|
|
658
675
|
"dopplerPlanned": "Planned: {{projects}} project(s), {{envs}} environment(s), {{secrets}} secret(s).",
|
|
659
|
-
"dopplerDryRun": "Dry run
|
|
676
|
+
"dopplerDryRun": "Dry run - no changes written.",
|
|
660
677
|
"dopplerPushing": "Migrating {{target}}...",
|
|
661
678
|
"dopplerCreatedProject": "Created Envshed project \"{{project}}\"...",
|
|
662
679
|
"dopplerCreatedEnv": "Created Envshed environment \"{{env}}\"...",
|
|
@@ -712,6 +729,7 @@
|
|
|
712
729
|
"statusExpired": "expired",
|
|
713
730
|
"statusExhausted": "used up",
|
|
714
731
|
"statusRevoked": "revoked",
|
|
732
|
+
"statusLocked": "locked",
|
|
715
733
|
"confirmRevoke": "Revoke share link {{id}}? Anyone holding it loses access immediately.",
|
|
716
734
|
"revoking": "Revoking share link...",
|
|
717
735
|
"revoked": "Share link revoked.",
|
|
@@ -927,5 +945,145 @@
|
|
|
927
945
|
"tool.env-file": "Envshed blocked this because it reads a .env file into the agent session. Use envshed run -- <command> to give the values to a program, or .env.example to see which keys exist. If a key is missing, use envshed request <KEY> --reason \"...\".",
|
|
928
946
|
"tool.cli-config": "Envshed blocked this because that location holds the CLI login token. You do not need to read it: envshed commands use it on their own.",
|
|
929
947
|
"tool.agent-mode-off": "Envshed blocked this command because it turns off agent mode, which masks secret values in envshed run output. It does so through ENVSHED_AGENT_MODE, CLAUDE_CODE_CHILD_SESSION, env -i or --no-redact. Run envshed run -- <command> without changing them."
|
|
948
|
+
},
|
|
949
|
+
"context": {
|
|
950
|
+
"invalidConfig": "Invalid project configuration at {{file}}. Repair the JSON before continuing; the file was preserved.",
|
|
951
|
+
"invalidSelections": "Cannot read ~/.envshed/contexts.json. Repair or move that file before continuing.",
|
|
952
|
+
"busy": "Another command is updating contexts.json. Retry after it finishes; if it crashed, remove the stale contexts.json.lock file.",
|
|
953
|
+
"writeFailed": "Could not save the personal selection. Existing configuration was preserved.",
|
|
954
|
+
"resetOption": "Remove the personal selection for this checkout/workspace",
|
|
955
|
+
"legacyOption": "Compatibility mode: update shared defaults and synchronize local env files",
|
|
956
|
+
"resetConflict": "Use --reset without an environment or --legacy-sync.",
|
|
957
|
+
"targetRequired": "Choose an environment, or use --reset to remove the personal selection.",
|
|
958
|
+
"invalidEnv": "Invalid environment slug. Use lowercase letters, numbers and hyphens.",
|
|
959
|
+
"notFound": "Environment {{env}} was not found. Create it explicitly with env create or choose an existing environment.",
|
|
960
|
+
"confirmSensitive": "Save {{env}} for {{count}} local context(s)? This may target production.",
|
|
961
|
+
"selectionSaved": "Selected {{env}} for {{count}} local context(s). Saved only for this checkout/workspace; shared defaults are unchanged.",
|
|
962
|
+
"resetSaved": "Removed the personal selection for {{count}} local context(s). Remaining flags, shell overrides or project defaults apply.",
|
|
963
|
+
"shellWins": "ENVSHED_ENV={{env}} still overrides the saved selection.",
|
|
964
|
+
"ciIgnored": "CI ignores personal selections. Use -e, ENVSHED_ENV or the shared project default.",
|
|
965
|
+
"noExport": "No secrets were downloaded, uploaded or written to env files. Use branch to inspect context; use pull only for explicit file export.",
|
|
966
|
+
"legacyWarning": "Compatibility mode: changes shared defaults and may upload or overwrite local files. Prefer selection without --legacy-sync and explicit pull/push.",
|
|
967
|
+
"details": "{{workspace}}: {{org}} / {{project}} / {{env}}\n Source: {{source}}; project default: {{defaultEnv}}\n API: {{apiUrl}}\n Configuration directory: {{directory}}",
|
|
968
|
+
"source": {
|
|
969
|
+
"flag": "command flag",
|
|
970
|
+
"shell": "ENVSHED_ENV",
|
|
971
|
+
"personal": "personal checkout selection",
|
|
972
|
+
"project": "project configuration",
|
|
973
|
+
"missing": "not configured"
|
|
974
|
+
}
|
|
975
|
+
},
|
|
976
|
+
"setup": {
|
|
977
|
+
"allOption": "Configure all suggested applications in this folder",
|
|
978
|
+
"apiConfirm": "Save {{url}} as your personal API destination?",
|
|
979
|
+
"cancelled": "Setup cancelled. Saved progress and created resources are preserved; run init to resume.",
|
|
980
|
+
"complete": "Configured {{count}} application(s) in {{seconds}}s. Configuration is ready; application startup is a separate step.",
|
|
981
|
+
"confirmPlan": "Apply this plan? New projects/environments will be created and the listed metadata files updated.",
|
|
982
|
+
"create": "create",
|
|
983
|
+
"createNamedProject": "Project {{project}} is missing. Plan its creation for {{path}}?",
|
|
984
|
+
"destination": "Setup directory: {{directory}}\nAPI: {{api}}",
|
|
985
|
+
"discoveryLimited": "Discovery reached its depth/directory limit. Use --workspace <path> for an application not listed.",
|
|
986
|
+
"envFor": "Environment for {{path}}",
|
|
987
|
+
"envMissing": "Environment {{env}} is unavailable. Choose an accessible environment or ask an administrator.",
|
|
988
|
+
"invalidApi": "Invalid API destination. Use an HTTP(S) URL without credentials, query or fragment.",
|
|
989
|
+
"invalidPath": "Choose an existing application directory inside the setup folder; external symlinks are not followed.",
|
|
990
|
+
"invalidSlug": "Use a nonempty slug with lowercase letters, numbers and hyphens.",
|
|
991
|
+
"nameCollision": "Several new applications would create project {{project}}. Give them distinct names or reuse an existing project explicitly.",
|
|
992
|
+
"needsLogin": "Authenticate with envshed login and retry. If ENVSHED_TOKEN is set, update or unset that credential.",
|
|
993
|
+
"noCreatePermission": "Your role cannot create projects here. Select an existing project or ask an administrator.",
|
|
994
|
+
"noGuideOption": "Save configuration without the interactive run guide (env file import is controlled by --import/--no-import)",
|
|
995
|
+
"nonInteractive": "Setup needs a choice. Run interactively or provide --org, --project/--all, --env and --yes.",
|
|
996
|
+
"nothingSelected": "No applications selected. Nothing was created.",
|
|
997
|
+
"optionalPackage": "optional package",
|
|
998
|
+
"orgMissing": "Workspace is not accessible with this credential. Check --org or request access.",
|
|
999
|
+
"orgPlan": "Create workspace: {{org}}",
|
|
1000
|
+
"partial": "Setup stopped after saving {{count}} application(s). Remote resources may already exist. Run init again to reuse them and resume.",
|
|
1001
|
+
"audience": "Who is this connection for?",
|
|
1002
|
+
"audienceTeam": "The team (creates .envshed.json in the project, to commit)",
|
|
1003
|
+
"audiencePersonal": "Only me (stays on this machine, outside the project)",
|
|
1004
|
+
"personalNeedsGit": "A personal connection belongs to a git checkout. Run envshed init --personal inside a git repository.",
|
|
1005
|
+
"personalPlan": "Personal connection: saved on this machine only. No file in the project is created or changed.",
|
|
1006
|
+
"personalOption": "Save the connection on this machine only, outside the project (nothing to commit)",
|
|
1007
|
+
"personalUnchanged": "Project defaults are shared metadata. Existing personal selections are preserved; use branch to inspect the effective context.",
|
|
1008
|
+
"planLine": "{{path}} -> {{org}} / {{project}} / {{env}} ({{action}})\n Write: {{file}}",
|
|
1009
|
+
"planTitle": "Review setup plan:",
|
|
1010
|
+
"projectChanged": "The server returned a different project binding. Setup stopped; inspect remote resources before resuming.",
|
|
1011
|
+
"projectFor": "Project for {{path}}",
|
|
1012
|
+
"projectMissing": "Project {{project}} was not found. Select an existing project or run init interactively to plan creation.",
|
|
1013
|
+
"reuse": "reuse",
|
|
1014
|
+
"selectApps": "Which applications should be connected? Select one or several.",
|
|
1015
|
+
"targetReady": "Configuration saved for {{path}}.",
|
|
1016
|
+
"yesOption": "Accept the printed setup plan without prompts (may create projects/environments)",
|
|
1017
|
+
"addSecrets": "No active values loaded. Add or fill secrets in the dashboard: {{url}}",
|
|
1018
|
+
"configChanged": "{{file}} changed during setup. It was preserved; run init again.",
|
|
1019
|
+
"confirmWorking": "Did your application work with the selected environment? (This is your confirmation, not an automatic health check.)",
|
|
1020
|
+
"filesPreserved": "Local env files were preserved. Existing loaders may still read additional keys or override injected values; review their configuration.",
|
|
1021
|
+
"guideTarget": "Continue setup for {{path}}: {{org}} / {{project}} / {{env}}",
|
|
1022
|
+
"integrateScript": "Apply this script integration? npx will download the pinned CLI version when needed.",
|
|
1023
|
+
"manualRun": "Run your application's command with: npx envshed@latest run -- <command>. Use init again to reopen this guide.",
|
|
1024
|
+
"nextRun": "In {{directory}}, run: {{command}}",
|
|
1025
|
+
"openDashboard": "Open the dashboard to add secrets?",
|
|
1026
|
+
"processFailed": "The application could not start or exited with an error. Configuration is preserved; inspect the command output and retry.",
|
|
1027
|
+
"processStarted": "Application process started. Readiness has not been verified.",
|
|
1028
|
+
"resumeGuide": "Run init again to resume; existing projects and configuration will be reused.",
|
|
1029
|
+
"runNow": "Run this application now with the selected secrets? Project code will execute.",
|
|
1030
|
+
"scriptPreview": "Preserve script {{script}} as {{saved}}; replace {{script}} with:\n{{command}}",
|
|
1031
|
+
"scriptSaved": "Script integration saved. Your original command remains under its :local name.",
|
|
1032
|
+
"workingConfirmed": "Application working: confirmed by you.",
|
|
1033
|
+
"invalidWorkspace": "Cannot read workspace or application metadata. Repair the manifest before continuing.",
|
|
1034
|
+
"reuseWithNewEnv": "reuse project, create environment",
|
|
1035
|
+
"importOption": "Import env files found in the folder without asking first",
|
|
1036
|
+
"noImportOption": "Do not look for env files to import",
|
|
1037
|
+
"importMapOption": "Map env files to environments without prompts, e.g. .env.local=development,.env.production=production",
|
|
1038
|
+
"createEnvsOption": "Create environments named by --import-map (or suggested by file names) when they do not exist",
|
|
1039
|
+
"importFlagsConflict": "--no-import cannot be combined with --import-map or --create-envs.",
|
|
1040
|
+
"importMapInvalid": "Invalid --import-map entry \"{{pair}}\". Use file=environment pairs separated by commas, e.g. .env.local=development.",
|
|
1041
|
+
"importMapUnknownFile": "{{file}} from --import-map is not an env file found in the connected folders.",
|
|
1042
|
+
"importMapAmbiguous": "{{file}} matches env files in several folders. Use the path relative to the setup folder, e.g. apps/web/{{file}}.",
|
|
1043
|
+
"importMapUnknownEnv": "Environment {{env}} (for {{file}}) does not exist. Pass --create-envs to create it.",
|
|
1044
|
+
"envFileUnreadable": "Skipped {{file}}: it could not be read as an env file.",
|
|
1045
|
+
"envFilesFound_one": "Found {{count}} env file with secrets:",
|
|
1046
|
+
"envFilesFound_other": "Found {{count}} env files with secrets:",
|
|
1047
|
+
"envFileLine_one": " {{file}} ({{count}} key)",
|
|
1048
|
+
"envFileLine_other": " {{file}} ({{count}} keys)",
|
|
1049
|
+
"importEnvFiles_one": "Import it into Envshed?",
|
|
1050
|
+
"importEnvFiles_other": "Import them into Envshed?",
|
|
1051
|
+
"noEnvFiles": "No env files with secrets found in the connected folders.",
|
|
1052
|
+
"importPlannedEnv": "{{env}} (new)",
|
|
1053
|
+
"importCreateEnv": "Create new environment",
|
|
1054
|
+
"importSkipFile": "Skip this file",
|
|
1055
|
+
"back": "Back",
|
|
1056
|
+
"importSkippedUnknownEnv": "Skipped {{file}}: environment {{env}} does not exist (pass --create-envs to create it, or --import-map to choose).",
|
|
1057
|
+
"importNothing": "No file selected. Nothing was imported.",
|
|
1058
|
+
"importPlanTitle": "Review import plan (no values are shown):",
|
|
1059
|
+
"importPlanCreate": " (new environment)",
|
|
1060
|
+
"importPlanLine": "{{target}}{{action}}: {{new}} new, {{modified}} changed, {{unchanged}} unchanged\n From: {{files}}",
|
|
1061
|
+
"importConflict": " ! {{key}} differs between files; the value from {{file}} wins",
|
|
1062
|
+
"importConfirm": "Import these secrets?",
|
|
1063
|
+
"importApply": "Import",
|
|
1064
|
+
"importEdit": "Back: change which environment each file goes to",
|
|
1065
|
+
"importCancel": "Cancel (import nothing)",
|
|
1066
|
+
"importNeedsYes": "The import would change existing secrets. Review the plan above and pass --yes to apply it.",
|
|
1067
|
+
"importingEnv": "Importing into {{target}}...",
|
|
1068
|
+
"importedEnv": "Imported into {{target}}: {{new}} new, {{modified}} changed, {{unchanged}} unchanged.",
|
|
1069
|
+
"importFailedEnv": "Import into {{target}} failed: {{message}}",
|
|
1070
|
+
"importPartial": "{{count}} environment(s) were imported before the failure. Run init again to retry the rest.",
|
|
1071
|
+
"importDone": "Imported {{keys}} keys into {{count}} environment(s). No values were printed.",
|
|
1072
|
+
"importNext": "Next: {{command}}",
|
|
1073
|
+
"envFileTracked": "WARNING: {{file}} is tracked by git, so its secrets are in the repository history. Remove it with git rm --cached and rotate those secrets.",
|
|
1074
|
+
"envFilesNotIgnored": "Not ignored by git: {{files}}",
|
|
1075
|
+
"gitignoreFiles_one": "Add this file to .gitignore?",
|
|
1076
|
+
"gitignoreFiles_other": "Add these {{count}} files to .gitignore?",
|
|
1077
|
+
"excludeFiles_one": "Add this file to .git/info/exclude (only on this machine)?",
|
|
1078
|
+
"excludeFiles_other": "Add these {{count}} files to .git/info/exclude (only on this machine)?",
|
|
1079
|
+
"gitignoredFiles": "Added to .gitignore.",
|
|
1080
|
+
"excludedFiles": "Added to .git/info/exclude.",
|
|
1081
|
+
"deleteImportedFiles_one": "Delete the imported local file now that Envshed holds the values?",
|
|
1082
|
+
"deleteImportedFiles_other": "Delete the {{count}} imported local files now that Envshed holds the values?",
|
|
1083
|
+
"deletedImportedFiles_one": "Deleted {{count}} local file.",
|
|
1084
|
+
"deletedImportedFiles_other": "Deleted {{count}} local files.",
|
|
1085
|
+
"rootEnvFiles": "These env files in the setup folder belong to no connected application and were not imported: {{files}}. Import each one into the project it belongs to, for example:",
|
|
1086
|
+
"importFileTo_one": "Environment of {{project}} for {{file}} ({{count}} key)",
|
|
1087
|
+
"importFileTo_other": "Environment of {{project}} for {{file}} ({{count}} keys)"
|
|
930
1088
|
}
|
|
931
1089
|
}
|