@wix/himalaya-cli 0.1955.0 → 0.1957.0

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +572 -373
  2. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -16484,7 +16484,8 @@ var init_tier5_dir = __esm({
16484
16484
  });
16485
16485
 
16486
16486
  // src/tier5-typecheck.ts
16487
- import { existsSync as existsSync14, readFileSync as readFileSync15 } from "node:fs";
16487
+ import { createHash as createHash8 } from "node:crypto";
16488
+ import { existsSync as existsSync14, readFileSync as readFileSync15, realpathSync as realpathSync5 } from "node:fs";
16488
16489
  import { relative as relative5, resolve as resolve13, sep as sep8 } from "node:path";
16489
16490
  import { pathToFileURL as pathToFileURL2 } from "node:url";
16490
16491
  async function loadTypeScript() {
@@ -16576,6 +16577,95 @@ function confinedHost(ts42, contentDir2, options2) {
16576
16577
  }
16577
16578
  return host;
16578
16579
  }
16580
+ function contentDirSpellings(contentDir2) {
16581
+ let real = contentDir2;
16582
+ try {
16583
+ real = realpathSync5.native(contentDir2);
16584
+ } catch {
16585
+ }
16586
+ const spellings = /* @__PURE__ */ new Map();
16587
+ for (const [dir, token] of [[contentDir2, CONTENT_DIR_TOKEN], [real, REAL_CONTENT_DIR_TOKEN]]) {
16588
+ spellings.set(dir, spellings.get(dir) ?? token);
16589
+ spellings.set(dir.split(sep8).join("/"), spellings.get(dir.split(sep8).join("/")) ?? token);
16590
+ }
16591
+ return [...spellings].sort((a3, b3) => b3[0].length - a3[0].length);
16592
+ }
16593
+ function tokenized(spellings, value2) {
16594
+ for (const [dir, token] of spellings) value2 = value2.split(dir).join(token);
16595
+ return value2;
16596
+ }
16597
+ function untokenized(spellings, value2) {
16598
+ for (const [dir, token] of spellings) if (!dir.includes("\\")) value2 = value2.split(token).join(dir);
16599
+ return value2;
16600
+ }
16601
+ function recordingHost(base2, spellings) {
16602
+ const h2 = createHash8("sha256");
16603
+ const note = (op, arg2, answer) => {
16604
+ h2.update(`${op}\0${tokenized(spellings, arg2)}\0${tokenized(spellings, answer)}
16605
+ `);
16606
+ };
16607
+ const host = { ...base2 };
16608
+ host.getSourceFile = (fileName, ...rest) => {
16609
+ const file2 = base2.getSourceFile(fileName, ...rest);
16610
+ note("getSourceFile", fileName, file2 ? digest(file2.text) : "undefined");
16611
+ return file2;
16612
+ };
16613
+ host.fileExists = (fileName) => {
16614
+ const exists2 = base2.fileExists(fileName);
16615
+ note("fileExists", fileName, String(exists2));
16616
+ return exists2;
16617
+ };
16618
+ host.readFile = (fileName) => {
16619
+ const text32 = base2.readFile(fileName);
16620
+ note("readFile", fileName, text32 === void 0 ? "undefined" : digest(text32));
16621
+ return text32;
16622
+ };
16623
+ host.getCurrentDirectory = () => {
16624
+ const cwd = base2.getCurrentDirectory();
16625
+ note("getCurrentDirectory", "", cwd);
16626
+ return cwd;
16627
+ };
16628
+ if (base2.directoryExists) {
16629
+ host.directoryExists = (dir) => {
16630
+ const exists2 = base2.directoryExists(dir);
16631
+ note("directoryExists", dir, String(exists2));
16632
+ return exists2;
16633
+ };
16634
+ }
16635
+ if (base2.realpath) {
16636
+ host.realpath = (path2) => {
16637
+ const real = base2.realpath(path2);
16638
+ note("realpath", path2, real);
16639
+ return real;
16640
+ };
16641
+ }
16642
+ if (base2.getDirectories) {
16643
+ host.getDirectories = (dir) => {
16644
+ const dirs = base2.getDirectories(dir);
16645
+ note("getDirectories", dir, dirs.join("\0"));
16646
+ return dirs;
16647
+ };
16648
+ }
16649
+ if (base2.readDirectory) {
16650
+ host.readDirectory = (dir, extensions, exclude, include, depth) => {
16651
+ const found = base2.readDirectory(dir, extensions, exclude, include, depth);
16652
+ note("readDirectory", JSON.stringify([dir, extensions, exclude, include, depth]), found.join("\0"));
16653
+ return found;
16654
+ };
16655
+ }
16656
+ if (base2.getEnvironmentVariable) {
16657
+ host.getEnvironmentVariable = (name) => {
16658
+ const value2 = base2.getEnvironmentVariable(name);
16659
+ note("getEnvironmentVariable", name, value2 ?? "undefined");
16660
+ return value2;
16661
+ };
16662
+ }
16663
+ return { host, answers: () => h2.digest("hex") };
16664
+ }
16665
+ function programKey(ts42, spellings, rootNames, options2, answers2) {
16666
+ const opts = JSON.stringify(options2, (_key, value2) => typeof value2 === "string" ? tokenized(spellings, value2) : value2);
16667
+ return digest(["tier5-typecheck-v1", ts42.version, opts, ...rootNames.map((name) => tokenized(spellings, name)), answers2()].join("\n"));
16668
+ }
16579
16669
  async function typecheckContentWorkers(contentDir2, options2) {
16580
16670
  if (!existsSync14(resolve13(contentDir2, "tier5-src"))) return [];
16581
16671
  const ts42 = await compiler2();
@@ -16594,19 +16684,43 @@ async function typecheckContentWorkers(contentDir2, options2) {
16594
16684
  };
16595
16685
  const parsed = ts42.parseJsonConfigFileContent(config, ts42.sys, contentDir2);
16596
16686
  if (parsed.fileNames.length === 0) return [];
16687
+ const contentIssues = (diagnostics) => diagnostics.filter((diagnostic) => diagnostic.category === ts42.DiagnosticCategory.Error && belongsToContentWorkers(contentDir2, diagnostic)).map((diagnostic) => toIssue(ts42, contentDir2, diagnostic));
16688
+ const host = confinedHost(ts42, contentDir2, parsed.options) ?? ts42.createCompilerHost(parsed.options);
16689
+ const spellings = contentDirSpellings(contentDir2);
16690
+ const recorder = recordingHost(host, spellings);
16597
16691
  const program = ts42.createProgram({
16598
16692
  rootNames: parsed.fileNames,
16599
16693
  options: parsed.options,
16600
- host: confinedHost(ts42, contentDir2, parsed.options)
16694
+ host: recorder.host
16601
16695
  });
16602
- return [...parsed.errors, ...ts42.getPreEmitDiagnostics(program)].filter((diagnostic) => diagnostic.category === ts42.DiagnosticCategory.Error && belongsToContentWorkers(contentDir2, diagnostic)).map((diagnostic) => toIssue(ts42, contentDir2, diagnostic));
16696
+ const key4 = programKey(ts42, spellings, parsed.fileNames, parsed.options, recorder.answers);
16697
+ let checked = checkedPrograms.get(key4);
16698
+ if (checked) {
16699
+ checkedPrograms.delete(key4);
16700
+ checkedPrograms.set(key4, checked);
16701
+ } else {
16702
+ checkerRuns++;
16703
+ checked = contentIssues(ts42.getPreEmitDiagnostics(program)).map((issue3) => ({ ...issue3, message: tokenized(spellings, issue3.message) }));
16704
+ checkedPrograms.set(key4, checked);
16705
+ if (checkedPrograms.size > CHECKED_PROGRAMS_MAX) checkedPrograms.delete(checkedPrograms.keys().next().value);
16706
+ }
16707
+ return [
16708
+ ...contentIssues(parsed.errors),
16709
+ ...checked.map((issue3) => ({ ...issue3, message: untokenized(spellings, issue3.message) }))
16710
+ ];
16603
16711
  }
16604
- var compilerPromise;
16712
+ var compilerPromise, CONTENT_DIR_TOKEN, REAL_CONTENT_DIR_TOKEN, CHECKED_PROGRAMS_MAX, checkedPrograms, checkerRuns, digest;
16605
16713
  var init_tier5_typecheck = __esm({
16606
16714
  "src/tier5-typecheck.ts"() {
16607
16715
  init_define_HHP_CATALOG();
16608
16716
  init_compiler_options();
16609
16717
  init_build_lib();
16718
+ CONTENT_DIR_TOKEN = "\0himi-content-dir\0";
16719
+ REAL_CONTENT_DIR_TOKEN = "\0himi-content-dir-real\0";
16720
+ CHECKED_PROGRAMS_MAX = 128;
16721
+ checkedPrograms = /* @__PURE__ */ new Map();
16722
+ checkerRuns = 0;
16723
+ digest = (text32) => createHash8("sha256").update(text32).digest("hex");
16610
16724
  }
16611
16725
  });
16612
16726
 
@@ -30958,7 +31072,7 @@ var init_ensure_templates = __esm({
30958
31072
 
30959
31073
  // ../../core/dev-server/tier5-bundles-src/ensure-bundles.mjs
30960
31074
  import { spawnSync as spawnSync4 } from "node:child_process";
30961
- import { createHash as createHash8 } from "node:crypto";
31075
+ import { createHash as createHash9 } from "node:crypto";
30962
31076
  import { existsSync as existsSync18, mkdirSync as mkdirSync11, readdirSync as readdirSync13, readFileSync as readFileSync18, rmSync as rmSync6, writeFileSync as writeFileSync11 } from "node:fs";
30963
31077
  import { dirname as dirname14, relative as relative7, resolve as resolve17 } from "node:path";
30964
31078
  import { fileURLToPath as fileURLToPath12 } from "node:url";
@@ -30973,16 +31087,16 @@ function bundleNames(root) {
30973
31087
  }
30974
31088
  }
30975
31089
  function inputsFingerprint(root, files) {
30976
- const h2 = createHash8("sha256");
31090
+ const h2 = createHash9("sha256");
30977
31091
  h2.update(`bundles\0${bundleNames(root).join(",")}
30978
31092
  `);
30979
31093
  for (const rel2 of [.../* @__PURE__ */ new Set([...files, ...BUILDER_INPUTS])].sort()) {
30980
- let digest2 = "missing";
31094
+ let digest3 = "missing";
30981
31095
  try {
30982
- digest2 = createHash8("sha1").update(readFileSync18(resolve17(root, rel2))).digest("hex");
31096
+ digest3 = createHash9("sha1").update(readFileSync18(resolve17(root, rel2))).digest("hex");
30983
31097
  } catch {
30984
31098
  }
30985
- h2.update(`${rel2}\0${digest2}
31099
+ h2.update(`${rel2}\0${digest3}
30986
31100
  `);
30987
31101
  }
30988
31102
  return h2.digest("hex");
@@ -32641,7 +32755,7 @@ __export(hhp_exports, {
32641
32755
  });
32642
32756
  import { existsSync as existsSync22, readFileSync as readFileSync22, writeFileSync as writeFileSync13, mkdirSync as mkdirSync14, renameSync as renameSync6, rmSync as rmSync8, lstatSync as lstatSync11, readdirSync as readdirSync16 } from "node:fs";
32643
32757
  import { basename as basename8, dirname as dirname18, resolve as resolve22, relative as relative8, sep as sep10, join as join18 } from "node:path";
32644
- import { createHash as createHash9, randomUUID as randomUUID5 } from "node:crypto";
32758
+ import { createHash as createHash10, randomUUID as randomUUID5 } from "node:crypto";
32645
32759
  import ts3 from "typescript";
32646
32760
  function localPath(root, path2, from = join18(root, "hhp.json")) {
32647
32761
  if (/^[a-z]+:|^\/\//i.test(path2)) throw new Error("HHP source dependencies must be local files.");
@@ -32986,7 +33100,7 @@ var init_hhp = __esm({
32986
33100
  END = "// himi:hhp:end";
32987
33101
  RASTER_DIR = "hhp-raster";
32988
33102
  existsExact = (path2) => existsSync22(path2) && readdirSync16(dirname18(path2)).includes(basename8(path2));
32989
- rasterName = (svgName, svg) => `${RASTER_DIR}/${svgName.split("/").join("__")}.${createHash9("sha256").update(svg).digest("hex").slice(0, 12)}.png`;
33103
+ rasterName = (svgName, svg) => `${RASTER_DIR}/${svgName.split("/").join("__")}.${createHash10("sha256").update(svg).digest("hex").slice(0, 12)}.png`;
32990
33104
  RASTER_FILE = /\.svg\.[0-9a-f]{12}\.png$/i;
32991
33105
  }
32992
33106
  });
@@ -35080,9 +35194,9 @@ var init_privacy = __esm({
35080
35194
  });
35081
35195
 
35082
35196
  // ../native-extensions/archive.ts
35083
- import { createHash as createHash10 } from "node:crypto";
35197
+ import { createHash as createHash11 } from "node:crypto";
35084
35198
  function integrityOf(bytes2) {
35085
- return `sha256-${createHash10("sha256").update(bytes2).digest("base64")}`;
35199
+ return `sha256-${createHash11("sha256").update(bytes2).digest("base64")}`;
35086
35200
  }
35087
35201
  var ARCHIVE_FORMAT;
35088
35202
  var init_archive = __esm({
@@ -35785,7 +35899,7 @@ var init_page_method_requires = __esm({
35785
35899
  });
35786
35900
 
35787
35901
  // ../../core/sdk/webview/src/page-worker.ts
35788
- import { createHash as createHash11 } from "node:crypto";
35902
+ import { createHash as createHash12 } from "node:crypto";
35789
35903
  function companionMethods(id, ids2) {
35790
35904
  const entry = PAGE_METHODS[id];
35791
35905
  if (!entry) throw new Error(`no page-callable methods for capability ${JSON.stringify(id)}`);
@@ -35823,7 +35937,7 @@ function companionWorkerSource(capabilities) {
35823
35937
  }
35824
35938
  function companionBundleName(capabilities) {
35825
35939
  const ids2 = [...new Set(capabilities)].sort();
35826
- return `himi-webview-page-${createHash11("sha256").update(ids2.join(",")).digest("hex").slice(0, 10)}`;
35940
+ return `himi-webview-page-${createHash12("sha256").update(ids2.join(",")).digest("hex").slice(0, 10)}`;
35827
35941
  }
35828
35942
  var PAGE_CAPABILITIES, identifier;
35829
35943
  var init_page_worker = __esm({
@@ -43720,7 +43834,7 @@ var init_push_map = __esm({
43720
43834
  });
43721
43835
 
43722
43836
  // ../../core/dev-server/src/app-config.ts
43723
- import { createHash as createHash12 } from "node:crypto";
43837
+ import { createHash as createHash13 } from "node:crypto";
43724
43838
  function servedPushMap(app2) {
43725
43839
  const entries = push_map_default.apps[app2];
43726
43840
  return entries?.map((e2) => ({
@@ -44009,7 +44123,7 @@ function buildAppConfigDocument(req, meta, override, bundleCtx, devNetMocks) {
44009
44123
  const locale = pickLocale(typeof acceptLanguage === "string" ? acceptLanguage : null);
44010
44124
  const config = locale ? translate(JSON.parse(JSON.stringify(baseline)), locale) : baseline;
44011
44125
  const body = JSON.stringify(config);
44012
- const etag = `"${createHash12("sha1").update(`${locale ?? "en"}:${body}`).digest("hex")}"`;
44126
+ const etag = `"${createHash13("sha1").update(`${locale ?? "en"}:${body}`).digest("hex")}"`;
44013
44127
  return { config, body, etag, locale };
44014
44128
  }
44015
44129
  function servedAppNameMatches(requested, served) {
@@ -44272,7 +44386,7 @@ var init_plan_fonts = __esm({
44272
44386
  });
44273
44387
 
44274
44388
  // ../font-bake/face-source.ts
44275
- import { createHash as createHash13 } from "node:crypto";
44389
+ import { createHash as createHash14 } from "node:crypto";
44276
44390
  import { existsSync as existsSync35, mkdirSync as mkdirSync19, readFileSync as readFileSync33, renameSync as renameSync7, rmSync as rmSync10, writeFileSync as writeFileSync16 } from "node:fs";
44277
44391
  import { homedir as homedir3 } from "node:os";
44278
44392
  import { basename as basename10, join as join30 } from "node:path";
@@ -44282,7 +44396,7 @@ function hasVendoredFloor() {
44282
44396
  }
44283
44397
  function faceSource(file2, sha2569) {
44284
44398
  const vendored = join30(VENDORED_DIR, basename10(file2));
44285
- if (existsSync35(vendored) && createHash13("sha256").update(readFileSync33(vendored)).digest("hex") === sha2569) {
44399
+ if (existsSync35(vendored) && createHash14("sha256").update(readFileSync33(vendored)).digest("hex") === sha2569) {
44286
44400
  return vendored;
44287
44401
  }
44288
44402
  const cached3 = join30(CACHE_DIR, sha2569);
@@ -44417,7 +44531,7 @@ var init_face_source = __esm({
44417
44531
  REPO_ROOT4 = fileURLToPath21(new URL("../..", import.meta.url));
44418
44532
  VENDORED_DIR = process.env.HIMI_FONTS_VENDORED_DIR || join30(REPO_ROOT4, "stdlib", "fonts", "vendored", "wix-madefor");
44419
44533
  CACHE_DIR = join30(process.env.XDG_CACHE_HOME || join30(homedir3(), ".cache"), "himi", "fonts");
44420
- sha256Hex3 = (bytes2) => createHash13("sha256").update(bytes2).digest("hex");
44534
+ sha256Hex3 = (bytes2) => createHash14("sha256").update(bytes2).digest("hex");
44421
44535
  RAW = ["https://", "raw.", "githubuser", "content.com"].join("");
44422
44536
  UPSTREAM_DIR = /^(ofl|apache|ufl)\/[a-z0-9_-]+$/;
44423
44537
  FETCH_TIMEOUT_MS = 2e4;
@@ -46316,8 +46430,8 @@ var init_flags = __esm({
46316
46430
 
46317
46431
  // ../../core/ts/src/flags-engine.ts
46318
46432
  function bucket(key4) {
46319
- const digest2 = sha1(key4);
46320
- const n2 = (digest2[0] << 24 | digest2[1] << 16 | digest2[2] << 8 | digest2[3]) >>> 0;
46433
+ const digest3 = sha1(key4);
46434
+ const n2 = (digest3[0] << 24 | digest3[1] << 16 | digest3[2] << 8 | digest3[3]) >>> 0;
46321
46435
  return n2 % 1e4;
46322
46436
  }
46323
46437
  function attrValue(ctx, attribute2) {
@@ -47546,7 +47660,7 @@ __export(wix_member_login_exports, {
47546
47660
  webWixCall: () => webWixCall,
47547
47661
  webWixStream: () => webWixStream
47548
47662
  });
47549
- import { createHash as createHash14, randomBytes } from "node:crypto";
47663
+ import { createHash as createHash15, randomBytes } from "node:crypto";
47550
47664
  function b64url(buf) {
47551
47665
  return buf.toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
47552
47666
  }
@@ -47588,7 +47702,7 @@ function authCodeFrom(url) {
47588
47702
  }
47589
47703
  async function exchangeSessionToken(clientId, redirectUri, visitorToken, sessionToken) {
47590
47704
  const verifier2 = b64url(randomBytes(32));
47591
- const challenge = b64url(createHash14("sha256").update(verifier2).digest());
47705
+ const challenge = b64url(createHash15("sha256").update(verifier2).digest());
47592
47706
  const state = b64url(randomBytes(8));
47593
47707
  const rs2 = await postJson(
47594
47708
  "/_api/redirects-api/v1/redirect-session",
@@ -48691,7 +48805,7 @@ var init_person_session_auth = __esm({
48691
48805
  import { readFileSync as readFileSync36 } from "node:fs";
48692
48806
  import { homedir as homedir5 } from "node:os";
48693
48807
  import { join as pathJoin2 } from "node:path";
48694
- import { createHash as createHash15 } from "node:crypto";
48808
+ import { createHash as createHash16 } from "node:crypto";
48695
48809
  function captureAccountSession(req, opts = {}) {
48696
48810
  const env = opts.env ?? process.env;
48697
48811
  const now = opts.now ?? Date.now();
@@ -48730,7 +48844,7 @@ async function accountPrincipal(cookie, fetchImpl = fetch) {
48730
48844
  const identity = await resolveWixAccounts(cookie, fetchImpl);
48731
48845
  if (!identity.ok) return { ok: false, reason: identity.reason };
48732
48846
  const ids2 = identity.accounts.map((a3) => a3.accountId).sort().join("\n");
48733
- return { ok: true, principal: `acct_${createHash15("sha256").update(ids2).digest("hex").slice(0, 32)}` };
48847
+ return { ok: true, principal: `acct_${createHash16("sha256").update(ids2).digest("hex").slice(0, 32)}` };
48734
48848
  }
48735
48849
  function safeAccountReturn(raw, requestHost, requestProto = "http") {
48736
48850
  if (typeof raw !== "string" || !raw) return "/";
@@ -48842,9 +48956,9 @@ var init_flag_assignments = __esm({
48842
48956
  });
48843
48957
 
48844
48958
  // ../../core/dev-server/src/images.ts
48845
- import { createHash as createHash16 } from "node:crypto";
48959
+ import { createHash as createHash17 } from "node:crypto";
48846
48960
  function svgFor(productId, title, sku) {
48847
- const seedHex = createHash16("sha1").update(productId + ":" + title).digest("hex");
48961
+ const seedHex = createHash17("sha1").update(productId + ":" + title).digest("hex");
48848
48962
  const h2 = (n2) => parseInt(seedHex.slice(n2, n2 + 2), 16);
48849
48963
  const hue1 = h2(0) % 360;
48850
48964
  const hue2 = (hue1 + 30 + h2(2) % 60) % 360;
@@ -48876,7 +48990,7 @@ function escapeXml(s5) {
48876
48990
  return s5.replace(/[<>&"']/g, (c2) => ({ "<": "&lt;", ">": "&gt;", "&": "&amp;", '"': "&quot;", "'": "&apos;" })[c2] ?? c2);
48877
48991
  }
48878
48992
  function wixPhotoSvg(category, seed2) {
48879
- const seedHex = createHash16("sha1").update(category + ":" + seed2).digest("hex");
48993
+ const seedHex = createHash17("sha1").update(category + ":" + seed2).digest("hex");
48880
48994
  const h2 = (n2) => parseInt(seedHex.slice(n2, n2 + 2), 16);
48881
48995
  const palette2 = paletteForCategory(category, h2);
48882
48996
  const glyph = glyphForCategory(category);
@@ -49003,7 +49117,7 @@ var init_stable_ids = __esm({
49003
49117
 
49004
49118
  // ../../core/dev-server/src/preview.ts
49005
49119
  import { spawn as spawn2 } from "node:child_process";
49006
- import { createHash as createHash17 } from "node:crypto";
49120
+ import { createHash as createHash18 } from "node:crypto";
49007
49121
  import { existsSync as existsSync37, createReadStream, statSync as statSync9, readFileSync as readFileSync37, renameSync as renameSync8, unlinkSync } from "node:fs";
49008
49122
  import { homedir as homedir6, tmpdir } from "node:os";
49009
49123
  import { resolve as resolvePath, dirname as dirname25 } from "node:path";
@@ -49019,7 +49133,7 @@ function macosWinlistBin() {
49019
49133
  }
49020
49134
  function macosWinlistSourceHash() {
49021
49135
  try {
49022
- return createHash17("sha1").update(readFileSync37(MACOS_WINLIST)).digest("hex").slice(0, 12);
49136
+ return createHash18("sha1").update(readFileSync37(MACOS_WINLIST)).digest("hex").slice(0, 12);
49023
49137
  } catch {
49024
49138
  return "missing";
49025
49139
  }
@@ -50033,10 +50147,10 @@ var init_preview2 = __esm({
50033
50147
  });
50034
50148
 
50035
50149
  // ../../core/dev-server/src/tier4-integrity.ts
50036
- import { createHash as createHash18 } from "node:crypto";
50150
+ import { createHash as createHash19 } from "node:crypto";
50037
50151
  function computeSri(bytes2) {
50038
- const digest2 = createHash18("sha384").update(bytes2).digest("base64");
50039
- return `sha384-${digest2}`;
50152
+ const digest3 = createHash19("sha384").update(bytes2).digest("base64");
50153
+ return `sha384-${digest3}`;
50040
50154
  }
50041
50155
  function parseManifestIntegrity(manifest2) {
50042
50156
  const out2 = /* @__PURE__ */ new Map();
@@ -153845,7 +153959,7 @@ __export(widgets_exports, {
153845
153959
  widgetRealm: () => widgetRealm,
153846
153960
  widgetScanRunCount: () => widgetScanRunCount
153847
153961
  });
153848
- import { createHash as createHash19 } from "node:crypto";
153962
+ import { createHash as createHash20 } from "node:crypto";
153849
153963
  import { lstatSync as lstatSync16, readdirSync as readdirSync24, statSync as statSync10 } from "node:fs";
153850
153964
  import { join as join34 } from "node:path";
153851
153965
  import { inspect } from "node:util";
@@ -153905,8 +154019,8 @@ function dropEntry(cache4, key4) {
153905
154019
  cache4.bytes -= entry.bytes;
153906
154020
  }
153907
154021
  function produceCacheKey(bundleJs, timeoutMs, clock) {
153908
- const digest2 = createHash19("sha256").update(bundleJs).digest("base64");
153909
- return `${timeoutMs}|${clock === void 0 ? "live" : Math.trunc(clock)}|${digest2}`;
154022
+ const digest3 = createHash20("sha256").update(bundleJs).digest("base64");
154023
+ return `${timeoutMs}|${clock === void 0 ? "live" : Math.trunc(clock)}|${digest3}`;
153910
154024
  }
153911
154025
  function cachedProduce(evaluator, key4) {
153912
154026
  const cache4 = realmProduceCache(evaluator);
@@ -153953,7 +154067,7 @@ function widgetScanRunCount() {
153953
154067
  return scanRuns;
153954
154068
  }
153955
154069
  function bundleDirFingerprint(roots2) {
153956
- const hash3 = createHash19("sha256");
154070
+ const hash3 = createHash20("sha256");
153957
154071
  try {
153958
154072
  for (const root of roots2) {
153959
154073
  let entries;
@@ -154372,7 +154486,7 @@ function contentEtag(snapshot4) {
154372
154486
  // Lever A — a timeline change must bump the etag (frame values/times are content).
154373
154487
  frames: snapshot4.frames ?? null
154374
154488
  });
154375
- return "sha256-" + createHash19("sha256").update(canonical9).digest("base64");
154489
+ return "sha256-" + createHash20("sha256").update(canonical9).digest("base64");
154376
154490
  }
154377
154491
  async function buildWidgetSnapshot(bundleJs, widgetId, opts = {}) {
154378
154492
  const { widgets } = await extractWidgets(bundleJs, opts);
@@ -154778,7 +154892,7 @@ import { createServer as createServer2 } from "node:http";
154778
154892
  import { readFile, stat } from "node:fs/promises";
154779
154893
  import { readFileSync as readFileSync43, existsSync as existsSync40, watch, mkdirSync as mkdirSync21, rmSync as rmSync11 } from "node:fs";
154780
154894
  import { basename as basename11, dirname as dirname27, extname as extname2, join as join35, relative as relative9, resolve as resolve34, normalize as normalize4, sep as sep11 } from "node:path";
154781
- import { createHash as createHash20, randomUUID as randomUUID6 } from "node:crypto";
154895
+ import { createHash as createHash21, randomUUID as randomUUID6 } from "node:crypto";
154782
154896
  import { fileURLToPath as fileURLToPath26, pathToFileURL as pathToFileURL5 } from "node:url";
154783
154897
  async function loadBootStateBaker() {
154784
154898
  await Promise.resolve().then(() => (init_validate_descriptor(), validate_descriptor_exports));
@@ -154828,7 +154942,7 @@ async function readBody2(req) {
154828
154942
  return Buffer.concat(chunks).toString("utf-8");
154829
154943
  }
154830
154944
  function makeEtag(body) {
154831
- return `"${createHash20("sha256").update(body).digest("hex").slice(0, 32)}"`;
154945
+ return `"${createHash21("sha256").update(body).digest("hex").slice(0, 32)}"`;
154832
154946
  }
154833
154947
  function servedTokensPath(app2) {
154834
154948
  return app2.module.designTokensPath ?? resolve34(app2.dir, uiConfig(app2.module.config).designTokensPath ?? "tokens.json");
@@ -155408,7 +155522,7 @@ function bundleIntegritySync(name, dir) {
155408
155522
  for (const root of dir ? [dir, TIER5_ROOT2] : [TIER5_ROOT2]) {
155409
155523
  try {
155410
155524
  const bytes2 = readFileSync43(resolve34(root, `${name}.bundle.js`));
155411
- return "sha256-" + createHash20("sha256").update(bytes2).digest("base64");
155525
+ return "sha256-" + createHash21("sha256").update(bytes2).digest("base64");
155412
155526
  } catch {
155413
155527
  }
155414
155528
  }
@@ -155840,7 +155954,7 @@ function tokensAreDerived(state) {
155840
155954
  }
155841
155955
  function servedTokensHash(app2) {
155842
155956
  try {
155843
- return createHash20("sha256").update(readFileSync43(servedTokensPath(app2))).digest("hex");
155957
+ return createHash21("sha256").update(readFileSync43(servedTokensPath(app2))).digest("hex");
155844
155958
  } catch {
155845
155959
  return "";
155846
155960
  }
@@ -156648,7 +156762,7 @@ async function handleWebWix(req, res, state) {
156648
156762
  userId: userId ?? session.email ?? null,
156649
156763
  email: session.email ?? "",
156650
156764
  preferenceContext: preferenceIdentity ? {
156651
- accountId: `m_${createHash20("sha256").update(preferenceIdentity).digest("hex")}`,
156765
+ accountId: `m_${createHash21("sha256").update(preferenceIdentity).digest("hex")}`,
156652
156766
  // Headless client IDs are site-bound and come from the server's app
156653
156767
  // configuration, never the URL's user-supplied business parameter.
156654
156768
  businessId: auth.clientId
@@ -157403,7 +157517,7 @@ async function readBundleFile(name, dir, opts = {}) {
157403
157517
  if (!roots2.some((root) => path2.startsWith(root))) continue;
157404
157518
  try {
157405
157519
  const bytes2 = await readFile(path2);
157406
- const integrity2 = "sha256-" + createHash20("sha256").update(bytes2).digest("base64");
157520
+ const integrity2 = "sha256-" + createHash21("sha256").update(bytes2).digest("base64");
157407
157521
  return { bytes: bytes2, integrity: integrity2 };
157408
157522
  } catch (err) {
157409
157523
  const code3 = err.code;
@@ -157595,7 +157709,7 @@ function readActionHandlerManifest(app2) {
157595
157709
  } catch {
157596
157710
  return { handlers: [] };
157597
157711
  }
157598
- const integrity2 = "sha256-" + createHash20("sha256").update(bytes2).digest("base64");
157712
+ const integrity2 = "sha256-" + createHash21("sha256").update(bytes2).digest("base64");
157599
157713
  const bundleUrl = `/v1/action-handler-bundles/${app2}`;
157600
157714
  return { handlers: decls.map((d2) => ({ id: d2.id, policy: d2.policy, description: d2.description, bundleUrl, integrity: integrity2 })) };
157601
157715
  }
@@ -157608,7 +157722,7 @@ async function handleActionHandlerBundleGet(res, app2) {
157608
157722
  if (!path2.startsWith(ACTION_HANDLERS_ROOT)) return sendJson(res, 404, { error: "not_found" });
157609
157723
  try {
157610
157724
  const bytes2 = await readFile(path2);
157611
- const integrity2 = "sha256-" + createHash20("sha256").update(bytes2).digest("base64");
157725
+ const integrity2 = "sha256-" + createHash21("sha256").update(bytes2).digest("base64");
157612
157726
  res.setHeader("content-type", "application/javascript; charset=utf-8");
157613
157727
  res.setHeader("cache-control", "max-age=300");
157614
157728
  res.setHeader("x-himalaya-bundle-integrity", integrity2);
@@ -158717,7 +158831,7 @@ var init_widget_identity = __esm({
158717
158831
  });
158718
158832
 
158719
158833
  // ../../core/serve-storage/src/release-payload-hash.ts
158720
- import { createHash as createHash21 } from "node:crypto";
158834
+ import { createHash as createHash22 } from "node:crypto";
158721
158835
  function canonical2(value2) {
158722
158836
  if (value2 === null || typeof value2 !== "object") return JSON.stringify(value2);
158723
158837
  if (Array.isArray(value2)) return `[${value2.map(canonical2).join(",")}]`;
@@ -158725,7 +158839,7 @@ function canonical2(value2) {
158725
158839
  return `{${Object.keys(record7).filter((key4) => record7[key4] !== void 0).sort().map((key4) => `${JSON.stringify(key4)}:${canonical2(record7[key4])}`).join(",")}}`;
158726
158840
  }
158727
158841
  function releasePayloadHash(payload) {
158728
- const hash3 = (value2) => createHash21("sha256").update(canonical2(value2)).digest("hex");
158842
+ const hash3 = (value2) => createHash22("sha256").update(canonical2(value2)).digest("hex");
158729
158843
  if (!payload || typeof payload !== "object" || Array.isArray(payload)) return hash3(payload);
158730
158844
  const { catalogs: _catalogBytes, ...record7 } = payload;
158731
158845
  const manifest2 = record7.manifest;
@@ -158756,9 +158870,9 @@ var init_release_payload_hash = __esm({
158756
158870
  });
158757
158871
 
158758
158872
  // ../../core/serve-storage/src/release-patch.ts
158759
- import { createHash as createHash22 } from "node:crypto";
158873
+ import { createHash as createHash23 } from "node:crypto";
158760
158874
  function sha256hex(b3) {
158761
- return createHash22("sha256").update(b3).digest("hex");
158875
+ return createHash23("sha256").update(b3).digest("hex");
158762
158876
  }
158763
158877
  function stableStringify(value2) {
158764
158878
  if (value2 === null || typeof value2 !== "object") return JSON.stringify(value2);
@@ -163497,11 +163611,11 @@ var init_dependencies2 = __esm({
163497
163611
  });
163498
163612
 
163499
163613
  // ../../core/functions-build/src/sbom.ts
163500
- import { createHash as createHash23 } from "node:crypto";
163614
+ import { createHash as createHash24 } from "node:crypto";
163501
163615
  function createFunctionSbom(packages) {
163502
163616
  const components2 = [...packages].sort((a3, b3) => a3.name.localeCompare(b3.name)).map(({ name, version: version5, integrity: integrity2, license }) => ({ name, version: version5, integrity: integrity2, license }));
163503
163617
  const body = JSON.stringify({ format: "himalaya-sbom-v1", components: components2 });
163504
- return { format: "himalaya-sbom-v1", components: components2, hash: createHash23("sha256").update(body).digest("hex") };
163618
+ return { format: "himalaya-sbom-v1", components: components2, hash: createHash24("sha256").update(body).digest("hex") };
163505
163619
  }
163506
163620
  var init_sbom = __esm({
163507
163621
  "../../core/functions-build/src/sbom.ts"() {
@@ -163510,12 +163624,12 @@ var init_sbom = __esm({
163510
163624
  });
163511
163625
 
163512
163626
  // ../../core/functions-build/src/build.ts
163513
- import { createHash as createHash24 } from "node:crypto";
163627
+ import { createHash as createHash25 } from "node:crypto";
163514
163628
  function sha2562(value2) {
163515
- return createHash24("sha256").update(value2).digest("hex");
163629
+ return createHash25("sha256").update(value2).digest("hex");
163516
163630
  }
163517
163631
  function sri(value2) {
163518
- return `sha256-${createHash24("sha256").update(value2).digest("base64")}`;
163632
+ return `sha256-${createHash25("sha256").update(value2).digest("base64")}`;
163519
163633
  }
163520
163634
  function schemaHash(schema2) {
163521
163635
  if (!schema2) return "";
@@ -163789,8 +163903,8 @@ __export(build_exports2, {
163789
163903
  withStoreNavBundle: () => withStoreNavBundle,
163790
163904
  withoutDevOnlyAppConfig: () => withoutDevOnlyAppConfig
163791
163905
  });
163792
- import { createHash as createHash25 } from "node:crypto";
163793
- import { readFileSync as readFileSync46, readdirSync as readdirSync26, existsSync as existsSync43, realpathSync as realpathSync6 } from "node:fs";
163906
+ import { createHash as createHash26 } from "node:crypto";
163907
+ import { readFileSync as readFileSync46, readdirSync as readdirSync26, existsSync as existsSync43, realpathSync as realpathSync7 } from "node:fs";
163794
163908
  import { dirname as dirname28, join as join38, resolve as resolve36, sep as sep13 } from "node:path";
163795
163909
  import { fileURLToPath as fileURLToPath27 } from "node:url";
163796
163910
  import { createRequire as createRequire3 } from "node:module";
@@ -163925,9 +164039,9 @@ function sourceTranslationKeys2(locale, appDir3) {
163925
164039
  const path2 = join38(l10nDir, `${tag2}.json`);
163926
164040
  if (!existsSync43(path2)) return /* @__PURE__ */ new Set();
163927
164041
  try {
163928
- const realDir = realpathSync6(l10nDir);
163929
- const realFile = realpathSync6(path2);
163930
- if (!realDir.startsWith(realpathSync6(appDir3) + sep13) || dirname28(realFile) !== realDir) return /* @__PURE__ */ new Set();
164042
+ const realDir = realpathSync7(l10nDir);
164043
+ const realFile = realpathSync7(path2);
164044
+ if (!realDir.startsWith(realpathSync7(appDir3) + sep13) || dirname28(realFile) !== realDir) return /* @__PURE__ */ new Set();
163931
164045
  return new Set(keyMap(parseCatalog(readFileSync46(realFile, "utf8")), { sourceFallback: true }).keys());
163932
164046
  } catch {
163933
164047
  return /* @__PURE__ */ new Set();
@@ -163958,10 +164072,10 @@ function servesMessages(text32) {
163958
164072
  }
163959
164073
  }
163960
164074
  function sha2563(buf) {
163961
- return createHash25("sha256").update(buf).digest("hex");
164075
+ return createHash26("sha256").update(buf).digest("hex");
163962
164076
  }
163963
164077
  function sri2(buf) {
163964
- return "sha256-" + createHash25("sha256").update(buf).digest("base64");
164078
+ return "sha256-" + createHash26("sha256").update(buf).digest("base64");
163965
164079
  }
163966
164080
  async function widgetFailureDetail(res) {
163967
164081
  try {
@@ -166889,14 +167003,14 @@ __export(studio_exports, {
166889
167003
  renderStudioHtml: () => renderStudioHtml,
166890
167004
  writeStudioRecord: () => writeStudioRecord
166891
167005
  });
166892
- import { createHash as createHash26 } from "node:crypto";
166893
- import { existsSync as existsSync46, readdirSync as readdirSync28, readFileSync as readFileSync49, realpathSync as realpathSync7, statSync as statSync12 } from "node:fs";
167006
+ import { createHash as createHash27 } from "node:crypto";
167007
+ import { existsSync as existsSync46, readdirSync as readdirSync28, readFileSync as readFileSync49, realpathSync as realpathSync8, statSync as statSync12 } from "node:fs";
166894
167008
  import { basename as basename12, extname as extname3, join as join41, relative as relative11, resolve as resolve37, sep as sep14 } from "node:path";
166895
167009
  import { pathToFileURL as pathToFileURL6 } from "node:url";
166896
167010
  function realInside(dir, abs) {
166897
167011
  try {
166898
- const root = realpathSync7(dir);
166899
- const real = realpathSync7(abs);
167012
+ const root = realpathSync8(dir);
167013
+ const real = realpathSync8(abs);
166900
167014
  return real.startsWith(root + sep14) ? real : null;
166901
167015
  } catch {
166902
167016
  return null;
@@ -167171,7 +167285,7 @@ function buildView(dir, memory2, now) {
167171
167285
  reveal: memory2.reveal ?? null
167172
167286
  };
167173
167287
  const { generatedAt: _ignored, timelineFrames: _count, ...stable } = view;
167174
- const v2 = createHash26("sha256").update(JSON.stringify(stable)).digest("hex").slice(0, 16);
167288
+ const v2 = createHash27("sha256").update(JSON.stringify(stable)).digest("hex").slice(0, 16);
167175
167289
  return { v: v2, ...view };
167176
167290
  }
167177
167291
  function writeAtomic(file2, content) {
@@ -169665,7 +169779,7 @@ __export(wix_owner_exports, {
169665
169779
  wixCliOnPath: () => wixCliOnPath
169666
169780
  });
169667
169781
  import { spawn as spawn3 } from "node:child_process";
169668
- import { createHash as createHash27 } from "node:crypto";
169782
+ import { createHash as createHash28 } from "node:crypto";
169669
169783
  import { accessSync as accessSync2, constants as fsConstants, statSync as statSync14 } from "node:fs";
169670
169784
  import { delimiter, join as join44 } from "node:path";
169671
169785
  function resolveSiteId(flag3) {
@@ -169690,7 +169804,7 @@ async function siteToken(msid, spawnImpl = spawn3, fetchImpl = fetch) {
169690
169804
  return await mintToken(["token", "--site", msid], `wix token --site ${msid}`, msid, spawnImpl);
169691
169805
  }
169692
169806
  function subjectFingerprint(subject) {
169693
- return createHash27("sha256").update(subject).digest("hex").slice(0, 16);
169807
+ return createHash28("sha256").update(subject).digest("hex").slice(0, 16);
169694
169808
  }
169695
169809
  async function exchangeSiteToken(subject, msid, opts = {}) {
169696
169810
  const now = opts.now ?? Date.now;
@@ -177054,7 +177168,7 @@ var init_fxp = __esm({
177054
177168
  });
177055
177169
 
177056
177170
  // ../../packages/serve/src/pkcs12.ts
177057
- import { X509Certificate, createHash as createHash28, createPrivateKey as createPrivateKey2, createPublicKey, pbkdf2Sync, createDecipheriv } from "node:crypto";
177171
+ import { X509Certificate, createHash as createHash29, createPrivateKey as createPrivateKey2, createPublicKey, pbkdf2Sync, createDecipheriv } from "node:crypto";
177058
177172
  function decodePkcs12(der, password) {
177059
177173
  try {
177060
177174
  const pfx = readSequence(der, 0);
@@ -177245,12 +177359,12 @@ function decryptPbes2(params, ciphertext, password) {
177245
177359
  keyLen = maybeKeyLen.value;
177246
177360
  cursor = maybeKeyLen.end;
177247
177361
  }
177248
- let digest2 = "sha1";
177362
+ let digest3 = "sha1";
177249
177363
  const prf = readSequence(kdfParams.contents, cursor);
177250
177364
  if (prf) {
177251
177365
  const prfOid = readOid(prf.contents, 0);
177252
- if (prfOid?.oid === OID.hmacWithSHA256) digest2 = "sha256";
177253
- if (prfOid?.oid === OID.hmacWithSHA1) digest2 = "sha1";
177366
+ if (prfOid?.oid === OID.hmacWithSHA256) digest3 = "sha256";
177367
+ if (prfOid?.oid === OID.hmacWithSHA1) digest3 = "sha1";
177254
177368
  }
177255
177369
  const encOid = readOid(enc3.contents, 0);
177256
177370
  if (!encOid) return void 0;
@@ -177259,7 +177373,7 @@ function decryptPbes2(params, ciphertext, password) {
177259
177373
  const cipher = encOid.oid === OID.aes256Cbc ? "aes-256-cbc" : encOid.oid === OID.aes192Cbc ? "aes-192-cbc" : encOid.oid === OID.aes128Cbc ? "aes-128-cbc" : void 0;
177260
177374
  if (!cipher) return void 0;
177261
177375
  const length2 = keyLen ?? (cipher === "aes-256-cbc" ? 32 : cipher === "aes-192-cbc" ? 24 : 16);
177262
- const key4 = pbkdf2Sync(password, salt.value, iter.value, length2, digest2);
177376
+ const key4 = pbkdf2Sync(password, salt.value, iter.value, length2, digest3);
177263
177377
  try {
177264
177378
  const decipher2 = createDecipheriv(cipher, key4, ivOct.value);
177265
177379
  decipher2.setAutoPadding(true);
@@ -177328,7 +177442,7 @@ function expand(src, v2) {
177328
177442
  return out2;
177329
177443
  }
177330
177444
  function sha12(data) {
177331
- return createHash28("sha1").update(data).digest();
177445
+ return createHash29("sha1").update(data).digest();
177332
177446
  }
177333
177447
  function readAt(buf, i2) {
177334
177448
  if (i2 >= buf.length) return void 0;
@@ -177418,7 +177532,7 @@ var init_pkcs12 = __esm({
177418
177532
  });
177419
177533
 
177420
177534
  // ../../packages/serve/src/customer-signing-assets.ts
177421
- import { createHash as createHash29 } from "node:crypto";
177535
+ import { createHash as createHash30 } from "node:crypto";
177422
177536
  function readValue(node4) {
177423
177537
  const [tag2, children2] = Object.entries(node4)[0] ?? [];
177424
177538
  if (!tag2 || !Array.isArray(children2)) return refuse2("customer_profile_invalid");
@@ -177496,7 +177610,7 @@ function toBundle(assets, expected, decoded2, profileType, apns, deviceCount) {
177496
177610
  provisioningProfile: Buffer.from(assets.provisioningProfile).toString("base64"),
177497
177611
  profileSha256: sha2564(assets.provisioningProfile),
177498
177612
  certificateSha256: sha2564(decoded2.cert.raw),
177499
- certificateSha1: createHash29("sha1").update(decoded2.cert.raw).digest("hex").toUpperCase(),
177613
+ certificateSha1: createHash30("sha1").update(decoded2.cert.raw).digest("hex").toUpperCase(),
177500
177614
  expiresAt: new Date(Math.min(decoded2.expiration, Date.parse(decoded2.cert.validTo))).toISOString(),
177501
177615
  ...apns ? { apnsEnvironment: apns } : {},
177502
177616
  deviceCount
@@ -177548,7 +177662,7 @@ var init_customer_signing_assets = __esm({
177548
177662
  init_fxp();
177549
177663
  init_pkcs12();
177550
177664
  init_customer_dist_signing();
177551
- sha2564 = (bytes2) => createHash29("sha256").update(bytes2).digest("hex");
177665
+ sha2564 = (bytes2) => createHash30("sha256").update(bytes2).digest("hex");
177552
177666
  refuse2 = (code3) => {
177553
177667
  throw new CustomerSigningError(code3);
177554
177668
  };
@@ -178180,10 +178294,10 @@ __export(content_manifest_exports, {
178180
178294
  writeContentManifest: () => writeContentManifest
178181
178295
  });
178182
178296
  import { randomUUID as randomUUID8 } from "node:crypto";
178183
- import { constants as constants3, lstatSync as lstatSync18, readFileSync as readFileSync57, realpathSync as realpathSync8, writeFileSync as writeFileSync21, renameSync as renameSync9, openSync as openSync4, closeSync as closeSync4, unlinkSync as unlinkSync2 } from "node:fs";
178297
+ import { constants as constants3, lstatSync as lstatSync18, readFileSync as readFileSync57, realpathSync as realpathSync9, writeFileSync as writeFileSync21, renameSync as renameSync9, openSync as openSync4, closeSync as closeSync4, unlinkSync as unlinkSync2 } from "node:fs";
178184
178298
  import { join as join46 } from "node:path";
178185
178299
  function contentManifestPath(dir) {
178186
- const path2 = join46(realpathSync8(dir), "himalaya.content.json");
178300
+ const path2 = join46(realpathSync9(dir), "himalaya.content.json");
178187
178301
  try {
178188
178302
  if (lstatSync18(path2).isSymbolicLink()) throw new Error("himalaya.content.json is a symlink \u2014 refusing to read or write through it");
178189
178303
  } catch (error) {
@@ -181937,7 +182051,7 @@ __export(icon_exports, {
181937
182051
  summarize: () => summarize3,
181938
182052
  writePreparedIcon: () => writePreparedIcon
181939
182053
  });
181940
- import { createHash as createHash30 } from "node:crypto";
182054
+ import { createHash as createHash31 } from "node:crypto";
181941
182055
  import { accessSync as accessSync3, constants as constants4, existsSync as existsSync57, mkdirSync as mkdirSync28, readFileSync as readFileSync61, statSync as statSync19, writeFileSync as writeFileSync24 } from "node:fs";
181942
182056
  import { basename as basename15, dirname as dirname35, join as join49, resolve as resolve45, sep as sep16 } from "node:path";
181943
182057
  function readManifest(dir) {
@@ -182026,7 +182140,7 @@ async function iconStatus(dir) {
182026
182140
  ...base2,
182027
182141
  templateIcon: templateIconMatch(png),
182028
182142
  bytes: png.length,
182029
- sha256: createHash30("sha256").update(png).digest("hex"),
182143
+ sha256: createHash31("sha256").update(png).digest("hex"),
182030
182144
  header: pngHeader(png),
182031
182145
  byteIssues
182032
182146
  };
@@ -186725,7 +186839,7 @@ __export(pack_exports, {
186725
186839
  unpackTo: () => unpackTo,
186726
186840
  writeZip: () => writeZip
186727
186841
  });
186728
- import { createHash as createHash31 } from "node:crypto";
186842
+ import { createHash as createHash32 } from "node:crypto";
186729
186843
  import { deflateRawSync, inflateRawSync } from "node:zlib";
186730
186844
  import { existsSync as existsSync62, mkdirSync as mkdirSync31, readFileSync as readFileSync66, readdirSync as readdirSync32, rmSync as rmSync18, statSync as statSync20, writeFileSync as writeFileSync27 } from "node:fs";
186731
186845
  import { dirname as dirname38, join as join55, resolve as resolve47 } from "node:path";
@@ -186875,11 +186989,11 @@ function gatherReleaseEntries(appDir3) {
186875
186989
  return { entries, manifest: manifest2, skipped };
186876
186990
  }
186877
186991
  function sha256Hex4(bytes2) {
186878
- return createHash31("sha256").update(bytes2).digest("hex");
186992
+ return createHash32("sha256").update(bytes2).digest("hex");
186879
186993
  }
186880
186994
  function computeContentHash(entries) {
186881
186995
  const input = packageHashInput(entries.map((e2) => ({ path: e2.path, hash: sha256Hex4(e2.bytes) })));
186882
- return "sha256-" + createHash31("sha256").update(input).digest("base64");
186996
+ return "sha256-" + createHash32("sha256").update(input).digest("base64");
186883
186997
  }
186884
186998
  function buildEntries(appDir3, app2, opts) {
186885
186999
  const { entries: released, manifest: manifest2, skipped } = gatherReleaseEntries(appDir3);
@@ -187064,6 +187178,7 @@ __export(app_source_exports, {
187064
187178
  newestSourceChangeMs: () => newestSourceChangeMs,
187065
187179
  readAppSource: () => readAppSource,
187066
187180
  removeStaleSource: () => removeStaleSource,
187181
+ renderInputPassCount: () => renderInputPassCount,
187067
187182
  renderInputRootDirs: () => renderInputRootDirs,
187068
187183
  secretFindings: () => secretFindings,
187069
187184
  sourceFingerprint: () => sourceFingerprint,
@@ -187072,7 +187187,7 @@ __export(app_source_exports, {
187072
187187
  writeConflicts: () => writeConflicts,
187073
187188
  zipAppSource: () => zipAppSource
187074
187189
  });
187075
- import { createHash as createHash32 } from "node:crypto";
187190
+ import { createHash as createHash33 } from "node:crypto";
187076
187191
  import { readdirSync as readdirSync33, lstatSync as lstatSync20, readFileSync as readFileSync67, mkdirSync as mkdirSync32, writeFileSync as writeFileSync28, existsSync as existsSync63, rmSync as rmSync19, rmdirSync as rmdirSync3, unlinkSync as unlinkSync3 } from "node:fs";
187077
187192
  import { join as join56, resolve as resolve48, sep as sep18 } from "node:path";
187078
187193
  import { createRequire as createRequire5 } from "node:module";
@@ -187119,25 +187234,77 @@ function collectAppSource(dir, opts = {}) {
187119
187234
  skipped.sort();
187120
187235
  return { entries, skipped };
187121
187236
  }
187237
+ function renderInputPassCount() {
187238
+ return renderInputPasses;
187239
+ }
187240
+ function renderInputsKey(dir, files) {
187241
+ const h2 = createHash33("sha256");
187242
+ h2.update("render-inputs-v1\n");
187243
+ let storable = true;
187244
+ const contentHash = (name, bytes2) => {
187245
+ if (extendsElsewhere(name, bytes2)) storable = false;
187246
+ return createHash33("sha256").update(bytes2).digest("hex");
187247
+ };
187248
+ for (const { archivePath, hostRel } of files) {
187249
+ const body = KEYED_BY_CONTENT(archivePath) ? contentHash(archivePath, readFileSync67(join56(dir, hostRel))) : "-";
187250
+ h2.update(`${archivePath}\0${body}
187251
+ `);
187252
+ }
187253
+ let level = 0;
187254
+ for (let up2 = resolve48(dir, ".."), prev = resolve48(dir); up2 !== prev; prev = up2, up2 = resolve48(up2, ".."), level++) {
187255
+ for (const name of ANCESTOR_RESOLUTION_FILES) {
187256
+ let bytes2;
187257
+ try {
187258
+ bytes2 = readFileSync67(join56(up2, name));
187259
+ } catch {
187260
+ }
187261
+ h2.update(`${"../".repeat(level + 1)}${name}\0${bytes2 ? contentHash(name, bytes2) : "absent"}
187262
+ `);
187263
+ }
187264
+ }
187265
+ return { key: h2.digest("hex"), storable };
187266
+ }
187122
187267
  function renderInputRootDirs(dir) {
187123
187268
  const entries = [];
187269
+ const walked = [];
187270
+ let hasSymlink = false;
187124
187271
  walkSourceTree(
187125
187272
  dir,
187126
187273
  (archivePath, hostRel) => {
187274
+ walked.push({ archivePath, hostRel });
187127
187275
  const segs = archivePath.split("/");
187128
187276
  if (!CODE_FILE.test(archivePath) || /\.d\.[cm]?ts$/i.test(archivePath)) return;
187129
187277
  if (segs.length === 1 || segs[0] === "dev" || segs[0] === "tier5-src") entries.push(join56(dir, hostRel));
187130
187278
  },
187131
- () => {
187279
+ (hostRel) => {
187280
+ try {
187281
+ if (lstatSync20(join56(dir, hostRel)).isSymbolicLink()) hasSymlink = true;
187282
+ } catch {
187283
+ hasSymlink = true;
187284
+ }
187132
187285
  }
187133
187286
  );
187134
187287
  const roots2 = new Set(RENDER_ROOT_DIRS);
187135
187288
  if (entries.length === 0) return roots2;
187289
+ let key4;
187290
+ let storable;
187291
+ try {
187292
+ ({ key: key4, storable } = renderInputsKey(dir, walked));
187293
+ storable &&= !hasSymlink;
187294
+ } catch {
187295
+ return void 0;
187296
+ }
187297
+ const cached3 = storable ? renderInputsCache.get(key4) : void 0;
187298
+ if (cached3) {
187299
+ renderInputsCache.delete(key4);
187300
+ renderInputsCache.set(key4, cached3);
187301
+ for (const root of cached3) roots2.add(root);
187302
+ return roots2;
187303
+ }
187136
187304
  try {
187137
187305
  const esbuild = createRequire5(import.meta.url)("esbuild");
187138
- const empty2 = Object.fromEntries(
187139
- [".png", ".jpg", ".jpeg", ".gif", ".webp", ".svg", ".ttf", ".otf", ".woff", ".woff2", ".css", ".txt", ".md", ".html", ".mp3", ".mp4"].map((e2) => [e2, "empty"])
187140
- );
187306
+ const empty2 = Object.fromEntries(EMPTY_LOADER_EXTS.map((e2) => [e2, "empty"]));
187307
+ renderInputPasses++;
187141
187308
  const result = esbuild.buildSync({
187142
187309
  entryPoints: entries,
187143
187310
  absWorkingDir: dir,
@@ -187151,10 +187318,19 @@ function renderInputRootDirs(dir) {
187151
187318
  loader: empty2,
187152
187319
  logLevel: "silent"
187153
187320
  });
187321
+ const imported = /* @__PURE__ */ new Set();
187322
+ const inKey = new Set(walked.map((f2) => f2.archivePath));
187323
+ let keyCoversInputs = storable;
187154
187324
  for (const input of Object.keys(result.metafile?.inputs ?? {})) {
187155
187325
  const segs = input.split("/");
187156
- if (segs.length > 1 && !input.startsWith("..") && !input.includes(":")) roots2.add(segs[0]);
187326
+ if (segs.length > 1 && !input.startsWith("..") && !input.includes(":")) imported.add(segs[0]);
187327
+ if (!inKey.has(input)) keyCoversInputs = false;
187157
187328
  }
187329
+ if (keyCoversInputs) {
187330
+ renderInputsCache.set(key4, [...imported]);
187331
+ if (renderInputsCache.size > RENDER_INPUTS_CACHE_MAX) renderInputsCache.delete(renderInputsCache.keys().next().value);
187332
+ }
187333
+ for (const root of imported) roots2.add(root);
187158
187334
  return roots2;
187159
187335
  } catch {
187160
187336
  return void 0;
@@ -187193,13 +187369,13 @@ function sourceFingerprint(dir) {
187193
187369
  dir,
187194
187370
  (archivePath, hostRel) => {
187195
187371
  if (/\.md$/i.test(archivePath)) return;
187196
- files.push(`${archivePath}\0${createHash32("sha256").update(readFileSync67(join56(dir, hostRel))).digest("hex")}`);
187372
+ files.push(`${archivePath}\0${createHash33("sha256").update(readFileSync67(join56(dir, hostRel))).digest("hex")}`);
187197
187373
  },
187198
187374
  () => {
187199
187375
  }
187200
187376
  );
187201
187377
  files.sort();
187202
- return createHash32("sha256").update(files.join("\n")).digest("hex");
187378
+ return createHash33("sha256").update(files.join("\n")).digest("hex");
187203
187379
  }
187204
187380
  function largestEntries(entries, limit = 5) {
187205
187381
  return entries.map((e2) => ({
@@ -187332,7 +187508,7 @@ function pruneEmptyDirs(root, rel2, needed, removed) {
187332
187508
  }
187333
187509
  return empty2;
187334
187510
  }
187335
- var MAX_APP_SOURCE_BYTES, PUSH_EXCLUDED_ROOTS, RENDER_ROOT_DIRS, CODE_FILE;
187511
+ var MAX_APP_SOURCE_BYTES, PUSH_EXCLUDED_ROOTS, RENDER_ROOT_DIRS, CODE_FILE, EMPTY_LOADER_EXTS, KEYED_BY_CONTENT, RESOLUTION_CONFIG, extendsElsewhere, ANCESTOR_RESOLUTION_FILES, RENDER_INPUTS_CACHE_MAX, renderInputsCache, renderInputPasses;
187336
187512
  var init_app_source = __esm({
187337
187513
  "src/app-source.ts"() {
187338
187514
  init_define_HHP_CATALOG();
@@ -187344,6 +187520,14 @@ var init_app_source = __esm({
187344
187520
  PUSH_EXCLUDED_ROOTS = ["extensions"];
187345
187521
  RENDER_ROOT_DIRS = /* @__PURE__ */ new Set(["dev", "tier5-src", "assets", "seed", "strings", "l10n", "fonts", "images", "data"]);
187346
187522
  CODE_FILE = /\.(?:[cm]?[jt]s|[jt]sx)$/i;
187523
+ EMPTY_LOADER_EXTS = [".png", ".jpg", ".jpeg", ".gif", ".webp", ".svg", ".ttf", ".otf", ".woff", ".woff2", ".css", ".txt", ".md", ".html", ".mp3", ".mp4"];
187524
+ KEYED_BY_CONTENT = (archivePath) => CODE_FILE.test(archivePath) || /\.json$/i.test(archivePath);
187525
+ RESOLUTION_CONFIG = /(?:^|\/)(?:tsconfig|jsconfig)(?:\.[^/]*)?\.json$/i;
187526
+ extendsElsewhere = (name, bytes2) => RESOLUTION_CONFIG.test(name) && (bytes2.includes('"extends"') || bytes2.includes("\\u"));
187527
+ ANCESTOR_RESOLUTION_FILES = ["tsconfig.json", "jsconfig.json", "package.json"];
187528
+ RENDER_INPUTS_CACHE_MAX = 64;
187529
+ renderInputsCache = /* @__PURE__ */ new Map();
187530
+ renderInputPasses = 0;
187347
187531
  }
187348
187532
  });
187349
187533
 
@@ -187367,7 +187551,7 @@ __export(run_watch_exports, {
187367
187551
  watchedContentDir: () => watchedContentDir,
187368
187552
  writeRunRecord: () => writeRunRecord
187369
187553
  });
187370
- import { closeSync as closeSync5, constants as constants5, existsSync as existsSync64, fstatSync as fstatSync2, lstatSync as lstatSync21, statSync as statSync21, readdirSync as readdirSync34, mkdirSync as mkdirSync33, openSync as openSync5, readFileSync as readFileSync68, realpathSync as realpathSync9, renameSync as renameSync12, rmSync as rmSync20, writeFileSync as writeFileSync29, watch as fsWatch } from "node:fs";
187554
+ import { closeSync as closeSync5, constants as constants5, existsSync as existsSync64, fstatSync as fstatSync2, lstatSync as lstatSync21, statSync as statSync21, readdirSync as readdirSync34, mkdirSync as mkdirSync33, openSync as openSync5, readFileSync as readFileSync68, realpathSync as realpathSync10, renameSync as renameSync12, rmSync as rmSync20, writeFileSync as writeFileSync29, watch as fsWatch } from "node:fs";
187371
187555
  import { randomUUID as randomUUID9 } from "node:crypto";
187372
187556
  import { extname as extname4, join as join57, relative as relative14, resolve as resolve49, sep as sep19 } from "node:path";
187373
187557
  function diffReleases(prev, next) {
@@ -187632,8 +187816,8 @@ function readConfined(root, rel2) {
187632
187816
  const st2 = lstatSync21(at2);
187633
187817
  if (st2.isSymbolicLink() || !(i2 === parts.length - 1 ? st2.isFile() : st2.isDirectory())) return null;
187634
187818
  }
187635
- const canonicalRoot = realpathSync9(root);
187636
- if (!realpathSync9(at2).startsWith(canonicalRoot + sep19)) return null;
187819
+ const canonicalRoot = realpathSync10(root);
187820
+ if (!realpathSync10(at2).startsWith(canonicalRoot + sep19)) return null;
187637
187821
  const fd = openSync5(at2, constants5.O_RDONLY | (constants5.O_NOFOLLOW ?? 0));
187638
187822
  try {
187639
187823
  if (!fstatSync2(fd).isFile()) return null;
@@ -187696,7 +187880,7 @@ __export(screen_state_exports, {
187696
187880
  shotStateFor: () => shotStateFor,
187697
187881
  withHomeCaveat: () => withHomeCaveat
187698
187882
  });
187699
- import { createHash as createHash33 } from "node:crypto";
187883
+ import { createHash as createHash34 } from "node:crypto";
187700
187884
  import { lstatSync as lstatSync22, readFileSync as readFileSync69 } from "node:fs";
187701
187885
  import { join as join58 } from "node:path";
187702
187886
  function quotableLine(text32) {
@@ -187817,7 +188001,7 @@ var init_screen_state = __esm({
187817
188001
  KEEP = 40;
187818
188002
  LINE_MAX = 120;
187819
188003
  str6 = (v2) => typeof v2 === "string" && v2.trim() ? v2 : void 0;
187820
- sha256Of = (file2) => createHash33("sha256").update(readFileSync69(file2)).digest("hex");
188004
+ sha256Of = (file2) => createHash34("sha256").update(readFileSync69(file2)).digest("hex");
187821
188005
  }
187822
188006
  });
187823
188007
 
@@ -187832,7 +188016,7 @@ __export(studio_reel_exports, {
187832
188016
  thin: () => thin,
187833
188017
  utcDay: () => utcDay
187834
188018
  });
187835
- import { createHash as createHash34 } from "node:crypto";
188019
+ import { createHash as createHash35 } from "node:crypto";
187836
188020
  import { lstatSync as lstatSync23, readFileSync as readFileSync70 } from "node:fs";
187837
188021
  import { basename as basename17, join as join59 } from "node:path";
187838
188022
  function loadMemory2(dir) {
@@ -187921,7 +188105,7 @@ function inlineImages(dir, plan, budget = REEL_BUDGET_BYTES) {
187921
188105
  const st2 = lstatSync23(path2);
187922
188106
  if (!st2.isFile() || st2.nlink !== 1) return null;
187923
188107
  const bytes2 = readFileSync70(path2);
187924
- return createHash34("sha256").update(bytes2).digest("hex") === f2.slice(0, 64) && imageExtension(bytes2) === f2.slice(65) ? bytes2 : null;
188108
+ return createHash35("sha256").update(bytes2).digest("hex") === f2.slice(0, 64) && imageExtension(bytes2) === f2.slice(65) ? bytes2 : null;
187925
188109
  } catch {
187926
188110
  return null;
187927
188111
  }
@@ -188149,7 +188333,7 @@ __export(milestones_exports, {
188149
188333
  watchUrlFor: () => watchUrlFor,
188150
188334
  writeHandoverReel: () => writeHandoverReel
188151
188335
  });
188152
- import { createHash as createHash35, randomUUID as randomUUID10 } from "node:crypto";
188336
+ import { createHash as createHash36, randomUUID as randomUUID10 } from "node:crypto";
188153
188337
  import { spawn as spawn4 } from "node:child_process";
188154
188338
  import { closeSync as closeSync6, existsSync as existsSync65, lstatSync as lstatSync24, readFileSync as readFileSync72, statSync as statSync22 } from "node:fs";
188155
188339
  import { createServer as createServer3 } from "node:net";
@@ -188853,7 +189037,7 @@ var init_milestones = __esm({
188853
189037
  INIT_SOURCE_FILE = join61(".himi", "init-source.json");
188854
189038
  STARTING_POINT_REF = "starting-point";
188855
189039
  TEMPLATE_NAME2 = /^[A-Za-z0-9._-]{1,64}$/;
188856
- sha256Of2 = (file2) => createHash35("sha256").update(readFileSync72(file2)).digest("hex");
189040
+ sha256Of2 = (file2) => createHash36("sha256").update(readFileSync72(file2)).digest("hex");
188857
189041
  WATCH_REMINDER_EVERY_MS = 10 * 60 * 1e3;
188858
189042
  REMINDERS_FILE = join61(".himi", "reminders.json");
188859
189043
  pidAlive = (pid) => {
@@ -191355,7 +191539,7 @@ var init_social_sign_in = __esm({
191355
191539
 
191356
191540
  // ../app-icons/plan.ts
191357
191541
  import { existsSync as existsSync73, readFileSync as readFileSync80, readdirSync as readdirSync37 } from "node:fs";
191358
- import { createHash as createHash36 } from "node:crypto";
191542
+ import { createHash as createHash37 } from "node:crypto";
191359
191543
  import { inflateSync } from "node:zlib";
191360
191544
  import { dirname as dirname41, join as join71, resolve as resolve52 } from "node:path";
191361
191545
  function stripComments(src) {
@@ -191443,7 +191627,7 @@ function parseIconConfig(configTs) {
191443
191627
  return out2;
191444
191628
  }
191445
191629
  function idHash(id) {
191446
- return createHash36("sha1").update(id).digest();
191630
+ return createHash37("sha1").update(id).digest();
191447
191631
  }
191448
191632
  function deriveGlyph(id) {
191449
191633
  const h2 = idHash(id);
@@ -191627,7 +191811,7 @@ function placeholderHashes() {
191627
191811
  }
191628
191812
  function fileSha256(path2) {
191629
191813
  try {
191630
- return createHash36("sha256").update(readFileSync80(path2)).digest("hex");
191814
+ return createHash37("sha256").update(readFileSync80(path2)).digest("hex");
191631
191815
  } catch {
191632
191816
  return null;
191633
191817
  }
@@ -200591,11 +200775,11 @@ __export(account_screens_lint_exports, {
200591
200775
  reachableScreens: () => reachableScreens,
200592
200776
  staticNavTargets: () => staticNavTargets
200593
200777
  });
200594
- import { createHash as createHash37 } from "node:crypto";
200778
+ import { createHash as createHash38 } from "node:crypto";
200595
200779
  import ts20 from "typescript";
200596
200780
  function memberSignInIn(bundleJs) {
200597
200781
  if (![...MEMBER_SIGN_IN_VERBS, `.wix.${HOSTED_SIGN_IN_VERB}`, WIX_PLATFORM_SIGN_IN_ID].some((v2) => bundleJs.includes(v2)) && !AUTH_SIGN_IN_GATE.test(bundleJs)) return null;
200598
- const key4 = createHash37("sha1").update(bundleJs).digest("hex");
200782
+ const key4 = createHash38("sha1").update(bundleJs).digest("hex");
200599
200783
  const cached3 = PARSED.get(key4);
200600
200784
  if (cached3 !== void 0) return cached3;
200601
200785
  const found = parseMemberSignIn(bundleJs);
@@ -200840,7 +201024,7 @@ var init_account_screens_lint = __esm({
200840
201024
 
200841
201025
  // src/commands/template.ts
200842
201026
  import { mkdtempSync as mkdtempSync5, readFileSync as readFileSync92, existsSync as existsSync84, rmSync as rmSync24 } from "node:fs";
200843
- import { createHash as createHash38 } from "node:crypto";
201027
+ import { createHash as createHash39 } from "node:crypto";
200844
201028
  import { tmpdir as tmpdir6 } from "node:os";
200845
201029
  import { join as join82, resolve as resolve57, basename as basename22 } from "node:path";
200846
201030
  function embeddedTemplateCatalog() {
@@ -201242,7 +201426,7 @@ async function templateCommand(ctx) {
201242
201426
  if (!iconPath) return void 0;
201243
201427
  try {
201244
201428
  const bytes2 = readFileSync92(iconPath);
201245
- return { bytes: bytes2, hash: createHash38("sha256").update(bytes2).digest("hex") };
201429
+ return { bytes: bytes2, hash: createHash39("sha256").update(bytes2).digest("hex") };
201246
201430
  } catch {
201247
201431
  return void 0;
201248
201432
  }
@@ -201253,7 +201437,7 @@ async function templateCommand(ctx) {
201253
201437
  template: name,
201254
201438
  app: templateAppId,
201255
201439
  published: false,
201256
- sourceHash: createHash38("sha256").update(JSON.stringify(catalogView())).digest("hex"),
201440
+ sourceHash: createHash39("sha256").update(JSON.stringify(catalogView())).digest("hex"),
201257
201441
  iconHash: launcherIcon()?.hash ?? null
201258
201442
  });
201259
201443
  return 0;
@@ -201767,7 +201951,7 @@ __export(crawl_layers_exports, {
201767
201951
  renderMocksFrom: () => renderMocksFrom,
201768
201952
  tabRootScreens: () => tabRootScreens
201769
201953
  });
201770
- import { existsSync as existsSync87, readFileSync as readFileSync94, realpathSync as realpathSync10 } from "node:fs";
201954
+ import { existsSync as existsSync87, readFileSync as readFileSync94, realpathSync as realpathSync11 } from "node:fs";
201771
201955
  import { dirname as dirname49, join as join85, resolve as resolve59, sep as sep24 } from "node:path";
201772
201956
  async function loadContentConfigQuietly(dir) {
201773
201957
  try {
@@ -201855,9 +202039,9 @@ async function l10nSourceCatalogFile(dir) {
201855
202039
  const file2 = resolve59(l10nDir, `${tag2}.json`);
201856
202040
  if (!existsSync87(file2)) return null;
201857
202041
  try {
201858
- const realDir = realpathSync10(l10nDir);
201859
- const realFile = realpathSync10(file2);
201860
- if (!realDir.startsWith(realpathSync10(dir) + sep24) || dirname49(realFile) !== realDir) return null;
202042
+ const realDir = realpathSync11(l10nDir);
202043
+ const realFile = realpathSync11(file2);
202044
+ if (!realDir.startsWith(realpathSync11(dir) + sep24) || dirname49(realFile) !== realDir) return null;
201861
202045
  return { tag: tag2, text: readFileSync94(realFile, "utf8") };
201862
202046
  } catch {
201863
202047
  return null;
@@ -203889,7 +204073,7 @@ var init_command = __esm({
203889
204073
 
203890
204074
  // ../pre-pr-review/scope.mjs
203891
204075
  import { execFileSync as execFileSync6 } from "node:child_process";
203892
- import { createHash as createHash39 } from "node:crypto";
204076
+ import { createHash as createHash40 } from "node:crypto";
203893
204077
  import { resolve as resolve62, dirname as dirname51, isAbsolute as isAbsolute10, join as join88 } from "node:path";
203894
204078
  import { fileURLToPath as fileURLToPath32 } from "node:url";
203895
204079
  function resolveRepoRoot2(cwd = process.cwd()) {
@@ -203917,7 +204101,7 @@ function git(args, opts = {}) {
203917
204101
  }).toString();
203918
204102
  }
203919
204103
  function diffHash(diff) {
203920
- return createHash39("sha256").update(diff).digest("hex");
204104
+ return createHash40("sha256").update(diff).digest("hex");
203921
204105
  }
203922
204106
  var REPO_ROOT7, BASE_REF;
203923
204107
  var init_scope = __esm({
@@ -203941,7 +204125,7 @@ import {
203941
204125
  rmSync as rmSync25,
203942
204126
  writeFileSync as writeFileSync38
203943
204127
  } from "node:fs";
203944
- import { createHash as createHash40 } from "node:crypto";
204128
+ import { createHash as createHash41 } from "node:crypto";
203945
204129
  import { tmpdir as tmpdir7 } from "node:os";
203946
204130
  import { basename as basename23, dirname as dirname52, join as join89, resolve as resolve63 } from "node:path";
203947
204131
  import { pathToFileURL as pathToFileURL7 } from "node:url";
@@ -204019,7 +204203,7 @@ function stagedIdentity(head2, index, worktree) {
204019
204203
  }
204020
204204
  function blobOid(contents, algorithm2) {
204021
204205
  const body = Buffer.isBuffer(contents) ? contents : Buffer.from(contents);
204022
- return createHash40(algorithm2).update(Buffer.from(`blob ${body.byteLength}\0`)).update(body).digest("hex");
204206
+ return createHash41(algorithm2).update(Buffer.from(`blob ${body.byteLength}\0`)).update(body).digest("hex");
204023
204207
  }
204024
204208
  function validationDiffHash(cwd = process.cwd()) {
204025
204209
  const root = resolveRepoRoot2(cwd);
@@ -204193,7 +204377,7 @@ var init_diff_hash = __esm({
204193
204377
  run: () => {
204194
204378
  const { repo } = selfTestRepo({ withBase: true });
204195
204379
  try {
204196
- return validationDiffHash(repo) !== createHash40("sha256").update("validation-worktree-v2\0").digest("hex");
204380
+ return validationDiffHash(repo) !== createHash41("sha256").update("validation-worktree-v2\0").digest("hex");
204197
204381
  } finally {
204198
204382
  rmSync25(repo, { recursive: true, force: true });
204199
204383
  }
@@ -204377,12 +204561,12 @@ var init_attestation_lock = __esm({
204377
204561
 
204378
204562
  // src/attestation.ts
204379
204563
  import { execFileSync as execFileSync7 } from "node:child_process";
204380
- import { createHash as createHash41, randomBytes as randomBytes3 } from "node:crypto";
204564
+ import { createHash as createHash42, randomBytes as randomBytes3 } from "node:crypto";
204381
204565
  import {
204382
204566
  existsSync as existsSync90,
204383
204567
  lstatSync as lstatSync28,
204384
204568
  mkdirSync as mkdirSync39,
204385
- realpathSync as realpathSync11,
204569
+ realpathSync as realpathSync12,
204386
204570
  readlinkSync as readlinkSync2,
204387
204571
  readFileSync as readFileSync99,
204388
204572
  readdirSync as readdirSync41,
@@ -204449,7 +204633,7 @@ function currentGitDiffHash(contentDir2) {
204449
204633
  }
204450
204634
  function currentGitUntrackedHash(contentDir2) {
204451
204635
  const unresolved = resolve64(contentDir2);
204452
- const absolute2 = realpathSync11.native(unresolved);
204636
+ const absolute2 = realpathSync12.native(unresolved);
204453
204637
  const root = repoRoot(absolute2);
204454
204638
  if (!root) return sourceTreeHash(absolute2);
204455
204639
  const scope3 = relative19(root, absolute2) || ".";
@@ -204457,7 +204641,7 @@ function currentGitUntrackedHash(contentDir2) {
204457
204641
  encoding: "utf8",
204458
204642
  maxBuffer: GIT_HASH_MAX_BUFFER
204459
204643
  });
204460
- const hash3 = createHash41("sha256");
204644
+ const hash3 = createHash42("sha256");
204461
204645
  for (const path2 of listed.split("\0").filter(Boolean).sort()) {
204462
204646
  const local = relative19(absolute2, join91(root, path2));
204463
204647
  const segs = local.split(/[\\/]/);
@@ -204477,7 +204661,7 @@ function currentGitUntrackedHash(contentDir2) {
204477
204661
  return hash3.digest("hex");
204478
204662
  }
204479
204663
  function sourceTreeHash(root) {
204480
- const hash3 = createHash41("sha256");
204664
+ const hash3 = createHash42("sha256");
204481
204665
  const visit = (dir) => {
204482
204666
  for (const entry of readdirSync41(dir, { withFileTypes: true }).sort((a3, b3) => a3.name < b3.name ? -1 : a3.name > b3.name ? 1 : 0)) {
204483
204667
  if (entry.isDirectory() && (entry.name === ".git" || entry.name === "node_modules" || NOT_ATTESTED_DIRS.has(entry.name))) continue;
@@ -204773,7 +204957,7 @@ var init_attestation = __esm({
204773
204957
  DEFAULT_MAX_RUNS = 20;
204774
204958
  ATTESTATION_VERSION = 2;
204775
204959
  GIT_HASH_MAX_BUFFER = 128 * 1024 * 1024;
204776
- sha2565 = (bytes2) => createHash41("sha256").update(bytes2).digest("hex");
204960
+ sha2565 = (bytes2) => createHash42("sha256").update(bytes2).digest("hex");
204777
204961
  NOT_ATTESTED_DIRS = /* @__PURE__ */ new Set([".himi", ...AGENT_TOOLING_DIRS]);
204778
204962
  stringRecord = (value2) => !!value2 && typeof value2 === "object" && !Array.isArray(value2) && Object.values(value2).every((item2) => typeof item2 === "string");
204779
204963
  }
@@ -205652,7 +205836,7 @@ var init_one_app_visibility = __esm({
205652
205836
  });
205653
205837
 
205654
205838
  // src/one-app/custom-widgets.ts
205655
- import { createHash as createHash42 } from "node:crypto";
205839
+ import { createHash as createHash43 } from "node:crypto";
205656
205840
  function safeSettings(value2, depth = 0) {
205657
205841
  if (depth > 20) return null;
205658
205842
  if (typeof value2 === "string") return looksLikeCredential(value2) ? null : value2;
@@ -205665,7 +205849,7 @@ function safeSettings(value2, depth = 0) {
205665
205849
  function widgetKey(pageUri) {
205666
205850
  const segment3 = pageUri.split(/[/?#]/).filter(Boolean).at(-1) ?? "widget";
205667
205851
  const slug = segment3.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40) || "widget";
205668
- return `${slug}-${createHash42("sha256").update(pageUri).digest("hex").slice(0, 6)}`;
205852
+ return `${slug}-${createHash43("sha256").update(pageUri).digest("hex").slice(0, 6)}`;
205669
205853
  }
205670
205854
  function needsMember(rule) {
205671
205855
  const r3 = obj3(rule);
@@ -206459,7 +206643,7 @@ var init_header_badges = __esm({
206459
206643
  });
206460
206644
 
206461
206645
  // src/one-app/invite-drawer.ts
206462
- import { createHash as createHash43 } from "node:crypto";
206646
+ import { createHash as createHash44 } from "node:crypto";
206463
206647
  import ts23 from "typescript";
206464
206648
  function drawerOffersInvite(configText, profileHasRow = false) {
206465
206649
  const file2 = ts23.createSourceFile("config.ts", configText, ts23.ScriptTarget.Latest, true, ts23.ScriptKind.TS);
@@ -206496,7 +206680,7 @@ function withTranslationRow(catalogText2, row2, translation) {
206496
206680
  existing.translation = translation;
206497
206681
  if (typeof existing.key !== "string" || !existing.key) existing.key = row2.key;
206498
206682
  } else {
206499
- messages[`h_${createHash43("sha1").update(row2.source).digest("hex").slice(0, 12)}`] = { source: row2.source, key: row2.key, translation };
206683
+ messages[`h_${createHash44("sha1").update(row2.source).digest("hex").slice(0, 12)}`] = { source: row2.source, key: row2.key, translation };
206500
206684
  }
206501
206685
  return `${JSON.stringify({ ...catalog4, messages }, null, 2)}
206502
206686
  `;
@@ -206723,7 +206907,7 @@ var init_side_menu = __esm({
206723
206907
 
206724
206908
  // src/one-app/widget-run.ts
206725
206909
  import { spawnSync as spawnSync9 } from "node:child_process";
206726
- import { createHash as createHash44 } from "node:crypto";
206910
+ import { createHash as createHash45 } from "node:crypto";
206727
206911
  import { copyFileSync as copyFileSync3, existsSync as existsSync96, mkdirSync as mkdirSync41, mkdtempSync as mkdtempSync7, readFileSync as readFileSync107, rmSync as rmSync26, writeFileSync as writeFileSync41 } from "node:fs";
206728
206912
  import { tmpdir as tmpdir8 } from "node:os";
206729
206913
  import { dirname as dirname54, isAbsolute as isAbsolute13, join as join96, resolve as resolve67 } from "node:path";
@@ -206905,7 +207089,7 @@ var init_widget_run = __esm({
206905
207089
  WIDGET_RUN_SCHEMA = 1;
206906
207090
  fileSha = (path2) => {
206907
207091
  try {
206908
- return createHash44("sha256").update(readFileSync107(path2)).digest("hex");
207092
+ return createHash45("sha256").update(readFileSync107(path2)).digest("hex");
206909
207093
  } catch {
206910
207094
  return null;
206911
207095
  }
@@ -207202,7 +207386,7 @@ __export(coverage_exports, {
207202
207386
  verifyCoverage: () => verifyCoverage,
207203
207387
  verifyNativeProof: () => verifyNativeProof
207204
207388
  });
207205
- import { createHash as createHash45 } from "node:crypto";
207389
+ import { createHash as createHash46 } from "node:crypto";
207206
207390
  import { existsSync as existsSync97, readFileSync as readFileSync108, writeFileSync as writeFileSync42 } from "node:fs";
207207
207391
  import { isAbsolute as isAbsolute14, join as join97, resolve as resolve68 } from "node:path";
207208
207392
  function sectionVisibilityProof(record7, contentDir2) {
@@ -207722,7 +207906,7 @@ var init_coverage = __esm({
207722
207906
  CUSTOM_WIDGET_CHECKS = ["rendering", "visitor", "member", "access", "navigation", "data"];
207723
207907
  customWidgetTestName = (requirementId2, check) => `custom-widget ${requirementId2} ${check}`;
207724
207908
  obj9 = (v2) => v2 && typeof v2 === "object" && !Array.isArray(v2) ? v2 : {};
207725
- sha = (v2) => createHash45("sha256").update(v2).digest("hex");
207909
+ sha = (v2) => createHash46("sha256").update(v2).digest("hex");
207726
207910
  REQUIRED_CHECK = {
207727
207911
  route: "route-walkthrough",
207728
207912
  placement: "visual-comparison",
@@ -207749,7 +207933,7 @@ __export(validate_identity_exports, {
207749
207933
  ricosTexts: () => ricosTexts,
207750
207934
  runOneAppIdentityValidation: () => runOneAppIdentityValidation
207751
207935
  });
207752
- import { createHash as createHash46 } from "node:crypto";
207936
+ import { createHash as createHash47 } from "node:crypto";
207753
207937
  import { existsSync as existsSync98, readFileSync as readFileSync109, writeFileSync as writeFileSync43 } from "node:fs";
207754
207938
  import ts25 from "typescript";
207755
207939
  import { join as join98, resolve as resolve69 } from "node:path";
@@ -207837,7 +208021,7 @@ function fixAppName(configSource, slug, displayName3) {
207837
208021
  function sourceIdentity(evidenceDir) {
207838
208022
  const { manifest: manifest2, raw } = verifiedEvidence(evidenceDir);
207839
208023
  const bytes2 = readFileSync109(join98(evidenceDir, "business-context.json"));
207840
- const hash3 = createHash46("sha256").update(bytes2).digest("hex");
208024
+ const hash3 = createHash47("sha256").update(bytes2).digest("hex");
207841
208025
  if (obj10(manifest2.sha256)["business-context.json"] !== hash3) throw Error("business-context.json differs from the collected evidence.");
207842
208026
  const name = obj10(JSON.parse(bytes2.toString("utf8"))).displayName;
207843
208027
  if (typeof name !== "string" || !name.trim()) throw Error("The collected business display name is unavailable; recollect the source identity.");
@@ -207858,7 +208042,7 @@ function sourceIdentity(evidenceDir) {
207858
208042
  const pagesPath = join98(evidenceDir, "pages-content.json");
207859
208043
  if (existsSync98(pagesPath)) {
207860
208044
  const pagesBytes = readFileSync109(pagesPath);
207861
- if (obj10(manifest2.sha256)["pages-content.json"] !== createHash46("sha256").update(pagesBytes).digest("hex")) throw Error("pages-content.json differs from the collected evidence.");
208045
+ if (obj10(manifest2.sha256)["pages-content.json"] !== createHash47("sha256").update(pagesBytes).digest("hex")) throw Error("pages-content.json differs from the collected evidence.");
207862
208046
  for (const document2 of obj10(JSON.parse(pagesBytes.toString("utf8"))).documents ?? []) authoredText.push(...ricosTexts(obj10(obj10(document2).page).documentJson));
207863
208047
  }
207864
208048
  return { displayName: name, authoredText };
@@ -208719,7 +208903,7 @@ var init_home_invite = __esm({
208719
208903
 
208720
208904
  // src/one-app/access.ts
208721
208905
  import ts27 from "typescript";
208722
- import { createHash as createHash47 } from "node:crypto";
208906
+ import { createHash as createHash48 } from "node:crypto";
208723
208907
  import { isDeepStrictEqual } from "node:util";
208724
208908
  function gateKey(layoutItemId) {
208725
208909
  let out2 = "g_";
@@ -208779,7 +208963,7 @@ function planAccess(raw, screens, previous = []) {
208779
208963
  for (const gate of gates.filter((item2) => !written.has(item2.layoutItemId))) byKey.set(gate.key, [...byKey.get(gate.key) ?? [], gate]);
208780
208964
  for (const [key4, group] of byKey) {
208781
208965
  if (group.length < 2 && !writtenKeys.has(key4)) continue;
208782
- for (const gate of group) gate.key = `${key4}_${createHash47("sha256").update(gate.layoutItemId).digest("hex").slice(0, 10)}`;
208966
+ for (const gate of group) gate.key = `${key4}_${createHash48("sha256").update(gate.layoutItemId).digest("hex").slice(0, 10)}`;
208783
208967
  warnings.push(`layout items ${group.map((gate) => gate.layoutItemId).join(", ")} normalize to a gate key another page has: each gets a hash suffix`);
208784
208968
  }
208785
208969
  if (new Set(gates.map((gate) => gate.key)).size !== gates.length) throw new Error("two layout items still share a gate key after the hash suffix: rename one in the source");
@@ -208835,8 +209019,20 @@ function applyEdits(source2, edits) {
208835
209019
  return out2;
208836
209020
  }
208837
209021
  function parse3(fileName, source2) {
209022
+ parseStats.calls++;
209023
+ const key4 = `${fileName}\0${source2}`;
209024
+ if (parseMemo.has(key4)) {
209025
+ const hit = parseMemo.get(key4);
209026
+ parseMemo.delete(key4);
209027
+ parseMemo.set(key4, hit);
209028
+ return hit;
209029
+ }
209030
+ parseStats.runs++;
208838
209031
  const file2 = ts27.createSourceFile(fileName, source2, ts27.ScriptTarget.Latest, true, ts27.ScriptKind.TS);
208839
- return file2.parseDiagnostics.length ? void 0 : file2;
209032
+ const result = file2.parseDiagnostics.length ? void 0 : file2;
209033
+ parseMemo.set(key4, result);
209034
+ while (parseMemo.size > PARSE_MEMO_ENTRIES) parseMemo.delete(parseMemo.keys().next().value);
209035
+ return result;
208840
209036
  }
208841
209037
  function screensObject(file2) {
208842
209038
  for (const statement of file2.statements) {
@@ -209256,7 +209452,7 @@ function renderGateTable(gates) {
209256
209452
  ""
209257
209453
  ].join("\n");
209258
209454
  }
209259
- var obj15, text9, strings, mayHide, STOCK_COPY, node, SIGN_IN_SCREEN, CHAT_SCREEN, PLANS_SCREEN, slotPrefix, accessStatePath, accessRowHiddenPath, accessHiddenPath, slice, stringValue2, objectValue, PAYLOAD_KEYS, indented, LOGIN_HELPER, LOGIN_GATE_SCREEN, sameStatement, loginHelperSource, NEW_APP_NOT_LITERAL, NEW_APP_REASON;
209455
+ var obj15, text9, strings, mayHide, STOCK_COPY, node, SIGN_IN_SCREEN, CHAT_SCREEN, PLANS_SCREEN, slotPrefix, accessStatePath, accessRowHiddenPath, accessHiddenPath, PARSE_MEMO_ENTRIES, parseMemo, parseStats, slice, stringValue2, objectValue, PAYLOAD_KEYS, indented, LOGIN_HELPER, LOGIN_GATE_SCREEN, sameStatement, loginHelperSource, NEW_APP_NOT_LITERAL, NEW_APP_REASON;
209260
209456
  var init_access = __esm({
209261
209457
  "src/one-app/access.ts"() {
209262
209458
  init_define_HHP_CATALOG();
@@ -209285,6 +209481,9 @@ var init_access = __esm({
209285
209481
  accessStatePath = (gate) => `$app:${NAV_SERVICE}.accessState.${gate.key}`;
209286
209482
  accessRowHiddenPath = (gate) => `$app:${NAV_SERVICE}.accessHidden.${gate.key}`;
209287
209483
  accessHiddenPath = (gate) => `$service:${NAV_SERVICE}.accessHidden.${gate.key}`;
209484
+ PARSE_MEMO_ENTRIES = 3;
209485
+ parseMemo = /* @__PURE__ */ new Map();
209486
+ parseStats = { calls: 0, runs: 0 };
209288
209487
  slice = (source2, node4) => source2.slice(node4.getStart(), node4.getEnd());
209289
209488
  stringValue2 = (node4) => node4 && (ts27.isStringLiteral(node4) || ts27.isNoSubstitutionTemplateLiteral(node4)) ? node4.text : void 0;
209290
209489
  objectValue = (property3) => property3 && ts27.isObjectLiteralExpression(property3.initializer) ? property3.initializer : void 0;
@@ -209301,7 +209500,7 @@ ${indent}`);
209301
209500
  });
209302
209501
 
209303
209502
  // src/one-app/access-cli.ts
209304
- import { createHash as createHash48 } from "node:crypto";
209503
+ import { createHash as createHash49 } from "node:crypto";
209305
209504
  import { existsSync as existsSync100, readFileSync as readFileSync111, rmSync as rmSync28, statSync as statSync27, writeFileSync as writeFileSync44 } from "node:fs";
209306
209505
  import { join as join100, resolve as resolve70 } from "node:path";
209307
209506
  function parseArgs(args) {
@@ -209438,7 +209637,7 @@ function recordedLoginPolicy(evidenceDir) {
209438
209637
  const expected = manifest2.sha256?.["access-policy.json"];
209439
209638
  if (expected === void 0) return void 0;
209440
209639
  const bytes2 = readFileSync111(join100(evidenceDir, "access-policy.json"));
209441
- if (createHash48("sha256").update(bytes2).digest("hex") !== expected) throw new Error("access-policy.json does not match the hash recorded in manifest.json.");
209640
+ if (createHash49("sha256").update(bytes2).digest("hex") !== expected) throw new Error("access-policy.json does not match the hash recorded in manifest.json.");
209442
209641
  const value2 = JSON.parse(bytes2.toString("utf8")).visitorModeEnabled;
209443
209642
  return typeof value2 === "boolean" ? value2 : void 0;
209444
209643
  }
@@ -213266,7 +213465,7 @@ __export(validate_topbar_exports, {
213266
213465
  runOneAppTopBarValidation: () => runOneAppTopBarValidation,
213267
213466
  screenActions: () => screenActions2
213268
213467
  });
213269
- import { createHash as createHash49 } from "node:crypto";
213468
+ import { createHash as createHash50 } from "node:crypto";
213270
213469
  import { existsSync as existsSync105, readFileSync as readFileSync116, statSync as statSync28 } from "node:fs";
213271
213470
  import { resolve as resolve72, join as join105 } from "node:path";
213272
213471
  import ts30 from "typescript";
@@ -213734,7 +213933,7 @@ function readHashedEvidenceJson(evidenceDir, name) {
213734
213933
  const expected = object8(readJson9(join105(evidenceDir, "manifest.json")).sha256)?.[name];
213735
213934
  if (typeof expected !== "string" || !/^[a-f0-9]{64}$/i.test(expected)) throw new Error(`manifest.json records no hash for ${name}; recollect the source.`);
213736
213935
  const bytes2 = readFileSync116(path2);
213737
- if (createHash49("sha256").update(bytes2).digest("hex") !== expected) throw new Error(`${name} does not match the hash recorded in manifest.json; recollect the source.`);
213936
+ if (createHash50("sha256").update(bytes2).digest("hex") !== expected) throw new Error(`${name} does not match the hash recorded in manifest.json; recollect the source.`);
213738
213937
  return JSON.parse(bytes2.toString("utf8"));
213739
213938
  }
213740
213939
  function readVerifiedEvidence(evidenceDir, { runtime = "required" } = {}) {
@@ -213751,7 +213950,7 @@ function readVerifiedEvidence(evidenceDir, { runtime = "required" } = {}) {
213751
213950
  if (typeof expectedHash !== "string" || !/^[a-f0-9]{64}$/i.test(expectedHash)) {
213752
213951
  throw new Error("manifest.json is missing a valid raw-structure.json hash.");
213753
213952
  }
213754
- if (createHash49("sha256").update(rawBytes).digest("hex") !== expectedHash) {
213953
+ if (createHash50("sha256").update(rawBytes).digest("hex") !== expectedHash) {
213755
213954
  throw new Error("raw-structure.json does not match the hash recorded in manifest.json.");
213756
213955
  }
213757
213956
  const raw = JSON.parse(rawBytes.toString("utf8"));
@@ -213762,7 +213961,7 @@ function readVerifiedEvidence(evidenceDir, { runtime = "required" } = {}) {
213762
213961
  if (hash3 === void 0) continue;
213763
213962
  if (typeof hash3 !== "string" || !/^[a-f0-9]{64}$/i.test(hash3)) throw new Error(`Invalid ${name} hash.`);
213764
213963
  const bytes2 = readFileSync116(join105(evidenceDir, name));
213765
- if (createHash49("sha256").update(bytes2).digest("hex") !== hash3) throw new Error(`${name} does not match manifest.json.`);
213964
+ if (createHash50("sha256").update(bytes2).digest("hex") !== hash3) throw new Error(`${name} does not match manifest.json.`);
213766
213965
  views2[platform] = JSON.parse(bytes2.toString("utf8"));
213767
213966
  }
213768
213967
  return { raw, views: views2 };
@@ -215206,10 +215405,10 @@ var init_calls = __esm({
215206
215405
  });
215207
215406
 
215208
215407
  // ../../core/functions-runtime/src/queue.ts
215209
- import { createHash as createHash50 } from "node:crypto";
215408
+ import { createHash as createHash51 } from "node:crypto";
215210
215409
  function inputSchemaHash(definition) {
215211
215410
  const schema2 = definition.input;
215212
- return schema2 ? createHash50("sha256").update(JSON.stringify(schema2.descriptor ?? { kind: schema2.kind, optional: schema2.optional === true })).digest("hex") : "";
215411
+ return schema2 ? createHash51("sha256").update(JSON.stringify(schema2.descriptor ?? { kind: schema2.kind, optional: schema2.optional === true })).digest("hex") : "";
215213
215412
  }
215214
215413
  function createFunctionEnqueueCapability(options2) {
215215
215414
  return {
@@ -215276,14 +215475,14 @@ var init_queue = __esm({
215276
215475
  });
215277
215476
 
215278
215477
  // ../../core/data-resources/src/plan.ts
215279
- import { createHash as createHash51 } from "node:crypto";
215478
+ import { createHash as createHash52 } from "node:crypto";
215280
215479
  function canonical4(value2) {
215281
215480
  if (Array.isArray(value2)) return `[${value2.map(canonical4).join(",")}]`;
215282
215481
  if (value2 && typeof value2 === "object") return `{${Object.entries(value2).sort(([a3], [b3]) => a3.localeCompare(b3)).map(([key4, item2]) => `${JSON.stringify(key4)}:${canonical4(item2)}`).join(",")}}`;
215283
215482
  return JSON.stringify(value2);
215284
215483
  }
215285
215484
  function hashResourcePlan(plan) {
215286
- return createHash51("sha256").update(canonical4(plan)).digest("hex");
215485
+ return createHash52("sha256").update(canonical4(plan)).digest("hex");
215287
215486
  }
215288
215487
  function finalize(input) {
215289
215488
  return { ...input, hash: hashResourcePlan(input) };
@@ -215724,11 +215923,11 @@ function requestId(request2) {
215724
215923
  const supplied = request2.headers.get("x-request-id")?.trim();
215725
215924
  return supplied && /^[A-Za-z0-9._:-]{1,128}$/.test(supplied) ? supplied : globalThis.crypto?.randomUUID?.() ?? `req-${Date.now().toString(36)}`;
215726
215925
  }
215727
- async function digest(bytes2) {
215926
+ async function digest2(bytes2) {
215728
215927
  return Buffer.from(await globalThis.crypto.subtle.digest("SHA-256", Uint8Array.from(bytes2)));
215729
215928
  }
215730
215929
  async function integrity(bytes2) {
215731
- const digestBytes = await digest(bytes2);
215930
+ const digestBytes = await digest2(bytes2);
215732
215931
  return { hash: Buffer.from(digestBytes).toString("hex"), sri: `sha256-${Buffer.from(digestBytes).toString("base64")}` };
215733
215932
  }
215734
215933
  function resolveTarget3(pathname) {
@@ -216390,7 +216589,7 @@ var init_cli_bridge = __esm({
216390
216589
  });
216391
216590
 
216392
216591
  // src/mcp/file-tools.ts
216393
- import { closeSync as closeSync8, constants as constants6, lstatSync as lstatSync30, mkdirSync as mkdirSync42, openSync as openSync7, readdirSync as readdirSync44, readFileSync as readFileSync122, realpathSync as realpathSync12, renameSync as renameSync15, rmSync as rmSync30, statSync as statSync29, writeSync as writeSync2, existsSync as existsSync110 } from "node:fs";
216592
+ import { closeSync as closeSync8, constants as constants6, lstatSync as lstatSync30, mkdirSync as mkdirSync42, openSync as openSync7, readdirSync as readdirSync44, readFileSync as readFileSync122, realpathSync as realpathSync13, renameSync as renameSync15, rmSync as rmSync30, statSync as statSync29, writeSync as writeSync2, existsSync as existsSync110 } from "node:fs";
216394
216593
  import { randomBytes as randomBytes4 } from "node:crypto";
216395
216594
  import { dirname as dirname55, isAbsolute as isAbsolute15, join as join110, relative as relative21, resolve as resolve74, sep as sep26 } from "node:path";
216396
216595
  import * as z2 from "zod";
@@ -216406,7 +216605,7 @@ function realish(p2) {
216406
216605
  tail.unshift(cur.slice(up2.length + (up2.endsWith(sep26) ? 0 : 1)));
216407
216606
  cur = up2;
216408
216607
  }
216409
- return join110(realpathSync12(cur), ...tail);
216608
+ return join110(realpathSync13(cur), ...tail);
216410
216609
  }
216411
216610
  function symlinkComponent(base2, abs) {
216412
216611
  let cur = base2;
@@ -216424,7 +216623,7 @@ function workspaceRefusal(root, target) {
216424
216623
  const r3 = resolve74(root);
216425
216624
  const t2 = resolve74(r3, target);
216426
216625
  if (!existsSync110(r3)) return `the workspace folder ${r3} does not exist`;
216427
- if (!within(r3, t2) || !within(realpathSync12(r3), realish(t2))) return `"${target}" is outside the workspace folder ${r3}`;
216626
+ if (!within(r3, t2) || !within(realpathSync13(r3), realish(t2))) return `"${target}" is outside the workspace folder ${r3}`;
216428
216627
  const link4 = symlinkComponent(r3, t2);
216429
216628
  if (link4) return `"${link4}" is a symlink \u2014 paths must stay in real folders inside the workspace`;
216430
216629
  return null;
@@ -216433,7 +216632,7 @@ async function confinedAppDir(args, deps) {
216433
216632
  const root = resolve74(await deps.defaultDir());
216434
216633
  const dir = typeof args.dir === "string" && args.dir ? resolve74(root, args.dir) : root;
216435
216634
  if (!existsSync110(root)) return refuse5("no_workspace", `the workspace folder ${root} does not exist`);
216436
- if (!within(root, dir) || !within(realpathSync12(root), realish(dir))) return refuse5("outside_workspace", `"${String(args.dir)}" is outside the workspace folder`);
216635
+ if (!within(root, dir) || !within(realpathSync13(root), realish(dir))) return refuse5("outside_workspace", `"${String(args.dir)}" is outside the workspace folder`);
216437
216636
  const link4 = symlinkComponent(root, dir);
216438
216637
  if (link4) return refuse5("outside_workspace", `"${link4}" is a symlink \u2014 the app folder must be a real folder in the workspace`);
216439
216638
  const rel2 = relative21(root, dir);
@@ -216452,13 +216651,13 @@ function onDiskSpelling(abs) {
216452
216651
  tail.unshift(cur.slice(up2.length + (up2.endsWith(sep26) ? 0 : 1)));
216453
216652
  cur = up2;
216454
216653
  }
216455
- return join110(realpathSync12.native(cur), ...tail);
216654
+ return join110(realpathSync13.native(cur), ...tail);
216456
216655
  }
216457
216656
  function denied(appDir3, abs) {
216458
216657
  const rel2 = relative21(appDir3, abs);
216459
216658
  if (isDeniedSourcePath(rel2) || isDeniedSourcePath(rel2.toLowerCase())) return true;
216460
216659
  try {
216461
- return isDeniedSourcePath(relative21(realpathSync12.native(appDir3), onDiskSpelling(abs)));
216660
+ return isDeniedSourcePath(relative21(realpathSync13.native(appDir3), onDiskSpelling(abs)));
216462
216661
  } catch {
216463
216662
  return true;
216464
216663
  }
@@ -216470,7 +216669,7 @@ function confinedPath(appDir3, rel2) {
216470
216669
  const abs = resolve74(appDir3, rel2);
216471
216670
  if (!within(appDir3, abs) || abs === appDir3) return { error: `"${rel2}" is outside the app folder` };
216472
216671
  const real = realish(abs);
216473
- const base2 = existsSync110(appDir3) ? realpathSync12(appDir3) : realish(appDir3);
216672
+ const base2 = existsSync110(appDir3) ? realpathSync13(appDir3) : realish(appDir3);
216474
216673
  if (!within(base2, real) || real === base2) return { error: `"${rel2}" is outside the app folder` };
216475
216674
  const link4 = symlinkComponent(appDir3, abs);
216476
216675
  if (link4) return { error: `"${link4}" is a symlink, which this tool does not follow` };
@@ -216489,7 +216688,7 @@ function writeNoFollow2(appDir3, abs, content) {
216489
216688
  closeSync8(fd);
216490
216689
  }
216491
216690
  const link4 = symlinkComponent(appDir3, abs);
216492
- if (link4 || !within(realpathSync12(appDir3), realpathSync12(dirname55(abs)))) {
216691
+ if (link4 || !within(realpathSync13(appDir3), realpathSync13(dirname55(abs)))) {
216493
216692
  rmSync30(tmp, { force: true });
216494
216693
  throw new Error(`"${link4 ?? relative21(appDir3, dirname55(abs))}" changed into a link while writing`);
216495
216694
  }
@@ -218140,11 +218339,11 @@ function ignoreMissing(e2) {
218140
218339
  if (e2.code !== "ENOENT")
218141
218340
  throw e2;
218142
218341
  }
218143
- var randomUUID11, createHash52, link, mkdir2, open, readFile3, rename, rm, rmdir, stat2, unlink, join112, MemoryLockStore, FileLockStore;
218342
+ var randomUUID11, createHash53, link, mkdir2, open, readFile3, rename, rm, rmdir, stat2, unlink, join112, MemoryLockStore, FileLockStore;
218144
218343
  var init_lock = __esm({
218145
218344
  "../../node_modules/@wix/asc-core/dist/ports/lock.js"() {
218146
218345
  init_define_HHP_CATALOG();
218147
- ({ randomUUID: randomUUID11, createHash: createHash52 } = __ascBuiltin03);
218346
+ ({ randomUUID: randomUUID11, createHash: createHash53 } = __ascBuiltin03);
218148
218347
  ({ link, mkdir: mkdir2, open, readFile: readFile3, rename, rm, rmdir, stat: stat2, unlink } = __ascBuiltin12);
218149
218348
  ({ join: join112 } = __ascBuiltin2);
218150
218349
  MemoryLockStore = class {
@@ -218228,7 +218427,7 @@ var init_lock = __esm({
218228
218427
  return lease2 && lease2.expiresAt > this.now() ? lease2 : void 0;
218229
218428
  }
218230
218429
  path(key4) {
218231
- return join112(this.dir, `${createHash52("sha256").update(lockName(key4)).digest("hex").slice(0, 32)}.lock`);
218430
+ return join112(this.dir, `${createHash53("sha256").update(lockName(key4)).digest("hex").slice(0, 32)}.lock`);
218232
218431
  }
218233
218432
  /** Written whole to a temp file, then hard-linked into place: the link fails if the lock exists, and a reader never sees a half-written lock. */
218234
218433
  async create(key4, lease2) {
@@ -218669,7 +218868,7 @@ import * as __ascBuiltin04 from "node:crypto";
218669
218868
  import * as __ascBuiltin13 from "node:fs";
218670
218869
  import * as __ascBuiltin22 from "node:fs/promises";
218671
218870
  async function sha256OfFile(path2) {
218672
- const hash3 = createHash53("sha256");
218871
+ const hash3 = createHash54("sha256");
218673
218872
  for await (const chunk2 of createReadStream2(path2))
218674
218873
  hash3.update(chunk2);
218675
218874
  return hash3.digest("hex");
@@ -218787,13 +218986,13 @@ async function readAnswer(t2, label4, assumeEnd, send2) {
218787
218986
  }
218788
218987
  return { failed: await t2.failure("PUT", "upload session", response) };
218789
218988
  }
218790
- var createHash53, createReadStream2, open2, stat3, DEFAULT_CHUNK_BYTES, CONTENT_TYPE, RESUMABLE_KINDS;
218989
+ var createHash54, createReadStream2, open2, stat3, DEFAULT_CHUNK_BYTES, CONTENT_TYPE, RESUMABLE_KINDS;
218791
218990
  var init_upload = __esm({
218792
218991
  "../../node_modules/@wix/gplay-api/dist/upload.js"() {
218793
218992
  init_define_HHP_CATALOG();
218794
218993
  init_errors3();
218795
218994
  init_transport();
218796
- ({ createHash: createHash53 } = __ascBuiltin04);
218995
+ ({ createHash: createHash54 } = __ascBuiltin04);
218797
218996
  ({ createReadStream: createReadStream2 } = __ascBuiltin13);
218798
218997
  ({ open: open2, stat: stat3 } = __ascBuiltin22);
218799
218998
  DEFAULT_CHUNK_BYTES = 8 * 1024 * 1024;
@@ -219066,7 +219265,7 @@ function grantId(target) {
219066
219265
  return { packageName };
219067
219266
  }
219068
219267
  async function sendDataSafety(api4, stateDir2, packageName, csv2, nowMs = Date.now()) {
219069
- const sha2569 = createHash54("sha256").update(csv2).digest("hex");
219268
+ const sha2569 = createHash55("sha256").update(csv2).digest("hex");
219070
219269
  const dir = dataSafetyRecordDir(stateDir2, packageName);
219071
219270
  await mkdir3(dir, { recursive: true, mode: 448 });
219072
219271
  const record7 = join113(dir, `${new Date(nowMs).toISOString().replace(/[:.]/g, "-")}-${sha2569.slice(0, 12)}.csv`);
@@ -219080,7 +219279,7 @@ async function sendDataSafety(api4, stateDir2, packageName, csv2, nowMs = Date.n
219080
219279
  }
219081
219280
  return { sha256: sha2569, record: record7 };
219082
219281
  }
219083
- var createHash54, mkdir3, rm2, writeFile2, join113, V3, MAX_PAGES, enc, GplayApi, dataSafetyRecordDir;
219282
+ var createHash55, mkdir3, rm2, writeFile2, join113, V3, MAX_PAGES, enc, GplayApi, dataSafetyRecordDir;
219084
219283
  var init_api = __esm({
219085
219284
  "../../node_modules/@wix/gplay-api/dist/api.js"() {
219086
219285
  init_define_HHP_CATALOG();
@@ -219088,7 +219287,7 @@ var init_api = __esm({
219088
219287
  init_edit();
219089
219288
  init_firebase();
219090
219289
  init_transport();
219091
- ({ createHash: createHash54 } = __ascBuiltin05);
219290
+ ({ createHash: createHash55 } = __ascBuiltin05);
219092
219291
  ({ mkdir: mkdir3, rm: rm2, writeFile: writeFile2 } = __ascBuiltin14);
219093
219292
  ({ join: join113 } = __ascBuiltin23);
219094
219293
  V3 = "/androidpublisher/v3";
@@ -219273,7 +219472,7 @@ async function readOAuthClientFile(path2) {
219273
219472
  async function loginWithOAuthClient(options2) {
219274
219473
  const { client: client4 } = options2;
219275
219474
  const verifier2 = randomBytes5(48).toString("base64url");
219276
- const challenge = createHash55("sha256").update(verifier2).digest("base64url");
219475
+ const challenge = createHash56("sha256").update(verifier2).digest("base64url");
219277
219476
  const state = randomBytes5(16).toString("hex");
219278
219477
  let redirect = "";
219279
219478
  const code3 = await new Promise((resolve141, reject) => {
@@ -219340,7 +219539,7 @@ function parseStored(text32, where) {
219340
219539
  throw new AuthError(`the sign-in stored in ${where} is incomplete`);
219341
219540
  return user;
219342
219541
  }
219343
- var spawn7, createHash55, randomBytes5, chmod, mkdir4, readFile4, rename2, rm3, writeFile3, createServer4, homedir10, dirname58, join114, PLAY_SCOPES, TOKEN_URI, RefreshTokenAuth, execCommand, GOOGLE_OAUTH_HOSTS, FileCredentialStore, SECURITY_NOT_FOUND, KeychainCredentialStore;
219542
+ var spawn7, createHash56, randomBytes5, chmod, mkdir4, readFile4, rename2, rm3, writeFile3, createServer4, homedir10, dirname58, join114, PLAY_SCOPES, TOKEN_URI, RefreshTokenAuth, execCommand, GOOGLE_OAUTH_HOSTS, FileCredentialStore, SECURITY_NOT_FOUND, KeychainCredentialStore;
219344
219543
  var init_auth2 = __esm({
219345
219544
  "../../node_modules/@wix/gplay-api/dist/auth.js"() {
219346
219545
  init_define_HHP_CATALOG();
@@ -219348,7 +219547,7 @@ var init_auth2 = __esm({
219348
219547
  init_errors3();
219349
219548
  init_transport();
219350
219549
  ({ spawn: spawn7 } = __ascBuiltin06);
219351
- ({ createHash: createHash55, randomBytes: randomBytes5 } = __ascBuiltin15);
219550
+ ({ createHash: createHash56, randomBytes: randomBytes5 } = __ascBuiltin15);
219352
219551
  ({ chmod, mkdir: mkdir4, readFile: readFile4, rename: rename2, rm: rm3, writeFile: writeFile3 } = __ascBuiltin24);
219353
219552
  ({ createServer: createServer4 } = __ascBuiltin3);
219354
219553
  ({ homedir: homedir10 } = __ascBuiltin4);
@@ -223670,9 +223869,9 @@ function pkcs12Kdf2(hash3, password, salt, id, iterations, n2) {
223670
223869
  const out2 = [];
223671
223870
  let produced = 0;
223672
223871
  while (produced < n2) {
223673
- let A2 = createHash56(hash3).update(D2).update(I2).digest();
223872
+ let A2 = createHash57(hash3).update(D2).update(I2).digest();
223674
223873
  for (let r3 = 1; r3 < iterations; r3++)
223675
- A2 = createHash56(hash3).update(A2).digest();
223874
+ A2 = createHash57(hash3).update(A2).digest();
223676
223875
  out2.push(A2);
223677
223876
  produced += A2.length;
223678
223877
  const B2 = fill(A2, v2);
@@ -223898,7 +224097,7 @@ function pbes2Encrypt(plain5, password, iterations) {
223898
224097
  }
223899
224098
  function writePkcs12(options2) {
223900
224099
  const iterations = options2.iterations ?? 1e4;
223901
- const localKeyId = createHash56("sha1").update(options2.certificate.raw).digest();
224100
+ const localKeyId = createHash57("sha1").update(options2.certificate.raw).digest();
223902
224101
  const attrs = set2(attribute(OID2.friendlyName, bmpString(options2.alias)), attribute(OID2.localKeyId, octetString(localKeyId)));
223903
224102
  const pkcs8 = options2.privateKey.export({ type: "pkcs8", format: "der" });
223904
224103
  const shrouded = pbes2Encrypt(pkcs8, options2.password, iterations);
@@ -223914,14 +224113,14 @@ function writePkcs12(options2) {
223914
224113
  const macData = sequence(sequence(algorithm(OID2.sha256, nullValue()), octetString(mac)), octetString(macSalt), integer(iterations));
223915
224114
  return sequence(integer(3), contentInfo(OID2.data, octetString(authSafe)), macData);
223916
224115
  }
223917
- var X509Certificate2, createCipheriv, createDecipheriv2, createHash56, createHmac, createPrivateKey4, createPublicKey2, pbkdf2Sync2, randomBytes6, timingSafeEqual, Pkcs12Error, ID_KEY, ID_IV, ID_MAC, blockSize, MAX_ITERATIONS, implicitOctets, spki, attribute, contentInfo;
224116
+ var X509Certificate2, createCipheriv, createDecipheriv2, createHash57, createHmac, createPrivateKey4, createPublicKey2, pbkdf2Sync2, randomBytes6, timingSafeEqual, Pkcs12Error, ID_KEY, ID_IV, ID_MAC, blockSize, MAX_ITERATIONS, implicitOctets, spki, attribute, contentInfo;
223918
224117
  var init_pkcs122 = __esm({
223919
224118
  "../../node_modules/@wix/gplay-api/dist/signing/pkcs12.js"() {
223920
224119
  init_define_HHP_CATALOG();
223921
224120
  init_der();
223922
224121
  init_oids();
223923
224122
  init_rc2();
223924
- ({ X509Certificate: X509Certificate2, createCipheriv, createDecipheriv: createDecipheriv2, createHash: createHash56, createHmac, createPrivateKey: createPrivateKey4, createPublicKey: createPublicKey2, pbkdf2Sync: pbkdf2Sync2, randomBytes: randomBytes6, timingSafeEqual } = __ascBuiltin012);
224123
+ ({ X509Certificate: X509Certificate2, createCipheriv, createDecipheriv: createDecipheriv2, createHash: createHash57, createHmac, createPrivateKey: createPrivateKey4, createPublicKey: createPublicKey2, pbkdf2Sync: pbkdf2Sync2, randomBytes: randomBytes6, timingSafeEqual } = __ascBuiltin012);
223925
224124
  Pkcs12Error = class extends Error {
223926
224125
  reason;
223927
224126
  constructor(reason, message5) {
@@ -223951,7 +224150,7 @@ function selfSignedCertificate(options2) {
223951
224150
  const signingKey = options2.issuer?.privateKey ?? options2.privateKey;
223952
224151
  const spki2 = createPublicKey3(options2.privateKey).export({ type: "spki", format: "der" });
223953
224152
  const keyBits = child2(parse4(spki2), 1).value.subarray(1);
223954
- const ski = createHash57("sha1").update(keyBits).digest();
224153
+ const ski = createHash58("sha1").update(keyBits).digest();
223955
224154
  const serial = randomBytes7(16);
223956
224155
  serial[0] &= 127;
223957
224156
  if (serial[0] === 0)
@@ -223961,13 +224160,13 @@ function selfSignedCertificate(options2) {
223961
224160
  const signature2 = sign2("sha256", tbs, signingKey);
223962
224161
  return new X509Certificate3(sequence(tbs, signatureAlg, bitString(signature2)));
223963
224162
  }
223964
- var X509Certificate3, createHash57, createPublicKey3, randomBytes7, sign2, cn2;
224163
+ var X509Certificate3, createHash58, createPublicKey3, randomBytes7, sign2, cn2;
223965
224164
  var init_x509 = __esm({
223966
224165
  "../../node_modules/@wix/gplay-api/dist/signing/x509.js"() {
223967
224166
  init_define_HHP_CATALOG();
223968
224167
  init_der();
223969
224168
  init_oids();
223970
- ({ X509Certificate: X509Certificate3, createHash: createHash57, createPublicKey: createPublicKey3, randomBytes: randomBytes7, sign: sign2 } = __ascBuiltin013);
224169
+ ({ X509Certificate: X509Certificate3, createHash: createHash58, createPublicKey: createPublicKey3, randomBytes: randomBytes7, sign: sign2 } = __ascBuiltin013);
223971
224170
  cn2 = (commonName) => sequence(set2(sequence(oid(OID2.commonName), utf8String(commonName))));
223972
224171
  }
223973
224172
  });
@@ -224071,7 +224270,7 @@ async function localImage(path2) {
224071
224270
  if (!contentType)
224072
224271
  throw new GplayError("refused", `${path2}: a store image is PNG, JPEG or WebP`);
224073
224272
  const bytes2 = await readFile7(path2);
224074
- return { path: path2, bytes: bytes2, contentType, sha256: createHash58("sha256").update(bytes2).digest("hex") };
224273
+ return { path: path2, bytes: bytes2, contentType, sha256: createHash59("sha256").update(bytes2).digest("hex") };
224075
224274
  }
224076
224275
  async function readListingDir(dir) {
224077
224276
  if (!await stat5(dir).then((s5) => s5.isDirectory(), () => false))
@@ -224219,7 +224418,7 @@ async function writeListingDir(dir, pulled) {
224219
224418
  }
224220
224419
  async function folderSha256(dir) {
224221
224420
  const files = await folderFiles(dir);
224222
- const hash3 = createHash58("sha256");
224421
+ const hash3 = createHash59("sha256");
224223
224422
  for (const { rel: rel2, path: path2 } of files) {
224224
224423
  const content = await readFile7(path2);
224225
224424
  hash3.update(`${rel2}\0${content.length}\0`);
@@ -224260,12 +224459,12 @@ async function folderFiles(dir) {
224260
224459
  await walk6(root);
224261
224460
  return out2.sort((a3, b3) => a3.rel < b3.rel ? -1 : a3.rel > b3.rel ? 1 : 0);
224262
224461
  }
224263
- var createHash58, lstat, mkdir8, readdir2, readFile7, realpath2, stat5, writeFile6, extname5, join119, relative23, resolve79, sep27, SINGLE_IMAGE_TYPES, MANY_IMAGE_TYPES, IMAGE_TYPES, CONTENT_TYPES2, FIELD_FILES, LISTING_LANGUAGE, DETAIL_FIELDS, TEXT_LIMITS, MAX_SCREENSHOTS, readIfThere, listDir2, same3;
224462
+ var createHash59, lstat, mkdir8, readdir2, readFile7, realpath2, stat5, writeFile6, extname5, join119, relative23, resolve79, sep27, SINGLE_IMAGE_TYPES, MANY_IMAGE_TYPES, IMAGE_TYPES, CONTENT_TYPES2, FIELD_FILES, LISTING_LANGUAGE, DETAIL_FIELDS, TEXT_LIMITS, MAX_SCREENSHOTS, readIfThere, listDir2, same3;
224264
224463
  var init_listing = __esm({
224265
224464
  "../../node_modules/@wix/gplay-api/dist/listing.js"() {
224266
224465
  init_define_HHP_CATALOG();
224267
224466
  init_errors3();
224268
- ({ createHash: createHash58 } = __ascBuiltin015);
224467
+ ({ createHash: createHash59 } = __ascBuiltin015);
224269
224468
  ({ lstat, mkdir: mkdir8, readdir: readdir2, readFile: readFile7, realpath: realpath2, stat: stat5, writeFile: writeFile6 } = __ascBuiltin111);
224270
224469
  ({ extname: extname5, join: join119, relative: relative23, resolve: resolve79, sep: sep27 } = __ascBuiltin26);
224271
224470
  SINGLE_IMAGE_TYPES = ["icon", "featureGraphic", "tvBanner"];
@@ -225258,13 +225457,13 @@ function verifyJar(input) {
225258
225457
  });
225259
225458
  if (!signer2)
225260
225459
  throw new JarError("the signer's certificate isn't in the block");
225261
- const digest2 = DIGEST_BY_OID[readOid2(child2(child2(si2, 2), 0))];
225262
- if (!digest2)
225460
+ const digest3 = DIGEST_BY_OID[readOid2(child2(child2(si2, 2), 0))];
225461
+ if (!digest3)
225263
225462
  throw new JarError("unknown digest in signer info");
225264
225463
  if (si2.children[3]?.tag === 160)
225265
225464
  throw new JarError("signed attributes aren't expected in a block this code wrote");
225266
225465
  const signature2 = child2(si2, 4, TAG.OCTET_STRING).value;
225267
- if (!verify(digest2, sf2, createPublicKey4(signer2.publicKey.export({ type: "spki", format: "pem" })), signature2))
225466
+ if (!verify(digest3, sf2, createPublicKey4(signer2.publicKey.export({ type: "spki", format: "pem" })), signature2))
225268
225467
  throw new JarError("the signature over the .SF doesn't verify");
225269
225468
  const sfSections = parseSections(sf2);
225270
225469
  const sfMain = sfSections[0]?.attrs;
@@ -225301,19 +225500,19 @@ function verifyJar(input) {
225301
225500
  throw new JarError(`the manifest names ${name}, which isn't in the zip`);
225302
225501
  return { signer: signer2, entries: count3, signatureFile: sfName };
225303
225502
  }
225304
- var X509Certificate4, createHash59, createPublicKey4, sign3, verify, JarError, CRLF, CREATED_BY, b64;
225503
+ var X509Certificate4, createHash60, createPublicKey4, sign3, verify, JarError, CRLF, CREATED_BY, b64;
225305
225504
  var init_jar = __esm({
225306
225505
  "../../node_modules/@wix/gplay-api/dist/signing/jar.js"() {
225307
225506
  init_define_HHP_CATALOG();
225308
225507
  init_der();
225309
225508
  init_oids();
225310
225509
  init_zip();
225311
- ({ X509Certificate: X509Certificate4, createHash: createHash59, createPublicKey: createPublicKey4, sign: sign3, verify } = __ascBuiltin019);
225510
+ ({ X509Certificate: X509Certificate4, createHash: createHash60, createPublicKey: createPublicKey4, sign: sign3, verify } = __ascBuiltin019);
225312
225511
  JarError = class extends Error {
225313
225512
  };
225314
225513
  CRLF = "\r\n";
225315
225514
  CREATED_BY = "gplay-node";
225316
- b64 = (data) => createHash59("sha256").update(data).digest("base64");
225515
+ b64 = (data) => createHash60("sha256").update(data).digest("base64");
225317
225516
  }
225318
225517
  });
225319
225518
 
@@ -225922,7 +226121,7 @@ function canonical5(value2) {
225922
226121
  return JSON.stringify(value2);
225923
226122
  }
225924
226123
  function planHash(action, params, accountKey3, plan) {
225925
- return createHash60("sha256").update(canonical5({ action, params, issuerId: accountKey3, plan })).digest("hex");
226124
+ return createHash61("sha256").update(canonical5({ action, params, issuerId: accountKey3, plan })).digest("hex");
225926
226125
  }
225927
226126
  function jobErrorCode(e2) {
225928
226127
  return e2 instanceof JobError ? e2.entries[0]?.code : void 0;
@@ -225935,12 +226134,12 @@ function requireGoogle(ctx) {
225935
226134
  function newJobId() {
225936
226135
  return `job_${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10).replace(/-/g, "")}_${randomUUID12().slice(0, 8)}`;
225937
226136
  }
225938
- var createHash60, randomUUID12, mkdir11, readFile11, readdir5, rename3, writeFile10, join122, isGoogleAccount, JobError, MemoryJobStore, FileJobStore;
226137
+ var createHash61, randomUUID12, mkdir11, readFile11, readdir5, rename3, writeFile10, join122, isGoogleAccount, JobError, MemoryJobStore, FileJobStore;
225939
226138
  var init_job = __esm({
225940
226139
  "../../node_modules/@wix/asc-jobs/dist/job.js"() {
225941
226140
  init_define_HHP_CATALOG();
225942
226141
  init_kernel();
225943
- ({ createHash: createHash60, randomUUID: randomUUID12 } = __ascBuiltin021);
226142
+ ({ createHash: createHash61, randomUUID: randomUUID12 } = __ascBuiltin021);
225944
226143
  ({ mkdir: mkdir11, readFile: readFile11, readdir: readdir5, rename: rename3, writeFile: writeFile10 } = __ascBuiltin115);
225945
226144
  ({ join: join122 } = __ascBuiltin27);
225946
226145
  isGoogleAccount = (a3) => a3.kind === "google";
@@ -226703,7 +226902,7 @@ function checkCsvPin(csv2, sha2569, file2) {
226703
226902
  if (sha2569 === void 0)
226704
226903
  return;
226705
226904
  const want = text12(sha2569, "sha256").toLowerCase();
226706
- const got = createHash61("sha256").update(csv2).digest("hex");
226905
+ const got = createHash62("sha256").update(csv2).digest("hex");
226707
226906
  if (got !== want)
226708
226907
  throw refuse6(`${file2} hashes to ${got.slice(0, 12)}, not the approved ${want.slice(0, 12)}; nothing was sent`);
226709
226908
  }
@@ -226752,14 +226951,14 @@ function rolloutAction(p2) {
226752
226951
  throw refuse6(`action is set, halt, resume or complete (got ${JSON.stringify(p2.action)})`);
226753
226952
  }
226754
226953
  }
226755
- var createHash61, mkdtemp, readFile12, rm8, stat8, basename29, join124, resolve80, trackReleases, commitOf, notesOf, flag, bundleUpload, LISTING_FIELDS, listingApply, isDeveloperId, dataSafetyApply, sameSet, NOT_CLOSED_TRACKS, closedTestSetup, sameRelease, sameAsWanted, releasePromote, rolloutChangeAction, EDIT_ACTIONS;
226954
+ var createHash62, mkdtemp, readFile12, rm8, stat8, basename29, join124, resolve80, trackReleases, commitOf, notesOf, flag, bundleUpload, LISTING_FIELDS, listingApply, isDeveloperId, dataSafetyApply, sameSet, NOT_CLOSED_TRACKS, closedTestSetup, sameRelease, sameAsWanted, releasePromote, rolloutChangeAction, EDIT_ACTIONS;
226756
226955
  var init_actions_edit = __esm({
226757
226956
  "../../node_modules/@wix/gplay-jobs/dist/actions-edit.js"() {
226758
226957
  init_define_HHP_CATALOG();
226759
226958
  init_dist();
226760
226959
  init_clients();
226761
226960
  init_common();
226762
- ({ createHash: createHash61 } = __ascBuiltin025);
226961
+ ({ createHash: createHash62 } = __ascBuiltin025);
226763
226962
  ({ mkdtemp, readFile: readFile12, rm: rm8, stat: stat8 } = __ascBuiltin118);
226764
226963
  ({ basename: basename29, join: join124, resolve: resolve80 } = __ascBuiltin28);
226765
226964
  trackReleases = (tracks, track2) => tracks.find((t2) => t2.track === track2)?.releases ?? [];
@@ -226903,7 +227102,7 @@ var init_actions_edit = __esm({
226903
227102
  const { appId: appId3, developerId } = await readPlanRecord(clients.stateDir, packageName);
226904
227103
  if (developerId && developerId !== clients.account.developerId)
226905
227104
  throw refuse6(`${packageName} is recorded under developer ${developerId}, not this job's ${clients.account.developerId}`);
226906
- const sha2569 = createHash61("sha256").update(csv2).digest("hex");
227105
+ const sha2569 = createHash62("sha256").update(csv2).digest("hex");
226907
227106
  const changes = [change("update", "dataSafety", `replace the Data safety declaration with ${basename29(p2.csv)}: ${summary2.answered} answered rows over ${summary2.questionsAnswered} questions`)];
226908
227107
  if (appId3 && clients.console && isDeveloperId(clients.account.developerId)) {
226909
227108
  return { changes, sideEffects: ["the whole declaration is replaced; Play shows it on the store listing"], facts: { sha256: sha2569, rows: summary2.rows, answered: summary2.answered, appId: appId3 } };
@@ -226927,7 +227126,7 @@ var init_actions_edit = __esm({
226927
227126
  if (!applied)
226928
227127
  return { ok: false, detail: "the write's outcome is unknown, and no API reads Data safety back: check Play Console, App content, Data safety, then plan again" };
226929
227128
  const record7 = applied.ids[1];
226930
- const kept = record7 ? await readFile12(record7, "utf8").then((t2) => createHash61("sha256").update(t2).digest("hex"), () => void 0) : void 0;
227129
+ const kept = record7 ? await readFile12(record7, "utf8").then((t2) => createHash62("sha256").update(t2).digest("hex"), () => void 0) : void 0;
226931
227130
  return kept === plan.facts.sha256 ? { ok: true, detail: `Google accepted it; no API reads Data safety back, so the record at ${record7} (sha256 ${kept}) is what was sent. Check Play Console, App content, Data safety` } : { ok: false, detail: `the record of what was sent (${record7 ?? "none"}) isn't the planned CSV` };
226932
227131
  }
226933
227132
  const appId3 = String(plan.facts.appId);
@@ -228458,7 +228657,7 @@ function canonicalJson3(value2) {
228458
228657
  return JSON.stringify(canon2(value2));
228459
228658
  }
228460
228659
  function recordFileSha256(value2) {
228461
- return createHash62("sha256").update(canonicalJson3(value2)).digest("hex");
228660
+ return createHash63("sha256").update(canonicalJson3(value2)).digest("hex");
228462
228661
  }
228463
228662
  function logLineKey(log, line) {
228464
228663
  const job = typeof line.jobId === "string" ? line.jobId : void 0;
@@ -228468,11 +228667,11 @@ function logLineKey(log, line) {
228468
228667
  return job !== void 0 || approval !== void 0 ? `job:${job ?? ""}
228469
228668
  approval:${approval ?? ""}` : `line:${canonicalJson3(line)}`;
228470
228669
  }
228471
- var createHash62;
228670
+ var createHash63;
228472
228671
  var init_canonical = __esm({
228473
228672
  "../../node_modules/@wix/asc-core/dist/store-record/canonical.js"() {
228474
228673
  init_define_HHP_CATALOG();
228475
- ({ createHash: createHash62 } = __ascBuiltin030);
228674
+ ({ createHash: createHash63 } = __ascBuiltin030);
228476
228675
  }
228477
228676
  });
228478
228677
 
@@ -228523,13 +228722,13 @@ function textDigest(v2) {
228523
228722
  if (typeof v2 !== "string")
228524
228723
  return v2 === null ? { set: false } : void 0;
228525
228724
  const text32 = v2.replace(/\r\n?/g, "\n").trim();
228526
- return text32 ? { set: true, sha256: createHash63("sha256").update(text32).digest("hex"), length: text32.length } : { set: false };
228725
+ return text32 ? { set: true, sha256: createHash64("sha256").update(text32).digest("hex"), length: text32.length } : { set: false };
228527
228726
  }
228528
- var createHash63;
228727
+ var createHash64;
228529
228728
  var init_text = __esm({
228530
228729
  "../../node_modules/@wix/asc-core/dist/store-record/text.js"() {
228531
228730
  init_define_HHP_CATALOG();
228532
- ({ createHash: createHash63 } = __ascBuiltin031);
228731
+ ({ createHash: createHash64 } = __ascBuiltin031);
228533
228732
  }
228534
228733
  });
228535
228734
 
@@ -229211,7 +229410,7 @@ function tieReason(slot, file2) {
229211
229410
  const what = slot === "live" && file2.live?.fetched ? "live (or one of its reads)" : slot;
229212
229411
  return `both copies wrote ${what} at the same time (${slotTime(file2, slot)}) with different data; each side keeps its own until one writes it again`;
229213
229412
  }
229214
- var createHash64, SYNC_LIMITS, LOGS, LOG_SET, SLOTS2, SLOT_TIME, ENVELOPE_KEYS, SCHEMA_RE, SEGMENT_RE, SHA_RE, ISO_UTC_RE, OLD_KEY, MB, isObject, bytesOf, statusOf2, codeOf, errorOf, sha256Of3;
229413
+ var createHash65, SYNC_LIMITS, LOGS, LOG_SET, SLOTS2, SLOT_TIME, ENVELOPE_KEYS, SCHEMA_RE, SEGMENT_RE, SHA_RE, ISO_UTC_RE, OLD_KEY, MB, isObject, bytesOf, statusOf2, codeOf, errorOf, sha256Of3;
229215
229414
  var init_sync = __esm({
229216
229415
  "../../node_modules/@wix/asc-core/dist/store-record/sync.js"() {
229217
229416
  init_define_HHP_CATALOG();
@@ -229219,7 +229418,7 @@ var init_sync = __esm({
229219
229418
  init_canonical();
229220
229419
  init_envelope();
229221
229420
  init_secrets2();
229222
- ({ createHash: createHash64 } = __ascBuiltin032);
229421
+ ({ createHash: createHash65 } = __ascBuiltin032);
229223
229422
  SYNC_LIMITS = { fileBytes: 1024 * 1024, blobBytes: 4 * 1024 * 1024, images: 100, imageBytes: 32 * 1024 * 1024, files: 500, clockSkewMs: 10 * 60 * 1e3 };
229224
229423
  LOGS = ["history.jsonl", "decisions.jsonl"];
229225
229424
  LOG_SET = new Set(LOGS);
@@ -229246,7 +229445,7 @@ var init_sync = __esm({
229246
229445
  const status2 = statusOf2(e2);
229247
229446
  return { ...where, ...status2 !== void 0 ? { status: status2 } : {}, message: `${prefix}${describe(e2)}` };
229248
229447
  };
229249
- sha256Of3 = (bytes2) => createHash64("sha256").update(bytes2).digest("hex");
229448
+ sha256Of3 = (bytes2) => createHash65("sha256").update(bytes2).digest("hex");
229250
229449
  }
229251
229450
  });
229252
229451
 
@@ -229394,7 +229593,7 @@ async function readKeyFor(record7, oldKey, appKey) {
229394
229593
  const claimed = Object.entries(await record7.aliases()).some(([k3, v2]) => v2 === target && k3.startsWith(kind) && k3 !== oldKey);
229395
229594
  return claimed ? oldKey : target;
229396
229595
  }
229397
- var createHash65, chmod2, mkdir15, readdir6, readFile14, rename5, stat9, unlink4, join127, LOGS2, STORES, INDEX_SCHEMA, SYNC_STATE_SCHEMA, SHA256_RE2, isNotFound, resourceOf2, timeOf2, ITEM_IDS, isPlain2, itemId2, OLD_KEY2, MAX_HOPS, StoreRecord, kindOf;
229596
+ var createHash66, chmod2, mkdir15, readdir6, readFile14, rename5, stat9, unlink4, join127, LOGS2, STORES, INDEX_SCHEMA, SYNC_STATE_SCHEMA, SHA256_RE2, isNotFound, resourceOf2, timeOf2, ITEM_IDS, isPlain2, itemId2, OLD_KEY2, MAX_HOPS, StoreRecord, kindOf;
229398
229597
  var init_store_record = __esm({
229399
229598
  "../../node_modules/@wix/asc-core/dist/store-record/index.js"() {
229400
229599
  init_define_HHP_CATALOG();
@@ -229415,7 +229614,7 @@ var init_store_record = __esm({
229415
229614
  init_pool();
229416
229615
  init_canonical();
229417
229616
  init_sync();
229418
- ({ createHash: createHash65 } = __ascBuiltin033);
229617
+ ({ createHash: createHash66 } = __ascBuiltin033);
229419
229618
  ({ chmod: chmod2, mkdir: mkdir15, readdir: readdir6, readFile: readFile14, rename: rename5, stat: stat9, unlink: unlink4 } = __ascBuiltin123);
229420
229619
  ({ join: join127 } = __ascBuiltin211);
229421
229620
  LOGS2 = /* @__PURE__ */ new Set(["history.jsonl", "decisions.jsonl"]);
@@ -229971,7 +230170,7 @@ var init_store_record = __esm({
229971
230170
  */
229972
230171
  async putBlob(bytes2, declared) {
229973
230172
  const type2 = checkBlob(bytes2, declared);
229974
- const sha2569 = createHash65("sha256").update(bytes2).digest("hex");
230173
+ const sha2569 = createHash66("sha256").update(bytes2).digest("hex");
229975
230174
  const ref = { sha256: sha2569, type: type2, bytes: bytes2.length, ...dimensions(bytes2, type2) };
229976
230175
  const file2 = this.blobPath(sha2569);
229977
230176
  try {
@@ -230159,7 +230358,7 @@ async function dataSafetyWrites(c2) {
230159
230358
  } catch {
230160
230359
  continue;
230161
230360
  }
230162
- if (createHash66("sha256").update(csv2).digest("hex") !== sent) {
230361
+ if (createHash67("sha256").update(csv2).digest("hex") !== sent) {
230163
230362
  changed = true;
230164
230363
  continue;
230165
230364
  }
@@ -230489,13 +230688,13 @@ async function recordAppKey(record7, packageName, appKey) {
230489
230688
  async function recordReadKey(record7, packageName, appKey) {
230490
230689
  return readKeyFor(record7, appKeyOf({ packageName }), appKey);
230491
230690
  }
230492
- var createHash66, readFile15, REPLACE, merge2, APPROVAL_KEYS, isoOf, str16, message3, replace, number4, pct2, trackOf, releaseOf, trackPath, listingPath, dataSafetyData, ROLLOUT_STATUS, RELEASE_KEYS, LISTING_KEYS;
230691
+ var createHash67, readFile15, REPLACE, merge2, APPROVAL_KEYS, isoOf, str16, message3, replace, number4, pct2, trackOf, releaseOf, trackPath, listingPath, dataSafetyData, ROLLOUT_STATUS, RELEASE_KEYS, LISTING_KEYS;
230493
230692
  var init_record = __esm({
230494
230693
  "../../node_modules/@wix/gplay-jobs/dist/record.js"() {
230495
230694
  init_define_HHP_CATALOG();
230496
230695
  init_store_record();
230497
230696
  init_dist();
230498
- ({ createHash: createHash66 } = __ascBuiltin034);
230697
+ ({ createHash: createHash67 } = __ascBuiltin034);
230499
230698
  ({ readFile: readFile15 } = __ascBuiltin124);
230500
230699
  REPLACE = "replace";
230501
230700
  merge2 = (...collections2) => ({ merge: collections2 });
@@ -230990,8 +231189,8 @@ __export(store_google_host_exports, {
230990
231189
  resolveDeveloper: () => resolveDeveloper,
230991
231190
  signingFor: () => signingFor
230992
231191
  });
230993
- import { createHash as createHash67, randomUUID as randomUUID14 } from "node:crypto";
230994
- import { existsSync as existsSync112, lstatSync as lstatSync32, mkdirSync as mkdirSync43, readFileSync as readFileSync125, readdirSync as readdirSync46, realpathSync as realpathSync13, renameSync as renameSync16, rmSync as rmSync31, statSync as statSync31, writeFileSync as writeFileSync47 } from "node:fs";
231192
+ import { createHash as createHash68, randomUUID as randomUUID14 } from "node:crypto";
231193
+ import { existsSync as existsSync112, lstatSync as lstatSync32, mkdirSync as mkdirSync43, readFileSync as readFileSync125, readdirSync as readdirSync46, realpathSync as realpathSync14, renameSync as renameSync16, rmSync as rmSync31, statSync as statSync31, writeFileSync as writeFileSync47 } from "node:fs";
230995
231194
  import { join as join128, relative as relative24 } from "node:path";
230996
231195
  function readGooglePlayFacts(dir) {
230997
231196
  const path2 = join128(dir, GOOGLE_FACTS_FILE);
@@ -231107,7 +231306,7 @@ async function googleAppFactsFor(dir, o2) {
231107
231306
  const himi = packageName.toLowerCase().startsWith("himi.");
231108
231307
  if (himi && !site) note(`Signing: ${packageName} is a Containers (himi.*) package, which Wix builds and signs for a site-linked app, but this app names no Wix site (a "wix" block in ${GOOGLE_FACTS_FILE} or ${STORE_FACTS_FILE}). Link it (\`himi store app set --app <id> --site <msid> --android-package ${packageName}\`) and add the wix block, or use your own package name.`);
231109
231308
  if (!himi && site) note(`Signing: this app is linked to Wix site ${site.site}, so Wix signs its bundle under a himi.<name> package; ${packageName} is not one. Set packageName to the site's saved himi.<name> package (\`himi store app show --app ${site.app} --site ${site.site}\`), or drop the wix block for an owner-signed app.`);
231110
- const realDir = realpathSync13(dir);
231309
+ const realDir = realpathSync14(dir);
231111
231310
  const files = {};
231112
231311
  const given = (key4) => {
231113
231312
  const p2 = str17(file2[key4]);
@@ -231346,7 +231545,7 @@ var init_store_google_host = __esm({
231346
231545
  };
231347
231546
  consoleSignedIn = (local, env) => existsSync112(join128(local.stateDir, "console.json")) || !!env.GPLAY_CONSOLE_PROFILE;
231348
231547
  ownerReplyApprovalsPath = (stateDir2) => join128(stateDir2, "himi-owner-reply-approvals.json");
231349
- sha2 = (text32) => createHash67("sha256").update(text32.trim(), "utf8").digest("hex");
231548
+ sha2 = (text32) => createHash68("sha256").update(text32.trim(), "utf8").digest("hex");
231350
231549
  }
231351
231550
  });
231352
231551
 
@@ -233869,8 +234068,8 @@ function hashPadded(...values) {
233869
234068
  return fromHex(shaHex(input)) % N5;
233870
234069
  }
233871
234070
  function derivePassword(password, protocol, salt, iterations) {
233872
- const digest2 = sha2566(password);
233873
- const prepared = protocol === "s2k" ? digest2 : protocol === "s2k_fo" ? Buffer.from(digest2.toString("hex")) : void 0;
234071
+ const digest3 = sha2566(password);
234072
+ const prepared = protocol === "s2k" ? digest3 : protocol === "s2k_fo" ? Buffer.from(digest3.toString("hex")) : void 0;
233874
234073
  if (!prepared)
233875
234074
  throw new Error(`unsupported SRP protocol "${protocol}"`);
233876
234075
  return pbkdf2Sync3(prepared, salt, iterations, 32, "sha256");
@@ -233933,22 +234132,22 @@ function makeHashcash(bits, challenge, now = /* @__PURE__ */ new Date()) {
233933
234132
  const date = now.toISOString().replace(/[-:T]/g, "").slice(0, 14);
233934
234133
  for (let counter = 0; ; counter++) {
233935
234134
  const candidate = `1:${bits}:${date}:${challenge}::${counter}`;
233936
- if (leadingZeroBits(createHash68("sha1").update(candidate).digest(), bits))
234135
+ if (leadingZeroBits(createHash69("sha1").update(candidate).digest(), bits))
233937
234136
  return candidate;
233938
234137
  }
233939
234138
  }
233940
234139
  function checkHashcash(value2, bits, challenge) {
233941
234140
  const parts = value2.split(":");
233942
- return parts[1] === String(bits) && parts[3] === challenge && leadingZeroBits(createHash68("sha1").update(value2).digest(), bits);
234141
+ return parts[1] === String(bits) && parts[3] === challenge && leadingZeroBits(createHash69("sha1").update(value2).digest(), bits);
233943
234142
  }
233944
- var createHash68, pbkdf2Sync3, randomBytes12, N5, G2, sha2566, fromHex, shaHex, N_HEX_LEN, k2;
234143
+ var createHash69, pbkdf2Sync3, randomBytes12, N5, G2, sha2566, fromHex, shaHex, N_HEX_LEN, k2;
233945
234144
  var init_srp = __esm({
233946
234145
  "../../node_modules/@wix/asc-web/dist/srp.js"() {
233947
234146
  init_define_HHP_CATALOG();
233948
- ({ createHash: createHash68, pbkdf2Sync: pbkdf2Sync3, randomBytes: randomBytes12 } = __ascBuiltin041);
234147
+ ({ createHash: createHash69, pbkdf2Sync: pbkdf2Sync3, randomBytes: randomBytes12 } = __ascBuiltin041);
233949
234148
  N5 = BigInt("0xAC6BDB41324A9A9BF166DE5E1389582FAF72B6651987EE07FC3192943DB56050A37329CBB4A099ED8193E0757767A13DD52312AB4B03310DCD7F48A9DA04FD50E8083969EDB767B0CF6095179A163AB3661A05FBD5FAAAE82918A9962F0B93B855F97993EC975EEAA80D740ADBF4FF747359D041D5C33EA71D281E446B14773BCA97B43A23FB801676BD207A436C6481F1D2B9078717461A5B9D32E688F87748544523B524B0D57D5EA77A2775D2ECFA032CFBDBF52FB3786160279004E57AE6AF874E7303CE53299CCC041C7BC308D82A5698F3A8D0C38271AE35F8E9DBFBB694B5C803D89F7AE435DE236D525F54759B65E372FCD68EF20FA7111F9E4AFF73");
233950
234149
  G2 = 2n;
233951
- sha2566 = (data) => createHash68("sha256").update(data).digest();
234150
+ sha2566 = (data) => createHash69("sha256").update(data).digest();
233952
234151
  fromHex = (h2) => BigInt(`0x${h2 || "0"}`);
233953
234152
  shaHex = (hex2) => sha2566(Buffer.from(hex2, "hex")).toString("hex");
233954
234153
  N_HEX_LEN = 2 * (N5.toString(16).length * 4 + 7 >> 3);
@@ -234115,12 +234314,12 @@ async function writePartIndex(dir, key4, parts) {
234115
234314
  throw e2;
234116
234315
  }
234117
234316
  }
234118
- var createHash69, randomBytes13, chmod3, constants8, link3, lstat2, mkdir16, readFile16, rename6, rmdir2, unlink5, writeFile12, hostname4, join131, SessionStoreError, SessionLockError, SESSION_LOCK_STALE_MS, SIGN_IN_SAVE_WAIT_MS, GUARD_STALE_MS, unusable, code, sleep3, baseName, isStale3, isPartSet;
234317
+ var createHash70, randomBytes13, chmod3, constants8, link3, lstat2, mkdir16, readFile16, rename6, rmdir2, unlink5, writeFile12, hostname4, join131, SessionStoreError, SessionLockError, SESSION_LOCK_STALE_MS, SIGN_IN_SAVE_WAIT_MS, GUARD_STALE_MS, unusable, code, sleep3, baseName, isStale3, isPartSet;
234119
234318
  var init_session_lock = __esm({
234120
234319
  "../../node_modules/@wix/asc-web/dist/session-lock.js"() {
234121
234320
  init_define_HHP_CATALOG();
234122
234321
  init_dist3();
234123
- ({ createHash: createHash69, randomBytes: randomBytes13 } = __ascBuiltin042);
234322
+ ({ createHash: createHash70, randomBytes: randomBytes13 } = __ascBuiltin042);
234124
234323
  ({ chmod: chmod3, constants: constants8, link: link3, lstat: lstat2, mkdir: mkdir16, readFile: readFile16, rename: rename6, rmdir: rmdir2, unlink: unlink5, writeFile: writeFile12 } = __ascBuiltin127);
234125
234324
  ({ hostname: hostname4 } = __ascBuiltin213);
234126
234325
  ({ join: join131 } = __ascBuiltin35);
@@ -234142,7 +234341,7 @@ var init_session_lock = __esm({
234142
234341
  unusable = (dir, e2) => new SessionLockError(`could not lock the web session under ${dir} (${code(e2) ?? "error"}); fix or remove that directory and retry`);
234143
234342
  code = (e2) => e2?.code;
234144
234343
  sleep3 = (ms2) => new Promise((resolve141) => setTimeout(resolve141, ms2));
234145
- baseName = (key4) => `session-${createHash69("sha256").update(key4).digest("hex")}`;
234344
+ baseName = (key4) => `session-${createHash70("sha256").update(key4).digest("hex")}`;
234146
234345
  isStale3 = ({ holder, ageMs }, staleMs) => ageMs > staleMs || Number.isInteger(holder.pid) && holder.host === hostname4() && !isAlive(holder.pid);
234147
234346
  isPartSet = (p2) => typeof p2?.id === "string" && /^[0-9a-f]+$/.test(p2.id) && Number.isInteger(p2.count) && p2.count >= 1 && p2.count <= 1e3;
234148
234347
  }
@@ -234460,7 +234659,7 @@ function keepReceivedCookies(loaded2, latest) {
234460
234659
  return { ...current, cookies: [...kept, ...received.map((c2) => ({ ...c2 }))] };
234461
234660
  };
234462
234661
  }
234463
- var execFile4, createHash70, randomBytes14, IDMSA, ASC_WEB, WebAuthError, isTrustCookie, unquoted, CookieJar, ASC_WIDGET_KEY, ACCOUNT_LOCKED_CODE, securityKeyMessage, cookieKey, DAMAGED_SESSION, memory, MemorySessionStore, EnvSessionStore, runCommand, isItemNotFound2, MAX_SECURITY_LINE2, LOCKED_HINT, KeychainSessionStore;
234662
+ var execFile4, createHash71, randomBytes14, IDMSA, ASC_WEB, WebAuthError, isTrustCookie, unquoted, CookieJar, ASC_WIDGET_KEY, ACCOUNT_LOCKED_CODE, securityKeyMessage, cookieKey, DAMAGED_SESSION, memory, MemorySessionStore, EnvSessionStore, runCommand, isItemNotFound2, MAX_SECURITY_LINE2, LOCKED_HINT, KeychainSessionStore;
234464
234663
  var init_session = __esm({
234465
234664
  "../../node_modules/@wix/asc-web/dist/session.js"() {
234466
234665
  init_define_HHP_CATALOG();
@@ -234469,7 +234668,7 @@ var init_session = __esm({
234469
234668
  init_pacing();
234470
234669
  init_srp();
234471
234670
  ({ execFile: execFile4 } = __ascBuiltin043);
234472
- ({ createHash: createHash70, randomBytes: randomBytes14 } = __ascBuiltin128);
234671
+ ({ createHash: createHash71, randomBytes: randomBytes14 } = __ascBuiltin128);
234473
234672
  IDMSA = "https://idmsa.apple.com";
234474
234673
  ASC_WEB = "https://appstoreconnect.apple.com";
234475
234674
  WebAuthError = class extends Error {
@@ -234656,7 +234855,7 @@ var init_session = __esm({
234656
234855
  const m2 = head2.manifest;
234657
234856
  const parts = await Promise.all(Array.from({ length: m2.count }, (_2, n2) => this.read(this.chunkAccount(appleId, m2.id, n2))));
234658
234857
  const joined = parts.every((p2) => p2 !== void 0) ? parts.join("") : void 0;
234659
- if (joined !== void 0 && createHash70("sha256").update(joined).digest("hex") === m2.sha256)
234858
+ if (joined !== void 0 && createHash71("sha256").update(joined).digest("hex") === m2.sha256)
234660
234859
  return joined;
234661
234860
  if (attempt2 > 0)
234662
234861
  throw new SessionStoreError(DAMAGED_SESSION);
@@ -234736,7 +234935,7 @@ var init_session = __esm({
234736
234935
  await removeWritten();
234737
234936
  throw e2;
234738
234937
  }
234739
- const manifest2 = { id, count: parts.length, sha256: createHash70("sha256").update(text32).digest("hex") };
234938
+ const manifest2 = { id, count: parts.length, sha256: createHash71("sha256").update(text32).digest("hex") };
234740
234939
  try {
234741
234940
  await this.write(session.appleId, JSON.stringify({ ascNodeChunks: manifest2 }));
234742
234941
  } catch (e2) {
@@ -234832,12 +235031,12 @@ function signinBackoffUntil(record7, now) {
234832
235031
  const capped = Math.min(until, failed2 + MAX_SIGNIN_BACKOFF_MS);
234833
235032
  return now < capped ? capped : void 0;
234834
235033
  }
234835
- var createHash71, randomBytes15, chmod4, mkdir17, readFile17, rename7, rm9, writeFile13, join132, DEFAULT_SIGNIN_BACKOFF_MS, MAX_SIGNIN_BACKOFF_MS, VERSION, newer, SigninBackoffStore;
235034
+ var createHash72, randomBytes15, chmod4, mkdir17, readFile17, rename7, rm9, writeFile13, join132, DEFAULT_SIGNIN_BACKOFF_MS, MAX_SIGNIN_BACKOFF_MS, VERSION, newer, SigninBackoffStore;
234836
235035
  var init_signin_backoff = __esm({
234837
235036
  "../../node_modules/@wix/asc-web/dist/signin-backoff.js"() {
234838
235037
  init_define_HHP_CATALOG();
234839
235038
  init_session_lock();
234840
- ({ createHash: createHash71, randomBytes: randomBytes15 } = __ascBuiltin044);
235039
+ ({ createHash: createHash72, randomBytes: randomBytes15 } = __ascBuiltin044);
234841
235040
  ({ chmod: chmod4, mkdir: mkdir17, readFile: readFile17, rename: rename7, rm: rm9, writeFile: writeFile13 } = __ascBuiltin129);
234842
235041
  ({ join: join132 } = __ascBuiltin214);
234843
235042
  DEFAULT_SIGNIN_BACKOFF_MS = 15 * 6e4;
@@ -234854,7 +235053,7 @@ var init_signin_backoff = __esm({
234854
235053
  this.dir = dir;
234855
235054
  this.lockDir = lockDir;
234856
235055
  }
234857
- key = (appleId) => createHash71("sha256").update(appleId.trim().toLowerCase()).digest("hex");
235056
+ key = (appleId) => createHash72("sha256").update(appleId.trim().toLowerCase()).digest("hex");
234858
235057
  path = (appleId) => join132(this.dir, `signin-backoff-${this.key(appleId)}.json`);
234859
235058
  /** The record, undefined when there is none or it cannot be read: a damaged one carries nothing worth stopping a sign-in for. */
234860
235059
  async load(appleId) {
@@ -238679,14 +238878,14 @@ async function pollUntil(read2, done, options2) {
238679
238878
  interval = options2.nextIntervalMs?.() ?? options2.intervalMs;
238680
238879
  }
238681
238880
  }
238682
- var createHash72, realClock, md5;
238881
+ var createHash73, realClock, md5;
238683
238882
  var init_util4 = __esm({
238684
238883
  "../../node_modules/@wix/asc-api/dist/util.js"() {
238685
238884
  init_define_HHP_CATALOG();
238686
238885
  init_dist3();
238687
- ({ createHash: createHash72 } = __ascBuiltin045);
238886
+ ({ createHash: createHash73 } = __ascBuiltin045);
238688
238887
  realClock = { now: Date.now, sleep: (ms2) => new Promise((resolve141) => setTimeout(resolve141, ms2)) };
238689
- md5 = (bytes2) => createHash72("md5").update(bytes2).digest("hex");
238888
+ md5 = (bytes2) => createHash73("md5").update(bytes2).digest("hex");
238690
238889
  }
238691
238890
  });
238692
238891
 
@@ -244842,13 +245041,13 @@ ${body}
244842
245041
  </testsuites>
244843
245042
  `;
244844
245043
  }
244845
- var createHash73, randomUUID15, mkdir18, readFile18, readdir7, rename8, writeFile14, join133, MemoryBatchStore, FileBatchStore, FINAL_OK, RETRYABLE, sha3, BatchRunner, xml;
245044
+ var createHash74, randomUUID15, mkdir18, readFile18, readdir7, rename8, writeFile14, join133, MemoryBatchStore, FileBatchStore, FINAL_OK, RETRYABLE, sha3, BatchRunner, xml;
244846
245045
  var init_batch = __esm({
244847
245046
  "../../node_modules/@wix/asc-jobs/dist/batch.js"() {
244848
245047
  init_define_HHP_CATALOG();
244849
245048
  init_dist3();
244850
245049
  init_job();
244851
- ({ createHash: createHash73, randomUUID: randomUUID15 } = __ascBuiltin048);
245050
+ ({ createHash: createHash74, randomUUID: randomUUID15 } = __ascBuiltin048);
244852
245051
  ({ mkdir: mkdir18, readFile: readFile18, readdir: readdir7, rename: rename8, writeFile: writeFile14 } = __ascBuiltin130);
244853
245052
  ({ join: join133 } = __ascBuiltin215);
244854
245053
  MemoryBatchStore = class {
@@ -244893,7 +245092,7 @@ var init_batch = __esm({
244893
245092
  };
244894
245093
  FINAL_OK = /* @__PURE__ */ new Set(["verified", "applied", "noop"]);
244895
245094
  RETRYABLE = /* @__PURE__ */ new Set(["failed", "uncertain", "locked", "planFailed"]);
244896
- sha3 = (v2) => createHash73("sha256").update(canonical6(v2)).digest("hex");
245095
+ sha3 = (v2) => createHash74("sha256").update(canonical6(v2)).digest("hex");
244897
245096
  BatchRunner = class {
244898
245097
  options;
244899
245098
  now;
@@ -246778,8 +246977,8 @@ function betaReviewView(details, passwordSent) {
246778
246977
  });
246779
246978
  }
246780
246979
  async function fileHashes(path2) {
246781
- const sha7 = createHash74("sha256");
246782
- const md53 = createHash74("md5");
246980
+ const sha7 = createHash75("sha256");
246981
+ const md53 = createHash75("md5");
246783
246982
  let bytes2 = 0;
246784
246983
  for await (const chunk2 of createReadStream3(path2)) {
246785
246984
  sha7.update(chunk2);
@@ -247338,12 +247537,12 @@ async function syncAppleJobs(record7, jobs, opts = {}) {
247338
247537
  }
247339
247538
  return out2;
247340
247539
  }
247341
- var createHash74, createReadStream3, readFile19, basename30, REPLACE2, merge3, mergeDeep, SAME_BUILD, isoOf2, str18, message4, replace2, defined, obj21, segment, APPLE, md5Hex, Lookups, versionOf, withEvent, stateIn, PERSONAL, EMAIL5, HAS_EMAIL, approverOf, samePrice2;
247540
+ var createHash75, createReadStream3, readFile19, basename30, REPLACE2, merge3, mergeDeep, SAME_BUILD, isoOf2, str18, message4, replace2, defined, obj21, segment, APPLE, md5Hex, Lookups, versionOf, withEvent, stateIn, PERSONAL, EMAIL5, HAS_EMAIL, approverOf, samePrice2;
247342
247541
  var init_record2 = __esm({
247343
247542
  "../../node_modules/@wix/asc-jobs/dist/record.js"() {
247344
247543
  init_define_HHP_CATALOG();
247345
247544
  init_store_record();
247346
- ({ createHash: createHash74 } = __ascBuiltin050);
247545
+ ({ createHash: createHash75 } = __ascBuiltin050);
247347
247546
  ({ createReadStream: createReadStream3 } = __ascBuiltin132);
247348
247547
  ({ readFile: readFile19 } = __ascBuiltin216);
247349
247548
  ({ basename: basename30 } = __ascBuiltin36);
@@ -247386,7 +247585,7 @@ var init_record2 = __esm({
247386
247585
  testflightAppInfo: (locale) => `apple/testflight/app-info/${locale}.json`,
247387
247586
  rejection: (threadId) => `apple/rejections/${threadId}.json`
247388
247587
  };
247389
- md5Hex = (bytes2) => createHash74("md5").update(bytes2).digest("hex");
247588
+ md5Hex = (bytes2) => createHash75("md5").update(bytes2).digest("hex");
247390
247589
  Lookups = class {
247391
247590
  api;
247392
247591
  cache = /* @__PURE__ */ new Map();
@@ -248416,7 +248615,7 @@ function realPathOf2(path2) {
248416
248615
  d2 = dirname66(d2);
248417
248616
  }
248418
248617
  try {
248419
- return join135(realpathSync14(d2), ...rest);
248618
+ return join135(realpathSync15(d2), ...rest);
248420
248619
  } catch {
248421
248620
  return resolve84(path2);
248422
248621
  }
@@ -248479,13 +248678,13 @@ function reserveKeyFile(dir, keyId) {
248479
248678
  }
248480
248679
  };
248481
248680
  }
248482
- var createPrivateKey6, closeSync9, existsSync114, mkdirSync45, openSync8, realpathSync14, statSync33, unlinkSync7, writeSync3, basename31, dirname66, isAbsolute17, join135, resolve84, TEAM_KEY_ROLES, DOWNLOAD_ATTEMPTS, ApiKeysApi;
248681
+ var createPrivateKey6, closeSync9, existsSync114, mkdirSync45, openSync8, realpathSync15, statSync33, unlinkSync7, writeSync3, basename31, dirname66, isAbsolute17, join135, resolve84, TEAM_KEY_ROLES, DOWNLOAD_ATTEMPTS, ApiKeysApi;
248483
248682
  var init_api_keys = __esm({
248484
248683
  "../../node_modules/@wix/asc-web/dist/api-keys.js"() {
248485
248684
  init_define_HHP_CATALOG();
248486
248685
  init_dist3();
248487
248686
  ({ createPrivateKey: createPrivateKey6 } = __ascBuiltin051);
248488
- ({ closeSync: closeSync9, existsSync: existsSync114, mkdirSync: mkdirSync45, openSync: openSync8, realpathSync: realpathSync14, statSync: statSync33, unlinkSync: unlinkSync7, writeSync: writeSync3 } = __ascBuiltin133);
248687
+ ({ closeSync: closeSync9, existsSync: existsSync114, mkdirSync: mkdirSync45, openSync: openSync8, realpathSync: realpathSync15, statSync: statSync33, unlinkSync: unlinkSync7, writeSync: writeSync3 } = __ascBuiltin133);
248489
248688
  ({ basename: basename31, dirname: dirname66, isAbsolute: isAbsolute17, join: join135, resolve: resolve84 } = __ascBuiltin217);
248490
248689
  TEAM_KEY_ROLES = ["ADMIN", "APP_MANAGER", "DEVELOPER", "FINANCE", "SALES", "MARKETING", "ACCESS_TO_REPORTS", "CUSTOMER_SUPPORT", "CREATE_APPS", "CLOUD_MANAGED_APP_DISTRIBUTION", "CLOUD_MANAGED_DEVELOPER_ID"];
248491
248690
  DOWNLOAD_ATTEMPTS = 3;
@@ -249939,12 +250138,12 @@ function refuseDuplicateFiles(files) {
249939
250138
  seen.add(key4);
249940
250139
  }
249941
250140
  }
249942
- var createHash75, basename32, extname6, ATTACHMENT_TYPE, DRAFT_TYPE, ATTACHMENT_CONTENT_TYPES, MAX_ATTACHMENT_BYTES, md52, errorsOf, ReplyAttachments;
250141
+ var createHash76, basename32, extname6, ATTACHMENT_TYPE, DRAFT_TYPE, ATTACHMENT_CONTENT_TYPES, MAX_ATTACHMENT_BYTES, md52, errorsOf, ReplyAttachments;
249943
250142
  var init_reply_attachments = __esm({
249944
250143
  "../../node_modules/@wix/asc-web/dist/reply-attachments.js"() {
249945
250144
  init_define_HHP_CATALOG();
249946
250145
  init_dist3();
249947
- ({ createHash: createHash75 } = __ascBuiltin055);
250146
+ ({ createHash: createHash76 } = __ascBuiltin055);
249948
250147
  ({ basename: basename32, extname: extname6 } = __ascBuiltin136);
249949
250148
  ATTACHMENT_TYPE = "resolutionCenterMessageAttachments";
249950
250149
  DRAFT_TYPE = "resolutionCenterDraftMessages";
@@ -249958,7 +250157,7 @@ var init_reply_attachments = __esm({
249958
250157
  ".txt": "text/plain"
249959
250158
  };
249960
250159
  MAX_ATTACHMENT_BYTES = 500 * 1024 * 1024;
249961
- md52 = (bytes2) => createHash75("md5").update(bytes2).digest("hex");
250160
+ md52 = (bytes2) => createHash76("md5").update(bytes2).digest("hex");
249962
250161
  errorsOf = (state) => {
249963
250162
  const errors = state?.errors;
249964
250163
  return Array.isArray(errors) ? errors.map((e2) => [e2?.code, e2?.description ?? e2?.detail ?? e2?.title].filter(Boolean).join(" ")).filter(Boolean) : [];
@@ -250989,7 +251188,7 @@ function readSessionBundle(path2) {
250989
251188
  throw new SessionBundleError(`the session bundle is larger than ${MAX_SESSION_BUNDLE_BYTES} bytes`);
250990
251189
  return readFileSync130(path2, "utf8");
250991
251190
  }
250992
- var chmodSync4, closeSync11, constants9, fstatSync3, lstatSync34, mkdirSync48, openSync10, readFileSync130, renameSync17, rmSync32, statSync38, writeSync5, createHash76, randomBytes16, dirname67, isAbsolute18, join140, resolve86, SESSION_BUNDLE_KIND, SESSION_BUNDLE_VERSION, MAX_SESSION_BUNDLE_BYTES, SessionBundleError, isAppleDomain, SESSION_FILE_VERSION, FileSessionStore, KEYRING_HINT, SecretServiceSessionStore;
251191
+ var chmodSync4, closeSync11, constants9, fstatSync3, lstatSync34, mkdirSync48, openSync10, readFileSync130, renameSync17, rmSync32, statSync38, writeSync5, createHash77, randomBytes16, dirname67, isAbsolute18, join140, resolve86, SESSION_BUNDLE_KIND, SESSION_BUNDLE_VERSION, MAX_SESSION_BUNDLE_BYTES, SessionBundleError, isAppleDomain, SESSION_FILE_VERSION, FileSessionStore, KEYRING_HINT, SecretServiceSessionStore;
250993
251192
  var init_session_transfer = __esm({
250994
251193
  "../../node_modules/@wix/asc-web/dist/session-transfer.js"() {
250995
251194
  init_define_HHP_CATALOG();
@@ -250998,7 +251197,7 @@ var init_session_transfer = __esm({
250998
251197
  init_session_lock();
250999
251198
  init_session();
251000
251199
  ({ chmodSync: chmodSync4, closeSync: closeSync11, constants: constants9, fstatSync: fstatSync3, lstatSync: lstatSync34, mkdirSync: mkdirSync48, openSync: openSync10, readFileSync: readFileSync130, renameSync: renameSync17, rmSync: rmSync32, statSync: statSync38, writeSync: writeSync5 } = __ascBuiltin058);
251001
- ({ createHash: createHash76, randomBytes: randomBytes16 } = __ascBuiltin139);
251200
+ ({ createHash: createHash77, randomBytes: randomBytes16 } = __ascBuiltin139);
251002
251201
  ({ dirname: dirname67, isAbsolute: isAbsolute18, join: join140, resolve: resolve86 } = __ascBuiltin220);
251003
251202
  SESSION_BUNDLE_KIND = "asc-node-web-session";
251004
251203
  SESSION_BUNDLE_VERSION = 1;
@@ -251024,7 +251223,7 @@ var init_session_transfer = __esm({
251024
251223
  this.box = box;
251025
251224
  }
251026
251225
  path(appleId) {
251027
- return join140(this.dir, `session-${createHash76("sha256").update(appleId.trim().toLowerCase()).digest("hex")}.json`);
251226
+ return join140(this.dir, `session-${createHash77("sha256").update(appleId.trim().toLowerCase()).digest("hex")}.json`);
251028
251227
  }
251029
251228
  locked(appleId, body, lock) {
251030
251229
  return withSessionLock(this.lockDir, appleId.trim().toLowerCase(), body, { ...this.lockOptions, ...lock });
@@ -251379,11 +251578,11 @@ function approvalDonePage(o2) {
251379
251578
  <p>Nothing was approved; the change will not be applied.</p>
251380
251579
  <p class="muted">You can close this tab.</p>`);
251381
251580
  }
251382
- var createHash77, escapeHtml2, STYLE, PAGE_SCRIPT, PAGE_SCRIPT_CSP, errorBlock;
251581
+ var createHash78, escapeHtml2, STYLE, PAGE_SCRIPT, PAGE_SCRIPT_CSP, errorBlock;
251383
251582
  var init_connect_page = __esm({
251384
251583
  "../../node_modules/@wix/asc-web/dist/connect-page.js"() {
251385
251584
  init_define_HHP_CATALOG();
251386
- ({ createHash: createHash77 } = __ascBuiltin059);
251585
+ ({ createHash: createHash78 } = __ascBuiltin059);
251387
251586
  escapeHtml2 = (text32) => text32.replace(/[&<>"']/g, (c2) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[c2]);
251388
251587
  STYLE = `
251389
251588
  :root { color-scheme: light dark; --fg: #1d1d1f; --muted: #6e6e73; --bg: #f5f5f7; --card: #fff; --line: #d2d2d7; --accent: #0071e3; --err: #b3261e; --errbg: #fdecea; }
@@ -251433,7 +251632,7 @@ var init_connect_page = __esm({
251433
251632
  });
251434
251633
  window.addEventListener("pageshow", function (e) { if (e.persisted) reset(); });
251435
251634
  })();`;
251436
- PAGE_SCRIPT_CSP = `'sha256-${createHash77("sha256").update(PAGE_SCRIPT).digest("base64")}'`;
251635
+ PAGE_SCRIPT_CSP = `'sha256-${createHash78("sha256").update(PAGE_SCRIPT).digest("base64")}'`;
251437
251636
  errorBlock = (error) => error ? `<p class="error" role="alert" data-error="${escapeHtml2(error.kind)}">${escapeHtml2(error.text)}</p>
251438
251637
  ` : "";
251439
251638
  }
@@ -255120,7 +255319,7 @@ async function recordAccepted(inv) {
255120
255319
  await store.markAccepted(hash3, `the published agreement; the portal shows ${accepted.id} accepted on ${accepted.accepted}`);
255121
255320
  return { hash: hash3 };
255122
255321
  }
255123
- var createHash78, mkdir19, readFile20, writeFile15, join143, PROBES2, SLUG, AgreementCache, cache3, webClient, AGREEMENT_COMMANDS;
255322
+ var createHash79, mkdir19, readFile20, writeFile15, join143, PROBES2, SLUG, AgreementCache, cache3, webClient, AGREEMENT_COMMANDS;
255124
255323
  var init_commands_agreements = __esm({
255125
255324
  "../../node_modules/@wix/asc/dist/commands-agreements.js"() {
255126
255325
  init_define_HHP_CATALOG();
@@ -255128,7 +255327,7 @@ var init_commands_agreements = __esm({
255128
255327
  init_dist6();
255129
255328
  init_commands();
255130
255329
  init_output2();
255131
- ({ createHash: createHash78 } = __ascBuiltin068);
255330
+ ({ createHash: createHash79 } = __ascBuiltin068);
255132
255331
  ({ mkdir: mkdir19, readFile: readFile20, writeFile: writeFile15 } = __ascBuiltin144);
255133
255332
  ({ join: join143 } = __ascBuiltin223);
255134
255333
  PROBES2 = [
@@ -255154,7 +255353,7 @@ var init_commands_agreements = __esm({
255154
255353
  }
255155
255354
  async store(text32, meta) {
255156
255355
  await mkdir19(this.dir, { recursive: true, mode: 448 });
255157
- const hash3 = createHash78("sha256").update(text32).digest("hex").slice(0, 16);
255356
+ const hash3 = createHash79("sha256").update(text32).digest("hex").slice(0, 16);
255158
255357
  await writeFile15(join143(this.dir, `${hash3}.txt`), text32, { mode: 384 });
255159
255358
  const index = await this.index();
255160
255359
  index.versions[hash3] ??= { ...meta, fetched: (/* @__PURE__ */ new Date()).toISOString() };
@@ -256563,13 +256762,13 @@ var init_commands_webhooks = __esm({
256563
256762
  import * as __ascBuiltin071 from "node:crypto";
256564
256763
  import * as __ascBuiltin145 from "node:fs";
256565
256764
  import * as __ascBuiltin224 from "node:path";
256566
- var createHash79, readFileSync136, basename35, KINDS, WorkerClient;
256765
+ var createHash80, readFileSync136, basename35, KINDS, WorkerClient;
256567
256766
  var init_remote = __esm({
256568
256767
  "../../node_modules/@wix/asc/dist/remote.js"() {
256569
256768
  init_define_HHP_CATALOG();
256570
256769
  init_dist3();
256571
256770
  init_dist5();
256572
- ({ createHash: createHash79 } = __ascBuiltin071);
256771
+ ({ createHash: createHash80 } = __ascBuiltin071);
256573
256772
  ({ readFileSync: readFileSync136 } = __ascBuiltin145);
256574
256773
  ({ basename: basename35 } = __ascBuiltin224);
256575
256774
  KINDS = /* @__PURE__ */ new Set(["auth", "forbidden", "notFound", "conflict", "invalid", "rateLimited", "server", "network", "uncertain", "refused", "readOnly", "truncated"]);
@@ -256620,7 +256819,7 @@ var init_remote = __esm({
256620
256819
  }
256621
256820
  /** Uploads one file for a job (`/v1/uploads`) in parts; returns the ref a job names (`upload:<id>/<file name>`). */
256622
256821
  async upload(bytes2, fileName, partBytes = 1024 * 1024) {
256623
- const md53 = createHash79("md5").update(bytes2).digest("hex");
256822
+ const md53 = createHash80("md5").update(bytes2).digest("hex");
256624
256823
  const slot = await this.call("POST", "/v1/uploads", { fileName, size: bytes2.length, md5: md53 });
256625
256824
  let done;
256626
256825
  for (let offset = 0; offset < bytes2.length; offset += partBytes) {
@@ -256646,7 +256845,7 @@ var init_remote = __esm({
256646
256845
  const o2 = value2;
256647
256846
  if (typeof o2.path === "string" && typeof o2.md5 === "string" && !isUploadPath(o2.path)) {
256648
256847
  const bytes2 = new Uint8Array(readFileSync136(o2.path));
256649
- if (createHash79("md5").update(bytes2).digest("hex") !== o2.md5)
256848
+ if (createHash80("md5").update(bytes2).digest("hex") !== o2.md5)
256650
256849
  throw new AscError("refused", `${o2.path} changed while the command ran (md5 differs); run it again`);
256651
256850
  const up2 = await this.upload(bytes2, basename35(o2.path));
256652
256851
  return { ...o2, path: up2.ref, md5: up2.md5 };
@@ -256737,12 +256936,12 @@ async function startCallback(timeoutMs) {
256737
256936
  }
256738
256937
  };
256739
256938
  }
256740
- var createHash80, randomBytes18, createServer5, b64url3, GatewayAuth;
256939
+ var createHash81, randomBytes18, createServer5, b64url3, GatewayAuth;
256741
256940
  var init_gateway_auth = __esm({
256742
256941
  "../../node_modules/@wix/asc/dist/gateway-auth.js"() {
256743
256942
  init_define_HHP_CATALOG();
256744
256943
  init_dist3();
256745
- ({ createHash: createHash80, randomBytes: randomBytes18 } = __ascBuiltin072);
256944
+ ({ createHash: createHash81, randomBytes: randomBytes18 } = __ascBuiltin072);
256746
256945
  ({ createServer: createServer5 } = __ascBuiltin146);
256747
256946
  b64url3 = (bytes2) => bytes2.toString("base64url");
256748
256947
  GatewayAuth = class {
@@ -256838,7 +257037,7 @@ var init_gateway_auth = __esm({
256838
257037
  authorize.searchParams.set("response_type", "code");
256839
257038
  authorize.searchParams.set("client_id", clientId);
256840
257039
  authorize.searchParams.set("redirect_uri", callback.redirect);
256841
- authorize.searchParams.set("code_challenge", b64url3(createHash80("sha256").update(verifier2).digest()));
257040
+ authorize.searchParams.set("code_challenge", b64url3(createHash81("sha256").update(verifier2).digest()));
256842
257041
  authorize.searchParams.set("code_challenge_method", "S256");
256843
257042
  authorize.searchParams.set("state", state);
256844
257043
  if (resource.resource)
@@ -260655,7 +260854,7 @@ function fileRoots(env) {
260655
260854
  const roots2 = [process.cwd(), ...(env.ASC_MCP_FILE_ROOTS ?? "").split(delimiter3)].map((r3) => r3.trim()).filter(Boolean);
260656
260855
  return [...new Set(roots2.flatMap((r3) => {
260657
260856
  try {
260658
- return [realpathSync15(resolve92(r3))];
260857
+ return [realpathSync16(resolve92(r3))];
260659
260858
  } catch {
260660
260859
  return [];
260661
260860
  }
@@ -260668,7 +260867,7 @@ function checkJobFile(path2, param, ctx, o2 = {}) {
260668
260867
  const given = resolve92(roots2[0] ?? process.cwd(), path2);
260669
260868
  let real;
260670
260869
  try {
260671
- real = realpathSync15(given);
260870
+ real = realpathSync16(given);
260672
260871
  } catch (e2) {
260673
260872
  throw new AscError("invalid", `${param}: cannot read ${path2} (${e2.code ?? "unreadable"})`);
260674
260873
  }
@@ -260677,7 +260876,7 @@ function checkJobFile(path2, param, ctx, o2 = {}) {
260677
260876
  throw new AscError("invalid", `${param}: ${path2} is not a ${o2.directory ? "directory" : "regular file"}`);
260678
260877
  let state;
260679
260878
  try {
260680
- state = realpathSync15(ctx.stateDir);
260879
+ state = realpathSync16(ctx.stateDir);
260681
260880
  } catch {
260682
260881
  state = void 0;
260683
260882
  }
@@ -260876,7 +261075,7 @@ ${o2.detail}` : ""}` };
260876
261075
  function enabledTools(env, o2 = {}) {
260877
261076
  return TOOLS.filter((t2) => !t2.write || env.ASC_MCP_WRITE === "1" || o2.approvals === true);
260878
261077
  }
260879
- var mkdirSync50, readFileSync138, realpathSync15, statSync41, writeFileSync53, delimiter3, isAbsolute19, join145, relative25, resolve92, sep29, READ, PLAN, APPLY, BATCH_SUMMARY_LINES, BATCH_CHANGES_PER_LINE, BATCH_CHANGE_LINES, ok2, app, reads, jobView2, noAppleId, EXIT_KINDS, notesOf2, cliResult, flag2, ACTIONS, FAMILIES, inside2, identityFile, appleIdParam, TOOLS;
261078
+ var mkdirSync50, readFileSync138, realpathSync16, statSync41, writeFileSync53, delimiter3, isAbsolute19, join145, relative25, resolve92, sep29, READ, PLAN, APPLY, BATCH_SUMMARY_LINES, BATCH_CHANGES_PER_LINE, BATCH_CHANGE_LINES, ok2, app, reads, jobView2, noAppleId, EXIT_KINDS, notesOf2, cliResult, flag2, ACTIONS, FAMILIES, inside2, identityFile, appleIdParam, TOOLS;
260880
261079
  var init_tools2 = __esm({
260881
261080
  "../../node_modules/@wix/asc-mcp/dist/tools.js"() {
260882
261081
  init_define_HHP_CATALOG();
@@ -260886,7 +261085,7 @@ var init_tools2 = __esm({
260886
261085
  init_dist6();
260887
261086
  init_dist7();
260888
261087
  init_action_catalog_generated();
260889
- ({ mkdirSync: mkdirSync50, readFileSync: readFileSync138, realpathSync: realpathSync15, statSync: statSync41, writeFileSync: writeFileSync53 } = __ascBuiltin075);
261088
+ ({ mkdirSync: mkdirSync50, readFileSync: readFileSync138, realpathSync: realpathSync16, statSync: statSync41, writeFileSync: writeFileSync53 } = __ascBuiltin075);
260890
261089
  ({ delimiter: delimiter3, isAbsolute: isAbsolute19, join: join145, relative: relative25, resolve: resolve92, sep: sep29 } = __ascBuiltin148);
260891
261090
  READ = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true };
260892
261091
  PLAN = { readOnlyHint: true, destructiveHint: false, idempotentHint: false, openWorldHint: true };
@@ -261622,7 +261821,7 @@ async function readPlan(app2, clients, developerId, ref) {
261622
261821
  return { steps: buildPlan({ packageName: app2.packageName, developerId, ...appId3 ? { appId: appId3 } : {}, facts: app2.facts }, record7, observed), ...appId3 ? { appId: appId3 } : {}, ...fromRecord ? { fromRecord } : {} };
261623
261822
  }
261624
261823
  async function sha2567(path2) {
261625
- const hash3 = createHash81("sha256");
261824
+ const hash3 = createHash82("sha256");
261626
261825
  for await (const chunk2 of createReadStream4(path2))
261627
261826
  hash3.update(chunk2);
261628
261827
  return hash3.digest("hex");
@@ -261679,7 +261878,7 @@ async function appIdOf2(app2, clients) {
261679
261878
  throw new StoreRefusal("app_id_missing", `${app2.packageName} has no Play Console app id yet (the host's facts and gplay-node's plan record have none): the app must exist in Play Console first, or the host passes its appId`);
261680
261879
  return appId3;
261681
261880
  }
261682
- var createHash81, createReadStream4, readdir8, join146, StoreRefusal, readClientsFor, STORE_GPLAY_ACTIONS, STORE_ACTIONS, STORE_UPLOAD, STORE_UPLOAD_PARAMS, REPLY_KINDS, REFRESH_FOR, nowOf, STALE_MS2, STALE_DAYS, appKeyFor, driftNote, staleNote, yesNo3, onlyIfFalse, DECLARE_STEPS, OWNER_YES, FILE_STEPS, todo, NEEDS_ACTION, REPLY_ACTIONS, CONNECT_FIELDS, android;
261881
+ var createHash82, createReadStream4, readdir8, join146, StoreRefusal, readClientsFor, STORE_GPLAY_ACTIONS, STORE_ACTIONS, STORE_UPLOAD, STORE_UPLOAD_PARAMS, REPLY_KINDS, REFRESH_FOR, nowOf, STALE_MS2, STALE_DAYS, appKeyFor, driftNote, staleNote, yesNo3, onlyIfFalse, DECLARE_STEPS, OWNER_YES, FILE_STEPS, todo, NEEDS_ACTION, REPLY_ACTIONS, CONNECT_FIELDS, android;
261683
261882
  var init_store_android = __esm({
261684
261883
  "../../node_modules/@wix/asc-mcp/dist/store-android.js"() {
261685
261884
  init_define_HHP_CATALOG();
@@ -261689,7 +261888,7 @@ var init_store_android = __esm({
261689
261888
  init_dist();
261690
261889
  init_dist2();
261691
261890
  init_tools2();
261692
- ({ createHash: createHash81 } = __ascBuiltin076);
261891
+ ({ createHash: createHash82 } = __ascBuiltin076);
261693
261892
  ({ createReadStream: createReadStream4 } = __ascBuiltin149);
261694
261893
  ({ readdir: readdir8 } = __ascBuiltin226);
261695
261894
  ({ join: join146 } = __ascBuiltin39);
@@ -263104,14 +263303,14 @@ __export(apple_keys_exports, {
263104
263303
  runAppleKeys: () => runAppleKeys
263105
263304
  });
263106
263305
  import { createPublicKey as createPublicKey5 } from "node:crypto";
263107
- import { readFileSync as readFileSync139, realpathSync as realpathSync16, statSync as statSync42 } from "node:fs";
263306
+ import { readFileSync as readFileSync139, realpathSync as realpathSync17, statSync as statSync42 } from "node:fs";
263108
263307
  function readKey2(flags, kind) {
263109
263308
  const names2 = kind === "asc" ? ["asc-key-file", "asc-key-id", "asc-issuer-id"] : ["iap-key", "iap-key-id", "iap-issuer-id"];
263110
263309
  if (names2.every((name) => flags[name] === void 0)) return void 0;
263111
263310
  const [file2, keyId, issuerId] = names2.map((name) => text17(flags[name]));
263112
263311
  if (!file2 || !keyId || !issuerId) throw new UsageError2(`Supply --${names2.join(" --")} together.`);
263113
263312
  try {
263114
- const path2 = realpathSync16(file2);
263313
+ const path2 = realpathSync17(file2);
263115
263314
  assertCredentialOutsideRepo(names2[0], path2);
263116
263315
  if (statSync42(path2).size > 16384) throw new Error("oversized");
263117
263316
  const key4 = { keyId, issuerId, key: readFileSync139(path2, "utf8") };
@@ -263295,7 +263494,7 @@ __export(store_host_exports, {
263295
263494
  wixTargetOf: () => wixTargetOf
263296
263495
  });
263297
263496
  import { spawn as spawn8 } from "node:child_process";
263298
- import { existsSync as existsSync117, lstatSync as lstatSync35, readFileSync as readFileSync140, readdirSync as readdirSync51, realpathSync as realpathSync17 } from "node:fs";
263497
+ import { existsSync as existsSync117, lstatSync as lstatSync35, readFileSync as readFileSync140, readdirSync as readdirSync51, realpathSync as realpathSync18 } from "node:fs";
263299
263498
  import { homedir as homedir16, hostname as hostname6, userInfo as userInfo3 } from "node:os";
263300
263499
  import { delimiter as delimiter4, dirname as dirname68, isAbsolute as isAbsolute20, join as join147, relative as relative26, resolve as resolve93, sep as sep30 } from "node:path";
263301
263500
  function storeNodeRefusal(version5 = process.versions.node) {
@@ -263428,12 +263627,12 @@ function privacyAnswersFor(dir, ownerPath, shellOnly, checked, deps, note) {
263428
263627
  function ownerAnswers(dir, ownerPath, deps, note, rel2, render3) {
263429
263628
  let real;
263430
263629
  try {
263431
- real = realpathSync17(ownerPath);
263630
+ real = realpathSync18(ownerPath);
263432
263631
  } catch {
263433
263632
  note(`App Privacy: could not read ${rel2(ownerPath)} to check it against the Himi app's own answers.`);
263434
263633
  return ownerPath;
263435
263634
  }
263436
- const realDir = realpathSync17(dir);
263635
+ const realDir = realpathSync18(dir);
263437
263636
  if (real !== realDir && !real.startsWith(realDir + sep30)) {
263438
263637
  throw new StoreFactsError(`privacyAnswersFile must be inside the app folder; ${rel2(ownerPath)} is not`, "store_facts_invalid");
263439
263638
  }
@@ -263475,7 +263674,7 @@ function factPathIn(dir, realDir, key4, p2, file2 = STORE_FACTS_FILE) {
263475
263674
  while (!existsSync117(probe2) && probe2 !== base2) probe2 = dirname68(probe2);
263476
263675
  let real;
263477
263676
  try {
263478
- real = realpathSync17(probe2);
263677
+ real = realpathSync18(probe2);
263479
263678
  } catch {
263480
263679
  throw refuse11();
263481
263680
  }
@@ -263517,7 +263716,7 @@ async function appFactsFor(dir, deps) {
263517
263716
  ...str20(file2.sku) ? { sku: str20(file2.sku) } : {},
263518
263717
  ...str20(file2.buildNumber) ? { buildNumber: str20(file2.buildNumber) } : {}
263519
263718
  };
263520
- const realDir = realpathSync17(dir);
263719
+ const realDir = realpathSync18(dir);
263521
263720
  for (const key4 of FILE_FACTS) {
263522
263721
  const p2 = str20(file2[key4]);
263523
263722
  if (p2) facts[key4] = factPathIn(dir, realDir, key4, p2);
@@ -265861,11 +266060,11 @@ __export(input_evidence_isolation_exports, {
265861
266060
  runInputEvidenceChild: () => runInputEvidenceChild
265862
266061
  });
265863
266062
  async function installInputEvidenceIsolation(dir) {
265864
- const { lstatSync: lstatSync45, readdirSync: readdirSync68, readlinkSync: readlinkSync4, realpathSync: realpathSync27 } = await import("node:fs");
266063
+ const { lstatSync: lstatSync45, readdirSync: readdirSync68, readlinkSync: readlinkSync4, realpathSync: realpathSync28 } = await import("node:fs");
265865
266064
  const { dirname: dirname95, isAbsolute: isAbsolute25, join: join228, relative: relative41, resolve: resolve141, sep: sep38 } = await import("node:path");
265866
266065
  const root = resolve141(dir);
265867
266066
  const privateDir = join228(root, ".himi");
265868
- const privateReal = join228(realpathSync27(root), ".himi") + sep38;
266067
+ const privateReal = join228(realpathSync28(root), ".himi") + sep38;
265869
266068
  const within2 = (base2, path2) => {
265870
266069
  const rel2 = relative41(base2, path2);
265871
266070
  return !!rel2 && rel2 !== ".." && !rel2.startsWith(`..${sep38}`) && !isAbsolute25(rel2);
@@ -265878,10 +266077,10 @@ async function installInputEvidenceIsolation(dir) {
265878
266077
  if (isAbsolute25(link4)) return false;
265879
266078
  const target = resolve141(dirname95(path2), link4);
265880
266079
  if (!within2(privateDir, target)) return false;
265881
- if (realpathSync27(path2) !== join228(realpathSync27(root), relative41(root, target))) return false;
266080
+ if (realpathSync28(path2) !== join228(realpathSync28(root), relative41(root, target))) return false;
265882
266081
  return lstatSync45(target).isFile();
265883
266082
  }
265884
- return within2(privateDir, resolve141(path2)) && realpathSync27(path2).startsWith(privateReal);
266083
+ return within2(privateDir, resolve141(path2)) && realpathSync28(path2).startsWith(privateReal);
265885
266084
  } catch {
265886
266085
  return false;
265887
266086
  }
@@ -265961,9 +266160,9 @@ async function runInputEvidenceChild(ctx) {
265961
266160
  }
265962
266161
  }
265963
266162
  async function inputEvidenceSourceArchiveHash(dir) {
265964
- const { createHash: createHash107 } = await import("node:crypto");
266163
+ const { createHash: createHash108 } = await import("node:crypto");
265965
266164
  const { collectAppSource: collectAppSource2, zipAppSource: zipAppSource2 } = await Promise.resolve().then(() => (init_app_source(), app_source_exports));
265966
- return createHash107("sha256").update(zipAppSource2(collectAppSource2(dir).entries).toString("base64")).digest("hex");
266165
+ return createHash108("sha256").update(zipAppSource2(collectAppSource2(dir).entries).toString("base64")).digest("hex");
265967
266166
  }
265968
266167
  var init_input_evidence_isolation = __esm({
265969
266168
  "src/input-evidence-isolation.ts"() {
@@ -266310,8 +266509,8 @@ __export(browser_authoring_exports, {
266310
266509
  sdkSubpathReader: () => sdkSubpathReader
266311
266510
  });
266312
266511
  import { createServer as createServer6 } from "node:http";
266313
- import { createHash as createHash82, randomBytes as randomBytes19 } from "node:crypto";
266314
- import { existsSync as existsSync123, readdirSync as readdirSync53, readFileSync as readFileSync145, realpathSync as realpathSync18, statSync as statSync43 } from "node:fs";
266512
+ import { createHash as createHash83, randomBytes as randomBytes19 } from "node:crypto";
266513
+ import { existsSync as existsSync123, readdirSync as readdirSync53, readFileSync as readFileSync145, realpathSync as realpathSync19, statSync as statSync43 } from "node:fs";
266315
266514
  import { join as join155, posix as posix3, relative as relative29, sep as sep31 } from "node:path";
266316
266515
  function humanMs(ms2) {
266317
266516
  return ms2 < 1e3 ? `${ms2}ms` : `${Math.round(ms2 / 1e3)}s`;
@@ -266321,7 +266520,7 @@ function collectWorkerSources(tier5SrcDir, bundleName) {
266321
266520
  const files = {};
266322
266521
  const visitedDirs = /* @__PURE__ */ new Set();
266323
266522
  const walk6 = (abs, rel2) => {
266324
- const real = realpathSync18(abs);
266523
+ const real = realpathSync19(abs);
266325
266524
  if (visitedDirs.has(real)) return;
266326
266525
  visitedDirs.add(real);
266327
266526
  for (const name of readdirSync53(abs).sort()) {
@@ -266409,8 +266608,8 @@ function encodeJob(job) {
266409
266608
  return Buffer.from(JSON.stringify(job), "utf8").toString("base64");
266410
266609
  }
266411
266610
  function mintToken2(payload, nonce = randomBytes19(16).toString("hex")) {
266412
- const digest2 = createHash82("sha256").update(payload, "utf8").digest("base64url");
266413
- return `${nonce}.${digest2}`;
266611
+ const digest3 = createHash83("sha256").update(payload, "utf8").digest("base64url");
266612
+ return `${nonce}.${digest3}`;
266414
266613
  }
266415
266614
  function defaultOpenBrowser(url) {
266416
266615
  openUrl2(url);
@@ -266617,7 +266816,7 @@ __export(shot_files_exports, {
266617
266816
  pruneStaleShots: () => pruneStaleShots,
266618
266817
  writeScreenShot: () => writeScreenShot
266619
266818
  });
266620
- import { createHash as createHash83 } from "node:crypto";
266819
+ import { createHash as createHash84 } from "node:crypto";
266621
266820
  import { mkdirSync as mkdirSync56, readdirSync as readdirSync54, readFileSync as readFileSync147, rmSync as rmSync35, statSync as statSync44 } from "node:fs";
266622
266821
  import { basename as basename37, dirname as dirname71, join as join157, relative as relative30, resolve as resolve99, sep as sep32 } from "node:path";
266623
266822
  function writeAtomic2(file2, bytes2) {
@@ -266633,7 +266832,7 @@ function writeAtomic2(file2, bytes2) {
266633
266832
  }
266634
266833
  function writeScreenShot(dir, screenId, base64) {
266635
266834
  const bytes2 = Buffer.from(base64, "base64");
266636
- const hash3 = createHash83("sha256").update(bytes2).digest("hex").slice(0, 16);
266835
+ const hash3 = createHash84("sha256").update(bytes2).digest("hex").slice(0, 16);
266637
266836
  const file2 = inside3(join157(dir, RENDERS_DIR), join157(screenId, `${hash3}.png`));
266638
266837
  const shot = inside3(join157(dir, SHOTS_DIR), `${screenId}.png`);
266639
266838
  if (!file2 || !shot) return null;
@@ -268280,7 +268479,7 @@ var init_webview_page_driver = __esm({
268280
268479
 
268281
268480
  // src/commands/test.ts
268282
268481
  import { existsSync as existsSync132, readFileSync as readFileSync154 } from "node:fs";
268283
- import { createHash as createHash84 } from "node:crypto";
268482
+ import { createHash as createHash85 } from "node:crypto";
268284
268483
  import { join as join165 } from "node:path";
268285
268484
  async function liveMapFor(dir) {
268286
268485
  if (!boardOpen(dir)) return void 0;
@@ -268745,7 +268944,7 @@ async function testCommand(ctx) {
268745
268944
  sourceArchiveHash,
268746
268945
  gitDiffHash: attestation.gitDiffHash,
268747
268946
  gitUntrackedHash: attestation.gitUntrackedHash,
268748
- testConfigHash: capturedConfig == null ? "absent" : createHash84("sha256").update(capturedConfig).digest("hex"),
268947
+ testConfigHash: capturedConfig == null ? "absent" : createHash85("sha256").update(capturedConfig).digest("hex"),
268749
268948
  testRunId: attestation.runId
268750
268949
  };
268751
268950
  }
@@ -268900,17 +269099,17 @@ __export(render_cache_exports, {
268900
269099
  renderCacheKey: () => renderCacheKey
268901
269100
  });
268902
269101
  import { AsyncLocalStorage as AsyncLocalStorage4 } from "node:async_hooks";
268903
- import { createHash as createHash85, randomBytes as randomBytes20 } from "node:crypto";
268904
- import { existsSync as existsSync133, lstatSync as lstatSync36, mkdirSync as mkdirSync59, readdirSync as readdirSync56, readFileSync as readFileSync155, readlinkSync as readlinkSync3, realpathSync as realpathSync19, renameSync as renameSync20, rmSync as rmSync37, statSync as statSync45, writeFileSync as writeFileSync61 } from "node:fs";
269102
+ import { createHash as createHash86, randomBytes as randomBytes20 } from "node:crypto";
269103
+ import { existsSync as existsSync133, lstatSync as lstatSync36, mkdirSync as mkdirSync59, readdirSync as readdirSync56, readFileSync as readFileSync155, readlinkSync as readlinkSync3, realpathSync as realpathSync20, renameSync as renameSync20, rmSync as rmSync37, statSync as statSync45, writeFileSync as writeFileSync61 } from "node:fs";
268905
269104
  import { join as join166, resolve as resolve102 } from "node:path";
268906
269105
  import { fileURLToPath as fileURLToPath35 } from "node:url";
268907
269106
  function renderCacheKey(contentDir2, inputs) {
268908
- const hash3 = createHash85("sha256");
269107
+ const hash3 = createHash86("sha256");
268909
269108
  hash3.update(JSON.stringify({ v: 1, ...inputs }));
268910
269109
  const root = resolve102(contentDir2);
268911
269110
  const seen = /* @__PURE__ */ new Set();
268912
269111
  const walk6 = (dir, rel2) => {
268913
- seen.add(realpathSync19(dir));
269112
+ seen.add(realpathSync20(dir));
268914
269113
  for (const name of readdirSync56(dir).sort()) {
268915
269114
  if (SKIPPED_ANYWHERE.has(name) || rel2 === "" && SKIPPED_TOP.has(name)) continue;
268916
269115
  const path2 = join166(dir, name);
@@ -268921,10 +269120,10 @@ function renderCacheKey(contentDir2, inputs) {
268921
269120
  if (link4) hash3.update(`\0l${relPath}\0${readlinkSync3(path2)}`);
268922
269121
  if (!st2) continue;
268923
269122
  if (st2.isDirectory()) {
268924
- if (!link4 || !seen.has(realpathSync19(path2))) walk6(path2, relPath);
268925
- } else if (st2.isFile()) hash3.update(`\0f${relPath}\0`).update(createHash85("sha256").update(readFileSync155(path2)).digest("hex"));
269123
+ if (!link4 || !seen.has(realpathSync20(path2))) walk6(path2, relPath);
269124
+ } else if (st2.isFile()) hash3.update(`\0f${relPath}\0`).update(createHash86("sha256").update(readFileSync155(path2)).digest("hex"));
268926
269125
  }
268927
- seen.delete(realpathSync19(dir));
269126
+ seen.delete(realpathSync20(dir));
268928
269127
  };
268929
269128
  walk6(root, "");
268930
269129
  return hash3.digest("hex").slice(0, 32);
@@ -269056,7 +269255,7 @@ var init_render_cache = __esm({
269056
269255
  SKIPPED_TOP = /* @__PURE__ */ new Set([".himi", "dist", "node_modules", "tests", "android", "ios", "macos", "watchos", ...AGENT_TOOLING_DIRS, ...AGENT_TOOLING_ROOT_FILES]);
269057
269256
  SKIPPED_ANYWHERE = /* @__PURE__ */ new Set(["node_modules", ".git"]);
269058
269257
  VOLATILE_ENV = /* @__PURE__ */ new Set(["PWD", "OLDPWD", "SHLVL", "_"]);
269059
- envValueHash = (value2) => typeof value2 === "string" ? createHash85("sha256").update(value2).digest("hex") : null;
269258
+ envValueHash = (value2) => typeof value2 === "string" ? createHash86("sha256").update(value2).digest("hex") : null;
269060
269259
  unrecorded = new AsyncLocalStorage4();
269061
269260
  recordingNow = null;
269062
269261
  recordingFor = () => unrecorded.getStore() ? null : recordingNow;
@@ -270610,7 +270809,7 @@ __export(validate_design_exports, {
270610
270809
  validateDesign: () => validateDesign
270611
270810
  });
270612
270811
  import { randomBytes as randomBytes21 } from "node:crypto";
270613
- import { closeSync as closeSync12, constants as constants10, existsSync as existsSync137, lstatSync as lstatSync37, openSync as openSync11, readFileSync as readFileSync160, realpathSync as realpathSync20, renameSync as renameSync21, unlinkSync as unlinkSync9, writeFileSync as writeFileSync63 } from "node:fs";
270812
+ import { closeSync as closeSync12, constants as constants10, existsSync as existsSync137, lstatSync as lstatSync37, openSync as openSync11, readFileSync as readFileSync160, realpathSync as realpathSync21, renameSync as renameSync21, unlinkSync as unlinkSync9, writeFileSync as writeFileSync63 } from "node:fs";
270614
270813
  import { dirname as dirname75, isAbsolute as isAbsolute21, join as join171, relative as relative31, resolve as resolve105, sep as sep33, win32 } from "node:path";
270615
270814
  import ts36 from "typescript";
270616
270815
  function readColorToken(tokens2, name) {
@@ -270833,7 +271032,7 @@ function writableTokensPath(contentDir2, location) {
270833
271032
  if (isAbsolute21(location) || win32.isAbsolute(location) || location.split(/[\\/]/).includes("..")) {
270834
271033
  throw new Error("--fix requires a token path inside the content directory without traversal.");
270835
271034
  }
270836
- const root = realpathSync20(contentDir2);
271035
+ const root = realpathSync21(contentDir2);
270837
271036
  const path2 = resolve105(root, location);
270838
271037
  const rel2 = relative31(root, path2);
270839
271038
  if (!rel2 || rel2 === ".." || rel2.startsWith(`..${sep33}`) || isAbsolute21(rel2)) {
@@ -270848,7 +271047,7 @@ function writableTokensPath(contentDir2, location) {
270848
271047
  throw new Error("--fix requires a regular token file under directories without symlinks.");
270849
271048
  }
270850
271049
  }
270851
- const real = relative31(root, realpathSync20(path2));
271050
+ const real = relative31(root, realpathSync21(path2));
270852
271051
  if (!real || real === ".." || real.startsWith(`..${sep33}`) || isAbsolute21(real)) {
270853
271052
  throw new Error("--fix cannot write outside the content directory.");
270854
271053
  }
@@ -271045,10 +271244,10 @@ function validateDesign(evidenceDir, contentDir2, options2 = {}) {
271045
271244
  };
271046
271245
  }
271047
271246
  function safeEvidencePath(contentDir2, name) {
271048
- const root = realpathSync20(contentDir2);
271247
+ const root = realpathSync21(contentDir2);
271049
271248
  const dir = realDirIn(root, ".himi/one-app");
271050
271249
  if (!dir) throw new Error("The design evidence directory is not a regular directory.");
271051
- const real = relative31(root, realpathSync20(dir));
271250
+ const real = relative31(root, realpathSync21(dir));
271052
271251
  if (!real || real === ".." || real.startsWith(`..${sep33}`) || isAbsolute21(real)) {
271053
271252
  throw new Error("The design evidence directory is outside the content directory.");
271054
271253
  }
@@ -271919,7 +272118,7 @@ __export(media_assets_exports, {
271919
272118
  placeLargeAssetsInMedia: () => placeLargeAssetsInMedia,
271920
272119
  withMediaPlacements: () => withMediaPlacements
271921
272120
  });
271922
- import { createHash as createHash86 } from "node:crypto";
272121
+ import { createHash as createHash87 } from "node:crypto";
271923
272122
  function isMediaArchiveName(name) {
271924
272123
  return /\.zip$/i.test(name);
271925
272124
  }
@@ -271957,8 +272156,8 @@ async function placeLargeAssetsInMedia(opts) {
271957
272156
  const fail19 = (code3, error, hint, status2) => ({ ok: false, code: code3, error, sha256: u2.sha256, names: u2.names, ...status2 ? { status: status2 } : {}, hint });
271958
272157
  const name = mediaFileName(u2);
271959
272158
  const bytes2 = await u2.read();
271960
- const md53 = createHash86("md5").update(bytes2).digest("hex");
271961
- if (createHash86("sha256").update(bytes2).digest("hex") !== u2.sha256) {
272159
+ const md53 = createHash87("md5").update(bytes2).digest("hex");
272160
+ if (createHash87("sha256").update(bytes2).digest("hex") !== u2.sha256) {
271962
272161
  return fail19("media_upload_failed", `the bytes of ${u2.names[0]} do not match the sha256 the release names`, "rebuild the release and push again");
271963
272162
  }
271964
272163
  const found = await api4("files/search", { search: name, mediaTypes: ["ARCHIVE", "DOCUMENT"] });
@@ -272195,7 +272394,7 @@ var init_ring_pins = __esm({
272195
272394
  });
272196
272395
 
272197
272396
  // src/commands/push.ts
272198
- import { createHash as createHash87 } from "node:crypto";
272397
+ import { createHash as createHash88 } from "node:crypto";
272199
272398
  import { existsSync as existsSync138 } from "node:fs";
272200
272399
  import { join as join172, relative as relative32 } from "node:path";
272201
272400
  function loopbackTargetWarning(base2, explicitTarget) {
@@ -272505,7 +272704,7 @@ async function pushCommand(ctx) {
272505
272704
  try {
272506
272705
  const { collectAppSource: collectAppSource2, zipAppSource: zipAppSource2, PUSH_EXCLUDED_ROOTS: PUSH_EXCLUDED_ROOTS2 } = await Promise.resolve().then(() => (init_app_source(), app_source_exports));
272507
272706
  const { largeAssetSourcePaths: largeAssetSourcePaths2 } = await Promise.resolve().then(() => (init_app_assets(), app_assets_exports));
272508
- localSourceHash = createHash87("sha256").update(zipAppSource2(collectAppSource2(dir, { excludeRoots: PUSH_EXCLUDED_ROOTS2, excludePaths: largeAssetSourcePaths2(dir) }).entries).toString("base64")).digest("hex");
272707
+ localSourceHash = createHash88("sha256").update(zipAppSource2(collectAppSource2(dir, { excludeRoots: PUSH_EXCLUDED_ROOTS2, excludePaths: largeAssetSourcePaths2(dir) }).entries).toString("base64")).digest("hex");
272509
272708
  } catch {
272510
272709
  }
272511
272710
  const staleShared = staleSharedWarnings(report9);
@@ -273624,7 +273823,7 @@ var init_preview_assets_format = __esm({
273624
273823
 
273625
273824
  // src/preview-embed-cache.ts
273626
273825
  import { spawnSync as spawnSync12 } from "node:child_process";
273627
- import { createHash as createHash88 } from "node:crypto";
273826
+ import { createHash as createHash89 } from "node:crypto";
273628
273827
  import { existsSync as existsSync140, mkdirSync as mkdirSync60, readdirSync as readdirSync60, readFileSync as readFileSync162, renameSync as renameSync22, rmSync as rmSync40, writeFileSync as writeFileSync64 } from "node:fs";
273629
273828
  import { join as join174 } from "node:path";
273630
273829
  import { pathToFileURL as pathToFileURL10 } from "node:url";
@@ -273652,7 +273851,7 @@ function previewEmbedKey(repoRoot2) {
273652
273851
  if (ids2.length !== PREVIEW_EMBED_KEY_ROOTS.length) return null;
273653
273852
  const webs = appWebTrees(repoRoot2);
273654
273853
  if (!webs) return null;
273655
- return createHash88("sha256").update([...ids2, ...webs].join("\n")).digest("hex").slice(0, 24);
273854
+ return createHash89("sha256").update([...ids2, ...webs].join("\n")).digest("hex").slice(0, 24);
273656
273855
  }
273657
273856
  function entriesWithContentTypes(manifest2, lib) {
273658
273857
  return lib.manifestEntries(manifest2).map((e2) => {
@@ -274485,8 +274684,8 @@ function randomToken(byteLength = 32) {
274485
274684
  }
274486
274685
  async function generatePkce() {
274487
274686
  const verifier2 = randomToken(32);
274488
- const digest2 = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(verifier2));
274489
- return { verifier: verifier2, challenge: base64url(new Uint8Array(digest2)) };
274687
+ const digest3 = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(verifier2));
274688
+ return { verifier: verifier2, challenge: base64url(new Uint8Array(digest3)) };
274490
274689
  }
274491
274690
  async function hostedAuthUrl(req, visitorToken, fetchImpl = fetch) {
274492
274691
  const res = await fetchImpl(`${WIX_API3}${REDIRECT_SESSION_PATH}`, {
@@ -278442,7 +278641,7 @@ var init_git = __esm({
278442
278641
 
278443
278642
  // src/commands/patch.ts
278444
278643
  import { readFileSync as readFileSync169, existsSync as existsSync145 } from "node:fs";
278445
- import { createHash as createHash89 } from "node:crypto";
278644
+ import { createHash as createHash90 } from "node:crypto";
278446
278645
  async function patchCommand(ctx) {
278447
278646
  const { io: io2, pos, flags, client: client4, runReleasePatch, patchBlastRadius } = ctx;
278448
278647
  const PATCH_USAGE = "himi patch screen <id> --file <d.json> | bundle --file <b.js> (--for-screen <id>[,<id>]|--no-rebind) | tokens --file <t.json> | app-config --file <c.json> ; --app <a> (--draft|--live) [--from-release <id>] [--accept-regressions] [--notes <t>]";
@@ -278595,7 +278794,7 @@ async function patchCommand(ctx) {
278595
278794
  });
278596
278795
  }
278597
278796
  const bytes2 = readFileSync169(file2);
278598
- const sha7 = createHash89("sha256").update(bytes2).digest("hex");
278797
+ const sha7 = createHash90("sha256").update(bytes2).digest("hex");
278599
278798
  const forScreens = (str3(flags["for-screen"]) ?? "").split(",").map((s5) => s5.trim()).filter(Boolean);
278600
278799
  if (flags["no-rebind"] !== void 0 && flags["no-rebind"] !== true) {
278601
278800
  io2.error(JSON.stringify({ ok: false, error: "no_rebind_takes_no_value", message: "--no-rebind is a switch and takes no value; pass it bare.", usage: PATCH_USAGE }));
@@ -283245,7 +283444,7 @@ var init_iap_catalog_api = __esm({
283245
283444
  });
283246
283445
 
283247
283446
  // ../store-release/iap-manifest.ts
283248
- import { createHash as createHash90 } from "node:crypto";
283447
+ import { createHash as createHash91 } from "node:crypto";
283249
283448
  function readTarget(reader, value2) {
283250
283449
  const obj30 = reader.object(value2, "target", TARGET_KEYS);
283251
283450
  return {
@@ -283391,7 +283590,7 @@ function canonicalJson4(value2) {
283391
283590
  return JSON.stringify(sortKeys(value2));
283392
283591
  }
283393
283592
  function sha256Digest(value2) {
283394
- return `sha256:${createHash90("sha256").update(canonicalJson4(value2)).digest("hex")}`;
283593
+ return `sha256:${createHash91("sha256").update(canonicalJson4(value2)).digest("hex")}`;
283395
283594
  }
283396
283595
  function manifestDigest(manifest2) {
283397
283596
  return sha256Digest(manifest2);
@@ -283751,7 +283950,7 @@ var init_screenshot_display_types = __esm({
283751
283950
  });
283752
283951
 
283753
283952
  // ../store-release/iap-review-screenshot.ts
283754
- import { createHash as createHash91 } from "node:crypto";
283953
+ import { createHash as createHash92 } from "node:crypto";
283755
283954
  import { basename as basename41, resolve as resolve117 } from "node:path";
283756
283955
  function pngSize2(bytes2) {
283757
283956
  const signed = PNG_SIGNATURE2.every((b3, i2) => bytes2[i2] === b3);
@@ -283770,7 +283969,7 @@ function readImageSize(bytes2) {
283770
283969
  return pngSize2(buffer) ?? jpegSize2(buffer);
283771
283970
  }
283772
283971
  function md5Hex2(bytes2) {
283773
- return createHash91("md5").update(bytes2).digest("hex");
283972
+ return createHash92("md5").update(bytes2).digest("hex");
283774
283973
  }
283775
283974
  function isAppStoreScreenshotSize(file2) {
283776
283975
  return displayTypeForSize(file2.width, file2.height) !== null;
@@ -284795,11 +284994,11 @@ var init_credential_profile = __esm({
284795
284994
  });
284796
284995
 
284797
284996
  // ../store-release/iap-credentials.ts
284798
- import { createHash as createHash92 } from "node:crypto";
284799
- import { existsSync as existsSync150, readFileSync as readFileSync176, realpathSync as realpathSync21 } from "node:fs";
284997
+ import { createHash as createHash93 } from "node:crypto";
284998
+ import { existsSync as existsSync150, readFileSync as readFileSync176, realpathSync as realpathSync22 } from "node:fs";
284800
284999
  import { homedir as homedir19 } from "node:os";
284801
285000
  function accountFingerprint(keyId, issuerId) {
284802
- return `sha256:${createHash92("sha256").update(`${issuerId}:${keyId}`).digest("hex").slice(0, 16)}`;
285001
+ return `sha256:${createHash93("sha256").update(`${issuerId}:${keyId}`).digest("hex").slice(0, 16)}`;
284803
285002
  }
284804
285003
  function requireExplicitProfile(profileFlag, target) {
284805
285004
  const profile = profileFlag?.trim();
@@ -284834,7 +285033,7 @@ function resolveIapCredentials(options2) {
284834
285033
  const { target } = options2;
284835
285034
  const home2 = options2.home ?? homedir19();
284836
285035
  const readFile26 = options2.readFile ?? ((p2) => readFileSync176(p2, "utf8"));
284837
- const realpath3 = options2.realpath ?? realpathSync21;
285036
+ const realpath3 = options2.realpath ?? realpathSync22;
284838
285037
  const profile = requireExplicitProfile(options2.profileFlag, target);
284839
285038
  const creds = resolveStoreCredentials({
284840
285039
  app: target.himiApp,
@@ -284871,7 +285070,7 @@ var init_iap_credentials = __esm({
284871
285070
  });
284872
285071
 
284873
285072
  // ../store-release/iap-draft.ts
284874
- import { createHash as createHash93 } from "node:crypto";
285073
+ import { createHash as createHash94 } from "node:crypto";
284875
285074
  function fit(text32, max) {
284876
285075
  const chars = [...text32];
284877
285076
  return chars.length <= max ? text32 : `${chars.slice(0, max - 1).join("").trimEnd()}${ELLIPSIS}`;
@@ -285027,7 +285226,7 @@ var init_iap_draft = __esm({
285027
285226
  TIER_DESCRIPTION = "Unlocks one item in the app";
285028
285227
  ELLIPSIS = "\u2026";
285029
285228
  entityKey = (entityType, entityId) => `${entityType}:${entityId}`;
285030
- sha4 = (text32) => createHash93("sha256").update(text32).digest("hex");
285229
+ sha4 = (text32) => createHash94("sha256").update(text32).digest("hex");
285031
285230
  ENTITIES3 = { "&amp;": "&", "&nbsp;": " ", "&lt;": "<", "&gt;": ">", "&quot;": '"', "&#39;": "'" };
285032
285231
  MAX_SUFFIX = 24;
285033
285232
  ReferenceNames = class {
@@ -286215,7 +286414,7 @@ __export(store_iap_exports, {
286215
286414
  });
286216
286415
  import { execFileSync as execFileSync10 } from "node:child_process";
286217
286416
  import { randomUUID as randomUUID17 } from "node:crypto";
286218
- import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync63, readFileSync as readFileSync179, realpathSync as realpathSync22, renameSync as renameSync25, rmSync as rmSync46, writeFileSync as writeFileSync67 } from "node:fs";
286417
+ import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync63, readFileSync as readFileSync179, realpathSync as realpathSync23, renameSync as renameSync25, rmSync as rmSync46, writeFileSync as writeFileSync67 } from "node:fs";
286219
286418
  import { homedir as homedir20, hostname as hostname7 } from "node:os";
286220
286419
  import { dirname as dirname81, join as join190, resolve as resolve118 } from "node:path";
286221
286420
  function scrubDeep(value2, scrub) {
@@ -286615,7 +286814,7 @@ function readInAppPurchaseKey(flags, deps, creds) {
286615
286814
  if (!/^[A-Z0-9]{10}$/.test(keyId)) throw new UsageError10(`--iap-key-id must be the 10-character key id App Store Connect shows, got "${keyId}"`);
286616
286815
  let privateKey2;
286617
286816
  try {
286618
- assertCredentialOutsideRepo("--iap-key", (deps.realpath ?? realpathSync22)(path2));
286817
+ assertCredentialOutsideRepo("--iap-key", (deps.realpath ?? realpathSync23)(path2));
286619
286818
  privateKey2 = readInput2(deps, path2, "In-App Purchase key");
286620
286819
  } catch (error) {
286621
286820
  throw new KeyError(error.message);
@@ -287471,7 +287670,7 @@ __export(preflight_app_exports, {
287471
287670
  readXcconfigVars: () => readXcconfigVars
287472
287671
  });
287473
287672
  import { readFileSync as readFileSync180, existsSync as existsSync153, readdirSync as readdirSync63, statSync as statSync52 } from "node:fs";
287474
- import { createHash as createHash94 } from "node:crypto";
287673
+ import { createHash as createHash95 } from "node:crypto";
287475
287674
  import { dirname as dirname82, join as join191 } from "node:path";
287476
287675
  function analyze(projectYml, storeConfig, icon, account2, adopted) {
287477
287676
  const f2 = [];
@@ -287870,7 +288069,7 @@ function placeholderHashes2() {
287870
288069
  const p2 = join191(templateIos, target, "Assets.xcassets", "AppIcon.appiconset", "icon_1024.png");
287871
288070
  try {
287872
288071
  if (!statSync52(p2).isFile()) continue;
287873
- return [LEGACY_PLACEHOLDER_SHA2562, createHash94("sha256").update(readFileSync180(p2)).digest("hex")];
288072
+ return [LEGACY_PLACEHOLDER_SHA2562, createHash95("sha256").update(readFileSync180(p2)).digest("hex")];
287874
288073
  } catch {
287875
288074
  }
287876
288075
  }
@@ -287907,7 +288106,7 @@ async function appIconState(iosDir) {
287907
288106
  try {
287908
288107
  if (!statSync52(p2).isFile()) continue;
287909
288108
  const bytes2 = readFileSync180(p2);
287910
- const hash3 = createHash94("sha256").update(bytes2).digest("hex");
288109
+ const hash3 = createHash95("sha256").update(bytes2).digest("hex");
287911
288110
  const pixels = await pixelIssues(bytes2);
287912
288111
  return {
287913
288112
  exists: true,
@@ -291932,7 +292131,7 @@ var init_cms2 = __esm({
291932
292131
  });
291933
292132
 
291934
292133
  // src/data.ts
291935
- import { createHash as createHash95 } from "node:crypto";
292134
+ import { createHash as createHash96 } from "node:crypto";
291936
292135
  async function planData(options2) {
291937
292136
  const kv = [];
291938
292137
  for (const spec of options2.data?.kv ?? []) {
@@ -291997,7 +292196,7 @@ var init_data2 = __esm({
291997
292196
  url.searchParams.set("site", scope3.siteId);
291998
292197
  url.searchParams.set("environment", scope3.environment);
291999
292198
  const serialized = body === void 0 ? void 0 : JSON.stringify(body);
292000
- const idempotencyKey = serialized === void 0 ? void 0 : createHash95("sha256").update(`${scope3.app}\0${scope3.siteId}\0${scope3.environment}\0${method}\0${name}\0${serialized}`).digest("hex");
292199
+ const idempotencyKey = serialized === void 0 ? void 0 : createHash96("sha256").update(`${scope3.app}\0${scope3.siteId}\0${scope3.environment}\0${method}\0${name}\0${serialized}`).digest("hex");
292001
292200
  const response = await this.fetchImpl(url, { method, headers: { authorization: `Bearer ${this.token}`, "content-type": "application/json", ...idempotencyKey ? { "idempotency-key": idempotencyKey } : {} }, ...serialized === void 0 ? {} : { body: serialized } });
292002
292201
  if (response.status === 404 && method === "GET") return { exists: false };
292003
292202
  if (!response.ok) throw new Error(`data admin ${method} failed (${response.status}): ${(await response.text()).slice(0, 256)}`);
@@ -292272,7 +292471,7 @@ var init_site_member = __esm({
292272
292471
  });
292273
292472
 
292274
292473
  // src/notify-ping-all.ts
292275
- import { createHash as createHash96 } from "node:crypto";
292474
+ import { createHash as createHash97 } from "node:crypto";
292276
292475
  async function listApprovedMembers(input) {
292277
292476
  const first = await scanMembers(input);
292278
292477
  const second = await scanMembers(input);
@@ -292326,7 +292525,7 @@ async function scanMembers(input) {
292326
292525
  }
292327
292526
  }
292328
292527
  function campaignRequestId(campaignId, memberId) {
292329
- const bytes2 = createHash96("sha256").update(JSON.stringify(["himi-push-campaign", campaignId, memberId])).digest().subarray(0, 16);
292528
+ const bytes2 = createHash97("sha256").update(JSON.stringify(["himi-push-campaign", campaignId, memberId])).digest().subarray(0, 16);
292330
292529
  bytes2[6] = bytes2[6] & 15 | 80;
292331
292530
  bytes2[8] = bytes2[8] & 63 | 128;
292332
292531
  const hex2 = bytes2.toString("hex");
@@ -293929,7 +294128,7 @@ __export(runtime_copy_exports, {
293929
294128
  renderTs: () => renderTs,
293930
294129
  rowId: () => rowId
293931
294130
  });
293932
- import { createHash as createHash97 } from "node:crypto";
294131
+ import { createHash as createHash98 } from "node:crypto";
293933
294132
  import { existsSync as existsSync158, readFileSync as readFileSync190, writeFileSync as writeFileSync70 } from "node:fs";
293934
294133
  import { readdirSync as readdirSync64 } from "node:fs";
293935
294134
  import { dirname as dirname85, join as join198, relative as relative34, resolve as resolve123 } from "node:path";
@@ -294000,7 +294199,7 @@ export const RUNTIME_RENDERER_COPY: Readonly<Record<string, string>> = ${JSON.st
294000
294199
  `;
294001
294200
  }
294002
294201
  function rowId(key4) {
294003
- return "n_" + createHash97("sha1").update("runtime-copy:" + key4).digest("hex").slice(0, 12);
294202
+ return "n_" + createHash98("sha1").update("runtime-copy:" + key4).digest("hex").slice(0, 12);
294004
294203
  }
294005
294204
  function injectRuntimeRows(catalog4, table = loadTable()) {
294006
294205
  const prior = catalog4.messages ?? {};
@@ -294087,7 +294286,7 @@ __export(auth_gate_copy_exports, {
294087
294286
  scanProse: () => scanProse,
294088
294287
  scanThrownMessages: () => scanThrownMessages
294089
294288
  });
294090
- import { createHash as createHash98 } from "node:crypto";
294289
+ import { createHash as createHash99 } from "node:crypto";
294091
294290
  import { existsSync as existsSync159, readdirSync as readdirSync65, readFileSync as readFileSync191, writeFileSync as writeFileSync71 } from "node:fs";
294092
294291
  import { dirname as dirname86, join as join199, relative as relative35, resolve as resolve124 } from "node:path";
294093
294292
  import { fileURLToPath as fileURLToPath42 } from "node:url";
@@ -294165,7 +294364,7 @@ ${rows}
294165
294364
  `;
294166
294365
  }
294167
294366
  function rowId2(key4) {
294168
- return "n_" + createHash98("sha1").update("auth-gate:" + key4).digest("hex").slice(0, 12);
294367
+ return "n_" + createHash99("sha1").update("auth-gate:" + key4).digest("hex").slice(0, 12);
294169
294368
  }
294170
294369
  function injectGateRows(catalog4, table = loadTable2()) {
294171
294370
  const prior = catalog4.messages ?? {};
@@ -294213,7 +294412,7 @@ function loadAppTable(appDir3) {
294213
294412
  return out2;
294214
294413
  }
294215
294414
  function nativeRowId(key4) {
294216
- return "n_" + createHash98("sha1").update("app-native:" + key4).digest("hex").slice(0, 12);
294415
+ return "n_" + createHash99("sha1").update("app-native:" + key4).digest("hex").slice(0, 12);
294217
294416
  }
294218
294417
  function injectNativeRows(catalog4, table, keys2) {
294219
294418
  const prior = catalog4.messages ?? {};
@@ -294393,10 +294592,10 @@ var init_auth_gate_copy = __esm({
294393
294592
 
294394
294593
  // ../l10n/extract.ts
294395
294594
  import { resolve as resolve125, join as join200, relative as relative36, dirname as dirname87 } from "node:path";
294396
- import { createHash as createHash99 } from "node:crypto";
294595
+ import { createHash as createHash100 } from "node:crypto";
294397
294596
  import { fileURLToPath as fileURLToPath43 } from "node:url";
294398
294597
  function keyOf4(source2) {
294399
- return "h_" + createHash99("sha1").update(source2).digest("hex").slice(0, 12);
294598
+ return "h_" + createHash100("sha1").update(source2).digest("hex").slice(0, 12);
294400
294599
  }
294401
294600
  var ROOT8;
294402
294601
  var init_extract = __esm({
@@ -294690,7 +294889,7 @@ import {
294690
294889
  openSync as openSync13,
294691
294890
  readFileSync as readFileSync192,
294692
294891
  readdirSync as readdirSync66,
294693
- realpathSync as realpathSync23,
294892
+ realpathSync as realpathSync24,
294694
294893
  renameSync as renameSync26,
294695
294894
  rmSync as rmSync47,
294696
294895
  statSync as statSync54,
@@ -294933,8 +295132,8 @@ async function l10nCommand(ctx) {
294933
295132
  try {
294934
295133
  mkdirSync65(join201(appDir3, "l10n"), { recursive: true });
294935
295134
  const swapped = unsafeDestination(appDir3, requested);
294936
- const l10nReal = realpathSync23(join201(appDir3, "l10n"));
294937
- if (swapped !== void 0 || l10nReal !== join201(realpathSync23(appDir3), "l10n")) {
295135
+ const l10nReal = realpathSync24(join201(appDir3, "l10n"));
295136
+ if (swapped !== void 0 || l10nReal !== join201(realpathSync24(appDir3), "l10n")) {
294938
295137
  throw new UnsafePath(swapped ?? `${join201(appDir3, "l10n")} resolves outside the app`);
294939
295138
  }
294940
295139
  for (const tag2 of requested) {
@@ -295447,7 +295646,7 @@ __export(generate_exports, {
295447
295646
  withHeader: () => withHeader,
295448
295647
  writeGenerated: () => writeGenerated2
295449
295648
  });
295450
- import { createHash as createHash100 } from "node:crypto";
295649
+ import { createHash as createHash101 } from "node:crypto";
295451
295650
  import { existsSync as existsSync162, mkdirSync as mkdirSync66, readdirSync as readdirSync67, readFileSync as readFileSync194, writeFileSync as writeFileSync74 } from "node:fs";
295452
295651
  import { dirname as dirname89, join as join203 } from "node:path";
295453
295652
  function withHeader(body) {
@@ -295614,7 +295813,7 @@ var init_generate2 = __esm({
295614
295813
  GENERATED_HEADER = "// @generated by himi base44 screens \u2014 sha256:";
295615
295814
  HEADER_RE = /^\/\/ @generated by himi base44 screens — sha256:([0-9a-f]{64})\n/;
295616
295815
  ENGINE_FILES = ["tier5-src/_shared/entity-list.ts", "tier5-src/_shared/entity-detail.ts", "tier5-src/_shared/entity-plan.ts", "dev/entity-screens.ts"];
295617
- sha2568 = (s5) => createHash100("sha256").update(s5).digest("hex");
295816
+ sha2568 = (s5) => createHash101("sha256").update(s5).digest("hex");
295618
295817
  planFile = (p2) => `${p2.ids.bundleDetail}-plan`;
295619
295818
  ident = (p2) => `plan_${p2.ids.detail.replace(/^b44_/, "")}`;
295620
295819
  json8 = (v2) => JSON.stringify(v2, null, 2);
@@ -302106,7 +302305,7 @@ var init_one_app_page = __esm({
302106
302305
  });
302107
302306
 
302108
302307
  // src/one-app/pages.ts
302109
- import { createHash as createHash101 } from "node:crypto";
302308
+ import { createHash as createHash102 } from "node:crypto";
302110
302309
  function oneAppPagePlacements(raw) {
302111
302310
  const sections2 = object14(raw.sections);
302112
302311
  const placements = [];
@@ -302171,7 +302370,7 @@ var init_pages = __esm({
302171
302370
  init_errors4();
302172
302371
  object14 = (v2) => v2 && typeof v2 === "object" && !Array.isArray(v2) ? v2 : {};
302173
302372
  pointer2 = (s5) => s5.replaceAll("~", "~0").replaceAll("/", "~1");
302174
- hash2 = (s5) => createHash101("sha256").update(s5).digest("hex");
302373
+ hash2 = (s5) => createHash102("sha256").update(s5).digest("hex");
302175
302374
  ONE_APP_PAGES_BASE = "https://apps.wix.com/social-content/api/v1/pages/";
302176
302375
  }
302177
302376
  });
@@ -302184,7 +302383,7 @@ __export(collect_exports, {
302184
302383
  resolveSourceLocale: () => resolveSourceLocale,
302185
302384
  sourceMemberChat: () => sourceMemberChat
302186
302385
  });
302187
- import { createHash as createHash102 } from "node:crypto";
302386
+ import { createHash as createHash103 } from "node:crypto";
302188
302387
  function isObject3(value2) {
302189
302388
  return value2 !== null && typeof value2 === "object" && !Array.isArray(value2);
302190
302389
  }
@@ -302300,7 +302499,7 @@ function semanticFingerprint(structure) {
302300
302499
  }
302301
302500
  return JSON.stringify(value2);
302302
302501
  };
302303
- return createHash102("sha256").update(canonical9(structure, true)).digest("hex");
302502
+ return createHash103("sha256").update(canonical9(structure, true)).digest("hex");
302304
302503
  }
302305
302504
  async function collectOneApp(input, deps = {}) {
302306
302505
  const locale = resolveSourceLocale(input.locale);
@@ -303333,7 +303532,7 @@ var init_widget_velo = __esm({
303333
303532
  });
303334
303533
 
303335
303534
  // src/one-app/widget-inspect.ts
303336
- import { createHash as createHash103 } from "node:crypto";
303535
+ import { createHash as createHash104 } from "node:crypto";
303337
303536
  import { mkdirSync as mkdirSync70, mkdtempSync as mkdtempSync16, rmSync as rmSync52, writeFileSync as writeFileSync81, readFileSync as readFileSync200, renameSync as renameSync27 } from "node:fs";
303338
303537
  import { tmpdir as tmpdir17 } from "node:os";
303339
303538
  import { join as join212 } from "node:path";
@@ -303987,7 +304186,7 @@ var init_widget_inspect = __esm({
303987
304186
  obj26 = (v2) => v2 && typeof v2 === "object" && !Array.isArray(v2) ? v2 : {};
303988
304187
  arr5 = (v2) => Array.isArray(v2) ? v2 : [];
303989
304188
  str24 = (v2) => typeof v2 === "string" ? v2 : "";
303990
- sha5 = (v2) => createHash103("sha256").update(v2).digest("hex");
304189
+ sha5 = (v2) => createHash104("sha256").update(v2).digest("hex");
303991
304190
  INSPECTION_SCHEMA = 1;
303992
304191
  VETTED_ASSET_HOSTS = ["static.parastorage.com", "siteassets.parastorage.com", "bundler-velo.parastorage.com", "static.wixstatic.com", "video.wixstatic.com"];
303993
304192
  PAGE_BUNDLE_HOST = "bundler-velo.parastorage.com";
@@ -304028,7 +304227,7 @@ var init_widget_inspect = __esm({
304028
304227
  });
304029
304228
 
304030
304229
  // src/one-app/widget-tests.ts
304031
- import { createHash as createHash104 } from "node:crypto";
304230
+ import { createHash as createHash105 } from "node:crypto";
304032
304231
  import { mkdirSync as mkdirSync71, readFileSync as readFileSync201, writeFileSync as writeFileSync82 } from "node:fs";
304033
304232
  import { isAbsolute as isAbsolute22, join as join213, relative as relative38, resolve as resolve132 } from "node:path";
304034
304233
  function runWidgetTests(options2) {
@@ -304118,7 +304317,7 @@ var init_widget_tests = __esm({
304118
304317
  init_widgets_plan();
304119
304318
  init_widget_run();
304120
304319
  obj27 = (v2) => v2 && typeof v2 === "object" && !Array.isArray(v2) ? v2 : {};
304121
- sha6 = (v2) => createHash104("sha256").update(v2).digest("hex");
304320
+ sha6 = (v2) => createHash105("sha256").update(v2).digest("hex");
304122
304321
  }
304123
304322
  });
304124
304323
 
@@ -304750,8 +304949,8 @@ __export(cli_exports2, {
304750
304949
  ONE_APP_WORKFLOW: () => ONE_APP_WORKFLOW,
304751
304950
  runOneAppCommand: () => runOneAppCommand
304752
304951
  });
304753
- import { closeSync as closeSync15, constants as constants13, lstatSync as lstatSync44, mkdirSync as mkdirSync72, openSync as openSync14, readFileSync as readFileSync204, realpathSync as realpathSync24, writeFileSync as writeFileSync83 } from "node:fs";
304754
- import { createHash as createHash105 } from "node:crypto";
304952
+ import { closeSync as closeSync15, constants as constants13, lstatSync as lstatSync44, mkdirSync as mkdirSync72, openSync as openSync14, readFileSync as readFileSync204, realpathSync as realpathSync25, writeFileSync as writeFileSync83 } from "node:fs";
304953
+ import { createHash as createHash106 } from "node:crypto";
304755
304954
  import { isIP as isIP2 } from "node:net";
304756
304955
  import { dirname as dirname92, join as join216, parse as parse13, resolve as resolve135 } from "node:path";
304757
304956
  function nativeSiteHost(host) {
@@ -304975,7 +305174,7 @@ validate-payments checks site-bound payment evidence and explicit paid-flow deci
304975
305174
  throw new OneAppError("artifact_write_failed", "Could not save the migration evidence. Existing files were kept.", { stage });
304976
305175
  }
304977
305176
  artifacts[name] = path2;
304978
- hashes[name] = createHash105("sha256").update(content).digest("hex");
305177
+ hashes[name] = createHash106("sha256").update(content).digest("hex");
304979
305178
  return path2;
304980
305179
  };
304981
305180
  const progress = (nextStage) => {
@@ -305003,7 +305202,7 @@ validate-payments checks site-bound payment evidence and explicit paid-flow deci
305003
305202
  mkdirSync72(options2.parentDir, { recursive: true, mode: 448 });
305004
305203
  assertSafeParents(options2.parentDir);
305005
305204
  mkdirSync72(options2.workspace, { mode: 448 });
305006
- if (realpathSync24(options2.workspace) !== options2.workspace) throw new Error("destination changed");
305205
+ if (realpathSync25(options2.workspace) !== options2.workspace) throw new Error("destination changed");
305007
305206
  evidenceDir = join216(options2.workspace, ".himi", "one-app");
305008
305207
  mkdirSync72(evidenceDir, { recursive: true, mode: 448 });
305009
305208
  } catch (error) {
@@ -307277,7 +307476,7 @@ var init_customer_build = __esm({
307277
307476
  });
307278
307477
 
307279
307478
  // src/site-analyze/apply.ts
307280
- import { existsSync as existsSync174, readFileSync as readFileSync206, writeFileSync as writeFileSync84, copyFileSync as copyFileSync5, mkdirSync as mkdirSync73, realpathSync as realpathSync25, statSync as statSync56 } from "node:fs";
307479
+ import { existsSync as existsSync174, readFileSync as readFileSync206, writeFileSync as writeFileSync84, copyFileSync as copyFileSync5, mkdirSync as mkdirSync73, realpathSync as realpathSync26, statSync as statSync56 } from "node:fs";
307281
307480
  import { dirname as dirname93, isAbsolute as isAbsolute23, join as join218, resolve as resolve136, sep as sep36 } from "node:path";
307282
307481
  import { spawnSync as spawnSync15 } from "node:child_process";
307283
307482
  function inRepoBakeRefusal(repoRoot2, shell) {
@@ -307630,8 +307829,8 @@ function buildMergedContract(options2) {
307630
307829
  let real;
307631
307830
  let realRoot;
307632
307831
  try {
307633
- real = realpathSync25(from);
307634
- realRoot = realpathSync25(packageDir);
307832
+ real = realpathSync26(from);
307833
+ realRoot = realpathSync26(packageDir);
307635
307834
  } catch {
307636
307835
  return void 0;
307637
307836
  }
@@ -310194,7 +310393,7 @@ __export(check_report_exports, {
310194
310393
  sendCheckResult: () => sendCheckResult,
310195
310394
  takeCheckReportTarget: () => takeCheckReportTarget
310196
310395
  });
310197
- import { createHash as createHash106, randomUUID as randomUUID20 } from "node:crypto";
310396
+ import { createHash as createHash107, randomUUID as randomUUID20 } from "node:crypto";
310198
310397
  import { request as httpRequest2 } from "node:http";
310199
310398
  import { createConnection } from "node:net";
310200
310399
  import { isAbsolute as isAbsolute24, relative as relative39, resolve as resolve138 } from "node:path";
@@ -310366,7 +310565,7 @@ function errorFindings(run4, mode) {
310366
310565
  if (mode === "functions") {
310367
310566
  return envelope.functions.map(record6).filter((f2) => f2.ok === false).map((f2) => ({
310368
310567
  // Stable per function, in the HimiReport id alphabet: the name may hold anything.
310369
- id: `test:functions:${createHash106("sha256").update(text31(f2.name) ?? "").digest("hex").slice(0, 12)}`,
310568
+ id: `test:functions:${createHash107("sha256").update(text31(f2.name) ?? "").digest("hex").slice(0, 12)}`,
310370
310569
  severity: "error",
310371
310570
  message: `function "${text31(f2.name) ?? "?"}" (${text31(f2.method) ?? "?"} ${text31(f2.path) ?? "?"}) answered HTTP ${String(f2.status)}`
310372
310571
  }));
@@ -311660,7 +311859,7 @@ __export(fidelity_exports, {
311660
311859
  himalayaRepoRoot: () => himalayaRepoRoot
311661
311860
  });
311662
311861
  import { execFileSync as execFileSync12 } from "node:child_process";
311663
- import { existsSync as existsSync180, realpathSync as realpathSync26 } from "node:fs";
311862
+ import { existsSync as existsSync180, realpathSync as realpathSync27 } from "node:fs";
311664
311863
  import { join as join226, relative as relative40, sep as sep37 } from "node:path";
311665
311864
  function himalayaRepoRoot(dir) {
311666
311865
  let top;
@@ -311670,7 +311869,7 @@ function himalayaRepoRoot(dir) {
311670
311869
  return null;
311671
311870
  }
311672
311871
  if (!existsSync180(join226(top, "tools/judges/fidelity/JUDGE.md"))) return null;
311673
- const rel2 = relative40(realpathSync26(top), realpathSync26(dir));
311872
+ const rel2 = relative40(realpathSync27(top), realpathSync27(dir));
311674
311873
  return rel2.startsWith(`..${sep37}`) || rel2 === ".." ? null : top;
311675
311874
  }
311676
311875
  function fidelityEnvelope(report9) {