@amerged/ohmyhost-cli 0.1.36 → 0.1.38
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-LU7ONYZG.js → chunk-EWKJGJQU.js} +1379 -258
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/apps/product-cli/package.json +2 -2
- package/src/apps/product-cli/src/cli.ts +37 -1
- package/src/apps/product-cli/src/command.ts +228 -2
- package/src/apps/product-cli/src/composition.ts +4 -0
- package/src/apps/product-cli/src/product-api.ts +11 -1
- package/src/apps/product-cli/src/repository-init.ts +181 -9
- package/src/packages/contracts/package.json +6 -1
- package/src/packages/contracts/src/framework-admission-corpus.ts +15 -18
- package/src/packages/contracts/src/framework-build-script.mjs +10 -3
- package/src/packages/contracts/src/index.ts +3 -0
- package/src/packages/contracts/src/problem-policy.ts +2 -2
- package/src/packages/contracts/src/shared-mail.ts +236 -0
- package/src/packages/sdk-ts/package.json +2 -2
- package/src/packages/sdk-ts/src/generated/index.ts +112 -0
- package/src/packages/sdk-ts/src/generated/sdk.gen.ts +870 -0
- package/src/packages/sdk-ts/src/generated/shared-mail-response.ts +238 -0
- package/src/packages/sdk-ts/src/generated/types.gen.ts +1207 -0
- package/src/packages/sdk-ts/src/index.ts +2 -0
- package/src/packages/sdk-ts/src/shared-mail-response.ts +1 -0
- package/src/packages/sdk-ts/src/shared-mail.ts +225 -0
- package/src/packages/workos-auth-contracts/package.json +1 -1
|
@@ -35,8 +35,8 @@ var require_ignore = __commonJS({
|
|
|
35
35
|
TMP_KEY_IGNORE = /* @__PURE__ */ Symbol.for("node-ignore");
|
|
36
36
|
}
|
|
37
37
|
var KEY_IGNORE = TMP_KEY_IGNORE;
|
|
38
|
-
var define2 = (
|
|
39
|
-
Object.defineProperty(
|
|
38
|
+
var define2 = (object4, key, value) => {
|
|
39
|
+
Object.defineProperty(object4, key, { value });
|
|
40
40
|
return value;
|
|
41
41
|
};
|
|
42
42
|
var RETURN_FALSE = () => false;
|
|
@@ -1937,13 +1937,13 @@ var require_for_each = __commonJS({
|
|
|
1937
1937
|
}
|
|
1938
1938
|
}
|
|
1939
1939
|
};
|
|
1940
|
-
var forEachObject = function forEachObject2(
|
|
1941
|
-
for (var k in
|
|
1942
|
-
if (hasOwnProperty.call(
|
|
1940
|
+
var forEachObject = function forEachObject2(object4, iterator, receiver) {
|
|
1941
|
+
for (var k in object4) {
|
|
1942
|
+
if (hasOwnProperty.call(object4, k)) {
|
|
1943
1943
|
if (receiver == null) {
|
|
1944
|
-
iterator(
|
|
1944
|
+
iterator(object4[k], k, object4);
|
|
1945
1945
|
} else {
|
|
1946
|
-
iterator.call(receiver,
|
|
1946
|
+
iterator.call(receiver, object4[k], k, object4);
|
|
1947
1947
|
}
|
|
1948
1948
|
}
|
|
1949
1949
|
}
|
|
@@ -7219,7 +7219,7 @@ var require_ignore2 = __commonJS({
|
|
|
7219
7219
|
TMP_KEY_IGNORE = /* @__PURE__ */ Symbol.for("node-ignore");
|
|
7220
7220
|
}
|
|
7221
7221
|
var KEY_IGNORE = TMP_KEY_IGNORE;
|
|
7222
|
-
var define2 = (
|
|
7222
|
+
var define2 = (object4, key, value) => Object.defineProperty(object4, key, { value });
|
|
7223
7223
|
var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g;
|
|
7224
7224
|
var RETURN_FALSE = () => false;
|
|
7225
7225
|
var sanitizeRange = (range) => range.replace(
|
|
@@ -9840,15 +9840,15 @@ If you're a developer and you believe this is a bug in isomorphic-git, please fi
|
|
|
9840
9840
|
* @param {Uint8Array} params.object - The raw object data to wrap.
|
|
9841
9841
|
* @returns {Uint8Array} The wrapped Git object as a single buffer.
|
|
9842
9842
|
*/
|
|
9843
|
-
static wrap({ type, object:
|
|
9844
|
-
const header = `${type} ${
|
|
9843
|
+
static wrap({ type, object: object4 }) {
|
|
9844
|
+
const header = `${type} ${object4.length}\0`;
|
|
9845
9845
|
const headerLen = header.length;
|
|
9846
|
-
const totalLength = headerLen +
|
|
9846
|
+
const totalLength = headerLen + object4.length;
|
|
9847
9847
|
const wrappedObject = new Uint8Array(totalLength);
|
|
9848
9848
|
for (let i = 0; i < headerLen; i++) {
|
|
9849
9849
|
wrappedObject[i] = header.charCodeAt(i);
|
|
9850
9850
|
}
|
|
9851
|
-
wrappedObject.set(
|
|
9851
|
+
wrappedObject.set(object4, headerLen);
|
|
9852
9852
|
return wrappedObject;
|
|
9853
9853
|
}
|
|
9854
9854
|
/**
|
|
@@ -10339,9 +10339,9 @@ If you're a developer and you believe this is a bug in isomorphic-git, please fi
|
|
|
10339
10339
|
try {
|
|
10340
10340
|
p.readDepth = 0;
|
|
10341
10341
|
p.externalReadDepth = 0;
|
|
10342
|
-
const { type, object:
|
|
10342
|
+
const { type, object: object4 } = await p.readSlice({ start: offset });
|
|
10343
10343
|
objectsByDepth[p.readDepth] += 1;
|
|
10344
|
-
const oid = await shasum(GitObject.wrap({ type, object:
|
|
10344
|
+
const oid = await shasum(GitObject.wrap({ type, object: object4 }));
|
|
10345
10345
|
o.oid = oid;
|
|
10346
10346
|
hashes.push(oid);
|
|
10347
10347
|
offsets.set(oid, offset);
|
|
@@ -10441,7 +10441,7 @@ If you're a developer and you believe this is a bug in isomorphic-git, please fi
|
|
|
10441
10441
|
length = otherVarIntDecode(reader, lastFour);
|
|
10442
10442
|
}
|
|
10443
10443
|
let base = null;
|
|
10444
|
-
let
|
|
10444
|
+
let object4 = null;
|
|
10445
10445
|
if (type === "ofs_delta") {
|
|
10446
10446
|
const offset = decodeVarInt(reader);
|
|
10447
10447
|
const baseOffset = start - offset;
|
|
@@ -10452,19 +10452,19 @@ If you're a developer and you believe this is a bug in isomorphic-git, please fi
|
|
|
10452
10452
|
({ object: base, type } = await this.read({ oid }));
|
|
10453
10453
|
}
|
|
10454
10454
|
const buffer = raw.slice(reader.tell());
|
|
10455
|
-
|
|
10456
|
-
if (
|
|
10455
|
+
object4 = Buffer.from(await inflate(buffer));
|
|
10456
|
+
if (object4.byteLength !== length) {
|
|
10457
10457
|
throw new InternalError(
|
|
10458
|
-
`Packfile told us object would have length ${length} but it had length ${
|
|
10458
|
+
`Packfile told us object would have length ${length} but it had length ${object4.byteLength}`
|
|
10459
10459
|
);
|
|
10460
10460
|
}
|
|
10461
10461
|
if (base) {
|
|
10462
|
-
|
|
10462
|
+
object4 = Buffer.from(applyDelta(object4, base));
|
|
10463
10463
|
}
|
|
10464
10464
|
if (this.readDepth > 3) {
|
|
10465
|
-
this.offsetCache[start] = { type, object:
|
|
10465
|
+
this.offsetCache[start] = { type, object: object4 };
|
|
10466
10466
|
}
|
|
10467
|
-
return { type, format: "content", object:
|
|
10467
|
+
return { type, format: "content", object: object4 };
|
|
10468
10468
|
}
|
|
10469
10469
|
};
|
|
10470
10470
|
var PackfileCache = /* @__PURE__ */ Symbol("PackfileCache");
|
|
@@ -10614,9 +10614,9 @@ If you're a developer and you believe this is a bug in isomorphic-git, please fi
|
|
|
10614
10614
|
`SHA check failed! Expected ${oid}, computed ${sha}`
|
|
10615
10615
|
);
|
|
10616
10616
|
}
|
|
10617
|
-
const { object:
|
|
10617
|
+
const { object: object4, type } = GitObject.unwrap(result.object);
|
|
10618
10618
|
result.type = type;
|
|
10619
|
-
result.object =
|
|
10619
|
+
result.object = object4;
|
|
10620
10620
|
result.format = "content";
|
|
10621
10621
|
return result;
|
|
10622
10622
|
}
|
|
@@ -11308,19 +11308,19 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
11308
11308
|
if (oid === "4b825dc642cb6eb9a060e54bf8d69288fbee4904") {
|
|
11309
11309
|
return { tree: GitTree.from([]), oid };
|
|
11310
11310
|
}
|
|
11311
|
-
const { type, object:
|
|
11311
|
+
const { type, object: object4 } = await _readObject({ fs: fs3, cache, gitdir, oid });
|
|
11312
11312
|
if (type === "tag") {
|
|
11313
|
-
oid = GitAnnotatedTag.from(
|
|
11313
|
+
oid = GitAnnotatedTag.from(object4).parse().object;
|
|
11314
11314
|
return resolveTree({ fs: fs3, cache, gitdir, oid });
|
|
11315
11315
|
}
|
|
11316
11316
|
if (type === "commit") {
|
|
11317
|
-
oid = GitCommit.from(
|
|
11317
|
+
oid = GitCommit.from(object4).parse().tree;
|
|
11318
11318
|
return resolveTree({ fs: fs3, cache, gitdir, oid });
|
|
11319
11319
|
}
|
|
11320
11320
|
if (type !== "tree") {
|
|
11321
11321
|
throw new ObjectTypeError(oid, type, "tree");
|
|
11322
11322
|
}
|
|
11323
|
-
return { tree: GitTree.from(
|
|
11323
|
+
return { tree: GitTree.from(object4), oid };
|
|
11324
11324
|
}
|
|
11325
11325
|
var GitWalkerRepo = class {
|
|
11326
11326
|
constructor({ fs: fs3, gitdir, ref, cache }) {
|
|
@@ -11383,11 +11383,11 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
11383
11383
|
if (obj.type !== "tree") {
|
|
11384
11384
|
return null;
|
|
11385
11385
|
}
|
|
11386
|
-
const { type, object:
|
|
11386
|
+
const { type, object: object4 } = await _readObject({ fs: fs3, cache, gitdir, oid });
|
|
11387
11387
|
if (type !== obj.type) {
|
|
11388
11388
|
throw new ObjectTypeError(oid, type, obj.type);
|
|
11389
11389
|
}
|
|
11390
|
-
const tree = GitTree.from(
|
|
11390
|
+
const tree = GitTree.from(object4);
|
|
11391
11391
|
for (const entry2 of tree) {
|
|
11392
11392
|
map.set(join7(filepath, entry2.path), entry2);
|
|
11393
11393
|
}
|
|
@@ -11417,11 +11417,11 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
11417
11417
|
const { fs: fs3, cache, gitdir } = this;
|
|
11418
11418
|
const obj = map.get(entry._fullpath);
|
|
11419
11419
|
const oid = obj.oid;
|
|
11420
|
-
const { type, object:
|
|
11420
|
+
const { type, object: object4 } = await _readObject({ fs: fs3, cache, gitdir, oid });
|
|
11421
11421
|
if (type !== "blob") {
|
|
11422
11422
|
entry._content = void 0;
|
|
11423
11423
|
} else {
|
|
11424
|
-
entry._content = new Uint8Array(
|
|
11424
|
+
entry._content = new Uint8Array(object4);
|
|
11425
11425
|
}
|
|
11426
11426
|
}
|
|
11427
11427
|
return entry._content;
|
|
@@ -12201,7 +12201,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12201
12201
|
return ignoredStatus;
|
|
12202
12202
|
}
|
|
12203
12203
|
};
|
|
12204
|
-
async function writeObjectLoose({ fs: fs3, gitdir, object:
|
|
12204
|
+
async function writeObjectLoose({ fs: fs3, gitdir, object: object4, format, oid }) {
|
|
12205
12205
|
if (format !== "deflated") {
|
|
12206
12206
|
throw new InternalError(
|
|
12207
12207
|
"GitObjectStoreLoose expects objects to write to be in deflated format"
|
|
@@ -12209,7 +12209,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12209
12209
|
}
|
|
12210
12210
|
const source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`;
|
|
12211
12211
|
const filepath = `${gitdir}/${source}`;
|
|
12212
|
-
if (!await fs3.exists(filepath)) await fs3.write(filepath,
|
|
12212
|
+
if (!await fs3.exists(filepath)) await fs3.write(filepath, object4);
|
|
12213
12213
|
}
|
|
12214
12214
|
var supportsCompressionStream = null;
|
|
12215
12215
|
async function deflate(buffer) {
|
|
@@ -12238,20 +12238,20 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12238
12238
|
fs: fs3,
|
|
12239
12239
|
gitdir,
|
|
12240
12240
|
type,
|
|
12241
|
-
object:
|
|
12241
|
+
object: object4,
|
|
12242
12242
|
format = "content",
|
|
12243
12243
|
oid = void 0,
|
|
12244
12244
|
dryRun = false
|
|
12245
12245
|
}) {
|
|
12246
12246
|
if (format !== "deflated") {
|
|
12247
12247
|
if (format !== "wrapped") {
|
|
12248
|
-
|
|
12248
|
+
object4 = GitObject.wrap({ type, object: object4 });
|
|
12249
12249
|
}
|
|
12250
|
-
oid = await shasum(
|
|
12251
|
-
|
|
12250
|
+
oid = await shasum(object4);
|
|
12251
|
+
object4 = Buffer.from(await deflate(object4));
|
|
12252
12252
|
}
|
|
12253
12253
|
if (!dryRun) {
|
|
12254
|
-
await writeObjectLoose({ fs: fs3, gitdir, object:
|
|
12254
|
+
await writeObjectLoose({ fs: fs3, gitdir, object: object4, format: "deflated", oid });
|
|
12255
12255
|
}
|
|
12256
12256
|
return oid;
|
|
12257
12257
|
}
|
|
@@ -12360,9 +12360,9 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12360
12360
|
}
|
|
12361
12361
|
}
|
|
12362
12362
|
} else {
|
|
12363
|
-
const
|
|
12364
|
-
if (
|
|
12365
|
-
const oid = await _writeObject({ fs: fs3, gitdir, type: "blob", object:
|
|
12363
|
+
const object4 = stats.isSymbolicLink() ? await fs3.readlink(join7(dir, currentFilepath)).then(posixifyPathBuffer) : await fs3.read(join7(dir, currentFilepath), { autocrlf });
|
|
12364
|
+
if (object4 === null) throw new NotFoundError(currentFilepath);
|
|
12365
|
+
const oid = await _writeObject({ fs: fs3, gitdir, type: "blob", object: object4 });
|
|
12366
12366
|
index2.insert({ filepath: currentFilepath, stats, oid });
|
|
12367
12367
|
}
|
|
12368
12368
|
});
|
|
@@ -12442,15 +12442,15 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12442
12442
|
return normalizedCommitter;
|
|
12443
12443
|
}
|
|
12444
12444
|
async function resolveCommit({ fs: fs3, cache, gitdir, oid }) {
|
|
12445
|
-
const { type, object:
|
|
12445
|
+
const { type, object: object4 } = await _readObject({ fs: fs3, cache, gitdir, oid });
|
|
12446
12446
|
if (type === "tag") {
|
|
12447
|
-
oid = GitAnnotatedTag.from(
|
|
12447
|
+
oid = GitAnnotatedTag.from(object4).parse().object;
|
|
12448
12448
|
return resolveCommit({ fs: fs3, cache, gitdir, oid });
|
|
12449
12449
|
}
|
|
12450
12450
|
if (type !== "commit") {
|
|
12451
12451
|
throw new ObjectTypeError(oid, type, "commit");
|
|
12452
12452
|
}
|
|
12453
|
-
return { commit: GitCommit.from(
|
|
12453
|
+
return { commit: GitCommit.from(object4), oid };
|
|
12454
12454
|
}
|
|
12455
12455
|
async function _readCommit({ fs: fs3, cache, gitdir, oid }) {
|
|
12456
12456
|
const { commit: commit3, oid: commitOid } = await resolveCommit({
|
|
@@ -12671,7 +12671,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12671
12671
|
if (pathArray.length === 0) {
|
|
12672
12672
|
return entry;
|
|
12673
12673
|
} else {
|
|
12674
|
-
const { type, object:
|
|
12674
|
+
const { type, object: object4 } = await _readObject({
|
|
12675
12675
|
fs: fs3,
|
|
12676
12676
|
cache,
|
|
12677
12677
|
gitdir,
|
|
@@ -12680,7 +12680,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12680
12680
|
if (type !== "tree") {
|
|
12681
12681
|
throw new ObjectTypeError(oid, type, "tree", filepath);
|
|
12682
12682
|
}
|
|
12683
|
-
tree = GitTree.from(
|
|
12683
|
+
tree = GitTree.from(object4);
|
|
12684
12684
|
return _resolveFilepath({
|
|
12685
12685
|
fs: fs3,
|
|
12686
12686
|
cache,
|
|
@@ -12713,12 +12713,12 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12713
12713
|
return result;
|
|
12714
12714
|
}
|
|
12715
12715
|
async function _writeTree({ fs: fs3, gitdir, tree }) {
|
|
12716
|
-
const
|
|
12716
|
+
const object4 = GitTree.from(tree).toObject();
|
|
12717
12717
|
const oid = await _writeObject({
|
|
12718
12718
|
fs: fs3,
|
|
12719
12719
|
gitdir,
|
|
12720
12720
|
type: "tree",
|
|
12721
|
-
object:
|
|
12721
|
+
object: object4,
|
|
12722
12722
|
format: "content"
|
|
12723
12723
|
});
|
|
12724
12724
|
return oid;
|
|
@@ -12899,7 +12899,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12899
12899
|
tagger,
|
|
12900
12900
|
message = ref,
|
|
12901
12901
|
gpgsig,
|
|
12902
|
-
object:
|
|
12902
|
+
object: object4,
|
|
12903
12903
|
signingKey,
|
|
12904
12904
|
force = false
|
|
12905
12905
|
}) {
|
|
@@ -12910,7 +12910,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12910
12910
|
const oid = await GitRefManager.resolve({
|
|
12911
12911
|
fs: fs3,
|
|
12912
12912
|
gitdir,
|
|
12913
|
-
ref:
|
|
12913
|
+
ref: object4 || "HEAD"
|
|
12914
12914
|
});
|
|
12915
12915
|
const { type } = await _readObject({ fs: fs3, cache, gitdir, oid });
|
|
12916
12916
|
let tagObject = GitAnnotatedTag.from({
|
|
@@ -12941,7 +12941,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12941
12941
|
tagger: _tagger,
|
|
12942
12942
|
message = ref,
|
|
12943
12943
|
gpgsig,
|
|
12944
|
-
object:
|
|
12944
|
+
object: object4,
|
|
12945
12945
|
signingKey,
|
|
12946
12946
|
force = false,
|
|
12947
12947
|
cache = {}
|
|
@@ -12970,7 +12970,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12970
12970
|
tagger,
|
|
12971
12971
|
message,
|
|
12972
12972
|
gpgsig,
|
|
12973
|
-
object:
|
|
12973
|
+
object: object4,
|
|
12974
12974
|
signingKey,
|
|
12975
12975
|
force
|
|
12976
12976
|
});
|
|
@@ -12983,7 +12983,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12983
12983
|
fs: fs3,
|
|
12984
12984
|
gitdir,
|
|
12985
12985
|
ref,
|
|
12986
|
-
object:
|
|
12986
|
+
object: object4,
|
|
12987
12987
|
checkout: checkout2 = false,
|
|
12988
12988
|
force = false
|
|
12989
12989
|
}) {
|
|
@@ -12999,7 +12999,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12999
12999
|
}
|
|
13000
13000
|
let oid;
|
|
13001
13001
|
try {
|
|
13002
|
-
oid = await GitRefManager.resolve({ fs: fs3, gitdir, ref:
|
|
13002
|
+
oid = await GitRefManager.resolve({ fs: fs3, gitdir, ref: object4 || "HEAD" });
|
|
13003
13003
|
} catch (e) {
|
|
13004
13004
|
}
|
|
13005
13005
|
if (oid) {
|
|
@@ -13019,7 +13019,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
13019
13019
|
dir,
|
|
13020
13020
|
gitdir = join7(dir, ".git"),
|
|
13021
13021
|
ref,
|
|
13022
|
-
object:
|
|
13022
|
+
object: object4,
|
|
13023
13023
|
checkout: checkout2 = false,
|
|
13024
13024
|
force = false
|
|
13025
13025
|
}) {
|
|
@@ -13033,7 +13033,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
13033
13033
|
fs: fsp,
|
|
13034
13034
|
gitdir: updatedGitdir,
|
|
13035
13035
|
ref,
|
|
13036
|
-
object:
|
|
13036
|
+
object: object4,
|
|
13037
13037
|
checkout: checkout2,
|
|
13038
13038
|
force
|
|
13039
13039
|
});
|
|
@@ -13270,7 +13270,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
13270
13270
|
const filepath = `${dir}/${fullpath}`;
|
|
13271
13271
|
if (method !== "create-index" && method !== "mkdir-index") {
|
|
13272
13272
|
await assertNoSymlinkInLeadingPath(fs3, dir, fullpath);
|
|
13273
|
-
const { object:
|
|
13273
|
+
const { object: object4 } = await _readObject({
|
|
13274
13274
|
fs: fs3,
|
|
13275
13275
|
cache,
|
|
13276
13276
|
gitdir,
|
|
@@ -13280,11 +13280,11 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
13280
13280
|
await fs3.rm(filepath);
|
|
13281
13281
|
}
|
|
13282
13282
|
if (mode === 33188) {
|
|
13283
|
-
await fs3.write(filepath,
|
|
13283
|
+
await fs3.write(filepath, object4);
|
|
13284
13284
|
} else if (mode === 33261) {
|
|
13285
|
-
await fs3.write(filepath,
|
|
13285
|
+
await fs3.write(filepath, object4, { mode: 511 });
|
|
13286
13286
|
} else if (mode === 40960) {
|
|
13287
|
-
await fs3.writelink(filepath,
|
|
13287
|
+
await fs3.writelink(filepath, object4);
|
|
13288
13288
|
} else {
|
|
13289
13289
|
throw new InternalError(
|
|
13290
13290
|
`Invalid mode 0o${mode.toString(
|
|
@@ -13621,16 +13621,16 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
13621
13621
|
const filepath = `${dir}/${fullpath}`;
|
|
13622
13622
|
if (method !== "create-index" && method !== "mkdir-index") {
|
|
13623
13623
|
await assertNoSymlinkInLeadingPath(fs3, dir, fullpath);
|
|
13624
|
-
const { object:
|
|
13624
|
+
const { object: object4 } = await _readObject({ fs: fs3, cache, gitdir, oid });
|
|
13625
13625
|
if (chmod2) {
|
|
13626
13626
|
await fs3.rm(filepath);
|
|
13627
13627
|
}
|
|
13628
13628
|
if (mode === 33188) {
|
|
13629
|
-
await fs3.write(filepath,
|
|
13629
|
+
await fs3.write(filepath, object4);
|
|
13630
13630
|
} else if (mode === 33261) {
|
|
13631
|
-
await fs3.write(filepath,
|
|
13631
|
+
await fs3.write(filepath, object4, { mode: 511 });
|
|
13632
13632
|
} else if (mode === 40960) {
|
|
13633
|
-
await fs3.writelink(filepath,
|
|
13633
|
+
await fs3.writelink(filepath, object4);
|
|
13634
13634
|
} else {
|
|
13635
13635
|
throw new InternalError(
|
|
13636
13636
|
`Invalid mode 0o${mode.toString(8)} detected in blob ${oid}`
|
|
@@ -13929,12 +13929,12 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
13929
13929
|
return;
|
|
13930
13930
|
if (entries.length > 0 || parent.path === "." && entries.length === 0) {
|
|
13931
13931
|
const tree = new GitTree(entries);
|
|
13932
|
-
const
|
|
13932
|
+
const object4 = tree.toObject();
|
|
13933
13933
|
const oid = await _writeObject({
|
|
13934
13934
|
fs: fs3,
|
|
13935
13935
|
gitdir,
|
|
13936
13936
|
type: "tree",
|
|
13937
|
-
object:
|
|
13937
|
+
object: object4,
|
|
13938
13938
|
dryRun
|
|
13939
13939
|
});
|
|
13940
13940
|
parent.oid = oid;
|
|
@@ -14043,9 +14043,9 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
14043
14043
|
let retOid = objContent ? oid : void 0;
|
|
14044
14044
|
if (!objContent) {
|
|
14045
14045
|
await acquireLock(currentFilepath, async () => {
|
|
14046
|
-
const
|
|
14047
|
-
if (
|
|
14048
|
-
retOid = await _writeObject({ fs: fs3, gitdir, type: "blob", object:
|
|
14046
|
+
const object4 = stats.isSymbolicLink() ? await fs3.readlink(currentFilepath).then(posixifyPathBuffer) : await fs3.read(currentFilepath);
|
|
14047
|
+
if (object4 === null) throw new NotFoundError(currentFilepath);
|
|
14048
|
+
retOid = await _writeObject({ fs: fs3, gitdir, type: "blob", object: object4 });
|
|
14049
14049
|
});
|
|
14050
14050
|
}
|
|
14051
14051
|
return retOid;
|
|
@@ -14231,7 +14231,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
14231
14231
|
(removedDir) => currentFilepath.startsWith(removedDir)
|
|
14232
14232
|
)) {
|
|
14233
14233
|
await assertNoSymlinkInLeadingPath(fs3, dir, op.filepath);
|
|
14234
|
-
const { object:
|
|
14234
|
+
const { object: object4 } = await _readObject({
|
|
14235
14235
|
fs: fs3,
|
|
14236
14236
|
cache: {},
|
|
14237
14237
|
gitdir,
|
|
@@ -14240,7 +14240,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
14240
14240
|
if (await fs3.exists(currentFilepath)) {
|
|
14241
14241
|
await fs3.rm(currentFilepath);
|
|
14242
14242
|
}
|
|
14243
|
-
await fs3.write(currentFilepath,
|
|
14243
|
+
await fs3.write(currentFilepath, object4);
|
|
14244
14244
|
}
|
|
14245
14245
|
break;
|
|
14246
14246
|
}
|
|
@@ -15447,8 +15447,8 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15447
15447
|
for (const oid2 of response.shallows) {
|
|
15448
15448
|
if (!oids.has(oid2)) {
|
|
15449
15449
|
try {
|
|
15450
|
-
const { object:
|
|
15451
|
-
const commit3 = new GitCommit(
|
|
15450
|
+
const { object: object4 } = await _readObject({ fs: fs3, cache, gitdir, oid: oid2 });
|
|
15451
|
+
const commit3 = new GitCommit(object4);
|
|
15452
15452
|
const hasParents = await Promise.all(
|
|
15453
15453
|
commit3.headers().parent.map((oid3) => hasObject({ fs: fs3, cache, gitdir, oid: oid3 }))
|
|
15454
15454
|
);
|
|
@@ -16018,11 +16018,11 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16018
16018
|
const shallows = await GitShallowManager.read({ fs: fs3, gitdir });
|
|
16019
16019
|
const readParents = async (oid) => {
|
|
16020
16020
|
if (parents.has(oid)) return parents.get(oid);
|
|
16021
|
-
const { object:
|
|
16021
|
+
const { object: object4, type } = await _readObject({ fs: fs3, cache, gitdir, oid });
|
|
16022
16022
|
if (type !== "commit") {
|
|
16023
16023
|
throw new ObjectTypeError(oid, type, "commit");
|
|
16024
16024
|
}
|
|
16025
|
-
const commit3 = GitCommit.from(
|
|
16025
|
+
const commit3 = GitCommit.from(object4);
|
|
16026
16026
|
const { parent } = commit3.parseHeaders();
|
|
16027
16027
|
const result = shallows.has(oid) ? [] : parent;
|
|
16028
16028
|
parents.set(oid, result);
|
|
@@ -16612,31 +16612,31 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16612
16612
|
}
|
|
16613
16613
|
async function hashObject({
|
|
16614
16614
|
type,
|
|
16615
|
-
object:
|
|
16615
|
+
object: object4,
|
|
16616
16616
|
format = "content",
|
|
16617
16617
|
oid = void 0
|
|
16618
16618
|
}) {
|
|
16619
16619
|
if (format !== "deflated") {
|
|
16620
16620
|
if (format !== "wrapped") {
|
|
16621
|
-
|
|
16621
|
+
object4 = GitObject.wrap({ type, object: object4 });
|
|
16622
16622
|
}
|
|
16623
|
-
oid = await shasum(
|
|
16623
|
+
oid = await shasum(object4);
|
|
16624
16624
|
}
|
|
16625
|
-
return { oid, object:
|
|
16625
|
+
return { oid, object: object4 };
|
|
16626
16626
|
}
|
|
16627
|
-
async function hashBlob({ object:
|
|
16627
|
+
async function hashBlob({ object: object4 }) {
|
|
16628
16628
|
try {
|
|
16629
|
-
assertParameter("object",
|
|
16630
|
-
if (typeof
|
|
16631
|
-
|
|
16632
|
-
} else if (!(
|
|
16633
|
-
|
|
16629
|
+
assertParameter("object", object4);
|
|
16630
|
+
if (typeof object4 === "string") {
|
|
16631
|
+
object4 = Buffer.from(object4, "utf8");
|
|
16632
|
+
} else if (!(object4 instanceof Uint8Array)) {
|
|
16633
|
+
object4 = new Uint8Array(object4);
|
|
16634
16634
|
}
|
|
16635
16635
|
const type = "blob";
|
|
16636
16636
|
const { oid, object: _object } = await hashObject({
|
|
16637
16637
|
type,
|
|
16638
16638
|
format: "content",
|
|
16639
|
-
object:
|
|
16639
|
+
object: object4
|
|
16640
16640
|
});
|
|
16641
16641
|
return { oid, type, object: _object, format: "wrapped" };
|
|
16642
16642
|
} catch (err) {
|
|
@@ -16749,7 +16749,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16749
16749
|
throw new MaxDepthError(depth);
|
|
16750
16750
|
}
|
|
16751
16751
|
const oid2 = queue.shift();
|
|
16752
|
-
const { type, object:
|
|
16752
|
+
const { type, object: object4 } = await _readObject({
|
|
16753
16753
|
fs: fs3,
|
|
16754
16754
|
cache,
|
|
16755
16755
|
gitdir,
|
|
@@ -16758,7 +16758,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16758
16758
|
if (type !== "commit") {
|
|
16759
16759
|
throw new ObjectTypeError(oid2, type, "commit");
|
|
16760
16760
|
}
|
|
16761
|
-
const commit3 = GitCommit.from(
|
|
16761
|
+
const commit3 = GitCommit.from(object4).parse();
|
|
16762
16762
|
for (const parent of commit3.parent) {
|
|
16763
16763
|
if (parent === ancestor) return true;
|
|
16764
16764
|
}
|
|
@@ -17149,12 +17149,12 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17149
17149
|
cache,
|
|
17150
17150
|
gitdir,
|
|
17151
17151
|
oid: entry.oid
|
|
17152
|
-
}).then(function({ object:
|
|
17152
|
+
}).then(function({ object: object4 }) {
|
|
17153
17153
|
return _resolveFileId({
|
|
17154
17154
|
fs: fs3,
|
|
17155
17155
|
cache,
|
|
17156
17156
|
gitdir,
|
|
17157
|
-
tree: GitTree.from(
|
|
17157
|
+
tree: GitTree.from(object4),
|
|
17158
17158
|
fileId,
|
|
17159
17159
|
oid,
|
|
17160
17160
|
filepaths,
|
|
@@ -17458,9 +17458,9 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17458
17458
|
outputStream.push(buff);
|
|
17459
17459
|
hash.update(buff);
|
|
17460
17460
|
}
|
|
17461
|
-
async function writeObject2({ stype, object:
|
|
17461
|
+
async function writeObject2({ stype, object: object4 }) {
|
|
17462
17462
|
const type = types[stype];
|
|
17463
|
-
let length =
|
|
17463
|
+
let length = object4.length;
|
|
17464
17464
|
let multibyte = length > 15 ? 128 : 0;
|
|
17465
17465
|
const lastFour = length & 15;
|
|
17466
17466
|
length = length >>> 4;
|
|
@@ -17472,14 +17472,14 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17472
17472
|
write(padHex(2, byte), "hex");
|
|
17473
17473
|
length = length >>> 7;
|
|
17474
17474
|
}
|
|
17475
|
-
write(Buffer.from(await deflate(
|
|
17475
|
+
write(Buffer.from(await deflate(object4)));
|
|
17476
17476
|
}
|
|
17477
17477
|
write("PACK");
|
|
17478
17478
|
write("00000002", "hex");
|
|
17479
17479
|
write(padHex(8, oids.length), "hex");
|
|
17480
17480
|
for (const oid of oids) {
|
|
17481
|
-
const { type, object:
|
|
17482
|
-
await writeObject2({ write, object:
|
|
17481
|
+
const { type, object: object4 } = await _readObject({ fs: fs3, cache, gitdir, oid });
|
|
17482
|
+
await writeObject2({ write, object: object4, stype: type });
|
|
17483
17483
|
}
|
|
17484
17484
|
const digest2 = hash.digest();
|
|
17485
17485
|
outputStream.push(digest2);
|
|
@@ -17624,9 +17624,9 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17624
17624
|
const visited = /* @__PURE__ */ new Set();
|
|
17625
17625
|
async function walk2(oid) {
|
|
17626
17626
|
visited.add(oid);
|
|
17627
|
-
const { type, object:
|
|
17627
|
+
const { type, object: object4 } = await _readObject({ fs: fs3, cache, gitdir, oid });
|
|
17628
17628
|
if (type === "tag") {
|
|
17629
|
-
const tag2 = GitAnnotatedTag.from(
|
|
17629
|
+
const tag2 = GitAnnotatedTag.from(object4);
|
|
17630
17630
|
const commit3 = tag2.headers().object;
|
|
17631
17631
|
return walk2(commit3);
|
|
17632
17632
|
}
|
|
@@ -17634,7 +17634,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17634
17634
|
throw new ObjectTypeError(oid, type, "commit");
|
|
17635
17635
|
}
|
|
17636
17636
|
if (!shallows.has(oid)) {
|
|
17637
|
-
const commit3 = GitCommit.from(
|
|
17637
|
+
const commit3 = GitCommit.from(object4);
|
|
17638
17638
|
const parents = commit3.headers().parent;
|
|
17639
17639
|
for (oid of parents) {
|
|
17640
17640
|
if (!finishingSet.has(oid) && !visited.has(oid)) {
|
|
@@ -17659,17 +17659,17 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17659
17659
|
async function walk2(oid) {
|
|
17660
17660
|
if (visited.has(oid)) return;
|
|
17661
17661
|
visited.add(oid);
|
|
17662
|
-
const { type, object:
|
|
17662
|
+
const { type, object: object4 } = await _readObject({ fs: fs3, cache, gitdir, oid });
|
|
17663
17663
|
if (type === "tag") {
|
|
17664
|
-
const tag2 = GitAnnotatedTag.from(
|
|
17664
|
+
const tag2 = GitAnnotatedTag.from(object4);
|
|
17665
17665
|
const obj = tag2.headers().object;
|
|
17666
17666
|
await walk2(obj);
|
|
17667
17667
|
} else if (type === "commit") {
|
|
17668
|
-
const commit3 = GitCommit.from(
|
|
17668
|
+
const commit3 = GitCommit.from(object4);
|
|
17669
17669
|
const tree = commit3.headers().tree;
|
|
17670
17670
|
await walk2(tree);
|
|
17671
17671
|
} else if (type === "tree") {
|
|
17672
|
-
const tree = GitTree.from(
|
|
17672
|
+
const tree = GitTree.from(object4);
|
|
17673
17673
|
for (const entry of tree) {
|
|
17674
17674
|
if (entry.type === "blob") {
|
|
17675
17675
|
visited.add(entry.oid);
|
|
@@ -18000,15 +18000,15 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18000
18000
|
}
|
|
18001
18001
|
}
|
|
18002
18002
|
async function resolveBlob({ fs: fs3, cache, gitdir, oid }) {
|
|
18003
|
-
const { type, object:
|
|
18003
|
+
const { type, object: object4 } = await _readObject({ fs: fs3, cache, gitdir, oid });
|
|
18004
18004
|
if (type === "tag") {
|
|
18005
|
-
oid = GitAnnotatedTag.from(
|
|
18005
|
+
oid = GitAnnotatedTag.from(object4).parse().object;
|
|
18006
18006
|
return resolveBlob({ fs: fs3, cache, gitdir, oid });
|
|
18007
18007
|
}
|
|
18008
18008
|
if (type !== "blob") {
|
|
18009
18009
|
throw new ObjectTypeError(oid, type, "blob");
|
|
18010
18010
|
}
|
|
18011
|
-
return { oid, blob: new Uint8Array(
|
|
18011
|
+
return { oid, blob: new Uint8Array(object4) };
|
|
18012
18012
|
}
|
|
18013
18013
|
async function _readBlob({
|
|
18014
18014
|
fs: fs3,
|
|
@@ -18193,7 +18193,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18193
18193
|
}
|
|
18194
18194
|
}
|
|
18195
18195
|
async function _readTag({ fs: fs3, cache, gitdir, oid }) {
|
|
18196
|
-
const { type, object:
|
|
18196
|
+
const { type, object: object4 } = await _readObject({
|
|
18197
18197
|
fs: fs3,
|
|
18198
18198
|
cache,
|
|
18199
18199
|
gitdir,
|
|
@@ -18203,7 +18203,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18203
18203
|
if (type !== "tag") {
|
|
18204
18204
|
throw new ObjectTypeError(oid, type, "tag");
|
|
18205
18205
|
}
|
|
18206
|
-
const tag2 = GitAnnotatedTag.from(
|
|
18206
|
+
const tag2 = GitAnnotatedTag.from(object4);
|
|
18207
18207
|
const result = {
|
|
18208
18208
|
oid,
|
|
18209
18209
|
tag: tag2.parse(),
|
|
@@ -18452,8 +18452,8 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18452
18452
|
throw err;
|
|
18453
18453
|
}
|
|
18454
18454
|
}
|
|
18455
|
-
async function hashObject$1({ gitdir, type, object:
|
|
18456
|
-
return shasum(GitObject.wrap({ type, object:
|
|
18455
|
+
async function hashObject$1({ gitdir, type, object: object4 }) {
|
|
18456
|
+
return shasum(GitObject.wrap({ type, object: object4 }));
|
|
18457
18457
|
}
|
|
18458
18458
|
async function resetIndex({
|
|
18459
18459
|
fs: _fs,
|
|
@@ -18505,12 +18505,12 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18505
18505
|
gid: 0,
|
|
18506
18506
|
size: 0
|
|
18507
18507
|
};
|
|
18508
|
-
const
|
|
18509
|
-
if (
|
|
18508
|
+
const object4 = dir && await fs3.read(join7(dir, filepath));
|
|
18509
|
+
if (object4) {
|
|
18510
18510
|
workdirOid = await hashObject$1({
|
|
18511
18511
|
gitdir: updatedGitdir,
|
|
18512
18512
|
type: "blob",
|
|
18513
|
-
object:
|
|
18513
|
+
object: object4
|
|
18514
18514
|
});
|
|
18515
18515
|
if (oid === workdirOid) {
|
|
18516
18516
|
stats = await fs3.lstat(join7(dir, filepath));
|
|
@@ -18582,12 +18582,12 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18582
18582
|
}
|
|
18583
18583
|
}
|
|
18584
18584
|
async function _writeCommit({ fs: fs3, gitdir, commit: commit3 }) {
|
|
18585
|
-
const
|
|
18585
|
+
const object4 = GitCommit.from(commit3).toObject();
|
|
18586
18586
|
const oid = await _writeObject({
|
|
18587
18587
|
fs: fs3,
|
|
18588
18588
|
gitdir,
|
|
18589
18589
|
type: "commit",
|
|
18590
|
-
object:
|
|
18590
|
+
object: object4,
|
|
18591
18591
|
format: "content"
|
|
18592
18592
|
});
|
|
18593
18593
|
return oid;
|
|
@@ -19072,11 +19072,11 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
19072
19072
|
} else {
|
|
19073
19073
|
const config = await GitConfigManager.get({ fs: fs3, gitdir: updatedGitdir });
|
|
19074
19074
|
const autocrlf = await config.get("core.autocrlf");
|
|
19075
|
-
const
|
|
19075
|
+
const object4 = await fs3.read(join7(dir, filepath), { autocrlf });
|
|
19076
19076
|
const workdirOid = await hashObject$1({
|
|
19077
19077
|
gitdir: updatedGitdir,
|
|
19078
19078
|
type: "blob",
|
|
19079
|
-
object:
|
|
19079
|
+
object: object4
|
|
19080
19080
|
});
|
|
19081
19081
|
if (refresh && I && indexEntry.oid === workdirOid) {
|
|
19082
19082
|
if (stats.size !== -1) {
|
|
@@ -19127,14 +19127,14 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
19127
19127
|
if (path2.length === 0) {
|
|
19128
19128
|
return entry.oid;
|
|
19129
19129
|
}
|
|
19130
|
-
const { type, object:
|
|
19130
|
+
const { type, object: object4 } = await _readObject({
|
|
19131
19131
|
fs: fs3,
|
|
19132
19132
|
cache,
|
|
19133
19133
|
gitdir: updatedGitdir,
|
|
19134
19134
|
oid: entry.oid
|
|
19135
19135
|
});
|
|
19136
19136
|
if (type === "tree") {
|
|
19137
|
-
const tree2 = GitTree.from(
|
|
19137
|
+
const tree2 = GitTree.from(object4);
|
|
19138
19138
|
return getOidAtPath({ fs: fs3, cache, gitdir: updatedGitdir, tree: tree2, path: path2 });
|
|
19139
19139
|
}
|
|
19140
19140
|
if (type === "blob") {
|
|
@@ -19238,7 +19238,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
19238
19238
|
dir,
|
|
19239
19239
|
gitdir = join7(dir, ".git"),
|
|
19240
19240
|
ref,
|
|
19241
|
-
object:
|
|
19241
|
+
object: object4,
|
|
19242
19242
|
force = false
|
|
19243
19243
|
}) {
|
|
19244
19244
|
try {
|
|
@@ -19254,7 +19254,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
19254
19254
|
const value = await GitRefManager.resolve({
|
|
19255
19255
|
fs: fs3,
|
|
19256
19256
|
gitdir: updatedGitdir,
|
|
19257
|
-
ref:
|
|
19257
|
+
ref: object4 || "HEAD"
|
|
19258
19258
|
});
|
|
19259
19259
|
if (!force && await GitRefManager.exists({ fs: fs3, gitdir: updatedGitdir, ref })) {
|
|
19260
19260
|
throw new AlreadyExistsError("tag", ref);
|
|
@@ -19327,13 +19327,13 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
19327
19327
|
let stats;
|
|
19328
19328
|
if (!oid) {
|
|
19329
19329
|
stats = fileStats;
|
|
19330
|
-
const
|
|
19330
|
+
const object4 = stats.isSymbolicLink() ? await fs3.readlink(join7(dir, filepath)) : await fs3.read(join7(dir, filepath));
|
|
19331
19331
|
oid = await _writeObject({
|
|
19332
19332
|
fs: fs3,
|
|
19333
19333
|
gitdir: updatedGitdir,
|
|
19334
19334
|
type: "blob",
|
|
19335
19335
|
format: "content",
|
|
19336
|
-
object:
|
|
19336
|
+
object: object4
|
|
19337
19337
|
});
|
|
19338
19338
|
} else {
|
|
19339
19339
|
stats = {
|
|
@@ -19445,7 +19445,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
19445
19445
|
dir,
|
|
19446
19446
|
gitdir = join7(dir, ".git"),
|
|
19447
19447
|
type,
|
|
19448
|
-
object:
|
|
19448
|
+
object: object4,
|
|
19449
19449
|
format = "parsed",
|
|
19450
19450
|
oid,
|
|
19451
19451
|
encoding = void 0
|
|
@@ -19456,16 +19456,16 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
19456
19456
|
if (format === "parsed") {
|
|
19457
19457
|
switch (type) {
|
|
19458
19458
|
case "commit":
|
|
19459
|
-
|
|
19459
|
+
object4 = GitCommit.from(object4).toObject();
|
|
19460
19460
|
break;
|
|
19461
19461
|
case "tree":
|
|
19462
|
-
|
|
19462
|
+
object4 = GitTree.from(object4).toObject();
|
|
19463
19463
|
break;
|
|
19464
19464
|
case "blob":
|
|
19465
|
-
|
|
19465
|
+
object4 = Buffer.from(object4, encoding);
|
|
19466
19466
|
break;
|
|
19467
19467
|
case "tag":
|
|
19468
|
-
|
|
19468
|
+
object4 = GitAnnotatedTag.from(object4).toObject();
|
|
19469
19469
|
break;
|
|
19470
19470
|
default:
|
|
19471
19471
|
throw new ObjectTypeError(oid || "", type, "blob|commit|tag|tree");
|
|
@@ -19476,7 +19476,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
19476
19476
|
fs: fs3,
|
|
19477
19477
|
gitdir: updatedGitdir,
|
|
19478
19478
|
type,
|
|
19479
|
-
object:
|
|
19479
|
+
object: object4,
|
|
19480
19480
|
oid,
|
|
19481
19481
|
format
|
|
19482
19482
|
});
|
|
@@ -19534,12 +19534,12 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
19534
19534
|
}
|
|
19535
19535
|
}
|
|
19536
19536
|
async function _writeTag({ fs: fs3, gitdir, tag: tag2 }) {
|
|
19537
|
-
const
|
|
19537
|
+
const object4 = GitAnnotatedTag.from(tag2).toObject();
|
|
19538
19538
|
const oid = await _writeObject({
|
|
19539
19539
|
fs: fs3,
|
|
19540
19540
|
gitdir,
|
|
19541
19541
|
type: "tag",
|
|
19542
|
-
object:
|
|
19542
|
+
object: object4,
|
|
19543
19543
|
format: "content"
|
|
19544
19544
|
});
|
|
19545
19545
|
return oid;
|
|
@@ -21928,10 +21928,10 @@ var require_resolve = __commonJS({
|
|
|
21928
21928
|
}
|
|
21929
21929
|
return count;
|
|
21930
21930
|
}
|
|
21931
|
-
function getFullPath(resolver,
|
|
21931
|
+
function getFullPath(resolver, id4 = "", normalize) {
|
|
21932
21932
|
if (normalize !== false)
|
|
21933
|
-
|
|
21934
|
-
const p = resolver.parse(
|
|
21933
|
+
id4 = normalizeId(id4);
|
|
21934
|
+
const p = resolver.parse(id4);
|
|
21935
21935
|
return _getFullPath(resolver, p);
|
|
21936
21936
|
}
|
|
21937
21937
|
exports.getFullPath = getFullPath;
|
|
@@ -21941,13 +21941,13 @@ var require_resolve = __commonJS({
|
|
|
21941
21941
|
}
|
|
21942
21942
|
exports._getFullPath = _getFullPath;
|
|
21943
21943
|
var TRAILING_SLASH_HASH = /#\/?$/;
|
|
21944
|
-
function normalizeId(
|
|
21945
|
-
return
|
|
21944
|
+
function normalizeId(id4) {
|
|
21945
|
+
return id4 ? id4.replace(TRAILING_SLASH_HASH, "") : "";
|
|
21946
21946
|
}
|
|
21947
21947
|
exports.normalizeId = normalizeId;
|
|
21948
|
-
function resolveUrl(resolver, baseId,
|
|
21949
|
-
|
|
21950
|
-
return resolver.resolve(baseId,
|
|
21948
|
+
function resolveUrl(resolver, baseId, id4) {
|
|
21949
|
+
id4 = normalizeId(id4);
|
|
21950
|
+
return resolver.resolve(baseId, id4);
|
|
21951
21951
|
}
|
|
21952
21952
|
exports.resolveUrl = resolveUrl;
|
|
21953
21953
|
var ANCHOR = /^[a-z_][-a-z0-9._]*$/i;
|
|
@@ -22717,8 +22717,8 @@ var require_compile = __commonJS({
|
|
|
22717
22717
|
if (Object.keys(root.schema).length > 0 && refPath === baseId) {
|
|
22718
22718
|
return getJsonPointer.call(this, p, root);
|
|
22719
22719
|
}
|
|
22720
|
-
const
|
|
22721
|
-
const schOrRef = this.refs[
|
|
22720
|
+
const id4 = (0, resolve_1.normalizeId)(refPath);
|
|
22721
|
+
const schOrRef = this.refs[id4] || this.schemas[id4];
|
|
22722
22722
|
if (typeof schOrRef == "string") {
|
|
22723
22723
|
const sch = resolveSchema.call(this, root, schOrRef);
|
|
22724
22724
|
if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object")
|
|
@@ -22729,7 +22729,7 @@ var require_compile = __commonJS({
|
|
|
22729
22729
|
return;
|
|
22730
22730
|
if (!schOrRef.validate)
|
|
22731
22731
|
compileSchema.call(this, schOrRef);
|
|
22732
|
-
if (
|
|
22732
|
+
if (id4 === (0, resolve_1.normalizeId)(ref)) {
|
|
22733
22733
|
const { schema } = schOrRef;
|
|
22734
22734
|
const { schemaId } = this.opts;
|
|
22735
22735
|
const schId = schema[schemaId];
|
|
@@ -22796,9 +22796,9 @@ var require_data = __commonJS({
|
|
|
22796
22796
|
}
|
|
22797
22797
|
});
|
|
22798
22798
|
|
|
22799
|
-
// node_modules/.pnpm/fast-uri@3.1.
|
|
22799
|
+
// node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/utils.js
|
|
22800
22800
|
var require_utils = __commonJS({
|
|
22801
|
-
"node_modules/.pnpm/fast-uri@3.1.
|
|
22801
|
+
"node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/utils.js"(exports, module) {
|
|
22802
22802
|
"use strict";
|
|
22803
22803
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
22804
22804
|
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);
|
|
@@ -22920,28 +22920,28 @@ var require_utils = __commonJS({
|
|
|
22920
22920
|
for (let i = left.length; i < parts.length; i++) expanded.push(parts[i]);
|
|
22921
22921
|
return compressIPv6ZeroRun(expanded);
|
|
22922
22922
|
}
|
|
22923
|
-
function normalizeIPv6(
|
|
22924
|
-
const bracketed =
|
|
22925
|
-
const hasBracket =
|
|
22926
|
-
if (hasBracket && !bracketed) return { host, isIPV6: false, error: true };
|
|
22927
|
-
let input = bracketed ?
|
|
22923
|
+
function normalizeIPv6(host2) {
|
|
22924
|
+
const bracketed = host2[0] === "[" && host2[host2.length - 1] === "]";
|
|
22925
|
+
const hasBracket = host2[0] === "[" || host2[host2.length - 1] === "]";
|
|
22926
|
+
if (hasBracket && !bracketed) return { host: host2, isIPV6: false, error: true };
|
|
22927
|
+
let input = bracketed ? host2.slice(1, -1) : host2;
|
|
22928
22928
|
if (bracketed && isIPvFuture(input)) {
|
|
22929
22929
|
input = input.toLowerCase();
|
|
22930
22930
|
return { host: `[${input}]`, escapedHost: input, isIPV6: false, isIPVFuture: true };
|
|
22931
22931
|
}
|
|
22932
22932
|
if (findToken(input, ":") < 2) {
|
|
22933
|
-
return { host, isIPV6: false, error: bracketed };
|
|
22933
|
+
return { host: host2, isIPV6: false, error: bracketed };
|
|
22934
22934
|
}
|
|
22935
22935
|
let zoneIdentifier = "";
|
|
22936
22936
|
const zoneSeparator = input.indexOf("%");
|
|
22937
22937
|
if (zoneSeparator !== -1) {
|
|
22938
22938
|
const separatorLength = input.slice(zoneSeparator, zoneSeparator + 3).toLowerCase() === "%25" ? 3 : 1;
|
|
22939
22939
|
zoneIdentifier = input.slice(zoneSeparator + separatorLength);
|
|
22940
|
-
if (!isZoneIdentifier(zoneIdentifier)) return { host, isIPV6: false, error: true };
|
|
22940
|
+
if (!isZoneIdentifier(zoneIdentifier)) return { host: host2, isIPV6: false, error: true };
|
|
22941
22941
|
input = input.slice(0, zoneSeparator);
|
|
22942
22942
|
}
|
|
22943
22943
|
const address = normalizeIPv6Address(input);
|
|
22944
|
-
if (address === void 0) return { host, isIPV6: false, error: true };
|
|
22944
|
+
if (address === void 0) return { host: host2, isIPV6: false, error: true };
|
|
22945
22945
|
return {
|
|
22946
22946
|
host: address + (zoneIdentifier ? "%" + zoneIdentifier : ""),
|
|
22947
22947
|
escapedHost: address + (zoneIdentifier ? "%25" + zoneIdentifier : ""),
|
|
@@ -23030,13 +23030,44 @@ var require_utils = __commonJS({
|
|
|
23030
23030
|
}
|
|
23031
23031
|
return output.join("");
|
|
23032
23032
|
}
|
|
23033
|
+
function removeDotSegmentsRelative(path2) {
|
|
23034
|
+
if (path2 === "" || path2[0] === "/") {
|
|
23035
|
+
return removeDotSegments(path2);
|
|
23036
|
+
}
|
|
23037
|
+
const segments = path2.split("/");
|
|
23038
|
+
const last = segments.length - 1;
|
|
23039
|
+
const output = [];
|
|
23040
|
+
let trailingDirectory = false;
|
|
23041
|
+
for (let i = 0; i <= last; i++) {
|
|
23042
|
+
const segment = segments[i];
|
|
23043
|
+
if (segment === "." || segment === "..") {
|
|
23044
|
+
if (segment === "..") {
|
|
23045
|
+
if (output.length !== 0 && output[output.length - 1] !== "..") {
|
|
23046
|
+
output.pop();
|
|
23047
|
+
} else {
|
|
23048
|
+
output.push("..");
|
|
23049
|
+
}
|
|
23050
|
+
}
|
|
23051
|
+
trailingDirectory = i === last;
|
|
23052
|
+
} else {
|
|
23053
|
+
output.push(segment);
|
|
23054
|
+
}
|
|
23055
|
+
}
|
|
23056
|
+
if (trailingDirectory && output[output.length - 1] !== "..") {
|
|
23057
|
+
output.push("");
|
|
23058
|
+
}
|
|
23059
|
+
if (output.length === 0 || output[0] === "" || output[0].includes(":")) {
|
|
23060
|
+
output.unshift(".");
|
|
23061
|
+
}
|
|
23062
|
+
return output.join("/");
|
|
23063
|
+
}
|
|
23033
23064
|
var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
|
|
23034
23065
|
var HOST_DELIM_RE = /[@/?#:]/g;
|
|
23035
23066
|
var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
|
|
23036
|
-
function reescapeHostDelimiters(
|
|
23067
|
+
function reescapeHostDelimiters(host2, isIP) {
|
|
23037
23068
|
const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
|
|
23038
23069
|
re.lastIndex = 0;
|
|
23039
|
-
return
|
|
23070
|
+
return host2.replace(re, (ch) => HOST_DELIMS[ch]);
|
|
23040
23071
|
}
|
|
23041
23072
|
function normalizePercentEncoding(input, decodeUnreserved = false) {
|
|
23042
23073
|
if (input.indexOf("%") === -1) {
|
|
@@ -23252,20 +23283,20 @@ var require_utils = __commonJS({
|
|
|
23252
23283
|
uriTokens.push("@");
|
|
23253
23284
|
}
|
|
23254
23285
|
if (component.host !== void 0) {
|
|
23255
|
-
let
|
|
23256
|
-
if (!isIPv4(
|
|
23257
|
-
let ipV6res = normalizeIPv6(
|
|
23286
|
+
let host2 = component.host;
|
|
23287
|
+
if (!isIPv4(host2)) {
|
|
23288
|
+
let ipV6res = normalizeIPv6(host2);
|
|
23258
23289
|
if (ipV6res.isIPV6 !== true && ipV6res.isIPVFuture !== true) {
|
|
23259
|
-
|
|
23260
|
-
ipV6res = normalizeIPv6(
|
|
23290
|
+
host2 = normalizePercentEncoding(host2, true);
|
|
23291
|
+
ipV6res = normalizeIPv6(host2);
|
|
23261
23292
|
}
|
|
23262
23293
|
if (ipV6res.isIPV6 === true || ipV6res.isIPVFuture === true) {
|
|
23263
|
-
|
|
23294
|
+
host2 = `[${ipV6res.escapedHost}]`;
|
|
23264
23295
|
} else {
|
|
23265
|
-
|
|
23296
|
+
host2 = reescapeHostDelimiters(host2, false);
|
|
23266
23297
|
}
|
|
23267
23298
|
}
|
|
23268
|
-
uriTokens.push(
|
|
23299
|
+
uriTokens.push(host2);
|
|
23269
23300
|
}
|
|
23270
23301
|
if (typeof component.port === "number" || typeof component.port === "string") {
|
|
23271
23302
|
const port = String(component.port);
|
|
@@ -23290,6 +23321,7 @@ var require_utils = __commonJS({
|
|
|
23290
23321
|
encodeFragment,
|
|
23291
23322
|
escapePreservingEscapes,
|
|
23292
23323
|
removeDotSegments,
|
|
23324
|
+
removeDotSegmentsRelative,
|
|
23293
23325
|
isIPv4,
|
|
23294
23326
|
isUUID,
|
|
23295
23327
|
normalizeIPv6,
|
|
@@ -23298,9 +23330,9 @@ var require_utils = __commonJS({
|
|
|
23298
23330
|
}
|
|
23299
23331
|
});
|
|
23300
23332
|
|
|
23301
|
-
// node_modules/.pnpm/fast-uri@3.1.
|
|
23333
|
+
// node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/schemes.js
|
|
23302
23334
|
var require_schemes = __commonJS({
|
|
23303
|
-
"node_modules/.pnpm/fast-uri@3.1.
|
|
23335
|
+
"node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/schemes.js"(exports, module) {
|
|
23304
23336
|
"use strict";
|
|
23305
23337
|
var { isUUID } = require_utils();
|
|
23306
23338
|
var URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;
|
|
@@ -23509,20 +23541,22 @@ var require_schemes = __commonJS({
|
|
|
23509
23541
|
}
|
|
23510
23542
|
});
|
|
23511
23543
|
|
|
23512
|
-
// node_modules/.pnpm/fast-uri@3.1.
|
|
23544
|
+
// node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/index.js
|
|
23513
23545
|
var require_fast_uri = __commonJS({
|
|
23514
|
-
"node_modules/.pnpm/fast-uri@3.1.
|
|
23546
|
+
"node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/index.js"(exports, module) {
|
|
23515
23547
|
"use strict";
|
|
23516
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
23548
|
+
var { normalizeIPv6, removeDotSegments, removeDotSegmentsRelative, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
23517
23549
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
23518
23550
|
var VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
|
|
23519
23551
|
var MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
|
|
23520
|
-
|
|
23521
|
-
|
|
23522
|
-
|
|
23552
|
+
var MALFORMED_HOST_ERROR = "URI host is malformed.";
|
|
23553
|
+
var FORBIDDEN_DOMAIN_HOST_CHARACTER = /[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;
|
|
23554
|
+
function validateScheme(scheme) {
|
|
23555
|
+
const stringScheme = String(scheme);
|
|
23556
|
+
if (!VALID_SCHEME.test(stringScheme)) {
|
|
23523
23557
|
throw new TypeError(MALFORMED_SCHEME_ERROR);
|
|
23524
23558
|
}
|
|
23525
|
-
return
|
|
23559
|
+
return stringScheme;
|
|
23526
23560
|
}
|
|
23527
23561
|
function normalize(uri, options) {
|
|
23528
23562
|
if (typeof uri === "string") {
|
|
@@ -23559,6 +23593,9 @@ var require_fast_uri = __commonJS({
|
|
|
23559
23593
|
const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved.scheme);
|
|
23560
23594
|
const resolvedHost = resolved.host;
|
|
23561
23595
|
const resolvedHostIsIP = resolvedHost !== void 0 && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
|
|
23596
|
+
if (hasForbiddenDomainHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP)) {
|
|
23597
|
+
throw new Error(MALFORMED_HOST_ERROR);
|
|
23598
|
+
}
|
|
23562
23599
|
canonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
|
|
23563
23600
|
const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !new RegExp("\\P{ASCII}", "u").test(resolvedHost);
|
|
23564
23601
|
if (resolved.error && !encodedASCIIHost) {
|
|
@@ -23600,14 +23637,15 @@ var require_fast_uri = __commonJS({
|
|
|
23600
23637
|
if (relative2.path[0] === "/") {
|
|
23601
23638
|
target.path = removeDotSegments(relative2.path);
|
|
23602
23639
|
} else {
|
|
23603
|
-
|
|
23640
|
+
const baseHasAuthority = base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0;
|
|
23641
|
+
if (baseHasAuthority && !base.path) {
|
|
23604
23642
|
target.path = "/" + relative2.path;
|
|
23605
23643
|
} else if (!base.path) {
|
|
23606
23644
|
target.path = relative2.path;
|
|
23607
23645
|
} else {
|
|
23608
23646
|
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative2.path;
|
|
23609
23647
|
}
|
|
23610
|
-
target.path = removeDotSegments(target.path);
|
|
23648
|
+
target.path = base.scheme === void 0 && !baseHasAuthority && target.path[0] !== "/" ? removeDotSegmentsRelative(target.path) : removeDotSegments(target.path);
|
|
23611
23649
|
}
|
|
23612
23650
|
target.query = relative2.query;
|
|
23613
23651
|
}
|
|
@@ -23645,12 +23683,13 @@ var require_fast_uri = __commonJS({
|
|
|
23645
23683
|
const options = Object.assign({}, opts);
|
|
23646
23684
|
const uriTokens = [];
|
|
23647
23685
|
if (component.scheme) {
|
|
23648
|
-
component.scheme =
|
|
23686
|
+
component.scheme = validateScheme(component.scheme);
|
|
23649
23687
|
}
|
|
23650
23688
|
const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
|
|
23651
23689
|
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
|
|
23652
23690
|
const hasAuthority = component.userinfo !== void 0 || component.host !== void 0 || component.port !== void 0;
|
|
23653
|
-
const
|
|
23691
|
+
const schemelessReference = (component.scheme === void 0 || options.reference === "suffix") && !hasAuthority;
|
|
23692
|
+
const pathNoScheme = !options.skipEscape && schemelessReference;
|
|
23654
23693
|
if (component.path !== void 0) {
|
|
23655
23694
|
if (!options.skipEscape) {
|
|
23656
23695
|
component.path = serializePathEncoding(component.path, pathNoScheme);
|
|
@@ -23659,7 +23698,7 @@ var require_fast_uri = __commonJS({
|
|
|
23659
23698
|
}
|
|
23660
23699
|
}
|
|
23661
23700
|
if (options.reference !== "suffix" && component.scheme) {
|
|
23662
|
-
component.scheme =
|
|
23701
|
+
component.scheme = validateScheme(component.scheme);
|
|
23663
23702
|
uriTokens.push(component.scheme, ":");
|
|
23664
23703
|
}
|
|
23665
23704
|
const authority = recomposeAuthority(component);
|
|
@@ -23675,9 +23714,9 @@ var require_fast_uri = __commonJS({
|
|
|
23675
23714
|
if (component.path !== void 0) {
|
|
23676
23715
|
let s = component.path;
|
|
23677
23716
|
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
|
23678
|
-
s = removeDotSegments(s);
|
|
23717
|
+
s = schemelessReference && s[0] !== "/" ? removeDotSegmentsRelative(s) : removeDotSegments(s);
|
|
23679
23718
|
}
|
|
23680
|
-
if (
|
|
23719
|
+
if (schemelessReference) {
|
|
23681
23720
|
s = serializePathEncoding(s, true);
|
|
23682
23721
|
}
|
|
23683
23722
|
if (authority === void 0 && s[0] === "/" && s[1] === "/") {
|
|
@@ -23716,24 +23755,42 @@ var require_fast_uri = __commonJS({
|
|
|
23716
23755
|
}
|
|
23717
23756
|
return false;
|
|
23718
23757
|
}
|
|
23719
|
-
function isIPLiteral(
|
|
23720
|
-
return
|
|
23758
|
+
function isIPLiteral(host2) {
|
|
23759
|
+
return host2[0] === "[" && host2[host2.length - 1] === "]";
|
|
23721
23760
|
}
|
|
23722
23761
|
function hasMalformedComponentPercentEncoding(matches) {
|
|
23723
|
-
const
|
|
23724
|
-
return hasMalformedPercentEncoding(matches[3]) ||
|
|
23762
|
+
const host2 = matches[4];
|
|
23763
|
+
return hasMalformedPercentEncoding(matches[3]) || host2 !== void 0 && !isIPLiteral(host2) && hasMalformedPercentEncoding(host2) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
|
|
23725
23764
|
}
|
|
23726
23765
|
function canonicalizeHost(parsed, options, schemeHandler, isIP) {
|
|
23766
|
+
if (hasForbiddenDomainHost(parsed, options, schemeHandler, isIP)) {
|
|
23767
|
+
parsed.error = parsed.error || MALFORMED_HOST_ERROR;
|
|
23768
|
+
return true;
|
|
23769
|
+
}
|
|
23727
23770
|
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
23771
|
+
let url;
|
|
23728
23772
|
try {
|
|
23729
|
-
|
|
23773
|
+
url = new URL("http://" + parsed.host);
|
|
23730
23774
|
} catch (e) {
|
|
23731
23775
|
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
23732
23776
|
return true;
|
|
23733
23777
|
}
|
|
23778
|
+
if (!isHostOnlyURL(url)) {
|
|
23779
|
+
parsed.error = parsed.error || MALFORMED_HOST_ERROR;
|
|
23780
|
+
return true;
|
|
23781
|
+
}
|
|
23782
|
+
parsed.host = url.hostname;
|
|
23734
23783
|
}
|
|
23735
23784
|
return false;
|
|
23736
23785
|
}
|
|
23786
|
+
function hasForbiddenDomainHost(parsed, options, schemeHandler, isIP) {
|
|
23787
|
+
return Boolean(
|
|
23788
|
+
parsed.host && isIP === false && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && FORBIDDEN_DOMAIN_HOST_CHARACTER.test(parsed.host)
|
|
23789
|
+
);
|
|
23790
|
+
}
|
|
23791
|
+
function isHostOnlyURL(url) {
|
|
23792
|
+
return url.username === "" && url.password === "" && url.port === "" && url.pathname === "/" && url.search === "" && url.hash === "" && url.hostname !== "";
|
|
23793
|
+
}
|
|
23737
23794
|
function parseWithStatus(uri, opts) {
|
|
23738
23795
|
const options = Object.assign({}, opts);
|
|
23739
23796
|
const parsed = {
|
|
@@ -23788,9 +23845,8 @@ var require_fast_uri = __commonJS({
|
|
|
23788
23845
|
parsed.query = matches[7];
|
|
23789
23846
|
parsed.fragment = matches[8];
|
|
23790
23847
|
if (parsed.scheme !== void 0) {
|
|
23791
|
-
|
|
23792
|
-
|
|
23793
|
-
parsed.scheme = decodedScheme.toLowerCase();
|
|
23848
|
+
if (VALID_SCHEME.test(parsed.scheme)) {
|
|
23849
|
+
parsed.scheme = parsed.scheme.toLowerCase();
|
|
23794
23850
|
} else {
|
|
23795
23851
|
parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
|
|
23796
23852
|
malformedScheme = true;
|
|
@@ -23818,7 +23874,7 @@ var require_fast_uri = __commonJS({
|
|
|
23818
23874
|
malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
|
|
23819
23875
|
parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
|
|
23820
23876
|
if (malformedIPLiteral) {
|
|
23821
|
-
parsed.error = parsed.error ||
|
|
23877
|
+
parsed.error = parsed.error || MALFORMED_HOST_ERROR;
|
|
23822
23878
|
malformedAuthorityOrPort = true;
|
|
23823
23879
|
}
|
|
23824
23880
|
} else {
|
|
@@ -23842,11 +23898,11 @@ var require_fast_uri = __commonJS({
|
|
|
23842
23898
|
malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP);
|
|
23843
23899
|
}
|
|
23844
23900
|
if (uri.indexOf("%") !== -1 && parsed.host !== void 0 && !malformedIPLiteral) {
|
|
23845
|
-
let
|
|
23901
|
+
let host2 = isIP ? parsed.host : normalizePercentEncoding(parsed.host, true);
|
|
23846
23902
|
if (!isIP) {
|
|
23847
|
-
|
|
23903
|
+
host2 = normalizePercentEncoding(host2.toLowerCase());
|
|
23848
23904
|
}
|
|
23849
|
-
parsed.host = reescapeHostDelimiters(
|
|
23905
|
+
parsed.host = isIP || options.scheme !== "null" ? reescapeHostDelimiters(host2, isIP) : host2;
|
|
23850
23906
|
}
|
|
23851
23907
|
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
|
|
23852
23908
|
if (parsed.path) {
|
|
@@ -24156,15 +24212,15 @@ var require_core = __commonJS({
|
|
|
24156
24212
|
this.addSchema(sch, void 0, _meta, _validateSchema);
|
|
24157
24213
|
return this;
|
|
24158
24214
|
}
|
|
24159
|
-
let
|
|
24215
|
+
let id4;
|
|
24160
24216
|
if (typeof schema === "object") {
|
|
24161
24217
|
const { schemaId } = this.opts;
|
|
24162
|
-
|
|
24163
|
-
if (
|
|
24218
|
+
id4 = schema[schemaId];
|
|
24219
|
+
if (id4 !== void 0 && typeof id4 != "string") {
|
|
24164
24220
|
throw new Error(`schema ${schemaId} must be string`);
|
|
24165
24221
|
}
|
|
24166
24222
|
}
|
|
24167
|
-
key = (0, resolve_1.normalizeId)(key ||
|
|
24223
|
+
key = (0, resolve_1.normalizeId)(key || id4);
|
|
24168
24224
|
this._checkUnique(key);
|
|
24169
24225
|
this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true);
|
|
24170
24226
|
return this;
|
|
@@ -24243,11 +24299,11 @@ var require_core = __commonJS({
|
|
|
24243
24299
|
case "object": {
|
|
24244
24300
|
const cacheKey = schemaKeyRef;
|
|
24245
24301
|
this._cache.delete(cacheKey);
|
|
24246
|
-
let
|
|
24247
|
-
if (
|
|
24248
|
-
|
|
24249
|
-
delete this.schemas[
|
|
24250
|
-
delete this.refs[
|
|
24302
|
+
let id4 = schemaKeyRef[this.opts.schemaId];
|
|
24303
|
+
if (id4) {
|
|
24304
|
+
id4 = (0, resolve_1.normalizeId)(id4);
|
|
24305
|
+
delete this.schemas[id4];
|
|
24306
|
+
delete this.refs[id4];
|
|
24251
24307
|
}
|
|
24252
24308
|
return this;
|
|
24253
24309
|
}
|
|
@@ -24354,10 +24410,10 @@ var require_core = __commonJS({
|
|
|
24354
24410
|
}
|
|
24355
24411
|
}
|
|
24356
24412
|
_addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {
|
|
24357
|
-
let
|
|
24413
|
+
let id4;
|
|
24358
24414
|
const { schemaId } = this.opts;
|
|
24359
24415
|
if (typeof schema == "object") {
|
|
24360
|
-
|
|
24416
|
+
id4 = schema[schemaId];
|
|
24361
24417
|
} else {
|
|
24362
24418
|
if (this.opts.jtd)
|
|
24363
24419
|
throw new Error("schema must be object");
|
|
@@ -24367,7 +24423,7 @@ var require_core = __commonJS({
|
|
|
24367
24423
|
let sch = this._cache.get(schema);
|
|
24368
24424
|
if (sch !== void 0)
|
|
24369
24425
|
return sch;
|
|
24370
|
-
baseId = (0, resolve_1.normalizeId)(
|
|
24426
|
+
baseId = (0, resolve_1.normalizeId)(id4 || baseId);
|
|
24371
24427
|
const localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId);
|
|
24372
24428
|
sch = new compile_1.SchemaEnv({ schema, schemaId, meta, baseId, localRefs });
|
|
24373
24429
|
this._cache.set(sch.schema, sch);
|
|
@@ -24380,9 +24436,9 @@ var require_core = __commonJS({
|
|
|
24380
24436
|
this.validateSchema(schema, true);
|
|
24381
24437
|
return sch;
|
|
24382
24438
|
}
|
|
24383
|
-
_checkUnique(
|
|
24384
|
-
if (this.schemas[
|
|
24385
|
-
throw new Error(`schema with key or id "${
|
|
24439
|
+
_checkUnique(id4) {
|
|
24440
|
+
if (this.schemas[id4] || this.refs[id4]) {
|
|
24441
|
+
throw new Error(`schema with key or id "${id4}" already exists`);
|
|
24386
24442
|
}
|
|
24387
24443
|
}
|
|
24388
24444
|
_compileSchemaEnv(sch) {
|
|
@@ -24747,8 +24803,8 @@ var require_multipleOf = __commonJS({
|
|
|
24747
24803
|
const { gen, data, schemaCode, it } = cxt;
|
|
24748
24804
|
const prec = it.opts.multipleOfPrecision;
|
|
24749
24805
|
const res = gen.let("res");
|
|
24750
|
-
const
|
|
24751
|
-
cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${
|
|
24806
|
+
const invalid7 = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`;
|
|
24807
|
+
cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid7}))`);
|
|
24752
24808
|
}
|
|
24753
24809
|
};
|
|
24754
24810
|
exports.default = def;
|
|
@@ -34467,7 +34523,7 @@ var FRAMEWORK_VERSION_POLICY = Object.freeze({
|
|
|
34467
34523
|
floors: Object.freeze(["14.4.0"]),
|
|
34468
34524
|
denied: Object.freeze([])
|
|
34469
34525
|
}),
|
|
34470
|
-
next: Object.freeze({ floors: Object.freeze(["
|
|
34526
|
+
next: Object.freeze({ floors: Object.freeze(["16.4.1"]), denied: Object.freeze([]) }),
|
|
34471
34527
|
vite: Object.freeze({ floors: Object.freeze(["5.4.6"]), denied: Object.freeze([]) }),
|
|
34472
34528
|
"@tanstack/react-start": Object.freeze({
|
|
34473
34529
|
floors: Object.freeze(["1.168.60"]),
|
|
@@ -36678,13 +36734,13 @@ var PROBLEM_POLICY = {
|
|
|
36678
36734
|
mail_domain_conflict: {
|
|
36679
36735
|
status: 409,
|
|
36680
36736
|
retryable: false,
|
|
36681
|
-
action: "
|
|
36737
|
+
action: "Read the workspace sender resource and project binding. Reuse requires explicit domain-use authority, target-project editing and a current verified application identity with the same registrable main domain. Read the current revision before changing settings. Detach a shared project binding explicitly; legacy domain deletion cannot retire a resource used by another project.",
|
|
36682
36738
|
title: "Mail domain conflict"
|
|
36683
36739
|
},
|
|
36684
36740
|
mail_domain_required: {
|
|
36685
36741
|
status: 409,
|
|
36686
36742
|
retryable: false,
|
|
36687
|
-
action: "This app declares mail.enabled. Configure
|
|
36743
|
+
action: "This app declares mail.enabled. Configure a sender with 'ohmyhost mail setup' or explicitly attach an authorized workspace sender using the project's Prod environment ID. Reuse first requires proof of the intended application hostname with the same registrable main domain; declare and verify that identity before mail-gated deployment. Then plan again.",
|
|
36688
36744
|
title: "Mail domain required"
|
|
36689
36745
|
},
|
|
36690
36746
|
storage_jurisdiction_conflict: {
|
|
@@ -37285,10 +37341,10 @@ var parseProjectStatus = (value) => {
|
|
|
37285
37341
|
const ids = /* @__PURE__ */ new Set(), names = /* @__PURE__ */ new Set();
|
|
37286
37342
|
for (const raw of environments) {
|
|
37287
37343
|
const environment = exactRecord2(raw, ["id", "name"]);
|
|
37288
|
-
const
|
|
37289
|
-
if (!isUlid(
|
|
37344
|
+
const id4 = environment["id"], name = environment["name"];
|
|
37345
|
+
if (!isUlid(id4) || name !== "dev" && name !== "prod" || ids.has(id4) || names.has(name))
|
|
37290
37346
|
throw new ResponseContractError();
|
|
37291
|
-
ids.add(
|
|
37347
|
+
ids.add(id4);
|
|
37292
37348
|
names.add(name);
|
|
37293
37349
|
}
|
|
37294
37350
|
}
|
|
@@ -37586,16 +37642,16 @@ var parseOperation = (value) => {
|
|
|
37586
37642
|
"reconciliation",
|
|
37587
37643
|
"progress"
|
|
37588
37644
|
]);
|
|
37589
|
-
const
|
|
37645
|
+
const id4 = input["id"];
|
|
37590
37646
|
const state = input["state"];
|
|
37591
37647
|
const createdAt = input["created_at"];
|
|
37592
37648
|
const updatedAt = input["updated_at"];
|
|
37593
37649
|
const result = input["result"];
|
|
37594
37650
|
const blockingOperationId = input["blocking_operation_id"];
|
|
37595
37651
|
const deploymentId = input["deployment_id"];
|
|
37596
|
-
if (blockingOperationId !== void 0 && (state !== "queued" || !isUlid(blockingOperationId) || blockingOperationId ===
|
|
37652
|
+
if (blockingOperationId !== void 0 && (state !== "queued" || !isUlid(blockingOperationId) || blockingOperationId === id4) || deploymentId !== void 0 && !isUlid(deploymentId))
|
|
37597
37653
|
throw new ResponseContractError();
|
|
37598
|
-
if (!isUlid(
|
|
37654
|
+
if (!isUlid(id4) || !isOperationState(state) || !isIsoInstant(createdAt) || !isIsoInstant(updatedAt) || result !== void 0 && !isRecord2(result)) {
|
|
37599
37655
|
throw new ResponseContractError();
|
|
37600
37656
|
}
|
|
37601
37657
|
let progress;
|
|
@@ -37635,7 +37691,7 @@ var parseOperation = (value) => {
|
|
|
37635
37691
|
throw new ResponseContractError();
|
|
37636
37692
|
}
|
|
37637
37693
|
return {
|
|
37638
|
-
id:
|
|
37694
|
+
id: id4,
|
|
37639
37695
|
state,
|
|
37640
37696
|
created_at: createdAt,
|
|
37641
37697
|
updated_at: updatedAt,
|
|
@@ -38621,9 +38677,9 @@ var selectProfileForOrganization = (profiles, request) => {
|
|
|
38621
38677
|
if (inOrganization.length > 1)
|
|
38622
38678
|
return { outcome: "ambiguous", candidates: inOrganization };
|
|
38623
38679
|
const unscoped = candidates.filter((profile) => profile.organizationId === null);
|
|
38624
|
-
const [
|
|
38625
|
-
if (
|
|
38626
|
-
return { outcome: "selected", profile:
|
|
38680
|
+
const [member2] = inOrganization;
|
|
38681
|
+
if (member2 !== void 0)
|
|
38682
|
+
return { outcome: "selected", profile: member2 };
|
|
38627
38683
|
const [open5] = unscoped;
|
|
38628
38684
|
if (unscoped.length === 1 && open5 !== void 0)
|
|
38629
38685
|
return { outcome: "selected", profile: open5 };
|
|
@@ -39073,6 +39129,11 @@ var recognizedCommandLabel = (argv) => {
|
|
|
39073
39129
|
if (value === "function" && values[0] === "runs")
|
|
39074
39130
|
return "function runs";
|
|
39075
39131
|
if (value === "mail") {
|
|
39132
|
+
if (["workspace", "binding", "identity"].includes(values[0] ?? "")) {
|
|
39133
|
+
const candidate = `mail ${values[0]} ${values[1]}`;
|
|
39134
|
+
if (SHARED_MAIL_LABELS.includes(candidate))
|
|
39135
|
+
return candidate;
|
|
39136
|
+
}
|
|
39076
39137
|
if (values[0] === "setup")
|
|
39077
39138
|
return "mail setup";
|
|
39078
39139
|
if (values[0] === "status")
|
|
@@ -40277,6 +40338,11 @@ var parseProductCliCommand = (argv) => {
|
|
|
40277
40338
|
}
|
|
40278
40339
|
throw new InvalidCommandError();
|
|
40279
40340
|
}
|
|
40341
|
+
if (first === "mail" && ["workspace", "binding", "identity"].includes(values[0] ?? "")) {
|
|
40342
|
+
if (wait || follow || stdin)
|
|
40343
|
+
throw new InvalidCommandError();
|
|
40344
|
+
return parseSharedMailCommand(values, yes);
|
|
40345
|
+
}
|
|
40280
40346
|
if (first === "mail") {
|
|
40281
40347
|
const area = values.shift();
|
|
40282
40348
|
const sub = area === "webhook" || area === "messages" || area === "domain" ? values.shift() : void 0;
|
|
@@ -40440,6 +40506,193 @@ var validGithubBranchName = (value) => !(value.length < 1 || value.length > 1024
|
|
|
40440
40506
|
return code <= 32 || code === 127 || "\\~^:?*[]".includes(character);
|
|
40441
40507
|
}) || value.split("/").some((component) => component.startsWith(".") || component.endsWith(".lock")));
|
|
40442
40508
|
var validPaidHostname = (value) => /^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/u.test(value) && !value.endsWith(".poc.aixyte.com") && value !== "omh.st" && !value.endsWith(".omh.st") && value !== "ohmyho.st" && !value.endsWith(".ohmyho.st");
|
|
40509
|
+
var SHARED_MAIL_LABELS = [
|
|
40510
|
+
"mail workspace list",
|
|
40511
|
+
"mail workspace create",
|
|
40512
|
+
"mail workspace status",
|
|
40513
|
+
"mail workspace retire",
|
|
40514
|
+
"mail workspace dns-authorize",
|
|
40515
|
+
"mail workspace dns-status",
|
|
40516
|
+
"mail workspace dns-revoke",
|
|
40517
|
+
"mail binding get",
|
|
40518
|
+
"mail binding set",
|
|
40519
|
+
"mail binding detach",
|
|
40520
|
+
"mail identity get",
|
|
40521
|
+
"mail identity declare",
|
|
40522
|
+
"mail identity verify",
|
|
40523
|
+
"mail identity revoke",
|
|
40524
|
+
"mail identity authorize",
|
|
40525
|
+
"mail identity authorization-status",
|
|
40526
|
+
"mail identity authorization-revoke"
|
|
40527
|
+
];
|
|
40528
|
+
function parseSharedMailCommand(values, yes) {
|
|
40529
|
+
const area = values.shift(), operation = values.shift();
|
|
40530
|
+
const label = `mail ${area} ${operation}`;
|
|
40531
|
+
if (!SHARED_MAIL_LABELS.includes(label))
|
|
40532
|
+
throw new InvalidCommandError();
|
|
40533
|
+
const destructive = operation === "retire" || operation === "detach" || operation === "revoke" || operation === "dns-revoke" || operation === "authorization-revoke";
|
|
40534
|
+
if (yes !== destructive)
|
|
40535
|
+
throw new InvalidCommandError();
|
|
40536
|
+
const allowed = area === "workspace" ? ["--organization"] : ["--project"];
|
|
40537
|
+
const writing = [
|
|
40538
|
+
"create",
|
|
40539
|
+
"retire",
|
|
40540
|
+
"dns-authorize",
|
|
40541
|
+
"dns-revoke",
|
|
40542
|
+
"set",
|
|
40543
|
+
"detach",
|
|
40544
|
+
"declare",
|
|
40545
|
+
"verify",
|
|
40546
|
+
"revoke",
|
|
40547
|
+
"authorize",
|
|
40548
|
+
"authorization-revoke"
|
|
40549
|
+
].includes(operation ?? "");
|
|
40550
|
+
if (area === "workspace" && operation !== "list" && operation !== "create")
|
|
40551
|
+
allowed.push("--mail-domain");
|
|
40552
|
+
if (area === "binding")
|
|
40553
|
+
allowed.push("--environment");
|
|
40554
|
+
if (operation === "create")
|
|
40555
|
+
allowed.push("--domain", "--sending");
|
|
40556
|
+
if (area === "binding" && operation === "set")
|
|
40557
|
+
allowed.push("--mail-domain", "--sending", "--sender-addresses", "--default-from", "--reply-to");
|
|
40558
|
+
if (operation === "declare")
|
|
40559
|
+
allowed.push("--hostname");
|
|
40560
|
+
if (operation === "authorize" || operation === "dns-authorize")
|
|
40561
|
+
allowed.push("--zone");
|
|
40562
|
+
if (writing)
|
|
40563
|
+
allowed.push("--idempotency-key");
|
|
40564
|
+
if (writing && operation !== "create" && operation !== "declare")
|
|
40565
|
+
allowed.push("--expected-revision");
|
|
40566
|
+
const options = parseOptionalOptions(values, allowed);
|
|
40567
|
+
const required = (key) => {
|
|
40568
|
+
const value = options[key];
|
|
40569
|
+
if (!value)
|
|
40570
|
+
throw new InvalidCommandError();
|
|
40571
|
+
return value;
|
|
40572
|
+
};
|
|
40573
|
+
const revision = () => {
|
|
40574
|
+
const value = required("--expected-revision");
|
|
40575
|
+
if (!/^(?:0|[1-9][0-9]*)$/u.test(value) || !Number.isSafeInteger(Number(value)))
|
|
40576
|
+
throw new InvalidCommandError();
|
|
40577
|
+
return Number(value);
|
|
40578
|
+
};
|
|
40579
|
+
const sending = () => {
|
|
40580
|
+
const value = required("--sending");
|
|
40581
|
+
if (value !== "true" && value !== "false")
|
|
40582
|
+
throw new InvalidCommandError();
|
|
40583
|
+
return value === "true";
|
|
40584
|
+
};
|
|
40585
|
+
const idempotencyKey = () => required("--idempotency-key");
|
|
40586
|
+
let request;
|
|
40587
|
+
if (area === "workspace") {
|
|
40588
|
+
const scope = { organizationId: required("--organization") };
|
|
40589
|
+
if (operation === "list")
|
|
40590
|
+
request = { ...scope, action: "domains_list" };
|
|
40591
|
+
else if (operation === "create") {
|
|
40592
|
+
const enabled = sending();
|
|
40593
|
+
if (!enabled)
|
|
40594
|
+
throw new InvalidCommandError();
|
|
40595
|
+
request = {
|
|
40596
|
+
...scope,
|
|
40597
|
+
action: "domain_create",
|
|
40598
|
+
domain: required("--domain"),
|
|
40599
|
+
sending: enabled,
|
|
40600
|
+
idempotencyKey: idempotencyKey()
|
|
40601
|
+
};
|
|
40602
|
+
} else {
|
|
40603
|
+
const target = { ...scope, mailDomainId: required("--mail-domain") };
|
|
40604
|
+
if (operation === "status")
|
|
40605
|
+
request = { ...target, action: "domain_get" };
|
|
40606
|
+
else if (operation === "dns-status")
|
|
40607
|
+
request = { ...target, action: "domain_dns_status" };
|
|
40608
|
+
else if (operation === "dns-revoke")
|
|
40609
|
+
request = {
|
|
40610
|
+
...target,
|
|
40611
|
+
action: "domain_dns_revoke",
|
|
40612
|
+
expectedRevision: revision(),
|
|
40613
|
+
idempotencyKey: idempotencyKey()
|
|
40614
|
+
};
|
|
40615
|
+
else if (operation === "retire")
|
|
40616
|
+
request = {
|
|
40617
|
+
...target,
|
|
40618
|
+
action: "domain_retire",
|
|
40619
|
+
expectedRevision: revision(),
|
|
40620
|
+
idempotencyKey: idempotencyKey()
|
|
40621
|
+
};
|
|
40622
|
+
else
|
|
40623
|
+
request = {
|
|
40624
|
+
...target,
|
|
40625
|
+
action: "domain_dns_authorize",
|
|
40626
|
+
expectedRevision: revision(),
|
|
40627
|
+
zone: required("--zone"),
|
|
40628
|
+
idempotencyKey: idempotencyKey()
|
|
40629
|
+
};
|
|
40630
|
+
}
|
|
40631
|
+
} else if (area === "binding") {
|
|
40632
|
+
const scope = { projectId: required("--project"), environmentId: required("--environment") };
|
|
40633
|
+
if (operation === "get")
|
|
40634
|
+
request = { ...scope, action: "binding_get" };
|
|
40635
|
+
else if (operation === "detach")
|
|
40636
|
+
request = {
|
|
40637
|
+
...scope,
|
|
40638
|
+
action: "binding_detach",
|
|
40639
|
+
expectedRevision: revision(),
|
|
40640
|
+
idempotencyKey: idempotencyKey()
|
|
40641
|
+
};
|
|
40642
|
+
else {
|
|
40643
|
+
const senderAddresses = required("--sender-addresses").split(",");
|
|
40644
|
+
if (senderAddresses.length > 32 || senderAddresses.some((address) => !address || address.trim() !== address) || new Set(senderAddresses).size !== senderAddresses.length)
|
|
40645
|
+
throw new InvalidCommandError();
|
|
40646
|
+
request = {
|
|
40647
|
+
...scope,
|
|
40648
|
+
action: "binding_set",
|
|
40649
|
+
mailDomainId: required("--mail-domain"),
|
|
40650
|
+
sending: sending(),
|
|
40651
|
+
senderAddresses,
|
|
40652
|
+
defaultFrom: required("--default-from"),
|
|
40653
|
+
defaultReplyTo: options["--reply-to"] ?? null,
|
|
40654
|
+
expectedRevision: revision(),
|
|
40655
|
+
idempotencyKey: idempotencyKey()
|
|
40656
|
+
};
|
|
40657
|
+
}
|
|
40658
|
+
} else {
|
|
40659
|
+
const scope = { projectId: required("--project") };
|
|
40660
|
+
if (operation === "get")
|
|
40661
|
+
request = { ...scope, action: "identity_get" };
|
|
40662
|
+
else if (operation === "authorization-status")
|
|
40663
|
+
request = { ...scope, action: "identity_authorization_status" };
|
|
40664
|
+
else if (operation === "authorization-revoke")
|
|
40665
|
+
request = {
|
|
40666
|
+
...scope,
|
|
40667
|
+
action: "identity_authorization_revoke",
|
|
40668
|
+
expectedRevision: revision(),
|
|
40669
|
+
idempotencyKey: idempotencyKey()
|
|
40670
|
+
};
|
|
40671
|
+
else if (operation === "declare")
|
|
40672
|
+
request = {
|
|
40673
|
+
...scope,
|
|
40674
|
+
action: "identity_declare",
|
|
40675
|
+
hostname: required("--hostname"),
|
|
40676
|
+
idempotencyKey: idempotencyKey()
|
|
40677
|
+
};
|
|
40678
|
+
else if (operation === "authorize")
|
|
40679
|
+
request = {
|
|
40680
|
+
...scope,
|
|
40681
|
+
action: "identity_authorize",
|
|
40682
|
+
zone: required("--zone"),
|
|
40683
|
+
expectedRevision: revision(),
|
|
40684
|
+
idempotencyKey: idempotencyKey()
|
|
40685
|
+
};
|
|
40686
|
+
else
|
|
40687
|
+
request = {
|
|
40688
|
+
...scope,
|
|
40689
|
+
action: operation === "verify" ? "identity_verify" : "identity_revoke",
|
|
40690
|
+
expectedRevision: revision(),
|
|
40691
|
+
idempotencyKey: idempotencyKey()
|
|
40692
|
+
};
|
|
40693
|
+
}
|
|
40694
|
+
return { kind: "shared-mail", request, label, credentialStore: "native" };
|
|
40695
|
+
}
|
|
40443
40696
|
|
|
40444
40697
|
// apps/product-cli/dist/workspace.js
|
|
40445
40698
|
var InteractiveSessionRequiredError = class extends Error {
|
|
@@ -40670,7 +40923,7 @@ function exact3(v, keys) {
|
|
|
40670
40923
|
// apps/product-cli/package.json
|
|
40671
40924
|
var package_default = {
|
|
40672
40925
|
name: "@ohmyhost/product-cli",
|
|
40673
|
-
version: "0.1.
|
|
40926
|
+
version: "0.1.38",
|
|
40674
40927
|
private: true,
|
|
40675
40928
|
ohmyhost: {
|
|
40676
40929
|
deployment: "production",
|
|
@@ -40702,7 +40955,7 @@ var package_default = {
|
|
|
40702
40955
|
},
|
|
40703
40956
|
scripts: {
|
|
40704
40957
|
build: "tsc --project tsconfig.build.json",
|
|
40705
|
-
typecheck: "tsc --project tsconfig.json --noEmit",
|
|
40958
|
+
typecheck: "tsc --project tsconfig.json --noEmit --incremental --tsBuildInfoFile typecheck.tsbuildinfo",
|
|
40706
40959
|
test: "vitest run --root ../.. apps/product-cli/test"
|
|
40707
40960
|
},
|
|
40708
40961
|
dependencies: {
|
|
@@ -40800,12 +41053,12 @@ function assertBillingTaxIssue(value) {
|
|
|
40800
41053
|
}
|
|
40801
41054
|
var ulid4 = /^[0-7][0-9A-HJKMNP-TV-Z]{25}$/u;
|
|
40802
41055
|
var timestamp5 = (v) => typeof v === "string" && Number.isFinite(Date.parse(v)) && new Date(v).toISOString() === v;
|
|
40803
|
-
function stripeUrl(value,
|
|
41056
|
+
function stripeUrl(value, host2) {
|
|
40804
41057
|
if (typeof value !== "string" || value.length > 8192)
|
|
40805
41058
|
return false;
|
|
40806
41059
|
try {
|
|
40807
41060
|
const u = new URL(value);
|
|
40808
|
-
return u.protocol === "https:" && u.hostname ===
|
|
41061
|
+
return u.protocol === "https:" && u.hostname === host2 && !u.username && !u.password && !u.port;
|
|
40809
41062
|
} catch {
|
|
40810
41063
|
return false;
|
|
40811
41064
|
}
|
|
@@ -41050,6 +41303,23 @@ var HELP_USAGE = Object.freeze({
|
|
|
41050
41303
|
"function runs": "ohmyhost function runs --project ULID --environment ENVIRONMENT_ULID [--limit 1-100] --json",
|
|
41051
41304
|
"secret set": `printf '%s' "$SECRET_VALUE" | ohmyhost secret set NAME --project ULID --environment ENVIRONMENT_ULID --idempotency-key KEY [--profile-user USER_ID --profile-organization ULID | --token-user USER_ID --token-organization ULID] --stdin [--wait] --json (with --profile-user and --profile-organization the saved login that runs it must belong to that user and organization; with --token-user and --token-organization it runs only with an OHMYHOST_TOKEN of that user and organization, never with a saved login)`,
|
|
41052
41305
|
"secret delete": "ohmyhost secret delete NAME --project ULID --environment ENVIRONMENT_ULID --idempotency-key KEY [--wait] --json",
|
|
41306
|
+
"mail workspace list": "ohmyhost mail workspace list --organization ULID --json",
|
|
41307
|
+
"mail workspace create": "ohmyhost mail workspace create --organization ULID --domain DOMAIN --sending true --idempotency-key KEY --json",
|
|
41308
|
+
"mail workspace status": "ohmyhost mail workspace status --organization ULID --mail-domain ULID --json",
|
|
41309
|
+
"mail workspace retire": "ohmyhost mail workspace retire --organization ULID --mail-domain ULID --expected-revision N --idempotency-key KEY --yes --json",
|
|
41310
|
+
"mail workspace dns-authorize": "ohmyhost mail workspace dns-authorize --organization ULID --mail-domain ULID --expected-revision N --zone DOMAIN --idempotency-key KEY --json",
|
|
41311
|
+
"mail workspace dns-revoke": "ohmyhost mail workspace dns-revoke --organization ULID --mail-domain ULID --expected-revision N --idempotency-key KEY --yes --json",
|
|
41312
|
+
"mail workspace dns-status": "ohmyhost mail workspace dns-status --organization ULID --mail-domain ULID --json",
|
|
41313
|
+
"mail binding get": "ohmyhost mail binding get --project ULID --environment PROD_ULID --json",
|
|
41314
|
+
"mail binding set": "ohmyhost mail binding set --project ULID --environment PROD_ULID --mail-domain ULID --sending true --sender-addresses contact@mail.example.com,contracts@mail.example.com --default-from contracts@mail.example.com [--reply-to owner@example.com] --expected-revision N --idempotency-key KEY --json",
|
|
41315
|
+
"mail binding detach": "ohmyhost mail binding detach --project ULID --environment PROD_ULID --expected-revision N --idempotency-key KEY --yes --json",
|
|
41316
|
+
"mail identity get": "ohmyhost mail identity get --project ULID --json",
|
|
41317
|
+
"mail identity declare": "ohmyhost mail identity declare --project ULID --hostname sign.example.com --idempotency-key KEY --json",
|
|
41318
|
+
"mail identity verify": "ohmyhost mail identity verify --project ULID --expected-revision N --idempotency-key KEY --json",
|
|
41319
|
+
"mail identity revoke": "ohmyhost mail identity revoke --project ULID --expected-revision N --idempotency-key KEY --yes --json",
|
|
41320
|
+
"mail identity authorize": "ohmyhost mail identity authorize --project ULID --expected-revision N --zone example.com --idempotency-key KEY --json",
|
|
41321
|
+
"mail identity authorization-revoke": "ohmyhost mail identity authorization-revoke --project ULID --expected-revision N --idempotency-key KEY --yes --json",
|
|
41322
|
+
"mail identity authorization-status": "ohmyhost mail identity authorization-status --project ULID --json",
|
|
41053
41323
|
"mail setup": "ohmyhost mail setup --project ULID --environment ULID --domain DOMAIN --sending true --receiving false --idempotency-key KEY --json",
|
|
41054
41324
|
"mail status": "ohmyhost mail status --project ULID --environment ULID --json",
|
|
41055
41325
|
"mail webhook set": "ohmyhost mail webhook set --project ULID --environment ULID --url HTTPS_URL --idempotency-key KEY --json",
|
|
@@ -41502,6 +41772,12 @@ var ProductCli = class {
|
|
|
41502
41772
|
return await this.listFunctionRuns(command, signal);
|
|
41503
41773
|
if (command.kind === "secret-set")
|
|
41504
41774
|
return await this.putEnvironmentSecret(command, signal);
|
|
41775
|
+
if (command.kind === "shared-mail") {
|
|
41776
|
+
const api = await this.authenticatedApi(command.credentialStore, signal);
|
|
41777
|
+
if (!api.sharedMail)
|
|
41778
|
+
throw new Error("Shared mail unavailable");
|
|
41779
|
+
return success(command.label, { mail: await api.sharedMail(command.request) });
|
|
41780
|
+
}
|
|
41505
41781
|
if (command.kind === "managed-mail") {
|
|
41506
41782
|
const api = await this.authenticatedApi(command.credentialStore, signal);
|
|
41507
41783
|
if (!api.managedMail)
|
|
@@ -42068,7 +42344,7 @@ var ProductCli = class {
|
|
|
42068
42344
|
if (command.kind === "source-complete") {
|
|
42069
42345
|
const completed = await completeLocalSourcePublication({
|
|
42070
42346
|
api: source,
|
|
42071
|
-
getOperation: (
|
|
42347
|
+
getOperation: (id4) => api.getOperation(id4),
|
|
42072
42348
|
directory: resolve4(this.dependencies.sourceDirectory ?? process.cwd(), command.directory),
|
|
42073
42349
|
metadataDirectory: this.dependencies.sourceMetadataDirectory,
|
|
42074
42350
|
apiOrigin: this.dependencies.productApiOrigin,
|
|
@@ -42153,7 +42429,7 @@ var ProductCli = class {
|
|
|
42153
42429
|
if (operation.state === "succeeded" && command.kind === "source-publish") {
|
|
42154
42430
|
const completed = await completeLocalSourcePublication({
|
|
42155
42431
|
api: source,
|
|
42156
|
-
getOperation: (
|
|
42432
|
+
getOperation: (id4) => api.getOperation(id4),
|
|
42157
42433
|
directory: resolve4(this.dependencies.sourceDirectory ?? process.cwd(), command.directory),
|
|
42158
42434
|
metadataDirectory: this.dependencies.sourceMetadataDirectory,
|
|
42159
42435
|
apiOrigin: this.dependencies.productApiOrigin,
|
|
@@ -42614,18 +42890,18 @@ var reusedKeyProblem = (error) => {
|
|
|
42614
42890
|
};
|
|
42615
42891
|
var OPERATION_STREAM_CONNECTIONS = 4;
|
|
42616
42892
|
var readStatementFile = async (path2) => {
|
|
42617
|
-
const
|
|
42893
|
+
const invalid7 = () => new ProductCliFailure(2, "statement_file_invalid", false, STATEMENT_FILE_INVALID_ACTION);
|
|
42618
42894
|
let file;
|
|
42619
42895
|
try {
|
|
42620
42896
|
file = await open3(path2, "r");
|
|
42621
42897
|
} catch {
|
|
42622
|
-
throw
|
|
42898
|
+
throw invalid7();
|
|
42623
42899
|
}
|
|
42624
42900
|
const buffer = Buffer.alloc(65537);
|
|
42625
42901
|
try {
|
|
42626
42902
|
const stat3 = await file.stat();
|
|
42627
42903
|
if (!stat3.isFile() || stat3.size > 65536)
|
|
42628
|
-
throw
|
|
42904
|
+
throw invalid7();
|
|
42629
42905
|
let length = 0;
|
|
42630
42906
|
while (length < buffer.length) {
|
|
42631
42907
|
const read = await file.read(buffer, length, buffer.length - length, null);
|
|
@@ -42634,12 +42910,12 @@ var readStatementFile = async (path2) => {
|
|
|
42634
42910
|
length += read.bytesRead;
|
|
42635
42911
|
}
|
|
42636
42912
|
if (length > 65536)
|
|
42637
|
-
throw
|
|
42913
|
+
throw invalid7();
|
|
42638
42914
|
return new TextDecoder("utf-8", { fatal: true }).decode(buffer.subarray(0, length));
|
|
42639
42915
|
} catch (error) {
|
|
42640
42916
|
if (error instanceof ProductCliFailure)
|
|
42641
42917
|
throw error;
|
|
42642
|
-
throw
|
|
42918
|
+
throw invalid7();
|
|
42643
42919
|
} finally {
|
|
42644
42920
|
buffer.fill(0);
|
|
42645
42921
|
await file.close();
|
|
@@ -42820,7 +43096,7 @@ var parsedCommandName = (command) => {
|
|
|
42820
43096
|
return "secret set";
|
|
42821
43097
|
if (command.kind === "secret-delete")
|
|
42822
43098
|
return "secret delete";
|
|
42823
|
-
if (command.kind === "managed-mail")
|
|
43099
|
+
if (command.kind === "shared-mail" || command.kind === "managed-mail")
|
|
42824
43100
|
return command.label;
|
|
42825
43101
|
if (command.kind === "profile-list")
|
|
42826
43102
|
return "profile list";
|
|
@@ -43508,27 +43784,27 @@ var Interceptors = class {
|
|
|
43508
43784
|
clear() {
|
|
43509
43785
|
this.fns = [];
|
|
43510
43786
|
}
|
|
43511
|
-
eject(
|
|
43512
|
-
const index = this.getInterceptorIndex(
|
|
43787
|
+
eject(id4) {
|
|
43788
|
+
const index = this.getInterceptorIndex(id4);
|
|
43513
43789
|
if (this.fns[index]) {
|
|
43514
43790
|
this.fns[index] = null;
|
|
43515
43791
|
}
|
|
43516
43792
|
}
|
|
43517
|
-
exists(
|
|
43518
|
-
const index = this.getInterceptorIndex(
|
|
43793
|
+
exists(id4) {
|
|
43794
|
+
const index = this.getInterceptorIndex(id4);
|
|
43519
43795
|
return Boolean(this.fns[index]);
|
|
43520
43796
|
}
|
|
43521
|
-
getInterceptorIndex(
|
|
43522
|
-
if (typeof
|
|
43523
|
-
return this.fns[
|
|
43797
|
+
getInterceptorIndex(id4) {
|
|
43798
|
+
if (typeof id4 === "number") {
|
|
43799
|
+
return this.fns[id4] ? id4 : -1;
|
|
43524
43800
|
}
|
|
43525
|
-
return this.fns.indexOf(
|
|
43801
|
+
return this.fns.indexOf(id4);
|
|
43526
43802
|
}
|
|
43527
|
-
update(
|
|
43528
|
-
const index = this.getInterceptorIndex(
|
|
43803
|
+
update(id4, fn) {
|
|
43804
|
+
const index = this.getInterceptorIndex(id4);
|
|
43529
43805
|
if (this.fns[index]) {
|
|
43530
43806
|
this.fns[index] = fn;
|
|
43531
|
-
return
|
|
43807
|
+
return id4;
|
|
43532
43808
|
}
|
|
43533
43809
|
return false;
|
|
43534
43810
|
}
|
|
@@ -43763,6 +44039,380 @@ var createClient = (config = {}) => {
|
|
|
43763
44039
|
var client = createClient(createConfig({ throwOnError: true }));
|
|
43764
44040
|
|
|
43765
44041
|
// packages/sdk-ts/dist/generated/sdk.gen.js
|
|
44042
|
+
var listWorkspaceMailDomains = (parameters, options) => {
|
|
44043
|
+
const params = buildClientParams([parameters], [
|
|
44044
|
+
{
|
|
44045
|
+
args: [
|
|
44046
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
44047
|
+
{ in: "path", key: "organization_id" }
|
|
44048
|
+
]
|
|
44049
|
+
}
|
|
44050
|
+
]);
|
|
44051
|
+
return (options?.client ?? client).get({
|
|
44052
|
+
responseStyle: "data",
|
|
44053
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
44054
|
+
url: "/v1/organizations/{organization_id}/mail-domains",
|
|
44055
|
+
...options,
|
|
44056
|
+
...params
|
|
44057
|
+
});
|
|
44058
|
+
};
|
|
44059
|
+
var createWorkspaceMailDomain = (parameters, options) => {
|
|
44060
|
+
const params = buildClientParams([parameters], [
|
|
44061
|
+
{
|
|
44062
|
+
args: [
|
|
44063
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
44064
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
44065
|
+
{ in: "path", key: "organization_id" },
|
|
44066
|
+
{ key: "createWorkspaceMailDomainRequest", map: "body" }
|
|
44067
|
+
]
|
|
44068
|
+
}
|
|
44069
|
+
]);
|
|
44070
|
+
return (options?.client ?? client).post({
|
|
44071
|
+
responseStyle: "data",
|
|
44072
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
44073
|
+
url: "/v1/organizations/{organization_id}/mail-domains",
|
|
44074
|
+
...options,
|
|
44075
|
+
...params,
|
|
44076
|
+
headers: {
|
|
44077
|
+
"Content-Type": "application/json",
|
|
44078
|
+
...options?.headers,
|
|
44079
|
+
...params.headers
|
|
44080
|
+
}
|
|
44081
|
+
});
|
|
44082
|
+
};
|
|
44083
|
+
var retireWorkspaceMailDomain = (parameters, options) => {
|
|
44084
|
+
const params = buildClientParams([parameters], [
|
|
44085
|
+
{
|
|
44086
|
+
args: [
|
|
44087
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
44088
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
44089
|
+
{ in: "path", key: "organization_id" },
|
|
44090
|
+
{ in: "path", key: "mail_domain_id" },
|
|
44091
|
+
{ key: "mailRevisionRequest", map: "body" }
|
|
44092
|
+
]
|
|
44093
|
+
}
|
|
44094
|
+
]);
|
|
44095
|
+
return (options?.client ?? client).delete({
|
|
44096
|
+
responseStyle: "data",
|
|
44097
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
44098
|
+
url: "/v1/organizations/{organization_id}/mail-domains/{mail_domain_id}",
|
|
44099
|
+
...options,
|
|
44100
|
+
...params,
|
|
44101
|
+
headers: {
|
|
44102
|
+
"Content-Type": "application/json",
|
|
44103
|
+
...options?.headers,
|
|
44104
|
+
...params.headers
|
|
44105
|
+
}
|
|
44106
|
+
});
|
|
44107
|
+
};
|
|
44108
|
+
var getWorkspaceMailDomain = (parameters, options) => {
|
|
44109
|
+
const params = buildClientParams([parameters], [
|
|
44110
|
+
{
|
|
44111
|
+
args: [
|
|
44112
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
44113
|
+
{ in: "path", key: "organization_id" },
|
|
44114
|
+
{ in: "path", key: "mail_domain_id" }
|
|
44115
|
+
]
|
|
44116
|
+
}
|
|
44117
|
+
]);
|
|
44118
|
+
return (options?.client ?? client).get({
|
|
44119
|
+
responseStyle: "data",
|
|
44120
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
44121
|
+
url: "/v1/organizations/{organization_id}/mail-domains/{mail_domain_id}",
|
|
44122
|
+
...options,
|
|
44123
|
+
...params
|
|
44124
|
+
});
|
|
44125
|
+
};
|
|
44126
|
+
var revokeWorkspaceMailDomainDnsAuthorization = (parameters, options) => {
|
|
44127
|
+
const params = buildClientParams([parameters], [
|
|
44128
|
+
{
|
|
44129
|
+
args: [
|
|
44130
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
44131
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
44132
|
+
{ in: "path", key: "organization_id" },
|
|
44133
|
+
{ in: "path", key: "mail_domain_id" },
|
|
44134
|
+
{ key: "mailRevisionRequest", map: "body" }
|
|
44135
|
+
]
|
|
44136
|
+
}
|
|
44137
|
+
]);
|
|
44138
|
+
return (options?.client ?? client).delete({
|
|
44139
|
+
responseStyle: "data",
|
|
44140
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
44141
|
+
url: "/v1/organizations/{organization_id}/mail-domains/{mail_domain_id}/dns-authorization",
|
|
44142
|
+
...options,
|
|
44143
|
+
...params,
|
|
44144
|
+
headers: {
|
|
44145
|
+
"Content-Type": "application/json",
|
|
44146
|
+
...options?.headers,
|
|
44147
|
+
...params.headers
|
|
44148
|
+
}
|
|
44149
|
+
});
|
|
44150
|
+
};
|
|
44151
|
+
var getWorkspaceMailDomainDnsAuthorization = (parameters, options) => {
|
|
44152
|
+
const params = buildClientParams([parameters], [
|
|
44153
|
+
{
|
|
44154
|
+
args: [
|
|
44155
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
44156
|
+
{ in: "path", key: "organization_id" },
|
|
44157
|
+
{ in: "path", key: "mail_domain_id" }
|
|
44158
|
+
]
|
|
44159
|
+
}
|
|
44160
|
+
]);
|
|
44161
|
+
return (options?.client ?? client).get({
|
|
44162
|
+
responseStyle: "data",
|
|
44163
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
44164
|
+
url: "/v1/organizations/{organization_id}/mail-domains/{mail_domain_id}/dns-authorization",
|
|
44165
|
+
...options,
|
|
44166
|
+
...params
|
|
44167
|
+
});
|
|
44168
|
+
};
|
|
44169
|
+
var authorizeWorkspaceMailDomainDns = (parameters, options) => {
|
|
44170
|
+
const params = buildClientParams([parameters], [
|
|
44171
|
+
{
|
|
44172
|
+
args: [
|
|
44173
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
44174
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
44175
|
+
{ in: "path", key: "organization_id" },
|
|
44176
|
+
{ in: "path", key: "mail_domain_id" },
|
|
44177
|
+
{ key: "sharedMailDnsAuthorizationRequest", map: "body" }
|
|
44178
|
+
]
|
|
44179
|
+
}
|
|
44180
|
+
]);
|
|
44181
|
+
return (options?.client ?? client).post({
|
|
44182
|
+
responseStyle: "data",
|
|
44183
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
44184
|
+
url: "/v1/organizations/{organization_id}/mail-domains/{mail_domain_id}/dns-authorization",
|
|
44185
|
+
...options,
|
|
44186
|
+
...params,
|
|
44187
|
+
headers: {
|
|
44188
|
+
"Content-Type": "application/json",
|
|
44189
|
+
...options?.headers,
|
|
44190
|
+
...params.headers
|
|
44191
|
+
}
|
|
44192
|
+
});
|
|
44193
|
+
};
|
|
44194
|
+
var detachProjectMailDomainBinding = (parameters, options) => {
|
|
44195
|
+
const params = buildClientParams([parameters], [
|
|
44196
|
+
{
|
|
44197
|
+
args: [
|
|
44198
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
44199
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
44200
|
+
{ in: "path", key: "project_id" },
|
|
44201
|
+
{ in: "path", key: "environment_id" },
|
|
44202
|
+
{ key: "mailRevisionRequest", map: "body" }
|
|
44203
|
+
]
|
|
44204
|
+
}
|
|
44205
|
+
]);
|
|
44206
|
+
return (options?.client ?? client).delete({
|
|
44207
|
+
responseStyle: "data",
|
|
44208
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
44209
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/mail-domain-binding",
|
|
44210
|
+
...options,
|
|
44211
|
+
...params,
|
|
44212
|
+
headers: {
|
|
44213
|
+
"Content-Type": "application/json",
|
|
44214
|
+
...options?.headers,
|
|
44215
|
+
...params.headers
|
|
44216
|
+
}
|
|
44217
|
+
});
|
|
44218
|
+
};
|
|
44219
|
+
var getProjectMailDomainBinding = (parameters, options) => {
|
|
44220
|
+
const params = buildClientParams([parameters], [
|
|
44221
|
+
{
|
|
44222
|
+
args: [
|
|
44223
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
44224
|
+
{ in: "path", key: "project_id" },
|
|
44225
|
+
{ in: "path", key: "environment_id" }
|
|
44226
|
+
]
|
|
44227
|
+
}
|
|
44228
|
+
]);
|
|
44229
|
+
return (options?.client ?? client).get({
|
|
44230
|
+
responseStyle: "data",
|
|
44231
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
44232
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/mail-domain-binding",
|
|
44233
|
+
...options,
|
|
44234
|
+
...params
|
|
44235
|
+
});
|
|
44236
|
+
};
|
|
44237
|
+
var putProjectMailDomainBinding = (parameters, options) => {
|
|
44238
|
+
const params = buildClientParams([parameters], [
|
|
44239
|
+
{
|
|
44240
|
+
args: [
|
|
44241
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
44242
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
44243
|
+
{ in: "path", key: "project_id" },
|
|
44244
|
+
{ in: "path", key: "environment_id" },
|
|
44245
|
+
{ key: "projectMailDomainBindingRequest", map: "body" }
|
|
44246
|
+
]
|
|
44247
|
+
}
|
|
44248
|
+
]);
|
|
44249
|
+
return (options?.client ?? client).put({
|
|
44250
|
+
responseStyle: "data",
|
|
44251
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
44252
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/mail-domain-binding",
|
|
44253
|
+
...options,
|
|
44254
|
+
...params,
|
|
44255
|
+
headers: {
|
|
44256
|
+
"Content-Type": "application/json",
|
|
44257
|
+
...options?.headers,
|
|
44258
|
+
...params.headers
|
|
44259
|
+
}
|
|
44260
|
+
});
|
|
44261
|
+
};
|
|
44262
|
+
var revokeApplicationDomainIdentity = (parameters, options) => {
|
|
44263
|
+
const params = buildClientParams([parameters], [
|
|
44264
|
+
{
|
|
44265
|
+
args: [
|
|
44266
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
44267
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
44268
|
+
{ in: "path", key: "project_id" },
|
|
44269
|
+
{ key: "mailRevisionRequest", map: "body" }
|
|
44270
|
+
]
|
|
44271
|
+
}
|
|
44272
|
+
]);
|
|
44273
|
+
return (options?.client ?? client).delete({
|
|
44274
|
+
responseStyle: "data",
|
|
44275
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
44276
|
+
url: "/v1/projects/{project_id}/application-domain-identity",
|
|
44277
|
+
...options,
|
|
44278
|
+
...params,
|
|
44279
|
+
headers: {
|
|
44280
|
+
"Content-Type": "application/json",
|
|
44281
|
+
...options?.headers,
|
|
44282
|
+
...params.headers
|
|
44283
|
+
}
|
|
44284
|
+
});
|
|
44285
|
+
};
|
|
44286
|
+
var getApplicationDomainIdentity = (parameters, options) => {
|
|
44287
|
+
const params = buildClientParams([parameters], [
|
|
44288
|
+
{
|
|
44289
|
+
args: [
|
|
44290
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
44291
|
+
{ in: "path", key: "project_id" }
|
|
44292
|
+
]
|
|
44293
|
+
}
|
|
44294
|
+
]);
|
|
44295
|
+
return (options?.client ?? client).get({
|
|
44296
|
+
responseStyle: "data",
|
|
44297
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
44298
|
+
url: "/v1/projects/{project_id}/application-domain-identity",
|
|
44299
|
+
...options,
|
|
44300
|
+
...params
|
|
44301
|
+
});
|
|
44302
|
+
};
|
|
44303
|
+
var declareApplicationDomainIdentity = (parameters, options) => {
|
|
44304
|
+
const params = buildClientParams([parameters], [
|
|
44305
|
+
{
|
|
44306
|
+
args: [
|
|
44307
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
44308
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
44309
|
+
{ in: "path", key: "project_id" },
|
|
44310
|
+
{ key: "applicationDomainIdentityRequest", map: "body" }
|
|
44311
|
+
]
|
|
44312
|
+
}
|
|
44313
|
+
]);
|
|
44314
|
+
return (options?.client ?? client).put({
|
|
44315
|
+
responseStyle: "data",
|
|
44316
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
44317
|
+
url: "/v1/projects/{project_id}/application-domain-identity",
|
|
44318
|
+
...options,
|
|
44319
|
+
...params,
|
|
44320
|
+
headers: {
|
|
44321
|
+
"Content-Type": "application/json",
|
|
44322
|
+
...options?.headers,
|
|
44323
|
+
...params.headers
|
|
44324
|
+
}
|
|
44325
|
+
});
|
|
44326
|
+
};
|
|
44327
|
+
var verifyApplicationDomainIdentity = (parameters, options) => {
|
|
44328
|
+
const params = buildClientParams([parameters], [
|
|
44329
|
+
{
|
|
44330
|
+
args: [
|
|
44331
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
44332
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
44333
|
+
{ in: "path", key: "project_id" },
|
|
44334
|
+
{ key: "mailRevisionRequest", map: "body" }
|
|
44335
|
+
]
|
|
44336
|
+
}
|
|
44337
|
+
]);
|
|
44338
|
+
return (options?.client ?? client).post({
|
|
44339
|
+
responseStyle: "data",
|
|
44340
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
44341
|
+
url: "/v1/projects/{project_id}/application-domain-identity/verify",
|
|
44342
|
+
...options,
|
|
44343
|
+
...params,
|
|
44344
|
+
headers: {
|
|
44345
|
+
"Content-Type": "application/json",
|
|
44346
|
+
...options?.headers,
|
|
44347
|
+
...params.headers
|
|
44348
|
+
}
|
|
44349
|
+
});
|
|
44350
|
+
};
|
|
44351
|
+
var revokeApplicationDomainIdentityDnsAuthorization = (parameters, options) => {
|
|
44352
|
+
const params = buildClientParams([parameters], [
|
|
44353
|
+
{
|
|
44354
|
+
args: [
|
|
44355
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
44356
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
44357
|
+
{ in: "path", key: "project_id" },
|
|
44358
|
+
{ key: "mailRevisionRequest", map: "body" }
|
|
44359
|
+
]
|
|
44360
|
+
}
|
|
44361
|
+
]);
|
|
44362
|
+
return (options?.client ?? client).delete({
|
|
44363
|
+
responseStyle: "data",
|
|
44364
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
44365
|
+
url: "/v1/projects/{project_id}/application-domain-identity/dns-authorization",
|
|
44366
|
+
...options,
|
|
44367
|
+
...params,
|
|
44368
|
+
headers: {
|
|
44369
|
+
"Content-Type": "application/json",
|
|
44370
|
+
...options?.headers,
|
|
44371
|
+
...params.headers
|
|
44372
|
+
}
|
|
44373
|
+
});
|
|
44374
|
+
};
|
|
44375
|
+
var getApplicationDomainIdentityDnsAuthorization = (parameters, options) => {
|
|
44376
|
+
const params = buildClientParams([parameters], [
|
|
44377
|
+
{
|
|
44378
|
+
args: [
|
|
44379
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
44380
|
+
{ in: "path", key: "project_id" }
|
|
44381
|
+
]
|
|
44382
|
+
}
|
|
44383
|
+
]);
|
|
44384
|
+
return (options?.client ?? client).get({
|
|
44385
|
+
responseStyle: "data",
|
|
44386
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
44387
|
+
url: "/v1/projects/{project_id}/application-domain-identity/dns-authorization",
|
|
44388
|
+
...options,
|
|
44389
|
+
...params
|
|
44390
|
+
});
|
|
44391
|
+
};
|
|
44392
|
+
var authorizeApplicationDomainIdentityDns = (parameters, options) => {
|
|
44393
|
+
const params = buildClientParams([parameters], [
|
|
44394
|
+
{
|
|
44395
|
+
args: [
|
|
44396
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
44397
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
44398
|
+
{ in: "path", key: "project_id" },
|
|
44399
|
+
{ key: "sharedMailDnsAuthorizationRequest", map: "body" }
|
|
44400
|
+
]
|
|
44401
|
+
}
|
|
44402
|
+
]);
|
|
44403
|
+
return (options?.client ?? client).post({
|
|
44404
|
+
responseStyle: "data",
|
|
44405
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
44406
|
+
url: "/v1/projects/{project_id}/application-domain-identity/dns-authorization",
|
|
44407
|
+
...options,
|
|
44408
|
+
...params,
|
|
44409
|
+
headers: {
|
|
44410
|
+
"Content-Type": "application/json",
|
|
44411
|
+
...options?.headers,
|
|
44412
|
+
...params.headers
|
|
44413
|
+
}
|
|
44414
|
+
});
|
|
44415
|
+
};
|
|
43766
44416
|
var getAccountProfile = (options) => (options?.client ?? client).get({
|
|
43767
44417
|
responseStyle: "data",
|
|
43768
44418
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -45917,6 +46567,320 @@ async function executeManagedMail(client2, input) {
|
|
|
45917
46567
|
return result;
|
|
45918
46568
|
}
|
|
45919
46569
|
|
|
46570
|
+
// packages/sdk-ts/dist/generated/shared-mail-response.js
|
|
46571
|
+
var ULID4 = /^[0-7][0-9A-HJKMNP-TV-Z]{25}$/u;
|
|
46572
|
+
var HOST = /^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/u;
|
|
46573
|
+
function assertSharedMailResponse(value, input) {
|
|
46574
|
+
const v = object3(value);
|
|
46575
|
+
if (input.action === "domains_list") {
|
|
46576
|
+
exact5(v, ["items"]);
|
|
46577
|
+
if (!Array.isArray(v["items"]) || v["items"].length > 100)
|
|
46578
|
+
invalid6();
|
|
46579
|
+
for (const item of v["items"])
|
|
46580
|
+
assertSharedMailResponse(item, {
|
|
46581
|
+
...input,
|
|
46582
|
+
action: "domain_get",
|
|
46583
|
+
mailDomainId: String(object3(item)["domain_id"])
|
|
46584
|
+
});
|
|
46585
|
+
return;
|
|
46586
|
+
}
|
|
46587
|
+
if (["domain_get", "domain_create", "domain_retire"].includes(input.action)) {
|
|
46588
|
+
exact5(v, [
|
|
46589
|
+
"domain_id",
|
|
46590
|
+
"organization_id",
|
|
46591
|
+
"domain",
|
|
46592
|
+
"registrable_domain",
|
|
46593
|
+
"revision",
|
|
46594
|
+
"status",
|
|
46595
|
+
"sending",
|
|
46596
|
+
"receiving",
|
|
46597
|
+
"configured_at",
|
|
46598
|
+
"observed_at",
|
|
46599
|
+
"dns_records",
|
|
46600
|
+
"bindings_count"
|
|
46601
|
+
]);
|
|
46602
|
+
id3(v["domain_id"]);
|
|
46603
|
+
id3(v["organization_id"]);
|
|
46604
|
+
if (!("organizationId" in input) || v["organization_id"] !== input.organizationId || "mailDomainId" in input && v["domain_id"] !== input.mailDomainId)
|
|
46605
|
+
invalid6();
|
|
46606
|
+
host(v["domain"]);
|
|
46607
|
+
host(v["registrable_domain"]);
|
|
46608
|
+
positive(v["revision"]);
|
|
46609
|
+
member(v["status"], ["active", "retiring", "retired"]);
|
|
46610
|
+
for (const k of ["sending", "receiving"])
|
|
46611
|
+
member(v[k], ["disabled", "pending", "ready", "failed"]);
|
|
46612
|
+
time2(v["configured_at"]);
|
|
46613
|
+
if (v["observed_at"] !== null)
|
|
46614
|
+
time2(v["observed_at"]);
|
|
46615
|
+
if (!Number.isSafeInteger(v["bindings_count"]) || Number(v["bindings_count"]) < 0)
|
|
46616
|
+
invalid6();
|
|
46617
|
+
if (!Array.isArray(v["dns_records"]))
|
|
46618
|
+
invalid6();
|
|
46619
|
+
for (const entry of v["dns_records"]) {
|
|
46620
|
+
const r = object3(entry);
|
|
46621
|
+
exact5(r, ["type", "name", "value", "purpose", "status"], ["priority"]);
|
|
46622
|
+
member(r["type"], ["TXT", "MX", "CNAME"]);
|
|
46623
|
+
for (const k of ["name", "value", "purpose", "status"])
|
|
46624
|
+
if (typeof r[k] !== "string" || /[\r\n\0]/u.test(r[k]))
|
|
46625
|
+
invalid6();
|
|
46626
|
+
if (r["priority"] !== void 0 && (!Number.isSafeInteger(r["priority"]) || Number(r["priority"]) < 0 || Number(r["priority"]) > 65535))
|
|
46627
|
+
invalid6();
|
|
46628
|
+
if (r["type"] === "MX" && r["priority"] === void 0)
|
|
46629
|
+
invalid6();
|
|
46630
|
+
}
|
|
46631
|
+
return;
|
|
46632
|
+
}
|
|
46633
|
+
if (["binding_get", "binding_set", "binding_detach"].includes(input.action)) {
|
|
46634
|
+
exact5(v, [
|
|
46635
|
+
"mail_domain_id",
|
|
46636
|
+
"organization_id",
|
|
46637
|
+
"project_id",
|
|
46638
|
+
"environment_id",
|
|
46639
|
+
"revision",
|
|
46640
|
+
"sending",
|
|
46641
|
+
"sender_addresses",
|
|
46642
|
+
"default_from",
|
|
46643
|
+
"default_reply_to",
|
|
46644
|
+
"legacy",
|
|
46645
|
+
"status",
|
|
46646
|
+
"application_domain_identity"
|
|
46647
|
+
]);
|
|
46648
|
+
for (const k of ["mail_domain_id", "organization_id", "project_id", "environment_id"])
|
|
46649
|
+
id3(v[k]);
|
|
46650
|
+
if (!("projectId" in input) || !("environmentId" in input) || v["project_id"] !== input.projectId || v["environment_id"] !== input.environmentId || "mailDomainId" in input && v["mail_domain_id"] !== input.mailDomainId)
|
|
46651
|
+
invalid6();
|
|
46652
|
+
positive(v["revision"]);
|
|
46653
|
+
for (const k of ["sending", "legacy"])
|
|
46654
|
+
if (typeof v[k] !== "boolean")
|
|
46655
|
+
invalid6();
|
|
46656
|
+
member(v["status"], ["active", "detached", "suspended"]);
|
|
46657
|
+
if (!Array.isArray(v["sender_addresses"]) || v["sender_addresses"].length > 32 || new Set(v["sender_addresses"]).size !== v["sender_addresses"].length)
|
|
46658
|
+
invalid6();
|
|
46659
|
+
for (const a of v["sender_addresses"])
|
|
46660
|
+
mailbox(a);
|
|
46661
|
+
for (const k of ["default_from", "default_reply_to"])
|
|
46662
|
+
if (v[k] !== null)
|
|
46663
|
+
mailbox(v[k]);
|
|
46664
|
+
if (!v["legacy"] && (!v["sender_addresses"].includes(v["default_from"]) || v["sender_addresses"].length === 0))
|
|
46665
|
+
invalid6();
|
|
46666
|
+
if (v["application_domain_identity"] !== null) {
|
|
46667
|
+
const identity = object3(v["application_domain_identity"]);
|
|
46668
|
+
exact5(identity, ["hostname", "registrable_domain", "revision", "status"]);
|
|
46669
|
+
host(identity["hostname"]);
|
|
46670
|
+
host(identity["registrable_domain"]);
|
|
46671
|
+
positive(identity["revision"]);
|
|
46672
|
+
member(identity["status"], ["pending", "verified", "expired", "revoked"]);
|
|
46673
|
+
}
|
|
46674
|
+
return;
|
|
46675
|
+
}
|
|
46676
|
+
if (["identity_get", "identity_declare", "identity_verify", "identity_revoke"].includes(input.action)) {
|
|
46677
|
+
exact5(v, [
|
|
46678
|
+
"organization_id",
|
|
46679
|
+
"project_id",
|
|
46680
|
+
"hostname",
|
|
46681
|
+
"registrable_domain",
|
|
46682
|
+
"status",
|
|
46683
|
+
"revision",
|
|
46684
|
+
"challenge",
|
|
46685
|
+
"verified_at",
|
|
46686
|
+
"expires_at"
|
|
46687
|
+
]);
|
|
46688
|
+
id3(v["organization_id"]);
|
|
46689
|
+
id3(v["project_id"]);
|
|
46690
|
+
if (!("projectId" in input) || v["project_id"] !== input.projectId)
|
|
46691
|
+
invalid6();
|
|
46692
|
+
host(v["hostname"]);
|
|
46693
|
+
host(v["registrable_domain"]);
|
|
46694
|
+
positive(v["revision"]);
|
|
46695
|
+
member(v["status"], ["pending", "verified", "expired", "revoked"]);
|
|
46696
|
+
const challenge = object3(v["challenge"]);
|
|
46697
|
+
exact5(challenge, ["type", "name", "value"]);
|
|
46698
|
+
if (challenge["type"] !== "TXT" || typeof challenge["name"] !== "string" || challenge["name"] !== `_omh-project.${v["hostname"]}` || typeof challenge["value"] !== "string" || challenge["value"].length < 16 || challenge["value"].length > 255 || /[\r\n\0]/u.test(challenge["value"]))
|
|
46699
|
+
invalid6();
|
|
46700
|
+
if (v["verified_at"] !== null)
|
|
46701
|
+
time2(v["verified_at"]);
|
|
46702
|
+
time2(v["expires_at"]);
|
|
46703
|
+
return;
|
|
46704
|
+
}
|
|
46705
|
+
if (input.action === "domain_dns_authorize" || input.action === "identity_authorize") {
|
|
46706
|
+
exact5(v, ["authorization_id", "authorization_url", "expires_at"]);
|
|
46707
|
+
id3(v["authorization_id"]);
|
|
46708
|
+
time2(v["expires_at"]);
|
|
46709
|
+
if (typeof v["authorization_url"] !== "string" || !/^https:\/\/dash\.cloudflare\.com\/oauth2\/auth\?/u.test(v["authorization_url"]))
|
|
46710
|
+
invalid6();
|
|
46711
|
+
return;
|
|
46712
|
+
}
|
|
46713
|
+
exact5(v, ["status", "zone", "scopes", "expires_at"]);
|
|
46714
|
+
member(v["status"], ["not_authorized", "pending", "authorized", "expired", "revoked"]);
|
|
46715
|
+
if (!Array.isArray(v["scopes"]) || v["scopes"].length > 2 || new Set(v["scopes"]).size !== v["scopes"].length || v["scopes"].some((s) => s !== "dns.write" && s !== "zone.read"))
|
|
46716
|
+
invalid6();
|
|
46717
|
+
if (v["zone"] !== null)
|
|
46718
|
+
host(v["zone"]);
|
|
46719
|
+
if (v["expires_at"] !== null)
|
|
46720
|
+
time2(v["expires_at"]);
|
|
46721
|
+
if (v["status"] === "not_authorized" && (v["zone"] !== null || v["expires_at"] !== null || v["scopes"].length))
|
|
46722
|
+
invalid6();
|
|
46723
|
+
}
|
|
46724
|
+
function object3(v) {
|
|
46725
|
+
if (v === null || typeof v !== "object" || Array.isArray(v))
|
|
46726
|
+
invalid6();
|
|
46727
|
+
return v;
|
|
46728
|
+
}
|
|
46729
|
+
function exact5(v, required, optional = []) {
|
|
46730
|
+
if (required.some((k) => !(k in v)) || Object.keys(v).some((k) => !required.includes(k) && !optional.includes(k)))
|
|
46731
|
+
invalid6();
|
|
46732
|
+
}
|
|
46733
|
+
function member(v, values) {
|
|
46734
|
+
if (typeof v !== "string" || !values.includes(v))
|
|
46735
|
+
invalid6();
|
|
46736
|
+
}
|
|
46737
|
+
function id3(v) {
|
|
46738
|
+
if (typeof v !== "string" || !ULID4.test(v))
|
|
46739
|
+
invalid6();
|
|
46740
|
+
}
|
|
46741
|
+
function host(v) {
|
|
46742
|
+
if (typeof v !== "string" || !HOST.test(v))
|
|
46743
|
+
invalid6();
|
|
46744
|
+
}
|
|
46745
|
+
function positive(v) {
|
|
46746
|
+
if (!Number.isSafeInteger(v) || Number(v) < 1)
|
|
46747
|
+
invalid6();
|
|
46748
|
+
}
|
|
46749
|
+
function time2(v) {
|
|
46750
|
+
if (typeof v !== "string" || !Number.isFinite(Date.parse(v)) || new Date(v).toISOString() !== v)
|
|
46751
|
+
invalid6();
|
|
46752
|
+
}
|
|
46753
|
+
function mailbox(v) {
|
|
46754
|
+
if (typeof v !== "string" || v.length > 254 || !/^[A-Za-z0-9.!#$%&'*+\-/=?^_`{|}~]+@[a-z0-9.-]+\.[a-z]{2,63}$/u.test(v) || v.startsWith(".") || v.includes("..") || v.includes(".@"))
|
|
46755
|
+
invalid6();
|
|
46756
|
+
}
|
|
46757
|
+
function invalid6() {
|
|
46758
|
+
throw new TypeError("Shared mail response contract invalid");
|
|
46759
|
+
}
|
|
46760
|
+
|
|
46761
|
+
// packages/sdk-ts/dist/shared-mail.js
|
|
46762
|
+
async function executeSharedMail(client2, input) {
|
|
46763
|
+
const options = { client: client2 };
|
|
46764
|
+
let result;
|
|
46765
|
+
switch (input.action) {
|
|
46766
|
+
case "domains_list":
|
|
46767
|
+
result = await listWorkspaceMailDomains({ organization_id: input.organizationId }, options);
|
|
46768
|
+
break;
|
|
46769
|
+
case "domain_create":
|
|
46770
|
+
result = await createWorkspaceMailDomain({
|
|
46771
|
+
organization_id: input.organizationId,
|
|
46772
|
+
"Idempotency-Key": input.idempotencyKey,
|
|
46773
|
+
createWorkspaceMailDomainRequest: { domain: input.domain, sending: input.sending }
|
|
46774
|
+
}, options);
|
|
46775
|
+
break;
|
|
46776
|
+
case "domain_get":
|
|
46777
|
+
result = await getWorkspaceMailDomain({ organization_id: input.organizationId, mail_domain_id: input.mailDomainId }, options);
|
|
46778
|
+
break;
|
|
46779
|
+
case "domain_retire":
|
|
46780
|
+
result = await retireWorkspaceMailDomain({
|
|
46781
|
+
organization_id: input.organizationId,
|
|
46782
|
+
mail_domain_id: input.mailDomainId,
|
|
46783
|
+
"Idempotency-Key": input.idempotencyKey,
|
|
46784
|
+
mailRevisionRequest: { expected_revision: input.expectedRevision }
|
|
46785
|
+
}, options);
|
|
46786
|
+
break;
|
|
46787
|
+
case "domain_dns_authorize":
|
|
46788
|
+
result = await authorizeWorkspaceMailDomainDns({
|
|
46789
|
+
organization_id: input.organizationId,
|
|
46790
|
+
mail_domain_id: input.mailDomainId,
|
|
46791
|
+
"Idempotency-Key": input.idempotencyKey,
|
|
46792
|
+
sharedMailDnsAuthorizationRequest: {
|
|
46793
|
+
expected_revision: input.expectedRevision,
|
|
46794
|
+
zone: input.zone
|
|
46795
|
+
}
|
|
46796
|
+
}, options);
|
|
46797
|
+
break;
|
|
46798
|
+
case "domain_dns_revoke":
|
|
46799
|
+
result = await revokeWorkspaceMailDomainDnsAuthorization({
|
|
46800
|
+
organization_id: input.organizationId,
|
|
46801
|
+
mail_domain_id: input.mailDomainId,
|
|
46802
|
+
"Idempotency-Key": input.idempotencyKey,
|
|
46803
|
+
mailRevisionRequest: { expected_revision: input.expectedRevision }
|
|
46804
|
+
}, options);
|
|
46805
|
+
break;
|
|
46806
|
+
case "identity_authorization_revoke":
|
|
46807
|
+
result = await revokeApplicationDomainIdentityDnsAuthorization({
|
|
46808
|
+
project_id: input.projectId,
|
|
46809
|
+
"Idempotency-Key": input.idempotencyKey,
|
|
46810
|
+
mailRevisionRequest: { expected_revision: input.expectedRevision }
|
|
46811
|
+
}, options);
|
|
46812
|
+
break;
|
|
46813
|
+
case "domain_dns_status":
|
|
46814
|
+
result = await getWorkspaceMailDomainDnsAuthorization({ organization_id: input.organizationId, mail_domain_id: input.mailDomainId }, options);
|
|
46815
|
+
break;
|
|
46816
|
+
case "binding_get":
|
|
46817
|
+
result = await getProjectMailDomainBinding({ project_id: input.projectId, environment_id: input.environmentId }, options);
|
|
46818
|
+
break;
|
|
46819
|
+
case "binding_set":
|
|
46820
|
+
result = await putProjectMailDomainBinding({
|
|
46821
|
+
project_id: input.projectId,
|
|
46822
|
+
environment_id: input.environmentId,
|
|
46823
|
+
"Idempotency-Key": input.idempotencyKey,
|
|
46824
|
+
projectMailDomainBindingRequest: {
|
|
46825
|
+
mail_domain_id: input.mailDomainId,
|
|
46826
|
+
sending: input.sending,
|
|
46827
|
+
sender_addresses: [...input.senderAddresses],
|
|
46828
|
+
default_from: input.defaultFrom,
|
|
46829
|
+
default_reply_to: input.defaultReplyTo,
|
|
46830
|
+
expected_revision: input.expectedRevision
|
|
46831
|
+
}
|
|
46832
|
+
}, options);
|
|
46833
|
+
break;
|
|
46834
|
+
case "binding_detach":
|
|
46835
|
+
result = await detachProjectMailDomainBinding({
|
|
46836
|
+
project_id: input.projectId,
|
|
46837
|
+
environment_id: input.environmentId,
|
|
46838
|
+
"Idempotency-Key": input.idempotencyKey,
|
|
46839
|
+
mailRevisionRequest: { expected_revision: input.expectedRevision }
|
|
46840
|
+
}, options);
|
|
46841
|
+
break;
|
|
46842
|
+
case "identity_get":
|
|
46843
|
+
result = await getApplicationDomainIdentity({ project_id: input.projectId }, options);
|
|
46844
|
+
break;
|
|
46845
|
+
case "identity_declare":
|
|
46846
|
+
result = await declareApplicationDomainIdentity({
|
|
46847
|
+
project_id: input.projectId,
|
|
46848
|
+
"Idempotency-Key": input.idempotencyKey,
|
|
46849
|
+
applicationDomainIdentityRequest: { hostname: input.hostname }
|
|
46850
|
+
}, options);
|
|
46851
|
+
break;
|
|
46852
|
+
case "identity_verify":
|
|
46853
|
+
result = await verifyApplicationDomainIdentity({
|
|
46854
|
+
project_id: input.projectId,
|
|
46855
|
+
"Idempotency-Key": input.idempotencyKey,
|
|
46856
|
+
mailRevisionRequest: { expected_revision: input.expectedRevision }
|
|
46857
|
+
}, options);
|
|
46858
|
+
break;
|
|
46859
|
+
case "identity_revoke":
|
|
46860
|
+
result = await revokeApplicationDomainIdentity({
|
|
46861
|
+
project_id: input.projectId,
|
|
46862
|
+
"Idempotency-Key": input.idempotencyKey,
|
|
46863
|
+
mailRevisionRequest: { expected_revision: input.expectedRevision }
|
|
46864
|
+
}, options);
|
|
46865
|
+
break;
|
|
46866
|
+
case "identity_authorize":
|
|
46867
|
+
result = await authorizeApplicationDomainIdentityDns({
|
|
46868
|
+
project_id: input.projectId,
|
|
46869
|
+
"Idempotency-Key": input.idempotencyKey,
|
|
46870
|
+
sharedMailDnsAuthorizationRequest: {
|
|
46871
|
+
expected_revision: input.expectedRevision,
|
|
46872
|
+
zone: input.zone
|
|
46873
|
+
}
|
|
46874
|
+
}, options);
|
|
46875
|
+
break;
|
|
46876
|
+
case "identity_authorization_status":
|
|
46877
|
+
result = await getApplicationDomainIdentityDnsAuthorization({ project_id: input.projectId }, options);
|
|
46878
|
+
break;
|
|
46879
|
+
}
|
|
46880
|
+
assertSharedMailResponse(result, input);
|
|
46881
|
+
return result;
|
|
46882
|
+
}
|
|
46883
|
+
|
|
45920
46884
|
// apps/product-cli/dist/source-managed-client.js
|
|
45921
46885
|
var GeneratedSdkManagedSourceApi = class {
|
|
45922
46886
|
client;
|
|
@@ -46456,6 +47420,9 @@ var GeneratedSdkProductApi = class {
|
|
|
46456
47420
|
secret_name: input.name
|
|
46457
47421
|
}, { client: this.#client });
|
|
46458
47422
|
}
|
|
47423
|
+
sharedMail(input) {
|
|
47424
|
+
return executeSharedMail(this.#client, input);
|
|
47425
|
+
}
|
|
46459
47426
|
managedMail(input) {
|
|
46460
47427
|
return executeManagedMail(this.#client, input);
|
|
46461
47428
|
}
|
|
@@ -47155,7 +48122,7 @@ function normalizeEgressOrigins(value) {
|
|
|
47155
48122
|
}
|
|
47156
48123
|
function forbiddenEgressHostname(hostname) {
|
|
47157
48124
|
const normalized = hostname.toLowerCase();
|
|
47158
|
-
return normalized === "localhost" || normalized.endsWith(".localhost") || normalized.endsWith(".local") || normalized.endsWith(".internal") || /^\d{1,3}(?:\.\d{1,3}){3}$/u.test(normalized) || normalized.startsWith("[") || normalized.endsWith("]");
|
|
48125
|
+
return /^ohmyho-(?:mail|storage)-gateway-[a-z0-9][a-z0-9-]*\.[a-z0-9][a-z0-9-]*\.workers\.dev\.?$/u.test(normalized) || normalized === "localhost" || normalized.endsWith(".localhost") || normalized.endsWith(".local") || normalized.endsWith(".internal") || /^\d{1,3}(?:\.\d{1,3}){3}$/u.test(normalized) || normalized.startsWith("[") || normalized.endsWith("]");
|
|
47159
48126
|
}
|
|
47160
48127
|
function parseOhmyhostConfigYaml(source) {
|
|
47161
48128
|
if (typeof source !== "string") {
|
|
@@ -47846,10 +48813,10 @@ function callOptions(tokens, closing, name) {
|
|
|
47846
48813
|
return calls;
|
|
47847
48814
|
}
|
|
47848
48815
|
function nestedPropertyValue(tokens, closing, start, end, outer, inner) {
|
|
47849
|
-
const
|
|
47850
|
-
if (
|
|
48816
|
+
const object4 = directProperty(tokens, closing, start, end, outer);
|
|
48817
|
+
if (object4?.value !== "{")
|
|
47851
48818
|
return null;
|
|
47852
|
-
return directProperty(tokens, closing,
|
|
48819
|
+
return directProperty(tokens, closing, object4.start, object4.end, inner)?.value ?? null;
|
|
47853
48820
|
}
|
|
47854
48821
|
function directProperty(tokens, closing, start, end, name) {
|
|
47855
48822
|
let depth = 0;
|
|
@@ -47899,8 +48866,8 @@ function astroConfigFindings(text, path2, mode) {
|
|
|
47899
48866
|
return [lexed.finding];
|
|
47900
48867
|
const tokens = lexed.tokens;
|
|
47901
48868
|
const hasPropertyKey = (items, name) => items.some((token, index) => token.value === name && items[index + 1]?.value === ":");
|
|
47902
|
-
const
|
|
47903
|
-
return
|
|
48869
|
+
const invalid7 = hasNonRootProperty(tokens, ["base"], ["", "/"]) || ["srcDir", "outDir", "serverEntry", "client", "server", "assetsPrefix"].some((name) => hasPropertyKey(tokens, name)) || (mode === "edge" ? !text.includes("@astrojs/cloudflare") || !hasProperty(tokens, "output", "server") || !hasProperty(tokens, "session", "false") || !hasProperty(tokens, "imageService", "passthrough") || hasPropertyKey(tokens, "cache") : text.includes("@astrojs/cloudflare") || hasPropertyKey(tokens, "adapter") || hasProperty(tokens, "output", "server"));
|
|
48870
|
+
return invalid7 ? [diagnostic({ code: "astro_config_unsupported", path: path2 })] : [];
|
|
47904
48871
|
}
|
|
47905
48872
|
|
|
47906
48873
|
// packages/contracts/dist/database-migration-errors.js
|
|
@@ -48286,6 +49253,8 @@ var UTF8 = new TextDecoder("utf-8", { fatal: true });
|
|
|
48286
49253
|
var MAXIMUM_SOURCE_BYTES = 2 * 1024 * 1024;
|
|
48287
49254
|
var SOURCE_MODULE_PATTERN = /\.(?:[cm]?[jt]s|[jt]sx)$/u;
|
|
48288
49255
|
var STORAGE_CLIENT_CALL_PATTERN = /\bcreatePrivateStorageClient\s*\(/u;
|
|
49256
|
+
var GATEWAY_BINDING_NAME = /^OHMYHOST_(?:MAIL|STORAGE)_GATEWAY$/u;
|
|
49257
|
+
var GATEWAY_WORD_TOKEN = /[\p{ID_Start}_$][\p{ID_Continue}$]*/uy;
|
|
48289
49258
|
var UNNAMED_MODULE_MESSAGES = Object.freeze({
|
|
48290
49259
|
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.',
|
|
48291
49260
|
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.'
|
|
@@ -48296,10 +49265,14 @@ function callsStorageClient(source) {
|
|
|
48296
49265
|
var STORAGE_RUNTIME_BINDINGS = Object.freeze([
|
|
48297
49266
|
"OHMYHOST_ENVIRONMENT_ID",
|
|
48298
49267
|
"OHMYHOST_PROJECT_ID",
|
|
48299
|
-
"OHMYHOST_STORAGE_GATEWAY",
|
|
48300
49268
|
"OHMYHOST_STORAGE_GATEWAY_URL",
|
|
48301
49269
|
"OHMYHOST_STORAGE_KEY"
|
|
48302
49270
|
]);
|
|
49271
|
+
var MAIL_RUNTIME_BINDINGS = Object.freeze([
|
|
49272
|
+
"OHMYHOST_MAIL_GATEWAY_URL",
|
|
49273
|
+
"OHMYHOST_MAIL_KEY",
|
|
49274
|
+
"OHMYHOST_PROJECT_ID"
|
|
49275
|
+
]);
|
|
48303
49276
|
var CUSTOMER_RUNTIME_SOURCE = `npm:@amerged/ohmyhost-runtime@${package_default.version}`;
|
|
48304
49277
|
var PENDING_CHECKS = Object.freeze({
|
|
48305
49278
|
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.",
|
|
@@ -48478,6 +49451,7 @@ async function judgeSource(context) {
|
|
|
48478
49451
|
...source.findings.map((finding) => requiredCatalogBlocker(finding, context.applicationRoot)),
|
|
48479
49452
|
...await workerModuleBlockers(context),
|
|
48480
49453
|
...await databaseContractBlockers(context, context.provider),
|
|
49454
|
+
...await gatewayBindingBlockers(context),
|
|
48481
49455
|
...await storageClientBlockers(context),
|
|
48482
49456
|
...await migrationSqlBlockers(context, context.provider)
|
|
48483
49457
|
],
|
|
@@ -48526,6 +49500,147 @@ async function workerModuleBlockers(context) {
|
|
|
48526
49500
|
const source = await readFile3(resolve5(context.applicationDirectory, path2), "utf8");
|
|
48527
49501
|
return workerModuleFindings({ path: path2, source, fetch: framework === "functions", scheduled }).map((finding) => requiredCatalogBlocker(finding, context.applicationRoot));
|
|
48528
49502
|
}
|
|
49503
|
+
function gatewaySourceTokens(source) {
|
|
49504
|
+
const tokens = [];
|
|
49505
|
+
let cursor = 0;
|
|
49506
|
+
const quoted = (quote) => {
|
|
49507
|
+
const start = cursor++;
|
|
49508
|
+
while (cursor < source.length) {
|
|
49509
|
+
const character = source[cursor++];
|
|
49510
|
+
if (character === "\\")
|
|
49511
|
+
cursor++;
|
|
49512
|
+
else if (character === quote)
|
|
49513
|
+
break;
|
|
49514
|
+
}
|
|
49515
|
+
tokens.push(source.slice(start, cursor));
|
|
49516
|
+
};
|
|
49517
|
+
const code = (interpolation) => {
|
|
49518
|
+
let braces = 0;
|
|
49519
|
+
while (cursor < source.length) {
|
|
49520
|
+
const character = source[cursor];
|
|
49521
|
+
if (interpolation && character === "}" && braces === 0) {
|
|
49522
|
+
cursor++;
|
|
49523
|
+
return;
|
|
49524
|
+
}
|
|
49525
|
+
if (character === '"' || character === "'") {
|
|
49526
|
+
quoted(character);
|
|
49527
|
+
continue;
|
|
49528
|
+
}
|
|
49529
|
+
if (character === "`") {
|
|
49530
|
+
cursor++;
|
|
49531
|
+
while (cursor < source.length) {
|
|
49532
|
+
const literal = source[cursor++];
|
|
49533
|
+
if (literal === "\\")
|
|
49534
|
+
cursor++;
|
|
49535
|
+
else if (literal === "`")
|
|
49536
|
+
break;
|
|
49537
|
+
else if (literal === "$" && source[cursor] === "{") {
|
|
49538
|
+
cursor++;
|
|
49539
|
+
tokens.push("(");
|
|
49540
|
+
code(true);
|
|
49541
|
+
tokens.push(")");
|
|
49542
|
+
}
|
|
49543
|
+
}
|
|
49544
|
+
continue;
|
|
49545
|
+
}
|
|
49546
|
+
if (/\s/u.test(character)) {
|
|
49547
|
+
cursor++;
|
|
49548
|
+
continue;
|
|
49549
|
+
}
|
|
49550
|
+
if (character === "{")
|
|
49551
|
+
braces++;
|
|
49552
|
+
if (character === "}")
|
|
49553
|
+
braces--;
|
|
49554
|
+
GATEWAY_WORD_TOKEN.lastIndex = cursor;
|
|
49555
|
+
const word = GATEWAY_WORD_TOKEN.exec(source)?.[0];
|
|
49556
|
+
const token = word ?? (["?.", "=>"].includes(source.slice(cursor, cursor + 2)) ? source.slice(cursor, cursor + 2) : character);
|
|
49557
|
+
tokens.push(token);
|
|
49558
|
+
cursor += token.length;
|
|
49559
|
+
}
|
|
49560
|
+
};
|
|
49561
|
+
code(false);
|
|
49562
|
+
return tokens;
|
|
49563
|
+
}
|
|
49564
|
+
function usesGatewayBinding(source) {
|
|
49565
|
+
const tokens = gatewaySourceTokens(sourceWithoutComments(source));
|
|
49566
|
+
const objects = [];
|
|
49567
|
+
let declaration;
|
|
49568
|
+
let declarationDepth = 0;
|
|
49569
|
+
for (let index = 0; index < tokens.length; index++) {
|
|
49570
|
+
const token = tokens[index];
|
|
49571
|
+
const previous = tokens[index - 1];
|
|
49572
|
+
const next = tokens[index + 1];
|
|
49573
|
+
if (declaration !== void 0) {
|
|
49574
|
+
if (declarationDepth === 0 && (token === ";" || /^(?:export|const|let|var|function|class|type|interface)$/u.test(token))) {
|
|
49575
|
+
declaration = void 0;
|
|
49576
|
+
if (token === ";")
|
|
49577
|
+
continue;
|
|
49578
|
+
} else {
|
|
49579
|
+
if (token === "{" || token === "(" || token === "[")
|
|
49580
|
+
declarationDepth++;
|
|
49581
|
+
if (token === "}" || token === ")" || token === "]") {
|
|
49582
|
+
declarationDepth--;
|
|
49583
|
+
if (declaration !== "type" && declarationDepth === 0)
|
|
49584
|
+
declaration = void 0;
|
|
49585
|
+
}
|
|
49586
|
+
continue;
|
|
49587
|
+
}
|
|
49588
|
+
}
|
|
49589
|
+
if ((token === "type" || token === "interface") && next !== void 0 && /^[\p{ID_Start}_$][\p{ID_Continue}$]*$/u.test(next) && previous !== "." && previous !== "?.") {
|
|
49590
|
+
declaration = token;
|
|
49591
|
+
continue;
|
|
49592
|
+
}
|
|
49593
|
+
if (token === "{" && previous === ":" && /^(?:const|let|var)$/u.test(tokens[index - 3] ?? "")) {
|
|
49594
|
+
declaration = "annotation";
|
|
49595
|
+
declarationDepth = 1;
|
|
49596
|
+
continue;
|
|
49597
|
+
}
|
|
49598
|
+
if (token === "{")
|
|
49599
|
+
objects.push(false);
|
|
49600
|
+
if (token === "}") {
|
|
49601
|
+
const gateway = objects.pop();
|
|
49602
|
+
let after = index + 1;
|
|
49603
|
+
if (tokens[after] === ":") {
|
|
49604
|
+
after++;
|
|
49605
|
+
while (after < tokens.length && !/^(?:=|;|\{|\})$/u.test(tokens[after]))
|
|
49606
|
+
after++;
|
|
49607
|
+
}
|
|
49608
|
+
if (gateway && tokens[after] === "=")
|
|
49609
|
+
return true;
|
|
49610
|
+
}
|
|
49611
|
+
const quoted = token.startsWith('"') || token.startsWith("'");
|
|
49612
|
+
const name = quoted ? token.slice(1, -1) : token;
|
|
49613
|
+
if (!GATEWAY_BINDING_NAME.test(name))
|
|
49614
|
+
continue;
|
|
49615
|
+
if (!quoted && (previous === "." || previous === "?."))
|
|
49616
|
+
return true;
|
|
49617
|
+
const receiver = tokens[index - (tokens[index - 2] === "?." ? 3 : 2)] ?? "";
|
|
49618
|
+
if (quoted && previous === "[" && next === "]" && (/^[\p{ID_Start}_$][\p{ID_Continue}$]*$/u.test(receiver) || receiver === ")" || receiver === "]") && !/^(?:return|throw|yield|case|new|typeof|void|delete|await|in|of)$/u.test(receiver))
|
|
49619
|
+
return true;
|
|
49620
|
+
if (objects.length > 0 && (previous === "{" || previous === ",") && (next === ":" || next === "," || next === "}" || next === "="))
|
|
49621
|
+
objects[objects.length - 1] = true;
|
|
49622
|
+
}
|
|
49623
|
+
return false;
|
|
49624
|
+
}
|
|
49625
|
+
async function gatewayBindingBlockers(context) {
|
|
49626
|
+
const blockers = [];
|
|
49627
|
+
for (const path2 of context.files) {
|
|
49628
|
+
if (!SOURCE_MODULE_PATTERN.test(path2) || /\.d\.[cm]?ts$/u.test(path2))
|
|
49629
|
+
continue;
|
|
49630
|
+
const absolute = resolve5(context.applicationDirectory, path2);
|
|
49631
|
+
const information = await stat2(absolute);
|
|
49632
|
+
if (!information.isFile() || information.size > MAXIMUM_SOURCE_BYTES)
|
|
49633
|
+
continue;
|
|
49634
|
+
if (!usesGatewayBinding(await readFile3(absolute, "utf8")))
|
|
49635
|
+
continue;
|
|
49636
|
+
blockers.push({
|
|
49637
|
+
code: "gateway_binding_unsupported",
|
|
49638
|
+
path: repositoryPath(context.applicationRoot, path2),
|
|
49639
|
+
message: "Mail and storage gateway Service Bindings are unsupported. In server code, create the client from its OHMYHOST_MAIL_GATEWAY_URL or OHMYHOST_STORAGE_GATEWAY_URL, environment key and project ID, plus the environment ID for storage. Use the global fetch with fetch: (request) => fetch(request), and capabilityFetch: (request) => fetch(request) for storage signed URLs."
|
|
49640
|
+
});
|
|
49641
|
+
}
|
|
49642
|
+
return blockers;
|
|
49643
|
+
}
|
|
48529
49644
|
async function storageClientBlockers(context) {
|
|
48530
49645
|
if (context.config?.storage === void 0)
|
|
48531
49646
|
return [];
|
|
@@ -48543,7 +49658,7 @@ async function storageClientBlockers(context) {
|
|
|
48543
49658
|
{
|
|
48544
49659
|
code: "storage_client_missing",
|
|
48545
49660
|
path: null,
|
|
48546
|
-
message: 'ohmyhost.yaml declares storage, but no application source calls createPrivateStorageClient. Import it from "@ohmyhost/customer-runtime/storage" and build it in server code from
|
|
49661
|
+
message: 'ohmyhost.yaml declares storage, but no application source calls createPrivateStorageClient. Import it from "@ohmyhost/customer-runtime/storage" and build it in server code from OHMYHOST_STORAGE_GATEWAY_URL, OHMYHOST_PROJECT_ID, OHMYHOST_ENVIRONMENT_ID and OHMYHOST_STORAGE_KEY, with the global fetch as fetch: (request) => fetch(request) and capabilityFetch: (request) => fetch(request). Reserve an upload, PUT the bytes to the returned signed URL, complete it, and serve reads with createSignedRead. There is no FILES bucket binding.'
|
|
48547
49662
|
}
|
|
48548
49663
|
];
|
|
48549
49664
|
}
|
|
@@ -48572,12 +49687,12 @@ function migrationFilenameBlockers(context, provider) {
|
|
|
48572
49687
|
return [];
|
|
48573
49688
|
const root = context.config?.database?.migrations ?? "postgres/migrations";
|
|
48574
49689
|
const prefix = `${root}/`;
|
|
48575
|
-
const
|
|
48576
|
-
return
|
|
49690
|
+
const invalid7 = context.files.filter((path2) => path2.startsWith(prefix)).map((path2) => path2.slice(prefix.length)).find((path2) => !/^(?:[A-Za-z0-9][A-Za-z0-9._-]*\/)*\d{14}_[a-z0-9][a-z0-9_-]*\.sql$/u.test(path2));
|
|
49691
|
+
return invalid7 === void 0 ? [] : [
|
|
48577
49692
|
{
|
|
48578
49693
|
code: "migration_filename_noncanonical",
|
|
48579
|
-
path: repositoryPath(context.applicationRoot, `${prefix}${
|
|
48580
|
-
message: `Migration file '${
|
|
49694
|
+
path: repositoryPath(context.applicationRoot, `${prefix}${invalid7}`),
|
|
49695
|
+
message: `Migration file '${invalid7}' in ${root} is not named YYYYMMDDHHMMSS_name.sql (14 digits, an underscore, then lowercase letters, digits, _ or -). Every file in that directory must match, README and .gitkeep included: rename or move it, keeping the run order.`
|
|
48581
49696
|
}
|
|
48582
49697
|
];
|
|
48583
49698
|
}
|
|
@@ -49058,10 +50173,12 @@ async function detectR2Storage(root, files) {
|
|
|
49058
50173
|
function runtimeContract(capabilities) {
|
|
49059
50174
|
return Object.freeze({
|
|
49060
50175
|
bindings: Object.freeze([
|
|
49061
|
-
|
|
49062
|
-
|
|
49063
|
-
|
|
49064
|
-
|
|
50176
|
+
.../* @__PURE__ */ new Set([
|
|
50177
|
+
...capabilities.auth ? ["BETTER_AUTH_SECRET"] : [],
|
|
50178
|
+
...capabilities.storage ? STORAGE_RUNTIME_BINDINGS : [],
|
|
50179
|
+
...capabilities.database ? ["OHMYHOST_DATABASE"] : [],
|
|
50180
|
+
...capabilities.mail ? MAIL_RUNTIME_BINDINGS : []
|
|
50181
|
+
])
|
|
49065
50182
|
].sort()),
|
|
49066
50183
|
packages: Object.freeze({
|
|
49067
50184
|
...capabilities.auth ? { betterAuth: MANAGED_BETTER_AUTH_VERSION } : {},
|
|
@@ -49521,11 +50638,15 @@ var readTokenIdentity = async (input) => {
|
|
|
49521
50638
|
var commandOrganizationId = (command) => {
|
|
49522
50639
|
if (command.kind === "organization-use" || command.kind === "login")
|
|
49523
50640
|
return void 0;
|
|
50641
|
+
if (command.kind === "shared-mail" && "organizationId" in command.request)
|
|
50642
|
+
return command.request.organizationId;
|
|
49524
50643
|
if (command.kind === "feedback-submit")
|
|
49525
50644
|
return command.report.organization_id;
|
|
49526
50645
|
return "organizationId" in command && typeof command.organizationId === "string" ? command.organizationId : void 0;
|
|
49527
50646
|
};
|
|
49528
50647
|
var commandProjectId = (command) => {
|
|
50648
|
+
if (command.kind === "shared-mail")
|
|
50649
|
+
return "projectId" in command.request ? command.request.projectId : void 0;
|
|
49529
50650
|
if (command.kind === "managed-mail")
|
|
49530
50651
|
return command.request.projectId;
|
|
49531
50652
|
return "projectId" in command && typeof command.projectId === "string" ? command.projectId : void 0;
|