@amerged/ohmyhost-mcp 0.1.31 → 0.1.33
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/README.md +1 -1
- package/dist/{chunk-QHKLOHN4.js → chunk-YM2ZQAGS.js} +8 -8
- package/dist/index.js +1 -1
- package/dist/stdio-main.js +430 -121
- package/package.json +1 -1
- package/src/apps/mcp/package.json +1 -1
- package/src/apps/product-cli/package.json +1 -1
- package/src/apps/product-cli/src/composition.ts +2 -1
- package/src/apps/product-cli/src/repository-init.ts +443 -713
- package/src/apps/product-cli/src/runtime-contract.ts +18 -5
- package/src/packages/agent-skills/src/generated-skill-resources.ts +7 -7
- package/src/packages/contracts/package.json +10 -0
- package/src/packages/contracts/src/framework-admission-corpus.ts +487 -0
- package/src/packages/contracts/src/framework-admission.ts +641 -197
- package/src/packages/contracts/src/framework-build-script.mjs +155 -13
- package/src/packages/contracts/src/framework-build-script.ts +15 -1
- package/src/packages/contracts/src/framework-source-rules.ts +1118 -0
- package/src/packages/contracts/src/operation-failure.ts +22 -4
- package/src/packages/contracts/src/problem-policy.ts +2 -2
- package/src/packages/sdk-ts/package.json +1 -1
- package/src/packages/sdk-ts/src/generated/sdk.gen.ts +1 -1
- package/src/packages/sdk-ts/src/generated/types.gen.ts +8 -0
package/dist/stdio-main.js
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
serverIdentityOf,
|
|
31
31
|
setNegotiatedProtocolVersion,
|
|
32
32
|
validateEnvelopeMeta
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-YM2ZQAGS.js";
|
|
34
34
|
|
|
35
35
|
// node_modules/.pnpm/ignore@7.0.12/node_modules/ignore/index.js
|
|
36
36
|
var require_ignore = __commonJS({
|
|
@@ -162,16 +162,16 @@ var require_ignore = __commonJS({
|
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
var NEVER_MATCH = "[]";
|
|
165
|
-
var
|
|
165
|
+
var PLACEHOLDER2 = "\0";
|
|
166
166
|
var REGEX_RESTORE_PLACEHOLDER = new RegExp(
|
|
167
|
-
`${
|
|
167
|
+
`${PLACEHOLDER2}(\\d+)${PLACEHOLDER2}`,
|
|
168
168
|
"g"
|
|
169
169
|
);
|
|
170
170
|
var TRAILING_WILDCARD = "\uE000";
|
|
171
171
|
var TRAILING_DOUBLESTAR = "\uE001";
|
|
172
172
|
var extractBrackets = (pattern) => {
|
|
173
173
|
const sources = [];
|
|
174
|
-
const hold = (source) => `${
|
|
174
|
+
const hold = (source) => `${PLACEHOLDER2}${sources.push(source) - 1}${PLACEHOLDER2}`;
|
|
175
175
|
const { length } = pattern;
|
|
176
176
|
let out = EMPTY;
|
|
177
177
|
let index = 0;
|
|
@@ -189,8 +189,8 @@ var require_ignore = __commonJS({
|
|
|
189
189
|
);
|
|
190
190
|
}
|
|
191
191
|
index += 2;
|
|
192
|
-
} else if (char ===
|
|
193
|
-
out += hold(`[${
|
|
192
|
+
} else if (char === PLACEHOLDER2) {
|
|
193
|
+
out += hold(`[${PLACEHOLDER2}]`);
|
|
194
194
|
index++;
|
|
195
195
|
} else if (char === "[") {
|
|
196
196
|
const scanned = scanBracket(pattern, index);
|
|
@@ -20232,6 +20232,398 @@ function toError(value) {
|
|
|
20232
20232
|
return value instanceof Error ? value : new Error(String(value));
|
|
20233
20233
|
}
|
|
20234
20234
|
|
|
20235
|
+
// packages/contracts/dist/framework-build-script.mjs
|
|
20236
|
+
var PINNED_BUN_VERSION = "1.2.22";
|
|
20237
|
+
var FRAMEWORK_VERSION_POLICY = Object.freeze({
|
|
20238
|
+
next: Object.freeze({ floors: Object.freeze(["15.5.27", "16.3.8"]), denied: Object.freeze([]) }),
|
|
20239
|
+
vite: Object.freeze({ floors: Object.freeze(["5.4.6"]), denied: Object.freeze([]) }),
|
|
20240
|
+
"@tanstack/react-start": Object.freeze({
|
|
20241
|
+
floors: Object.freeze(["1.168.60"]),
|
|
20242
|
+
denied: Object.freeze([])
|
|
20243
|
+
})
|
|
20244
|
+
});
|
|
20245
|
+
|
|
20246
|
+
// packages/contracts/dist/customer-auth-admission.js
|
|
20247
|
+
function managedCustomerAuthDatabaseMessage(path2) {
|
|
20248
|
+
return `"${path2}" selects the managed Better Auth bridge, which requires the managed PostgreSQL database. Set database.enabled: true with an admitted migrations path, or set auth.provider: none and keep the application-owned authentication configuration. Commit and push the change, then plan the new commit.`;
|
|
20249
|
+
}
|
|
20250
|
+
|
|
20251
|
+
// packages/contracts/dist/framework-admission.js
|
|
20252
|
+
var ADMISSION_DIAGNOSTIC_CODES = Object.freeze({
|
|
20253
|
+
ambiguous_config: "framework_config_ambiguous",
|
|
20254
|
+
ambiguous_lockfile: "lockfile_ambiguous",
|
|
20255
|
+
invalid_package_manager: "package_manager_invalid",
|
|
20256
|
+
missing_lockfile: "lockfile_missing",
|
|
20257
|
+
missing_package_manager: "package_manager_missing",
|
|
20258
|
+
package_manager_lockfile_mismatch: "package_manager_lockfile_mismatch",
|
|
20259
|
+
package_manager_version_unsupported: "package_manager_version_unsupported"
|
|
20260
|
+
});
|
|
20261
|
+
var PACKAGE_MANAGER_CONTRACTS = Object.freeze({
|
|
20262
|
+
bun: Object.freeze({
|
|
20263
|
+
lockfiles: Object.freeze(["bun.lock", "bun.lockb"]),
|
|
20264
|
+
installCommand: "bun install --frozen-lockfile --ignore-scripts",
|
|
20265
|
+
buildCommand: "bun run build"
|
|
20266
|
+
}),
|
|
20267
|
+
npm: Object.freeze({
|
|
20268
|
+
lockfiles: Object.freeze(["package-lock.json"]),
|
|
20269
|
+
installCommand: "npm ci --ignore-scripts",
|
|
20270
|
+
buildCommand: "npm run build"
|
|
20271
|
+
}),
|
|
20272
|
+
pnpm: Object.freeze({
|
|
20273
|
+
lockfiles: Object.freeze(["pnpm-lock.yaml"]),
|
|
20274
|
+
installCommand: "pnpm install --frozen-lockfile --ignore-scripts",
|
|
20275
|
+
buildCommand: "pnpm run build"
|
|
20276
|
+
}),
|
|
20277
|
+
yarn: Object.freeze({
|
|
20278
|
+
lockfiles: Object.freeze(["yarn.lock"]),
|
|
20279
|
+
installCommand: "yarn install --immutable --mode=skip-build",
|
|
20280
|
+
buildCommand: "yarn run build"
|
|
20281
|
+
})
|
|
20282
|
+
});
|
|
20283
|
+
var ALL_LOCKFILES = Object.freeze(Object.values(PACKAGE_MANAGER_CONTRACTS).flatMap(({ lockfiles }) => lockfiles));
|
|
20284
|
+
var PACKAGE_MANIFEST = "package.json";
|
|
20285
|
+
var STABLE_VERSION_SOURCE = "(?:0|[1-9][0-9]{0,5})\\.(?:0|[1-9][0-9]{0,5})\\.(?:0|[1-9][0-9]{0,5})";
|
|
20286
|
+
var VERSION_RANGE = new RegExp(`^([~^])(${STABLE_VERSION_SOURCE})$`, "u");
|
|
20287
|
+
var RESOLVED_VERSION_SOURCE = `${STABLE_VERSION_SOURCE}(?:-[0-9A-Za-z.-]{1,32})?`;
|
|
20288
|
+
var RESOLVED_VERSION_FIELD = anchoredPattern(RESOLVED_VERSION_SOURCE);
|
|
20289
|
+
var DECLARED_VERSION_FIELD = anchoredPattern(`[~^]?${RESOLVED_VERSION_SOURCE}`);
|
|
20290
|
+
var STABLE_VERSION_FIELD = anchoredPattern(STABLE_VERSION_SOURCE);
|
|
20291
|
+
var FRAMEWORK_VERSION_PACKAGES = Object.freeze([
|
|
20292
|
+
"next",
|
|
20293
|
+
"vite",
|
|
20294
|
+
"@tanstack/react-start"
|
|
20295
|
+
]);
|
|
20296
|
+
var FRAMEWORK_DEPENDENCY_PACKAGES = Object.freeze([
|
|
20297
|
+
"next",
|
|
20298
|
+
"react",
|
|
20299
|
+
"react-dom",
|
|
20300
|
+
"vite",
|
|
20301
|
+
"@tanstack/react-start",
|
|
20302
|
+
"@tanstack/react-router",
|
|
20303
|
+
"@vitejs/plugin-react",
|
|
20304
|
+
"@cloudflare/vite-plugin"
|
|
20305
|
+
]);
|
|
20306
|
+
var REACT_PACKAGES = Object.freeze(["react", "react-dom"]);
|
|
20307
|
+
var BUILD_FRAMEWORKS = Object.freeze(["nextjs", "vite-static", "tanstack-start"]);
|
|
20308
|
+
var PUSH_AND_PLAN = "Commit and push the change, then plan the new commit.";
|
|
20309
|
+
var VITE_BUILD_SCRIPT = '"vite build", optionally joined with && to one "tsc", "tsc -b", "tsc --build" or "tsc --noEmit" stage';
|
|
20310
|
+
var FRAMEWORK_CONVERSION_DETAILS = Object.freeze({
|
|
20311
|
+
managed_auth_database_required: {
|
|
20312
|
+
paths: ["repository_config"],
|
|
20313
|
+
template: managedCustomerAuthDatabaseMessage("{{path}}")
|
|
20314
|
+
},
|
|
20315
|
+
database_binding_private: {
|
|
20316
|
+
paths: ["module"],
|
|
20317
|
+
template: `"{{path}}" reads a database connection string (DATABASE_URL, HYPERDRIVE, connectionString or a postgres:// URL); none reaches a customer Worker. Call the database with createPrivateDatabaseClient from "@ohmyhost/customer-runtime/database". ${PUSH_AND_PLAN}`
|
|
20318
|
+
},
|
|
20319
|
+
database_driver_unsupported: {
|
|
20320
|
+
paths: ["module"],
|
|
20321
|
+
template: `"{{path}}" imports a database socket driver (pg, postgres, pg-native or mysql2); customer Workers cannot open sockets. Call the database with createPrivateDatabaseClient from "@ohmyhost/customer-runtime/database". ${PUSH_AND_PLAN}`
|
|
20322
|
+
},
|
|
20323
|
+
source_syntax_invalid: {
|
|
20324
|
+
paths: ["module"],
|
|
20325
|
+
template: 'Invalid JavaScript or TypeScript in "{{path}}". Fix the file, commit and push the change, then plan the new commit.'
|
|
20326
|
+
},
|
|
20327
|
+
worker_module_default_export_required: {
|
|
20328
|
+
paths: ["module"],
|
|
20329
|
+
template: `Worker module "{{path}}" has no default export. Export default { fetch, scheduled } with the handlers ohmyho.st invokes; named exports are never called. ${PUSH_AND_PLAN}`
|
|
20330
|
+
},
|
|
20331
|
+
scheduled_handler_required: {
|
|
20332
|
+
paths: ["module"],
|
|
20333
|
+
template: 'functions.crons is declared but "{{path}}" exports no scheduled handler. Add scheduled(controller, env, ctx) to its default export, commit and push the change, then plan the new commit.'
|
|
20334
|
+
},
|
|
20335
|
+
framework_base_path_unsupported: {
|
|
20336
|
+
paths: ["framework_config"],
|
|
20337
|
+
template: `"{{path}}" sets a Vite base. ohmyho.st serves the app at the root origin: remove base or set base: "/". ${PUSH_AND_PLAN}`
|
|
20338
|
+
},
|
|
20339
|
+
tanstack_prerender_required: {
|
|
20340
|
+
paths: ["framework_config"],
|
|
20341
|
+
template: `"{{path}}" does not call tanstackStart({ prerender: { enabled: true } }), which the static TanStack Start runtime needs; enable prerender, or set runtime.mode: edge with the Cloudflare Vite plugin. ${PUSH_AND_PLAN}`
|
|
20342
|
+
},
|
|
20343
|
+
tanstack_vite_plugins_required: {
|
|
20344
|
+
paths: ["framework_config"],
|
|
20345
|
+
template: `"{{path}}" does not follow the TanStack Start plugin contract: import tanstackStart from "@tanstack/react-start/plugin/vite"; on runtime edge also import cloudflare from "@cloudflare/vite-plugin" and call cloudflare({ viteEnvironment: { name: "ssr" } }) before tanstackStart(); on runtime static do not import the Cloudflare plugin. ${PUSH_AND_PLAN}`
|
|
20346
|
+
},
|
|
20347
|
+
next_tailwind_turbopack_only: {
|
|
20348
|
+
paths: ["framework_config"],
|
|
20349
|
+
template: `"{{path}}" loads Tailwind CSS through the Turbopack rule "@tailwindcss/turbopack", which the Webpack build on ohmyho.st ignores, and the application root has no PostCSS configuration that Webpack reads, so the site would deploy without its Tailwind classes. Add postcss.config.mjs to the application root with export default { plugins: { "@tailwindcss/postcss": {} } } and remove the Turbopack rule. Use the package manager to add @tailwindcss/postcss to devDependencies at the same version as tailwindcss and to remove @tailwindcss/turbopack, so the lockfile records both. ${PUSH_AND_PLAN}`
|
|
20350
|
+
},
|
|
20351
|
+
framework_version_unsupported: {
|
|
20352
|
+
paths: ["manifest", "lockfile"],
|
|
20353
|
+
fields: {
|
|
20354
|
+
package: FRAMEWORK_VERSION_PACKAGES,
|
|
20355
|
+
version: DECLARED_VERSION_FIELD,
|
|
20356
|
+
minimum: STABLE_VERSION_FIELD
|
|
20357
|
+
},
|
|
20358
|
+
derived: { verb: { from: "path", text: { manifest: "declares", lockfile: "resolves" } } },
|
|
20359
|
+
template: '"{{path}}" {{verb}} {{package}} {{version}}, which ohmyho.st does not admit; use {{package}} {{minimum}} or a later stable release, update package.json and the lockfile, commit and push the change, then plan the new commit.'
|
|
20360
|
+
},
|
|
20361
|
+
framework_version_declaration_unsupported: {
|
|
20362
|
+
paths: ["manifest"],
|
|
20363
|
+
fields: { package: FRAMEWORK_VERSION_PACKAGES },
|
|
20364
|
+
template: '"{{path}}" declares {{package}} in a form ohmyho.st cannot check against its security minimum; declare an exact X.Y.Z version or a ^X.Y.Z or ~X.Y.Z range, update the lockfile, commit and push the change, then plan the new commit.'
|
|
20365
|
+
},
|
|
20366
|
+
framework_dependency_required: {
|
|
20367
|
+
paths: ["manifest"],
|
|
20368
|
+
fields: { package: FRAMEWORK_DEPENDENCY_PACKAGES },
|
|
20369
|
+
template: '"{{path}}" does not declare {{package}} in dependencies, which this framework and runtime need. Add it with the package manager so the lockfile records it, commit and push the change, then plan the new commit.'
|
|
20370
|
+
},
|
|
20371
|
+
react_version_exact_required: {
|
|
20372
|
+
paths: ["manifest"],
|
|
20373
|
+
fields: { package: REACT_PACKAGES },
|
|
20374
|
+
template: '"{{path}}" must declare {{package}} in dependencies at an exact version such as 19.1.0, without ^ or ~, for Next.js. Pin the version the lockfile installs, commit and push the change, then plan the new commit.'
|
|
20375
|
+
},
|
|
20376
|
+
build_script_unsupported: {
|
|
20377
|
+
paths: ["manifest"],
|
|
20378
|
+
fields: { framework: BUILD_FRAMEWORKS },
|
|
20379
|
+
derived: {
|
|
20380
|
+
script: {
|
|
20381
|
+
from: "framework",
|
|
20382
|
+
text: {
|
|
20383
|
+
nextjs: 'exactly "next build" or "next build --webpack"; ohmyho.st adds the OpenNext build itself',
|
|
20384
|
+
"vite-static": VITE_BUILD_SCRIPT,
|
|
20385
|
+
"tanstack-start": VITE_BUILD_SCRIPT
|
|
20386
|
+
}
|
|
20387
|
+
}
|
|
20388
|
+
},
|
|
20389
|
+
template: '"{{path}}" scripts.build is missing or not admitted for the {{framework}} adapter: it must be {{script}}. Move other steps into their own scripts, commit and push the change, then plan the new commit.'
|
|
20390
|
+
},
|
|
20391
|
+
better_auth_version_required: {
|
|
20392
|
+
paths: ["manifest"],
|
|
20393
|
+
template: '"{{path}}" must declare better-auth at exactly 1.7.1 in dependencies because ohmyhost.yaml sets auth.provider: better-auth. Pin that version or set auth.provider: none, commit and push the change, then plan the new commit.'
|
|
20394
|
+
},
|
|
20395
|
+
package_manifest_invalid: {
|
|
20396
|
+
paths: ["manifest"],
|
|
20397
|
+
template: '"{{path}}" is missing or is not one JSON object. Add package.json in the applicationRoot that ohmyhost.yaml names, or fix its syntax so the whole file parses as one object; commit and push the change, then plan the new commit.'
|
|
20398
|
+
},
|
|
20399
|
+
framework_unsupported: {
|
|
20400
|
+
paths: ["manifest"],
|
|
20401
|
+
template: `"{{path}}" declares none of next, vite or @tanstack/react-start. Add the app's framework to dependencies, or set runtime.mode: functions in ohmyhost.yaml and add src/ohmyhost/worker.ts. ${PUSH_AND_PLAN}`
|
|
20402
|
+
},
|
|
20403
|
+
framework_ambiguous: {
|
|
20404
|
+
paths: ["manifest"],
|
|
20405
|
+
template: '"{{path}}" declares next together with vite or @tanstack/react-start, so ohmyho.st cannot choose one framework. Remove the packages of the framework this application does not use, commit and push the change, then plan the new commit.'
|
|
20406
|
+
},
|
|
20407
|
+
lockfile_missing: {
|
|
20408
|
+
paths: ["manifest"],
|
|
20409
|
+
template: '"{{path}}" has no lockfile beside it. Install with the packageManager it names so package-lock.json, pnpm-lock.yaml, yarn.lock or bun.lock is written, commit and push the change, then plan the new commit.'
|
|
20410
|
+
},
|
|
20411
|
+
lockfile_ambiguous: {
|
|
20412
|
+
paths: ["manifest"],
|
|
20413
|
+
template: '"{{path}}" has more than one lockfile beside it. Keep only the lockfile of the packageManager it names and delete the others, commit and push the change, then plan the new commit.'
|
|
20414
|
+
},
|
|
20415
|
+
package_manager_missing: {
|
|
20416
|
+
paths: ["manifest"],
|
|
20417
|
+
template: '"{{path}}" has no packageManager field. Set it to name@X.Y.Z for the npm, pnpm, yarn or bun version that wrote the lockfile, commit and push the change, then plan the new commit.'
|
|
20418
|
+
},
|
|
20419
|
+
package_manager_invalid: {
|
|
20420
|
+
paths: ["manifest"],
|
|
20421
|
+
template: '"{{path}}" sets packageManager to a value ohmyho.st cannot use. Write npm, pnpm, yarn or bun, then @ and an exact X.Y.Z version without a +sha suffix, matching the lockfile; commit and push the change, then plan the new commit.'
|
|
20422
|
+
},
|
|
20423
|
+
package_manager_lockfile_mismatch: {
|
|
20424
|
+
paths: ["lockfile"],
|
|
20425
|
+
template: '"{{path}}" was not written by the packageManager that package.json names. Set packageManager to the manager of this lockfile, or replace the lockfile with one from the named manager; commit and push the change, then plan the new commit.'
|
|
20426
|
+
},
|
|
20427
|
+
package_manager_version_unsupported: {
|
|
20428
|
+
paths: ["manifest"],
|
|
20429
|
+
template: `"{{path}}" pins a Bun version other than ${PINNED_BUN_VERSION}, the only Bun ohmyho.st builds with. Set packageManager to bun@${PINNED_BUN_VERSION}, reinstall to update the lockfile, commit and push the change, then plan the new commit.`
|
|
20430
|
+
},
|
|
20431
|
+
repository_configuration_invalid: {
|
|
20432
|
+
paths: ["repository_config"],
|
|
20433
|
+
template: '"{{path}}" does not match the ohmyho.st configuration schema. Run ohmyhost init --dry-run --json locally to see the exact field and fix, commit and push the change, then plan the new commit.'
|
|
20434
|
+
},
|
|
20435
|
+
runtime_mode_unsupported: {
|
|
20436
|
+
paths: ["repository_config"],
|
|
20437
|
+
fields: { framework: BUILD_FRAMEWORKS },
|
|
20438
|
+
derived: {
|
|
20439
|
+
mode: {
|
|
20440
|
+
from: "framework",
|
|
20441
|
+
text: {
|
|
20442
|
+
nextjs: "runtime.mode: edge",
|
|
20443
|
+
"vite-static": "runtime.mode: edge with src/ohmyhost/companion.ts when database, auth, mail, storage or functions.crons is set, and static otherwise",
|
|
20444
|
+
"tanstack-start": "runtime.mode: edge, or static without functions.crons and storage"
|
|
20445
|
+
}
|
|
20446
|
+
}
|
|
20447
|
+
},
|
|
20448
|
+
template: `"{{path}}" sets a runtime.mode that the {{framework}} adapter cannot run with this configuration; use {{mode}}. ${PUSH_AND_PLAN}`
|
|
20449
|
+
},
|
|
20450
|
+
build_output_unsupported: {
|
|
20451
|
+
paths: ["repository_config"],
|
|
20452
|
+
fields: { framework: BUILD_FRAMEWORKS },
|
|
20453
|
+
derived: {
|
|
20454
|
+
output: {
|
|
20455
|
+
from: "framework",
|
|
20456
|
+
text: {
|
|
20457
|
+
nextjs: ".open-next/assets",
|
|
20458
|
+
"vite-static": "dist",
|
|
20459
|
+
"tanstack-start": "dist/client"
|
|
20460
|
+
}
|
|
20461
|
+
}
|
|
20462
|
+
},
|
|
20463
|
+
template: `"{{path}}" sets a build.output that the {{framework}} adapter does not produce; set build.output: {{output}}. ${PUSH_AND_PLAN}`
|
|
20464
|
+
},
|
|
20465
|
+
build_command_mismatch: {
|
|
20466
|
+
paths: ["repository_config"],
|
|
20467
|
+
template: '"{{path}}" build.install or build.command differs from the commands of the packageManager in package.json (for npm: npm ci --ignore-scripts and npm run build). ohmyhost init --dry-run --json prints the exact values; set them, commit and push the change, then plan the new commit.'
|
|
20468
|
+
},
|
|
20469
|
+
build_option_unsupported: {
|
|
20470
|
+
paths: ["repository_config"],
|
|
20471
|
+
template: '"{{path}}" sets a build option this runtime ignores: build.ssg_cache_max_mib applies only to Next.js, and runtime.mode: functions takes only build.install. Remove the option, commit and push the change, then plan the new commit.'
|
|
20472
|
+
},
|
|
20473
|
+
application_root_missing: {
|
|
20474
|
+
paths: ["repository_config"],
|
|
20475
|
+
template: `"{{path}}" sets applicationRoot to a directory that is missing or empty in this commit. Set it to the directory that holds the app's package.json, or "." for the repository root; commit and push the change, then plan the new commit.`
|
|
20476
|
+
},
|
|
20477
|
+
framework_config_required: {
|
|
20478
|
+
paths: ["framework_config"],
|
|
20479
|
+
template: 'This application has no "{{path}}". Add one framework config with that name and a .js, .mjs or .ts extension that exports its config as default, commit and push the change, then plan the new commit.'
|
|
20480
|
+
},
|
|
20481
|
+
framework_config_ambiguous: {
|
|
20482
|
+
paths: ["framework_config"],
|
|
20483
|
+
template: '"{{path}}" exists beside another variant with the same name and a .js, .mjs or .ts extension. Keep exactly one and delete the others, commit and push the change, then plan the new commit.'
|
|
20484
|
+
},
|
|
20485
|
+
framework_config_too_large: {
|
|
20486
|
+
paths: ["framework_config"],
|
|
20487
|
+
template: '"{{path}}" is larger than the 256 KiB ohmyho.st inspects. Keep the config small and move large data into imported modules, commit and push the change, then plan the new commit.'
|
|
20488
|
+
},
|
|
20489
|
+
framework_config_default_export_required: {
|
|
20490
|
+
paths: ["framework_config"],
|
|
20491
|
+
template: '"{{path}}" does not export its config as default. Use export default (next.config.js may assign module.exports instead), commit and push the change, then plan the new commit.'
|
|
20492
|
+
},
|
|
20493
|
+
next_output_unsupported: {
|
|
20494
|
+
paths: ["framework_config"],
|
|
20495
|
+
template: '"{{path}}" sets output: "export" or output: "standalone", which the Next.js edge runtime on ohmyho.st cannot serve. Remove the output setting, commit and push the change, then plan the new commit.'
|
|
20496
|
+
},
|
|
20497
|
+
next_base_path_unsupported: {
|
|
20498
|
+
paths: ["framework_config"],
|
|
20499
|
+
template: `"{{path}}" sets basePath or assetPrefix. ohmyho.st serves the app at the root origin: remove both or set them to "". ${PUSH_AND_PLAN}`
|
|
20500
|
+
},
|
|
20501
|
+
companion_entry_required: {
|
|
20502
|
+
paths: ["module"],
|
|
20503
|
+
template: '"{{path}}" is missing. A Vite app with runtime.mode: edge or with database, auth, mail, storage or functions.crons needs this Worker module with export default { fetch }. Add it, or use runtime.mode: static without those settings; commit and push the change, then plan the new commit.'
|
|
20504
|
+
},
|
|
20505
|
+
worker_module_required: {
|
|
20506
|
+
paths: ["module"],
|
|
20507
|
+
template: '"{{path}}" is missing. runtime.mode: functions and functions.crons on Next.js or TanStack Start need this Worker module; export default { fetch, scheduled } with the handlers ohmyho.st invokes. Add it, commit and push the change, then plan the new commit.'
|
|
20508
|
+
},
|
|
20509
|
+
worker_module_fetch_handler_required: {
|
|
20510
|
+
paths: ["module"],
|
|
20511
|
+
template: `Worker module "{{path}}" exports no fetch handler; runtime.mode: functions serves every request and the health check through it. Add a fetch handler that receives request, env and ctx to its default export. ${PUSH_AND_PLAN}`
|
|
20512
|
+
}
|
|
20513
|
+
});
|
|
20514
|
+
var DETAIL_DEFINITIONS = FRAMEWORK_CONVERSION_DETAILS;
|
|
20515
|
+
var PLACEHOLDER = /\{\{([a-z]+)\}\}/gu;
|
|
20516
|
+
var PATH_PATTERN = "[A-Za-z0-9_@()[\\]./${}-]{1,240}";
|
|
20517
|
+
var SAFE_PATH = new RegExp(`^${PATH_PATTERN}$`, "u");
|
|
20518
|
+
var MODULE_PATH = /^[A-Za-z0-9_@()[\]./${}-]+\.(?:[cm]?[jt]sx?)$/u;
|
|
20519
|
+
var FRAMEWORK_CONFIG_NAME = /^(?:next|open-next|vite)\.config\.(?:js|mjs|ts)$/u;
|
|
20520
|
+
var MAXIMUM_DETAIL_LENGTH = 2e3;
|
|
20521
|
+
var DETAIL_PATTERNS = Object.freeze(Object.entries(DETAIL_DEFINITIONS).map(([code, definition]) => Object.freeze({
|
|
20522
|
+
code,
|
|
20523
|
+
pattern: detailPattern(definition)
|
|
20524
|
+
})));
|
|
20525
|
+
function anchoredPattern(source) {
|
|
20526
|
+
return new RegExp(`^(?:${source})$`, "u");
|
|
20527
|
+
}
|
|
20528
|
+
function escapePattern(text) {
|
|
20529
|
+
return text.replace(/[\\^$.*+?()[\]{}|]/gu, "\\$&");
|
|
20530
|
+
}
|
|
20531
|
+
function detailPattern(definition) {
|
|
20532
|
+
const placed = /* @__PURE__ */ new Set();
|
|
20533
|
+
let pattern = "^";
|
|
20534
|
+
let offset = 0;
|
|
20535
|
+
for (const match of definition.template.matchAll(PLACEHOLDER)) {
|
|
20536
|
+
const name = match[1];
|
|
20537
|
+
pattern += escapePattern(definition.template.slice(offset, match.index));
|
|
20538
|
+
pattern += placed.has(name) ? `\\k<${name}>` : `(?<${name}>${placeholderPattern(definition, name)})`;
|
|
20539
|
+
placed.add(name);
|
|
20540
|
+
offset = match.index + match[0].length;
|
|
20541
|
+
}
|
|
20542
|
+
return new RegExp(`${pattern}${escapePattern(definition.template.slice(offset))}$`, "u");
|
|
20543
|
+
}
|
|
20544
|
+
function placeholderPattern(definition, name) {
|
|
20545
|
+
if (name === "path")
|
|
20546
|
+
return PATH_PATTERN;
|
|
20547
|
+
const grammar = definition.fields?.[name];
|
|
20548
|
+
if (grammar instanceof RegExp)
|
|
20549
|
+
return grammar.source.slice(1, -1);
|
|
20550
|
+
const values = grammar ?? Object.values(definition.derived?.[name]?.text ?? {});
|
|
20551
|
+
if (values.length === 0)
|
|
20552
|
+
throw new TypeError("Framework conversion detail template is invalid");
|
|
20553
|
+
return `(?:${[...new Set(values)].map(escapePattern).join("|")})`;
|
|
20554
|
+
}
|
|
20555
|
+
function pathClassOf(definition, path2) {
|
|
20556
|
+
if (path2 === "ohmyhost.yaml" && definition.paths.includes("repository_config"))
|
|
20557
|
+
return "repository_config";
|
|
20558
|
+
if (!SAFE_PATH.test(path2) || path2.split("/").some((segment) => segment === "" || segment === "." || segment === ".."))
|
|
20559
|
+
return null;
|
|
20560
|
+
const leaf = path2.slice(path2.lastIndexOf("/") + 1);
|
|
20561
|
+
return definition.paths.find((pathClass) => pathClass === "module" && MODULE_PATH.test(path2) || pathClass === "manifest" && leaf === PACKAGE_MANIFEST || pathClass === "lockfile" && ALL_LOCKFILES.includes(leaf) || pathClass === "framework_config" && FRAMEWORK_CONFIG_NAME.test(leaf)) ?? null;
|
|
20562
|
+
}
|
|
20563
|
+
function fieldMatches(grammar, value) {
|
|
20564
|
+
if (typeof value !== "string")
|
|
20565
|
+
return false;
|
|
20566
|
+
return grammar instanceof RegExp ? grammar.test(value) : grammar.includes(value);
|
|
20567
|
+
}
|
|
20568
|
+
function isFrameworkConversionDiagnosticCode(value) {
|
|
20569
|
+
return typeof value === "string" && Object.hasOwn(DETAIL_DEFINITIONS, value);
|
|
20570
|
+
}
|
|
20571
|
+
function parseFrameworkConversionDiagnostic(value) {
|
|
20572
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
20573
|
+
return null;
|
|
20574
|
+
const record7 = value;
|
|
20575
|
+
const code = Object.hasOwn(record7, "code") ? record7["code"] : void 0;
|
|
20576
|
+
const path2 = Object.hasOwn(record7, "path") ? record7["path"] : void 0;
|
|
20577
|
+
if (!isFrameworkConversionDiagnosticCode(code) || typeof path2 !== "string")
|
|
20578
|
+
return null;
|
|
20579
|
+
const definition = DETAIL_DEFINITIONS[code];
|
|
20580
|
+
const fields = Object.entries(definition.fields ?? {}).map(([name, grammar]) => [name, grammar, Object.hasOwn(record7, name) ? record7[name] : void 0]);
|
|
20581
|
+
if (Object.keys(record7).length !== fields.length + 2 || pathClassOf(definition, path2) === null || fields.some(([, grammar, field]) => !fieldMatches(grammar, field)))
|
|
20582
|
+
return null;
|
|
20583
|
+
return Object.freeze(Object.fromEntries([
|
|
20584
|
+
["code", code],
|
|
20585
|
+
["path", path2],
|
|
20586
|
+
...fields.map(([name, , field]) => [name, field])
|
|
20587
|
+
]));
|
|
20588
|
+
}
|
|
20589
|
+
function renderDetail(diagnostic) {
|
|
20590
|
+
const definition = DETAIL_DEFINITIONS[diagnostic.code];
|
|
20591
|
+
const values = diagnostic;
|
|
20592
|
+
const pathClass = pathClassOf(definition, diagnostic.path);
|
|
20593
|
+
return definition.template.replace(PLACEHOLDER, (_placeholder, name) => {
|
|
20594
|
+
const derived = definition.derived?.[name];
|
|
20595
|
+
const value = derived === void 0 ? values[name] : derived.text[String(derived.from === "path" ? pathClass : values[derived.from])];
|
|
20596
|
+
if (typeof value !== "string")
|
|
20597
|
+
throw new TypeError("Framework conversion diagnostic is invalid");
|
|
20598
|
+
return value;
|
|
20599
|
+
});
|
|
20600
|
+
}
|
|
20601
|
+
function frameworkConversionDetail(value) {
|
|
20602
|
+
const diagnostic = parseFrameworkConversionDiagnostic(value);
|
|
20603
|
+
return diagnostic === null ? null : renderDetail(diagnostic);
|
|
20604
|
+
}
|
|
20605
|
+
function frameworkConversionDiagnosticFromDetail(value) {
|
|
20606
|
+
if (typeof value !== "string" || value.length > MAXIMUM_DETAIL_LENGTH)
|
|
20607
|
+
return null;
|
|
20608
|
+
for (const { code, pattern } of DETAIL_PATTERNS) {
|
|
20609
|
+
const groups = pattern.exec(value)?.groups;
|
|
20610
|
+
if (groups === void 0)
|
|
20611
|
+
continue;
|
|
20612
|
+
const diagnostic = parseFrameworkConversionDiagnostic({
|
|
20613
|
+
code,
|
|
20614
|
+
path: groups["path"],
|
|
20615
|
+
...Object.fromEntries(Object.keys(DETAIL_DEFINITIONS[code].fields ?? {}).map((name) => [name, groups[name]]))
|
|
20616
|
+
});
|
|
20617
|
+
if (diagnostic !== null && renderDetail(diagnostic) === value)
|
|
20618
|
+
return diagnostic;
|
|
20619
|
+
}
|
|
20620
|
+
return null;
|
|
20621
|
+
}
|
|
20622
|
+
function parseFrameworkConversionDetail(value) {
|
|
20623
|
+
const diagnostic = frameworkConversionDiagnosticFromDetail(value);
|
|
20624
|
+
return diagnostic === null ? null : renderDetail(diagnostic);
|
|
20625
|
+
}
|
|
20626
|
+
|
|
20235
20627
|
// packages/contracts/dist/operation-failure.js
|
|
20236
20628
|
var failures = {
|
|
20237
20629
|
authorization_changed: [
|
|
@@ -20348,7 +20740,7 @@ var failures = {
|
|
|
20348
20740
|
],
|
|
20349
20741
|
auto_deploy_plan_rejected: [
|
|
20350
20742
|
"The GitHub push could not be planned for deployment.",
|
|
20351
|
-
"Read
|
|
20743
|
+
"Read error.detail: it names the file, the rule and the required change. Make that change, commit and push it; the next push is planned again. Without error.detail, plan the pushed commit explicitly with 'ohmyhost plan --project ULID --commit SHA --json' or MCP deployment_plan to read the reason. Replaying this failed operation cannot start a build."
|
|
20352
20744
|
],
|
|
20353
20745
|
promotion_source_stale: [
|
|
20354
20746
|
"The Dev deployment changed before promotion could start.",
|
|
@@ -20369,11 +20761,18 @@ function publicOperationReconciliation(observation) {
|
|
|
20369
20761
|
suggested_action: observation.state === "required" ? "Confirm reconciliation of this same operation; preserve its existing build and resources. Do not submit another deployment." : "Reconciliation is running. Poll this same operation after 60 seconds; do not start another reconciliation or deployment."
|
|
20370
20762
|
});
|
|
20371
20763
|
}
|
|
20372
|
-
function publicOperationFailure(internalCode) {
|
|
20764
|
+
function publicOperationFailure(internalCode, diagnostic) {
|
|
20373
20765
|
const normalized = internalCode.toLowerCase();
|
|
20374
20766
|
const code = Object.hasOwn(failures, normalized) ? normalized : "operation_failed";
|
|
20375
20767
|
const [message, suggested_action] = failures[code];
|
|
20376
|
-
|
|
20768
|
+
const detail = code === "auto_deploy_plan_rejected" ? frameworkConversionDetail(diagnostic) : null;
|
|
20769
|
+
return Object.freeze({
|
|
20770
|
+
code,
|
|
20771
|
+
message,
|
|
20772
|
+
retryable: false,
|
|
20773
|
+
suggested_action,
|
|
20774
|
+
...detail === null ? {} : { detail }
|
|
20775
|
+
});
|
|
20377
20776
|
}
|
|
20378
20777
|
|
|
20379
20778
|
// packages/contracts/dist/managed-sources.js
|
|
@@ -21211,111 +21610,6 @@ function invalid2() {
|
|
|
21211
21610
|
throw new TypeError("Project data change plan is invalid");
|
|
21212
21611
|
}
|
|
21213
21612
|
|
|
21214
|
-
// packages/contracts/dist/customer-auth-admission.js
|
|
21215
|
-
function managedCustomerAuthDatabaseMessage(path2) {
|
|
21216
|
-
return `"${path2}" selects the managed Better Auth bridge, which requires the managed PostgreSQL database. Set database.enabled: true with an admitted migrations path, or set auth.provider: none and keep the application-owned authentication configuration. Commit and push the change, then plan the new commit.`;
|
|
21217
|
-
}
|
|
21218
|
-
|
|
21219
|
-
// packages/contracts/dist/framework-admission.js
|
|
21220
|
-
var PACKAGE_MANAGER_CONTRACTS = Object.freeze({
|
|
21221
|
-
bun: Object.freeze({
|
|
21222
|
-
lockfiles: Object.freeze(["bun.lock", "bun.lockb"]),
|
|
21223
|
-
installCommand: "bun install --frozen-lockfile --ignore-scripts",
|
|
21224
|
-
buildCommand: "bun run build"
|
|
21225
|
-
}),
|
|
21226
|
-
npm: Object.freeze({
|
|
21227
|
-
lockfiles: Object.freeze(["package-lock.json"]),
|
|
21228
|
-
installCommand: "npm ci --ignore-scripts",
|
|
21229
|
-
buildCommand: "npm run build"
|
|
21230
|
-
}),
|
|
21231
|
-
pnpm: Object.freeze({
|
|
21232
|
-
lockfiles: Object.freeze(["pnpm-lock.yaml"]),
|
|
21233
|
-
installCommand: "pnpm install --frozen-lockfile --ignore-scripts",
|
|
21234
|
-
buildCommand: "pnpm run build"
|
|
21235
|
-
}),
|
|
21236
|
-
yarn: Object.freeze({
|
|
21237
|
-
lockfiles: Object.freeze(["yarn.lock"]),
|
|
21238
|
-
installCommand: "yarn install --immutable --mode=skip-build",
|
|
21239
|
-
buildCommand: "yarn run build"
|
|
21240
|
-
})
|
|
21241
|
-
});
|
|
21242
|
-
var ALL_LOCKFILES = Object.freeze(Object.values(PACKAGE_MANAGER_CONTRACTS).flatMap(({ lockfiles }) => lockfiles));
|
|
21243
|
-
var VERIFIED_VERSIONS = Object.freeze({
|
|
21244
|
-
vite: /* @__PURE__ */ new Set(["5.4.21", "8.0.16", "8.2.2"]),
|
|
21245
|
-
"tanstack-start": /* @__PURE__ */ new Set(["1.168.26", "1.168.49"]),
|
|
21246
|
-
nextjs: /* @__PURE__ */ new Set(["15.5.26", "16.3.8"])
|
|
21247
|
-
});
|
|
21248
|
-
var PUSH_AND_PLAN = "Commit and push the change, then plan the new commit.";
|
|
21249
|
-
var FRAMEWORK_CONVERSION_DETAILS = Object.freeze({
|
|
21250
|
-
managed_auth_database_required: Object.freeze({
|
|
21251
|
-
render: managedCustomerAuthDatabaseMessage,
|
|
21252
|
-
pattern: /^"([^"]+)" selects the managed Better Auth bridge, which requires the managed PostgreSQL database\. Set database\.enabled: true with an admitted migrations path, or set auth\.provider: none and keep the application-owned authentication configuration\. Commit and push the change, then plan the new commit\.$/u
|
|
21253
|
-
}),
|
|
21254
|
-
database_binding_private: Object.freeze({
|
|
21255
|
-
render: (path2) => `"${path2}" reads a database connection string (DATABASE_URL, HYPERDRIVE, connectionString or a postgres:// URL); none reaches a customer Worker. Call the database with createPrivateDatabaseClient from "@ohmyhost/customer-runtime/database". ${PUSH_AND_PLAN}`,
|
|
21256
|
-
pattern: /^"([^"]+)" reads a database connection string \(DATABASE_URL, HYPERDRIVE, connectionString or a postgres:\/\/ URL\); none reaches a customer Worker\. Call the database with createPrivateDatabaseClient from "@ohmyhost\/customer-runtime\/database"\. Commit and push the change, then plan the new commit\.$/u
|
|
21257
|
-
}),
|
|
21258
|
-
database_driver_unsupported: Object.freeze({
|
|
21259
|
-
render: (path2) => `"${path2}" imports a database socket driver (pg, postgres, pg-native or mysql2); customer Workers cannot open sockets. Call the database with createPrivateDatabaseClient from "@ohmyhost/customer-runtime/database". ${PUSH_AND_PLAN}`,
|
|
21260
|
-
pattern: /^"([^"]+)" imports a database socket driver \(pg, postgres, pg-native or mysql2\); customer Workers cannot open sockets\. Call the database with createPrivateDatabaseClient from "@ohmyhost\/customer-runtime\/database"\. Commit and push the change, then plan the new commit\.$/u
|
|
21261
|
-
}),
|
|
21262
|
-
source_syntax_invalid: Object.freeze({
|
|
21263
|
-
render: (path2) => `Invalid JavaScript or TypeScript in "${path2}". Fix the file, commit and push the change, then plan the new commit.`,
|
|
21264
|
-
pattern: /^Invalid JavaScript or TypeScript in "([^"]+)"\. Fix the file, commit and push the change, then plan the new commit\.$/u
|
|
21265
|
-
}),
|
|
21266
|
-
worker_module_default_export_required: Object.freeze({
|
|
21267
|
-
render: (path2) => `Worker module "${path2}" has no default export. Export default { fetch, scheduled } with the handlers ohmyho.st invokes; named exports are never called. ${PUSH_AND_PLAN}`,
|
|
21268
|
-
pattern: /^Worker module "([^"]+)" has no default export\. Export default \{ fetch, scheduled \} with the handlers ohmyho\.st invokes; named exports are never called\. Commit and push the change, then plan the new commit\.$/u
|
|
21269
|
-
}),
|
|
21270
|
-
scheduled_handler_required: Object.freeze({
|
|
21271
|
-
render: (path2) => `functions.crons is declared but "${path2}" exports no scheduled handler. Add scheduled(controller, env, ctx) to its default export, commit and push the change, then plan the new commit.`,
|
|
21272
|
-
pattern: /^functions\.crons is declared but "([^"]+)" exports no scheduled handler\. Add scheduled\(controller, env, ctx\) to its default export, commit and push the change, then plan the new commit\.$/u
|
|
21273
|
-
}),
|
|
21274
|
-
framework_base_path_unsupported: Object.freeze({
|
|
21275
|
-
render: (path2) => `"${path2}" sets a Vite base. ohmyho.st serves the app at the root origin: remove base or set base: "/". ${PUSH_AND_PLAN}`,
|
|
21276
|
-
pattern: /^"([^"]+)" sets a Vite base\. ohmyho\.st serves the app at the root origin: remove base or set base: "\/"\. Commit and push the change, then plan the new commit\.$/u
|
|
21277
|
-
}),
|
|
21278
|
-
tanstack_prerender_required: Object.freeze({
|
|
21279
|
-
render: (path2) => `"${path2}" does not call tanstackStart({ prerender: { enabled: true } }), which the static TanStack Start runtime needs; enable prerender, or set runtime.mode: edge with the Cloudflare Vite plugin. ${PUSH_AND_PLAN}`,
|
|
21280
|
-
pattern: /^"([^"]+)" does not call tanstackStart\(\{ prerender: \{ enabled: true \} \}\), which the static TanStack Start runtime needs; enable prerender, or set runtime\.mode: edge with the Cloudflare Vite plugin\. Commit and push the change, then plan the new commit\.$/u
|
|
21281
|
-
}),
|
|
21282
|
-
tanstack_vite_plugins_required: Object.freeze({
|
|
21283
|
-
render: (path2) => `"${path2}" does not follow the TanStack Start plugin contract: import tanstackStart from "@tanstack/react-start/plugin/vite"; on runtime edge also import cloudflare from "@cloudflare/vite-plugin" and call cloudflare({ viteEnvironment: { name: "ssr" } }) before tanstackStart(); on runtime static do not import the Cloudflare plugin. ${PUSH_AND_PLAN}`,
|
|
21284
|
-
pattern: /^"([^"]+)" does not follow the TanStack Start plugin contract: import tanstackStart from "@tanstack\/react-start\/plugin\/vite"; on runtime edge also import cloudflare from "@cloudflare\/vite-plugin" and call cloudflare\(\{ viteEnvironment: \{ name: "ssr" \} \}\) before tanstackStart\(\); on runtime static do not import the Cloudflare plugin\. Commit and push the change, then plan the new commit\.$/u
|
|
21285
|
-
}),
|
|
21286
|
-
next_cache_components_unsupported: Object.freeze({
|
|
21287
|
-
render: (path2) => `"${path2}" sets cacheComponents: true, which ohmyho.st does not support; remove it or set it to false. ${PUSH_AND_PLAN}`,
|
|
21288
|
-
pattern: /^"([^"]+)" sets cacheComponents: true, which ohmyho\.st does not support; remove it or set it to false\. Commit and push the change, then plan the new commit\.$/u
|
|
21289
|
-
})
|
|
21290
|
-
});
|
|
21291
|
-
function isFrameworkConversionDiagnosticCode(value) {
|
|
21292
|
-
return typeof value === "string" && Object.hasOwn(FRAMEWORK_CONVERSION_DETAILS, value);
|
|
21293
|
-
}
|
|
21294
|
-
function parseFrameworkConversionDiagnostic(value) {
|
|
21295
|
-
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
21296
|
-
return null;
|
|
21297
|
-
const record7 = value;
|
|
21298
|
-
const path2 = record7["path"];
|
|
21299
|
-
const code = record7["code"];
|
|
21300
|
-
if (Object.keys(record7).length !== 2 || !isFrameworkConversionDiagnosticCode(code) || typeof path2 !== "string" || path2.length > 240 || (code === "managed_auth_database_required" ? path2 !== "ohmyhost.yaml" : !/^[A-Za-z0-9_@()[\]./-]+\.(?:[cm]?[jt]sx?)$/u.test(path2)) || path2.split("/").some((segment) => segment === "" || segment === "." || segment === ".."))
|
|
21301
|
-
return null;
|
|
21302
|
-
return Object.freeze({ code, path: path2 });
|
|
21303
|
-
}
|
|
21304
|
-
function frameworkConversionDetail(value) {
|
|
21305
|
-
const diagnostic = parseFrameworkConversionDiagnostic(value);
|
|
21306
|
-
return diagnostic === null ? null : FRAMEWORK_CONVERSION_DETAILS[diagnostic.code].render(diagnostic.path);
|
|
21307
|
-
}
|
|
21308
|
-
function parseFrameworkConversionDetail(value) {
|
|
21309
|
-
if (typeof value !== "string")
|
|
21310
|
-
return null;
|
|
21311
|
-
for (const [code, detail] of Object.entries(FRAMEWORK_CONVERSION_DETAILS)) {
|
|
21312
|
-
const match = detail.pattern.exec(value);
|
|
21313
|
-
if (match !== null)
|
|
21314
|
-
return frameworkConversionDetail({ code, path: match[1] });
|
|
21315
|
-
}
|
|
21316
|
-
return null;
|
|
21317
|
-
}
|
|
21318
|
-
|
|
21319
21613
|
// packages/contracts/dist/operation-deployment-result.js
|
|
21320
21614
|
function exactRecord(value, keys) {
|
|
21321
21615
|
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
@@ -21743,9 +22037,9 @@ var PROBLEM_POLICY = {
|
|
|
21743
22037
|
framework_conversion_required: {
|
|
21744
22038
|
status: 409,
|
|
21745
22039
|
retryable: false,
|
|
21746
|
-
action: "Read detail
|
|
22040
|
+
action: "Read detail: a catalog sentence names the file, the rule and the required change. Apply it, save or push the corrected version and plan its commit. If detail names no file, run 'ohmyhost init --dry-run --json' at that commit and apply its blockers and the matching ohmyho.st framework Skill; init lists the install, build and server-only checks it cannot run locally under pending. Repeating the unchanged source cannot fix an admission error.",
|
|
21747
22041
|
title: "Framework conversion required",
|
|
21748
|
-
restAction: "Read detail
|
|
22042
|
+
restAction: "Read detail: a catalog sentence names the file, the rule and the required change. Apply it, save or push the corrected version and plan its commit. If detail names no file, run 'ohmyhost init --dry-run --json' at that commit and apply its blockers and the matching ohmyho.st framework Skill; init lists the install, build and server-only checks it cannot run locally under pending. Repeating the unchanged source cannot fix an admission error."
|
|
21749
22043
|
},
|
|
21750
22044
|
repository_configuration_missing: {
|
|
21751
22045
|
status: 409,
|
|
@@ -22207,11 +22501,13 @@ var parseOperation = (value) => {
|
|
|
22207
22501
|
};
|
|
22208
22502
|
};
|
|
22209
22503
|
function parseOperationFailure(value) {
|
|
22210
|
-
const input = exactRecord2(value, ["code", "message", "retryable", "suggested_action"]);
|
|
22211
|
-
|
|
22504
|
+
const input = exactRecord2(value, ["code", "message", "retryable", "suggested_action", "detail"]);
|
|
22505
|
+
const detail = input["detail"];
|
|
22506
|
+
const diagnostic = detail === void 0 || input["code"] !== "auto_deploy_plan_rejected" ? null : frameworkConversionDiagnosticFromDetail(detail);
|
|
22507
|
+
if (typeof input["code"] !== "string" || !boundedString(input["message"], 1, 512) || input["retryable"] !== false || !boundedString(input["suggested_action"], 1, 500) || detail !== void 0 && diagnostic === null)
|
|
22212
22508
|
throw new ResponseContractError();
|
|
22213
|
-
const safe = publicOperationFailure(input["code"]);
|
|
22214
|
-
if (safe.code !== input["code"])
|
|
22509
|
+
const safe = publicOperationFailure(input["code"], diagnostic);
|
|
22510
|
+
if (safe.code !== input["code"] || safe.detail !== detail)
|
|
22215
22511
|
throw new ResponseContractError();
|
|
22216
22512
|
return safe;
|
|
22217
22513
|
}
|
|
@@ -22925,7 +23221,7 @@ function exact3(v, keys) {
|
|
|
22925
23221
|
// apps/product-cli/package.json
|
|
22926
23222
|
var package_default2 = {
|
|
22927
23223
|
name: "@ohmyhost/product-cli",
|
|
22928
|
-
version: "0.1.
|
|
23224
|
+
version: "0.1.33",
|
|
22929
23225
|
private: true,
|
|
22930
23226
|
ohmyhost: {
|
|
22931
23227
|
deployment: "production",
|
|
@@ -27668,7 +27964,13 @@ var GeneratedSdkProductApi = class {
|
|
|
27668
27964
|
// apps/product-cli/dist/repository-init.js
|
|
27669
27965
|
var MAXIMUM_PACKAGE_BYTES = 1024 * 1024;
|
|
27670
27966
|
var MAXIMUM_CONFIGURATION_BYTES = 64 * 1024;
|
|
27967
|
+
var MAXIMUM_INSPECTED_FILE_BYTES = 5 * 1024 * 1024;
|
|
27968
|
+
var UTF8 = new TextDecoder("utf-8", { fatal: true });
|
|
27671
27969
|
var MAXIMUM_SOURCE_BYTES = 2 * 1024 * 1024;
|
|
27970
|
+
var UNNAMED_MODULE_MESSAGES = Object.freeze({
|
|
27971
|
+
database_binding_private: 'The module at path reads a database connection string (DATABASE_URL, HYPERDRIVE, connectionString or a postgres:// URL); none reaches a customer Worker. Call the database with createPrivateDatabaseClient from "@ohmyhost/customer-runtime/database". Commit and push the change, then plan the new commit.',
|
|
27972
|
+
database_driver_unsupported: 'The module at path imports a database socket driver (pg, postgres, pg-native or mysql2); customer Workers cannot open sockets. Call the database with createPrivateDatabaseClient from "@ohmyhost/customer-runtime/database". Commit and push the change, then plan the new commit.'
|
|
27973
|
+
});
|
|
27672
27974
|
var STORAGE_RUNTIME_BINDINGS = Object.freeze([
|
|
27673
27975
|
"OHMYHOST_ENVIRONMENT_ID",
|
|
27674
27976
|
"OHMYHOST_PROJECT_ID",
|
|
@@ -27677,6 +27979,13 @@ var STORAGE_RUNTIME_BINDINGS = Object.freeze([
|
|
|
27677
27979
|
"OHMYHOST_STORAGE_KEY"
|
|
27678
27980
|
]);
|
|
27679
27981
|
var CUSTOMER_RUNTIME_SOURCE = `npm:@amerged/ohmyhost-runtime@${package_default2.version}`;
|
|
27982
|
+
var PENDING_CHECKS = Object.freeze({
|
|
27983
|
+
installed_version: "compatibility.frameworks lists a version range that no lockfile ohmyho.st reads (package-lock.json v2/v3 or pnpm-lock.yaml v6/v9) resolves. Planning admits it; after the frozen install, the build checks the installed version against the same security minimum.",
|
|
27984
|
+
frozen_install: "The build installs dependencies from the committed lockfile with the frozen install of the packageManager in package.json, without lifecycle scripts; init installs nothing.",
|
|
27985
|
+
framework_build: "The build itself (scripts.build with the ohmyho.st adapter build, or the Worker bundle of the functions runtime) runs only on ohmyho.st; a clean init does not prove that it succeeds.",
|
|
27986
|
+
reachable_runtime_sources: "Planning walks the runtime sources the build reaches for Workers-incompatible imports, database socket drivers and syntax errors; init does not walk them.",
|
|
27987
|
+
project_state: "Planning also checks the project itself, such as its region against storage.jurisdiction, shared data, the mail sender domain and credits; init runs offline without it."
|
|
27988
|
+
});
|
|
27680
27989
|
var APPLICATION_LOCKFILES = Object.freeze([
|
|
27681
27990
|
"bun.lock",
|
|
27682
27991
|
"bun.lockb",
|