@amerged/ohmyhost-cli 0.1.25 → 0.1.27
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/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-YOEEWHSQ.js → chunk-KTRUF6C5.js} +45 -19
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/apps/product-cli/package.json +1 -1
- package/src/apps/product-cli/src/repository-init.ts +6 -4
- package/src/apps/product-cli/src/runtime-contract.ts +9 -1
- package/src/packages/contracts/src/framework-admission.ts +3 -6
- package/src/packages/contracts/src/framework-build-script.mjs +19 -0
- package/src/packages/sdk-ts/package.json +1 -1
- package/src/packages/sdk-ts/src/generated/sdk.gen.ts +2 -2
- package/src/packages/sdk-ts/src/generated/types.gen.ts +6 -2
package/README.md
CHANGED
package/THIRD_PARTY_NOTICES.md
CHANGED
package/dist/bin.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire as __ohmyhostCreateRequire } from "node:module"; const require = __ohmyhostCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
runProductionCli
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KTRUF6C5.js";
|
|
6
6
|
import "./chunk-7D2RFLWM.js";
|
|
7
7
|
|
|
8
8
|
// apps/product-cli/dist/bin.js
|
|
@@ -3080,12 +3080,13 @@ var require_data = __commonJS({
|
|
|
3080
3080
|
}
|
|
3081
3081
|
});
|
|
3082
3082
|
|
|
3083
|
-
// node_modules/.pnpm/fast-uri@3.1.
|
|
3083
|
+
// node_modules/.pnpm/fast-uri@3.1.7/node_modules/fast-uri/lib/utils.js
|
|
3084
3084
|
var require_utils = __commonJS({
|
|
3085
|
-
"node_modules/.pnpm/fast-uri@3.1.
|
|
3085
|
+
"node_modules/.pnpm/fast-uri@3.1.7/node_modules/fast-uri/lib/utils.js"(exports, module) {
|
|
3086
3086
|
"use strict";
|
|
3087
3087
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
3088
3088
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
3089
|
+
var isPort = RegExp.prototype.test.bind(/^\d*$/u);
|
|
3089
3090
|
var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
|
|
3090
3091
|
var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
|
|
3091
3092
|
var isPathCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u);
|
|
@@ -3551,8 +3552,12 @@ var require_utils = __commonJS({
|
|
|
3551
3552
|
uriTokens.push(host);
|
|
3552
3553
|
}
|
|
3553
3554
|
if (typeof component.port === "number" || typeof component.port === "string") {
|
|
3555
|
+
const port = String(component.port);
|
|
3556
|
+
if (!isPort(port)) {
|
|
3557
|
+
throw new TypeError("URI port is malformed.");
|
|
3558
|
+
}
|
|
3554
3559
|
uriTokens.push(":");
|
|
3555
|
-
uriTokens.push(
|
|
3560
|
+
uriTokens.push(port);
|
|
3556
3561
|
}
|
|
3557
3562
|
return uriTokens.length ? uriTokens.join("") : void 0;
|
|
3558
3563
|
}
|
|
@@ -3577,9 +3582,9 @@ var require_utils = __commonJS({
|
|
|
3577
3582
|
}
|
|
3578
3583
|
});
|
|
3579
3584
|
|
|
3580
|
-
// node_modules/.pnpm/fast-uri@3.1.
|
|
3585
|
+
// node_modules/.pnpm/fast-uri@3.1.7/node_modules/fast-uri/lib/schemes.js
|
|
3581
3586
|
var require_schemes = __commonJS({
|
|
3582
|
-
"node_modules/.pnpm/fast-uri@3.1.
|
|
3587
|
+
"node_modules/.pnpm/fast-uri@3.1.7/node_modules/fast-uri/lib/schemes.js"(exports, module) {
|
|
3583
3588
|
"use strict";
|
|
3584
3589
|
var { isUUID } = require_utils();
|
|
3585
3590
|
var URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;
|
|
@@ -3788,9 +3793,9 @@ var require_schemes = __commonJS({
|
|
|
3788
3793
|
}
|
|
3789
3794
|
});
|
|
3790
3795
|
|
|
3791
|
-
// node_modules/.pnpm/fast-uri@3.1.
|
|
3796
|
+
// node_modules/.pnpm/fast-uri@3.1.7/node_modules/fast-uri/index.js
|
|
3792
3797
|
var require_fast_uri = __commonJS({
|
|
3793
|
-
"node_modules/.pnpm/fast-uri@3.1.
|
|
3798
|
+
"node_modules/.pnpm/fast-uri@3.1.7/node_modules/fast-uri/index.js"(exports, module) {
|
|
3794
3799
|
"use strict";
|
|
3795
3800
|
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
3796
3801
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
@@ -3995,12 +4000,15 @@ var require_fast_uri = __commonJS({
|
|
|
3995
4000
|
}
|
|
3996
4001
|
return false;
|
|
3997
4002
|
}
|
|
4003
|
+
function isIPLiteral(host) {
|
|
4004
|
+
return host[0] === "[" && host[host.length - 1] === "]";
|
|
4005
|
+
}
|
|
3998
4006
|
function hasMalformedComponentPercentEncoding(matches) {
|
|
3999
4007
|
const host = matches[4];
|
|
4000
|
-
return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !(host
|
|
4008
|
+
return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
|
|
4001
4009
|
}
|
|
4002
4010
|
function canonicalizeHost(parsed, options, schemeHandler, isIP) {
|
|
4003
|
-
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && parsed.host
|
|
4011
|
+
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
4004
4012
|
try {
|
|
4005
4013
|
parsed.host = new URL("http://" + parsed.host).hostname;
|
|
4006
4014
|
} catch (e) {
|
|
@@ -4087,10 +4095,11 @@ var require_fast_uri = __commonJS({
|
|
|
4087
4095
|
if (parsed.host) {
|
|
4088
4096
|
const ipv4result = isIPv4(parsed.host);
|
|
4089
4097
|
if (ipv4result === false) {
|
|
4090
|
-
const bracketedIPLiteral = parsed.host
|
|
4098
|
+
const bracketedIPLiteral = isIPLiteral(parsed.host);
|
|
4099
|
+
const hasIPLiteralBracket = parsed.host.indexOf("[") !== -1 || parsed.host.indexOf("]") !== -1;
|
|
4091
4100
|
const ipv6result = normalizeIPv6(parsed.host);
|
|
4092
4101
|
isIP = ipv6result.isIPV6 || ipv6result.isIPVFuture === true;
|
|
4093
|
-
malformedIPLiteral =
|
|
4102
|
+
malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
|
|
4094
4103
|
parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
|
|
4095
4104
|
if (malformedIPLiteral) {
|
|
4096
4105
|
parsed.error = parsed.error || "URI host is malformed.";
|
|
@@ -4113,7 +4122,9 @@ var require_fast_uri = __commonJS({
|
|
|
4113
4122
|
parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
|
|
4114
4123
|
}
|
|
4115
4124
|
const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
|
|
4116
|
-
|
|
4125
|
+
if (!malformedIPLiteral) {
|
|
4126
|
+
malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP);
|
|
4127
|
+
}
|
|
4117
4128
|
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
|
|
4118
4129
|
if (uri.indexOf("%") !== -1) {
|
|
4119
4130
|
if (parsed.host !== void 0 && !malformedIPLiteral) {
|
|
@@ -16991,6 +17002,19 @@ function hasControlCharacter(value, multiline) {
|
|
|
16991
17002
|
|
|
16992
17003
|
// packages/contracts/dist/framework-build-script.mjs
|
|
16993
17004
|
var PINNED_BUN_VERSION = "1.2.22";
|
|
17005
|
+
function isAdmittedNextVersion(version2) {
|
|
17006
|
+
if (typeof version2 !== "string")
|
|
17007
|
+
return false;
|
|
17008
|
+
const match = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/u.exec(version2);
|
|
17009
|
+
if (match === null)
|
|
17010
|
+
return false;
|
|
17011
|
+
const major = Number(match[1]);
|
|
17012
|
+
const minor = Number(match[2]);
|
|
17013
|
+
const patch = Number(match[3]);
|
|
17014
|
+
if (![major, minor, patch].every(Number.isSafeInteger))
|
|
17015
|
+
return false;
|
|
17016
|
+
return major === 15 && minor === 5 && patch >= 26 || major === 16 && minor === 3 && patch >= 6 && patch <= 7;
|
|
17017
|
+
}
|
|
16994
17018
|
var TYPESCRIPT_BUILD_STAGE = /^tsc(?:[ \t]+(?:--noEmit|-b|--build))?$/u;
|
|
16995
17019
|
function isAdmittedFrameworkBuildScript(framework, script) {
|
|
16996
17020
|
if (typeof script !== "string")
|
|
@@ -17099,7 +17123,7 @@ function resolveFrameworkConfig(basename2, files) {
|
|
|
17099
17123
|
var VERIFIED_VERSIONS = Object.freeze({
|
|
17100
17124
|
vite: /* @__PURE__ */ new Set(["5.4.21", "8.0.16", "8.2.2"]),
|
|
17101
17125
|
"tanstack-start": /* @__PURE__ */ new Set(["1.168.26", "1.168.49"]),
|
|
17102
|
-
nextjs: /* @__PURE__ */ new Set(["15.5.
|
|
17126
|
+
nextjs: /* @__PURE__ */ new Set(["15.5.26", "16.3.7"])
|
|
17103
17127
|
});
|
|
17104
17128
|
function classifyFrameworkVersion(framework, version2) {
|
|
17105
17129
|
const parsed = parseVersionSpec(version2);
|
|
@@ -17128,7 +17152,7 @@ function insideAdmittedWindow(framework, version2) {
|
|
|
17128
17152
|
case "tanstack-start":
|
|
17129
17153
|
return compareVersions(version2, [1, 168, 26]) >= 0 && compareVersions(version2, [1, 168, 49]) <= 0;
|
|
17130
17154
|
case "nextjs":
|
|
17131
|
-
return
|
|
17155
|
+
return isAdmittedNextVersion(version2.join("."));
|
|
17132
17156
|
}
|
|
17133
17157
|
}
|
|
17134
17158
|
function compareVersions(left, right) {
|
|
@@ -17965,6 +17989,7 @@ var parsePaidDomain = (value) => {
|
|
|
17965
17989
|
const records2 = input["validation_records"];
|
|
17966
17990
|
if (![
|
|
17967
17991
|
"not_configured",
|
|
17992
|
+
"awaiting_deployment",
|
|
17968
17993
|
"pending",
|
|
17969
17994
|
"active",
|
|
17970
17995
|
"reconciliation_required",
|
|
@@ -17975,7 +18000,7 @@ var parsePaidDomain = (value) => {
|
|
|
17975
18000
|
"paid_plan_required",
|
|
17976
18001
|
"insufficient_organization_credits",
|
|
17977
18002
|
"project_budget_exceeded"
|
|
17978
|
-
].includes(input["suspension_reason"]) || status === "suspended" !== (input["suspension_reason"] !== null) || status === "suspended" && input["url"] !== null || input["environment"] !== "prod" || !isSaasCnameTarget(input["cname_target"]) || hostname !== null && !isPaidHostname(hostname) || input["custom_hostname_status"] !== null && typeof input["custom_hostname_status"] !== "string" || input["ssl_status"] !== null && typeof input["ssl_status"] !== "string" || !Array.isArray(records2) || records2.length > 16 || !records2.every(isPaidValidationRecord) || input["url"] !== null && input["url"] !== `https://${String(hostname)}`) {
|
|
18003
|
+
].includes(input["suspension_reason"]) || status === "suspended" !== (input["suspension_reason"] !== null) || status === "suspended" && input["url"] !== null || input["environment"] !== "prod" || !isSaasCnameTarget(input["cname_target"]) || hostname !== null && !isPaidHostname(hostname) || input["custom_hostname_status"] !== null && typeof input["custom_hostname_status"] !== "string" || input["ssl_status"] !== null && typeof input["ssl_status"] !== "string" || !Array.isArray(records2) || records2.length > 16 || !records2.every(isPaidValidationRecord) || input["url"] !== null && input["url"] !== `https://${String(hostname)}` || status === "awaiting_deployment" && (hostname === null || input["custom_hostname_status"] !== null || input["ssl_status"] !== null || input["url"] !== null || records2.length !== 0)) {
|
|
17979
18004
|
throw new ResponseContractError();
|
|
17980
18005
|
}
|
|
17981
18006
|
return input;
|
|
@@ -18936,7 +18961,7 @@ function exact2(v, keys) {
|
|
|
18936
18961
|
// apps/product-cli/package.json
|
|
18937
18962
|
var package_default = {
|
|
18938
18963
|
name: "@ohmyhost/product-cli",
|
|
18939
|
-
version: "0.1.
|
|
18964
|
+
version: "0.1.27",
|
|
18940
18965
|
private: true,
|
|
18941
18966
|
ohmyhost: {
|
|
18942
18967
|
deployment: "production",
|
|
@@ -25227,7 +25252,8 @@ async function initializeRepository(input) {
|
|
|
25227
25252
|
const project = projectName(input.project, packageJson);
|
|
25228
25253
|
const repositoryAdmissionBlockers = repositoryBlockers(packageJson, framework, nextStandaloneOutput, tanStackRuntime, applicationFiles, packageManagerAdmission, frameworkConfigs, compatibility, existingConfiguration);
|
|
25229
25254
|
const supabaseMigrationCount = applicationFiles.filter((path) => /^supabase\/migrations\/[^/]+\.sql$/u.test(path)).length;
|
|
25230
|
-
const
|
|
25255
|
+
const postgresMigrationRoot = existingConfiguration?.database?.migrations ?? "postgres/migrations";
|
|
25256
|
+
const postgresMigrationCount = applicationFiles.filter((path) => path.startsWith(`${postgresMigrationRoot}/`) && path.endsWith(".sql")).length;
|
|
25231
25257
|
const edgeFunctionNames = new Set(applicationFiles.flatMap((path) => {
|
|
25232
25258
|
const match = path.match(/^supabase\/functions\/([^/]+)\//u);
|
|
25233
25259
|
return match?.[1] === void 0 || match[1].startsWith("_") ? [] : [match[1]];
|
|
@@ -25856,7 +25882,7 @@ function repositoryBlockers(packageJson, framework, nextStandaloneOutput, tanSta
|
|
|
25856
25882
|
const unsupported = compatibility.frameworks.filter((entry) => entry.classification === "unsupported").map((entry) => `${FRAMEWORK_PACKAGE[entry.framework]}@${entry.version || "missing"}`).join(", ");
|
|
25857
25883
|
blockers.push({
|
|
25858
25884
|
code: "framework_version_unsupported",
|
|
25859
|
-
message: `${unsupported} is outside the versions ohmyho.st builds: next 15.5.x or 16.
|
|
25885
|
+
message: `${unsupported} is outside the versions ohmyho.st builds: next 15.5.26+ (15.5.x) or 16.3.6\u201316.3.7, vite 5.4.0\u20138.2.2, @tanstack/react-start 1.168.26\u20131.168.49, as an exact version or a ^ or ~ range whose base version is inside. Pin a version in that range in package.json, update the lockfile, commit and push.`
|
|
25860
25886
|
});
|
|
25861
25887
|
}
|
|
25862
25888
|
const scripts = packageJson["scripts"];
|
|
@@ -25894,7 +25920,7 @@ function repositoryBlockers(packageJson, framework, nextStandaloneOutput, tanSta
|
|
|
25894
25920
|
if (!nextConfigured) {
|
|
25895
25921
|
blockers.push({
|
|
25896
25922
|
code: "next_adapter_unconfigured",
|
|
25897
|
-
message: 'Next.js needs scripts.build exactly "next build" or "next build --webpack", react and react-dom at exact versions such as "19.1.0" (no ^ or ~), next within 15.5.x or 16.
|
|
25923
|
+
message: 'Next.js needs scripts.build exactly "next build" or "next build --webpack", react and react-dom at exact versions such as "19.1.0" (no ^ or ~), next within 15.5.26+ (15.5.x) or 16.3.6\u201316.3.7, and exactly one next.config.js, .mjs or .ts, with at most one open-next.config file. ohmyho.st adds the OpenNext build itself; do not make it the build script.'
|
|
25898
25924
|
});
|
|
25899
25925
|
}
|
|
25900
25926
|
}
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -292,8 +292,10 @@ export async function initializeRepository(
|
|
|
292
292
|
const supabaseMigrationCount = applicationFiles.filter((path) =>
|
|
293
293
|
/^supabase\/migrations\/[^/]+\.sql$/u.test(path),
|
|
294
294
|
).length;
|
|
295
|
-
const
|
|
296
|
-
|
|
295
|
+
const postgresMigrationRoot =
|
|
296
|
+
existingConfiguration?.database?.migrations ?? "postgres/migrations";
|
|
297
|
+
const postgresMigrationCount = applicationFiles.filter(
|
|
298
|
+
(path) => path.startsWith(`${postgresMigrationRoot}/`) && path.endsWith(".sql"),
|
|
297
299
|
).length;
|
|
298
300
|
const edgeFunctionNames = new Set(
|
|
299
301
|
applicationFiles.flatMap((path) => {
|
|
@@ -1228,7 +1230,7 @@ function repositoryBlockers(
|
|
|
1228
1230
|
.join(", ");
|
|
1229
1231
|
blockers.push({
|
|
1230
1232
|
code: "framework_version_unsupported",
|
|
1231
|
-
message: `${unsupported} is outside the versions ohmyho.st builds: next 15.5.x or 16.
|
|
1233
|
+
message: `${unsupported} is outside the versions ohmyho.st builds: next 15.5.26+ (15.5.x) or 16.3.6–16.3.7, vite 5.4.0–8.2.2, @tanstack/react-start 1.168.26–1.168.49, as an exact version or a ^ or ~ range whose base version is inside. Pin a version in that range in package.json, update the lockfile, commit and push.`,
|
|
1232
1234
|
});
|
|
1233
1235
|
}
|
|
1234
1236
|
const scripts = packageJson["scripts"];
|
|
@@ -1283,7 +1285,7 @@ function repositoryBlockers(
|
|
|
1283
1285
|
blockers.push({
|
|
1284
1286
|
code: "next_adapter_unconfigured",
|
|
1285
1287
|
message:
|
|
1286
|
-
'Next.js needs scripts.build exactly "next build" or "next build --webpack", react and react-dom at exact versions such as "19.1.0" (no ^ or ~), next within 15.5.x or 16.
|
|
1288
|
+
'Next.js needs scripts.build exactly "next build" or "next build --webpack", react and react-dom at exact versions such as "19.1.0" (no ^ or ~), next within 15.5.26+ (15.5.x) or 16.3.6–16.3.7, and exactly one next.config.js, .mjs or .ts, with at most one open-next.config file. ohmyho.st adds the OpenNext build itself; do not make it the build script.',
|
|
1287
1289
|
});
|
|
1288
1290
|
}
|
|
1289
1291
|
}
|
|
@@ -94,6 +94,7 @@ export interface PublicPaidDomainPlan {
|
|
|
94
94
|
export interface PublicPaidDomain {
|
|
95
95
|
readonly status:
|
|
96
96
|
| "not_configured"
|
|
97
|
+
| "awaiting_deployment"
|
|
97
98
|
| "pending"
|
|
98
99
|
| "active"
|
|
99
100
|
| "reconciliation_required"
|
|
@@ -153,6 +154,7 @@ export const parsePaidDomain = (value: unknown): PublicPaidDomain => {
|
|
|
153
154
|
if (
|
|
154
155
|
![
|
|
155
156
|
"not_configured",
|
|
157
|
+
"awaiting_deployment",
|
|
156
158
|
"pending",
|
|
157
159
|
"active",
|
|
158
160
|
"reconciliation_required",
|
|
@@ -176,7 +178,13 @@ export const parsePaidDomain = (value: unknown): PublicPaidDomain => {
|
|
|
176
178
|
!Array.isArray(records) ||
|
|
177
179
|
records.length > 16 ||
|
|
178
180
|
!records.every(isPaidValidationRecord) ||
|
|
179
|
-
(input["url"] !== null && input["url"] !== `https://${String(hostname)}`)
|
|
181
|
+
(input["url"] !== null && input["url"] !== `https://${String(hostname)}`) ||
|
|
182
|
+
(status === "awaiting_deployment" &&
|
|
183
|
+
(hostname === null ||
|
|
184
|
+
input["custom_hostname_status"] !== null ||
|
|
185
|
+
input["ssl_status"] !== null ||
|
|
186
|
+
input["url"] !== null ||
|
|
187
|
+
records.length !== 0))
|
|
180
188
|
) {
|
|
181
189
|
throw new ResponseContractError();
|
|
182
190
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PINNED_BUN_VERSION } from "./framework-build-script.mjs";
|
|
1
|
+
import { isAdmittedNextVersion, PINNED_BUN_VERSION } from "./framework-build-script.mjs";
|
|
2
2
|
import { managedCustomerAuthDatabaseMessage } from "./customer-auth-admission.js";
|
|
3
3
|
export { managedCustomerAuthAdmissionIssue } from "./customer-auth-admission.js";
|
|
4
4
|
|
|
@@ -129,7 +129,7 @@ export interface FrameworkVersionAdmission {
|
|
|
129
129
|
const VERIFIED_VERSIONS: Readonly<Record<AdmittedFramework, ReadonlySet<string>>> = Object.freeze({
|
|
130
130
|
vite: new Set(["5.4.21", "8.0.16", "8.2.2"]),
|
|
131
131
|
"tanstack-start": new Set(["1.168.26", "1.168.49"]),
|
|
132
|
-
nextjs: new Set(["15.5.
|
|
132
|
+
nextjs: new Set(["15.5.26", "16.3.7"]),
|
|
133
133
|
});
|
|
134
134
|
|
|
135
135
|
export function classifyFrameworkVersion(
|
|
@@ -173,10 +173,7 @@ function insideAdmittedWindow(framework: AdmittedFramework, version: VersionTupl
|
|
|
173
173
|
compareVersions(version, [1, 168, 26]) >= 0 && compareVersions(version, [1, 168, 49]) <= 0
|
|
174
174
|
);
|
|
175
175
|
case "nextjs":
|
|
176
|
-
return (
|
|
177
|
-
(version[0] === 15 && version[1] === 5) ||
|
|
178
|
-
(compareVersions(version, [16, 0, 0]) >= 0 && compareVersions(version, [16, 3, 4]) <= 0)
|
|
179
|
-
);
|
|
176
|
+
return isAdmittedNextVersion(version.join("."));
|
|
180
177
|
}
|
|
181
178
|
}
|
|
182
179
|
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
export const PINNED_BUN_VERSION = "1.2.22";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* The installed Next.js release must satisfy the same window as source admission.
|
|
5
|
+
* @param {unknown} version
|
|
6
|
+
* @returns {boolean}
|
|
7
|
+
*/
|
|
8
|
+
export function isAdmittedNextVersion(version) {
|
|
9
|
+
if (typeof version !== "string") return false;
|
|
10
|
+
const match = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/u.exec(version);
|
|
11
|
+
if (match === null) return false;
|
|
12
|
+
const major = Number(match[1]);
|
|
13
|
+
const minor = Number(match[2]);
|
|
14
|
+
const patch = Number(match[3]);
|
|
15
|
+
if (![major, minor, patch].every(Number.isSafeInteger)) return false;
|
|
16
|
+
return (
|
|
17
|
+
(major === 15 && minor === 5 && patch >= 26) ||
|
|
18
|
+
(major === 16 && minor === 3 && patch >= 6 && patch <= 7)
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
3
22
|
const TYPESCRIPT_BUILD_STAGE = /^tsc(?:[ \t]+(?:--noEmit|-b|--build))?$/u;
|
|
4
23
|
|
|
5
24
|
/**
|
|
@@ -2560,7 +2560,7 @@ export const configureProjectDomains = <ThrowOnError extends boolean = true>(
|
|
|
2560
2560
|
/**
|
|
2561
2561
|
* Plan one Paid customer-owned hostname
|
|
2562
2562
|
*
|
|
2563
|
-
*
|
|
2563
|
+
* Plan the customer's requested hostname before or after the first Prod deployment. This read-only plan explains declaration, Cloudflare consent and activation; it does not claim the hostname, create provider resources or change DNS.
|
|
2564
2564
|
*/
|
|
2565
2565
|
export const planPaidProjectDomain = <ThrowOnError extends boolean = true>(
|
|
2566
2566
|
parameters: {
|
|
@@ -2698,7 +2698,7 @@ export const getPaidProjectDomain = <ThrowOnError extends boolean = true>(
|
|
|
2698
2698
|
/**
|
|
2699
2699
|
* Apply one Paid customer-owned hostname
|
|
2700
2700
|
*
|
|
2701
|
-
* Requires Paid access (a Stripe period or a grant) or, for a Free workspace, a project that currently shows the powered-by flag, and no expired credit-exhaustion grace. Returns paid_plan_required otherwise, or insufficient_organization_credits after seven days with no available credits, without provider mutation. Top-ups lift a credit-exhaustion block but never start or extend Paid access.
|
|
2701
|
+
* Requires Paid access (a Stripe period or a grant) or, for a Free workspace, a project that currently shows the powered-by flag, and no expired credit-exhaustion grace. Returns paid_plan_required otherwise, or insufficient_organization_credits after seven days with no available credits, without provider mutation. Top-ups lift a credit-exhaustion block but never start or extend Paid access. Without an active Prod deployment, apply declares the hostname as awaiting_deployment, enabling Cloudflare consent without provider resources, DNS changes or domain charges. After a successful Prod deployment, replay the same hostname and idempotency key to activate it. A changed request under a used key returns idempotency_key_reused (409).
|
|
2702
2702
|
*/
|
|
2703
2703
|
export const applyPaidProjectDomain = <ThrowOnError extends boolean = true>(
|
|
2704
2704
|
parameters: {
|
|
@@ -351,9 +351,13 @@ export type PaidDomainPlan = {
|
|
|
351
351
|
risks: Array<string>;
|
|
352
352
|
};
|
|
353
353
|
|
|
354
|
+
/**
|
|
355
|
+
* awaiting_deployment means the requested hostname is declared but not provisioned. Its hostname is present, suspension_reason, custom_hostname_status, ssl_status and url are null, and validation_records is empty. Authorize Cloudflare, deploy to Prod, then repeat the same apply.
|
|
356
|
+
*/
|
|
354
357
|
export type PaidDomain = {
|
|
355
358
|
status:
|
|
356
359
|
| "not_configured"
|
|
360
|
+
| "awaiting_deployment"
|
|
357
361
|
| "pending"
|
|
358
362
|
| "active"
|
|
359
363
|
| "reconciliation_required"
|
|
@@ -4686,7 +4690,7 @@ export type PlanPaidProjectDomainError =
|
|
|
4686
4690
|
|
|
4687
4691
|
export type PlanPaidProjectDomainResponses = {
|
|
4688
4692
|
/**
|
|
4689
|
-
*
|
|
4693
|
+
* The requested hostname, routing target and staged provider effects.
|
|
4690
4694
|
*/
|
|
4691
4695
|
200: PaidDomainPlan;
|
|
4692
4696
|
};
|
|
@@ -4880,7 +4884,7 @@ export type ApplyPaidProjectDomainError =
|
|
|
4880
4884
|
|
|
4881
4885
|
export type ApplyPaidProjectDomainResponses = {
|
|
4882
4886
|
/**
|
|
4883
|
-
*
|
|
4887
|
+
* Declared hostname or current Cloudflare for SaaS hostname and certificate state.
|
|
4884
4888
|
*/
|
|
4885
4889
|
200: PaidDomain;
|
|
4886
4890
|
};
|