@take-out/cli 0.4.3 → 0.4.5
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/cjs/cli.cjs +53 -35
- package/dist/cjs/commands/changed.cjs +133 -95
- package/dist/cjs/commands/docs.cjs +276 -203
- package/dist/cjs/commands/env-setup.cjs +45 -33
- package/dist/cjs/commands/onboard.cjs +668 -224
- package/dist/cjs/commands/run-all.cjs +54 -45
- package/dist/cjs/commands/run.cjs +80 -65
- package/dist/cjs/commands/script.cjs +263 -187
- package/dist/cjs/commands/skills.cjs +174 -118
- package/dist/cjs/commands/sync.cjs +193 -93
- package/dist/cjs/constants/ascii.cjs +14 -12
- package/dist/cjs/index.cjs +12 -10
- package/dist/cjs/types.cjs +7 -5
- package/dist/cjs/utils/env-categories.cjs +53 -48
- package/dist/cjs/utils/env-setup.cjs +214 -106
- package/dist/cjs/utils/env.cjs +65 -44
- package/dist/cjs/utils/files.cjs +186 -113
- package/dist/cjs/utils/parallel-runner.cjs +125 -75
- package/dist/cjs/utils/ports.cjs +21 -21
- package/dist/cjs/utils/prerequisites.cjs +42 -34
- package/dist/cjs/utils/prompts.cjs +66 -41
- package/dist/cjs/utils/script-listing.cjs +130 -60
- package/dist/cjs/utils/script-utils.cjs +29 -19
- package/dist/cjs/utils/sync.cjs +67 -45
- package/dist/esm/cli.mjs +40 -24
- package/dist/esm/cli.mjs.map +1 -1
- package/dist/esm/commands/changed.mjs +104 -68
- package/dist/esm/commands/changed.mjs.map +1 -1
- package/dist/esm/commands/docs.mjs +245 -174
- package/dist/esm/commands/docs.mjs.map +1 -1
- package/dist/esm/commands/env-setup.mjs +18 -8
- package/dist/esm/commands/env-setup.mjs.map +1 -1
- package/dist/esm/commands/onboard.mjs +631 -189
- package/dist/esm/commands/onboard.mjs.map +1 -1
- package/dist/esm/commands/run-all.mjs +26 -19
- package/dist/esm/commands/run-all.mjs.map +1 -1
- package/dist/esm/commands/run.mjs +52 -39
- package/dist/esm/commands/run.mjs.map +1 -1
- package/dist/esm/commands/script.mjs +230 -156
- package/dist/esm/commands/script.mjs.map +1 -1
- package/dist/esm/commands/skills.mjs +143 -89
- package/dist/esm/commands/skills.mjs.map +1 -1
- package/dist/esm/commands/sync.mjs +160 -62
- package/dist/esm/commands/sync.mjs.map +1 -1
- package/dist/esm/constants/ascii.mjs +2 -2
- package/dist/esm/constants/ascii.mjs.map +1 -1
- package/dist/esm/utils/env-categories.mjs +29 -26
- package/dist/esm/utils/env-categories.mjs.map +1 -1
- package/dist/esm/utils/env-setup.mjs +184 -78
- package/dist/esm/utils/env-setup.mjs.map +1 -1
- package/dist/esm/utils/env.mjs +50 -31
- package/dist/esm/utils/env.mjs.map +1 -1
- package/dist/esm/utils/files.mjs +171 -100
- package/dist/esm/utils/files.mjs.map +1 -1
- package/dist/esm/utils/parallel-runner.mjs +111 -63
- package/dist/esm/utils/parallel-runner.mjs.map +1 -1
- package/dist/esm/utils/ports.mjs +9 -11
- package/dist/esm/utils/ports.mjs.map +1 -1
- package/dist/esm/utils/prerequisites.mjs +30 -24
- package/dist/esm/utils/prerequisites.mjs.map +1 -1
- package/dist/esm/utils/prompts.mjs +40 -17
- package/dist/esm/utils/prompts.mjs.map +1 -1
- package/dist/esm/utils/script-listing.mjs +101 -33
- package/dist/esm/utils/script-listing.mjs.map +1 -1
- package/dist/esm/utils/script-utils.mjs +14 -6
- package/dist/esm/utils/script-utils.mjs.map +1 -1
- package/dist/esm/utils/sync.mjs +38 -18
- package/dist/esm/utils/sync.mjs.map +1 -1
- package/package.json +5 -5
|
@@ -6,15 +6,18 @@ import { fileURLToPath } from "node:url";
|
|
|
6
6
|
import { defineCommand } from "citty";
|
|
7
7
|
import pc from "picocolors";
|
|
8
8
|
import { confirmContinue, promptSelect, showError, showInfo, showStep, showSuccess } from "../utils/prompts.mjs";
|
|
9
|
-
const UPSTREAM_REPO = "tamagui/takeout2"
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const UPSTREAM_REPO = "tamagui/takeout2";
|
|
10
|
+
const UPSTREAM_REMOTE = "takeout-upstream";
|
|
11
|
+
const TAKEOUT_FILE = ".takeout";
|
|
12
12
|
function getSyncPrompt() {
|
|
13
13
|
try {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
const currentDir = dirname(fileURLToPath(import.meta.url));
|
|
15
|
+
let monorepoRoot = currentDir;
|
|
16
|
+
while (monorepoRoot !== parse(monorepoRoot).root) {
|
|
16
17
|
const promptPath = join(monorepoRoot, "packages", "docs", "sync-prompt.md");
|
|
17
|
-
if (existsSync(promptPath))
|
|
18
|
+
if (existsSync(promptPath)) {
|
|
19
|
+
return readFileSync(promptPath, "utf-8");
|
|
20
|
+
}
|
|
18
21
|
monorepoRoot = dirname(monorepoRoot);
|
|
19
22
|
}
|
|
20
23
|
throw new Error("Could not find sync-prompt.md in packages/docs");
|
|
@@ -25,37 +28,44 @@ function getSyncPrompt() {
|
|
|
25
28
|
function checkToolAvailable(command) {
|
|
26
29
|
try {
|
|
27
30
|
const checkCmd = process.platform === "win32" ? "where" : "which";
|
|
28
|
-
|
|
31
|
+
const result = spawnSync(checkCmd, [command]);
|
|
32
|
+
return result.status === 0;
|
|
29
33
|
} catch {
|
|
30
|
-
return
|
|
34
|
+
return false;
|
|
31
35
|
}
|
|
32
36
|
}
|
|
33
37
|
function ensureUpstreamRemote() {
|
|
34
38
|
try {
|
|
35
|
-
|
|
39
|
+
const remotes = execSync("git remote", {
|
|
36
40
|
encoding: "utf-8"
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
});
|
|
42
|
+
if (!remotes.includes(UPSTREAM_REMOTE)) {
|
|
43
|
+
execSync(`git remote add ${UPSTREAM_REMOTE} git@github.com:${UPSTREAM_REPO}.git`, {
|
|
44
|
+
stdio: "pipe"
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
execSync(`git fetch ${UPSTREAM_REMOTE} --quiet`, {
|
|
40
48
|
stdio: "pipe"
|
|
41
|
-
})
|
|
49
|
+
});
|
|
50
|
+
return true;
|
|
42
51
|
} catch {
|
|
43
|
-
return
|
|
52
|
+
return false;
|
|
44
53
|
}
|
|
45
54
|
}
|
|
46
55
|
function getUpstreamHeadSha() {
|
|
47
56
|
try {
|
|
48
|
-
|
|
57
|
+
const sha = execSync(`git rev-parse ${UPSTREAM_REMOTE}/main`, {
|
|
49
58
|
encoding: "utf-8"
|
|
50
|
-
})
|
|
59
|
+
});
|
|
60
|
+
return sha.trim();
|
|
51
61
|
} catch {
|
|
52
62
|
return null;
|
|
53
63
|
}
|
|
54
64
|
}
|
|
55
65
|
function writeTakeoutConfig(sha) {
|
|
56
|
-
const configPath = join(process.cwd(), TAKEOUT_FILE)
|
|
57
|
-
|
|
58
|
-
|
|
66
|
+
const configPath = join(process.cwd(), TAKEOUT_FILE);
|
|
67
|
+
const date = (/* @__PURE__ */new Date()).toISOString().split("T")[0];
|
|
68
|
+
const content = `# takeout sync tracking file
|
|
59
69
|
# this file tracks the last synced commit from upstream takeout
|
|
60
70
|
sha=${sha}
|
|
61
71
|
date=${date}
|
|
@@ -71,49 +81,82 @@ const syncCommand = defineCommand({
|
|
|
71
81
|
auto: {
|
|
72
82
|
type: "boolean",
|
|
73
83
|
description: "Auto-run with claude-code without prompts (for non-TTY environments)",
|
|
74
|
-
default:
|
|
84
|
+
default: false
|
|
75
85
|
},
|
|
76
86
|
print: {
|
|
77
87
|
type: "boolean",
|
|
78
88
|
description: "Print the sync prompt and exit",
|
|
79
|
-
default:
|
|
89
|
+
default: false
|
|
80
90
|
}
|
|
81
91
|
},
|
|
82
92
|
async run({
|
|
83
93
|
args
|
|
84
94
|
}) {
|
|
85
|
-
const isAuto = args.auto
|
|
86
|
-
|
|
87
|
-
showStep("Takeout Repository Sync")
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
95
|
+
const isAuto = args.auto;
|
|
96
|
+
const isPrint = args.print;
|
|
97
|
+
showStep("Takeout Repository Sync");
|
|
98
|
+
console.info();
|
|
99
|
+
if (!isAuto && !isPrint) {
|
|
100
|
+
showInfo("Takeout sync uses AI to intelligently merge upstream changes");
|
|
101
|
+
console.info();
|
|
102
|
+
console.info(pc.gray("How it works:"));
|
|
103
|
+
console.info(pc.gray(" \u2022 Analyzes commits from upstream Takeout repository"));
|
|
104
|
+
console.info(pc.gray(" \u2022 Determines which changes are relevant to your fork"));
|
|
105
|
+
console.info(pc.gray(" \u2022 Applies changes while preserving your customizations"));
|
|
106
|
+
console.info(pc.gray(" \u2022 Handles package ejection automatically"));
|
|
107
|
+
console.info(pc.gray(" \u2022 Asks for your input when decisions are needed"));
|
|
108
|
+
console.info();
|
|
109
|
+
}
|
|
110
|
+
const hasClaudeCode = checkToolAvailable("claude");
|
|
111
|
+
const hasCursor = checkToolAvailable("cursor-agent");
|
|
112
|
+
const hasAider = checkToolAvailable("aider");
|
|
91
113
|
let choice;
|
|
92
|
-
if (isAuto)
|
|
114
|
+
if (isAuto) {
|
|
115
|
+
if (!hasClaudeCode) {
|
|
116
|
+
showError("--auto requires claude CLI to be installed");
|
|
117
|
+
process.exit(1);
|
|
118
|
+
}
|
|
119
|
+
choice = "claude-code";
|
|
120
|
+
} else if (isPrint) {
|
|
121
|
+
choice = "show-prompt";
|
|
122
|
+
} else {
|
|
93
123
|
const options = [];
|
|
94
|
-
if (hasClaudeCode
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
124
|
+
if (hasClaudeCode) {
|
|
125
|
+
options.push({
|
|
126
|
+
value: "claude-code",
|
|
127
|
+
label: "Claude Code (recommended)",
|
|
128
|
+
hint: "Run sync automatically with Claude Code CLI"
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
if (hasCursor) {
|
|
132
|
+
options.push({
|
|
133
|
+
value: "cursor",
|
|
134
|
+
label: "Cursor Agent",
|
|
135
|
+
hint: "Run sync automatically with Cursor CLI"
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
if (hasAider) {
|
|
139
|
+
options.push({
|
|
140
|
+
value: "aider",
|
|
141
|
+
label: "Aider",
|
|
142
|
+
hint: "Run sync automatically with Aider CLI"
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
options.push({
|
|
107
146
|
value: "show-prompt",
|
|
108
147
|
label: "Show prompt (copy & paste manually)",
|
|
109
148
|
hint: "Display the full prompt to use with any LLM"
|
|
110
|
-
})
|
|
111
|
-
|
|
149
|
+
});
|
|
150
|
+
choice = await promptSelect("How would you like to sync?", options);
|
|
151
|
+
if (choice === "cancel") {
|
|
152
|
+
console.info();
|
|
153
|
+
showInfo("Sync cancelled");
|
|
112
154
|
return;
|
|
113
155
|
}
|
|
114
156
|
console.info();
|
|
115
157
|
}
|
|
116
|
-
|
|
158
|
+
console.info(pc.dim("Fetching upstream repository..."));
|
|
159
|
+
if (!ensureUpstreamRemote()) {
|
|
117
160
|
showError("Failed to fetch upstream repository");
|
|
118
161
|
return;
|
|
119
162
|
}
|
|
@@ -122,45 +165,100 @@ const syncCommand = defineCommand({
|
|
|
122
165
|
showError("Failed to get upstream HEAD SHA");
|
|
123
166
|
return;
|
|
124
167
|
}
|
|
125
|
-
console.info(pc.dim(`Target SHA: ${upstreamSha.slice(0, 7)}`))
|
|
168
|
+
console.info(pc.dim(`Target SHA: ${upstreamSha.slice(0, 7)}`));
|
|
169
|
+
console.info();
|
|
126
170
|
try {
|
|
127
171
|
const prompt = getSyncPrompt();
|
|
128
|
-
if (choice === "show-prompt")
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
172
|
+
if (choice === "show-prompt") {
|
|
173
|
+
console.info(pc.dim("=".repeat(80)));
|
|
174
|
+
console.info(prompt);
|
|
175
|
+
console.info(pc.dim("=".repeat(80)));
|
|
176
|
+
console.info();
|
|
177
|
+
showInfo("Copy the prompt above and paste it into your preferred LLM");
|
|
178
|
+
console.info();
|
|
179
|
+
console.info(pc.gray("Recommended LLMs:"));
|
|
180
|
+
console.info(pc.gray(" \u2022 Claude Code (best for complex instructions)"));
|
|
181
|
+
console.info(pc.gray(" \u2022 ChatGPT"));
|
|
182
|
+
console.info(pc.gray(" \u2022 Cursor"));
|
|
183
|
+
console.info(pc.gray(" \u2022 Aider"));
|
|
184
|
+
console.info();
|
|
185
|
+
} else if (choice === "claude-code") {
|
|
186
|
+
showInfo("Starting Claude Code with sync prompt...");
|
|
187
|
+
console.info();
|
|
188
|
+
if (!isAuto) {
|
|
189
|
+
console.info(pc.dim("Note: Claude Code will run in headless mode and make changes automatically."));
|
|
190
|
+
console.info(pc.dim("You will be asked to confirm important decisions."));
|
|
191
|
+
console.info();
|
|
192
|
+
const shouldContinue = await confirmContinue("Continue with Claude Code?", true);
|
|
193
|
+
if (!shouldContinue) {
|
|
194
|
+
showInfo("Sync cancelled");
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
132
197
|
}
|
|
133
|
-
const tempDir = mkdtempSync(join(tmpdir(), "takeout-sync-"))
|
|
134
|
-
|
|
198
|
+
const tempDir = mkdtempSync(join(tmpdir(), "takeout-sync-"));
|
|
199
|
+
const promptFile = join(tempDir, "prompt.md");
|
|
135
200
|
writeFileSync(promptFile, prompt);
|
|
136
201
|
const claude = spawn("claude", ["-p", "-"], {
|
|
137
202
|
stdio: ["pipe", "inherit", "inherit"]
|
|
138
203
|
});
|
|
139
|
-
claude.stdin?.write(prompt)
|
|
140
|
-
|
|
204
|
+
claude.stdin?.write(prompt);
|
|
205
|
+
claude.stdin?.end();
|
|
206
|
+
claude.on("close", code => {
|
|
207
|
+
console.info();
|
|
208
|
+
if (code === 0) {
|
|
209
|
+
writeTakeoutConfig(upstreamSha);
|
|
210
|
+
showSuccess("Sync completed successfully!");
|
|
211
|
+
console.info(pc.dim(`Updated .takeout to ${upstreamSha.slice(0, 7)}`));
|
|
212
|
+
} else {
|
|
213
|
+
showError(`Claude Code exited with code ${code}`);
|
|
214
|
+
}
|
|
141
215
|
});
|
|
142
216
|
} else if (choice === "cursor") {
|
|
143
|
-
|
|
217
|
+
showInfo("Starting Cursor Agent with sync prompt...");
|
|
218
|
+
console.info();
|
|
219
|
+
const shouldContinue = await confirmContinue("Continue with Cursor?", true);
|
|
220
|
+
if (!shouldContinue) {
|
|
144
221
|
showInfo("Sync cancelled");
|
|
145
222
|
return;
|
|
146
223
|
}
|
|
147
224
|
const cursor = spawn("cursor-agent", ["-p", "-"], {
|
|
148
225
|
stdio: ["pipe", "inherit", "inherit"]
|
|
149
226
|
});
|
|
150
|
-
cursor.stdin?.write(prompt)
|
|
151
|
-
|
|
227
|
+
cursor.stdin?.write(prompt);
|
|
228
|
+
cursor.stdin?.end();
|
|
229
|
+
cursor.on("close", code => {
|
|
230
|
+
console.info();
|
|
231
|
+
if (code === 0) {
|
|
232
|
+
writeTakeoutConfig(upstreamSha);
|
|
233
|
+
showSuccess("Sync completed successfully!");
|
|
234
|
+
console.info(pc.dim(`Updated .takeout to ${upstreamSha.slice(0, 7)}`));
|
|
235
|
+
} else {
|
|
236
|
+
showError(`Cursor Agent exited with code ${code}`);
|
|
237
|
+
}
|
|
152
238
|
});
|
|
153
239
|
} else if (choice === "aider") {
|
|
154
|
-
|
|
240
|
+
showInfo("Starting Aider with sync prompt...");
|
|
241
|
+
console.info();
|
|
242
|
+
const shouldContinue = await confirmContinue("Continue with Aider?", true);
|
|
243
|
+
if (!shouldContinue) {
|
|
155
244
|
showInfo("Sync cancelled");
|
|
156
245
|
return;
|
|
157
246
|
}
|
|
158
|
-
const tempDir = mkdtempSync(join(tmpdir(), "takeout-sync-"))
|
|
159
|
-
|
|
160
|
-
writeFileSync(promptFile, prompt)
|
|
247
|
+
const tempDir = mkdtempSync(join(tmpdir(), "takeout-sync-"));
|
|
248
|
+
const promptFile = join(tempDir, "prompt.md");
|
|
249
|
+
writeFileSync(promptFile, prompt);
|
|
250
|
+
const aider = spawn("aider", ["--message-file", promptFile, "--no-stream"], {
|
|
161
251
|
stdio: "inherit"
|
|
162
|
-
})
|
|
163
|
-
|
|
252
|
+
});
|
|
253
|
+
aider.on("close", code => {
|
|
254
|
+
console.info();
|
|
255
|
+
if (code === 0) {
|
|
256
|
+
writeTakeoutConfig(upstreamSha);
|
|
257
|
+
showSuccess("Sync completed successfully!");
|
|
258
|
+
console.info(pc.dim(`Updated .takeout to ${upstreamSha.slice(0, 7)}`));
|
|
259
|
+
} else {
|
|
260
|
+
showError(`Aider exited with code ${code}`);
|
|
261
|
+
}
|
|
164
262
|
});
|
|
165
263
|
}
|
|
166
264
|
} catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["execSync","spawn","spawnSync","existsSync","mkdtempSync","readFileSync","writeFileSync","tmpdir","dirname","join","parse","fileURLToPath","defineCommand","pc","confirmContinue","promptSelect","showError","showInfo","showStep","showSuccess","UPSTREAM_REPO","UPSTREAM_REMOTE","TAKEOUT_FILE","getSyncPrompt","
|
|
1
|
+
{"version":3,"names":["execSync","spawn","spawnSync","existsSync","mkdtempSync","readFileSync","writeFileSync","tmpdir","dirname","join","parse","fileURLToPath","defineCommand","pc","confirmContinue","promptSelect","showError","showInfo","showStep","showSuccess","UPSTREAM_REPO","UPSTREAM_REMOTE","TAKEOUT_FILE","getSyncPrompt","currentDir","import","meta","url","monorepoRoot","root","promptPath","Error","error","message","checkToolAvailable","command","checkCmd","process","platform","result","status","ensureUpstreamRemote","remotes","encoding","includes","stdio","getUpstreamHeadSha","sha","trim","writeTakeoutConfig","configPath","cwd","date","Date","toISOString","split","content","syncCommand","name","description","args","auto","type","default","print","run","isAuto","isPrint","console","info","gray","hasClaudeCode","hasCursor","hasAider","choice","exit","options","push","value","label","hint","dim","upstreamSha","slice","prompt","repeat","shouldContinue","tempDir","promptFile","claude","stdin","write","end","on","code","cursor","aider"],"sources":["../../../src/commands/sync.ts"],"sourcesContent":[null],"mappings":"AAIA,SAASA,QAAA,EAAUC,KAA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CAAC;MACH;IACF,SAAS9D,KAAA,EAAO;MACdhB,SAAA,CAAUgB,KAAA,YAAiBD,KAAA,GAAQC,KAAA,CAAMC,OAAA,GAAU,eAAe;IACpE;EACF;AACF,CAAC","ignoreList":[]}
|
|
@@ -6,7 +6,7 @@ const TAKEOUT_ASCII = `
|
|
|
6
6
|
\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551
|
|
7
7
|
\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D
|
|
8
8
|
\u9EB5 \u78BC \u98EF
|
|
9
|
-
`.trim()
|
|
10
|
-
|
|
9
|
+
`.trim();
|
|
10
|
+
const WELCOME_BANNER = TAKEOUT_ASCII;
|
|
11
11
|
export { TAKEOUT_ASCII, WELCOME_BANNER };
|
|
12
12
|
//# sourceMappingURL=ascii.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TAKEOUT_ASCII","trim","WELCOME_BANNER"],"sources":["../../../src/constants/ascii.ts"],"sourcesContent":[null],"mappings":"AAMO,MAAMA,aAAA,GAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ3BC,IAAA,CAAK;
|
|
1
|
+
{"version":3,"names":["TAKEOUT_ASCII","trim","WELCOME_BANNER"],"sources":["../../../src/constants/ascii.ts"],"sourcesContent":[null],"mappings":"AAMO,MAAMA,aAAA,GAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ3BC,IAAA,CAAK;AAEA,MAAMC,cAAA,GAAiBF,aAAA","ignoreList":[]}
|
|
@@ -3,22 +3,25 @@ const envCategories = [{
|
|
|
3
3
|
id: "core",
|
|
4
4
|
name: "Core Configuration",
|
|
5
5
|
description: "Essential configuration for your production deployment",
|
|
6
|
-
required:
|
|
6
|
+
required: true,
|
|
7
7
|
variables: [{
|
|
8
8
|
key: "BETTER_AUTH_SECRET",
|
|
9
9
|
label: "Authentication Secret",
|
|
10
10
|
description: "Secret key for session encryption and JWT signing",
|
|
11
11
|
instructions: `Generate a secure random key:
|
|
12
12
|
${pc.cyan("openssl rand -hex 32")}`,
|
|
13
|
-
required:
|
|
13
|
+
required: true,
|
|
14
14
|
type: "secret",
|
|
15
|
-
generator: () =>
|
|
15
|
+
generator: () => {
|
|
16
|
+
const crypto = require("node:crypto");
|
|
17
|
+
return crypto.randomBytes(32).toString("hex");
|
|
18
|
+
}
|
|
16
19
|
}, {
|
|
17
20
|
key: "BETTER_AUTH_URL",
|
|
18
21
|
label: "Authentication URL",
|
|
19
22
|
description: "The public URL where your app will be hosted",
|
|
20
23
|
instructions: "Enter your production domain (e.g., https://your-app.com)",
|
|
21
|
-
required:
|
|
24
|
+
required: true,
|
|
22
25
|
type: "text",
|
|
23
26
|
placeholder: "https://your-app.com"
|
|
24
27
|
}, {
|
|
@@ -26,7 +29,7 @@ ${pc.cyan("openssl rand -hex 32")}`,
|
|
|
26
29
|
label: "Server URL",
|
|
27
30
|
description: "The URL for your main server",
|
|
28
31
|
instructions: "Usually the same as your authentication URL",
|
|
29
|
-
required:
|
|
32
|
+
required: true,
|
|
30
33
|
type: "text",
|
|
31
34
|
placeholder: "https://your-app.com"
|
|
32
35
|
}, {
|
|
@@ -34,7 +37,7 @@ ${pc.cyan("openssl rand -hex 32")}`,
|
|
|
34
37
|
label: "Zero Sync Server Host",
|
|
35
38
|
description: "Hostname for real-time sync server",
|
|
36
39
|
instructions: "Just the hostname, e.g., zero.your-app.com (https:// assumed in production)",
|
|
37
|
-
required:
|
|
40
|
+
required: true,
|
|
38
41
|
type: "text",
|
|
39
42
|
placeholder: "zero.your-app.com"
|
|
40
43
|
}]
|
|
@@ -42,7 +45,7 @@ ${pc.cyan("openssl rand -hex 32")}`,
|
|
|
42
45
|
id: "database",
|
|
43
46
|
name: "Database (PostgreSQL)",
|
|
44
47
|
description: "Production database configuration - set by deployment platform (SST/uncloud)",
|
|
45
|
-
required:
|
|
48
|
+
required: false,
|
|
46
49
|
variables: [
|
|
47
50
|
// Note: ZERO_UPSTREAM_DB, ZERO_CVR_DB, and ZERO_CHANGE_DB are set dynamically
|
|
48
51
|
// by the deployment platform (SST or uncloud) and should NOT be configured here
|
|
@@ -51,7 +54,7 @@ ${pc.cyan("openssl rand -hex 32")}`,
|
|
|
51
54
|
id: "storage",
|
|
52
55
|
name: "File Storage (S3/R2)",
|
|
53
56
|
description: "Object storage for user uploads and media files",
|
|
54
|
-
required:
|
|
57
|
+
required: false,
|
|
55
58
|
variables: [{
|
|
56
59
|
key: "CLOUDFLARE_R2_ENDPOINT",
|
|
57
60
|
label: "Storage Endpoint",
|
|
@@ -60,7 +63,7 @@ ${pc.cyan("openssl rand -hex 32")}`,
|
|
|
60
63
|
${pc.cyan("Cloudflare R2")}: https://[account-id].r2.cloudflarestorage.com
|
|
61
64
|
${pc.cyan("AWS S3")}: https://s3.[region].amazonaws.com
|
|
62
65
|
${pc.cyan("DigitalOcean Spaces")}: https://[region].digitaloceanspaces.com`,
|
|
63
|
-
required:
|
|
66
|
+
required: false,
|
|
64
67
|
type: "text",
|
|
65
68
|
placeholder: "https://account-id.r2.cloudflarestorage.com"
|
|
66
69
|
}, {
|
|
@@ -68,21 +71,21 @@ ${pc.cyan("DigitalOcean Spaces")}: https://[region].digitaloceanspaces.com`,
|
|
|
68
71
|
label: "Storage Access Key",
|
|
69
72
|
description: "Access key ID for your storage service",
|
|
70
73
|
instructions: "Get this from your storage provider dashboard",
|
|
71
|
-
required:
|
|
74
|
+
required: false,
|
|
72
75
|
type: "text"
|
|
73
76
|
}, {
|
|
74
77
|
key: "CLOUDFLARE_R2_SECRET_KEY",
|
|
75
78
|
label: "Storage Secret Key",
|
|
76
79
|
description: "Secret access key for your storage service",
|
|
77
80
|
instructions: "Keep this secure - it provides full access to your storage",
|
|
78
|
-
required:
|
|
81
|
+
required: false,
|
|
79
82
|
type: "secret"
|
|
80
83
|
}, {
|
|
81
84
|
key: "CLOUDFLARE_R2_PUBLIC_URL",
|
|
82
85
|
label: "Public Storage URL",
|
|
83
86
|
description: "Public URL for serving stored files",
|
|
84
87
|
instructions: "Usually a CDN URL or custom domain pointing to your bucket",
|
|
85
|
-
required:
|
|
88
|
+
required: false,
|
|
86
89
|
type: "text",
|
|
87
90
|
placeholder: "https://cdn.your-app.com"
|
|
88
91
|
}]
|
|
@@ -90,7 +93,7 @@ ${pc.cyan("DigitalOcean Spaces")}: https://[region].digitaloceanspaces.com`,
|
|
|
90
93
|
id: "apple",
|
|
91
94
|
name: "Apple App Store",
|
|
92
95
|
description: "Configuration for iOS app and push notifications",
|
|
93
|
-
required:
|
|
96
|
+
required: false,
|
|
94
97
|
variables: [{
|
|
95
98
|
key: "APNS_TEAM_ID",
|
|
96
99
|
label: "Apple Team ID",
|
|
@@ -98,7 +101,7 @@ ${pc.cyan("DigitalOcean Spaces")}: https://[region].digitaloceanspaces.com`,
|
|
|
98
101
|
instructions: `Find in Apple Developer Portal:
|
|
99
102
|
1. Go to ${pc.cyan("https://developer.apple.com/account")}
|
|
100
103
|
2. Look for "Team ID" in Membership Details`,
|
|
101
|
-
required:
|
|
104
|
+
required: false,
|
|
102
105
|
type: "text",
|
|
103
106
|
placeholder: "XXXXXXXXXX"
|
|
104
107
|
}, {
|
|
@@ -110,7 +113,7 @@ ${pc.cyan("DigitalOcean Spaces")}: https://[region].digitaloceanspaces.com`,
|
|
|
110
113
|
2. Keys \u2192 Create a Key
|
|
111
114
|
3. Check "Apple Push Notifications service (APNs)"
|
|
112
115
|
4. Download the .p8 file and note the Key ID`,
|
|
113
|
-
required:
|
|
116
|
+
required: false,
|
|
114
117
|
type: "text",
|
|
115
118
|
placeholder: "XXXXXXXXXX"
|
|
116
119
|
}, {
|
|
@@ -118,7 +121,7 @@ ${pc.cyan("DigitalOcean Spaces")}: https://[region].digitaloceanspaces.com`,
|
|
|
118
121
|
label: "APNs Key Content",
|
|
119
122
|
description: "Contents of your APNs .p8 key file",
|
|
120
123
|
instructions: "Paste the entire contents of the .p8 file you downloaded",
|
|
121
|
-
required:
|
|
124
|
+
required: false,
|
|
122
125
|
type: "multiline"
|
|
123
126
|
}, {
|
|
124
127
|
key: "APNS_ENDPOINT",
|
|
@@ -126,7 +129,7 @@ ${pc.cyan("DigitalOcean Spaces")}: https://[region].digitaloceanspaces.com`,
|
|
|
126
129
|
description: "Apple Push Notification service endpoint",
|
|
127
130
|
instructions: `Production: ${pc.green("https://api.push.apple.com")}
|
|
128
131
|
Sandbox: ${pc.yellow("https://api.sandbox.push.apple.com")}`,
|
|
129
|
-
required:
|
|
132
|
+
required: false,
|
|
130
133
|
type: "text",
|
|
131
134
|
default: "https://api.push.apple.com"
|
|
132
135
|
}]
|
|
@@ -134,7 +137,7 @@ Sandbox: ${pc.yellow("https://api.sandbox.push.apple.com")}`,
|
|
|
134
137
|
id: "email",
|
|
135
138
|
name: "Email Service",
|
|
136
139
|
description: "Transactional email configuration",
|
|
137
|
-
required:
|
|
140
|
+
required: false,
|
|
138
141
|
variables: [{
|
|
139
142
|
key: "POSTMARK_SERVER_TOKEN",
|
|
140
143
|
label: "Postmark Server Token",
|
|
@@ -146,14 +149,14 @@ Sandbox: ${pc.yellow("https://api.sandbox.push.apple.com")}`,
|
|
|
146
149
|
4. Copy your Server API Token
|
|
147
150
|
|
|
148
151
|
${pc.yellow("Note: Free tier includes 100 emails/month")}`,
|
|
149
|
-
required:
|
|
152
|
+
required: false,
|
|
150
153
|
type: "text"
|
|
151
154
|
}]
|
|
152
155
|
}, {
|
|
153
156
|
id: "github",
|
|
154
157
|
name: "GitHub OAuth",
|
|
155
158
|
description: "Enable GitHub sign-in for your app",
|
|
156
|
-
required:
|
|
159
|
+
required: false,
|
|
157
160
|
variables: [{
|
|
158
161
|
key: "ONECHAT_GITHUB_CLIENT_ID",
|
|
159
162
|
label: "GitHub OAuth Client ID",
|
|
@@ -164,21 +167,21 @@ ${pc.yellow("Note: Free tier includes 100 emails/month")}`,
|
|
|
164
167
|
3. Set Authorization callback URL:
|
|
165
168
|
${pc.green("https://your-app.com/api/auth/callback/github")}
|
|
166
169
|
4. Copy the Client ID`,
|
|
167
|
-
required:
|
|
170
|
+
required: false,
|
|
168
171
|
type: "text"
|
|
169
172
|
}, {
|
|
170
173
|
key: "ONECHAT_GITHUB_CLIENT_SECRET",
|
|
171
174
|
label: "GitHub OAuth Client Secret",
|
|
172
175
|
description: "Client secret for GitHub OAuth application",
|
|
173
176
|
instructions: "Copy the Client Secret from your GitHub OAuth App settings",
|
|
174
|
-
required:
|
|
177
|
+
required: false,
|
|
175
178
|
type: "secret"
|
|
176
179
|
}]
|
|
177
180
|
}, {
|
|
178
181
|
id: "aws",
|
|
179
182
|
name: "AWS Deployment",
|
|
180
183
|
description: "AWS credentials for SST deployment",
|
|
181
|
-
required:
|
|
184
|
+
required: false,
|
|
182
185
|
setupTime: "~30 minutes",
|
|
183
186
|
variables: [{
|
|
184
187
|
key: "AWS_ACCESS_KEY_ID",
|
|
@@ -194,21 +197,21 @@ Quick steps:
|
|
|
194
197
|
2. Create IAM user with AdministratorAccess
|
|
195
198
|
3. Generate access keys
|
|
196
199
|
4. Copy Access Key ID`,
|
|
197
|
-
required:
|
|
200
|
+
required: false,
|
|
198
201
|
type: "text"
|
|
199
202
|
}, {
|
|
200
203
|
key: "AWS_SECRET_ACCESS_KEY",
|
|
201
204
|
label: "AWS Secret Access Key",
|
|
202
205
|
description: "Secret key for AWS deployment",
|
|
203
206
|
instructions: "Copy the Secret Access Key from IAM user creation",
|
|
204
|
-
required:
|
|
207
|
+
required: false,
|
|
205
208
|
type: "secret"
|
|
206
209
|
}, {
|
|
207
210
|
key: "AWS_REGION",
|
|
208
211
|
label: "AWS Region",
|
|
209
212
|
description: "AWS region for deployment",
|
|
210
213
|
instructions: "Choose a region close to your users (e.g., us-west-1, us-east-1, eu-west-1)",
|
|
211
|
-
required:
|
|
214
|
+
required: false,
|
|
212
215
|
type: "text",
|
|
213
216
|
default: "us-west-1",
|
|
214
217
|
placeholder: "us-west-1"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["pc","envCategories","id","name","description","required","variables","key","label","instructions","cyan","type","generator","require","randomBytes","toString","placeholder","green","yellow","default","setupTime","getCategoryById","find","cat","getRequiredCategories","filter","getOptionalCategories","getAllVariables","flatMap","getVariableByKey","v"],"sources":["../../../src/utils/env-categories.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,EAAA,MAAQ;AAIR,MAAMC,aAAA,GAA+B,CAC1C;EACEC,EAAA,EAAI;EACJC,IAAA,EAAM;EACNC,WAAA,EAAa;EACbC,QAAA,EAAU;EACVC,SAAA,EAAW,CACT;IACEC,GAAA,EAAK;IACLC,KAAA,EAAO;IACPJ,WAAA,EAAa;IACbK,YAAA,EAAc;AAAA,EAAkCT,EAAA,CAAGU,IAAA,CAAK,sBAAsB,CAAC;IAC/EL,QAAA,EAAU;IACVM,IAAA,EAAM;IACNC,SAAA,EAAWA,CAAA,
|
|
1
|
+
{"version":3,"names":["pc","envCategories","id","name","description","required","variables","key","label","instructions","cyan","type","generator","crypto","require","randomBytes","toString","placeholder","green","yellow","default","setupTime","getCategoryById","find","cat","getRequiredCategories","filter","getOptionalCategories","getAllVariables","flatMap","getVariableByKey","v"],"sources":["../../../src/utils/env-categories.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,EAAA,MAAQ;AAIR,MAAMC,aAAA,GAA+B,CAC1C;EACEC,EAAA,EAAI;EACJC,IAAA,EAAM;EACNC,WAAA,EAAa;EACbC,QAAA,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