@amerged/ohmyhost-cli 0.1.27 → 0.1.28
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-KTRUF6C5.js → chunk-5FDJR2IZ.js} +67 -24
- 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 +12 -0
- package/src/packages/contracts/src/index.ts +5 -0
- package/src/packages/contracts/src/problem-policy.ts +7 -0
- package/src/packages/sdk-ts/package.json +1 -1
- package/src/packages/sdk-ts/src/generated/types.gen.ts +1 -0
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-5FDJR2IZ.js";
|
|
6
6
|
import "./chunk-7D2RFLWM.js";
|
|
7
7
|
|
|
8
8
|
// apps/product-cli/dist/bin.js
|
|
@@ -3080,9 +3080,9 @@ 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.8/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.8/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);
|
|
@@ -3582,9 +3582,9 @@ var require_utils = __commonJS({
|
|
|
3582
3582
|
}
|
|
3583
3583
|
});
|
|
3584
3584
|
|
|
3585
|
-
// node_modules/.pnpm/fast-uri@3.1.
|
|
3585
|
+
// node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/schemes.js
|
|
3586
3586
|
var require_schemes = __commonJS({
|
|
3587
|
-
"node_modules/.pnpm/fast-uri@3.1.
|
|
3587
|
+
"node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/schemes.js"(exports, module) {
|
|
3588
3588
|
"use strict";
|
|
3589
3589
|
var { isUUID } = require_utils();
|
|
3590
3590
|
var URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;
|
|
@@ -3793,9 +3793,9 @@ var require_schemes = __commonJS({
|
|
|
3793
3793
|
}
|
|
3794
3794
|
});
|
|
3795
3795
|
|
|
3796
|
-
// node_modules/.pnpm/fast-uri@3.1.
|
|
3796
|
+
// node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/index.js
|
|
3797
3797
|
var require_fast_uri = __commonJS({
|
|
3798
|
-
"node_modules/.pnpm/fast-uri@3.1.
|
|
3798
|
+
"node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/index.js"(exports, module) {
|
|
3799
3799
|
"use strict";
|
|
3800
3800
|
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
3801
3801
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
@@ -4125,13 +4125,14 @@ var require_fast_uri = __commonJS({
|
|
|
4125
4125
|
if (!malformedIPLiteral) {
|
|
4126
4126
|
malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP);
|
|
4127
4127
|
}
|
|
4128
|
-
if (
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
parsed.host = reescapeHostDelimiters(host, isIP);
|
|
4133
|
-
}
|
|
4128
|
+
if (uri.indexOf("%") !== -1 && parsed.host !== void 0 && !malformedIPLiteral) {
|
|
4129
|
+
let host = isIP ? parsed.host : normalizePercentEncoding(parsed.host, true);
|
|
4130
|
+
if (!isIP) {
|
|
4131
|
+
host = normalizePercentEncoding(host.toLowerCase());
|
|
4134
4132
|
}
|
|
4133
|
+
parsed.host = reescapeHostDelimiters(host, isIP);
|
|
4134
|
+
}
|
|
4135
|
+
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
|
|
4135
4136
|
if (parsed.path) {
|
|
4136
4137
|
parsed.path = normalizePathEncoding(parsed.path);
|
|
4137
4138
|
}
|
|
@@ -17908,6 +17909,12 @@ var PROBLEM_POLICY = {
|
|
|
17908
17909
|
restAction: "A live project connection already holds this hostname. Remove it from the project you manage with 'ohmyhost domain paid delete --project ULID --hostname HOST --yes --json', then apply it to the new project. Repeating while that connection remains cannot work; report the request_id if you cannot manage its owning project.",
|
|
17909
17910
|
title: "Domain hostname is already connected"
|
|
17910
17911
|
},
|
|
17912
|
+
domain_dns_conflict: {
|
|
17913
|
+
status: 409,
|
|
17914
|
+
retryable: false,
|
|
17915
|
+
action: "Review DNS for the requested hostname and resolve the conflicting delegation or another project's managed records. Preserve mailbox MX, TXT and CAA records. Then repeat the original domain paid apply or delete with the same hostname and idempotency key; do not create another deployment or repeatedly resubmit unchanged conflicts.",
|
|
17916
|
+
title: "Domain DNS records conflict"
|
|
17917
|
+
},
|
|
17911
17918
|
data_change_blocked: {
|
|
17912
17919
|
status: 409,
|
|
17913
17920
|
retryable: true,
|
|
@@ -18961,7 +18968,7 @@ function exact2(v, keys) {
|
|
|
18961
18968
|
// apps/product-cli/package.json
|
|
18962
18969
|
var package_default = {
|
|
18963
18970
|
name: "@ohmyhost/product-cli",
|
|
18964
|
-
version: "0.1.
|
|
18971
|
+
version: "0.1.28",
|
|
18965
18972
|
private: true,
|
|
18966
18973
|
ohmyhost: {
|
|
18967
18974
|
deployment: "production",
|
|
@@ -24457,6 +24464,12 @@ var ohmyhost_schema_default = {
|
|
|
24457
24464
|
},
|
|
24458
24465
|
output: {
|
|
24459
24466
|
$ref: "#/$defs/relativePath"
|
|
24467
|
+
},
|
|
24468
|
+
ssg_cache_max_mib: {
|
|
24469
|
+
type: "integer",
|
|
24470
|
+
minimum: 1,
|
|
24471
|
+
maximum: 64,
|
|
24472
|
+
description: "Maximum private immutable Next.js prerender cache in MiB; defaults to 32. Cache storage costs zero credits. Public assets retain their independent limit."
|
|
24460
24473
|
}
|
|
24461
24474
|
}
|
|
24462
24475
|
},
|
|
@@ -24524,26 +24537,46 @@ var ohmyhost_schema_default = {
|
|
|
24524
24537
|
pattern: "^(?:https|wss)://"
|
|
24525
24538
|
}
|
|
24526
24539
|
},
|
|
24527
|
-
scripts: {
|
|
24528
|
-
|
|
24529
|
-
|
|
24530
|
-
|
|
24531
|
-
|
|
24532
|
-
|
|
24540
|
+
scripts: {
|
|
24541
|
+
$ref: "#/$defs/browserOrigins"
|
|
24542
|
+
},
|
|
24543
|
+
styles: {
|
|
24544
|
+
$ref: "#/$defs/browserOrigins"
|
|
24545
|
+
},
|
|
24546
|
+
images: {
|
|
24547
|
+
$ref: "#/$defs/browserOrigins"
|
|
24548
|
+
},
|
|
24549
|
+
fonts: {
|
|
24550
|
+
$ref: "#/$defs/browserOrigins"
|
|
24551
|
+
},
|
|
24552
|
+
frames: {
|
|
24553
|
+
$ref: "#/$defs/browserOrigins"
|
|
24554
|
+
},
|
|
24555
|
+
frameAncestors: {
|
|
24556
|
+
$ref: "#/$defs/browserOrigins"
|
|
24557
|
+
},
|
|
24533
24558
|
workers: {
|
|
24534
24559
|
type: "object",
|
|
24535
24560
|
additionalProperties: false,
|
|
24536
24561
|
properties: {
|
|
24537
|
-
self: {
|
|
24538
|
-
|
|
24562
|
+
self: {
|
|
24563
|
+
type: "boolean"
|
|
24564
|
+
},
|
|
24565
|
+
blob: {
|
|
24566
|
+
type: "boolean"
|
|
24567
|
+
}
|
|
24539
24568
|
}
|
|
24540
24569
|
},
|
|
24541
24570
|
cors: {
|
|
24542
24571
|
type: "object",
|
|
24543
24572
|
additionalProperties: false,
|
|
24544
24573
|
properties: {
|
|
24545
|
-
origins: {
|
|
24546
|
-
|
|
24574
|
+
origins: {
|
|
24575
|
+
$ref: "#/$defs/browserOrigins"
|
|
24576
|
+
},
|
|
24577
|
+
credentials: {
|
|
24578
|
+
type: "boolean"
|
|
24579
|
+
}
|
|
24547
24580
|
}
|
|
24548
24581
|
}
|
|
24549
24582
|
}
|
|
@@ -24750,6 +24783,9 @@ var ohmyhost_schema_default = {
|
|
|
24750
24783
|
},
|
|
24751
24784
|
output: {
|
|
24752
24785
|
$ref: "#/$defs/relativePath"
|
|
24786
|
+
},
|
|
24787
|
+
ssg_cache_max_mib: {
|
|
24788
|
+
$ref: "#/$defs/build/properties/ssg_cache_max_mib"
|
|
24753
24789
|
}
|
|
24754
24790
|
}
|
|
24755
24791
|
}
|
|
@@ -24890,7 +24926,8 @@ function parseOhmyhostConfig(value) {
|
|
|
24890
24926
|
build: input.runtime.mode === "functions" ? Object.freeze({ install: input.build.install }) : Object.freeze({
|
|
24891
24927
|
install: input.build.install,
|
|
24892
24928
|
command: input.build.command,
|
|
24893
|
-
output: input.build.output
|
|
24929
|
+
output: input.build.output,
|
|
24930
|
+
...input.build.ssg_cache_max_mib === void 0 ? {} : { ssg_cache_max_mib: input.build.ssg_cache_max_mib }
|
|
24894
24931
|
}),
|
|
24895
24932
|
runtime: Object.freeze({
|
|
24896
24933
|
mode: input.runtime.mode,
|
|
@@ -25837,6 +25874,12 @@ function projectName(explicit, packageJson) {
|
|
|
25837
25874
|
}
|
|
25838
25875
|
function repositoryBlockers(packageJson, framework, nextStandaloneOutput, tanStackRuntime, files, packageManagerAdmission, frameworkConfigs, compatibility, existingConfiguration) {
|
|
25839
25876
|
const blockers = [];
|
|
25877
|
+
if (framework !== "nextjs" && existingConfiguration !== null && "command" in existingConfiguration.build && existingConfiguration.build.ssg_cache_max_mib !== void 0) {
|
|
25878
|
+
blockers.push({
|
|
25879
|
+
code: "framework_unsupported",
|
|
25880
|
+
message: "build.ssg_cache_max_mib is supported only by Next.js; remove it from this application's configuration."
|
|
25881
|
+
});
|
|
25882
|
+
}
|
|
25840
25883
|
if (framework === "unknown") {
|
|
25841
25884
|
blockers.push({
|
|
25842
25885
|
code: "framework_unsupported",
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1163,6 +1163,18 @@ function repositoryBlockers(
|
|
|
1163
1163
|
existingConfiguration: OhmyhostConfig | null,
|
|
1164
1164
|
): RepositoryInitBlocker[] {
|
|
1165
1165
|
const blockers: RepositoryInitBlocker[] = [];
|
|
1166
|
+
if (
|
|
1167
|
+
framework !== "nextjs" &&
|
|
1168
|
+
existingConfiguration !== null &&
|
|
1169
|
+
"command" in existingConfiguration.build &&
|
|
1170
|
+
existingConfiguration.build.ssg_cache_max_mib !== undefined
|
|
1171
|
+
) {
|
|
1172
|
+
blockers.push({
|
|
1173
|
+
code: "framework_unsupported",
|
|
1174
|
+
message:
|
|
1175
|
+
"build.ssg_cache_max_mib is supported only by Next.js; remove it from this application's configuration.",
|
|
1176
|
+
});
|
|
1177
|
+
}
|
|
1166
1178
|
if (framework === "unknown") {
|
|
1167
1179
|
blockers.push({
|
|
1168
1180
|
code: "framework_unsupported",
|
|
@@ -24,6 +24,8 @@ export type OhmyhostApplicationBuild = Readonly<{
|
|
|
24
24
|
install: string;
|
|
25
25
|
command: string;
|
|
26
26
|
output: string;
|
|
27
|
+
/** Maximum private immutable Next.js prerender cache, in MiB; defaults to 32. */
|
|
28
|
+
ssg_cache_max_mib?: number;
|
|
27
29
|
}>;
|
|
28
30
|
export type OhmyhostFunctionsBuild = Readonly<{ install: string }>;
|
|
29
31
|
|
|
@@ -88,6 +90,9 @@ export function parseOhmyhostConfig(value: unknown): OhmyhostConfig {
|
|
|
88
90
|
install: input.build.install,
|
|
89
91
|
command: (input.build as OhmyhostApplicationBuild).command,
|
|
90
92
|
output: (input.build as OhmyhostApplicationBuild).output,
|
|
93
|
+
...((input.build as OhmyhostApplicationBuild).ssg_cache_max_mib === undefined
|
|
94
|
+
? {}
|
|
95
|
+
: { ssg_cache_max_mib: (input.build as OhmyhostApplicationBuild).ssg_cache_max_mib }),
|
|
91
96
|
}),
|
|
92
97
|
runtime: Object.freeze({
|
|
93
98
|
mode: input.runtime.mode,
|
|
@@ -450,6 +450,13 @@ export const PROBLEM_POLICY = {
|
|
|
450
450
|
"A live project connection already holds this hostname. Remove it from the project you manage with 'ohmyhost domain paid delete --project ULID --hostname HOST --yes --json', then apply it to the new project. Repeating while that connection remains cannot work; report the request_id if you cannot manage its owning project.",
|
|
451
451
|
title: "Domain hostname is already connected",
|
|
452
452
|
},
|
|
453
|
+
domain_dns_conflict: {
|
|
454
|
+
status: 409,
|
|
455
|
+
retryable: false,
|
|
456
|
+
action:
|
|
457
|
+
"Review DNS for the requested hostname and resolve the conflicting delegation or another project's managed records. Preserve mailbox MX, TXT and CAA records. Then repeat the original domain paid apply or delete with the same hostname and idempotency key; do not create another deployment or repeatedly resubmit unchanged conflicts.",
|
|
458
|
+
title: "Domain DNS records conflict",
|
|
459
|
+
},
|
|
453
460
|
data_change_blocked: {
|
|
454
461
|
status: 409,
|
|
455
462
|
retryable: true,
|
|
@@ -1116,6 +1116,7 @@ export type ProblemDetails = {
|
|
|
1116
1116
|
| "service_unavailable"
|
|
1117
1117
|
| "source_commit_not_found"
|
|
1118
1118
|
| "domain_hostname_taken"
|
|
1119
|
+
| "domain_dns_conflict"
|
|
1119
1120
|
| "data_change_blocked"
|
|
1120
1121
|
| "data_change_in_progress"
|
|
1121
1122
|
| "data_change_not_applicable"
|