gencow 0.1.187 → 0.1.188
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/bin/gencow.mjs +34 -3
- package/core/index.js +25 -0
- package/dashboard/assets/{index-CFHaaHZs.js → index-ChaGpUmo.js} +34 -34
- package/dashboard/index.html +1 -1
- package/lib/app-command.mjs +45 -26
- package/lib/app-delete-operation.mjs +129 -0
- package/lib/app-response-error.mjs +24 -0
- package/lib/backup-command.mjs +7 -5
- package/lib/canonical-bundle-config.mjs +82 -0
- package/lib/cli-dev-runtime.mjs +2 -2
- package/lib/cli-project-runtime.mjs +114 -71
- package/lib/cloud-targets.mjs +12 -1
- package/lib/codegen-command.mjs +79 -15
- package/lib/coding-guardrails.mjs +13 -1
- package/lib/cron-manifest.mjs +25 -17
- package/lib/cron-source-structure.mjs +102 -0
- package/lib/db-command.mjs +8 -4
- package/lib/db-push-command.mjs +12 -4
- package/lib/deploy-auditor.mjs +12 -29
- package/lib/deploy-bundle-staging.mjs +132 -0
- package/lib/deploy-command.mjs +19 -1
- package/lib/deploy-dependency-compat.mjs +10 -92
- package/lib/deploy-package-claim.mjs +31 -18
- package/lib/deploy-package-runtime.mjs +165 -182
- package/lib/deploy-project-metadata.mjs +22 -0
- package/lib/deploy-runtime.mjs +178 -21
- package/lib/deploy-static-fullstack-runtime.mjs +84 -29
- package/lib/deployment-operation-poll.mjs +78 -0
- package/lib/dev-cloud-bundle.mjs +63 -14
- package/lib/dev-cloud-command.mjs +56 -27
- package/lib/dev-cloud-migrations.mjs +8 -7
- package/lib/dev-local-command.mjs +47 -29
- package/lib/doctor-command.mjs +188 -13
- package/lib/domain-command.mjs +32 -7
- package/lib/files-command.mjs +14 -1
- package/lib/jobs-command.mjs +25 -4
- package/lib/migration-bundle-manifest.mjs +38 -12
- package/lib/platform-client.mjs +2 -0
- package/lib/project-context.mjs +298 -0
- package/lib/project-metadata-runtime.mjs +168 -0
- package/lib/project-schema-deployment-preview.mjs +25 -7
- package/lib/readme-codegen.mjs +8 -0
- package/lib/release-client.mjs +134 -0
- package/lib/release-source-package.mjs +257 -0
- package/lib/runtime-bom-api-contract.mjs +71 -0
- package/lib/runtime-bom-resolve.mjs +257 -0
- package/lib/runtime-bom.mjs +343 -0
- package/lib/runtime-command.mjs +273 -0
- package/lib/runtime-package-contract.mjs +53 -0
- package/lib/static-command.mjs +91 -15
- package/lib/static-deploy-command.mjs +133 -42
- package/package.json +2 -2
- package/runtime/config.mjs +63 -5
- package/runtime/server.mjs +14362 -5251
- package/runtime/server.mjs.map +4 -4
- package/runtime/tooling.mjs +1004 -411
package/bin/gencow.mjs
CHANGED
|
@@ -55,6 +55,8 @@ import { createInitCommand } from "../lib/init-command.mjs";
|
|
|
55
55
|
import { createJobsCommand } from "../lib/jobs-command.mjs";
|
|
56
56
|
import { createLogsCommand } from "../lib/logs-command.mjs";
|
|
57
57
|
import { createOriginsCommand } from "../lib/origins-command.mjs";
|
|
58
|
+
import { parseProjectSelectionArgs, setCliInvocationSelection } from "../lib/project-context.mjs";
|
|
59
|
+
import { createRuntimeCommand } from "../lib/runtime-command.mjs";
|
|
58
60
|
import { createStaticDeployRuntime } from "../lib/static-deploy-command.mjs";
|
|
59
61
|
import { createStaticCommand } from "../lib/static-command.mjs";
|
|
60
62
|
import { createTemplateMarketplaceCommand } from "../lib/template-marketplace-command.mjs";
|
|
@@ -81,6 +83,7 @@ import {
|
|
|
81
83
|
warn,
|
|
82
84
|
} from "../lib/output.mjs";
|
|
83
85
|
import { platformFetch, requireCreds, rpcMutation, rpcQuery } from "../lib/platform-client.mjs";
|
|
86
|
+
import { failReleaseAttempt, finalizeReleaseAttempt, prepareReleaseAttempt } from "../lib/release-client.mjs";
|
|
84
87
|
|
|
85
88
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
86
89
|
const CLI_PACKAGE_JSON = JSON.parse(readFileSync(resolve(__dirname, "..", "package.json"), "utf8"));
|
|
@@ -102,7 +105,10 @@ const runAddCommand = createAddCommand({
|
|
|
102
105
|
RESET,
|
|
103
106
|
YELLOW,
|
|
104
107
|
});
|
|
105
|
-
const runAppCommand = createAppCommand({
|
|
108
|
+
const runAppCommand = createAppCommand({
|
|
109
|
+
loadConfig,
|
|
110
|
+
errorImpl: (message) => console.error(`${RED} ✗${RESET} ${message}`),
|
|
111
|
+
});
|
|
106
112
|
const runBackupCommand = createBackupCommand();
|
|
107
113
|
const { login: runLoginCommand, logout: runLogoutCommand, whoami: runWhoamiCommand } = createAuthCommands();
|
|
108
114
|
const runCodegenCommand = createCodegenCommand({
|
|
@@ -129,14 +135,17 @@ const runDoctorCommand = createDoctorCommand({
|
|
|
129
135
|
loadConfig,
|
|
130
136
|
logImpl: log,
|
|
131
137
|
infoImpl: info,
|
|
138
|
+
warnImpl: warn,
|
|
132
139
|
errorImpl: error,
|
|
133
140
|
successImpl: success,
|
|
134
141
|
exitImpl: (code) => process.exit(code),
|
|
135
142
|
cwdImpl: () => process.cwd(),
|
|
136
143
|
BOLD,
|
|
137
144
|
CYAN,
|
|
145
|
+
DIM,
|
|
138
146
|
RESET,
|
|
139
147
|
});
|
|
148
|
+
const runRuntimeCommand = createRuntimeCommand();
|
|
140
149
|
const {
|
|
141
150
|
dbReset: runDbResetCommand,
|
|
142
151
|
dbSeed: runDbSeedCommand,
|
|
@@ -226,8 +235,12 @@ const runStaticDeployRuntime = createStaticDeployRuntime({
|
|
|
226
235
|
cliVersion: CLI_VERSION,
|
|
227
236
|
cwdImpl: () => process.cwd(),
|
|
228
237
|
drizzleKitCmdImpl: _drizzleKitCmd,
|
|
238
|
+
loadConfigImpl: loadConfig,
|
|
229
239
|
verifyAppReadyImpl: verifyAppReady,
|
|
230
240
|
updateEnvLocalUrlImpl: updateEnvLocalUrl,
|
|
241
|
+
prepareReleaseAttemptImpl: prepareReleaseAttempt,
|
|
242
|
+
finalizeReleaseAttemptImpl: finalizeReleaseAttempt,
|
|
243
|
+
failReleaseAttemptImpl: failReleaseAttempt,
|
|
231
244
|
});
|
|
232
245
|
const runDeployCommand = createDeployCommand({
|
|
233
246
|
buildEnvImpl: buildEnv,
|
|
@@ -255,6 +268,9 @@ const runDeployCommand = createDeployCommand({
|
|
|
255
268
|
verifyAppReadyImpl: verifyAppReady,
|
|
256
269
|
writeFileSyncImpl: writeFileSync,
|
|
257
270
|
updateEnvLocalUrlImpl: updateEnvLocalUrl,
|
|
271
|
+
prepareReleaseAttemptImpl: prepareReleaseAttempt,
|
|
272
|
+
finalizeReleaseAttemptImpl: finalizeReleaseAttempt,
|
|
273
|
+
failReleaseAttemptImpl: failReleaseAttempt,
|
|
258
274
|
});
|
|
259
275
|
const runDomainCommand = createDomainCommand();
|
|
260
276
|
const runEnvCommand = createEnvCommand();
|
|
@@ -291,6 +307,7 @@ const runLogsCommand = createLogsCommand({ loadConfig });
|
|
|
291
307
|
const runOriginsCommand = createOriginsCommand();
|
|
292
308
|
const runStaticCommand = createStaticCommand({
|
|
293
309
|
cwdImpl: () => process.cwd(),
|
|
310
|
+
loadConfigImpl: loadConfig,
|
|
294
311
|
requireCredsImpl: requireCreds,
|
|
295
312
|
runStaticDeployRuntimeImpl: runStaticDeployRuntime,
|
|
296
313
|
});
|
|
@@ -352,9 +369,15 @@ ${BOLD}Quick Start:${RESET}
|
|
|
352
369
|
${DIM}--template, -t Select template (default, task-app, admin-tool, fullstack, ai-chat)${RESET}
|
|
353
370
|
${DIM}--force, -f Initialize in non-empty directory (preserves existing files)${RESET}
|
|
354
371
|
${GREEN}add <comp...>${RESET} Add components ${DIM}(AI Agent RAG Tools Memory ...)${RESET}
|
|
355
|
-
${GREEN}codegen${RESET} Generate
|
|
372
|
+
${GREEN}codegen${RESET} Generate client codegen artifacts from schema
|
|
356
373
|
${DIM}--outdir, -o Output directory (default: src/gencow/)${RESET}
|
|
374
|
+
${DIM}--target NAME Select declared codegen client${RESET}
|
|
357
375
|
${GREEN}doctor${RESET} Run pre-run source diagnostics
|
|
376
|
+
${DIM}--plan/--diff/--fix backend autofix; --no-sync skips BOM rewrite${RESET}
|
|
377
|
+
${GREEN}runtime list${RESET} List runtime releases ${DIM}(marks current tip)${RESET}
|
|
378
|
+
${GREEN}runtime show${RESET} Show managed BOM package versions
|
|
379
|
+
${GREEN}runtime check${RESET} Compare package.json against runtime BOM
|
|
380
|
+
${GREEN}runtime sync${RESET} Align managed dependency versions to BOM
|
|
358
381
|
|
|
359
382
|
${BOLD}Commands (login required):${RESET}
|
|
360
383
|
${GREEN}login${RESET} Login to Gencow Platform ${DIM}(browser → token)${RESET}
|
|
@@ -372,6 +395,8 @@ ${BOLD}Commands (login required):${RESET}
|
|
|
372
395
|
${DIM}--prod Seed production app (confirmation required)${RESET}
|
|
373
396
|
${GREEN}static [dir]${RESET} Deploy static files only ${DIM}(dist/, out/, build/)${RESET}
|
|
374
397
|
${DIM}--prod Deploy to production app${RESET}
|
|
398
|
+
${DIM}--client NAME Select declared client workspace${RESET}
|
|
399
|
+
${DIM}--frontend NAME Compatibility alias for --client${RESET}
|
|
375
400
|
${DIM}--force, -f Skip optional dependency scan${RESET}
|
|
376
401
|
${GREEN}templates publish${RESET} Publish current project as a marketplace template
|
|
377
402
|
${DIM}--title, --slug, --price, --private, --unlisted${RESET}
|
|
@@ -491,6 +516,9 @@ ${BOLD}Examples:${RESET}
|
|
|
491
516
|
// ── doctor — 실행 전 소스 진단 ────────────────────
|
|
492
517
|
doctor: runDoctorCommand,
|
|
493
518
|
|
|
519
|
+
// ── runtime — BOM list/show/check/sync ─────────────
|
|
520
|
+
runtime: runRuntimeCommand,
|
|
521
|
+
|
|
494
522
|
// ── app (subcommands: create, list, delete) ────────
|
|
495
523
|
app: runAppCommand,
|
|
496
524
|
|
|
@@ -533,7 +561,10 @@ ${BOLD}Examples:${RESET}
|
|
|
533
561
|
|
|
534
562
|
// ─── updateReadme: gencow/ 폴더 스캔 → README에 컴포넌트 문서 자동 추가 ────
|
|
535
563
|
|
|
536
|
-
const [, , rawCmd = "help", ...
|
|
564
|
+
const [, , rawCmd = "help", ...rawArgs] = process.argv;
|
|
565
|
+
const globalProjectSelection = parseProjectSelectionArgs(rawArgs);
|
|
566
|
+
setCliInvocationSelection(globalProjectSelection);
|
|
567
|
+
const args = [...globalProjectSelection.remainingArgs];
|
|
537
568
|
const cmd =
|
|
538
569
|
rawCmd === "--help" || rawCmd === "-h"
|
|
539
570
|
? "help"
|
package/core/index.js
CHANGED
|
@@ -2979,6 +2979,7 @@ var RESERVED_TENANT_RUNTIME_ENV_KEYS = [
|
|
|
2979
2979
|
"GENCOW_PLATFORM_URL",
|
|
2980
2980
|
"GENCOW_PLATFORM_INTERNAL_URL",
|
|
2981
2981
|
"GENCOW_PLATFORM_INTERNAL_URL_ALT",
|
|
2982
|
+
"GENCOW_REALTIME_GATEWAY_INTERNAL_URL",
|
|
2982
2983
|
"GENCOW_PLATFORM_DB",
|
|
2983
2984
|
"GENCOW_MANAGED_PUBLIC_ORIGINS",
|
|
2984
2985
|
"PLATFORM_OPENAI_KEY",
|
|
@@ -2986,6 +2987,18 @@ var RESERVED_TENANT_RUNTIME_ENV_KEYS = [
|
|
|
2986
2987
|
"PLATFORM_GOOGLE_CLIENT_ID",
|
|
2987
2988
|
"PLATFORM_GOOGLE_CLIENT_SECRET",
|
|
2988
2989
|
"PLATFORM_INTERNAL_SECRET",
|
|
2990
|
+
"STRIPE_SECRET_KEY",
|
|
2991
|
+
"STRIPE_WEBHOOK_SECRET",
|
|
2992
|
+
"TOSS_BILLING_CLIENT_KEY",
|
|
2993
|
+
"TOSS_BILLING_SECRET_KEY",
|
|
2994
|
+
"TOSS_BILLING_WEBHOOK_SECRET",
|
|
2995
|
+
"GENCOW_BILLING_STRIPE_MODE",
|
|
2996
|
+
"GENCOW_BILLING_STRIPE_ENVIRONMENT",
|
|
2997
|
+
"GENCOW_BILLING_STRIPE_EXPECTED_ACCOUNT_ID",
|
|
2998
|
+
"GENCOW_BILLING_STRIPE_API_VERSION",
|
|
2999
|
+
"GENCOW_BILLING_NEW_CHECKOUT_PROVIDER",
|
|
3000
|
+
"GENCOW_BILLING_STRIPE_ANNUAL_ENABLED",
|
|
3001
|
+
"GENCOW_BILLING_STRIPE_CANARY_USER_IDS",
|
|
2989
3002
|
"INVITE_ONLY",
|
|
2990
3003
|
"RUNNER_TYPE",
|
|
2991
3004
|
"COWBOX_PROFILE",
|
|
@@ -2993,6 +3006,8 @@ var RESERVED_TENANT_RUNTIME_ENV_KEYS = [
|
|
|
2993
3006
|
"PGBOUNCER_PORT",
|
|
2994
3007
|
"DIRECT_PG_PORT",
|
|
2995
3008
|
"GENCOW_DIRECT_DATABASE_URL",
|
|
3009
|
+
"GENCOW_CATALOG_READ_DATABASE_URL",
|
|
3010
|
+
"GENCOW_DIRECT_DDL_DATABASE_URL",
|
|
2996
3011
|
"DIRECT_DATABASE_URL",
|
|
2997
3012
|
"GENCOW_APP_USER_PASS",
|
|
2998
3013
|
"GENCOW_DDL_USER_PASS",
|
|
@@ -3016,10 +3031,15 @@ var RESERVED_TENANT_RUNTIME_ENV_KEYS = [
|
|
|
3016
3031
|
"GENCOW_BACKUP_RETENTION_V2_EFFECTIVE_AT",
|
|
3017
3032
|
"GENCOW_MIGRATIONS",
|
|
3018
3033
|
"GENCOW_APP_NAME",
|
|
3034
|
+
"GENCOW_MANAGED_RUNTIME",
|
|
3019
3035
|
"GENCOW_APP_DATA_DIR",
|
|
3020
3036
|
"GENCOW_RUNTIME_COMPATIBILITY",
|
|
3021
3037
|
"GENCOW_RUNTIME_RELEASE_ID",
|
|
3022
3038
|
"GENCOW_RUNTIME_RELEASE_DIR",
|
|
3039
|
+
"GENCOW_RUNTIME_GENERATION_DIR",
|
|
3040
|
+
"GENCOW_APP_RUNTIME_DIR",
|
|
3041
|
+
"GENCOW_APP_OWNED_DEPS_DIR",
|
|
3042
|
+
"GENCOW_RUNTIME_RUNTIME_DIR",
|
|
3023
3043
|
"GENCOW_RUNTIME_NODE_MODULES",
|
|
3024
3044
|
"GENCOW_INTERNAL_TOKEN",
|
|
3025
3045
|
"GENCOW_CRON_TOKEN",
|
|
@@ -3035,8 +3055,10 @@ var RESERVED_TENANT_RUNTIME_ENV_KEYS = [
|
|
|
3035
3055
|
"GENCOW_SHUTDOWN_MARKER_PATH",
|
|
3036
3056
|
"GENCOW_SKIP_MIGRATION",
|
|
3037
3057
|
"GENCOW_DB_MAX_CONNECTIONS",
|
|
3058
|
+
"GENCOW_DB_POOL_POLICY_VERSION",
|
|
3038
3059
|
"GENCOW_DB_IDLE_TIMEOUT_SECONDS",
|
|
3039
3060
|
"GENCOW_DB_CONNECTION_TIMEOUT_SECONDS",
|
|
3061
|
+
"GENCOW_DB_OPERATION_TIMEOUT_MS",
|
|
3040
3062
|
"GENCOW_MEMORY_MB",
|
|
3041
3063
|
"BUN_JSC_forceRAMSize",
|
|
3042
3064
|
"MIMALLOC_PURGE_DELAY",
|
|
@@ -3046,12 +3068,15 @@ var RESERVED_TENANT_RUNTIME_ENV_KEY_SET = new Set(RESERVED_TENANT_RUNTIME_ENV_KE
|
|
|
3046
3068
|
var RESERVED_TENANT_RUNTIME_ENV_PREFIXES = [
|
|
3047
3069
|
"__GENCOW_",
|
|
3048
3070
|
"GENCOW_CONTROL_PLANE_",
|
|
3071
|
+
"GENCOW_BUILDER_",
|
|
3049
3072
|
"GENCOW_PLATFORM_STORAGE_",
|
|
3073
|
+
"GENCOW_RELEASE_",
|
|
3050
3074
|
"GENCOW_DOCUMENT_",
|
|
3051
3075
|
"GENCOW_TEMPLATE_",
|
|
3052
3076
|
"GENCOW_WARM_",
|
|
3053
3077
|
"GENCOW_DIRECT_RUNNER_",
|
|
3054
3078
|
"GENCOW_RUNTIME_PINNING_",
|
|
3079
|
+
"GENCOW_FUNCTION_TIMEOUT_RESTART_",
|
|
3055
3080
|
"GENCOW_COWBOX_"
|
|
3056
3081
|
];
|
|
3057
3082
|
function isReservedTenantRuntimeEnvKey(key) {
|