gencow 0.1.170 → 0.1.172
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/lib/backup-command.mjs +18 -10
- package/lib/codegen/index.mjs +157 -150
- package/lib/component-readme.mjs +82 -10
- package/lib/deploy-dependency-compat.mjs +2 -2
- package/lib/init-command.mjs +3 -3
- package/lib/readme-codegen.mjs +11 -3
- package/package.json +1 -1
- package/server/index.js +289 -174
- package/server/index.js.map +4 -4
- package/templateFeature/agent/agent.ts +70 -71
- package/templateFeature/agent/manifest.json +4 -4
- package/templateFeature/ai/ai-provider.ts +142 -15
- package/templateFeature/ai/manifest.json +2 -0
- package/templateFeature/guardrails/guardrails.ts +141 -118
- package/templateFeature/guardrails/manifest.json +7 -5
- package/templateFeature/memory/manifest.json +7 -2
- package/templateFeature/memory/memory.ts +185 -155
- package/templateFeature/rag/manifest.json +4 -1
- package/templateFeature/rag/rag.ts +311 -267
- package/templateFeature/reranker/manifest.json +10 -5
- package/templateFeature/reranker/reranker.ts +201 -175
- package/templateFeature/tools/manifest.json +6 -5
package/lib/backup-command.mjs
CHANGED
|
@@ -80,18 +80,23 @@ function renderBackupHelp(logImpl = log, errorImpl = error, subCmd = null) {
|
|
|
80
80
|
logImpl(` gencow backup download <id> Download backup file (Pro+)\n`);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
export function buildRestoreConfirmPrompt(sourceLabel, { includeStorageRisk = false } = {}) {
|
|
84
|
+
const storageRisk = includeStorageRisk
|
|
85
|
+
? `\n ${YELLOW}⚠ 백업 파일 복원은 DB만 교체하며 storage object/blob는 함께 이동하지 않습니다.${RESET}` +
|
|
86
|
+
`\n ${DIM}기본 용도는 같은 환경 복원(prod→prod, dev→dev)입니다. 다른 환경의 dump를 복원하면 이미지/파일 참조가 깨질 수 있습니다.${RESET}`
|
|
87
|
+
: "";
|
|
88
|
+
return `\n ${YELLOW}⚠ 현재 데이터베이스가 ${sourceLabel}로 교체됩니다.${RESET}${storageRisk}\n 계속하시겠습니까? (y/N): `;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
async function promptRestoreConfirm(sourceLabel, { createInterfaceImpl, includeStorageRisk = false }) {
|
|
84
92
|
const createInterface = createInterfaceImpl ?? (await import("readline")).createInterface;
|
|
85
93
|
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
86
94
|
return await new Promise((resolveAnswer) => {
|
|
87
|
-
rl.question(
|
|
88
|
-
|
|
89
|
-
(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
resolveAnswer(normalized === "y" || normalized === "yes");
|
|
93
|
-
},
|
|
94
|
-
);
|
|
95
|
+
rl.question(buildRestoreConfirmPrompt(sourceLabel, { includeStorageRisk }), (answer) => {
|
|
96
|
+
rl.close();
|
|
97
|
+
const normalized = answer.trim().toLowerCase();
|
|
98
|
+
resolveAnswer(normalized === "y" || normalized === "yes");
|
|
99
|
+
});
|
|
95
100
|
});
|
|
96
101
|
}
|
|
97
102
|
|
|
@@ -252,7 +257,10 @@ export function createBackupCommand({
|
|
|
252
257
|
return;
|
|
253
258
|
}
|
|
254
259
|
|
|
255
|
-
const confirmed = await promptRestoreConfirm(`파일 ${filePath}`, {
|
|
260
|
+
const confirmed = await promptRestoreConfirm(`파일 ${filePath}`, {
|
|
261
|
+
createInterfaceImpl,
|
|
262
|
+
includeStorageRisk: true,
|
|
263
|
+
});
|
|
256
264
|
if (!confirmed) {
|
|
257
265
|
infoImpl("Restore cancelled.");
|
|
258
266
|
return;
|