gencow 0.1.145 → 0.1.146

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.
Files changed (40) hide show
  1. package/core/index.js +22 -5
  2. package/dashboard/assets/{index-DX9dDxtT.js → index-7pP-gCcL.js} +3 -3
  3. package/dashboard/index.html +1 -1
  4. package/lib/add-command.mjs +9 -3
  5. package/lib/backup-command.mjs +27 -12
  6. package/lib/cli-dev-runtime.mjs +76 -4
  7. package/lib/cli-project-runtime.mjs +37 -30
  8. package/lib/codegen/index.mjs +10110 -217
  9. package/lib/codegen-command.mjs +29 -4
  10. package/lib/coding-guardrails.mjs +9 -2
  11. package/lib/config-command.mjs +5 -2
  12. package/lib/cors-command.mjs +6 -2
  13. package/lib/db-command.mjs +8 -9
  14. package/lib/deploy-auditor.mjs +229 -9
  15. package/lib/deploy-command.mjs +1 -7
  16. package/lib/deploy-package-runtime.mjs +30 -17
  17. package/lib/deploy-runtime.mjs +7 -4
  18. package/lib/deploy-static-fullstack-runtime.mjs +3 -1
  19. package/lib/dev-cloud-bundle.mjs +128 -0
  20. package/lib/dev-cloud-command.mjs +18 -12
  21. package/lib/env-command.mjs +10 -3
  22. package/lib/files-command.mjs +6 -7
  23. package/lib/init-command.mjs +15 -8
  24. package/lib/jobs-command.mjs +12 -0
  25. package/lib/readme-codegen.mjs +2 -0
  26. package/lib/static-command.mjs +14 -4
  27. package/lib/static-deploy-command.mjs +33 -11
  28. package/package.json +3 -2
  29. package/scripts/pre-publish-check.mjs +26 -1
  30. package/server/index.js +6714 -48306
  31. package/server/index.js.map +4 -4
  32. package/templates/SECURITY.md +8 -1
  33. package/templates/ai-chat/ai.ts +5 -3
  34. package/templates/ai.ts +5 -3
  35. package/templates/auth-schema.ts +2 -2
  36. package/templates/auth.ts +20 -1
  37. package/templates/fullstack/ai.ts +5 -3
  38. package/templates/rag.ts +6 -16
  39. package/templates/reranker.ts +3 -1
  40. package/templates/search.ts +9 -12
package/core/index.js CHANGED
@@ -1502,7 +1502,17 @@ var DEFAULT_GROUNDING_BUDGET = {
1502
1502
  };
1503
1503
 
1504
1504
  // ../core/src/rag-schema.ts
1505
- import { bigint, boolean, doublePrecision, integer, jsonb, pgTable, text, timestamp, vector } from "drizzle-orm/pg-core";
1505
+ import {
1506
+ bigint,
1507
+ boolean,
1508
+ doublePrecision,
1509
+ integer,
1510
+ jsonb,
1511
+ pgTable,
1512
+ text,
1513
+ timestamp,
1514
+ vector
1515
+ } from "drizzle-orm/pg-core";
1506
1516
  function buildScopeColumns() {
1507
1517
  return {
1508
1518
  id: text("id").primaryKey(),
@@ -2105,7 +2115,7 @@ function createScheduler(options) {
2105
2115
  }
2106
2116
  return {
2107
2117
  runAfter(ms, action, args, scheduleOpts) {
2108
- const id = generateId();
2118
+ const id = scheduleOpts?.id ?? generateId();
2109
2119
  const jobEntry = {
2110
2120
  id,
2111
2121
  action,
@@ -2931,7 +2941,7 @@ function workflow(name, options) {
2931
2941
  lifecycleTimeoutMs,
2932
2942
  maxRetries
2933
2943
  });
2934
- const scheduledJobId = ctx.scheduler.runAfter(0, resumeAction, { workflowId });
2944
+ const scheduledJobId = insertedWorkflowV2 ? `start:${workflowId}` : ctx.scheduler.runAfter(0, resumeAction, { workflowId });
2935
2945
  return {
2936
2946
  id: workflowId,
2937
2947
  name,
@@ -3025,12 +3035,19 @@ var RESERVED_TENANT_RUNTIME_ENV_KEYS = /* @__PURE__ */ new Set([
3025
3035
  "GENCOW_SHUTDOWN_MARKER_PATH",
3026
3036
  "GENCOW_SKIP_MIGRATION",
3027
3037
  "GENCOW_DB_MAX_CONNECTIONS",
3038
+ "GENCOW_DB_IDLE_TIMEOUT_SECONDS",
3039
+ "GENCOW_DB_CONNECTION_TIMEOUT_SECONDS",
3028
3040
  "GENCOW_MEMORY_MB",
3029
3041
  "BUN_JSC_forceRAMSize",
3030
3042
  "MIMALLOC_PURGE_DELAY",
3031
3043
  "NODE_PATH"
3032
3044
  ]);
3033
- var RESERVED_TENANT_RUNTIME_ENV_PREFIXES = ["__GENCOW_", "GENCOW_DOCUMENT_", "GENCOW_TEMPLATE_", "GENCOW_WARM_"];
3045
+ var RESERVED_TENANT_RUNTIME_ENV_PREFIXES = [
3046
+ "__GENCOW_",
3047
+ "GENCOW_DOCUMENT_",
3048
+ "GENCOW_TEMPLATE_",
3049
+ "GENCOW_WARM_"
3050
+ ];
3034
3051
  function isReservedTenantRuntimeEnvKey(key) {
3035
3052
  const normalized = key.trim();
3036
3053
  return RESERVED_TENANT_RUNTIME_ENV_KEYS.has(normalized) || RESERVED_TENANT_RUNTIME_ENV_PREFIXES.some((prefix) => normalized.startsWith(prefix));
@@ -3094,7 +3111,7 @@ function intervalToPattern(options) {
3094
3111
 
3095
3112
  // ../core/src/auth-config.ts
3096
3113
  function defineAuth(config) {
3097
- return config;
3114
+ return { ...config, provider: config.provider ?? "better-auth" };
3098
3115
  }
3099
3116
 
3100
3117
  // ../core/src/config.ts