@amerged/ohmyhost-cli 0.1.36 → 0.1.37

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.
@@ -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 = (object3, key, value) => {
39
- Object.defineProperty(object3, key, { value });
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(object3, iterator, receiver) {
1941
- for (var k in object3) {
1942
- if (hasOwnProperty.call(object3, k)) {
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(object3[k], k, object3);
1944
+ iterator(object4[k], k, object4);
1945
1945
  } else {
1946
- iterator.call(receiver, object3[k], k, object3);
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 = (object3, key, value) => Object.defineProperty(object3, key, { value });
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: object3 }) {
9844
- const header = `${type} ${object3.length}\0`;
9843
+ static wrap({ type, object: object4 }) {
9844
+ const header = `${type} ${object4.length}\0`;
9845
9845
  const headerLen = header.length;
9846
- const totalLength = headerLen + object3.length;
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(object3, headerLen);
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: object3 } = await p.readSlice({ start: offset });
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: object3 }));
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 object3 = null;
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
- object3 = Buffer.from(await inflate(buffer));
10456
- if (object3.byteLength !== length) {
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 ${object3.byteLength}`
10458
+ `Packfile told us object would have length ${length} but it had length ${object4.byteLength}`
10459
10459
  );
10460
10460
  }
10461
10461
  if (base) {
10462
- object3 = Buffer.from(applyDelta(object3, base));
10462
+ object4 = Buffer.from(applyDelta(object4, base));
10463
10463
  }
10464
10464
  if (this.readDepth > 3) {
10465
- this.offsetCache[start] = { type, object: object3 };
10465
+ this.offsetCache[start] = { type, object: object4 };
10466
10466
  }
10467
- return { type, format: "content", object: object3 };
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: object3, type } = GitObject.unwrap(result.object);
10617
+ const { object: object4, type } = GitObject.unwrap(result.object);
10618
10618
  result.type = type;
10619
- result.object = object3;
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: object3 } = await _readObject({ fs: fs3, cache, gitdir, oid });
11311
+ const { type, object: object4 } = await _readObject({ fs: fs3, cache, gitdir, oid });
11312
11312
  if (type === "tag") {
11313
- oid = GitAnnotatedTag.from(object3).parse().object;
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(object3).parse().tree;
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(object3), oid };
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: object3 } = await _readObject({ fs: fs3, cache, gitdir, oid });
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(object3);
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: object3 } = await _readObject({ fs: fs3, cache, gitdir, oid });
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(object3);
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: object3, format, oid }) {
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, object3);
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: object3,
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
- object3 = GitObject.wrap({ type, object: object3 });
12248
+ object4 = GitObject.wrap({ type, object: object4 });
12249
12249
  }
12250
- oid = await shasum(object3);
12251
- object3 = Buffer.from(await deflate(object3));
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: object3, format: "deflated", oid });
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 object3 = stats.isSymbolicLink() ? await fs3.readlink(join7(dir, currentFilepath)).then(posixifyPathBuffer) : await fs3.read(join7(dir, currentFilepath), { autocrlf });
12364
- if (object3 === null) throw new NotFoundError(currentFilepath);
12365
- const oid = await _writeObject({ fs: fs3, gitdir, type: "blob", object: object3 });
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: object3 } = await _readObject({ fs: fs3, cache, gitdir, oid });
12445
+ const { type, object: object4 } = await _readObject({ fs: fs3, cache, gitdir, oid });
12446
12446
  if (type === "tag") {
12447
- oid = GitAnnotatedTag.from(object3).parse().object;
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(object3), oid };
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: object3 } = await _readObject({
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(object3);
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 object3 = GitTree.from(tree).toObject();
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: object3,
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: object3,
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: object3 || "HEAD"
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: object3,
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: object3,
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: object3,
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: object3 || "HEAD" });
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: object3,
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: object3,
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: object3 } = await _readObject({
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, object3);
13283
+ await fs3.write(filepath, object4);
13284
13284
  } else if (mode === 33261) {
13285
- await fs3.write(filepath, object3, { mode: 511 });
13285
+ await fs3.write(filepath, object4, { mode: 511 });
13286
13286
  } else if (mode === 40960) {
13287
- await fs3.writelink(filepath, object3);
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: object3 } = await _readObject({ fs: fs3, cache, gitdir, oid });
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, object3);
13629
+ await fs3.write(filepath, object4);
13630
13630
  } else if (mode === 33261) {
13631
- await fs3.write(filepath, object3, { mode: 511 });
13631
+ await fs3.write(filepath, object4, { mode: 511 });
13632
13632
  } else if (mode === 40960) {
13633
- await fs3.writelink(filepath, object3);
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 object3 = tree.toObject();
13932
+ const object4 = tree.toObject();
13933
13933
  const oid = await _writeObject({
13934
13934
  fs: fs3,
13935
13935
  gitdir,
13936
13936
  type: "tree",
13937
- object: object3,
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 object3 = stats.isSymbolicLink() ? await fs3.readlink(currentFilepath).then(posixifyPathBuffer) : await fs3.read(currentFilepath);
14047
- if (object3 === null) throw new NotFoundError(currentFilepath);
14048
- retOid = await _writeObject({ fs: fs3, gitdir, type: "blob", object: object3 });
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: object3 } = await _readObject({
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, object3);
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: object3 } = await _readObject({ fs: fs3, cache, gitdir, oid: oid2 });
15451
- const commit3 = new GitCommit(object3);
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: object3, type } = await _readObject({ fs: fs3, cache, gitdir, oid });
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(object3);
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: object3,
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
- object3 = GitObject.wrap({ type, object: object3 });
16621
+ object4 = GitObject.wrap({ type, object: object4 });
16622
16622
  }
16623
- oid = await shasum(object3);
16623
+ oid = await shasum(object4);
16624
16624
  }
16625
- return { oid, object: object3 };
16625
+ return { oid, object: object4 };
16626
16626
  }
16627
- async function hashBlob({ object: object3 }) {
16627
+ async function hashBlob({ object: object4 }) {
16628
16628
  try {
16629
- assertParameter("object", object3);
16630
- if (typeof object3 === "string") {
16631
- object3 = Buffer.from(object3, "utf8");
16632
- } else if (!(object3 instanceof Uint8Array)) {
16633
- object3 = new Uint8Array(object3);
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: object3
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: object3 } = await _readObject({
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(object3).parse();
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: object3 }) {
17152
+ }).then(function({ object: object4 }) {
17153
17153
  return _resolveFileId({
17154
17154
  fs: fs3,
17155
17155
  cache,
17156
17156
  gitdir,
17157
- tree: GitTree.from(object3),
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: object3 }) {
17461
+ async function writeObject2({ stype, object: object4 }) {
17462
17462
  const type = types[stype];
17463
- let length = object3.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(object3)));
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: object3 } = await _readObject({ fs: fs3, cache, gitdir, oid });
17482
- await writeObject2({ write, object: object3, stype: type });
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: object3 } = await _readObject({ fs: fs3, cache, gitdir, oid });
17627
+ const { type, object: object4 } = await _readObject({ fs: fs3, cache, gitdir, oid });
17628
17628
  if (type === "tag") {
17629
- const tag2 = GitAnnotatedTag.from(object3);
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(object3);
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: object3 } = await _readObject({ fs: fs3, cache, gitdir, oid });
17662
+ const { type, object: object4 } = await _readObject({ fs: fs3, cache, gitdir, oid });
17663
17663
  if (type === "tag") {
17664
- const tag2 = GitAnnotatedTag.from(object3);
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(object3);
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(object3);
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: object3 } = await _readObject({ fs: fs3, cache, gitdir, oid });
18003
+ const { type, object: object4 } = await _readObject({ fs: fs3, cache, gitdir, oid });
18004
18004
  if (type === "tag") {
18005
- oid = GitAnnotatedTag.from(object3).parse().object;
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(object3) };
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: object3 } = await _readObject({
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(object3);
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: object3 }) {
18456
- return shasum(GitObject.wrap({ type, object: object3 }));
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 object3 = dir && await fs3.read(join7(dir, filepath));
18509
- if (object3) {
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: object3
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 object3 = GitCommit.from(commit3).toObject();
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: object3,
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 object3 = await fs3.read(join7(dir, filepath), { autocrlf });
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: object3
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: object3 } = await _readObject({
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(object3);
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: object3,
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: object3 || "HEAD"
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 object3 = stats.isSymbolicLink() ? await fs3.readlink(join7(dir, filepath)) : await fs3.read(join7(dir, filepath));
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: object3
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: object3,
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
- object3 = GitCommit.from(object3).toObject();
19459
+ object4 = GitCommit.from(object4).toObject();
19460
19460
  break;
19461
19461
  case "tree":
19462
- object3 = GitTree.from(object3).toObject();
19462
+ object4 = GitTree.from(object4).toObject();
19463
19463
  break;
19464
19464
  case "blob":
19465
- object3 = Buffer.from(object3, encoding);
19465
+ object4 = Buffer.from(object4, encoding);
19466
19466
  break;
19467
19467
  case "tag":
19468
- object3 = GitAnnotatedTag.from(object3).toObject();
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: object3,
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 object3 = GitAnnotatedTag.from(tag2).toObject();
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: object3,
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, id3 = "", normalize) {
21931
+ function getFullPath(resolver, id4 = "", normalize) {
21932
21932
  if (normalize !== false)
21933
- id3 = normalizeId(id3);
21934
- const p = resolver.parse(id3);
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(id3) {
21945
- return id3 ? id3.replace(TRAILING_SLASH_HASH, "") : "";
21944
+ function normalizeId(id4) {
21945
+ return id4 ? id4.replace(TRAILING_SLASH_HASH, "") : "";
21946
21946
  }
21947
21947
  exports.normalizeId = normalizeId;
21948
- function resolveUrl(resolver, baseId, id3) {
21949
- id3 = normalizeId(id3);
21950
- return resolver.resolve(baseId, id3);
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 id3 = (0, resolve_1.normalizeId)(refPath);
22721
- const schOrRef = this.refs[id3] || this.schemas[id3];
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 (id3 === (0, resolve_1.normalizeId)(ref)) {
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];
@@ -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(host) {
22924
- const bracketed = host[0] === "[" && host[host.length - 1] === "]";
22925
- const hasBracket = host[0] === "[" || host[host.length - 1] === "]";
22926
- if (hasBracket && !bracketed) return { host, isIPV6: false, error: true };
22927
- let input = bracketed ? host.slice(1, -1) : host;
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 : ""),
@@ -23033,10 +23033,10 @@ var require_utils = __commonJS({
23033
23033
  var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
23034
23034
  var HOST_DELIM_RE = /[@/?#:]/g;
23035
23035
  var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
23036
- function reescapeHostDelimiters(host, isIP) {
23036
+ function reescapeHostDelimiters(host2, isIP) {
23037
23037
  const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
23038
23038
  re.lastIndex = 0;
23039
- return host.replace(re, (ch) => HOST_DELIMS[ch]);
23039
+ return host2.replace(re, (ch) => HOST_DELIMS[ch]);
23040
23040
  }
23041
23041
  function normalizePercentEncoding(input, decodeUnreserved = false) {
23042
23042
  if (input.indexOf("%") === -1) {
@@ -23252,20 +23252,20 @@ var require_utils = __commonJS({
23252
23252
  uriTokens.push("@");
23253
23253
  }
23254
23254
  if (component.host !== void 0) {
23255
- let host = component.host;
23256
- if (!isIPv4(host)) {
23257
- let ipV6res = normalizeIPv6(host);
23255
+ let host2 = component.host;
23256
+ if (!isIPv4(host2)) {
23257
+ let ipV6res = normalizeIPv6(host2);
23258
23258
  if (ipV6res.isIPV6 !== true && ipV6res.isIPVFuture !== true) {
23259
- host = normalizePercentEncoding(host, true);
23260
- ipV6res = normalizeIPv6(host);
23259
+ host2 = normalizePercentEncoding(host2, true);
23260
+ ipV6res = normalizeIPv6(host2);
23261
23261
  }
23262
23262
  if (ipV6res.isIPV6 === true || ipV6res.isIPVFuture === true) {
23263
- host = `[${ipV6res.escapedHost}]`;
23263
+ host2 = `[${ipV6res.escapedHost}]`;
23264
23264
  } else {
23265
- host = reescapeHostDelimiters(host, false);
23265
+ host2 = reescapeHostDelimiters(host2, false);
23266
23266
  }
23267
23267
  }
23268
- uriTokens.push(host);
23268
+ uriTokens.push(host2);
23269
23269
  }
23270
23270
  if (typeof component.port === "number" || typeof component.port === "string") {
23271
23271
  const port = String(component.port);
@@ -23716,12 +23716,12 @@ var require_fast_uri = __commonJS({
23716
23716
  }
23717
23717
  return false;
23718
23718
  }
23719
- function isIPLiteral(host) {
23720
- return host[0] === "[" && host[host.length - 1] === "]";
23719
+ function isIPLiteral(host2) {
23720
+ return host2[0] === "[" && host2[host2.length - 1] === "]";
23721
23721
  }
23722
23722
  function hasMalformedComponentPercentEncoding(matches) {
23723
- const host = matches[4];
23724
- return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
23723
+ const host2 = matches[4];
23724
+ return hasMalformedPercentEncoding(matches[3]) || host2 !== void 0 && !isIPLiteral(host2) && hasMalformedPercentEncoding(host2) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
23725
23725
  }
23726
23726
  function canonicalizeHost(parsed, options, schemeHandler, isIP) {
23727
23727
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
@@ -23842,11 +23842,11 @@ var require_fast_uri = __commonJS({
23842
23842
  malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP);
23843
23843
  }
23844
23844
  if (uri.indexOf("%") !== -1 && parsed.host !== void 0 && !malformedIPLiteral) {
23845
- let host = isIP ? parsed.host : normalizePercentEncoding(parsed.host, true);
23845
+ let host2 = isIP ? parsed.host : normalizePercentEncoding(parsed.host, true);
23846
23846
  if (!isIP) {
23847
- host = normalizePercentEncoding(host.toLowerCase());
23847
+ host2 = normalizePercentEncoding(host2.toLowerCase());
23848
23848
  }
23849
- parsed.host = reescapeHostDelimiters(host, isIP);
23849
+ parsed.host = reescapeHostDelimiters(host2, isIP);
23850
23850
  }
23851
23851
  if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
23852
23852
  if (parsed.path) {
@@ -24156,15 +24156,15 @@ var require_core = __commonJS({
24156
24156
  this.addSchema(sch, void 0, _meta, _validateSchema);
24157
24157
  return this;
24158
24158
  }
24159
- let id3;
24159
+ let id4;
24160
24160
  if (typeof schema === "object") {
24161
24161
  const { schemaId } = this.opts;
24162
- id3 = schema[schemaId];
24163
- if (id3 !== void 0 && typeof id3 != "string") {
24162
+ id4 = schema[schemaId];
24163
+ if (id4 !== void 0 && typeof id4 != "string") {
24164
24164
  throw new Error(`schema ${schemaId} must be string`);
24165
24165
  }
24166
24166
  }
24167
- key = (0, resolve_1.normalizeId)(key || id3);
24167
+ key = (0, resolve_1.normalizeId)(key || id4);
24168
24168
  this._checkUnique(key);
24169
24169
  this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true);
24170
24170
  return this;
@@ -24243,11 +24243,11 @@ var require_core = __commonJS({
24243
24243
  case "object": {
24244
24244
  const cacheKey = schemaKeyRef;
24245
24245
  this._cache.delete(cacheKey);
24246
- let id3 = schemaKeyRef[this.opts.schemaId];
24247
- if (id3) {
24248
- id3 = (0, resolve_1.normalizeId)(id3);
24249
- delete this.schemas[id3];
24250
- delete this.refs[id3];
24246
+ let id4 = schemaKeyRef[this.opts.schemaId];
24247
+ if (id4) {
24248
+ id4 = (0, resolve_1.normalizeId)(id4);
24249
+ delete this.schemas[id4];
24250
+ delete this.refs[id4];
24251
24251
  }
24252
24252
  return this;
24253
24253
  }
@@ -24354,10 +24354,10 @@ var require_core = __commonJS({
24354
24354
  }
24355
24355
  }
24356
24356
  _addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {
24357
- let id3;
24357
+ let id4;
24358
24358
  const { schemaId } = this.opts;
24359
24359
  if (typeof schema == "object") {
24360
- id3 = schema[schemaId];
24360
+ id4 = schema[schemaId];
24361
24361
  } else {
24362
24362
  if (this.opts.jtd)
24363
24363
  throw new Error("schema must be object");
@@ -24367,7 +24367,7 @@ var require_core = __commonJS({
24367
24367
  let sch = this._cache.get(schema);
24368
24368
  if (sch !== void 0)
24369
24369
  return sch;
24370
- baseId = (0, resolve_1.normalizeId)(id3 || baseId);
24370
+ baseId = (0, resolve_1.normalizeId)(id4 || baseId);
24371
24371
  const localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId);
24372
24372
  sch = new compile_1.SchemaEnv({ schema, schemaId, meta, baseId, localRefs });
24373
24373
  this._cache.set(sch.schema, sch);
@@ -24380,9 +24380,9 @@ var require_core = __commonJS({
24380
24380
  this.validateSchema(schema, true);
24381
24381
  return sch;
24382
24382
  }
24383
- _checkUnique(id3) {
24384
- if (this.schemas[id3] || this.refs[id3]) {
24385
- throw new Error(`schema with key or id "${id3}" already exists`);
24383
+ _checkUnique(id4) {
24384
+ if (this.schemas[id4] || this.refs[id4]) {
24385
+ throw new Error(`schema with key or id "${id4}" already exists`);
24386
24386
  }
24387
24387
  }
24388
24388
  _compileSchemaEnv(sch) {
@@ -24747,8 +24747,8 @@ var require_multipleOf = __commonJS({
24747
24747
  const { gen, data, schemaCode, it } = cxt;
24748
24748
  const prec = it.opts.multipleOfPrecision;
24749
24749
  const res = gen.let("res");
24750
- const invalid6 = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`;
24751
- cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid6}))`);
24750
+ const invalid7 = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`;
24751
+ cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid7}))`);
24752
24752
  }
24753
24753
  };
24754
24754
  exports.default = def;
@@ -36678,13 +36678,13 @@ var PROBLEM_POLICY = {
36678
36678
  mail_domain_conflict: {
36679
36679
  status: 409,
36680
36680
  retryable: false,
36681
- action: "Use the sender domain already configured for this project, or retire it with 'ohmyhost mail domain delete' (repeat while the removal is pending) and then set up the new domain; a domain registered to another project cannot be set up.",
36681
+ 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
36682
  title: "Mail domain conflict"
36683
36683
  },
36684
36684
  mail_domain_required: {
36685
36685
  status: 409,
36686
36686
  retryable: false,
36687
- action: "This app declares mail.enabled. Configure the project's own sender domain with 'ohmyhost mail setup' using its Prod environment ID, or set mail.enabled to false if the app sends no mail, then plan again.",
36687
+ 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
36688
  title: "Mail domain required"
36689
36689
  },
36690
36690
  storage_jurisdiction_conflict: {
@@ -37285,10 +37285,10 @@ var parseProjectStatus = (value) => {
37285
37285
  const ids = /* @__PURE__ */ new Set(), names = /* @__PURE__ */ new Set();
37286
37286
  for (const raw of environments) {
37287
37287
  const environment = exactRecord2(raw, ["id", "name"]);
37288
- const id3 = environment["id"], name = environment["name"];
37289
- if (!isUlid(id3) || name !== "dev" && name !== "prod" || ids.has(id3) || names.has(name))
37288
+ const id4 = environment["id"], name = environment["name"];
37289
+ if (!isUlid(id4) || name !== "dev" && name !== "prod" || ids.has(id4) || names.has(name))
37290
37290
  throw new ResponseContractError();
37291
- ids.add(id3);
37291
+ ids.add(id4);
37292
37292
  names.add(name);
37293
37293
  }
37294
37294
  }
@@ -37586,16 +37586,16 @@ var parseOperation = (value) => {
37586
37586
  "reconciliation",
37587
37587
  "progress"
37588
37588
  ]);
37589
- const id3 = input["id"];
37589
+ const id4 = input["id"];
37590
37590
  const state = input["state"];
37591
37591
  const createdAt = input["created_at"];
37592
37592
  const updatedAt = input["updated_at"];
37593
37593
  const result = input["result"];
37594
37594
  const blockingOperationId = input["blocking_operation_id"];
37595
37595
  const deploymentId = input["deployment_id"];
37596
- if (blockingOperationId !== void 0 && (state !== "queued" || !isUlid(blockingOperationId) || blockingOperationId === id3) || deploymentId !== void 0 && !isUlid(deploymentId))
37596
+ if (blockingOperationId !== void 0 && (state !== "queued" || !isUlid(blockingOperationId) || blockingOperationId === id4) || deploymentId !== void 0 && !isUlid(deploymentId))
37597
37597
  throw new ResponseContractError();
37598
- if (!isUlid(id3) || !isOperationState(state) || !isIsoInstant(createdAt) || !isIsoInstant(updatedAt) || result !== void 0 && !isRecord2(result)) {
37598
+ if (!isUlid(id4) || !isOperationState(state) || !isIsoInstant(createdAt) || !isIsoInstant(updatedAt) || result !== void 0 && !isRecord2(result)) {
37599
37599
  throw new ResponseContractError();
37600
37600
  }
37601
37601
  let progress;
@@ -37635,7 +37635,7 @@ var parseOperation = (value) => {
37635
37635
  throw new ResponseContractError();
37636
37636
  }
37637
37637
  return {
37638
- id: id3,
37638
+ id: id4,
37639
37639
  state,
37640
37640
  created_at: createdAt,
37641
37641
  updated_at: updatedAt,
@@ -38621,9 +38621,9 @@ var selectProfileForOrganization = (profiles, request) => {
38621
38621
  if (inOrganization.length > 1)
38622
38622
  return { outcome: "ambiguous", candidates: inOrganization };
38623
38623
  const unscoped = candidates.filter((profile) => profile.organizationId === null);
38624
- const [member] = inOrganization;
38625
- if (member !== void 0)
38626
- return { outcome: "selected", profile: member };
38624
+ const [member2] = inOrganization;
38625
+ if (member2 !== void 0)
38626
+ return { outcome: "selected", profile: member2 };
38627
38627
  const [open5] = unscoped;
38628
38628
  if (unscoped.length === 1 && open5 !== void 0)
38629
38629
  return { outcome: "selected", profile: open5 };
@@ -39073,6 +39073,11 @@ var recognizedCommandLabel = (argv) => {
39073
39073
  if (value === "function" && values[0] === "runs")
39074
39074
  return "function runs";
39075
39075
  if (value === "mail") {
39076
+ if (["workspace", "binding", "identity"].includes(values[0] ?? "")) {
39077
+ const candidate = `mail ${values[0]} ${values[1]}`;
39078
+ if (SHARED_MAIL_LABELS.includes(candidate))
39079
+ return candidate;
39080
+ }
39076
39081
  if (values[0] === "setup")
39077
39082
  return "mail setup";
39078
39083
  if (values[0] === "status")
@@ -40277,6 +40282,11 @@ var parseProductCliCommand = (argv) => {
40277
40282
  }
40278
40283
  throw new InvalidCommandError();
40279
40284
  }
40285
+ if (first === "mail" && ["workspace", "binding", "identity"].includes(values[0] ?? "")) {
40286
+ if (wait || follow || stdin)
40287
+ throw new InvalidCommandError();
40288
+ return parseSharedMailCommand(values, yes);
40289
+ }
40280
40290
  if (first === "mail") {
40281
40291
  const area = values.shift();
40282
40292
  const sub = area === "webhook" || area === "messages" || area === "domain" ? values.shift() : void 0;
@@ -40440,6 +40450,193 @@ var validGithubBranchName = (value) => !(value.length < 1 || value.length > 1024
40440
40450
  return code <= 32 || code === 127 || "\\~^:?*[]".includes(character);
40441
40451
  }) || value.split("/").some((component) => component.startsWith(".") || component.endsWith(".lock")));
40442
40452
  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");
40453
+ var SHARED_MAIL_LABELS = [
40454
+ "mail workspace list",
40455
+ "mail workspace create",
40456
+ "mail workspace status",
40457
+ "mail workspace retire",
40458
+ "mail workspace dns-authorize",
40459
+ "mail workspace dns-status",
40460
+ "mail workspace dns-revoke",
40461
+ "mail binding get",
40462
+ "mail binding set",
40463
+ "mail binding detach",
40464
+ "mail identity get",
40465
+ "mail identity declare",
40466
+ "mail identity verify",
40467
+ "mail identity revoke",
40468
+ "mail identity authorize",
40469
+ "mail identity authorization-status",
40470
+ "mail identity authorization-revoke"
40471
+ ];
40472
+ function parseSharedMailCommand(values, yes) {
40473
+ const area = values.shift(), operation = values.shift();
40474
+ const label = `mail ${area} ${operation}`;
40475
+ if (!SHARED_MAIL_LABELS.includes(label))
40476
+ throw new InvalidCommandError();
40477
+ const destructive = operation === "retire" || operation === "detach" || operation === "revoke" || operation === "dns-revoke" || operation === "authorization-revoke";
40478
+ if (yes !== destructive)
40479
+ throw new InvalidCommandError();
40480
+ const allowed = area === "workspace" ? ["--organization"] : ["--project"];
40481
+ const writing = [
40482
+ "create",
40483
+ "retire",
40484
+ "dns-authorize",
40485
+ "dns-revoke",
40486
+ "set",
40487
+ "detach",
40488
+ "declare",
40489
+ "verify",
40490
+ "revoke",
40491
+ "authorize",
40492
+ "authorization-revoke"
40493
+ ].includes(operation ?? "");
40494
+ if (area === "workspace" && operation !== "list" && operation !== "create")
40495
+ allowed.push("--mail-domain");
40496
+ if (area === "binding")
40497
+ allowed.push("--environment");
40498
+ if (operation === "create")
40499
+ allowed.push("--domain", "--sending");
40500
+ if (area === "binding" && operation === "set")
40501
+ allowed.push("--mail-domain", "--sending", "--sender-addresses", "--default-from", "--reply-to");
40502
+ if (operation === "declare")
40503
+ allowed.push("--hostname");
40504
+ if (operation === "authorize" || operation === "dns-authorize")
40505
+ allowed.push("--zone");
40506
+ if (writing)
40507
+ allowed.push("--idempotency-key");
40508
+ if (writing && operation !== "create" && operation !== "declare")
40509
+ allowed.push("--expected-revision");
40510
+ const options = parseOptionalOptions(values, allowed);
40511
+ const required = (key) => {
40512
+ const value = options[key];
40513
+ if (!value)
40514
+ throw new InvalidCommandError();
40515
+ return value;
40516
+ };
40517
+ const revision = () => {
40518
+ const value = required("--expected-revision");
40519
+ if (!/^(?:0|[1-9][0-9]*)$/u.test(value) || !Number.isSafeInteger(Number(value)))
40520
+ throw new InvalidCommandError();
40521
+ return Number(value);
40522
+ };
40523
+ const sending = () => {
40524
+ const value = required("--sending");
40525
+ if (value !== "true" && value !== "false")
40526
+ throw new InvalidCommandError();
40527
+ return value === "true";
40528
+ };
40529
+ const idempotencyKey = () => required("--idempotency-key");
40530
+ let request;
40531
+ if (area === "workspace") {
40532
+ const scope = { organizationId: required("--organization") };
40533
+ if (operation === "list")
40534
+ request = { ...scope, action: "domains_list" };
40535
+ else if (operation === "create") {
40536
+ const enabled = sending();
40537
+ if (!enabled)
40538
+ throw new InvalidCommandError();
40539
+ request = {
40540
+ ...scope,
40541
+ action: "domain_create",
40542
+ domain: required("--domain"),
40543
+ sending: enabled,
40544
+ idempotencyKey: idempotencyKey()
40545
+ };
40546
+ } else {
40547
+ const target = { ...scope, mailDomainId: required("--mail-domain") };
40548
+ if (operation === "status")
40549
+ request = { ...target, action: "domain_get" };
40550
+ else if (operation === "dns-status")
40551
+ request = { ...target, action: "domain_dns_status" };
40552
+ else if (operation === "dns-revoke")
40553
+ request = {
40554
+ ...target,
40555
+ action: "domain_dns_revoke",
40556
+ expectedRevision: revision(),
40557
+ idempotencyKey: idempotencyKey()
40558
+ };
40559
+ else if (operation === "retire")
40560
+ request = {
40561
+ ...target,
40562
+ action: "domain_retire",
40563
+ expectedRevision: revision(),
40564
+ idempotencyKey: idempotencyKey()
40565
+ };
40566
+ else
40567
+ request = {
40568
+ ...target,
40569
+ action: "domain_dns_authorize",
40570
+ expectedRevision: revision(),
40571
+ zone: required("--zone"),
40572
+ idempotencyKey: idempotencyKey()
40573
+ };
40574
+ }
40575
+ } else if (area === "binding") {
40576
+ const scope = { projectId: required("--project"), environmentId: required("--environment") };
40577
+ if (operation === "get")
40578
+ request = { ...scope, action: "binding_get" };
40579
+ else if (operation === "detach")
40580
+ request = {
40581
+ ...scope,
40582
+ action: "binding_detach",
40583
+ expectedRevision: revision(),
40584
+ idempotencyKey: idempotencyKey()
40585
+ };
40586
+ else {
40587
+ const senderAddresses = required("--sender-addresses").split(",");
40588
+ if (senderAddresses.length > 32 || senderAddresses.some((address) => !address || address.trim() !== address) || new Set(senderAddresses).size !== senderAddresses.length)
40589
+ throw new InvalidCommandError();
40590
+ request = {
40591
+ ...scope,
40592
+ action: "binding_set",
40593
+ mailDomainId: required("--mail-domain"),
40594
+ sending: sending(),
40595
+ senderAddresses,
40596
+ defaultFrom: required("--default-from"),
40597
+ defaultReplyTo: options["--reply-to"] ?? null,
40598
+ expectedRevision: revision(),
40599
+ idempotencyKey: idempotencyKey()
40600
+ };
40601
+ }
40602
+ } else {
40603
+ const scope = { projectId: required("--project") };
40604
+ if (operation === "get")
40605
+ request = { ...scope, action: "identity_get" };
40606
+ else if (operation === "authorization-status")
40607
+ request = { ...scope, action: "identity_authorization_status" };
40608
+ else if (operation === "authorization-revoke")
40609
+ request = {
40610
+ ...scope,
40611
+ action: "identity_authorization_revoke",
40612
+ expectedRevision: revision(),
40613
+ idempotencyKey: idempotencyKey()
40614
+ };
40615
+ else if (operation === "declare")
40616
+ request = {
40617
+ ...scope,
40618
+ action: "identity_declare",
40619
+ hostname: required("--hostname"),
40620
+ idempotencyKey: idempotencyKey()
40621
+ };
40622
+ else if (operation === "authorize")
40623
+ request = {
40624
+ ...scope,
40625
+ action: "identity_authorize",
40626
+ zone: required("--zone"),
40627
+ expectedRevision: revision(),
40628
+ idempotencyKey: idempotencyKey()
40629
+ };
40630
+ else
40631
+ request = {
40632
+ ...scope,
40633
+ action: operation === "verify" ? "identity_verify" : "identity_revoke",
40634
+ expectedRevision: revision(),
40635
+ idempotencyKey: idempotencyKey()
40636
+ };
40637
+ }
40638
+ return { kind: "shared-mail", request, label, credentialStore: "native" };
40639
+ }
40443
40640
 
40444
40641
  // apps/product-cli/dist/workspace.js
40445
40642
  var InteractiveSessionRequiredError = class extends Error {
@@ -40670,7 +40867,7 @@ function exact3(v, keys) {
40670
40867
  // apps/product-cli/package.json
40671
40868
  var package_default = {
40672
40869
  name: "@ohmyhost/product-cli",
40673
- version: "0.1.36",
40870
+ version: "0.1.37",
40674
40871
  private: true,
40675
40872
  ohmyhost: {
40676
40873
  deployment: "production",
@@ -40800,12 +40997,12 @@ function assertBillingTaxIssue(value) {
40800
40997
  }
40801
40998
  var ulid4 = /^[0-7][0-9A-HJKMNP-TV-Z]{25}$/u;
40802
40999
  var timestamp5 = (v) => typeof v === "string" && Number.isFinite(Date.parse(v)) && new Date(v).toISOString() === v;
40803
- function stripeUrl(value, host) {
41000
+ function stripeUrl(value, host2) {
40804
41001
  if (typeof value !== "string" || value.length > 8192)
40805
41002
  return false;
40806
41003
  try {
40807
41004
  const u = new URL(value);
40808
- return u.protocol === "https:" && u.hostname === host && !u.username && !u.password && !u.port;
41005
+ return u.protocol === "https:" && u.hostname === host2 && !u.username && !u.password && !u.port;
40809
41006
  } catch {
40810
41007
  return false;
40811
41008
  }
@@ -41050,6 +41247,23 @@ var HELP_USAGE = Object.freeze({
41050
41247
  "function runs": "ohmyhost function runs --project ULID --environment ENVIRONMENT_ULID [--limit 1-100] --json",
41051
41248
  "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
41249
  "secret delete": "ohmyhost secret delete NAME --project ULID --environment ENVIRONMENT_ULID --idempotency-key KEY [--wait] --json",
41250
+ "mail workspace list": "ohmyhost mail workspace list --organization ULID --json",
41251
+ "mail workspace create": "ohmyhost mail workspace create --organization ULID --domain DOMAIN --sending true --idempotency-key KEY --json",
41252
+ "mail workspace status": "ohmyhost mail workspace status --organization ULID --mail-domain ULID --json",
41253
+ "mail workspace retire": "ohmyhost mail workspace retire --organization ULID --mail-domain ULID --expected-revision N --idempotency-key KEY --yes --json",
41254
+ "mail workspace dns-authorize": "ohmyhost mail workspace dns-authorize --organization ULID --mail-domain ULID --expected-revision N --zone DOMAIN --idempotency-key KEY --json",
41255
+ "mail workspace dns-revoke": "ohmyhost mail workspace dns-revoke --organization ULID --mail-domain ULID --expected-revision N --idempotency-key KEY --yes --json",
41256
+ "mail workspace dns-status": "ohmyhost mail workspace dns-status --organization ULID --mail-domain ULID --json",
41257
+ "mail binding get": "ohmyhost mail binding get --project ULID --environment PROD_ULID --json",
41258
+ "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",
41259
+ "mail binding detach": "ohmyhost mail binding detach --project ULID --environment PROD_ULID --expected-revision N --idempotency-key KEY --yes --json",
41260
+ "mail identity get": "ohmyhost mail identity get --project ULID --json",
41261
+ "mail identity declare": "ohmyhost mail identity declare --project ULID --hostname sign.example.com --idempotency-key KEY --json",
41262
+ "mail identity verify": "ohmyhost mail identity verify --project ULID --expected-revision N --idempotency-key KEY --json",
41263
+ "mail identity revoke": "ohmyhost mail identity revoke --project ULID --expected-revision N --idempotency-key KEY --yes --json",
41264
+ "mail identity authorize": "ohmyhost mail identity authorize --project ULID --expected-revision N --zone example.com --idempotency-key KEY --json",
41265
+ "mail identity authorization-revoke": "ohmyhost mail identity authorization-revoke --project ULID --expected-revision N --idempotency-key KEY --yes --json",
41266
+ "mail identity authorization-status": "ohmyhost mail identity authorization-status --project ULID --json",
41053
41267
  "mail setup": "ohmyhost mail setup --project ULID --environment ULID --domain DOMAIN --sending true --receiving false --idempotency-key KEY --json",
41054
41268
  "mail status": "ohmyhost mail status --project ULID --environment ULID --json",
41055
41269
  "mail webhook set": "ohmyhost mail webhook set --project ULID --environment ULID --url HTTPS_URL --idempotency-key KEY --json",
@@ -41502,6 +41716,12 @@ var ProductCli = class {
41502
41716
  return await this.listFunctionRuns(command, signal);
41503
41717
  if (command.kind === "secret-set")
41504
41718
  return await this.putEnvironmentSecret(command, signal);
41719
+ if (command.kind === "shared-mail") {
41720
+ const api = await this.authenticatedApi(command.credentialStore, signal);
41721
+ if (!api.sharedMail)
41722
+ throw new Error("Shared mail unavailable");
41723
+ return success(command.label, { mail: await api.sharedMail(command.request) });
41724
+ }
41505
41725
  if (command.kind === "managed-mail") {
41506
41726
  const api = await this.authenticatedApi(command.credentialStore, signal);
41507
41727
  if (!api.managedMail)
@@ -42068,7 +42288,7 @@ var ProductCli = class {
42068
42288
  if (command.kind === "source-complete") {
42069
42289
  const completed = await completeLocalSourcePublication({
42070
42290
  api: source,
42071
- getOperation: (id3) => api.getOperation(id3),
42291
+ getOperation: (id4) => api.getOperation(id4),
42072
42292
  directory: resolve4(this.dependencies.sourceDirectory ?? process.cwd(), command.directory),
42073
42293
  metadataDirectory: this.dependencies.sourceMetadataDirectory,
42074
42294
  apiOrigin: this.dependencies.productApiOrigin,
@@ -42153,7 +42373,7 @@ var ProductCli = class {
42153
42373
  if (operation.state === "succeeded" && command.kind === "source-publish") {
42154
42374
  const completed = await completeLocalSourcePublication({
42155
42375
  api: source,
42156
- getOperation: (id3) => api.getOperation(id3),
42376
+ getOperation: (id4) => api.getOperation(id4),
42157
42377
  directory: resolve4(this.dependencies.sourceDirectory ?? process.cwd(), command.directory),
42158
42378
  metadataDirectory: this.dependencies.sourceMetadataDirectory,
42159
42379
  apiOrigin: this.dependencies.productApiOrigin,
@@ -42614,18 +42834,18 @@ var reusedKeyProblem = (error) => {
42614
42834
  };
42615
42835
  var OPERATION_STREAM_CONNECTIONS = 4;
42616
42836
  var readStatementFile = async (path2) => {
42617
- const invalid6 = () => new ProductCliFailure(2, "statement_file_invalid", false, STATEMENT_FILE_INVALID_ACTION);
42837
+ const invalid7 = () => new ProductCliFailure(2, "statement_file_invalid", false, STATEMENT_FILE_INVALID_ACTION);
42618
42838
  let file;
42619
42839
  try {
42620
42840
  file = await open3(path2, "r");
42621
42841
  } catch {
42622
- throw invalid6();
42842
+ throw invalid7();
42623
42843
  }
42624
42844
  const buffer = Buffer.alloc(65537);
42625
42845
  try {
42626
42846
  const stat3 = await file.stat();
42627
42847
  if (!stat3.isFile() || stat3.size > 65536)
42628
- throw invalid6();
42848
+ throw invalid7();
42629
42849
  let length = 0;
42630
42850
  while (length < buffer.length) {
42631
42851
  const read = await file.read(buffer, length, buffer.length - length, null);
@@ -42634,12 +42854,12 @@ var readStatementFile = async (path2) => {
42634
42854
  length += read.bytesRead;
42635
42855
  }
42636
42856
  if (length > 65536)
42637
- throw invalid6();
42857
+ throw invalid7();
42638
42858
  return new TextDecoder("utf-8", { fatal: true }).decode(buffer.subarray(0, length));
42639
42859
  } catch (error) {
42640
42860
  if (error instanceof ProductCliFailure)
42641
42861
  throw error;
42642
- throw invalid6();
42862
+ throw invalid7();
42643
42863
  } finally {
42644
42864
  buffer.fill(0);
42645
42865
  await file.close();
@@ -42820,7 +43040,7 @@ var parsedCommandName = (command) => {
42820
43040
  return "secret set";
42821
43041
  if (command.kind === "secret-delete")
42822
43042
  return "secret delete";
42823
- if (command.kind === "managed-mail")
43043
+ if (command.kind === "shared-mail" || command.kind === "managed-mail")
42824
43044
  return command.label;
42825
43045
  if (command.kind === "profile-list")
42826
43046
  return "profile list";
@@ -43508,27 +43728,27 @@ var Interceptors = class {
43508
43728
  clear() {
43509
43729
  this.fns = [];
43510
43730
  }
43511
- eject(id3) {
43512
- const index = this.getInterceptorIndex(id3);
43731
+ eject(id4) {
43732
+ const index = this.getInterceptorIndex(id4);
43513
43733
  if (this.fns[index]) {
43514
43734
  this.fns[index] = null;
43515
43735
  }
43516
43736
  }
43517
- exists(id3) {
43518
- const index = this.getInterceptorIndex(id3);
43737
+ exists(id4) {
43738
+ const index = this.getInterceptorIndex(id4);
43519
43739
  return Boolean(this.fns[index]);
43520
43740
  }
43521
- getInterceptorIndex(id3) {
43522
- if (typeof id3 === "number") {
43523
- return this.fns[id3] ? id3 : -1;
43741
+ getInterceptorIndex(id4) {
43742
+ if (typeof id4 === "number") {
43743
+ return this.fns[id4] ? id4 : -1;
43524
43744
  }
43525
- return this.fns.indexOf(id3);
43745
+ return this.fns.indexOf(id4);
43526
43746
  }
43527
- update(id3, fn) {
43528
- const index = this.getInterceptorIndex(id3);
43747
+ update(id4, fn) {
43748
+ const index = this.getInterceptorIndex(id4);
43529
43749
  if (this.fns[index]) {
43530
43750
  this.fns[index] = fn;
43531
- return id3;
43751
+ return id4;
43532
43752
  }
43533
43753
  return false;
43534
43754
  }
@@ -43763,6 +43983,380 @@ var createClient = (config = {}) => {
43763
43983
  var client = createClient(createConfig({ throwOnError: true }));
43764
43984
 
43765
43985
  // packages/sdk-ts/dist/generated/sdk.gen.js
43986
+ var listWorkspaceMailDomains = (parameters, options) => {
43987
+ const params = buildClientParams([parameters], [
43988
+ {
43989
+ args: [
43990
+ { in: "headers", key: "X-Request-Id" },
43991
+ { in: "path", key: "organization_id" }
43992
+ ]
43993
+ }
43994
+ ]);
43995
+ return (options?.client ?? client).get({
43996
+ responseStyle: "data",
43997
+ security: [{ scheme: "bearer", type: "http" }],
43998
+ url: "/v1/organizations/{organization_id}/mail-domains",
43999
+ ...options,
44000
+ ...params
44001
+ });
44002
+ };
44003
+ var createWorkspaceMailDomain = (parameters, options) => {
44004
+ const params = buildClientParams([parameters], [
44005
+ {
44006
+ args: [
44007
+ { in: "headers", key: "X-Request-Id" },
44008
+ { in: "headers", key: "Idempotency-Key" },
44009
+ { in: "path", key: "organization_id" },
44010
+ { key: "createWorkspaceMailDomainRequest", map: "body" }
44011
+ ]
44012
+ }
44013
+ ]);
44014
+ return (options?.client ?? client).post({
44015
+ responseStyle: "data",
44016
+ security: [{ scheme: "bearer", type: "http" }],
44017
+ url: "/v1/organizations/{organization_id}/mail-domains",
44018
+ ...options,
44019
+ ...params,
44020
+ headers: {
44021
+ "Content-Type": "application/json",
44022
+ ...options?.headers,
44023
+ ...params.headers
44024
+ }
44025
+ });
44026
+ };
44027
+ var retireWorkspaceMailDomain = (parameters, options) => {
44028
+ const params = buildClientParams([parameters], [
44029
+ {
44030
+ args: [
44031
+ { in: "headers", key: "X-Request-Id" },
44032
+ { in: "headers", key: "Idempotency-Key" },
44033
+ { in: "path", key: "organization_id" },
44034
+ { in: "path", key: "mail_domain_id" },
44035
+ { key: "mailRevisionRequest", map: "body" }
44036
+ ]
44037
+ }
44038
+ ]);
44039
+ return (options?.client ?? client).delete({
44040
+ responseStyle: "data",
44041
+ security: [{ scheme: "bearer", type: "http" }],
44042
+ url: "/v1/organizations/{organization_id}/mail-domains/{mail_domain_id}",
44043
+ ...options,
44044
+ ...params,
44045
+ headers: {
44046
+ "Content-Type": "application/json",
44047
+ ...options?.headers,
44048
+ ...params.headers
44049
+ }
44050
+ });
44051
+ };
44052
+ var getWorkspaceMailDomain = (parameters, options) => {
44053
+ const params = buildClientParams([parameters], [
44054
+ {
44055
+ args: [
44056
+ { in: "headers", key: "X-Request-Id" },
44057
+ { in: "path", key: "organization_id" },
44058
+ { in: "path", key: "mail_domain_id" }
44059
+ ]
44060
+ }
44061
+ ]);
44062
+ return (options?.client ?? client).get({
44063
+ responseStyle: "data",
44064
+ security: [{ scheme: "bearer", type: "http" }],
44065
+ url: "/v1/organizations/{organization_id}/mail-domains/{mail_domain_id}",
44066
+ ...options,
44067
+ ...params
44068
+ });
44069
+ };
44070
+ var revokeWorkspaceMailDomainDnsAuthorization = (parameters, options) => {
44071
+ const params = buildClientParams([parameters], [
44072
+ {
44073
+ args: [
44074
+ { in: "headers", key: "X-Request-Id" },
44075
+ { in: "headers", key: "Idempotency-Key" },
44076
+ { in: "path", key: "organization_id" },
44077
+ { in: "path", key: "mail_domain_id" },
44078
+ { key: "mailRevisionRequest", map: "body" }
44079
+ ]
44080
+ }
44081
+ ]);
44082
+ return (options?.client ?? client).delete({
44083
+ responseStyle: "data",
44084
+ security: [{ scheme: "bearer", type: "http" }],
44085
+ url: "/v1/organizations/{organization_id}/mail-domains/{mail_domain_id}/dns-authorization",
44086
+ ...options,
44087
+ ...params,
44088
+ headers: {
44089
+ "Content-Type": "application/json",
44090
+ ...options?.headers,
44091
+ ...params.headers
44092
+ }
44093
+ });
44094
+ };
44095
+ var getWorkspaceMailDomainDnsAuthorization = (parameters, options) => {
44096
+ const params = buildClientParams([parameters], [
44097
+ {
44098
+ args: [
44099
+ { in: "headers", key: "X-Request-Id" },
44100
+ { in: "path", key: "organization_id" },
44101
+ { in: "path", key: "mail_domain_id" }
44102
+ ]
44103
+ }
44104
+ ]);
44105
+ return (options?.client ?? client).get({
44106
+ responseStyle: "data",
44107
+ security: [{ scheme: "bearer", type: "http" }],
44108
+ url: "/v1/organizations/{organization_id}/mail-domains/{mail_domain_id}/dns-authorization",
44109
+ ...options,
44110
+ ...params
44111
+ });
44112
+ };
44113
+ var authorizeWorkspaceMailDomainDns = (parameters, options) => {
44114
+ const params = buildClientParams([parameters], [
44115
+ {
44116
+ args: [
44117
+ { in: "headers", key: "X-Request-Id" },
44118
+ { in: "headers", key: "Idempotency-Key" },
44119
+ { in: "path", key: "organization_id" },
44120
+ { in: "path", key: "mail_domain_id" },
44121
+ { key: "sharedMailDnsAuthorizationRequest", map: "body" }
44122
+ ]
44123
+ }
44124
+ ]);
44125
+ return (options?.client ?? client).post({
44126
+ responseStyle: "data",
44127
+ security: [{ scheme: "bearer", type: "http" }],
44128
+ url: "/v1/organizations/{organization_id}/mail-domains/{mail_domain_id}/dns-authorization",
44129
+ ...options,
44130
+ ...params,
44131
+ headers: {
44132
+ "Content-Type": "application/json",
44133
+ ...options?.headers,
44134
+ ...params.headers
44135
+ }
44136
+ });
44137
+ };
44138
+ var detachProjectMailDomainBinding = (parameters, options) => {
44139
+ const params = buildClientParams([parameters], [
44140
+ {
44141
+ args: [
44142
+ { in: "headers", key: "X-Request-Id" },
44143
+ { in: "headers", key: "Idempotency-Key" },
44144
+ { in: "path", key: "project_id" },
44145
+ { in: "path", key: "environment_id" },
44146
+ { key: "mailRevisionRequest", map: "body" }
44147
+ ]
44148
+ }
44149
+ ]);
44150
+ return (options?.client ?? client).delete({
44151
+ responseStyle: "data",
44152
+ security: [{ scheme: "bearer", type: "http" }],
44153
+ url: "/v1/projects/{project_id}/environments/{environment_id}/mail-domain-binding",
44154
+ ...options,
44155
+ ...params,
44156
+ headers: {
44157
+ "Content-Type": "application/json",
44158
+ ...options?.headers,
44159
+ ...params.headers
44160
+ }
44161
+ });
44162
+ };
44163
+ var getProjectMailDomainBinding = (parameters, options) => {
44164
+ const params = buildClientParams([parameters], [
44165
+ {
44166
+ args: [
44167
+ { in: "headers", key: "X-Request-Id" },
44168
+ { in: "path", key: "project_id" },
44169
+ { in: "path", key: "environment_id" }
44170
+ ]
44171
+ }
44172
+ ]);
44173
+ return (options?.client ?? client).get({
44174
+ responseStyle: "data",
44175
+ security: [{ scheme: "bearer", type: "http" }],
44176
+ url: "/v1/projects/{project_id}/environments/{environment_id}/mail-domain-binding",
44177
+ ...options,
44178
+ ...params
44179
+ });
44180
+ };
44181
+ var putProjectMailDomainBinding = (parameters, options) => {
44182
+ const params = buildClientParams([parameters], [
44183
+ {
44184
+ args: [
44185
+ { in: "headers", key: "X-Request-Id" },
44186
+ { in: "headers", key: "Idempotency-Key" },
44187
+ { in: "path", key: "project_id" },
44188
+ { in: "path", key: "environment_id" },
44189
+ { key: "projectMailDomainBindingRequest", map: "body" }
44190
+ ]
44191
+ }
44192
+ ]);
44193
+ return (options?.client ?? client).put({
44194
+ responseStyle: "data",
44195
+ security: [{ scheme: "bearer", type: "http" }],
44196
+ url: "/v1/projects/{project_id}/environments/{environment_id}/mail-domain-binding",
44197
+ ...options,
44198
+ ...params,
44199
+ headers: {
44200
+ "Content-Type": "application/json",
44201
+ ...options?.headers,
44202
+ ...params.headers
44203
+ }
44204
+ });
44205
+ };
44206
+ var revokeApplicationDomainIdentity = (parameters, options) => {
44207
+ const params = buildClientParams([parameters], [
44208
+ {
44209
+ args: [
44210
+ { in: "headers", key: "X-Request-Id" },
44211
+ { in: "headers", key: "Idempotency-Key" },
44212
+ { in: "path", key: "project_id" },
44213
+ { key: "mailRevisionRequest", map: "body" }
44214
+ ]
44215
+ }
44216
+ ]);
44217
+ return (options?.client ?? client).delete({
44218
+ responseStyle: "data",
44219
+ security: [{ scheme: "bearer", type: "http" }],
44220
+ url: "/v1/projects/{project_id}/application-domain-identity",
44221
+ ...options,
44222
+ ...params,
44223
+ headers: {
44224
+ "Content-Type": "application/json",
44225
+ ...options?.headers,
44226
+ ...params.headers
44227
+ }
44228
+ });
44229
+ };
44230
+ var getApplicationDomainIdentity = (parameters, options) => {
44231
+ const params = buildClientParams([parameters], [
44232
+ {
44233
+ args: [
44234
+ { in: "headers", key: "X-Request-Id" },
44235
+ { in: "path", key: "project_id" }
44236
+ ]
44237
+ }
44238
+ ]);
44239
+ return (options?.client ?? client).get({
44240
+ responseStyle: "data",
44241
+ security: [{ scheme: "bearer", type: "http" }],
44242
+ url: "/v1/projects/{project_id}/application-domain-identity",
44243
+ ...options,
44244
+ ...params
44245
+ });
44246
+ };
44247
+ var declareApplicationDomainIdentity = (parameters, options) => {
44248
+ const params = buildClientParams([parameters], [
44249
+ {
44250
+ args: [
44251
+ { in: "headers", key: "X-Request-Id" },
44252
+ { in: "headers", key: "Idempotency-Key" },
44253
+ { in: "path", key: "project_id" },
44254
+ { key: "applicationDomainIdentityRequest", map: "body" }
44255
+ ]
44256
+ }
44257
+ ]);
44258
+ return (options?.client ?? client).put({
44259
+ responseStyle: "data",
44260
+ security: [{ scheme: "bearer", type: "http" }],
44261
+ url: "/v1/projects/{project_id}/application-domain-identity",
44262
+ ...options,
44263
+ ...params,
44264
+ headers: {
44265
+ "Content-Type": "application/json",
44266
+ ...options?.headers,
44267
+ ...params.headers
44268
+ }
44269
+ });
44270
+ };
44271
+ var verifyApplicationDomainIdentity = (parameters, options) => {
44272
+ const params = buildClientParams([parameters], [
44273
+ {
44274
+ args: [
44275
+ { in: "headers", key: "X-Request-Id" },
44276
+ { in: "headers", key: "Idempotency-Key" },
44277
+ { in: "path", key: "project_id" },
44278
+ { key: "mailRevisionRequest", map: "body" }
44279
+ ]
44280
+ }
44281
+ ]);
44282
+ return (options?.client ?? client).post({
44283
+ responseStyle: "data",
44284
+ security: [{ scheme: "bearer", type: "http" }],
44285
+ url: "/v1/projects/{project_id}/application-domain-identity/verify",
44286
+ ...options,
44287
+ ...params,
44288
+ headers: {
44289
+ "Content-Type": "application/json",
44290
+ ...options?.headers,
44291
+ ...params.headers
44292
+ }
44293
+ });
44294
+ };
44295
+ var revokeApplicationDomainIdentityDnsAuthorization = (parameters, options) => {
44296
+ const params = buildClientParams([parameters], [
44297
+ {
44298
+ args: [
44299
+ { in: "headers", key: "X-Request-Id" },
44300
+ { in: "headers", key: "Idempotency-Key" },
44301
+ { in: "path", key: "project_id" },
44302
+ { key: "mailRevisionRequest", map: "body" }
44303
+ ]
44304
+ }
44305
+ ]);
44306
+ return (options?.client ?? client).delete({
44307
+ responseStyle: "data",
44308
+ security: [{ scheme: "bearer", type: "http" }],
44309
+ url: "/v1/projects/{project_id}/application-domain-identity/dns-authorization",
44310
+ ...options,
44311
+ ...params,
44312
+ headers: {
44313
+ "Content-Type": "application/json",
44314
+ ...options?.headers,
44315
+ ...params.headers
44316
+ }
44317
+ });
44318
+ };
44319
+ var getApplicationDomainIdentityDnsAuthorization = (parameters, options) => {
44320
+ const params = buildClientParams([parameters], [
44321
+ {
44322
+ args: [
44323
+ { in: "headers", key: "X-Request-Id" },
44324
+ { in: "path", key: "project_id" }
44325
+ ]
44326
+ }
44327
+ ]);
44328
+ return (options?.client ?? client).get({
44329
+ responseStyle: "data",
44330
+ security: [{ scheme: "bearer", type: "http" }],
44331
+ url: "/v1/projects/{project_id}/application-domain-identity/dns-authorization",
44332
+ ...options,
44333
+ ...params
44334
+ });
44335
+ };
44336
+ var authorizeApplicationDomainIdentityDns = (parameters, options) => {
44337
+ const params = buildClientParams([parameters], [
44338
+ {
44339
+ args: [
44340
+ { in: "headers", key: "X-Request-Id" },
44341
+ { in: "headers", key: "Idempotency-Key" },
44342
+ { in: "path", key: "project_id" },
44343
+ { key: "sharedMailDnsAuthorizationRequest", map: "body" }
44344
+ ]
44345
+ }
44346
+ ]);
44347
+ return (options?.client ?? client).post({
44348
+ responseStyle: "data",
44349
+ security: [{ scheme: "bearer", type: "http" }],
44350
+ url: "/v1/projects/{project_id}/application-domain-identity/dns-authorization",
44351
+ ...options,
44352
+ ...params,
44353
+ headers: {
44354
+ "Content-Type": "application/json",
44355
+ ...options?.headers,
44356
+ ...params.headers
44357
+ }
44358
+ });
44359
+ };
43766
44360
  var getAccountProfile = (options) => (options?.client ?? client).get({
43767
44361
  responseStyle: "data",
43768
44362
  security: [{ scheme: "bearer", type: "http" }],
@@ -45917,6 +46511,320 @@ async function executeManagedMail(client2, input) {
45917
46511
  return result;
45918
46512
  }
45919
46513
 
46514
+ // packages/sdk-ts/dist/generated/shared-mail-response.js
46515
+ var ULID4 = /^[0-7][0-9A-HJKMNP-TV-Z]{25}$/u;
46516
+ var HOST = /^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/u;
46517
+ function assertSharedMailResponse(value, input) {
46518
+ const v = object3(value);
46519
+ if (input.action === "domains_list") {
46520
+ exact5(v, ["items"]);
46521
+ if (!Array.isArray(v["items"]) || v["items"].length > 100)
46522
+ invalid6();
46523
+ for (const item of v["items"])
46524
+ assertSharedMailResponse(item, {
46525
+ ...input,
46526
+ action: "domain_get",
46527
+ mailDomainId: String(object3(item)["domain_id"])
46528
+ });
46529
+ return;
46530
+ }
46531
+ if (["domain_get", "domain_create", "domain_retire"].includes(input.action)) {
46532
+ exact5(v, [
46533
+ "domain_id",
46534
+ "organization_id",
46535
+ "domain",
46536
+ "registrable_domain",
46537
+ "revision",
46538
+ "status",
46539
+ "sending",
46540
+ "receiving",
46541
+ "configured_at",
46542
+ "observed_at",
46543
+ "dns_records",
46544
+ "bindings_count"
46545
+ ]);
46546
+ id3(v["domain_id"]);
46547
+ id3(v["organization_id"]);
46548
+ if (!("organizationId" in input) || v["organization_id"] !== input.organizationId || "mailDomainId" in input && v["domain_id"] !== input.mailDomainId)
46549
+ invalid6();
46550
+ host(v["domain"]);
46551
+ host(v["registrable_domain"]);
46552
+ positive(v["revision"]);
46553
+ member(v["status"], ["active", "retiring", "retired"]);
46554
+ for (const k of ["sending", "receiving"])
46555
+ member(v[k], ["disabled", "pending", "ready", "failed"]);
46556
+ time2(v["configured_at"]);
46557
+ if (v["observed_at"] !== null)
46558
+ time2(v["observed_at"]);
46559
+ if (!Number.isSafeInteger(v["bindings_count"]) || Number(v["bindings_count"]) < 0)
46560
+ invalid6();
46561
+ if (!Array.isArray(v["dns_records"]))
46562
+ invalid6();
46563
+ for (const entry of v["dns_records"]) {
46564
+ const r = object3(entry);
46565
+ exact5(r, ["type", "name", "value", "purpose", "status"], ["priority"]);
46566
+ member(r["type"], ["TXT", "MX", "CNAME"]);
46567
+ for (const k of ["name", "value", "purpose", "status"])
46568
+ if (typeof r[k] !== "string" || /[\r\n\0]/u.test(r[k]))
46569
+ invalid6();
46570
+ if (r["priority"] !== void 0 && (!Number.isSafeInteger(r["priority"]) || Number(r["priority"]) < 0 || Number(r["priority"]) > 65535))
46571
+ invalid6();
46572
+ if (r["type"] === "MX" && r["priority"] === void 0)
46573
+ invalid6();
46574
+ }
46575
+ return;
46576
+ }
46577
+ if (["binding_get", "binding_set", "binding_detach"].includes(input.action)) {
46578
+ exact5(v, [
46579
+ "mail_domain_id",
46580
+ "organization_id",
46581
+ "project_id",
46582
+ "environment_id",
46583
+ "revision",
46584
+ "sending",
46585
+ "sender_addresses",
46586
+ "default_from",
46587
+ "default_reply_to",
46588
+ "legacy",
46589
+ "status",
46590
+ "application_domain_identity"
46591
+ ]);
46592
+ for (const k of ["mail_domain_id", "organization_id", "project_id", "environment_id"])
46593
+ id3(v[k]);
46594
+ 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)
46595
+ invalid6();
46596
+ positive(v["revision"]);
46597
+ for (const k of ["sending", "legacy"])
46598
+ if (typeof v[k] !== "boolean")
46599
+ invalid6();
46600
+ member(v["status"], ["active", "detached", "suspended"]);
46601
+ if (!Array.isArray(v["sender_addresses"]) || v["sender_addresses"].length > 32 || new Set(v["sender_addresses"]).size !== v["sender_addresses"].length)
46602
+ invalid6();
46603
+ for (const a of v["sender_addresses"])
46604
+ mailbox(a);
46605
+ for (const k of ["default_from", "default_reply_to"])
46606
+ if (v[k] !== null)
46607
+ mailbox(v[k]);
46608
+ if (!v["legacy"] && (!v["sender_addresses"].includes(v["default_from"]) || v["sender_addresses"].length === 0))
46609
+ invalid6();
46610
+ if (v["application_domain_identity"] !== null) {
46611
+ const identity = object3(v["application_domain_identity"]);
46612
+ exact5(identity, ["hostname", "registrable_domain", "revision", "status"]);
46613
+ host(identity["hostname"]);
46614
+ host(identity["registrable_domain"]);
46615
+ positive(identity["revision"]);
46616
+ member(identity["status"], ["pending", "verified", "expired", "revoked"]);
46617
+ }
46618
+ return;
46619
+ }
46620
+ if (["identity_get", "identity_declare", "identity_verify", "identity_revoke"].includes(input.action)) {
46621
+ exact5(v, [
46622
+ "organization_id",
46623
+ "project_id",
46624
+ "hostname",
46625
+ "registrable_domain",
46626
+ "status",
46627
+ "revision",
46628
+ "challenge",
46629
+ "verified_at",
46630
+ "expires_at"
46631
+ ]);
46632
+ id3(v["organization_id"]);
46633
+ id3(v["project_id"]);
46634
+ if (!("projectId" in input) || v["project_id"] !== input.projectId)
46635
+ invalid6();
46636
+ host(v["hostname"]);
46637
+ host(v["registrable_domain"]);
46638
+ positive(v["revision"]);
46639
+ member(v["status"], ["pending", "verified", "expired", "revoked"]);
46640
+ const challenge = object3(v["challenge"]);
46641
+ exact5(challenge, ["type", "name", "value"]);
46642
+ 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"]))
46643
+ invalid6();
46644
+ if (v["verified_at"] !== null)
46645
+ time2(v["verified_at"]);
46646
+ time2(v["expires_at"]);
46647
+ return;
46648
+ }
46649
+ if (input.action === "domain_dns_authorize" || input.action === "identity_authorize") {
46650
+ exact5(v, ["authorization_id", "authorization_url", "expires_at"]);
46651
+ id3(v["authorization_id"]);
46652
+ time2(v["expires_at"]);
46653
+ if (typeof v["authorization_url"] !== "string" || !/^https:\/\/dash\.cloudflare\.com\/oauth2\/auth\?/u.test(v["authorization_url"]))
46654
+ invalid6();
46655
+ return;
46656
+ }
46657
+ exact5(v, ["status", "zone", "scopes", "expires_at"]);
46658
+ member(v["status"], ["not_authorized", "pending", "authorized", "expired", "revoked"]);
46659
+ 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"))
46660
+ invalid6();
46661
+ if (v["zone"] !== null)
46662
+ host(v["zone"]);
46663
+ if (v["expires_at"] !== null)
46664
+ time2(v["expires_at"]);
46665
+ if (v["status"] === "not_authorized" && (v["zone"] !== null || v["expires_at"] !== null || v["scopes"].length))
46666
+ invalid6();
46667
+ }
46668
+ function object3(v) {
46669
+ if (v === null || typeof v !== "object" || Array.isArray(v))
46670
+ invalid6();
46671
+ return v;
46672
+ }
46673
+ function exact5(v, required, optional = []) {
46674
+ if (required.some((k) => !(k in v)) || Object.keys(v).some((k) => !required.includes(k) && !optional.includes(k)))
46675
+ invalid6();
46676
+ }
46677
+ function member(v, values) {
46678
+ if (typeof v !== "string" || !values.includes(v))
46679
+ invalid6();
46680
+ }
46681
+ function id3(v) {
46682
+ if (typeof v !== "string" || !ULID4.test(v))
46683
+ invalid6();
46684
+ }
46685
+ function host(v) {
46686
+ if (typeof v !== "string" || !HOST.test(v))
46687
+ invalid6();
46688
+ }
46689
+ function positive(v) {
46690
+ if (!Number.isSafeInteger(v) || Number(v) < 1)
46691
+ invalid6();
46692
+ }
46693
+ function time2(v) {
46694
+ if (typeof v !== "string" || !Number.isFinite(Date.parse(v)) || new Date(v).toISOString() !== v)
46695
+ invalid6();
46696
+ }
46697
+ function mailbox(v) {
46698
+ 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(".@"))
46699
+ invalid6();
46700
+ }
46701
+ function invalid6() {
46702
+ throw new TypeError("Shared mail response contract invalid");
46703
+ }
46704
+
46705
+ // packages/sdk-ts/dist/shared-mail.js
46706
+ async function executeSharedMail(client2, input) {
46707
+ const options = { client: client2 };
46708
+ let result;
46709
+ switch (input.action) {
46710
+ case "domains_list":
46711
+ result = await listWorkspaceMailDomains({ organization_id: input.organizationId }, options);
46712
+ break;
46713
+ case "domain_create":
46714
+ result = await createWorkspaceMailDomain({
46715
+ organization_id: input.organizationId,
46716
+ "Idempotency-Key": input.idempotencyKey,
46717
+ createWorkspaceMailDomainRequest: { domain: input.domain, sending: input.sending }
46718
+ }, options);
46719
+ break;
46720
+ case "domain_get":
46721
+ result = await getWorkspaceMailDomain({ organization_id: input.organizationId, mail_domain_id: input.mailDomainId }, options);
46722
+ break;
46723
+ case "domain_retire":
46724
+ result = await retireWorkspaceMailDomain({
46725
+ organization_id: input.organizationId,
46726
+ mail_domain_id: input.mailDomainId,
46727
+ "Idempotency-Key": input.idempotencyKey,
46728
+ mailRevisionRequest: { expected_revision: input.expectedRevision }
46729
+ }, options);
46730
+ break;
46731
+ case "domain_dns_authorize":
46732
+ result = await authorizeWorkspaceMailDomainDns({
46733
+ organization_id: input.organizationId,
46734
+ mail_domain_id: input.mailDomainId,
46735
+ "Idempotency-Key": input.idempotencyKey,
46736
+ sharedMailDnsAuthorizationRequest: {
46737
+ expected_revision: input.expectedRevision,
46738
+ zone: input.zone
46739
+ }
46740
+ }, options);
46741
+ break;
46742
+ case "domain_dns_revoke":
46743
+ result = await revokeWorkspaceMailDomainDnsAuthorization({
46744
+ organization_id: input.organizationId,
46745
+ mail_domain_id: input.mailDomainId,
46746
+ "Idempotency-Key": input.idempotencyKey,
46747
+ mailRevisionRequest: { expected_revision: input.expectedRevision }
46748
+ }, options);
46749
+ break;
46750
+ case "identity_authorization_revoke":
46751
+ result = await revokeApplicationDomainIdentityDnsAuthorization({
46752
+ project_id: input.projectId,
46753
+ "Idempotency-Key": input.idempotencyKey,
46754
+ mailRevisionRequest: { expected_revision: input.expectedRevision }
46755
+ }, options);
46756
+ break;
46757
+ case "domain_dns_status":
46758
+ result = await getWorkspaceMailDomainDnsAuthorization({ organization_id: input.organizationId, mail_domain_id: input.mailDomainId }, options);
46759
+ break;
46760
+ case "binding_get":
46761
+ result = await getProjectMailDomainBinding({ project_id: input.projectId, environment_id: input.environmentId }, options);
46762
+ break;
46763
+ case "binding_set":
46764
+ result = await putProjectMailDomainBinding({
46765
+ project_id: input.projectId,
46766
+ environment_id: input.environmentId,
46767
+ "Idempotency-Key": input.idempotencyKey,
46768
+ projectMailDomainBindingRequest: {
46769
+ mail_domain_id: input.mailDomainId,
46770
+ sending: input.sending,
46771
+ sender_addresses: [...input.senderAddresses],
46772
+ default_from: input.defaultFrom,
46773
+ default_reply_to: input.defaultReplyTo,
46774
+ expected_revision: input.expectedRevision
46775
+ }
46776
+ }, options);
46777
+ break;
46778
+ case "binding_detach":
46779
+ result = await detachProjectMailDomainBinding({
46780
+ project_id: input.projectId,
46781
+ environment_id: input.environmentId,
46782
+ "Idempotency-Key": input.idempotencyKey,
46783
+ mailRevisionRequest: { expected_revision: input.expectedRevision }
46784
+ }, options);
46785
+ break;
46786
+ case "identity_get":
46787
+ result = await getApplicationDomainIdentity({ project_id: input.projectId }, options);
46788
+ break;
46789
+ case "identity_declare":
46790
+ result = await declareApplicationDomainIdentity({
46791
+ project_id: input.projectId,
46792
+ "Idempotency-Key": input.idempotencyKey,
46793
+ applicationDomainIdentityRequest: { hostname: input.hostname }
46794
+ }, options);
46795
+ break;
46796
+ case "identity_verify":
46797
+ result = await verifyApplicationDomainIdentity({
46798
+ project_id: input.projectId,
46799
+ "Idempotency-Key": input.idempotencyKey,
46800
+ mailRevisionRequest: { expected_revision: input.expectedRevision }
46801
+ }, options);
46802
+ break;
46803
+ case "identity_revoke":
46804
+ result = await revokeApplicationDomainIdentity({
46805
+ project_id: input.projectId,
46806
+ "Idempotency-Key": input.idempotencyKey,
46807
+ mailRevisionRequest: { expected_revision: input.expectedRevision }
46808
+ }, options);
46809
+ break;
46810
+ case "identity_authorize":
46811
+ result = await authorizeApplicationDomainIdentityDns({
46812
+ project_id: input.projectId,
46813
+ "Idempotency-Key": input.idempotencyKey,
46814
+ sharedMailDnsAuthorizationRequest: {
46815
+ expected_revision: input.expectedRevision,
46816
+ zone: input.zone
46817
+ }
46818
+ }, options);
46819
+ break;
46820
+ case "identity_authorization_status":
46821
+ result = await getApplicationDomainIdentityDnsAuthorization({ project_id: input.projectId }, options);
46822
+ break;
46823
+ }
46824
+ assertSharedMailResponse(result, input);
46825
+ return result;
46826
+ }
46827
+
45920
46828
  // apps/product-cli/dist/source-managed-client.js
45921
46829
  var GeneratedSdkManagedSourceApi = class {
45922
46830
  client;
@@ -46456,6 +47364,9 @@ var GeneratedSdkProductApi = class {
46456
47364
  secret_name: input.name
46457
47365
  }, { client: this.#client });
46458
47366
  }
47367
+ sharedMail(input) {
47368
+ return executeSharedMail(this.#client, input);
47369
+ }
46459
47370
  managedMail(input) {
46460
47371
  return executeManagedMail(this.#client, input);
46461
47372
  }
@@ -47846,10 +48757,10 @@ function callOptions(tokens, closing, name) {
47846
48757
  return calls;
47847
48758
  }
47848
48759
  function nestedPropertyValue(tokens, closing, start, end, outer, inner) {
47849
- const object3 = directProperty(tokens, closing, start, end, outer);
47850
- if (object3?.value !== "{")
48760
+ const object4 = directProperty(tokens, closing, start, end, outer);
48761
+ if (object4?.value !== "{")
47851
48762
  return null;
47852
- return directProperty(tokens, closing, object3.start, object3.end, inner)?.value ?? null;
48763
+ return directProperty(tokens, closing, object4.start, object4.end, inner)?.value ?? null;
47853
48764
  }
47854
48765
  function directProperty(tokens, closing, start, end, name) {
47855
48766
  let depth = 0;
@@ -47899,8 +48810,8 @@ function astroConfigFindings(text, path2, mode) {
47899
48810
  return [lexed.finding];
47900
48811
  const tokens = lexed.tokens;
47901
48812
  const hasPropertyKey = (items, name) => items.some((token, index) => token.value === name && items[index + 1]?.value === ":");
47902
- const invalid6 = 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"));
47903
- return invalid6 ? [diagnostic({ code: "astro_config_unsupported", path: path2 })] : [];
48813
+ 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"));
48814
+ return invalid7 ? [diagnostic({ code: "astro_config_unsupported", path: path2 })] : [];
47904
48815
  }
47905
48816
 
47906
48817
  // packages/contracts/dist/database-migration-errors.js
@@ -48572,12 +49483,12 @@ function migrationFilenameBlockers(context, provider) {
48572
49483
  return [];
48573
49484
  const root = context.config?.database?.migrations ?? "postgres/migrations";
48574
49485
  const prefix = `${root}/`;
48575
- const invalid6 = 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));
48576
- return invalid6 === void 0 ? [] : [
49486
+ 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));
49487
+ return invalid7 === void 0 ? [] : [
48577
49488
  {
48578
49489
  code: "migration_filename_noncanonical",
48579
- path: repositoryPath(context.applicationRoot, `${prefix}${invalid6}`),
48580
- message: `Migration file '${invalid6}' 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.`
49490
+ path: repositoryPath(context.applicationRoot, `${prefix}${invalid7}`),
49491
+ 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
49492
  }
48582
49493
  ];
48583
49494
  }
@@ -49521,11 +50432,15 @@ var readTokenIdentity = async (input) => {
49521
50432
  var commandOrganizationId = (command) => {
49522
50433
  if (command.kind === "organization-use" || command.kind === "login")
49523
50434
  return void 0;
50435
+ if (command.kind === "shared-mail" && "organizationId" in command.request)
50436
+ return command.request.organizationId;
49524
50437
  if (command.kind === "feedback-submit")
49525
50438
  return command.report.organization_id;
49526
50439
  return "organizationId" in command && typeof command.organizationId === "string" ? command.organizationId : void 0;
49527
50440
  };
49528
50441
  var commandProjectId = (command) => {
50442
+ if (command.kind === "shared-mail")
50443
+ return "projectId" in command.request ? command.request.projectId : void 0;
49529
50444
  if (command.kind === "managed-mail")
49530
50445
  return command.request.projectId;
49531
50446
  return "projectId" in command && typeof command.projectId === "string" ? command.projectId : void 0;