@wix/himalaya-cli 0.1956.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.
- package/dist/cli.mjs +555 -372
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -3964,7 +3964,6 @@ var init_himi_package = __esm({
|
|
|
3964
3964
|
var ICON_VIEW_BOX, ICON_STROKE_WIDTH, ICON_FALLBACK, ICON_CATALOG, ICON_NORMALIZED_INDEX, ICON_NAMES;
|
|
3965
3965
|
var init_icon_catalog_generated = __esm({
|
|
3966
3966
|
"../../core/ts/src/icon-catalog.generated.ts"() {
|
|
3967
|
-
"use strict";
|
|
3968
3967
|
init_define_HHP_CATALOG();
|
|
3969
3968
|
ICON_VIEW_BOX = 24;
|
|
3970
3969
|
ICON_STROKE_WIDTH = 2;
|
|
@@ -16485,7 +16484,8 @@ var init_tier5_dir = __esm({
|
|
|
16485
16484
|
});
|
|
16486
16485
|
|
|
16487
16486
|
// src/tier5-typecheck.ts
|
|
16488
|
-
import {
|
|
16487
|
+
import { createHash as createHash8 } from "node:crypto";
|
|
16488
|
+
import { existsSync as existsSync14, readFileSync as readFileSync15, realpathSync as realpathSync5 } from "node:fs";
|
|
16489
16489
|
import { relative as relative5, resolve as resolve13, sep as sep8 } from "node:path";
|
|
16490
16490
|
import { pathToFileURL as pathToFileURL2 } from "node:url";
|
|
16491
16491
|
async function loadTypeScript() {
|
|
@@ -16577,6 +16577,95 @@ function confinedHost(ts42, contentDir2, options2) {
|
|
|
16577
16577
|
}
|
|
16578
16578
|
return host;
|
|
16579
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
|
+
}
|
|
16580
16669
|
async function typecheckContentWorkers(contentDir2, options2) {
|
|
16581
16670
|
if (!existsSync14(resolve13(contentDir2, "tier5-src"))) return [];
|
|
16582
16671
|
const ts42 = await compiler2();
|
|
@@ -16595,19 +16684,43 @@ async function typecheckContentWorkers(contentDir2, options2) {
|
|
|
16595
16684
|
};
|
|
16596
16685
|
const parsed = ts42.parseJsonConfigFileContent(config, ts42.sys, contentDir2);
|
|
16597
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);
|
|
16598
16691
|
const program = ts42.createProgram({
|
|
16599
16692
|
rootNames: parsed.fileNames,
|
|
16600
16693
|
options: parsed.options,
|
|
16601
|
-
host:
|
|
16694
|
+
host: recorder.host
|
|
16602
16695
|
});
|
|
16603
|
-
|
|
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
|
+
];
|
|
16604
16711
|
}
|
|
16605
|
-
var compilerPromise;
|
|
16712
|
+
var compilerPromise, CONTENT_DIR_TOKEN, REAL_CONTENT_DIR_TOKEN, CHECKED_PROGRAMS_MAX, checkedPrograms, checkerRuns, digest;
|
|
16606
16713
|
var init_tier5_typecheck = __esm({
|
|
16607
16714
|
"src/tier5-typecheck.ts"() {
|
|
16608
16715
|
init_define_HHP_CATALOG();
|
|
16609
16716
|
init_compiler_options();
|
|
16610
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");
|
|
16611
16724
|
}
|
|
16612
16725
|
});
|
|
16613
16726
|
|
|
@@ -30959,7 +31072,7 @@ var init_ensure_templates = __esm({
|
|
|
30959
31072
|
|
|
30960
31073
|
// ../../core/dev-server/tier5-bundles-src/ensure-bundles.mjs
|
|
30961
31074
|
import { spawnSync as spawnSync4 } from "node:child_process";
|
|
30962
|
-
import { createHash as
|
|
31075
|
+
import { createHash as createHash9 } from "node:crypto";
|
|
30963
31076
|
import { existsSync as existsSync18, mkdirSync as mkdirSync11, readdirSync as readdirSync13, readFileSync as readFileSync18, rmSync as rmSync6, writeFileSync as writeFileSync11 } from "node:fs";
|
|
30964
31077
|
import { dirname as dirname14, relative as relative7, resolve as resolve17 } from "node:path";
|
|
30965
31078
|
import { fileURLToPath as fileURLToPath12 } from "node:url";
|
|
@@ -30974,16 +31087,16 @@ function bundleNames(root) {
|
|
|
30974
31087
|
}
|
|
30975
31088
|
}
|
|
30976
31089
|
function inputsFingerprint(root, files) {
|
|
30977
|
-
const h2 =
|
|
31090
|
+
const h2 = createHash9("sha256");
|
|
30978
31091
|
h2.update(`bundles\0${bundleNames(root).join(",")}
|
|
30979
31092
|
`);
|
|
30980
31093
|
for (const rel2 of [.../* @__PURE__ */ new Set([...files, ...BUILDER_INPUTS])].sort()) {
|
|
30981
|
-
let
|
|
31094
|
+
let digest3 = "missing";
|
|
30982
31095
|
try {
|
|
30983
|
-
|
|
31096
|
+
digest3 = createHash9("sha1").update(readFileSync18(resolve17(root, rel2))).digest("hex");
|
|
30984
31097
|
} catch {
|
|
30985
31098
|
}
|
|
30986
|
-
h2.update(`${rel2}\0${
|
|
31099
|
+
h2.update(`${rel2}\0${digest3}
|
|
30987
31100
|
`);
|
|
30988
31101
|
}
|
|
30989
31102
|
return h2.digest("hex");
|
|
@@ -32642,7 +32755,7 @@ __export(hhp_exports, {
|
|
|
32642
32755
|
});
|
|
32643
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";
|
|
32644
32757
|
import { basename as basename8, dirname as dirname18, resolve as resolve22, relative as relative8, sep as sep10, join as join18 } from "node:path";
|
|
32645
|
-
import { createHash as
|
|
32758
|
+
import { createHash as createHash10, randomUUID as randomUUID5 } from "node:crypto";
|
|
32646
32759
|
import ts3 from "typescript";
|
|
32647
32760
|
function localPath(root, path2, from = join18(root, "hhp.json")) {
|
|
32648
32761
|
if (/^[a-z]+:|^\/\//i.test(path2)) throw new Error("HHP source dependencies must be local files.");
|
|
@@ -32987,7 +33100,7 @@ var init_hhp = __esm({
|
|
|
32987
33100
|
END = "// himi:hhp:end";
|
|
32988
33101
|
RASTER_DIR = "hhp-raster";
|
|
32989
33102
|
existsExact = (path2) => existsSync22(path2) && readdirSync16(dirname18(path2)).includes(basename8(path2));
|
|
32990
|
-
rasterName = (svgName, svg) => `${RASTER_DIR}/${svgName.split("/").join("__")}.${
|
|
33103
|
+
rasterName = (svgName, svg) => `${RASTER_DIR}/${svgName.split("/").join("__")}.${createHash10("sha256").update(svg).digest("hex").slice(0, 12)}.png`;
|
|
32991
33104
|
RASTER_FILE = /\.svg\.[0-9a-f]{12}\.png$/i;
|
|
32992
33105
|
}
|
|
32993
33106
|
});
|
|
@@ -35081,9 +35194,9 @@ var init_privacy = __esm({
|
|
|
35081
35194
|
});
|
|
35082
35195
|
|
|
35083
35196
|
// ../native-extensions/archive.ts
|
|
35084
|
-
import { createHash as
|
|
35197
|
+
import { createHash as createHash11 } from "node:crypto";
|
|
35085
35198
|
function integrityOf(bytes2) {
|
|
35086
|
-
return `sha256-${
|
|
35199
|
+
return `sha256-${createHash11("sha256").update(bytes2).digest("base64")}`;
|
|
35087
35200
|
}
|
|
35088
35201
|
var ARCHIVE_FORMAT;
|
|
35089
35202
|
var init_archive = __esm({
|
|
@@ -35786,7 +35899,7 @@ var init_page_method_requires = __esm({
|
|
|
35786
35899
|
});
|
|
35787
35900
|
|
|
35788
35901
|
// ../../core/sdk/webview/src/page-worker.ts
|
|
35789
|
-
import { createHash as
|
|
35902
|
+
import { createHash as createHash12 } from "node:crypto";
|
|
35790
35903
|
function companionMethods(id, ids2) {
|
|
35791
35904
|
const entry = PAGE_METHODS[id];
|
|
35792
35905
|
if (!entry) throw new Error(`no page-callable methods for capability ${JSON.stringify(id)}`);
|
|
@@ -35824,7 +35937,7 @@ function companionWorkerSource(capabilities) {
|
|
|
35824
35937
|
}
|
|
35825
35938
|
function companionBundleName(capabilities) {
|
|
35826
35939
|
const ids2 = [...new Set(capabilities)].sort();
|
|
35827
|
-
return `himi-webview-page-${
|
|
35940
|
+
return `himi-webview-page-${createHash12("sha256").update(ids2.join(",")).digest("hex").slice(0, 10)}`;
|
|
35828
35941
|
}
|
|
35829
35942
|
var PAGE_CAPABILITIES, identifier;
|
|
35830
35943
|
var init_page_worker = __esm({
|
|
@@ -43721,7 +43834,7 @@ var init_push_map = __esm({
|
|
|
43721
43834
|
});
|
|
43722
43835
|
|
|
43723
43836
|
// ../../core/dev-server/src/app-config.ts
|
|
43724
|
-
import { createHash as
|
|
43837
|
+
import { createHash as createHash13 } from "node:crypto";
|
|
43725
43838
|
function servedPushMap(app2) {
|
|
43726
43839
|
const entries = push_map_default.apps[app2];
|
|
43727
43840
|
return entries?.map((e2) => ({
|
|
@@ -44010,7 +44123,7 @@ function buildAppConfigDocument(req, meta, override, bundleCtx, devNetMocks) {
|
|
|
44010
44123
|
const locale = pickLocale(typeof acceptLanguage === "string" ? acceptLanguage : null);
|
|
44011
44124
|
const config = locale ? translate(JSON.parse(JSON.stringify(baseline)), locale) : baseline;
|
|
44012
44125
|
const body = JSON.stringify(config);
|
|
44013
|
-
const etag = `"${
|
|
44126
|
+
const etag = `"${createHash13("sha1").update(`${locale ?? "en"}:${body}`).digest("hex")}"`;
|
|
44014
44127
|
return { config, body, etag, locale };
|
|
44015
44128
|
}
|
|
44016
44129
|
function servedAppNameMatches(requested, served) {
|
|
@@ -44273,7 +44386,7 @@ var init_plan_fonts = __esm({
|
|
|
44273
44386
|
});
|
|
44274
44387
|
|
|
44275
44388
|
// ../font-bake/face-source.ts
|
|
44276
|
-
import { createHash as
|
|
44389
|
+
import { createHash as createHash14 } from "node:crypto";
|
|
44277
44390
|
import { existsSync as existsSync35, mkdirSync as mkdirSync19, readFileSync as readFileSync33, renameSync as renameSync7, rmSync as rmSync10, writeFileSync as writeFileSync16 } from "node:fs";
|
|
44278
44391
|
import { homedir as homedir3 } from "node:os";
|
|
44279
44392
|
import { basename as basename10, join as join30 } from "node:path";
|
|
@@ -44283,7 +44396,7 @@ function hasVendoredFloor() {
|
|
|
44283
44396
|
}
|
|
44284
44397
|
function faceSource(file2, sha2569) {
|
|
44285
44398
|
const vendored = join30(VENDORED_DIR, basename10(file2));
|
|
44286
|
-
if (existsSync35(vendored) &&
|
|
44399
|
+
if (existsSync35(vendored) && createHash14("sha256").update(readFileSync33(vendored)).digest("hex") === sha2569) {
|
|
44287
44400
|
return vendored;
|
|
44288
44401
|
}
|
|
44289
44402
|
const cached3 = join30(CACHE_DIR, sha2569);
|
|
@@ -44418,7 +44531,7 @@ var init_face_source = __esm({
|
|
|
44418
44531
|
REPO_ROOT4 = fileURLToPath21(new URL("../..", import.meta.url));
|
|
44419
44532
|
VENDORED_DIR = process.env.HIMI_FONTS_VENDORED_DIR || join30(REPO_ROOT4, "stdlib", "fonts", "vendored", "wix-madefor");
|
|
44420
44533
|
CACHE_DIR = join30(process.env.XDG_CACHE_HOME || join30(homedir3(), ".cache"), "himi", "fonts");
|
|
44421
|
-
sha256Hex3 = (bytes2) =>
|
|
44534
|
+
sha256Hex3 = (bytes2) => createHash14("sha256").update(bytes2).digest("hex");
|
|
44422
44535
|
RAW = ["https://", "raw.", "githubuser", "content.com"].join("");
|
|
44423
44536
|
UPSTREAM_DIR = /^(ofl|apache|ufl)\/[a-z0-9_-]+$/;
|
|
44424
44537
|
FETCH_TIMEOUT_MS = 2e4;
|
|
@@ -46317,8 +46430,8 @@ var init_flags = __esm({
|
|
|
46317
46430
|
|
|
46318
46431
|
// ../../core/ts/src/flags-engine.ts
|
|
46319
46432
|
function bucket(key4) {
|
|
46320
|
-
const
|
|
46321
|
-
const n2 = (
|
|
46433
|
+
const digest3 = sha1(key4);
|
|
46434
|
+
const n2 = (digest3[0] << 24 | digest3[1] << 16 | digest3[2] << 8 | digest3[3]) >>> 0;
|
|
46322
46435
|
return n2 % 1e4;
|
|
46323
46436
|
}
|
|
46324
46437
|
function attrValue(ctx, attribute2) {
|
|
@@ -47547,7 +47660,7 @@ __export(wix_member_login_exports, {
|
|
|
47547
47660
|
webWixCall: () => webWixCall,
|
|
47548
47661
|
webWixStream: () => webWixStream
|
|
47549
47662
|
});
|
|
47550
|
-
import { createHash as
|
|
47663
|
+
import { createHash as createHash15, randomBytes } from "node:crypto";
|
|
47551
47664
|
function b64url(buf) {
|
|
47552
47665
|
return buf.toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
47553
47666
|
}
|
|
@@ -47589,7 +47702,7 @@ function authCodeFrom(url) {
|
|
|
47589
47702
|
}
|
|
47590
47703
|
async function exchangeSessionToken(clientId, redirectUri, visitorToken, sessionToken) {
|
|
47591
47704
|
const verifier2 = b64url(randomBytes(32));
|
|
47592
|
-
const challenge = b64url(
|
|
47705
|
+
const challenge = b64url(createHash15("sha256").update(verifier2).digest());
|
|
47593
47706
|
const state = b64url(randomBytes(8));
|
|
47594
47707
|
const rs2 = await postJson(
|
|
47595
47708
|
"/_api/redirects-api/v1/redirect-session",
|
|
@@ -48692,7 +48805,7 @@ var init_person_session_auth = __esm({
|
|
|
48692
48805
|
import { readFileSync as readFileSync36 } from "node:fs";
|
|
48693
48806
|
import { homedir as homedir5 } from "node:os";
|
|
48694
48807
|
import { join as pathJoin2 } from "node:path";
|
|
48695
|
-
import { createHash as
|
|
48808
|
+
import { createHash as createHash16 } from "node:crypto";
|
|
48696
48809
|
function captureAccountSession(req, opts = {}) {
|
|
48697
48810
|
const env = opts.env ?? process.env;
|
|
48698
48811
|
const now = opts.now ?? Date.now();
|
|
@@ -48731,7 +48844,7 @@ async function accountPrincipal(cookie, fetchImpl = fetch) {
|
|
|
48731
48844
|
const identity = await resolveWixAccounts(cookie, fetchImpl);
|
|
48732
48845
|
if (!identity.ok) return { ok: false, reason: identity.reason };
|
|
48733
48846
|
const ids2 = identity.accounts.map((a3) => a3.accountId).sort().join("\n");
|
|
48734
|
-
return { ok: true, principal: `acct_${
|
|
48847
|
+
return { ok: true, principal: `acct_${createHash16("sha256").update(ids2).digest("hex").slice(0, 32)}` };
|
|
48735
48848
|
}
|
|
48736
48849
|
function safeAccountReturn(raw, requestHost, requestProto = "http") {
|
|
48737
48850
|
if (typeof raw !== "string" || !raw) return "/";
|
|
@@ -48843,9 +48956,9 @@ var init_flag_assignments = __esm({
|
|
|
48843
48956
|
});
|
|
48844
48957
|
|
|
48845
48958
|
// ../../core/dev-server/src/images.ts
|
|
48846
|
-
import { createHash as
|
|
48959
|
+
import { createHash as createHash17 } from "node:crypto";
|
|
48847
48960
|
function svgFor(productId, title, sku) {
|
|
48848
|
-
const seedHex =
|
|
48961
|
+
const seedHex = createHash17("sha1").update(productId + ":" + title).digest("hex");
|
|
48849
48962
|
const h2 = (n2) => parseInt(seedHex.slice(n2, n2 + 2), 16);
|
|
48850
48963
|
const hue1 = h2(0) % 360;
|
|
48851
48964
|
const hue2 = (hue1 + 30 + h2(2) % 60) % 360;
|
|
@@ -48877,7 +48990,7 @@ function escapeXml(s5) {
|
|
|
48877
48990
|
return s5.replace(/[<>&"']/g, (c2) => ({ "<": "<", ">": ">", "&": "&", '"': """, "'": "'" })[c2] ?? c2);
|
|
48878
48991
|
}
|
|
48879
48992
|
function wixPhotoSvg(category, seed2) {
|
|
48880
|
-
const seedHex =
|
|
48993
|
+
const seedHex = createHash17("sha1").update(category + ":" + seed2).digest("hex");
|
|
48881
48994
|
const h2 = (n2) => parseInt(seedHex.slice(n2, n2 + 2), 16);
|
|
48882
48995
|
const palette2 = paletteForCategory(category, h2);
|
|
48883
48996
|
const glyph = glyphForCategory(category);
|
|
@@ -49004,7 +49117,7 @@ var init_stable_ids = __esm({
|
|
|
49004
49117
|
|
|
49005
49118
|
// ../../core/dev-server/src/preview.ts
|
|
49006
49119
|
import { spawn as spawn2 } from "node:child_process";
|
|
49007
|
-
import { createHash as
|
|
49120
|
+
import { createHash as createHash18 } from "node:crypto";
|
|
49008
49121
|
import { existsSync as existsSync37, createReadStream, statSync as statSync9, readFileSync as readFileSync37, renameSync as renameSync8, unlinkSync } from "node:fs";
|
|
49009
49122
|
import { homedir as homedir6, tmpdir } from "node:os";
|
|
49010
49123
|
import { resolve as resolvePath, dirname as dirname25 } from "node:path";
|
|
@@ -49020,7 +49133,7 @@ function macosWinlistBin() {
|
|
|
49020
49133
|
}
|
|
49021
49134
|
function macosWinlistSourceHash() {
|
|
49022
49135
|
try {
|
|
49023
|
-
return
|
|
49136
|
+
return createHash18("sha1").update(readFileSync37(MACOS_WINLIST)).digest("hex").slice(0, 12);
|
|
49024
49137
|
} catch {
|
|
49025
49138
|
return "missing";
|
|
49026
49139
|
}
|
|
@@ -50034,10 +50147,10 @@ var init_preview2 = __esm({
|
|
|
50034
50147
|
});
|
|
50035
50148
|
|
|
50036
50149
|
// ../../core/dev-server/src/tier4-integrity.ts
|
|
50037
|
-
import { createHash as
|
|
50150
|
+
import { createHash as createHash19 } from "node:crypto";
|
|
50038
50151
|
function computeSri(bytes2) {
|
|
50039
|
-
const
|
|
50040
|
-
return `sha384-${
|
|
50152
|
+
const digest3 = createHash19("sha384").update(bytes2).digest("base64");
|
|
50153
|
+
return `sha384-${digest3}`;
|
|
50041
50154
|
}
|
|
50042
50155
|
function parseManifestIntegrity(manifest2) {
|
|
50043
50156
|
const out2 = /* @__PURE__ */ new Map();
|
|
@@ -153846,7 +153959,7 @@ __export(widgets_exports, {
|
|
|
153846
153959
|
widgetRealm: () => widgetRealm,
|
|
153847
153960
|
widgetScanRunCount: () => widgetScanRunCount
|
|
153848
153961
|
});
|
|
153849
|
-
import { createHash as
|
|
153962
|
+
import { createHash as createHash20 } from "node:crypto";
|
|
153850
153963
|
import { lstatSync as lstatSync16, readdirSync as readdirSync24, statSync as statSync10 } from "node:fs";
|
|
153851
153964
|
import { join as join34 } from "node:path";
|
|
153852
153965
|
import { inspect } from "node:util";
|
|
@@ -153906,8 +154019,8 @@ function dropEntry(cache4, key4) {
|
|
|
153906
154019
|
cache4.bytes -= entry.bytes;
|
|
153907
154020
|
}
|
|
153908
154021
|
function produceCacheKey(bundleJs, timeoutMs, clock) {
|
|
153909
|
-
const
|
|
153910
|
-
return `${timeoutMs}|${clock === void 0 ? "live" : Math.trunc(clock)}|${
|
|
154022
|
+
const digest3 = createHash20("sha256").update(bundleJs).digest("base64");
|
|
154023
|
+
return `${timeoutMs}|${clock === void 0 ? "live" : Math.trunc(clock)}|${digest3}`;
|
|
153911
154024
|
}
|
|
153912
154025
|
function cachedProduce(evaluator, key4) {
|
|
153913
154026
|
const cache4 = realmProduceCache(evaluator);
|
|
@@ -153954,7 +154067,7 @@ function widgetScanRunCount() {
|
|
|
153954
154067
|
return scanRuns;
|
|
153955
154068
|
}
|
|
153956
154069
|
function bundleDirFingerprint(roots2) {
|
|
153957
|
-
const hash3 =
|
|
154070
|
+
const hash3 = createHash20("sha256");
|
|
153958
154071
|
try {
|
|
153959
154072
|
for (const root of roots2) {
|
|
153960
154073
|
let entries;
|
|
@@ -154373,7 +154486,7 @@ function contentEtag(snapshot4) {
|
|
|
154373
154486
|
// Lever A — a timeline change must bump the etag (frame values/times are content).
|
|
154374
154487
|
frames: snapshot4.frames ?? null
|
|
154375
154488
|
});
|
|
154376
|
-
return "sha256-" +
|
|
154489
|
+
return "sha256-" + createHash20("sha256").update(canonical9).digest("base64");
|
|
154377
154490
|
}
|
|
154378
154491
|
async function buildWidgetSnapshot(bundleJs, widgetId, opts = {}) {
|
|
154379
154492
|
const { widgets } = await extractWidgets(bundleJs, opts);
|
|
@@ -154779,7 +154892,7 @@ import { createServer as createServer2 } from "node:http";
|
|
|
154779
154892
|
import { readFile, stat } from "node:fs/promises";
|
|
154780
154893
|
import { readFileSync as readFileSync43, existsSync as existsSync40, watch, mkdirSync as mkdirSync21, rmSync as rmSync11 } from "node:fs";
|
|
154781
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";
|
|
154782
|
-
import { createHash as
|
|
154895
|
+
import { createHash as createHash21, randomUUID as randomUUID6 } from "node:crypto";
|
|
154783
154896
|
import { fileURLToPath as fileURLToPath26, pathToFileURL as pathToFileURL5 } from "node:url";
|
|
154784
154897
|
async function loadBootStateBaker() {
|
|
154785
154898
|
await Promise.resolve().then(() => (init_validate_descriptor(), validate_descriptor_exports));
|
|
@@ -154829,7 +154942,7 @@ async function readBody2(req) {
|
|
|
154829
154942
|
return Buffer.concat(chunks).toString("utf-8");
|
|
154830
154943
|
}
|
|
154831
154944
|
function makeEtag(body) {
|
|
154832
|
-
return `"${
|
|
154945
|
+
return `"${createHash21("sha256").update(body).digest("hex").slice(0, 32)}"`;
|
|
154833
154946
|
}
|
|
154834
154947
|
function servedTokensPath(app2) {
|
|
154835
154948
|
return app2.module.designTokensPath ?? resolve34(app2.dir, uiConfig(app2.module.config).designTokensPath ?? "tokens.json");
|
|
@@ -155409,7 +155522,7 @@ function bundleIntegritySync(name, dir) {
|
|
|
155409
155522
|
for (const root of dir ? [dir, TIER5_ROOT2] : [TIER5_ROOT2]) {
|
|
155410
155523
|
try {
|
|
155411
155524
|
const bytes2 = readFileSync43(resolve34(root, `${name}.bundle.js`));
|
|
155412
|
-
return "sha256-" +
|
|
155525
|
+
return "sha256-" + createHash21("sha256").update(bytes2).digest("base64");
|
|
155413
155526
|
} catch {
|
|
155414
155527
|
}
|
|
155415
155528
|
}
|
|
@@ -155841,7 +155954,7 @@ function tokensAreDerived(state) {
|
|
|
155841
155954
|
}
|
|
155842
155955
|
function servedTokensHash(app2) {
|
|
155843
155956
|
try {
|
|
155844
|
-
return
|
|
155957
|
+
return createHash21("sha256").update(readFileSync43(servedTokensPath(app2))).digest("hex");
|
|
155845
155958
|
} catch {
|
|
155846
155959
|
return "";
|
|
155847
155960
|
}
|
|
@@ -156649,7 +156762,7 @@ async function handleWebWix(req, res, state) {
|
|
|
156649
156762
|
userId: userId ?? session.email ?? null,
|
|
156650
156763
|
email: session.email ?? "",
|
|
156651
156764
|
preferenceContext: preferenceIdentity ? {
|
|
156652
|
-
accountId: `m_${
|
|
156765
|
+
accountId: `m_${createHash21("sha256").update(preferenceIdentity).digest("hex")}`,
|
|
156653
156766
|
// Headless client IDs are site-bound and come from the server's app
|
|
156654
156767
|
// configuration, never the URL's user-supplied business parameter.
|
|
156655
156768
|
businessId: auth.clientId
|
|
@@ -157404,7 +157517,7 @@ async function readBundleFile(name, dir, opts = {}) {
|
|
|
157404
157517
|
if (!roots2.some((root) => path2.startsWith(root))) continue;
|
|
157405
157518
|
try {
|
|
157406
157519
|
const bytes2 = await readFile(path2);
|
|
157407
|
-
const integrity2 = "sha256-" +
|
|
157520
|
+
const integrity2 = "sha256-" + createHash21("sha256").update(bytes2).digest("base64");
|
|
157408
157521
|
return { bytes: bytes2, integrity: integrity2 };
|
|
157409
157522
|
} catch (err) {
|
|
157410
157523
|
const code3 = err.code;
|
|
@@ -157596,7 +157709,7 @@ function readActionHandlerManifest(app2) {
|
|
|
157596
157709
|
} catch {
|
|
157597
157710
|
return { handlers: [] };
|
|
157598
157711
|
}
|
|
157599
|
-
const integrity2 = "sha256-" +
|
|
157712
|
+
const integrity2 = "sha256-" + createHash21("sha256").update(bytes2).digest("base64");
|
|
157600
157713
|
const bundleUrl = `/v1/action-handler-bundles/${app2}`;
|
|
157601
157714
|
return { handlers: decls.map((d2) => ({ id: d2.id, policy: d2.policy, description: d2.description, bundleUrl, integrity: integrity2 })) };
|
|
157602
157715
|
}
|
|
@@ -157609,7 +157722,7 @@ async function handleActionHandlerBundleGet(res, app2) {
|
|
|
157609
157722
|
if (!path2.startsWith(ACTION_HANDLERS_ROOT)) return sendJson(res, 404, { error: "not_found" });
|
|
157610
157723
|
try {
|
|
157611
157724
|
const bytes2 = await readFile(path2);
|
|
157612
|
-
const integrity2 = "sha256-" +
|
|
157725
|
+
const integrity2 = "sha256-" + createHash21("sha256").update(bytes2).digest("base64");
|
|
157613
157726
|
res.setHeader("content-type", "application/javascript; charset=utf-8");
|
|
157614
157727
|
res.setHeader("cache-control", "max-age=300");
|
|
157615
157728
|
res.setHeader("x-himalaya-bundle-integrity", integrity2);
|
|
@@ -158718,7 +158831,7 @@ var init_widget_identity = __esm({
|
|
|
158718
158831
|
});
|
|
158719
158832
|
|
|
158720
158833
|
// ../../core/serve-storage/src/release-payload-hash.ts
|
|
158721
|
-
import { createHash as
|
|
158834
|
+
import { createHash as createHash22 } from "node:crypto";
|
|
158722
158835
|
function canonical2(value2) {
|
|
158723
158836
|
if (value2 === null || typeof value2 !== "object") return JSON.stringify(value2);
|
|
158724
158837
|
if (Array.isArray(value2)) return `[${value2.map(canonical2).join(",")}]`;
|
|
@@ -158726,7 +158839,7 @@ function canonical2(value2) {
|
|
|
158726
158839
|
return `{${Object.keys(record7).filter((key4) => record7[key4] !== void 0).sort().map((key4) => `${JSON.stringify(key4)}:${canonical2(record7[key4])}`).join(",")}}`;
|
|
158727
158840
|
}
|
|
158728
158841
|
function releasePayloadHash(payload) {
|
|
158729
|
-
const hash3 = (value2) =>
|
|
158842
|
+
const hash3 = (value2) => createHash22("sha256").update(canonical2(value2)).digest("hex");
|
|
158730
158843
|
if (!payload || typeof payload !== "object" || Array.isArray(payload)) return hash3(payload);
|
|
158731
158844
|
const { catalogs: _catalogBytes, ...record7 } = payload;
|
|
158732
158845
|
const manifest2 = record7.manifest;
|
|
@@ -158757,9 +158870,9 @@ var init_release_payload_hash = __esm({
|
|
|
158757
158870
|
});
|
|
158758
158871
|
|
|
158759
158872
|
// ../../core/serve-storage/src/release-patch.ts
|
|
158760
|
-
import { createHash as
|
|
158873
|
+
import { createHash as createHash23 } from "node:crypto";
|
|
158761
158874
|
function sha256hex(b3) {
|
|
158762
|
-
return
|
|
158875
|
+
return createHash23("sha256").update(b3).digest("hex");
|
|
158763
158876
|
}
|
|
158764
158877
|
function stableStringify(value2) {
|
|
158765
158878
|
if (value2 === null || typeof value2 !== "object") return JSON.stringify(value2);
|
|
@@ -163498,11 +163611,11 @@ var init_dependencies2 = __esm({
|
|
|
163498
163611
|
});
|
|
163499
163612
|
|
|
163500
163613
|
// ../../core/functions-build/src/sbom.ts
|
|
163501
|
-
import { createHash as
|
|
163614
|
+
import { createHash as createHash24 } from "node:crypto";
|
|
163502
163615
|
function createFunctionSbom(packages) {
|
|
163503
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 }));
|
|
163504
163617
|
const body = JSON.stringify({ format: "himalaya-sbom-v1", components: components2 });
|
|
163505
|
-
return { format: "himalaya-sbom-v1", components: components2, hash:
|
|
163618
|
+
return { format: "himalaya-sbom-v1", components: components2, hash: createHash24("sha256").update(body).digest("hex") };
|
|
163506
163619
|
}
|
|
163507
163620
|
var init_sbom = __esm({
|
|
163508
163621
|
"../../core/functions-build/src/sbom.ts"() {
|
|
@@ -163511,12 +163624,12 @@ var init_sbom = __esm({
|
|
|
163511
163624
|
});
|
|
163512
163625
|
|
|
163513
163626
|
// ../../core/functions-build/src/build.ts
|
|
163514
|
-
import { createHash as
|
|
163627
|
+
import { createHash as createHash25 } from "node:crypto";
|
|
163515
163628
|
function sha2562(value2) {
|
|
163516
|
-
return
|
|
163629
|
+
return createHash25("sha256").update(value2).digest("hex");
|
|
163517
163630
|
}
|
|
163518
163631
|
function sri(value2) {
|
|
163519
|
-
return `sha256-${
|
|
163632
|
+
return `sha256-${createHash25("sha256").update(value2).digest("base64")}`;
|
|
163520
163633
|
}
|
|
163521
163634
|
function schemaHash(schema2) {
|
|
163522
163635
|
if (!schema2) return "";
|
|
@@ -163790,8 +163903,8 @@ __export(build_exports2, {
|
|
|
163790
163903
|
withStoreNavBundle: () => withStoreNavBundle,
|
|
163791
163904
|
withoutDevOnlyAppConfig: () => withoutDevOnlyAppConfig
|
|
163792
163905
|
});
|
|
163793
|
-
import { createHash as
|
|
163794
|
-
import { readFileSync as readFileSync46, readdirSync as readdirSync26, existsSync as existsSync43, realpathSync as
|
|
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";
|
|
163795
163908
|
import { dirname as dirname28, join as join38, resolve as resolve36, sep as sep13 } from "node:path";
|
|
163796
163909
|
import { fileURLToPath as fileURLToPath27 } from "node:url";
|
|
163797
163910
|
import { createRequire as createRequire3 } from "node:module";
|
|
@@ -163926,9 +164039,9 @@ function sourceTranslationKeys2(locale, appDir3) {
|
|
|
163926
164039
|
const path2 = join38(l10nDir, `${tag2}.json`);
|
|
163927
164040
|
if (!existsSync43(path2)) return /* @__PURE__ */ new Set();
|
|
163928
164041
|
try {
|
|
163929
|
-
const realDir =
|
|
163930
|
-
const realFile =
|
|
163931
|
-
if (!realDir.startsWith(
|
|
164042
|
+
const realDir = realpathSync7(l10nDir);
|
|
164043
|
+
const realFile = realpathSync7(path2);
|
|
164044
|
+
if (!realDir.startsWith(realpathSync7(appDir3) + sep13) || dirname28(realFile) !== realDir) return /* @__PURE__ */ new Set();
|
|
163932
164045
|
return new Set(keyMap(parseCatalog(readFileSync46(realFile, "utf8")), { sourceFallback: true }).keys());
|
|
163933
164046
|
} catch {
|
|
163934
164047
|
return /* @__PURE__ */ new Set();
|
|
@@ -163959,10 +164072,10 @@ function servesMessages(text32) {
|
|
|
163959
164072
|
}
|
|
163960
164073
|
}
|
|
163961
164074
|
function sha2563(buf) {
|
|
163962
|
-
return
|
|
164075
|
+
return createHash26("sha256").update(buf).digest("hex");
|
|
163963
164076
|
}
|
|
163964
164077
|
function sri2(buf) {
|
|
163965
|
-
return "sha256-" +
|
|
164078
|
+
return "sha256-" + createHash26("sha256").update(buf).digest("base64");
|
|
163966
164079
|
}
|
|
163967
164080
|
async function widgetFailureDetail(res) {
|
|
163968
164081
|
try {
|
|
@@ -166890,14 +167003,14 @@ __export(studio_exports, {
|
|
|
166890
167003
|
renderStudioHtml: () => renderStudioHtml,
|
|
166891
167004
|
writeStudioRecord: () => writeStudioRecord
|
|
166892
167005
|
});
|
|
166893
|
-
import { createHash as
|
|
166894
|
-
import { existsSync as existsSync46, readdirSync as readdirSync28, readFileSync as readFileSync49, realpathSync as
|
|
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";
|
|
166895
167008
|
import { basename as basename12, extname as extname3, join as join41, relative as relative11, resolve as resolve37, sep as sep14 } from "node:path";
|
|
166896
167009
|
import { pathToFileURL as pathToFileURL6 } from "node:url";
|
|
166897
167010
|
function realInside(dir, abs) {
|
|
166898
167011
|
try {
|
|
166899
|
-
const root =
|
|
166900
|
-
const real =
|
|
167012
|
+
const root = realpathSync8(dir);
|
|
167013
|
+
const real = realpathSync8(abs);
|
|
166901
167014
|
return real.startsWith(root + sep14) ? real : null;
|
|
166902
167015
|
} catch {
|
|
166903
167016
|
return null;
|
|
@@ -167172,7 +167285,7 @@ function buildView(dir, memory2, now) {
|
|
|
167172
167285
|
reveal: memory2.reveal ?? null
|
|
167173
167286
|
};
|
|
167174
167287
|
const { generatedAt: _ignored, timelineFrames: _count, ...stable } = view;
|
|
167175
|
-
const v2 =
|
|
167288
|
+
const v2 = createHash27("sha256").update(JSON.stringify(stable)).digest("hex").slice(0, 16);
|
|
167176
167289
|
return { v: v2, ...view };
|
|
167177
167290
|
}
|
|
167178
167291
|
function writeAtomic(file2, content) {
|
|
@@ -169666,7 +169779,7 @@ __export(wix_owner_exports, {
|
|
|
169666
169779
|
wixCliOnPath: () => wixCliOnPath
|
|
169667
169780
|
});
|
|
169668
169781
|
import { spawn as spawn3 } from "node:child_process";
|
|
169669
|
-
import { createHash as
|
|
169782
|
+
import { createHash as createHash28 } from "node:crypto";
|
|
169670
169783
|
import { accessSync as accessSync2, constants as fsConstants, statSync as statSync14 } from "node:fs";
|
|
169671
169784
|
import { delimiter, join as join44 } from "node:path";
|
|
169672
169785
|
function resolveSiteId(flag3) {
|
|
@@ -169691,7 +169804,7 @@ async function siteToken(msid, spawnImpl = spawn3, fetchImpl = fetch) {
|
|
|
169691
169804
|
return await mintToken(["token", "--site", msid], `wix token --site ${msid}`, msid, spawnImpl);
|
|
169692
169805
|
}
|
|
169693
169806
|
function subjectFingerprint(subject) {
|
|
169694
|
-
return
|
|
169807
|
+
return createHash28("sha256").update(subject).digest("hex").slice(0, 16);
|
|
169695
169808
|
}
|
|
169696
169809
|
async function exchangeSiteToken(subject, msid, opts = {}) {
|
|
169697
169810
|
const now = opts.now ?? Date.now;
|
|
@@ -177055,7 +177168,7 @@ var init_fxp = __esm({
|
|
|
177055
177168
|
});
|
|
177056
177169
|
|
|
177057
177170
|
// ../../packages/serve/src/pkcs12.ts
|
|
177058
|
-
import { X509Certificate, createHash as
|
|
177171
|
+
import { X509Certificate, createHash as createHash29, createPrivateKey as createPrivateKey2, createPublicKey, pbkdf2Sync, createDecipheriv } from "node:crypto";
|
|
177059
177172
|
function decodePkcs12(der, password) {
|
|
177060
177173
|
try {
|
|
177061
177174
|
const pfx = readSequence(der, 0);
|
|
@@ -177246,12 +177359,12 @@ function decryptPbes2(params, ciphertext, password) {
|
|
|
177246
177359
|
keyLen = maybeKeyLen.value;
|
|
177247
177360
|
cursor = maybeKeyLen.end;
|
|
177248
177361
|
}
|
|
177249
|
-
let
|
|
177362
|
+
let digest3 = "sha1";
|
|
177250
177363
|
const prf = readSequence(kdfParams.contents, cursor);
|
|
177251
177364
|
if (prf) {
|
|
177252
177365
|
const prfOid = readOid(prf.contents, 0);
|
|
177253
|
-
if (prfOid?.oid === OID.hmacWithSHA256)
|
|
177254
|
-
if (prfOid?.oid === OID.hmacWithSHA1)
|
|
177366
|
+
if (prfOid?.oid === OID.hmacWithSHA256) digest3 = "sha256";
|
|
177367
|
+
if (prfOid?.oid === OID.hmacWithSHA1) digest3 = "sha1";
|
|
177255
177368
|
}
|
|
177256
177369
|
const encOid = readOid(enc3.contents, 0);
|
|
177257
177370
|
if (!encOid) return void 0;
|
|
@@ -177260,7 +177373,7 @@ function decryptPbes2(params, ciphertext, password) {
|
|
|
177260
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;
|
|
177261
177374
|
if (!cipher) return void 0;
|
|
177262
177375
|
const length2 = keyLen ?? (cipher === "aes-256-cbc" ? 32 : cipher === "aes-192-cbc" ? 24 : 16);
|
|
177263
|
-
const key4 = pbkdf2Sync(password, salt.value, iter.value, length2,
|
|
177376
|
+
const key4 = pbkdf2Sync(password, salt.value, iter.value, length2, digest3);
|
|
177264
177377
|
try {
|
|
177265
177378
|
const decipher2 = createDecipheriv(cipher, key4, ivOct.value);
|
|
177266
177379
|
decipher2.setAutoPadding(true);
|
|
@@ -177329,7 +177442,7 @@ function expand(src, v2) {
|
|
|
177329
177442
|
return out2;
|
|
177330
177443
|
}
|
|
177331
177444
|
function sha12(data) {
|
|
177332
|
-
return
|
|
177445
|
+
return createHash29("sha1").update(data).digest();
|
|
177333
177446
|
}
|
|
177334
177447
|
function readAt(buf, i2) {
|
|
177335
177448
|
if (i2 >= buf.length) return void 0;
|
|
@@ -177419,7 +177532,7 @@ var init_pkcs12 = __esm({
|
|
|
177419
177532
|
});
|
|
177420
177533
|
|
|
177421
177534
|
// ../../packages/serve/src/customer-signing-assets.ts
|
|
177422
|
-
import { createHash as
|
|
177535
|
+
import { createHash as createHash30 } from "node:crypto";
|
|
177423
177536
|
function readValue(node4) {
|
|
177424
177537
|
const [tag2, children2] = Object.entries(node4)[0] ?? [];
|
|
177425
177538
|
if (!tag2 || !Array.isArray(children2)) return refuse2("customer_profile_invalid");
|
|
@@ -177497,7 +177610,7 @@ function toBundle(assets, expected, decoded2, profileType, apns, deviceCount) {
|
|
|
177497
177610
|
provisioningProfile: Buffer.from(assets.provisioningProfile).toString("base64"),
|
|
177498
177611
|
profileSha256: sha2564(assets.provisioningProfile),
|
|
177499
177612
|
certificateSha256: sha2564(decoded2.cert.raw),
|
|
177500
|
-
certificateSha1:
|
|
177613
|
+
certificateSha1: createHash30("sha1").update(decoded2.cert.raw).digest("hex").toUpperCase(),
|
|
177501
177614
|
expiresAt: new Date(Math.min(decoded2.expiration, Date.parse(decoded2.cert.validTo))).toISOString(),
|
|
177502
177615
|
...apns ? { apnsEnvironment: apns } : {},
|
|
177503
177616
|
deviceCount
|
|
@@ -177549,7 +177662,7 @@ var init_customer_signing_assets = __esm({
|
|
|
177549
177662
|
init_fxp();
|
|
177550
177663
|
init_pkcs12();
|
|
177551
177664
|
init_customer_dist_signing();
|
|
177552
|
-
sha2564 = (bytes2) =>
|
|
177665
|
+
sha2564 = (bytes2) => createHash30("sha256").update(bytes2).digest("hex");
|
|
177553
177666
|
refuse2 = (code3) => {
|
|
177554
177667
|
throw new CustomerSigningError(code3);
|
|
177555
177668
|
};
|
|
@@ -178181,10 +178294,10 @@ __export(content_manifest_exports, {
|
|
|
178181
178294
|
writeContentManifest: () => writeContentManifest
|
|
178182
178295
|
});
|
|
178183
178296
|
import { randomUUID as randomUUID8 } from "node:crypto";
|
|
178184
|
-
import { constants as constants3, lstatSync as lstatSync18, readFileSync as readFileSync57, realpathSync as
|
|
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";
|
|
178185
178298
|
import { join as join46 } from "node:path";
|
|
178186
178299
|
function contentManifestPath(dir) {
|
|
178187
|
-
const path2 = join46(
|
|
178300
|
+
const path2 = join46(realpathSync9(dir), "himalaya.content.json");
|
|
178188
178301
|
try {
|
|
178189
178302
|
if (lstatSync18(path2).isSymbolicLink()) throw new Error("himalaya.content.json is a symlink \u2014 refusing to read or write through it");
|
|
178190
178303
|
} catch (error) {
|
|
@@ -181938,7 +182051,7 @@ __export(icon_exports, {
|
|
|
181938
182051
|
summarize: () => summarize3,
|
|
181939
182052
|
writePreparedIcon: () => writePreparedIcon
|
|
181940
182053
|
});
|
|
181941
|
-
import { createHash as
|
|
182054
|
+
import { createHash as createHash31 } from "node:crypto";
|
|
181942
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";
|
|
181943
182056
|
import { basename as basename15, dirname as dirname35, join as join49, resolve as resolve45, sep as sep16 } from "node:path";
|
|
181944
182057
|
function readManifest(dir) {
|
|
@@ -182027,7 +182140,7 @@ async function iconStatus(dir) {
|
|
|
182027
182140
|
...base2,
|
|
182028
182141
|
templateIcon: templateIconMatch(png),
|
|
182029
182142
|
bytes: png.length,
|
|
182030
|
-
sha256:
|
|
182143
|
+
sha256: createHash31("sha256").update(png).digest("hex"),
|
|
182031
182144
|
header: pngHeader(png),
|
|
182032
182145
|
byteIssues
|
|
182033
182146
|
};
|
|
@@ -186726,7 +186839,7 @@ __export(pack_exports, {
|
|
|
186726
186839
|
unpackTo: () => unpackTo,
|
|
186727
186840
|
writeZip: () => writeZip
|
|
186728
186841
|
});
|
|
186729
|
-
import { createHash as
|
|
186842
|
+
import { createHash as createHash32 } from "node:crypto";
|
|
186730
186843
|
import { deflateRawSync, inflateRawSync } from "node:zlib";
|
|
186731
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";
|
|
186732
186845
|
import { dirname as dirname38, join as join55, resolve as resolve47 } from "node:path";
|
|
@@ -186876,11 +186989,11 @@ function gatherReleaseEntries(appDir3) {
|
|
|
186876
186989
|
return { entries, manifest: manifest2, skipped };
|
|
186877
186990
|
}
|
|
186878
186991
|
function sha256Hex4(bytes2) {
|
|
186879
|
-
return
|
|
186992
|
+
return createHash32("sha256").update(bytes2).digest("hex");
|
|
186880
186993
|
}
|
|
186881
186994
|
function computeContentHash(entries) {
|
|
186882
186995
|
const input = packageHashInput(entries.map((e2) => ({ path: e2.path, hash: sha256Hex4(e2.bytes) })));
|
|
186883
|
-
return "sha256-" +
|
|
186996
|
+
return "sha256-" + createHash32("sha256").update(input).digest("base64");
|
|
186884
186997
|
}
|
|
186885
186998
|
function buildEntries(appDir3, app2, opts) {
|
|
186886
186999
|
const { entries: released, manifest: manifest2, skipped } = gatherReleaseEntries(appDir3);
|
|
@@ -187065,6 +187178,7 @@ __export(app_source_exports, {
|
|
|
187065
187178
|
newestSourceChangeMs: () => newestSourceChangeMs,
|
|
187066
187179
|
readAppSource: () => readAppSource,
|
|
187067
187180
|
removeStaleSource: () => removeStaleSource,
|
|
187181
|
+
renderInputPassCount: () => renderInputPassCount,
|
|
187068
187182
|
renderInputRootDirs: () => renderInputRootDirs,
|
|
187069
187183
|
secretFindings: () => secretFindings,
|
|
187070
187184
|
sourceFingerprint: () => sourceFingerprint,
|
|
@@ -187073,7 +187187,7 @@ __export(app_source_exports, {
|
|
|
187073
187187
|
writeConflicts: () => writeConflicts,
|
|
187074
187188
|
zipAppSource: () => zipAppSource
|
|
187075
187189
|
});
|
|
187076
|
-
import { createHash as
|
|
187190
|
+
import { createHash as createHash33 } from "node:crypto";
|
|
187077
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";
|
|
187078
187192
|
import { join as join56, resolve as resolve48, sep as sep18 } from "node:path";
|
|
187079
187193
|
import { createRequire as createRequire5 } from "node:module";
|
|
@@ -187120,25 +187234,77 @@ function collectAppSource(dir, opts = {}) {
|
|
|
187120
187234
|
skipped.sort();
|
|
187121
187235
|
return { entries, skipped };
|
|
187122
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
|
+
}
|
|
187123
187267
|
function renderInputRootDirs(dir) {
|
|
187124
187268
|
const entries = [];
|
|
187269
|
+
const walked = [];
|
|
187270
|
+
let hasSymlink = false;
|
|
187125
187271
|
walkSourceTree(
|
|
187126
187272
|
dir,
|
|
187127
187273
|
(archivePath, hostRel) => {
|
|
187274
|
+
walked.push({ archivePath, hostRel });
|
|
187128
187275
|
const segs = archivePath.split("/");
|
|
187129
187276
|
if (!CODE_FILE.test(archivePath) || /\.d\.[cm]?ts$/i.test(archivePath)) return;
|
|
187130
187277
|
if (segs.length === 1 || segs[0] === "dev" || segs[0] === "tier5-src") entries.push(join56(dir, hostRel));
|
|
187131
187278
|
},
|
|
187132
|
-
() => {
|
|
187279
|
+
(hostRel) => {
|
|
187280
|
+
try {
|
|
187281
|
+
if (lstatSync20(join56(dir, hostRel)).isSymbolicLink()) hasSymlink = true;
|
|
187282
|
+
} catch {
|
|
187283
|
+
hasSymlink = true;
|
|
187284
|
+
}
|
|
187133
187285
|
}
|
|
187134
187286
|
);
|
|
187135
187287
|
const roots2 = new Set(RENDER_ROOT_DIRS);
|
|
187136
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
|
+
}
|
|
187137
187304
|
try {
|
|
187138
187305
|
const esbuild = createRequire5(import.meta.url)("esbuild");
|
|
187139
|
-
const empty2 = Object.fromEntries(
|
|
187140
|
-
|
|
187141
|
-
);
|
|
187306
|
+
const empty2 = Object.fromEntries(EMPTY_LOADER_EXTS.map((e2) => [e2, "empty"]));
|
|
187307
|
+
renderInputPasses++;
|
|
187142
187308
|
const result = esbuild.buildSync({
|
|
187143
187309
|
entryPoints: entries,
|
|
187144
187310
|
absWorkingDir: dir,
|
|
@@ -187152,10 +187318,19 @@ function renderInputRootDirs(dir) {
|
|
|
187152
187318
|
loader: empty2,
|
|
187153
187319
|
logLevel: "silent"
|
|
187154
187320
|
});
|
|
187321
|
+
const imported = /* @__PURE__ */ new Set();
|
|
187322
|
+
const inKey = new Set(walked.map((f2) => f2.archivePath));
|
|
187323
|
+
let keyCoversInputs = storable;
|
|
187155
187324
|
for (const input of Object.keys(result.metafile?.inputs ?? {})) {
|
|
187156
187325
|
const segs = input.split("/");
|
|
187157
|
-
if (segs.length > 1 && !input.startsWith("..") && !input.includes(":"))
|
|
187326
|
+
if (segs.length > 1 && !input.startsWith("..") && !input.includes(":")) imported.add(segs[0]);
|
|
187327
|
+
if (!inKey.has(input)) keyCoversInputs = false;
|
|
187328
|
+
}
|
|
187329
|
+
if (keyCoversInputs) {
|
|
187330
|
+
renderInputsCache.set(key4, [...imported]);
|
|
187331
|
+
if (renderInputsCache.size > RENDER_INPUTS_CACHE_MAX) renderInputsCache.delete(renderInputsCache.keys().next().value);
|
|
187158
187332
|
}
|
|
187333
|
+
for (const root of imported) roots2.add(root);
|
|
187159
187334
|
return roots2;
|
|
187160
187335
|
} catch {
|
|
187161
187336
|
return void 0;
|
|
@@ -187194,13 +187369,13 @@ function sourceFingerprint(dir) {
|
|
|
187194
187369
|
dir,
|
|
187195
187370
|
(archivePath, hostRel) => {
|
|
187196
187371
|
if (/\.md$/i.test(archivePath)) return;
|
|
187197
|
-
files.push(`${archivePath}\0${
|
|
187372
|
+
files.push(`${archivePath}\0${createHash33("sha256").update(readFileSync67(join56(dir, hostRel))).digest("hex")}`);
|
|
187198
187373
|
},
|
|
187199
187374
|
() => {
|
|
187200
187375
|
}
|
|
187201
187376
|
);
|
|
187202
187377
|
files.sort();
|
|
187203
|
-
return
|
|
187378
|
+
return createHash33("sha256").update(files.join("\n")).digest("hex");
|
|
187204
187379
|
}
|
|
187205
187380
|
function largestEntries(entries, limit = 5) {
|
|
187206
187381
|
return entries.map((e2) => ({
|
|
@@ -187333,7 +187508,7 @@ function pruneEmptyDirs(root, rel2, needed, removed) {
|
|
|
187333
187508
|
}
|
|
187334
187509
|
return empty2;
|
|
187335
187510
|
}
|
|
187336
|
-
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;
|
|
187337
187512
|
var init_app_source = __esm({
|
|
187338
187513
|
"src/app-source.ts"() {
|
|
187339
187514
|
init_define_HHP_CATALOG();
|
|
@@ -187345,6 +187520,14 @@ var init_app_source = __esm({
|
|
|
187345
187520
|
PUSH_EXCLUDED_ROOTS = ["extensions"];
|
|
187346
187521
|
RENDER_ROOT_DIRS = /* @__PURE__ */ new Set(["dev", "tier5-src", "assets", "seed", "strings", "l10n", "fonts", "images", "data"]);
|
|
187347
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;
|
|
187348
187531
|
}
|
|
187349
187532
|
});
|
|
187350
187533
|
|
|
@@ -187368,7 +187551,7 @@ __export(run_watch_exports, {
|
|
|
187368
187551
|
watchedContentDir: () => watchedContentDir,
|
|
187369
187552
|
writeRunRecord: () => writeRunRecord
|
|
187370
187553
|
});
|
|
187371
|
-
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
|
|
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";
|
|
187372
187555
|
import { randomUUID as randomUUID9 } from "node:crypto";
|
|
187373
187556
|
import { extname as extname4, join as join57, relative as relative14, resolve as resolve49, sep as sep19 } from "node:path";
|
|
187374
187557
|
function diffReleases(prev, next) {
|
|
@@ -187633,8 +187816,8 @@ function readConfined(root, rel2) {
|
|
|
187633
187816
|
const st2 = lstatSync21(at2);
|
|
187634
187817
|
if (st2.isSymbolicLink() || !(i2 === parts.length - 1 ? st2.isFile() : st2.isDirectory())) return null;
|
|
187635
187818
|
}
|
|
187636
|
-
const canonicalRoot =
|
|
187637
|
-
if (!
|
|
187819
|
+
const canonicalRoot = realpathSync10(root);
|
|
187820
|
+
if (!realpathSync10(at2).startsWith(canonicalRoot + sep19)) return null;
|
|
187638
187821
|
const fd = openSync5(at2, constants5.O_RDONLY | (constants5.O_NOFOLLOW ?? 0));
|
|
187639
187822
|
try {
|
|
187640
187823
|
if (!fstatSync2(fd).isFile()) return null;
|
|
@@ -187697,7 +187880,7 @@ __export(screen_state_exports, {
|
|
|
187697
187880
|
shotStateFor: () => shotStateFor,
|
|
187698
187881
|
withHomeCaveat: () => withHomeCaveat
|
|
187699
187882
|
});
|
|
187700
|
-
import { createHash as
|
|
187883
|
+
import { createHash as createHash34 } from "node:crypto";
|
|
187701
187884
|
import { lstatSync as lstatSync22, readFileSync as readFileSync69 } from "node:fs";
|
|
187702
187885
|
import { join as join58 } from "node:path";
|
|
187703
187886
|
function quotableLine(text32) {
|
|
@@ -187818,7 +188001,7 @@ var init_screen_state = __esm({
|
|
|
187818
188001
|
KEEP = 40;
|
|
187819
188002
|
LINE_MAX = 120;
|
|
187820
188003
|
str6 = (v2) => typeof v2 === "string" && v2.trim() ? v2 : void 0;
|
|
187821
|
-
sha256Of = (file2) =>
|
|
188004
|
+
sha256Of = (file2) => createHash34("sha256").update(readFileSync69(file2)).digest("hex");
|
|
187822
188005
|
}
|
|
187823
188006
|
});
|
|
187824
188007
|
|
|
@@ -187833,7 +188016,7 @@ __export(studio_reel_exports, {
|
|
|
187833
188016
|
thin: () => thin,
|
|
187834
188017
|
utcDay: () => utcDay
|
|
187835
188018
|
});
|
|
187836
|
-
import { createHash as
|
|
188019
|
+
import { createHash as createHash35 } from "node:crypto";
|
|
187837
188020
|
import { lstatSync as lstatSync23, readFileSync as readFileSync70 } from "node:fs";
|
|
187838
188021
|
import { basename as basename17, join as join59 } from "node:path";
|
|
187839
188022
|
function loadMemory2(dir) {
|
|
@@ -187922,7 +188105,7 @@ function inlineImages(dir, plan, budget = REEL_BUDGET_BYTES) {
|
|
|
187922
188105
|
const st2 = lstatSync23(path2);
|
|
187923
188106
|
if (!st2.isFile() || st2.nlink !== 1) return null;
|
|
187924
188107
|
const bytes2 = readFileSync70(path2);
|
|
187925
|
-
return
|
|
188108
|
+
return createHash35("sha256").update(bytes2).digest("hex") === f2.slice(0, 64) && imageExtension(bytes2) === f2.slice(65) ? bytes2 : null;
|
|
187926
188109
|
} catch {
|
|
187927
188110
|
return null;
|
|
187928
188111
|
}
|
|
@@ -188150,7 +188333,7 @@ __export(milestones_exports, {
|
|
|
188150
188333
|
watchUrlFor: () => watchUrlFor,
|
|
188151
188334
|
writeHandoverReel: () => writeHandoverReel
|
|
188152
188335
|
});
|
|
188153
|
-
import { createHash as
|
|
188336
|
+
import { createHash as createHash36, randomUUID as randomUUID10 } from "node:crypto";
|
|
188154
188337
|
import { spawn as spawn4 } from "node:child_process";
|
|
188155
188338
|
import { closeSync as closeSync6, existsSync as existsSync65, lstatSync as lstatSync24, readFileSync as readFileSync72, statSync as statSync22 } from "node:fs";
|
|
188156
188339
|
import { createServer as createServer3 } from "node:net";
|
|
@@ -188854,7 +189037,7 @@ var init_milestones = __esm({
|
|
|
188854
189037
|
INIT_SOURCE_FILE = join61(".himi", "init-source.json");
|
|
188855
189038
|
STARTING_POINT_REF = "starting-point";
|
|
188856
189039
|
TEMPLATE_NAME2 = /^[A-Za-z0-9._-]{1,64}$/;
|
|
188857
|
-
sha256Of2 = (file2) =>
|
|
189040
|
+
sha256Of2 = (file2) => createHash36("sha256").update(readFileSync72(file2)).digest("hex");
|
|
188858
189041
|
WATCH_REMINDER_EVERY_MS = 10 * 60 * 1e3;
|
|
188859
189042
|
REMINDERS_FILE = join61(".himi", "reminders.json");
|
|
188860
189043
|
pidAlive = (pid) => {
|
|
@@ -191356,7 +191539,7 @@ var init_social_sign_in = __esm({
|
|
|
191356
191539
|
|
|
191357
191540
|
// ../app-icons/plan.ts
|
|
191358
191541
|
import { existsSync as existsSync73, readFileSync as readFileSync80, readdirSync as readdirSync37 } from "node:fs";
|
|
191359
|
-
import { createHash as
|
|
191542
|
+
import { createHash as createHash37 } from "node:crypto";
|
|
191360
191543
|
import { inflateSync } from "node:zlib";
|
|
191361
191544
|
import { dirname as dirname41, join as join71, resolve as resolve52 } from "node:path";
|
|
191362
191545
|
function stripComments(src) {
|
|
@@ -191444,7 +191627,7 @@ function parseIconConfig(configTs) {
|
|
|
191444
191627
|
return out2;
|
|
191445
191628
|
}
|
|
191446
191629
|
function idHash(id) {
|
|
191447
|
-
return
|
|
191630
|
+
return createHash37("sha1").update(id).digest();
|
|
191448
191631
|
}
|
|
191449
191632
|
function deriveGlyph(id) {
|
|
191450
191633
|
const h2 = idHash(id);
|
|
@@ -191628,7 +191811,7 @@ function placeholderHashes() {
|
|
|
191628
191811
|
}
|
|
191629
191812
|
function fileSha256(path2) {
|
|
191630
191813
|
try {
|
|
191631
|
-
return
|
|
191814
|
+
return createHash37("sha256").update(readFileSync80(path2)).digest("hex");
|
|
191632
191815
|
} catch {
|
|
191633
191816
|
return null;
|
|
191634
191817
|
}
|
|
@@ -200592,11 +200775,11 @@ __export(account_screens_lint_exports, {
|
|
|
200592
200775
|
reachableScreens: () => reachableScreens,
|
|
200593
200776
|
staticNavTargets: () => staticNavTargets
|
|
200594
200777
|
});
|
|
200595
|
-
import { createHash as
|
|
200778
|
+
import { createHash as createHash38 } from "node:crypto";
|
|
200596
200779
|
import ts20 from "typescript";
|
|
200597
200780
|
function memberSignInIn(bundleJs) {
|
|
200598
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;
|
|
200599
|
-
const key4 =
|
|
200782
|
+
const key4 = createHash38("sha1").update(bundleJs).digest("hex");
|
|
200600
200783
|
const cached3 = PARSED.get(key4);
|
|
200601
200784
|
if (cached3 !== void 0) return cached3;
|
|
200602
200785
|
const found = parseMemberSignIn(bundleJs);
|
|
@@ -200841,7 +201024,7 @@ var init_account_screens_lint = __esm({
|
|
|
200841
201024
|
|
|
200842
201025
|
// src/commands/template.ts
|
|
200843
201026
|
import { mkdtempSync as mkdtempSync5, readFileSync as readFileSync92, existsSync as existsSync84, rmSync as rmSync24 } from "node:fs";
|
|
200844
|
-
import { createHash as
|
|
201027
|
+
import { createHash as createHash39 } from "node:crypto";
|
|
200845
201028
|
import { tmpdir as tmpdir6 } from "node:os";
|
|
200846
201029
|
import { join as join82, resolve as resolve57, basename as basename22 } from "node:path";
|
|
200847
201030
|
function embeddedTemplateCatalog() {
|
|
@@ -201243,7 +201426,7 @@ async function templateCommand(ctx) {
|
|
|
201243
201426
|
if (!iconPath) return void 0;
|
|
201244
201427
|
try {
|
|
201245
201428
|
const bytes2 = readFileSync92(iconPath);
|
|
201246
|
-
return { bytes: bytes2, hash:
|
|
201429
|
+
return { bytes: bytes2, hash: createHash39("sha256").update(bytes2).digest("hex") };
|
|
201247
201430
|
} catch {
|
|
201248
201431
|
return void 0;
|
|
201249
201432
|
}
|
|
@@ -201254,7 +201437,7 @@ async function templateCommand(ctx) {
|
|
|
201254
201437
|
template: name,
|
|
201255
201438
|
app: templateAppId,
|
|
201256
201439
|
published: false,
|
|
201257
|
-
sourceHash:
|
|
201440
|
+
sourceHash: createHash39("sha256").update(JSON.stringify(catalogView())).digest("hex"),
|
|
201258
201441
|
iconHash: launcherIcon()?.hash ?? null
|
|
201259
201442
|
});
|
|
201260
201443
|
return 0;
|
|
@@ -201768,7 +201951,7 @@ __export(crawl_layers_exports, {
|
|
|
201768
201951
|
renderMocksFrom: () => renderMocksFrom,
|
|
201769
201952
|
tabRootScreens: () => tabRootScreens
|
|
201770
201953
|
});
|
|
201771
|
-
import { existsSync as existsSync87, readFileSync as readFileSync94, realpathSync as
|
|
201954
|
+
import { existsSync as existsSync87, readFileSync as readFileSync94, realpathSync as realpathSync11 } from "node:fs";
|
|
201772
201955
|
import { dirname as dirname49, join as join85, resolve as resolve59, sep as sep24 } from "node:path";
|
|
201773
201956
|
async function loadContentConfigQuietly(dir) {
|
|
201774
201957
|
try {
|
|
@@ -201856,9 +202039,9 @@ async function l10nSourceCatalogFile(dir) {
|
|
|
201856
202039
|
const file2 = resolve59(l10nDir, `${tag2}.json`);
|
|
201857
202040
|
if (!existsSync87(file2)) return null;
|
|
201858
202041
|
try {
|
|
201859
|
-
const realDir =
|
|
201860
|
-
const realFile =
|
|
201861
|
-
if (!realDir.startsWith(
|
|
202042
|
+
const realDir = realpathSync11(l10nDir);
|
|
202043
|
+
const realFile = realpathSync11(file2);
|
|
202044
|
+
if (!realDir.startsWith(realpathSync11(dir) + sep24) || dirname49(realFile) !== realDir) return null;
|
|
201862
202045
|
return { tag: tag2, text: readFileSync94(realFile, "utf8") };
|
|
201863
202046
|
} catch {
|
|
201864
202047
|
return null;
|
|
@@ -203890,7 +204073,7 @@ var init_command = __esm({
|
|
|
203890
204073
|
|
|
203891
204074
|
// ../pre-pr-review/scope.mjs
|
|
203892
204075
|
import { execFileSync as execFileSync6 } from "node:child_process";
|
|
203893
|
-
import { createHash as
|
|
204076
|
+
import { createHash as createHash40 } from "node:crypto";
|
|
203894
204077
|
import { resolve as resolve62, dirname as dirname51, isAbsolute as isAbsolute10, join as join88 } from "node:path";
|
|
203895
204078
|
import { fileURLToPath as fileURLToPath32 } from "node:url";
|
|
203896
204079
|
function resolveRepoRoot2(cwd = process.cwd()) {
|
|
@@ -203918,7 +204101,7 @@ function git(args, opts = {}) {
|
|
|
203918
204101
|
}).toString();
|
|
203919
204102
|
}
|
|
203920
204103
|
function diffHash(diff) {
|
|
203921
|
-
return
|
|
204104
|
+
return createHash40("sha256").update(diff).digest("hex");
|
|
203922
204105
|
}
|
|
203923
204106
|
var REPO_ROOT7, BASE_REF;
|
|
203924
204107
|
var init_scope = __esm({
|
|
@@ -203942,7 +204125,7 @@ import {
|
|
|
203942
204125
|
rmSync as rmSync25,
|
|
203943
204126
|
writeFileSync as writeFileSync38
|
|
203944
204127
|
} from "node:fs";
|
|
203945
|
-
import { createHash as
|
|
204128
|
+
import { createHash as createHash41 } from "node:crypto";
|
|
203946
204129
|
import { tmpdir as tmpdir7 } from "node:os";
|
|
203947
204130
|
import { basename as basename23, dirname as dirname52, join as join89, resolve as resolve63 } from "node:path";
|
|
203948
204131
|
import { pathToFileURL as pathToFileURL7 } from "node:url";
|
|
@@ -204020,7 +204203,7 @@ function stagedIdentity(head2, index, worktree) {
|
|
|
204020
204203
|
}
|
|
204021
204204
|
function blobOid(contents, algorithm2) {
|
|
204022
204205
|
const body = Buffer.isBuffer(contents) ? contents : Buffer.from(contents);
|
|
204023
|
-
return
|
|
204206
|
+
return createHash41(algorithm2).update(Buffer.from(`blob ${body.byteLength}\0`)).update(body).digest("hex");
|
|
204024
204207
|
}
|
|
204025
204208
|
function validationDiffHash(cwd = process.cwd()) {
|
|
204026
204209
|
const root = resolveRepoRoot2(cwd);
|
|
@@ -204194,7 +204377,7 @@ var init_diff_hash = __esm({
|
|
|
204194
204377
|
run: () => {
|
|
204195
204378
|
const { repo } = selfTestRepo({ withBase: true });
|
|
204196
204379
|
try {
|
|
204197
|
-
return validationDiffHash(repo) !==
|
|
204380
|
+
return validationDiffHash(repo) !== createHash41("sha256").update("validation-worktree-v2\0").digest("hex");
|
|
204198
204381
|
} finally {
|
|
204199
204382
|
rmSync25(repo, { recursive: true, force: true });
|
|
204200
204383
|
}
|
|
@@ -204378,12 +204561,12 @@ var init_attestation_lock = __esm({
|
|
|
204378
204561
|
|
|
204379
204562
|
// src/attestation.ts
|
|
204380
204563
|
import { execFileSync as execFileSync7 } from "node:child_process";
|
|
204381
|
-
import { createHash as
|
|
204564
|
+
import { createHash as createHash42, randomBytes as randomBytes3 } from "node:crypto";
|
|
204382
204565
|
import {
|
|
204383
204566
|
existsSync as existsSync90,
|
|
204384
204567
|
lstatSync as lstatSync28,
|
|
204385
204568
|
mkdirSync as mkdirSync39,
|
|
204386
|
-
realpathSync as
|
|
204569
|
+
realpathSync as realpathSync12,
|
|
204387
204570
|
readlinkSync as readlinkSync2,
|
|
204388
204571
|
readFileSync as readFileSync99,
|
|
204389
204572
|
readdirSync as readdirSync41,
|
|
@@ -204450,7 +204633,7 @@ function currentGitDiffHash(contentDir2) {
|
|
|
204450
204633
|
}
|
|
204451
204634
|
function currentGitUntrackedHash(contentDir2) {
|
|
204452
204635
|
const unresolved = resolve64(contentDir2);
|
|
204453
|
-
const absolute2 =
|
|
204636
|
+
const absolute2 = realpathSync12.native(unresolved);
|
|
204454
204637
|
const root = repoRoot(absolute2);
|
|
204455
204638
|
if (!root) return sourceTreeHash(absolute2);
|
|
204456
204639
|
const scope3 = relative19(root, absolute2) || ".";
|
|
@@ -204458,7 +204641,7 @@ function currentGitUntrackedHash(contentDir2) {
|
|
|
204458
204641
|
encoding: "utf8",
|
|
204459
204642
|
maxBuffer: GIT_HASH_MAX_BUFFER
|
|
204460
204643
|
});
|
|
204461
|
-
const hash3 =
|
|
204644
|
+
const hash3 = createHash42("sha256");
|
|
204462
204645
|
for (const path2 of listed.split("\0").filter(Boolean).sort()) {
|
|
204463
204646
|
const local = relative19(absolute2, join91(root, path2));
|
|
204464
204647
|
const segs = local.split(/[\\/]/);
|
|
@@ -204478,7 +204661,7 @@ function currentGitUntrackedHash(contentDir2) {
|
|
|
204478
204661
|
return hash3.digest("hex");
|
|
204479
204662
|
}
|
|
204480
204663
|
function sourceTreeHash(root) {
|
|
204481
|
-
const hash3 =
|
|
204664
|
+
const hash3 = createHash42("sha256");
|
|
204482
204665
|
const visit = (dir) => {
|
|
204483
204666
|
for (const entry of readdirSync41(dir, { withFileTypes: true }).sort((a3, b3) => a3.name < b3.name ? -1 : a3.name > b3.name ? 1 : 0)) {
|
|
204484
204667
|
if (entry.isDirectory() && (entry.name === ".git" || entry.name === "node_modules" || NOT_ATTESTED_DIRS.has(entry.name))) continue;
|
|
@@ -204774,7 +204957,7 @@ var init_attestation = __esm({
|
|
|
204774
204957
|
DEFAULT_MAX_RUNS = 20;
|
|
204775
204958
|
ATTESTATION_VERSION = 2;
|
|
204776
204959
|
GIT_HASH_MAX_BUFFER = 128 * 1024 * 1024;
|
|
204777
|
-
sha2565 = (bytes2) =>
|
|
204960
|
+
sha2565 = (bytes2) => createHash42("sha256").update(bytes2).digest("hex");
|
|
204778
204961
|
NOT_ATTESTED_DIRS = /* @__PURE__ */ new Set([".himi", ...AGENT_TOOLING_DIRS]);
|
|
204779
204962
|
stringRecord = (value2) => !!value2 && typeof value2 === "object" && !Array.isArray(value2) && Object.values(value2).every((item2) => typeof item2 === "string");
|
|
204780
204963
|
}
|
|
@@ -205653,7 +205836,7 @@ var init_one_app_visibility = __esm({
|
|
|
205653
205836
|
});
|
|
205654
205837
|
|
|
205655
205838
|
// src/one-app/custom-widgets.ts
|
|
205656
|
-
import { createHash as
|
|
205839
|
+
import { createHash as createHash43 } from "node:crypto";
|
|
205657
205840
|
function safeSettings(value2, depth = 0) {
|
|
205658
205841
|
if (depth > 20) return null;
|
|
205659
205842
|
if (typeof value2 === "string") return looksLikeCredential(value2) ? null : value2;
|
|
@@ -205666,7 +205849,7 @@ function safeSettings(value2, depth = 0) {
|
|
|
205666
205849
|
function widgetKey(pageUri) {
|
|
205667
205850
|
const segment3 = pageUri.split(/[/?#]/).filter(Boolean).at(-1) ?? "widget";
|
|
205668
205851
|
const slug = segment3.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40) || "widget";
|
|
205669
|
-
return `${slug}-${
|
|
205852
|
+
return `${slug}-${createHash43("sha256").update(pageUri).digest("hex").slice(0, 6)}`;
|
|
205670
205853
|
}
|
|
205671
205854
|
function needsMember(rule) {
|
|
205672
205855
|
const r3 = obj3(rule);
|
|
@@ -206460,7 +206643,7 @@ var init_header_badges = __esm({
|
|
|
206460
206643
|
});
|
|
206461
206644
|
|
|
206462
206645
|
// src/one-app/invite-drawer.ts
|
|
206463
|
-
import { createHash as
|
|
206646
|
+
import { createHash as createHash44 } from "node:crypto";
|
|
206464
206647
|
import ts23 from "typescript";
|
|
206465
206648
|
function drawerOffersInvite(configText, profileHasRow = false) {
|
|
206466
206649
|
const file2 = ts23.createSourceFile("config.ts", configText, ts23.ScriptTarget.Latest, true, ts23.ScriptKind.TS);
|
|
@@ -206497,7 +206680,7 @@ function withTranslationRow(catalogText2, row2, translation) {
|
|
|
206497
206680
|
existing.translation = translation;
|
|
206498
206681
|
if (typeof existing.key !== "string" || !existing.key) existing.key = row2.key;
|
|
206499
206682
|
} else {
|
|
206500
|
-
messages[`h_${
|
|
206683
|
+
messages[`h_${createHash44("sha1").update(row2.source).digest("hex").slice(0, 12)}`] = { source: row2.source, key: row2.key, translation };
|
|
206501
206684
|
}
|
|
206502
206685
|
return `${JSON.stringify({ ...catalog4, messages }, null, 2)}
|
|
206503
206686
|
`;
|
|
@@ -206724,7 +206907,7 @@ var init_side_menu = __esm({
|
|
|
206724
206907
|
|
|
206725
206908
|
// src/one-app/widget-run.ts
|
|
206726
206909
|
import { spawnSync as spawnSync9 } from "node:child_process";
|
|
206727
|
-
import { createHash as
|
|
206910
|
+
import { createHash as createHash45 } from "node:crypto";
|
|
206728
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";
|
|
206729
206912
|
import { tmpdir as tmpdir8 } from "node:os";
|
|
206730
206913
|
import { dirname as dirname54, isAbsolute as isAbsolute13, join as join96, resolve as resolve67 } from "node:path";
|
|
@@ -206906,7 +207089,7 @@ var init_widget_run = __esm({
|
|
|
206906
207089
|
WIDGET_RUN_SCHEMA = 1;
|
|
206907
207090
|
fileSha = (path2) => {
|
|
206908
207091
|
try {
|
|
206909
|
-
return
|
|
207092
|
+
return createHash45("sha256").update(readFileSync107(path2)).digest("hex");
|
|
206910
207093
|
} catch {
|
|
206911
207094
|
return null;
|
|
206912
207095
|
}
|
|
@@ -207203,7 +207386,7 @@ __export(coverage_exports, {
|
|
|
207203
207386
|
verifyCoverage: () => verifyCoverage,
|
|
207204
207387
|
verifyNativeProof: () => verifyNativeProof
|
|
207205
207388
|
});
|
|
207206
|
-
import { createHash as
|
|
207389
|
+
import { createHash as createHash46 } from "node:crypto";
|
|
207207
207390
|
import { existsSync as existsSync97, readFileSync as readFileSync108, writeFileSync as writeFileSync42 } from "node:fs";
|
|
207208
207391
|
import { isAbsolute as isAbsolute14, join as join97, resolve as resolve68 } from "node:path";
|
|
207209
207392
|
function sectionVisibilityProof(record7, contentDir2) {
|
|
@@ -207723,7 +207906,7 @@ var init_coverage = __esm({
|
|
|
207723
207906
|
CUSTOM_WIDGET_CHECKS = ["rendering", "visitor", "member", "access", "navigation", "data"];
|
|
207724
207907
|
customWidgetTestName = (requirementId2, check) => `custom-widget ${requirementId2} ${check}`;
|
|
207725
207908
|
obj9 = (v2) => v2 && typeof v2 === "object" && !Array.isArray(v2) ? v2 : {};
|
|
207726
|
-
sha = (v2) =>
|
|
207909
|
+
sha = (v2) => createHash46("sha256").update(v2).digest("hex");
|
|
207727
207910
|
REQUIRED_CHECK = {
|
|
207728
207911
|
route: "route-walkthrough",
|
|
207729
207912
|
placement: "visual-comparison",
|
|
@@ -207750,7 +207933,7 @@ __export(validate_identity_exports, {
|
|
|
207750
207933
|
ricosTexts: () => ricosTexts,
|
|
207751
207934
|
runOneAppIdentityValidation: () => runOneAppIdentityValidation
|
|
207752
207935
|
});
|
|
207753
|
-
import { createHash as
|
|
207936
|
+
import { createHash as createHash47 } from "node:crypto";
|
|
207754
207937
|
import { existsSync as existsSync98, readFileSync as readFileSync109, writeFileSync as writeFileSync43 } from "node:fs";
|
|
207755
207938
|
import ts25 from "typescript";
|
|
207756
207939
|
import { join as join98, resolve as resolve69 } from "node:path";
|
|
@@ -207838,7 +208021,7 @@ function fixAppName(configSource, slug, displayName3) {
|
|
|
207838
208021
|
function sourceIdentity(evidenceDir) {
|
|
207839
208022
|
const { manifest: manifest2, raw } = verifiedEvidence(evidenceDir);
|
|
207840
208023
|
const bytes2 = readFileSync109(join98(evidenceDir, "business-context.json"));
|
|
207841
|
-
const hash3 =
|
|
208024
|
+
const hash3 = createHash47("sha256").update(bytes2).digest("hex");
|
|
207842
208025
|
if (obj10(manifest2.sha256)["business-context.json"] !== hash3) throw Error("business-context.json differs from the collected evidence.");
|
|
207843
208026
|
const name = obj10(JSON.parse(bytes2.toString("utf8"))).displayName;
|
|
207844
208027
|
if (typeof name !== "string" || !name.trim()) throw Error("The collected business display name is unavailable; recollect the source identity.");
|
|
@@ -207859,7 +208042,7 @@ function sourceIdentity(evidenceDir) {
|
|
|
207859
208042
|
const pagesPath = join98(evidenceDir, "pages-content.json");
|
|
207860
208043
|
if (existsSync98(pagesPath)) {
|
|
207861
208044
|
const pagesBytes = readFileSync109(pagesPath);
|
|
207862
|
-
if (obj10(manifest2.sha256)["pages-content.json"] !==
|
|
208045
|
+
if (obj10(manifest2.sha256)["pages-content.json"] !== createHash47("sha256").update(pagesBytes).digest("hex")) throw Error("pages-content.json differs from the collected evidence.");
|
|
207863
208046
|
for (const document2 of obj10(JSON.parse(pagesBytes.toString("utf8"))).documents ?? []) authoredText.push(...ricosTexts(obj10(obj10(document2).page).documentJson));
|
|
207864
208047
|
}
|
|
207865
208048
|
return { displayName: name, authoredText };
|
|
@@ -208720,7 +208903,7 @@ var init_home_invite = __esm({
|
|
|
208720
208903
|
|
|
208721
208904
|
// src/one-app/access.ts
|
|
208722
208905
|
import ts27 from "typescript";
|
|
208723
|
-
import { createHash as
|
|
208906
|
+
import { createHash as createHash48 } from "node:crypto";
|
|
208724
208907
|
import { isDeepStrictEqual } from "node:util";
|
|
208725
208908
|
function gateKey(layoutItemId) {
|
|
208726
208909
|
let out2 = "g_";
|
|
@@ -208780,7 +208963,7 @@ function planAccess(raw, screens, previous = []) {
|
|
|
208780
208963
|
for (const gate of gates.filter((item2) => !written.has(item2.layoutItemId))) byKey.set(gate.key, [...byKey.get(gate.key) ?? [], gate]);
|
|
208781
208964
|
for (const [key4, group] of byKey) {
|
|
208782
208965
|
if (group.length < 2 && !writtenKeys.has(key4)) continue;
|
|
208783
|
-
for (const gate of group) gate.key = `${key4}_${
|
|
208966
|
+
for (const gate of group) gate.key = `${key4}_${createHash48("sha256").update(gate.layoutItemId).digest("hex").slice(0, 10)}`;
|
|
208784
208967
|
warnings.push(`layout items ${group.map((gate) => gate.layoutItemId).join(", ")} normalize to a gate key another page has: each gets a hash suffix`);
|
|
208785
208968
|
}
|
|
208786
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");
|
|
@@ -209317,7 +209500,7 @@ ${indent}`);
|
|
|
209317
209500
|
});
|
|
209318
209501
|
|
|
209319
209502
|
// src/one-app/access-cli.ts
|
|
209320
|
-
import { createHash as
|
|
209503
|
+
import { createHash as createHash49 } from "node:crypto";
|
|
209321
209504
|
import { existsSync as existsSync100, readFileSync as readFileSync111, rmSync as rmSync28, statSync as statSync27, writeFileSync as writeFileSync44 } from "node:fs";
|
|
209322
209505
|
import { join as join100, resolve as resolve70 } from "node:path";
|
|
209323
209506
|
function parseArgs(args) {
|
|
@@ -209454,7 +209637,7 @@ function recordedLoginPolicy(evidenceDir) {
|
|
|
209454
209637
|
const expected = manifest2.sha256?.["access-policy.json"];
|
|
209455
209638
|
if (expected === void 0) return void 0;
|
|
209456
209639
|
const bytes2 = readFileSync111(join100(evidenceDir, "access-policy.json"));
|
|
209457
|
-
if (
|
|
209640
|
+
if (createHash49("sha256").update(bytes2).digest("hex") !== expected) throw new Error("access-policy.json does not match the hash recorded in manifest.json.");
|
|
209458
209641
|
const value2 = JSON.parse(bytes2.toString("utf8")).visitorModeEnabled;
|
|
209459
209642
|
return typeof value2 === "boolean" ? value2 : void 0;
|
|
209460
209643
|
}
|
|
@@ -213282,7 +213465,7 @@ __export(validate_topbar_exports, {
|
|
|
213282
213465
|
runOneAppTopBarValidation: () => runOneAppTopBarValidation,
|
|
213283
213466
|
screenActions: () => screenActions2
|
|
213284
213467
|
});
|
|
213285
|
-
import { createHash as
|
|
213468
|
+
import { createHash as createHash50 } from "node:crypto";
|
|
213286
213469
|
import { existsSync as existsSync105, readFileSync as readFileSync116, statSync as statSync28 } from "node:fs";
|
|
213287
213470
|
import { resolve as resolve72, join as join105 } from "node:path";
|
|
213288
213471
|
import ts30 from "typescript";
|
|
@@ -213750,7 +213933,7 @@ function readHashedEvidenceJson(evidenceDir, name) {
|
|
|
213750
213933
|
const expected = object8(readJson9(join105(evidenceDir, "manifest.json")).sha256)?.[name];
|
|
213751
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.`);
|
|
213752
213935
|
const bytes2 = readFileSync116(path2);
|
|
213753
|
-
if (
|
|
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.`);
|
|
213754
213937
|
return JSON.parse(bytes2.toString("utf8"));
|
|
213755
213938
|
}
|
|
213756
213939
|
function readVerifiedEvidence(evidenceDir, { runtime = "required" } = {}) {
|
|
@@ -213767,7 +213950,7 @@ function readVerifiedEvidence(evidenceDir, { runtime = "required" } = {}) {
|
|
|
213767
213950
|
if (typeof expectedHash !== "string" || !/^[a-f0-9]{64}$/i.test(expectedHash)) {
|
|
213768
213951
|
throw new Error("manifest.json is missing a valid raw-structure.json hash.");
|
|
213769
213952
|
}
|
|
213770
|
-
if (
|
|
213953
|
+
if (createHash50("sha256").update(rawBytes).digest("hex") !== expectedHash) {
|
|
213771
213954
|
throw new Error("raw-structure.json does not match the hash recorded in manifest.json.");
|
|
213772
213955
|
}
|
|
213773
213956
|
const raw = JSON.parse(rawBytes.toString("utf8"));
|
|
@@ -213778,7 +213961,7 @@ function readVerifiedEvidence(evidenceDir, { runtime = "required" } = {}) {
|
|
|
213778
213961
|
if (hash3 === void 0) continue;
|
|
213779
213962
|
if (typeof hash3 !== "string" || !/^[a-f0-9]{64}$/i.test(hash3)) throw new Error(`Invalid ${name} hash.`);
|
|
213780
213963
|
const bytes2 = readFileSync116(join105(evidenceDir, name));
|
|
213781
|
-
if (
|
|
213964
|
+
if (createHash50("sha256").update(bytes2).digest("hex") !== hash3) throw new Error(`${name} does not match manifest.json.`);
|
|
213782
213965
|
views2[platform] = JSON.parse(bytes2.toString("utf8"));
|
|
213783
213966
|
}
|
|
213784
213967
|
return { raw, views: views2 };
|
|
@@ -215222,10 +215405,10 @@ var init_calls = __esm({
|
|
|
215222
215405
|
});
|
|
215223
215406
|
|
|
215224
215407
|
// ../../core/functions-runtime/src/queue.ts
|
|
215225
|
-
import { createHash as
|
|
215408
|
+
import { createHash as createHash51 } from "node:crypto";
|
|
215226
215409
|
function inputSchemaHash(definition) {
|
|
215227
215410
|
const schema2 = definition.input;
|
|
215228
|
-
return schema2 ?
|
|
215411
|
+
return schema2 ? createHash51("sha256").update(JSON.stringify(schema2.descriptor ?? { kind: schema2.kind, optional: schema2.optional === true })).digest("hex") : "";
|
|
215229
215412
|
}
|
|
215230
215413
|
function createFunctionEnqueueCapability(options2) {
|
|
215231
215414
|
return {
|
|
@@ -215292,14 +215475,14 @@ var init_queue = __esm({
|
|
|
215292
215475
|
});
|
|
215293
215476
|
|
|
215294
215477
|
// ../../core/data-resources/src/plan.ts
|
|
215295
|
-
import { createHash as
|
|
215478
|
+
import { createHash as createHash52 } from "node:crypto";
|
|
215296
215479
|
function canonical4(value2) {
|
|
215297
215480
|
if (Array.isArray(value2)) return `[${value2.map(canonical4).join(",")}]`;
|
|
215298
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(",")}}`;
|
|
215299
215482
|
return JSON.stringify(value2);
|
|
215300
215483
|
}
|
|
215301
215484
|
function hashResourcePlan(plan) {
|
|
215302
|
-
return
|
|
215485
|
+
return createHash52("sha256").update(canonical4(plan)).digest("hex");
|
|
215303
215486
|
}
|
|
215304
215487
|
function finalize(input) {
|
|
215305
215488
|
return { ...input, hash: hashResourcePlan(input) };
|
|
@@ -215740,11 +215923,11 @@ function requestId(request2) {
|
|
|
215740
215923
|
const supplied = request2.headers.get("x-request-id")?.trim();
|
|
215741
215924
|
return supplied && /^[A-Za-z0-9._:-]{1,128}$/.test(supplied) ? supplied : globalThis.crypto?.randomUUID?.() ?? `req-${Date.now().toString(36)}`;
|
|
215742
215925
|
}
|
|
215743
|
-
async function
|
|
215926
|
+
async function digest2(bytes2) {
|
|
215744
215927
|
return Buffer.from(await globalThis.crypto.subtle.digest("SHA-256", Uint8Array.from(bytes2)));
|
|
215745
215928
|
}
|
|
215746
215929
|
async function integrity(bytes2) {
|
|
215747
|
-
const digestBytes = await
|
|
215930
|
+
const digestBytes = await digest2(bytes2);
|
|
215748
215931
|
return { hash: Buffer.from(digestBytes).toString("hex"), sri: `sha256-${Buffer.from(digestBytes).toString("base64")}` };
|
|
215749
215932
|
}
|
|
215750
215933
|
function resolveTarget3(pathname) {
|
|
@@ -216406,7 +216589,7 @@ var init_cli_bridge = __esm({
|
|
|
216406
216589
|
});
|
|
216407
216590
|
|
|
216408
216591
|
// src/mcp/file-tools.ts
|
|
216409
|
-
import { closeSync as closeSync8, constants as constants6, lstatSync as lstatSync30, mkdirSync as mkdirSync42, openSync as openSync7, readdirSync as readdirSync44, readFileSync as readFileSync122, realpathSync as
|
|
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";
|
|
216410
216593
|
import { randomBytes as randomBytes4 } from "node:crypto";
|
|
216411
216594
|
import { dirname as dirname55, isAbsolute as isAbsolute15, join as join110, relative as relative21, resolve as resolve74, sep as sep26 } from "node:path";
|
|
216412
216595
|
import * as z2 from "zod";
|
|
@@ -216422,7 +216605,7 @@ function realish(p2) {
|
|
|
216422
216605
|
tail.unshift(cur.slice(up2.length + (up2.endsWith(sep26) ? 0 : 1)));
|
|
216423
216606
|
cur = up2;
|
|
216424
216607
|
}
|
|
216425
|
-
return join110(
|
|
216608
|
+
return join110(realpathSync13(cur), ...tail);
|
|
216426
216609
|
}
|
|
216427
216610
|
function symlinkComponent(base2, abs) {
|
|
216428
216611
|
let cur = base2;
|
|
@@ -216440,7 +216623,7 @@ function workspaceRefusal(root, target) {
|
|
|
216440
216623
|
const r3 = resolve74(root);
|
|
216441
216624
|
const t2 = resolve74(r3, target);
|
|
216442
216625
|
if (!existsSync110(r3)) return `the workspace folder ${r3} does not exist`;
|
|
216443
|
-
if (!within(r3, t2) || !within(
|
|
216626
|
+
if (!within(r3, t2) || !within(realpathSync13(r3), realish(t2))) return `"${target}" is outside the workspace folder ${r3}`;
|
|
216444
216627
|
const link4 = symlinkComponent(r3, t2);
|
|
216445
216628
|
if (link4) return `"${link4}" is a symlink \u2014 paths must stay in real folders inside the workspace`;
|
|
216446
216629
|
return null;
|
|
@@ -216449,7 +216632,7 @@ async function confinedAppDir(args, deps) {
|
|
|
216449
216632
|
const root = resolve74(await deps.defaultDir());
|
|
216450
216633
|
const dir = typeof args.dir === "string" && args.dir ? resolve74(root, args.dir) : root;
|
|
216451
216634
|
if (!existsSync110(root)) return refuse5("no_workspace", `the workspace folder ${root} does not exist`);
|
|
216452
|
-
if (!within(root, dir) || !within(
|
|
216635
|
+
if (!within(root, dir) || !within(realpathSync13(root), realish(dir))) return refuse5("outside_workspace", `"${String(args.dir)}" is outside the workspace folder`);
|
|
216453
216636
|
const link4 = symlinkComponent(root, dir);
|
|
216454
216637
|
if (link4) return refuse5("outside_workspace", `"${link4}" is a symlink \u2014 the app folder must be a real folder in the workspace`);
|
|
216455
216638
|
const rel2 = relative21(root, dir);
|
|
@@ -216468,13 +216651,13 @@ function onDiskSpelling(abs) {
|
|
|
216468
216651
|
tail.unshift(cur.slice(up2.length + (up2.endsWith(sep26) ? 0 : 1)));
|
|
216469
216652
|
cur = up2;
|
|
216470
216653
|
}
|
|
216471
|
-
return join110(
|
|
216654
|
+
return join110(realpathSync13.native(cur), ...tail);
|
|
216472
216655
|
}
|
|
216473
216656
|
function denied(appDir3, abs) {
|
|
216474
216657
|
const rel2 = relative21(appDir3, abs);
|
|
216475
216658
|
if (isDeniedSourcePath(rel2) || isDeniedSourcePath(rel2.toLowerCase())) return true;
|
|
216476
216659
|
try {
|
|
216477
|
-
return isDeniedSourcePath(relative21(
|
|
216660
|
+
return isDeniedSourcePath(relative21(realpathSync13.native(appDir3), onDiskSpelling(abs)));
|
|
216478
216661
|
} catch {
|
|
216479
216662
|
return true;
|
|
216480
216663
|
}
|
|
@@ -216486,7 +216669,7 @@ function confinedPath(appDir3, rel2) {
|
|
|
216486
216669
|
const abs = resolve74(appDir3, rel2);
|
|
216487
216670
|
if (!within(appDir3, abs) || abs === appDir3) return { error: `"${rel2}" is outside the app folder` };
|
|
216488
216671
|
const real = realish(abs);
|
|
216489
|
-
const base2 = existsSync110(appDir3) ?
|
|
216672
|
+
const base2 = existsSync110(appDir3) ? realpathSync13(appDir3) : realish(appDir3);
|
|
216490
216673
|
if (!within(base2, real) || real === base2) return { error: `"${rel2}" is outside the app folder` };
|
|
216491
216674
|
const link4 = symlinkComponent(appDir3, abs);
|
|
216492
216675
|
if (link4) return { error: `"${link4}" is a symlink, which this tool does not follow` };
|
|
@@ -216505,7 +216688,7 @@ function writeNoFollow2(appDir3, abs, content) {
|
|
|
216505
216688
|
closeSync8(fd);
|
|
216506
216689
|
}
|
|
216507
216690
|
const link4 = symlinkComponent(appDir3, abs);
|
|
216508
|
-
if (link4 || !within(
|
|
216691
|
+
if (link4 || !within(realpathSync13(appDir3), realpathSync13(dirname55(abs)))) {
|
|
216509
216692
|
rmSync30(tmp, { force: true });
|
|
216510
216693
|
throw new Error(`"${link4 ?? relative21(appDir3, dirname55(abs))}" changed into a link while writing`);
|
|
216511
216694
|
}
|
|
@@ -218156,11 +218339,11 @@ function ignoreMissing(e2) {
|
|
|
218156
218339
|
if (e2.code !== "ENOENT")
|
|
218157
218340
|
throw e2;
|
|
218158
218341
|
}
|
|
218159
|
-
var randomUUID11,
|
|
218342
|
+
var randomUUID11, createHash53, link, mkdir2, open, readFile3, rename, rm, rmdir, stat2, unlink, join112, MemoryLockStore, FileLockStore;
|
|
218160
218343
|
var init_lock = __esm({
|
|
218161
218344
|
"../../node_modules/@wix/asc-core/dist/ports/lock.js"() {
|
|
218162
218345
|
init_define_HHP_CATALOG();
|
|
218163
|
-
({ randomUUID: randomUUID11, createHash:
|
|
218346
|
+
({ randomUUID: randomUUID11, createHash: createHash53 } = __ascBuiltin03);
|
|
218164
218347
|
({ link, mkdir: mkdir2, open, readFile: readFile3, rename, rm, rmdir, stat: stat2, unlink } = __ascBuiltin12);
|
|
218165
218348
|
({ join: join112 } = __ascBuiltin2);
|
|
218166
218349
|
MemoryLockStore = class {
|
|
@@ -218244,7 +218427,7 @@ var init_lock = __esm({
|
|
|
218244
218427
|
return lease2 && lease2.expiresAt > this.now() ? lease2 : void 0;
|
|
218245
218428
|
}
|
|
218246
218429
|
path(key4) {
|
|
218247
|
-
return join112(this.dir, `${
|
|
218430
|
+
return join112(this.dir, `${createHash53("sha256").update(lockName(key4)).digest("hex").slice(0, 32)}.lock`);
|
|
218248
218431
|
}
|
|
218249
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. */
|
|
218250
218433
|
async create(key4, lease2) {
|
|
@@ -218685,7 +218868,7 @@ import * as __ascBuiltin04 from "node:crypto";
|
|
|
218685
218868
|
import * as __ascBuiltin13 from "node:fs";
|
|
218686
218869
|
import * as __ascBuiltin22 from "node:fs/promises";
|
|
218687
218870
|
async function sha256OfFile(path2) {
|
|
218688
|
-
const hash3 =
|
|
218871
|
+
const hash3 = createHash54("sha256");
|
|
218689
218872
|
for await (const chunk2 of createReadStream2(path2))
|
|
218690
218873
|
hash3.update(chunk2);
|
|
218691
218874
|
return hash3.digest("hex");
|
|
@@ -218803,13 +218986,13 @@ async function readAnswer(t2, label4, assumeEnd, send2) {
|
|
|
218803
218986
|
}
|
|
218804
218987
|
return { failed: await t2.failure("PUT", "upload session", response) };
|
|
218805
218988
|
}
|
|
218806
|
-
var
|
|
218989
|
+
var createHash54, createReadStream2, open2, stat3, DEFAULT_CHUNK_BYTES, CONTENT_TYPE, RESUMABLE_KINDS;
|
|
218807
218990
|
var init_upload = __esm({
|
|
218808
218991
|
"../../node_modules/@wix/gplay-api/dist/upload.js"() {
|
|
218809
218992
|
init_define_HHP_CATALOG();
|
|
218810
218993
|
init_errors3();
|
|
218811
218994
|
init_transport();
|
|
218812
|
-
({ createHash:
|
|
218995
|
+
({ createHash: createHash54 } = __ascBuiltin04);
|
|
218813
218996
|
({ createReadStream: createReadStream2 } = __ascBuiltin13);
|
|
218814
218997
|
({ open: open2, stat: stat3 } = __ascBuiltin22);
|
|
218815
218998
|
DEFAULT_CHUNK_BYTES = 8 * 1024 * 1024;
|
|
@@ -219082,7 +219265,7 @@ function grantId(target) {
|
|
|
219082
219265
|
return { packageName };
|
|
219083
219266
|
}
|
|
219084
219267
|
async function sendDataSafety(api4, stateDir2, packageName, csv2, nowMs = Date.now()) {
|
|
219085
|
-
const sha2569 =
|
|
219268
|
+
const sha2569 = createHash55("sha256").update(csv2).digest("hex");
|
|
219086
219269
|
const dir = dataSafetyRecordDir(stateDir2, packageName);
|
|
219087
219270
|
await mkdir3(dir, { recursive: true, mode: 448 });
|
|
219088
219271
|
const record7 = join113(dir, `${new Date(nowMs).toISOString().replace(/[:.]/g, "-")}-${sha2569.slice(0, 12)}.csv`);
|
|
@@ -219096,7 +219279,7 @@ async function sendDataSafety(api4, stateDir2, packageName, csv2, nowMs = Date.n
|
|
|
219096
219279
|
}
|
|
219097
219280
|
return { sha256: sha2569, record: record7 };
|
|
219098
219281
|
}
|
|
219099
|
-
var
|
|
219282
|
+
var createHash55, mkdir3, rm2, writeFile2, join113, V3, MAX_PAGES, enc, GplayApi, dataSafetyRecordDir;
|
|
219100
219283
|
var init_api = __esm({
|
|
219101
219284
|
"../../node_modules/@wix/gplay-api/dist/api.js"() {
|
|
219102
219285
|
init_define_HHP_CATALOG();
|
|
@@ -219104,7 +219287,7 @@ var init_api = __esm({
|
|
|
219104
219287
|
init_edit();
|
|
219105
219288
|
init_firebase();
|
|
219106
219289
|
init_transport();
|
|
219107
|
-
({ createHash:
|
|
219290
|
+
({ createHash: createHash55 } = __ascBuiltin05);
|
|
219108
219291
|
({ mkdir: mkdir3, rm: rm2, writeFile: writeFile2 } = __ascBuiltin14);
|
|
219109
219292
|
({ join: join113 } = __ascBuiltin23);
|
|
219110
219293
|
V3 = "/androidpublisher/v3";
|
|
@@ -219289,7 +219472,7 @@ async function readOAuthClientFile(path2) {
|
|
|
219289
219472
|
async function loginWithOAuthClient(options2) {
|
|
219290
219473
|
const { client: client4 } = options2;
|
|
219291
219474
|
const verifier2 = randomBytes5(48).toString("base64url");
|
|
219292
|
-
const challenge =
|
|
219475
|
+
const challenge = createHash56("sha256").update(verifier2).digest("base64url");
|
|
219293
219476
|
const state = randomBytes5(16).toString("hex");
|
|
219294
219477
|
let redirect = "";
|
|
219295
219478
|
const code3 = await new Promise((resolve141, reject) => {
|
|
@@ -219356,7 +219539,7 @@ function parseStored(text32, where) {
|
|
|
219356
219539
|
throw new AuthError(`the sign-in stored in ${where} is incomplete`);
|
|
219357
219540
|
return user;
|
|
219358
219541
|
}
|
|
219359
|
-
var spawn7,
|
|
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;
|
|
219360
219543
|
var init_auth2 = __esm({
|
|
219361
219544
|
"../../node_modules/@wix/gplay-api/dist/auth.js"() {
|
|
219362
219545
|
init_define_HHP_CATALOG();
|
|
@@ -219364,7 +219547,7 @@ var init_auth2 = __esm({
|
|
|
219364
219547
|
init_errors3();
|
|
219365
219548
|
init_transport();
|
|
219366
219549
|
({ spawn: spawn7 } = __ascBuiltin06);
|
|
219367
|
-
({ createHash:
|
|
219550
|
+
({ createHash: createHash56, randomBytes: randomBytes5 } = __ascBuiltin15);
|
|
219368
219551
|
({ chmod, mkdir: mkdir4, readFile: readFile4, rename: rename2, rm: rm3, writeFile: writeFile3 } = __ascBuiltin24);
|
|
219369
219552
|
({ createServer: createServer4 } = __ascBuiltin3);
|
|
219370
219553
|
({ homedir: homedir10 } = __ascBuiltin4);
|
|
@@ -223686,9 +223869,9 @@ function pkcs12Kdf2(hash3, password, salt, id, iterations, n2) {
|
|
|
223686
223869
|
const out2 = [];
|
|
223687
223870
|
let produced = 0;
|
|
223688
223871
|
while (produced < n2) {
|
|
223689
|
-
let A2 =
|
|
223872
|
+
let A2 = createHash57(hash3).update(D2).update(I2).digest();
|
|
223690
223873
|
for (let r3 = 1; r3 < iterations; r3++)
|
|
223691
|
-
A2 =
|
|
223874
|
+
A2 = createHash57(hash3).update(A2).digest();
|
|
223692
223875
|
out2.push(A2);
|
|
223693
223876
|
produced += A2.length;
|
|
223694
223877
|
const B2 = fill(A2, v2);
|
|
@@ -223914,7 +224097,7 @@ function pbes2Encrypt(plain5, password, iterations) {
|
|
|
223914
224097
|
}
|
|
223915
224098
|
function writePkcs12(options2) {
|
|
223916
224099
|
const iterations = options2.iterations ?? 1e4;
|
|
223917
|
-
const localKeyId =
|
|
224100
|
+
const localKeyId = createHash57("sha1").update(options2.certificate.raw).digest();
|
|
223918
224101
|
const attrs = set2(attribute(OID2.friendlyName, bmpString(options2.alias)), attribute(OID2.localKeyId, octetString(localKeyId)));
|
|
223919
224102
|
const pkcs8 = options2.privateKey.export({ type: "pkcs8", format: "der" });
|
|
223920
224103
|
const shrouded = pbes2Encrypt(pkcs8, options2.password, iterations);
|
|
@@ -223930,14 +224113,14 @@ function writePkcs12(options2) {
|
|
|
223930
224113
|
const macData = sequence(sequence(algorithm(OID2.sha256, nullValue()), octetString(mac)), octetString(macSalt), integer(iterations));
|
|
223931
224114
|
return sequence(integer(3), contentInfo(OID2.data, octetString(authSafe)), macData);
|
|
223932
224115
|
}
|
|
223933
|
-
var X509Certificate2, createCipheriv, createDecipheriv2,
|
|
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;
|
|
223934
224117
|
var init_pkcs122 = __esm({
|
|
223935
224118
|
"../../node_modules/@wix/gplay-api/dist/signing/pkcs12.js"() {
|
|
223936
224119
|
init_define_HHP_CATALOG();
|
|
223937
224120
|
init_der();
|
|
223938
224121
|
init_oids();
|
|
223939
224122
|
init_rc2();
|
|
223940
|
-
({ X509Certificate: X509Certificate2, createCipheriv, createDecipheriv: createDecipheriv2, createHash:
|
|
224123
|
+
({ X509Certificate: X509Certificate2, createCipheriv, createDecipheriv: createDecipheriv2, createHash: createHash57, createHmac, createPrivateKey: createPrivateKey4, createPublicKey: createPublicKey2, pbkdf2Sync: pbkdf2Sync2, randomBytes: randomBytes6, timingSafeEqual } = __ascBuiltin012);
|
|
223941
224124
|
Pkcs12Error = class extends Error {
|
|
223942
224125
|
reason;
|
|
223943
224126
|
constructor(reason, message5) {
|
|
@@ -223967,7 +224150,7 @@ function selfSignedCertificate(options2) {
|
|
|
223967
224150
|
const signingKey = options2.issuer?.privateKey ?? options2.privateKey;
|
|
223968
224151
|
const spki2 = createPublicKey3(options2.privateKey).export({ type: "spki", format: "der" });
|
|
223969
224152
|
const keyBits = child2(parse4(spki2), 1).value.subarray(1);
|
|
223970
|
-
const ski =
|
|
224153
|
+
const ski = createHash58("sha1").update(keyBits).digest();
|
|
223971
224154
|
const serial = randomBytes7(16);
|
|
223972
224155
|
serial[0] &= 127;
|
|
223973
224156
|
if (serial[0] === 0)
|
|
@@ -223977,13 +224160,13 @@ function selfSignedCertificate(options2) {
|
|
|
223977
224160
|
const signature2 = sign2("sha256", tbs, signingKey);
|
|
223978
224161
|
return new X509Certificate3(sequence(tbs, signatureAlg, bitString(signature2)));
|
|
223979
224162
|
}
|
|
223980
|
-
var X509Certificate3,
|
|
224163
|
+
var X509Certificate3, createHash58, createPublicKey3, randomBytes7, sign2, cn2;
|
|
223981
224164
|
var init_x509 = __esm({
|
|
223982
224165
|
"../../node_modules/@wix/gplay-api/dist/signing/x509.js"() {
|
|
223983
224166
|
init_define_HHP_CATALOG();
|
|
223984
224167
|
init_der();
|
|
223985
224168
|
init_oids();
|
|
223986
|
-
({ X509Certificate: X509Certificate3, createHash:
|
|
224169
|
+
({ X509Certificate: X509Certificate3, createHash: createHash58, createPublicKey: createPublicKey3, randomBytes: randomBytes7, sign: sign2 } = __ascBuiltin013);
|
|
223987
224170
|
cn2 = (commonName) => sequence(set2(sequence(oid(OID2.commonName), utf8String(commonName))));
|
|
223988
224171
|
}
|
|
223989
224172
|
});
|
|
@@ -224087,7 +224270,7 @@ async function localImage(path2) {
|
|
|
224087
224270
|
if (!contentType)
|
|
224088
224271
|
throw new GplayError("refused", `${path2}: a store image is PNG, JPEG or WebP`);
|
|
224089
224272
|
const bytes2 = await readFile7(path2);
|
|
224090
|
-
return { path: path2, bytes: bytes2, contentType, sha256:
|
|
224273
|
+
return { path: path2, bytes: bytes2, contentType, sha256: createHash59("sha256").update(bytes2).digest("hex") };
|
|
224091
224274
|
}
|
|
224092
224275
|
async function readListingDir(dir) {
|
|
224093
224276
|
if (!await stat5(dir).then((s5) => s5.isDirectory(), () => false))
|
|
@@ -224235,7 +224418,7 @@ async function writeListingDir(dir, pulled) {
|
|
|
224235
224418
|
}
|
|
224236
224419
|
async function folderSha256(dir) {
|
|
224237
224420
|
const files = await folderFiles(dir);
|
|
224238
|
-
const hash3 =
|
|
224421
|
+
const hash3 = createHash59("sha256");
|
|
224239
224422
|
for (const { rel: rel2, path: path2 } of files) {
|
|
224240
224423
|
const content = await readFile7(path2);
|
|
224241
224424
|
hash3.update(`${rel2}\0${content.length}\0`);
|
|
@@ -224276,12 +224459,12 @@ async function folderFiles(dir) {
|
|
|
224276
224459
|
await walk6(root);
|
|
224277
224460
|
return out2.sort((a3, b3) => a3.rel < b3.rel ? -1 : a3.rel > b3.rel ? 1 : 0);
|
|
224278
224461
|
}
|
|
224279
|
-
var
|
|
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;
|
|
224280
224463
|
var init_listing = __esm({
|
|
224281
224464
|
"../../node_modules/@wix/gplay-api/dist/listing.js"() {
|
|
224282
224465
|
init_define_HHP_CATALOG();
|
|
224283
224466
|
init_errors3();
|
|
224284
|
-
({ createHash:
|
|
224467
|
+
({ createHash: createHash59 } = __ascBuiltin015);
|
|
224285
224468
|
({ lstat, mkdir: mkdir8, readdir: readdir2, readFile: readFile7, realpath: realpath2, stat: stat5, writeFile: writeFile6 } = __ascBuiltin111);
|
|
224286
224469
|
({ extname: extname5, join: join119, relative: relative23, resolve: resolve79, sep: sep27 } = __ascBuiltin26);
|
|
224287
224470
|
SINGLE_IMAGE_TYPES = ["icon", "featureGraphic", "tvBanner"];
|
|
@@ -225274,13 +225457,13 @@ function verifyJar(input) {
|
|
|
225274
225457
|
});
|
|
225275
225458
|
if (!signer2)
|
|
225276
225459
|
throw new JarError("the signer's certificate isn't in the block");
|
|
225277
|
-
const
|
|
225278
|
-
if (!
|
|
225460
|
+
const digest3 = DIGEST_BY_OID[readOid2(child2(child2(si2, 2), 0))];
|
|
225461
|
+
if (!digest3)
|
|
225279
225462
|
throw new JarError("unknown digest in signer info");
|
|
225280
225463
|
if (si2.children[3]?.tag === 160)
|
|
225281
225464
|
throw new JarError("signed attributes aren't expected in a block this code wrote");
|
|
225282
225465
|
const signature2 = child2(si2, 4, TAG.OCTET_STRING).value;
|
|
225283
|
-
if (!verify(
|
|
225466
|
+
if (!verify(digest3, sf2, createPublicKey4(signer2.publicKey.export({ type: "spki", format: "pem" })), signature2))
|
|
225284
225467
|
throw new JarError("the signature over the .SF doesn't verify");
|
|
225285
225468
|
const sfSections = parseSections(sf2);
|
|
225286
225469
|
const sfMain = sfSections[0]?.attrs;
|
|
@@ -225317,19 +225500,19 @@ function verifyJar(input) {
|
|
|
225317
225500
|
throw new JarError(`the manifest names ${name}, which isn't in the zip`);
|
|
225318
225501
|
return { signer: signer2, entries: count3, signatureFile: sfName };
|
|
225319
225502
|
}
|
|
225320
|
-
var X509Certificate4,
|
|
225503
|
+
var X509Certificate4, createHash60, createPublicKey4, sign3, verify, JarError, CRLF, CREATED_BY, b64;
|
|
225321
225504
|
var init_jar = __esm({
|
|
225322
225505
|
"../../node_modules/@wix/gplay-api/dist/signing/jar.js"() {
|
|
225323
225506
|
init_define_HHP_CATALOG();
|
|
225324
225507
|
init_der();
|
|
225325
225508
|
init_oids();
|
|
225326
225509
|
init_zip();
|
|
225327
|
-
({ X509Certificate: X509Certificate4, createHash:
|
|
225510
|
+
({ X509Certificate: X509Certificate4, createHash: createHash60, createPublicKey: createPublicKey4, sign: sign3, verify } = __ascBuiltin019);
|
|
225328
225511
|
JarError = class extends Error {
|
|
225329
225512
|
};
|
|
225330
225513
|
CRLF = "\r\n";
|
|
225331
225514
|
CREATED_BY = "gplay-node";
|
|
225332
|
-
b64 = (data) =>
|
|
225515
|
+
b64 = (data) => createHash60("sha256").update(data).digest("base64");
|
|
225333
225516
|
}
|
|
225334
225517
|
});
|
|
225335
225518
|
|
|
@@ -225938,7 +226121,7 @@ function canonical5(value2) {
|
|
|
225938
226121
|
return JSON.stringify(value2);
|
|
225939
226122
|
}
|
|
225940
226123
|
function planHash(action, params, accountKey3, plan) {
|
|
225941
|
-
return
|
|
226124
|
+
return createHash61("sha256").update(canonical5({ action, params, issuerId: accountKey3, plan })).digest("hex");
|
|
225942
226125
|
}
|
|
225943
226126
|
function jobErrorCode(e2) {
|
|
225944
226127
|
return e2 instanceof JobError ? e2.entries[0]?.code : void 0;
|
|
@@ -225951,12 +226134,12 @@ function requireGoogle(ctx) {
|
|
|
225951
226134
|
function newJobId() {
|
|
225952
226135
|
return `job_${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10).replace(/-/g, "")}_${randomUUID12().slice(0, 8)}`;
|
|
225953
226136
|
}
|
|
225954
|
-
var
|
|
226137
|
+
var createHash61, randomUUID12, mkdir11, readFile11, readdir5, rename3, writeFile10, join122, isGoogleAccount, JobError, MemoryJobStore, FileJobStore;
|
|
225955
226138
|
var init_job = __esm({
|
|
225956
226139
|
"../../node_modules/@wix/asc-jobs/dist/job.js"() {
|
|
225957
226140
|
init_define_HHP_CATALOG();
|
|
225958
226141
|
init_kernel();
|
|
225959
|
-
({ createHash:
|
|
226142
|
+
({ createHash: createHash61, randomUUID: randomUUID12 } = __ascBuiltin021);
|
|
225960
226143
|
({ mkdir: mkdir11, readFile: readFile11, readdir: readdir5, rename: rename3, writeFile: writeFile10 } = __ascBuiltin115);
|
|
225961
226144
|
({ join: join122 } = __ascBuiltin27);
|
|
225962
226145
|
isGoogleAccount = (a3) => a3.kind === "google";
|
|
@@ -226719,7 +226902,7 @@ function checkCsvPin(csv2, sha2569, file2) {
|
|
|
226719
226902
|
if (sha2569 === void 0)
|
|
226720
226903
|
return;
|
|
226721
226904
|
const want = text12(sha2569, "sha256").toLowerCase();
|
|
226722
|
-
const got =
|
|
226905
|
+
const got = createHash62("sha256").update(csv2).digest("hex");
|
|
226723
226906
|
if (got !== want)
|
|
226724
226907
|
throw refuse6(`${file2} hashes to ${got.slice(0, 12)}, not the approved ${want.slice(0, 12)}; nothing was sent`);
|
|
226725
226908
|
}
|
|
@@ -226768,14 +226951,14 @@ function rolloutAction(p2) {
|
|
|
226768
226951
|
throw refuse6(`action is set, halt, resume or complete (got ${JSON.stringify(p2.action)})`);
|
|
226769
226952
|
}
|
|
226770
226953
|
}
|
|
226771
|
-
var
|
|
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;
|
|
226772
226955
|
var init_actions_edit = __esm({
|
|
226773
226956
|
"../../node_modules/@wix/gplay-jobs/dist/actions-edit.js"() {
|
|
226774
226957
|
init_define_HHP_CATALOG();
|
|
226775
226958
|
init_dist();
|
|
226776
226959
|
init_clients();
|
|
226777
226960
|
init_common();
|
|
226778
|
-
({ createHash:
|
|
226961
|
+
({ createHash: createHash62 } = __ascBuiltin025);
|
|
226779
226962
|
({ mkdtemp, readFile: readFile12, rm: rm8, stat: stat8 } = __ascBuiltin118);
|
|
226780
226963
|
({ basename: basename29, join: join124, resolve: resolve80 } = __ascBuiltin28);
|
|
226781
226964
|
trackReleases = (tracks, track2) => tracks.find((t2) => t2.track === track2)?.releases ?? [];
|
|
@@ -226919,7 +227102,7 @@ var init_actions_edit = __esm({
|
|
|
226919
227102
|
const { appId: appId3, developerId } = await readPlanRecord(clients.stateDir, packageName);
|
|
226920
227103
|
if (developerId && developerId !== clients.account.developerId)
|
|
226921
227104
|
throw refuse6(`${packageName} is recorded under developer ${developerId}, not this job's ${clients.account.developerId}`);
|
|
226922
|
-
const sha2569 =
|
|
227105
|
+
const sha2569 = createHash62("sha256").update(csv2).digest("hex");
|
|
226923
227106
|
const changes = [change("update", "dataSafety", `replace the Data safety declaration with ${basename29(p2.csv)}: ${summary2.answered} answered rows over ${summary2.questionsAnswered} questions`)];
|
|
226924
227107
|
if (appId3 && clients.console && isDeveloperId(clients.account.developerId)) {
|
|
226925
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 } };
|
|
@@ -226943,7 +227126,7 @@ var init_actions_edit = __esm({
|
|
|
226943
227126
|
if (!applied)
|
|
226944
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" };
|
|
226945
227128
|
const record7 = applied.ids[1];
|
|
226946
|
-
const kept = record7 ? await readFile12(record7, "utf8").then((t2) =>
|
|
227129
|
+
const kept = record7 ? await readFile12(record7, "utf8").then((t2) => createHash62("sha256").update(t2).digest("hex"), () => void 0) : void 0;
|
|
226947
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` };
|
|
226948
227131
|
}
|
|
226949
227132
|
const appId3 = String(plan.facts.appId);
|
|
@@ -228474,7 +228657,7 @@ function canonicalJson3(value2) {
|
|
|
228474
228657
|
return JSON.stringify(canon2(value2));
|
|
228475
228658
|
}
|
|
228476
228659
|
function recordFileSha256(value2) {
|
|
228477
|
-
return
|
|
228660
|
+
return createHash63("sha256").update(canonicalJson3(value2)).digest("hex");
|
|
228478
228661
|
}
|
|
228479
228662
|
function logLineKey(log, line) {
|
|
228480
228663
|
const job = typeof line.jobId === "string" ? line.jobId : void 0;
|
|
@@ -228484,11 +228667,11 @@ function logLineKey(log, line) {
|
|
|
228484
228667
|
return job !== void 0 || approval !== void 0 ? `job:${job ?? ""}
|
|
228485
228668
|
approval:${approval ?? ""}` : `line:${canonicalJson3(line)}`;
|
|
228486
228669
|
}
|
|
228487
|
-
var
|
|
228670
|
+
var createHash63;
|
|
228488
228671
|
var init_canonical = __esm({
|
|
228489
228672
|
"../../node_modules/@wix/asc-core/dist/store-record/canonical.js"() {
|
|
228490
228673
|
init_define_HHP_CATALOG();
|
|
228491
|
-
({ createHash:
|
|
228674
|
+
({ createHash: createHash63 } = __ascBuiltin030);
|
|
228492
228675
|
}
|
|
228493
228676
|
});
|
|
228494
228677
|
|
|
@@ -228539,13 +228722,13 @@ function textDigest(v2) {
|
|
|
228539
228722
|
if (typeof v2 !== "string")
|
|
228540
228723
|
return v2 === null ? { set: false } : void 0;
|
|
228541
228724
|
const text32 = v2.replace(/\r\n?/g, "\n").trim();
|
|
228542
|
-
return text32 ? { set: true, sha256:
|
|
228725
|
+
return text32 ? { set: true, sha256: createHash64("sha256").update(text32).digest("hex"), length: text32.length } : { set: false };
|
|
228543
228726
|
}
|
|
228544
|
-
var
|
|
228727
|
+
var createHash64;
|
|
228545
228728
|
var init_text = __esm({
|
|
228546
228729
|
"../../node_modules/@wix/asc-core/dist/store-record/text.js"() {
|
|
228547
228730
|
init_define_HHP_CATALOG();
|
|
228548
|
-
({ createHash:
|
|
228731
|
+
({ createHash: createHash64 } = __ascBuiltin031);
|
|
228549
228732
|
}
|
|
228550
228733
|
});
|
|
228551
228734
|
|
|
@@ -229227,7 +229410,7 @@ function tieReason(slot, file2) {
|
|
|
229227
229410
|
const what = slot === "live" && file2.live?.fetched ? "live (or one of its reads)" : slot;
|
|
229228
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`;
|
|
229229
229412
|
}
|
|
229230
|
-
var
|
|
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;
|
|
229231
229414
|
var init_sync = __esm({
|
|
229232
229415
|
"../../node_modules/@wix/asc-core/dist/store-record/sync.js"() {
|
|
229233
229416
|
init_define_HHP_CATALOG();
|
|
@@ -229235,7 +229418,7 @@ var init_sync = __esm({
|
|
|
229235
229418
|
init_canonical();
|
|
229236
229419
|
init_envelope();
|
|
229237
229420
|
init_secrets2();
|
|
229238
|
-
({ createHash:
|
|
229421
|
+
({ createHash: createHash65 } = __ascBuiltin032);
|
|
229239
229422
|
SYNC_LIMITS = { fileBytes: 1024 * 1024, blobBytes: 4 * 1024 * 1024, images: 100, imageBytes: 32 * 1024 * 1024, files: 500, clockSkewMs: 10 * 60 * 1e3 };
|
|
229240
229423
|
LOGS = ["history.jsonl", "decisions.jsonl"];
|
|
229241
229424
|
LOG_SET = new Set(LOGS);
|
|
@@ -229262,7 +229445,7 @@ var init_sync = __esm({
|
|
|
229262
229445
|
const status2 = statusOf2(e2);
|
|
229263
229446
|
return { ...where, ...status2 !== void 0 ? { status: status2 } : {}, message: `${prefix}${describe(e2)}` };
|
|
229264
229447
|
};
|
|
229265
|
-
sha256Of3 = (bytes2) =>
|
|
229448
|
+
sha256Of3 = (bytes2) => createHash65("sha256").update(bytes2).digest("hex");
|
|
229266
229449
|
}
|
|
229267
229450
|
});
|
|
229268
229451
|
|
|
@@ -229410,7 +229593,7 @@ async function readKeyFor(record7, oldKey, appKey) {
|
|
|
229410
229593
|
const claimed = Object.entries(await record7.aliases()).some(([k3, v2]) => v2 === target && k3.startsWith(kind) && k3 !== oldKey);
|
|
229411
229594
|
return claimed ? oldKey : target;
|
|
229412
229595
|
}
|
|
229413
|
-
var
|
|
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;
|
|
229414
229597
|
var init_store_record = __esm({
|
|
229415
229598
|
"../../node_modules/@wix/asc-core/dist/store-record/index.js"() {
|
|
229416
229599
|
init_define_HHP_CATALOG();
|
|
@@ -229431,7 +229614,7 @@ var init_store_record = __esm({
|
|
|
229431
229614
|
init_pool();
|
|
229432
229615
|
init_canonical();
|
|
229433
229616
|
init_sync();
|
|
229434
|
-
({ createHash:
|
|
229617
|
+
({ createHash: createHash66 } = __ascBuiltin033);
|
|
229435
229618
|
({ chmod: chmod2, mkdir: mkdir15, readdir: readdir6, readFile: readFile14, rename: rename5, stat: stat9, unlink: unlink4 } = __ascBuiltin123);
|
|
229436
229619
|
({ join: join127 } = __ascBuiltin211);
|
|
229437
229620
|
LOGS2 = /* @__PURE__ */ new Set(["history.jsonl", "decisions.jsonl"]);
|
|
@@ -229987,7 +230170,7 @@ var init_store_record = __esm({
|
|
|
229987
230170
|
*/
|
|
229988
230171
|
async putBlob(bytes2, declared) {
|
|
229989
230172
|
const type2 = checkBlob(bytes2, declared);
|
|
229990
|
-
const sha2569 =
|
|
230173
|
+
const sha2569 = createHash66("sha256").update(bytes2).digest("hex");
|
|
229991
230174
|
const ref = { sha256: sha2569, type: type2, bytes: bytes2.length, ...dimensions(bytes2, type2) };
|
|
229992
230175
|
const file2 = this.blobPath(sha2569);
|
|
229993
230176
|
try {
|
|
@@ -230175,7 +230358,7 @@ async function dataSafetyWrites(c2) {
|
|
|
230175
230358
|
} catch {
|
|
230176
230359
|
continue;
|
|
230177
230360
|
}
|
|
230178
|
-
if (
|
|
230361
|
+
if (createHash67("sha256").update(csv2).digest("hex") !== sent) {
|
|
230179
230362
|
changed = true;
|
|
230180
230363
|
continue;
|
|
230181
230364
|
}
|
|
@@ -230505,13 +230688,13 @@ async function recordAppKey(record7, packageName, appKey) {
|
|
|
230505
230688
|
async function recordReadKey(record7, packageName, appKey) {
|
|
230506
230689
|
return readKeyFor(record7, appKeyOf({ packageName }), appKey);
|
|
230507
230690
|
}
|
|
230508
|
-
var
|
|
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;
|
|
230509
230692
|
var init_record = __esm({
|
|
230510
230693
|
"../../node_modules/@wix/gplay-jobs/dist/record.js"() {
|
|
230511
230694
|
init_define_HHP_CATALOG();
|
|
230512
230695
|
init_store_record();
|
|
230513
230696
|
init_dist();
|
|
230514
|
-
({ createHash:
|
|
230697
|
+
({ createHash: createHash67 } = __ascBuiltin034);
|
|
230515
230698
|
({ readFile: readFile15 } = __ascBuiltin124);
|
|
230516
230699
|
REPLACE = "replace";
|
|
230517
230700
|
merge2 = (...collections2) => ({ merge: collections2 });
|
|
@@ -231006,8 +231189,8 @@ __export(store_google_host_exports, {
|
|
|
231006
231189
|
resolveDeveloper: () => resolveDeveloper,
|
|
231007
231190
|
signingFor: () => signingFor
|
|
231008
231191
|
});
|
|
231009
|
-
import { createHash as
|
|
231010
|
-
import { existsSync as existsSync112, lstatSync as lstatSync32, mkdirSync as mkdirSync43, readFileSync as readFileSync125, readdirSync as readdirSync46, realpathSync as
|
|
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";
|
|
231011
231194
|
import { join as join128, relative as relative24 } from "node:path";
|
|
231012
231195
|
function readGooglePlayFacts(dir) {
|
|
231013
231196
|
const path2 = join128(dir, GOOGLE_FACTS_FILE);
|
|
@@ -231123,7 +231306,7 @@ async function googleAppFactsFor(dir, o2) {
|
|
|
231123
231306
|
const himi = packageName.toLowerCase().startsWith("himi.");
|
|
231124
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.`);
|
|
231125
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.`);
|
|
231126
|
-
const realDir =
|
|
231309
|
+
const realDir = realpathSync14(dir);
|
|
231127
231310
|
const files = {};
|
|
231128
231311
|
const given = (key4) => {
|
|
231129
231312
|
const p2 = str17(file2[key4]);
|
|
@@ -231362,7 +231545,7 @@ var init_store_google_host = __esm({
|
|
|
231362
231545
|
};
|
|
231363
231546
|
consoleSignedIn = (local, env) => existsSync112(join128(local.stateDir, "console.json")) || !!env.GPLAY_CONSOLE_PROFILE;
|
|
231364
231547
|
ownerReplyApprovalsPath = (stateDir2) => join128(stateDir2, "himi-owner-reply-approvals.json");
|
|
231365
|
-
sha2 = (text32) =>
|
|
231548
|
+
sha2 = (text32) => createHash68("sha256").update(text32.trim(), "utf8").digest("hex");
|
|
231366
231549
|
}
|
|
231367
231550
|
});
|
|
231368
231551
|
|
|
@@ -233885,8 +234068,8 @@ function hashPadded(...values) {
|
|
|
233885
234068
|
return fromHex(shaHex(input)) % N5;
|
|
233886
234069
|
}
|
|
233887
234070
|
function derivePassword(password, protocol, salt, iterations) {
|
|
233888
|
-
const
|
|
233889
|
-
const prepared = protocol === "s2k" ?
|
|
234071
|
+
const digest3 = sha2566(password);
|
|
234072
|
+
const prepared = protocol === "s2k" ? digest3 : protocol === "s2k_fo" ? Buffer.from(digest3.toString("hex")) : void 0;
|
|
233890
234073
|
if (!prepared)
|
|
233891
234074
|
throw new Error(`unsupported SRP protocol "${protocol}"`);
|
|
233892
234075
|
return pbkdf2Sync3(prepared, salt, iterations, 32, "sha256");
|
|
@@ -233949,22 +234132,22 @@ function makeHashcash(bits, challenge, now = /* @__PURE__ */ new Date()) {
|
|
|
233949
234132
|
const date = now.toISOString().replace(/[-:T]/g, "").slice(0, 14);
|
|
233950
234133
|
for (let counter = 0; ; counter++) {
|
|
233951
234134
|
const candidate = `1:${bits}:${date}:${challenge}::${counter}`;
|
|
233952
|
-
if (leadingZeroBits(
|
|
234135
|
+
if (leadingZeroBits(createHash69("sha1").update(candidate).digest(), bits))
|
|
233953
234136
|
return candidate;
|
|
233954
234137
|
}
|
|
233955
234138
|
}
|
|
233956
234139
|
function checkHashcash(value2, bits, challenge) {
|
|
233957
234140
|
const parts = value2.split(":");
|
|
233958
|
-
return parts[1] === String(bits) && parts[3] === challenge && leadingZeroBits(
|
|
234141
|
+
return parts[1] === String(bits) && parts[3] === challenge && leadingZeroBits(createHash69("sha1").update(value2).digest(), bits);
|
|
233959
234142
|
}
|
|
233960
|
-
var
|
|
234143
|
+
var createHash69, pbkdf2Sync3, randomBytes12, N5, G2, sha2566, fromHex, shaHex, N_HEX_LEN, k2;
|
|
233961
234144
|
var init_srp = __esm({
|
|
233962
234145
|
"../../node_modules/@wix/asc-web/dist/srp.js"() {
|
|
233963
234146
|
init_define_HHP_CATALOG();
|
|
233964
|
-
({ createHash:
|
|
234147
|
+
({ createHash: createHash69, pbkdf2Sync: pbkdf2Sync3, randomBytes: randomBytes12 } = __ascBuiltin041);
|
|
233965
234148
|
N5 = BigInt("0xAC6BDB41324A9A9BF166DE5E1389582FAF72B6651987EE07FC3192943DB56050A37329CBB4A099ED8193E0757767A13DD52312AB4B03310DCD7F48A9DA04FD50E8083969EDB767B0CF6095179A163AB3661A05FBD5FAAAE82918A9962F0B93B855F97993EC975EEAA80D740ADBF4FF747359D041D5C33EA71D281E446B14773BCA97B43A23FB801676BD207A436C6481F1D2B9078717461A5B9D32E688F87748544523B524B0D57D5EA77A2775D2ECFA032CFBDBF52FB3786160279004E57AE6AF874E7303CE53299CCC041C7BC308D82A5698F3A8D0C38271AE35F8E9DBFBB694B5C803D89F7AE435DE236D525F54759B65E372FCD68EF20FA7111F9E4AFF73");
|
|
233966
234149
|
G2 = 2n;
|
|
233967
|
-
sha2566 = (data) =>
|
|
234150
|
+
sha2566 = (data) => createHash69("sha256").update(data).digest();
|
|
233968
234151
|
fromHex = (h2) => BigInt(`0x${h2 || "0"}`);
|
|
233969
234152
|
shaHex = (hex2) => sha2566(Buffer.from(hex2, "hex")).toString("hex");
|
|
233970
234153
|
N_HEX_LEN = 2 * (N5.toString(16).length * 4 + 7 >> 3);
|
|
@@ -234131,12 +234314,12 @@ async function writePartIndex(dir, key4, parts) {
|
|
|
234131
234314
|
throw e2;
|
|
234132
234315
|
}
|
|
234133
234316
|
}
|
|
234134
|
-
var
|
|
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;
|
|
234135
234318
|
var init_session_lock = __esm({
|
|
234136
234319
|
"../../node_modules/@wix/asc-web/dist/session-lock.js"() {
|
|
234137
234320
|
init_define_HHP_CATALOG();
|
|
234138
234321
|
init_dist3();
|
|
234139
|
-
({ createHash:
|
|
234322
|
+
({ createHash: createHash70, randomBytes: randomBytes13 } = __ascBuiltin042);
|
|
234140
234323
|
({ chmod: chmod3, constants: constants8, link: link3, lstat: lstat2, mkdir: mkdir16, readFile: readFile16, rename: rename6, rmdir: rmdir2, unlink: unlink5, writeFile: writeFile12 } = __ascBuiltin127);
|
|
234141
234324
|
({ hostname: hostname4 } = __ascBuiltin213);
|
|
234142
234325
|
({ join: join131 } = __ascBuiltin35);
|
|
@@ -234158,7 +234341,7 @@ var init_session_lock = __esm({
|
|
|
234158
234341
|
unusable = (dir, e2) => new SessionLockError(`could not lock the web session under ${dir} (${code(e2) ?? "error"}); fix or remove that directory and retry`);
|
|
234159
234342
|
code = (e2) => e2?.code;
|
|
234160
234343
|
sleep3 = (ms2) => new Promise((resolve141) => setTimeout(resolve141, ms2));
|
|
234161
|
-
baseName = (key4) => `session-${
|
|
234344
|
+
baseName = (key4) => `session-${createHash70("sha256").update(key4).digest("hex")}`;
|
|
234162
234345
|
isStale3 = ({ holder, ageMs }, staleMs) => ageMs > staleMs || Number.isInteger(holder.pid) && holder.host === hostname4() && !isAlive(holder.pid);
|
|
234163
234346
|
isPartSet = (p2) => typeof p2?.id === "string" && /^[0-9a-f]+$/.test(p2.id) && Number.isInteger(p2.count) && p2.count >= 1 && p2.count <= 1e3;
|
|
234164
234347
|
}
|
|
@@ -234476,7 +234659,7 @@ function keepReceivedCookies(loaded2, latest) {
|
|
|
234476
234659
|
return { ...current, cookies: [...kept, ...received.map((c2) => ({ ...c2 }))] };
|
|
234477
234660
|
};
|
|
234478
234661
|
}
|
|
234479
|
-
var execFile4,
|
|
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;
|
|
234480
234663
|
var init_session = __esm({
|
|
234481
234664
|
"../../node_modules/@wix/asc-web/dist/session.js"() {
|
|
234482
234665
|
init_define_HHP_CATALOG();
|
|
@@ -234485,7 +234668,7 @@ var init_session = __esm({
|
|
|
234485
234668
|
init_pacing();
|
|
234486
234669
|
init_srp();
|
|
234487
234670
|
({ execFile: execFile4 } = __ascBuiltin043);
|
|
234488
|
-
({ createHash:
|
|
234671
|
+
({ createHash: createHash71, randomBytes: randomBytes14 } = __ascBuiltin128);
|
|
234489
234672
|
IDMSA = "https://idmsa.apple.com";
|
|
234490
234673
|
ASC_WEB = "https://appstoreconnect.apple.com";
|
|
234491
234674
|
WebAuthError = class extends Error {
|
|
@@ -234672,7 +234855,7 @@ var init_session = __esm({
|
|
|
234672
234855
|
const m2 = head2.manifest;
|
|
234673
234856
|
const parts = await Promise.all(Array.from({ length: m2.count }, (_2, n2) => this.read(this.chunkAccount(appleId, m2.id, n2))));
|
|
234674
234857
|
const joined = parts.every((p2) => p2 !== void 0) ? parts.join("") : void 0;
|
|
234675
|
-
if (joined !== void 0 &&
|
|
234858
|
+
if (joined !== void 0 && createHash71("sha256").update(joined).digest("hex") === m2.sha256)
|
|
234676
234859
|
return joined;
|
|
234677
234860
|
if (attempt2 > 0)
|
|
234678
234861
|
throw new SessionStoreError(DAMAGED_SESSION);
|
|
@@ -234752,7 +234935,7 @@ var init_session = __esm({
|
|
|
234752
234935
|
await removeWritten();
|
|
234753
234936
|
throw e2;
|
|
234754
234937
|
}
|
|
234755
|
-
const manifest2 = { id, count: parts.length, sha256:
|
|
234938
|
+
const manifest2 = { id, count: parts.length, sha256: createHash71("sha256").update(text32).digest("hex") };
|
|
234756
234939
|
try {
|
|
234757
234940
|
await this.write(session.appleId, JSON.stringify({ ascNodeChunks: manifest2 }));
|
|
234758
234941
|
} catch (e2) {
|
|
@@ -234848,12 +235031,12 @@ function signinBackoffUntil(record7, now) {
|
|
|
234848
235031
|
const capped = Math.min(until, failed2 + MAX_SIGNIN_BACKOFF_MS);
|
|
234849
235032
|
return now < capped ? capped : void 0;
|
|
234850
235033
|
}
|
|
234851
|
-
var
|
|
235034
|
+
var createHash72, randomBytes15, chmod4, mkdir17, readFile17, rename7, rm9, writeFile13, join132, DEFAULT_SIGNIN_BACKOFF_MS, MAX_SIGNIN_BACKOFF_MS, VERSION, newer, SigninBackoffStore;
|
|
234852
235035
|
var init_signin_backoff = __esm({
|
|
234853
235036
|
"../../node_modules/@wix/asc-web/dist/signin-backoff.js"() {
|
|
234854
235037
|
init_define_HHP_CATALOG();
|
|
234855
235038
|
init_session_lock();
|
|
234856
|
-
({ createHash:
|
|
235039
|
+
({ createHash: createHash72, randomBytes: randomBytes15 } = __ascBuiltin044);
|
|
234857
235040
|
({ chmod: chmod4, mkdir: mkdir17, readFile: readFile17, rename: rename7, rm: rm9, writeFile: writeFile13 } = __ascBuiltin129);
|
|
234858
235041
|
({ join: join132 } = __ascBuiltin214);
|
|
234859
235042
|
DEFAULT_SIGNIN_BACKOFF_MS = 15 * 6e4;
|
|
@@ -234870,7 +235053,7 @@ var init_signin_backoff = __esm({
|
|
|
234870
235053
|
this.dir = dir;
|
|
234871
235054
|
this.lockDir = lockDir;
|
|
234872
235055
|
}
|
|
234873
|
-
key = (appleId) =>
|
|
235056
|
+
key = (appleId) => createHash72("sha256").update(appleId.trim().toLowerCase()).digest("hex");
|
|
234874
235057
|
path = (appleId) => join132(this.dir, `signin-backoff-${this.key(appleId)}.json`);
|
|
234875
235058
|
/** The record, undefined when there is none or it cannot be read: a damaged one carries nothing worth stopping a sign-in for. */
|
|
234876
235059
|
async load(appleId) {
|
|
@@ -238695,14 +238878,14 @@ async function pollUntil(read2, done, options2) {
|
|
|
238695
238878
|
interval = options2.nextIntervalMs?.() ?? options2.intervalMs;
|
|
238696
238879
|
}
|
|
238697
238880
|
}
|
|
238698
|
-
var
|
|
238881
|
+
var createHash73, realClock, md5;
|
|
238699
238882
|
var init_util4 = __esm({
|
|
238700
238883
|
"../../node_modules/@wix/asc-api/dist/util.js"() {
|
|
238701
238884
|
init_define_HHP_CATALOG();
|
|
238702
238885
|
init_dist3();
|
|
238703
|
-
({ createHash:
|
|
238886
|
+
({ createHash: createHash73 } = __ascBuiltin045);
|
|
238704
238887
|
realClock = { now: Date.now, sleep: (ms2) => new Promise((resolve141) => setTimeout(resolve141, ms2)) };
|
|
238705
|
-
md5 = (bytes2) =>
|
|
238888
|
+
md5 = (bytes2) => createHash73("md5").update(bytes2).digest("hex");
|
|
238706
238889
|
}
|
|
238707
238890
|
});
|
|
238708
238891
|
|
|
@@ -244858,13 +245041,13 @@ ${body}
|
|
|
244858
245041
|
</testsuites>
|
|
244859
245042
|
`;
|
|
244860
245043
|
}
|
|
244861
|
-
var
|
|
245044
|
+
var createHash74, randomUUID15, mkdir18, readFile18, readdir7, rename8, writeFile14, join133, MemoryBatchStore, FileBatchStore, FINAL_OK, RETRYABLE, sha3, BatchRunner, xml;
|
|
244862
245045
|
var init_batch = __esm({
|
|
244863
245046
|
"../../node_modules/@wix/asc-jobs/dist/batch.js"() {
|
|
244864
245047
|
init_define_HHP_CATALOG();
|
|
244865
245048
|
init_dist3();
|
|
244866
245049
|
init_job();
|
|
244867
|
-
({ createHash:
|
|
245050
|
+
({ createHash: createHash74, randomUUID: randomUUID15 } = __ascBuiltin048);
|
|
244868
245051
|
({ mkdir: mkdir18, readFile: readFile18, readdir: readdir7, rename: rename8, writeFile: writeFile14 } = __ascBuiltin130);
|
|
244869
245052
|
({ join: join133 } = __ascBuiltin215);
|
|
244870
245053
|
MemoryBatchStore = class {
|
|
@@ -244909,7 +245092,7 @@ var init_batch = __esm({
|
|
|
244909
245092
|
};
|
|
244910
245093
|
FINAL_OK = /* @__PURE__ */ new Set(["verified", "applied", "noop"]);
|
|
244911
245094
|
RETRYABLE = /* @__PURE__ */ new Set(["failed", "uncertain", "locked", "planFailed"]);
|
|
244912
|
-
sha3 = (v2) =>
|
|
245095
|
+
sha3 = (v2) => createHash74("sha256").update(canonical6(v2)).digest("hex");
|
|
244913
245096
|
BatchRunner = class {
|
|
244914
245097
|
options;
|
|
244915
245098
|
now;
|
|
@@ -246794,8 +246977,8 @@ function betaReviewView(details, passwordSent) {
|
|
|
246794
246977
|
});
|
|
246795
246978
|
}
|
|
246796
246979
|
async function fileHashes(path2) {
|
|
246797
|
-
const sha7 =
|
|
246798
|
-
const md53 =
|
|
246980
|
+
const sha7 = createHash75("sha256");
|
|
246981
|
+
const md53 = createHash75("md5");
|
|
246799
246982
|
let bytes2 = 0;
|
|
246800
246983
|
for await (const chunk2 of createReadStream3(path2)) {
|
|
246801
246984
|
sha7.update(chunk2);
|
|
@@ -247354,12 +247537,12 @@ async function syncAppleJobs(record7, jobs, opts = {}) {
|
|
|
247354
247537
|
}
|
|
247355
247538
|
return out2;
|
|
247356
247539
|
}
|
|
247357
|
-
var
|
|
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;
|
|
247358
247541
|
var init_record2 = __esm({
|
|
247359
247542
|
"../../node_modules/@wix/asc-jobs/dist/record.js"() {
|
|
247360
247543
|
init_define_HHP_CATALOG();
|
|
247361
247544
|
init_store_record();
|
|
247362
|
-
({ createHash:
|
|
247545
|
+
({ createHash: createHash75 } = __ascBuiltin050);
|
|
247363
247546
|
({ createReadStream: createReadStream3 } = __ascBuiltin132);
|
|
247364
247547
|
({ readFile: readFile19 } = __ascBuiltin216);
|
|
247365
247548
|
({ basename: basename30 } = __ascBuiltin36);
|
|
@@ -247402,7 +247585,7 @@ var init_record2 = __esm({
|
|
|
247402
247585
|
testflightAppInfo: (locale) => `apple/testflight/app-info/${locale}.json`,
|
|
247403
247586
|
rejection: (threadId) => `apple/rejections/${threadId}.json`
|
|
247404
247587
|
};
|
|
247405
|
-
md5Hex = (bytes2) =>
|
|
247588
|
+
md5Hex = (bytes2) => createHash75("md5").update(bytes2).digest("hex");
|
|
247406
247589
|
Lookups = class {
|
|
247407
247590
|
api;
|
|
247408
247591
|
cache = /* @__PURE__ */ new Map();
|
|
@@ -248432,7 +248615,7 @@ function realPathOf2(path2) {
|
|
|
248432
248615
|
d2 = dirname66(d2);
|
|
248433
248616
|
}
|
|
248434
248617
|
try {
|
|
248435
|
-
return join135(
|
|
248618
|
+
return join135(realpathSync15(d2), ...rest);
|
|
248436
248619
|
} catch {
|
|
248437
248620
|
return resolve84(path2);
|
|
248438
248621
|
}
|
|
@@ -248495,13 +248678,13 @@ function reserveKeyFile(dir, keyId) {
|
|
|
248495
248678
|
}
|
|
248496
248679
|
};
|
|
248497
248680
|
}
|
|
248498
|
-
var createPrivateKey6, closeSync9, existsSync114, mkdirSync45, openSync8,
|
|
248681
|
+
var createPrivateKey6, closeSync9, existsSync114, mkdirSync45, openSync8, realpathSync15, statSync33, unlinkSync7, writeSync3, basename31, dirname66, isAbsolute17, join135, resolve84, TEAM_KEY_ROLES, DOWNLOAD_ATTEMPTS, ApiKeysApi;
|
|
248499
248682
|
var init_api_keys = __esm({
|
|
248500
248683
|
"../../node_modules/@wix/asc-web/dist/api-keys.js"() {
|
|
248501
248684
|
init_define_HHP_CATALOG();
|
|
248502
248685
|
init_dist3();
|
|
248503
248686
|
({ createPrivateKey: createPrivateKey6 } = __ascBuiltin051);
|
|
248504
|
-
({ closeSync: closeSync9, existsSync: existsSync114, mkdirSync: mkdirSync45, openSync: openSync8, realpathSync:
|
|
248687
|
+
({ closeSync: closeSync9, existsSync: existsSync114, mkdirSync: mkdirSync45, openSync: openSync8, realpathSync: realpathSync15, statSync: statSync33, unlinkSync: unlinkSync7, writeSync: writeSync3 } = __ascBuiltin133);
|
|
248505
248688
|
({ basename: basename31, dirname: dirname66, isAbsolute: isAbsolute17, join: join135, resolve: resolve84 } = __ascBuiltin217);
|
|
248506
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"];
|
|
248507
248690
|
DOWNLOAD_ATTEMPTS = 3;
|
|
@@ -249955,12 +250138,12 @@ function refuseDuplicateFiles(files) {
|
|
|
249955
250138
|
seen.add(key4);
|
|
249956
250139
|
}
|
|
249957
250140
|
}
|
|
249958
|
-
var
|
|
250141
|
+
var createHash76, basename32, extname6, ATTACHMENT_TYPE, DRAFT_TYPE, ATTACHMENT_CONTENT_TYPES, MAX_ATTACHMENT_BYTES, md52, errorsOf, ReplyAttachments;
|
|
249959
250142
|
var init_reply_attachments = __esm({
|
|
249960
250143
|
"../../node_modules/@wix/asc-web/dist/reply-attachments.js"() {
|
|
249961
250144
|
init_define_HHP_CATALOG();
|
|
249962
250145
|
init_dist3();
|
|
249963
|
-
({ createHash:
|
|
250146
|
+
({ createHash: createHash76 } = __ascBuiltin055);
|
|
249964
250147
|
({ basename: basename32, extname: extname6 } = __ascBuiltin136);
|
|
249965
250148
|
ATTACHMENT_TYPE = "resolutionCenterMessageAttachments";
|
|
249966
250149
|
DRAFT_TYPE = "resolutionCenterDraftMessages";
|
|
@@ -249974,7 +250157,7 @@ var init_reply_attachments = __esm({
|
|
|
249974
250157
|
".txt": "text/plain"
|
|
249975
250158
|
};
|
|
249976
250159
|
MAX_ATTACHMENT_BYTES = 500 * 1024 * 1024;
|
|
249977
|
-
md52 = (bytes2) =>
|
|
250160
|
+
md52 = (bytes2) => createHash76("md5").update(bytes2).digest("hex");
|
|
249978
250161
|
errorsOf = (state) => {
|
|
249979
250162
|
const errors = state?.errors;
|
|
249980
250163
|
return Array.isArray(errors) ? errors.map((e2) => [e2?.code, e2?.description ?? e2?.detail ?? e2?.title].filter(Boolean).join(" ")).filter(Boolean) : [];
|
|
@@ -251005,7 +251188,7 @@ function readSessionBundle(path2) {
|
|
|
251005
251188
|
throw new SessionBundleError(`the session bundle is larger than ${MAX_SESSION_BUNDLE_BYTES} bytes`);
|
|
251006
251189
|
return readFileSync130(path2, "utf8");
|
|
251007
251190
|
}
|
|
251008
|
-
var chmodSync4, closeSync11, constants9, fstatSync3, lstatSync34, mkdirSync48, openSync10, readFileSync130, renameSync17, rmSync32, statSync38, writeSync5,
|
|
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;
|
|
251009
251192
|
var init_session_transfer = __esm({
|
|
251010
251193
|
"../../node_modules/@wix/asc-web/dist/session-transfer.js"() {
|
|
251011
251194
|
init_define_HHP_CATALOG();
|
|
@@ -251014,7 +251197,7 @@ var init_session_transfer = __esm({
|
|
|
251014
251197
|
init_session_lock();
|
|
251015
251198
|
init_session();
|
|
251016
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);
|
|
251017
|
-
({ createHash:
|
|
251200
|
+
({ createHash: createHash77, randomBytes: randomBytes16 } = __ascBuiltin139);
|
|
251018
251201
|
({ dirname: dirname67, isAbsolute: isAbsolute18, join: join140, resolve: resolve86 } = __ascBuiltin220);
|
|
251019
251202
|
SESSION_BUNDLE_KIND = "asc-node-web-session";
|
|
251020
251203
|
SESSION_BUNDLE_VERSION = 1;
|
|
@@ -251040,7 +251223,7 @@ var init_session_transfer = __esm({
|
|
|
251040
251223
|
this.box = box;
|
|
251041
251224
|
}
|
|
251042
251225
|
path(appleId) {
|
|
251043
|
-
return join140(this.dir, `session-${
|
|
251226
|
+
return join140(this.dir, `session-${createHash77("sha256").update(appleId.trim().toLowerCase()).digest("hex")}.json`);
|
|
251044
251227
|
}
|
|
251045
251228
|
locked(appleId, body, lock) {
|
|
251046
251229
|
return withSessionLock(this.lockDir, appleId.trim().toLowerCase(), body, { ...this.lockOptions, ...lock });
|
|
@@ -251395,11 +251578,11 @@ function approvalDonePage(o2) {
|
|
|
251395
251578
|
<p>Nothing was approved; the change will not be applied.</p>
|
|
251396
251579
|
<p class="muted">You can close this tab.</p>`);
|
|
251397
251580
|
}
|
|
251398
|
-
var
|
|
251581
|
+
var createHash78, escapeHtml2, STYLE, PAGE_SCRIPT, PAGE_SCRIPT_CSP, errorBlock;
|
|
251399
251582
|
var init_connect_page = __esm({
|
|
251400
251583
|
"../../node_modules/@wix/asc-web/dist/connect-page.js"() {
|
|
251401
251584
|
init_define_HHP_CATALOG();
|
|
251402
|
-
({ createHash:
|
|
251585
|
+
({ createHash: createHash78 } = __ascBuiltin059);
|
|
251403
251586
|
escapeHtml2 = (text32) => text32.replace(/[&<>"']/g, (c2) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[c2]);
|
|
251404
251587
|
STYLE = `
|
|
251405
251588
|
:root { color-scheme: light dark; --fg: #1d1d1f; --muted: #6e6e73; --bg: #f5f5f7; --card: #fff; --line: #d2d2d7; --accent: #0071e3; --err: #b3261e; --errbg: #fdecea; }
|
|
@@ -251449,7 +251632,7 @@ var init_connect_page = __esm({
|
|
|
251449
251632
|
});
|
|
251450
251633
|
window.addEventListener("pageshow", function (e) { if (e.persisted) reset(); });
|
|
251451
251634
|
})();`;
|
|
251452
|
-
PAGE_SCRIPT_CSP = `'sha256-${
|
|
251635
|
+
PAGE_SCRIPT_CSP = `'sha256-${createHash78("sha256").update(PAGE_SCRIPT).digest("base64")}'`;
|
|
251453
251636
|
errorBlock = (error) => error ? `<p class="error" role="alert" data-error="${escapeHtml2(error.kind)}">${escapeHtml2(error.text)}</p>
|
|
251454
251637
|
` : "";
|
|
251455
251638
|
}
|
|
@@ -255136,7 +255319,7 @@ async function recordAccepted(inv) {
|
|
|
255136
255319
|
await store.markAccepted(hash3, `the published agreement; the portal shows ${accepted.id} accepted on ${accepted.accepted}`);
|
|
255137
255320
|
return { hash: hash3 };
|
|
255138
255321
|
}
|
|
255139
|
-
var
|
|
255322
|
+
var createHash79, mkdir19, readFile20, writeFile15, join143, PROBES2, SLUG, AgreementCache, cache3, webClient, AGREEMENT_COMMANDS;
|
|
255140
255323
|
var init_commands_agreements = __esm({
|
|
255141
255324
|
"../../node_modules/@wix/asc/dist/commands-agreements.js"() {
|
|
255142
255325
|
init_define_HHP_CATALOG();
|
|
@@ -255144,7 +255327,7 @@ var init_commands_agreements = __esm({
|
|
|
255144
255327
|
init_dist6();
|
|
255145
255328
|
init_commands();
|
|
255146
255329
|
init_output2();
|
|
255147
|
-
({ createHash:
|
|
255330
|
+
({ createHash: createHash79 } = __ascBuiltin068);
|
|
255148
255331
|
({ mkdir: mkdir19, readFile: readFile20, writeFile: writeFile15 } = __ascBuiltin144);
|
|
255149
255332
|
({ join: join143 } = __ascBuiltin223);
|
|
255150
255333
|
PROBES2 = [
|
|
@@ -255170,7 +255353,7 @@ var init_commands_agreements = __esm({
|
|
|
255170
255353
|
}
|
|
255171
255354
|
async store(text32, meta) {
|
|
255172
255355
|
await mkdir19(this.dir, { recursive: true, mode: 448 });
|
|
255173
|
-
const hash3 =
|
|
255356
|
+
const hash3 = createHash79("sha256").update(text32).digest("hex").slice(0, 16);
|
|
255174
255357
|
await writeFile15(join143(this.dir, `${hash3}.txt`), text32, { mode: 384 });
|
|
255175
255358
|
const index = await this.index();
|
|
255176
255359
|
index.versions[hash3] ??= { ...meta, fetched: (/* @__PURE__ */ new Date()).toISOString() };
|
|
@@ -256579,13 +256762,13 @@ var init_commands_webhooks = __esm({
|
|
|
256579
256762
|
import * as __ascBuiltin071 from "node:crypto";
|
|
256580
256763
|
import * as __ascBuiltin145 from "node:fs";
|
|
256581
256764
|
import * as __ascBuiltin224 from "node:path";
|
|
256582
|
-
var
|
|
256765
|
+
var createHash80, readFileSync136, basename35, KINDS, WorkerClient;
|
|
256583
256766
|
var init_remote = __esm({
|
|
256584
256767
|
"../../node_modules/@wix/asc/dist/remote.js"() {
|
|
256585
256768
|
init_define_HHP_CATALOG();
|
|
256586
256769
|
init_dist3();
|
|
256587
256770
|
init_dist5();
|
|
256588
|
-
({ createHash:
|
|
256771
|
+
({ createHash: createHash80 } = __ascBuiltin071);
|
|
256589
256772
|
({ readFileSync: readFileSync136 } = __ascBuiltin145);
|
|
256590
256773
|
({ basename: basename35 } = __ascBuiltin224);
|
|
256591
256774
|
KINDS = /* @__PURE__ */ new Set(["auth", "forbidden", "notFound", "conflict", "invalid", "rateLimited", "server", "network", "uncertain", "refused", "readOnly", "truncated"]);
|
|
@@ -256636,7 +256819,7 @@ var init_remote = __esm({
|
|
|
256636
256819
|
}
|
|
256637
256820
|
/** Uploads one file for a job (`/v1/uploads`) in parts; returns the ref a job names (`upload:<id>/<file name>`). */
|
|
256638
256821
|
async upload(bytes2, fileName, partBytes = 1024 * 1024) {
|
|
256639
|
-
const md53 =
|
|
256822
|
+
const md53 = createHash80("md5").update(bytes2).digest("hex");
|
|
256640
256823
|
const slot = await this.call("POST", "/v1/uploads", { fileName, size: bytes2.length, md5: md53 });
|
|
256641
256824
|
let done;
|
|
256642
256825
|
for (let offset = 0; offset < bytes2.length; offset += partBytes) {
|
|
@@ -256662,7 +256845,7 @@ var init_remote = __esm({
|
|
|
256662
256845
|
const o2 = value2;
|
|
256663
256846
|
if (typeof o2.path === "string" && typeof o2.md5 === "string" && !isUploadPath(o2.path)) {
|
|
256664
256847
|
const bytes2 = new Uint8Array(readFileSync136(o2.path));
|
|
256665
|
-
if (
|
|
256848
|
+
if (createHash80("md5").update(bytes2).digest("hex") !== o2.md5)
|
|
256666
256849
|
throw new AscError("refused", `${o2.path} changed while the command ran (md5 differs); run it again`);
|
|
256667
256850
|
const up2 = await this.upload(bytes2, basename35(o2.path));
|
|
256668
256851
|
return { ...o2, path: up2.ref, md5: up2.md5 };
|
|
@@ -256753,12 +256936,12 @@ async function startCallback(timeoutMs) {
|
|
|
256753
256936
|
}
|
|
256754
256937
|
};
|
|
256755
256938
|
}
|
|
256756
|
-
var
|
|
256939
|
+
var createHash81, randomBytes18, createServer5, b64url3, GatewayAuth;
|
|
256757
256940
|
var init_gateway_auth = __esm({
|
|
256758
256941
|
"../../node_modules/@wix/asc/dist/gateway-auth.js"() {
|
|
256759
256942
|
init_define_HHP_CATALOG();
|
|
256760
256943
|
init_dist3();
|
|
256761
|
-
({ createHash:
|
|
256944
|
+
({ createHash: createHash81, randomBytes: randomBytes18 } = __ascBuiltin072);
|
|
256762
256945
|
({ createServer: createServer5 } = __ascBuiltin146);
|
|
256763
256946
|
b64url3 = (bytes2) => bytes2.toString("base64url");
|
|
256764
256947
|
GatewayAuth = class {
|
|
@@ -256854,7 +257037,7 @@ var init_gateway_auth = __esm({
|
|
|
256854
257037
|
authorize.searchParams.set("response_type", "code");
|
|
256855
257038
|
authorize.searchParams.set("client_id", clientId);
|
|
256856
257039
|
authorize.searchParams.set("redirect_uri", callback.redirect);
|
|
256857
|
-
authorize.searchParams.set("code_challenge", b64url3(
|
|
257040
|
+
authorize.searchParams.set("code_challenge", b64url3(createHash81("sha256").update(verifier2).digest()));
|
|
256858
257041
|
authorize.searchParams.set("code_challenge_method", "S256");
|
|
256859
257042
|
authorize.searchParams.set("state", state);
|
|
256860
257043
|
if (resource.resource)
|
|
@@ -260671,7 +260854,7 @@ function fileRoots(env) {
|
|
|
260671
260854
|
const roots2 = [process.cwd(), ...(env.ASC_MCP_FILE_ROOTS ?? "").split(delimiter3)].map((r3) => r3.trim()).filter(Boolean);
|
|
260672
260855
|
return [...new Set(roots2.flatMap((r3) => {
|
|
260673
260856
|
try {
|
|
260674
|
-
return [
|
|
260857
|
+
return [realpathSync16(resolve92(r3))];
|
|
260675
260858
|
} catch {
|
|
260676
260859
|
return [];
|
|
260677
260860
|
}
|
|
@@ -260684,7 +260867,7 @@ function checkJobFile(path2, param, ctx, o2 = {}) {
|
|
|
260684
260867
|
const given = resolve92(roots2[0] ?? process.cwd(), path2);
|
|
260685
260868
|
let real;
|
|
260686
260869
|
try {
|
|
260687
|
-
real =
|
|
260870
|
+
real = realpathSync16(given);
|
|
260688
260871
|
} catch (e2) {
|
|
260689
260872
|
throw new AscError("invalid", `${param}: cannot read ${path2} (${e2.code ?? "unreadable"})`);
|
|
260690
260873
|
}
|
|
@@ -260693,7 +260876,7 @@ function checkJobFile(path2, param, ctx, o2 = {}) {
|
|
|
260693
260876
|
throw new AscError("invalid", `${param}: ${path2} is not a ${o2.directory ? "directory" : "regular file"}`);
|
|
260694
260877
|
let state;
|
|
260695
260878
|
try {
|
|
260696
|
-
state =
|
|
260879
|
+
state = realpathSync16(ctx.stateDir);
|
|
260697
260880
|
} catch {
|
|
260698
260881
|
state = void 0;
|
|
260699
260882
|
}
|
|
@@ -260892,7 +261075,7 @@ ${o2.detail}` : ""}` };
|
|
|
260892
261075
|
function enabledTools(env, o2 = {}) {
|
|
260893
261076
|
return TOOLS.filter((t2) => !t2.write || env.ASC_MCP_WRITE === "1" || o2.approvals === true);
|
|
260894
261077
|
}
|
|
260895
|
-
var mkdirSync50, readFileSync138,
|
|
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;
|
|
260896
261079
|
var init_tools2 = __esm({
|
|
260897
261080
|
"../../node_modules/@wix/asc-mcp/dist/tools.js"() {
|
|
260898
261081
|
init_define_HHP_CATALOG();
|
|
@@ -260902,7 +261085,7 @@ var init_tools2 = __esm({
|
|
|
260902
261085
|
init_dist6();
|
|
260903
261086
|
init_dist7();
|
|
260904
261087
|
init_action_catalog_generated();
|
|
260905
|
-
({ mkdirSync: mkdirSync50, readFileSync: readFileSync138, realpathSync:
|
|
261088
|
+
({ mkdirSync: mkdirSync50, readFileSync: readFileSync138, realpathSync: realpathSync16, statSync: statSync41, writeFileSync: writeFileSync53 } = __ascBuiltin075);
|
|
260906
261089
|
({ delimiter: delimiter3, isAbsolute: isAbsolute19, join: join145, relative: relative25, resolve: resolve92, sep: sep29 } = __ascBuiltin148);
|
|
260907
261090
|
READ = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true };
|
|
260908
261091
|
PLAN = { readOnlyHint: true, destructiveHint: false, idempotentHint: false, openWorldHint: true };
|
|
@@ -261638,7 +261821,7 @@ async function readPlan(app2, clients, developerId, ref) {
|
|
|
261638
261821
|
return { steps: buildPlan({ packageName: app2.packageName, developerId, ...appId3 ? { appId: appId3 } : {}, facts: app2.facts }, record7, observed), ...appId3 ? { appId: appId3 } : {}, ...fromRecord ? { fromRecord } : {} };
|
|
261639
261822
|
}
|
|
261640
261823
|
async function sha2567(path2) {
|
|
261641
|
-
const hash3 =
|
|
261824
|
+
const hash3 = createHash82("sha256");
|
|
261642
261825
|
for await (const chunk2 of createReadStream4(path2))
|
|
261643
261826
|
hash3.update(chunk2);
|
|
261644
261827
|
return hash3.digest("hex");
|
|
@@ -261695,7 +261878,7 @@ async function appIdOf2(app2, clients) {
|
|
|
261695
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`);
|
|
261696
261879
|
return appId3;
|
|
261697
261880
|
}
|
|
261698
|
-
var
|
|
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;
|
|
261699
261882
|
var init_store_android = __esm({
|
|
261700
261883
|
"../../node_modules/@wix/asc-mcp/dist/store-android.js"() {
|
|
261701
261884
|
init_define_HHP_CATALOG();
|
|
@@ -261705,7 +261888,7 @@ var init_store_android = __esm({
|
|
|
261705
261888
|
init_dist();
|
|
261706
261889
|
init_dist2();
|
|
261707
261890
|
init_tools2();
|
|
261708
|
-
({ createHash:
|
|
261891
|
+
({ createHash: createHash82 } = __ascBuiltin076);
|
|
261709
261892
|
({ createReadStream: createReadStream4 } = __ascBuiltin149);
|
|
261710
261893
|
({ readdir: readdir8 } = __ascBuiltin226);
|
|
261711
261894
|
({ join: join146 } = __ascBuiltin39);
|
|
@@ -263120,14 +263303,14 @@ __export(apple_keys_exports, {
|
|
|
263120
263303
|
runAppleKeys: () => runAppleKeys
|
|
263121
263304
|
});
|
|
263122
263305
|
import { createPublicKey as createPublicKey5 } from "node:crypto";
|
|
263123
|
-
import { readFileSync as readFileSync139, realpathSync as
|
|
263306
|
+
import { readFileSync as readFileSync139, realpathSync as realpathSync17, statSync as statSync42 } from "node:fs";
|
|
263124
263307
|
function readKey2(flags, kind) {
|
|
263125
263308
|
const names2 = kind === "asc" ? ["asc-key-file", "asc-key-id", "asc-issuer-id"] : ["iap-key", "iap-key-id", "iap-issuer-id"];
|
|
263126
263309
|
if (names2.every((name) => flags[name] === void 0)) return void 0;
|
|
263127
263310
|
const [file2, keyId, issuerId] = names2.map((name) => text17(flags[name]));
|
|
263128
263311
|
if (!file2 || !keyId || !issuerId) throw new UsageError2(`Supply --${names2.join(" --")} together.`);
|
|
263129
263312
|
try {
|
|
263130
|
-
const path2 =
|
|
263313
|
+
const path2 = realpathSync17(file2);
|
|
263131
263314
|
assertCredentialOutsideRepo(names2[0], path2);
|
|
263132
263315
|
if (statSync42(path2).size > 16384) throw new Error("oversized");
|
|
263133
263316
|
const key4 = { keyId, issuerId, key: readFileSync139(path2, "utf8") };
|
|
@@ -263311,7 +263494,7 @@ __export(store_host_exports, {
|
|
|
263311
263494
|
wixTargetOf: () => wixTargetOf
|
|
263312
263495
|
});
|
|
263313
263496
|
import { spawn as spawn8 } from "node:child_process";
|
|
263314
|
-
import { existsSync as existsSync117, lstatSync as lstatSync35, readFileSync as readFileSync140, readdirSync as readdirSync51, realpathSync as
|
|
263497
|
+
import { existsSync as existsSync117, lstatSync as lstatSync35, readFileSync as readFileSync140, readdirSync as readdirSync51, realpathSync as realpathSync18 } from "node:fs";
|
|
263315
263498
|
import { homedir as homedir16, hostname as hostname6, userInfo as userInfo3 } from "node:os";
|
|
263316
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";
|
|
263317
263500
|
function storeNodeRefusal(version5 = process.versions.node) {
|
|
@@ -263444,12 +263627,12 @@ function privacyAnswersFor(dir, ownerPath, shellOnly, checked, deps, note) {
|
|
|
263444
263627
|
function ownerAnswers(dir, ownerPath, deps, note, rel2, render3) {
|
|
263445
263628
|
let real;
|
|
263446
263629
|
try {
|
|
263447
|
-
real =
|
|
263630
|
+
real = realpathSync18(ownerPath);
|
|
263448
263631
|
} catch {
|
|
263449
263632
|
note(`App Privacy: could not read ${rel2(ownerPath)} to check it against the Himi app's own answers.`);
|
|
263450
263633
|
return ownerPath;
|
|
263451
263634
|
}
|
|
263452
|
-
const realDir =
|
|
263635
|
+
const realDir = realpathSync18(dir);
|
|
263453
263636
|
if (real !== realDir && !real.startsWith(realDir + sep30)) {
|
|
263454
263637
|
throw new StoreFactsError(`privacyAnswersFile must be inside the app folder; ${rel2(ownerPath)} is not`, "store_facts_invalid");
|
|
263455
263638
|
}
|
|
@@ -263491,7 +263674,7 @@ function factPathIn(dir, realDir, key4, p2, file2 = STORE_FACTS_FILE) {
|
|
|
263491
263674
|
while (!existsSync117(probe2) && probe2 !== base2) probe2 = dirname68(probe2);
|
|
263492
263675
|
let real;
|
|
263493
263676
|
try {
|
|
263494
|
-
real =
|
|
263677
|
+
real = realpathSync18(probe2);
|
|
263495
263678
|
} catch {
|
|
263496
263679
|
throw refuse11();
|
|
263497
263680
|
}
|
|
@@ -263533,7 +263716,7 @@ async function appFactsFor(dir, deps) {
|
|
|
263533
263716
|
...str20(file2.sku) ? { sku: str20(file2.sku) } : {},
|
|
263534
263717
|
...str20(file2.buildNumber) ? { buildNumber: str20(file2.buildNumber) } : {}
|
|
263535
263718
|
};
|
|
263536
|
-
const realDir =
|
|
263719
|
+
const realDir = realpathSync18(dir);
|
|
263537
263720
|
for (const key4 of FILE_FACTS) {
|
|
263538
263721
|
const p2 = str20(file2[key4]);
|
|
263539
263722
|
if (p2) facts[key4] = factPathIn(dir, realDir, key4, p2);
|
|
@@ -265877,11 +266060,11 @@ __export(input_evidence_isolation_exports, {
|
|
|
265877
266060
|
runInputEvidenceChild: () => runInputEvidenceChild
|
|
265878
266061
|
});
|
|
265879
266062
|
async function installInputEvidenceIsolation(dir) {
|
|
265880
|
-
const { lstatSync: lstatSync45, readdirSync: readdirSync68, readlinkSync: readlinkSync4, realpathSync:
|
|
266063
|
+
const { lstatSync: lstatSync45, readdirSync: readdirSync68, readlinkSync: readlinkSync4, realpathSync: realpathSync28 } = await import("node:fs");
|
|
265881
266064
|
const { dirname: dirname95, isAbsolute: isAbsolute25, join: join228, relative: relative41, resolve: resolve141, sep: sep38 } = await import("node:path");
|
|
265882
266065
|
const root = resolve141(dir);
|
|
265883
266066
|
const privateDir = join228(root, ".himi");
|
|
265884
|
-
const privateReal = join228(
|
|
266067
|
+
const privateReal = join228(realpathSync28(root), ".himi") + sep38;
|
|
265885
266068
|
const within2 = (base2, path2) => {
|
|
265886
266069
|
const rel2 = relative41(base2, path2);
|
|
265887
266070
|
return !!rel2 && rel2 !== ".." && !rel2.startsWith(`..${sep38}`) && !isAbsolute25(rel2);
|
|
@@ -265894,10 +266077,10 @@ async function installInputEvidenceIsolation(dir) {
|
|
|
265894
266077
|
if (isAbsolute25(link4)) return false;
|
|
265895
266078
|
const target = resolve141(dirname95(path2), link4);
|
|
265896
266079
|
if (!within2(privateDir, target)) return false;
|
|
265897
|
-
if (
|
|
266080
|
+
if (realpathSync28(path2) !== join228(realpathSync28(root), relative41(root, target))) return false;
|
|
265898
266081
|
return lstatSync45(target).isFile();
|
|
265899
266082
|
}
|
|
265900
|
-
return within2(privateDir, resolve141(path2)) &&
|
|
266083
|
+
return within2(privateDir, resolve141(path2)) && realpathSync28(path2).startsWith(privateReal);
|
|
265901
266084
|
} catch {
|
|
265902
266085
|
return false;
|
|
265903
266086
|
}
|
|
@@ -265977,9 +266160,9 @@ async function runInputEvidenceChild(ctx) {
|
|
|
265977
266160
|
}
|
|
265978
266161
|
}
|
|
265979
266162
|
async function inputEvidenceSourceArchiveHash(dir) {
|
|
265980
|
-
const { createHash:
|
|
266163
|
+
const { createHash: createHash108 } = await import("node:crypto");
|
|
265981
266164
|
const { collectAppSource: collectAppSource2, zipAppSource: zipAppSource2 } = await Promise.resolve().then(() => (init_app_source(), app_source_exports));
|
|
265982
|
-
return
|
|
266165
|
+
return createHash108("sha256").update(zipAppSource2(collectAppSource2(dir).entries).toString("base64")).digest("hex");
|
|
265983
266166
|
}
|
|
265984
266167
|
var init_input_evidence_isolation = __esm({
|
|
265985
266168
|
"src/input-evidence-isolation.ts"() {
|
|
@@ -266326,8 +266509,8 @@ __export(browser_authoring_exports, {
|
|
|
266326
266509
|
sdkSubpathReader: () => sdkSubpathReader
|
|
266327
266510
|
});
|
|
266328
266511
|
import { createServer as createServer6 } from "node:http";
|
|
266329
|
-
import { createHash as
|
|
266330
|
-
import { existsSync as existsSync123, readdirSync as readdirSync53, readFileSync as readFileSync145, realpathSync as
|
|
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";
|
|
266331
266514
|
import { join as join155, posix as posix3, relative as relative29, sep as sep31 } from "node:path";
|
|
266332
266515
|
function humanMs(ms2) {
|
|
266333
266516
|
return ms2 < 1e3 ? `${ms2}ms` : `${Math.round(ms2 / 1e3)}s`;
|
|
@@ -266337,7 +266520,7 @@ function collectWorkerSources(tier5SrcDir, bundleName) {
|
|
|
266337
266520
|
const files = {};
|
|
266338
266521
|
const visitedDirs = /* @__PURE__ */ new Set();
|
|
266339
266522
|
const walk6 = (abs, rel2) => {
|
|
266340
|
-
const real =
|
|
266523
|
+
const real = realpathSync19(abs);
|
|
266341
266524
|
if (visitedDirs.has(real)) return;
|
|
266342
266525
|
visitedDirs.add(real);
|
|
266343
266526
|
for (const name of readdirSync53(abs).sort()) {
|
|
@@ -266425,8 +266608,8 @@ function encodeJob(job) {
|
|
|
266425
266608
|
return Buffer.from(JSON.stringify(job), "utf8").toString("base64");
|
|
266426
266609
|
}
|
|
266427
266610
|
function mintToken2(payload, nonce = randomBytes19(16).toString("hex")) {
|
|
266428
|
-
const
|
|
266429
|
-
return `${nonce}.${
|
|
266611
|
+
const digest3 = createHash83("sha256").update(payload, "utf8").digest("base64url");
|
|
266612
|
+
return `${nonce}.${digest3}`;
|
|
266430
266613
|
}
|
|
266431
266614
|
function defaultOpenBrowser(url) {
|
|
266432
266615
|
openUrl2(url);
|
|
@@ -266633,7 +266816,7 @@ __export(shot_files_exports, {
|
|
|
266633
266816
|
pruneStaleShots: () => pruneStaleShots,
|
|
266634
266817
|
writeScreenShot: () => writeScreenShot
|
|
266635
266818
|
});
|
|
266636
|
-
import { createHash as
|
|
266819
|
+
import { createHash as createHash84 } from "node:crypto";
|
|
266637
266820
|
import { mkdirSync as mkdirSync56, readdirSync as readdirSync54, readFileSync as readFileSync147, rmSync as rmSync35, statSync as statSync44 } from "node:fs";
|
|
266638
266821
|
import { basename as basename37, dirname as dirname71, join as join157, relative as relative30, resolve as resolve99, sep as sep32 } from "node:path";
|
|
266639
266822
|
function writeAtomic2(file2, bytes2) {
|
|
@@ -266649,7 +266832,7 @@ function writeAtomic2(file2, bytes2) {
|
|
|
266649
266832
|
}
|
|
266650
266833
|
function writeScreenShot(dir, screenId, base64) {
|
|
266651
266834
|
const bytes2 = Buffer.from(base64, "base64");
|
|
266652
|
-
const hash3 =
|
|
266835
|
+
const hash3 = createHash84("sha256").update(bytes2).digest("hex").slice(0, 16);
|
|
266653
266836
|
const file2 = inside3(join157(dir, RENDERS_DIR), join157(screenId, `${hash3}.png`));
|
|
266654
266837
|
const shot = inside3(join157(dir, SHOTS_DIR), `${screenId}.png`);
|
|
266655
266838
|
if (!file2 || !shot) return null;
|
|
@@ -268296,7 +268479,7 @@ var init_webview_page_driver = __esm({
|
|
|
268296
268479
|
|
|
268297
268480
|
// src/commands/test.ts
|
|
268298
268481
|
import { existsSync as existsSync132, readFileSync as readFileSync154 } from "node:fs";
|
|
268299
|
-
import { createHash as
|
|
268482
|
+
import { createHash as createHash85 } from "node:crypto";
|
|
268300
268483
|
import { join as join165 } from "node:path";
|
|
268301
268484
|
async function liveMapFor(dir) {
|
|
268302
268485
|
if (!boardOpen(dir)) return void 0;
|
|
@@ -268761,7 +268944,7 @@ async function testCommand(ctx) {
|
|
|
268761
268944
|
sourceArchiveHash,
|
|
268762
268945
|
gitDiffHash: attestation.gitDiffHash,
|
|
268763
268946
|
gitUntrackedHash: attestation.gitUntrackedHash,
|
|
268764
|
-
testConfigHash: capturedConfig == null ? "absent" :
|
|
268947
|
+
testConfigHash: capturedConfig == null ? "absent" : createHash85("sha256").update(capturedConfig).digest("hex"),
|
|
268765
268948
|
testRunId: attestation.runId
|
|
268766
268949
|
};
|
|
268767
268950
|
}
|
|
@@ -268916,17 +269099,17 @@ __export(render_cache_exports, {
|
|
|
268916
269099
|
renderCacheKey: () => renderCacheKey
|
|
268917
269100
|
});
|
|
268918
269101
|
import { AsyncLocalStorage as AsyncLocalStorage4 } from "node:async_hooks";
|
|
268919
|
-
import { createHash as
|
|
268920
|
-
import { existsSync as existsSync133, lstatSync as lstatSync36, mkdirSync as mkdirSync59, readdirSync as readdirSync56, readFileSync as readFileSync155, readlinkSync as readlinkSync3, realpathSync as
|
|
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";
|
|
268921
269104
|
import { join as join166, resolve as resolve102 } from "node:path";
|
|
268922
269105
|
import { fileURLToPath as fileURLToPath35 } from "node:url";
|
|
268923
269106
|
function renderCacheKey(contentDir2, inputs) {
|
|
268924
|
-
const hash3 =
|
|
269107
|
+
const hash3 = createHash86("sha256");
|
|
268925
269108
|
hash3.update(JSON.stringify({ v: 1, ...inputs }));
|
|
268926
269109
|
const root = resolve102(contentDir2);
|
|
268927
269110
|
const seen = /* @__PURE__ */ new Set();
|
|
268928
269111
|
const walk6 = (dir, rel2) => {
|
|
268929
|
-
seen.add(
|
|
269112
|
+
seen.add(realpathSync20(dir));
|
|
268930
269113
|
for (const name of readdirSync56(dir).sort()) {
|
|
268931
269114
|
if (SKIPPED_ANYWHERE.has(name) || rel2 === "" && SKIPPED_TOP.has(name)) continue;
|
|
268932
269115
|
const path2 = join166(dir, name);
|
|
@@ -268937,10 +269120,10 @@ function renderCacheKey(contentDir2, inputs) {
|
|
|
268937
269120
|
if (link4) hash3.update(`\0l${relPath}\0${readlinkSync3(path2)}`);
|
|
268938
269121
|
if (!st2) continue;
|
|
268939
269122
|
if (st2.isDirectory()) {
|
|
268940
|
-
if (!link4 || !seen.has(
|
|
268941
|
-
} else if (st2.isFile()) hash3.update(`\0f${relPath}\0`).update(
|
|
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"));
|
|
268942
269125
|
}
|
|
268943
|
-
seen.delete(
|
|
269126
|
+
seen.delete(realpathSync20(dir));
|
|
268944
269127
|
};
|
|
268945
269128
|
walk6(root, "");
|
|
268946
269129
|
return hash3.digest("hex").slice(0, 32);
|
|
@@ -269072,7 +269255,7 @@ var init_render_cache = __esm({
|
|
|
269072
269255
|
SKIPPED_TOP = /* @__PURE__ */ new Set([".himi", "dist", "node_modules", "tests", "android", "ios", "macos", "watchos", ...AGENT_TOOLING_DIRS, ...AGENT_TOOLING_ROOT_FILES]);
|
|
269073
269256
|
SKIPPED_ANYWHERE = /* @__PURE__ */ new Set(["node_modules", ".git"]);
|
|
269074
269257
|
VOLATILE_ENV = /* @__PURE__ */ new Set(["PWD", "OLDPWD", "SHLVL", "_"]);
|
|
269075
|
-
envValueHash = (value2) => typeof value2 === "string" ?
|
|
269258
|
+
envValueHash = (value2) => typeof value2 === "string" ? createHash86("sha256").update(value2).digest("hex") : null;
|
|
269076
269259
|
unrecorded = new AsyncLocalStorage4();
|
|
269077
269260
|
recordingNow = null;
|
|
269078
269261
|
recordingFor = () => unrecorded.getStore() ? null : recordingNow;
|
|
@@ -270626,7 +270809,7 @@ __export(validate_design_exports, {
|
|
|
270626
270809
|
validateDesign: () => validateDesign
|
|
270627
270810
|
});
|
|
270628
270811
|
import { randomBytes as randomBytes21 } from "node:crypto";
|
|
270629
|
-
import { closeSync as closeSync12, constants as constants10, existsSync as existsSync137, lstatSync as lstatSync37, openSync as openSync11, readFileSync as readFileSync160, realpathSync as
|
|
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";
|
|
270630
270813
|
import { dirname as dirname75, isAbsolute as isAbsolute21, join as join171, relative as relative31, resolve as resolve105, sep as sep33, win32 } from "node:path";
|
|
270631
270814
|
import ts36 from "typescript";
|
|
270632
270815
|
function readColorToken(tokens2, name) {
|
|
@@ -270849,7 +271032,7 @@ function writableTokensPath(contentDir2, location) {
|
|
|
270849
271032
|
if (isAbsolute21(location) || win32.isAbsolute(location) || location.split(/[\\/]/).includes("..")) {
|
|
270850
271033
|
throw new Error("--fix requires a token path inside the content directory without traversal.");
|
|
270851
271034
|
}
|
|
270852
|
-
const root =
|
|
271035
|
+
const root = realpathSync21(contentDir2);
|
|
270853
271036
|
const path2 = resolve105(root, location);
|
|
270854
271037
|
const rel2 = relative31(root, path2);
|
|
270855
271038
|
if (!rel2 || rel2 === ".." || rel2.startsWith(`..${sep33}`) || isAbsolute21(rel2)) {
|
|
@@ -270864,7 +271047,7 @@ function writableTokensPath(contentDir2, location) {
|
|
|
270864
271047
|
throw new Error("--fix requires a regular token file under directories without symlinks.");
|
|
270865
271048
|
}
|
|
270866
271049
|
}
|
|
270867
|
-
const real = relative31(root,
|
|
271050
|
+
const real = relative31(root, realpathSync21(path2));
|
|
270868
271051
|
if (!real || real === ".." || real.startsWith(`..${sep33}`) || isAbsolute21(real)) {
|
|
270869
271052
|
throw new Error("--fix cannot write outside the content directory.");
|
|
270870
271053
|
}
|
|
@@ -271061,10 +271244,10 @@ function validateDesign(evidenceDir, contentDir2, options2 = {}) {
|
|
|
271061
271244
|
};
|
|
271062
271245
|
}
|
|
271063
271246
|
function safeEvidencePath(contentDir2, name) {
|
|
271064
|
-
const root =
|
|
271247
|
+
const root = realpathSync21(contentDir2);
|
|
271065
271248
|
const dir = realDirIn(root, ".himi/one-app");
|
|
271066
271249
|
if (!dir) throw new Error("The design evidence directory is not a regular directory.");
|
|
271067
|
-
const real = relative31(root,
|
|
271250
|
+
const real = relative31(root, realpathSync21(dir));
|
|
271068
271251
|
if (!real || real === ".." || real.startsWith(`..${sep33}`) || isAbsolute21(real)) {
|
|
271069
271252
|
throw new Error("The design evidence directory is outside the content directory.");
|
|
271070
271253
|
}
|
|
@@ -271935,7 +272118,7 @@ __export(media_assets_exports, {
|
|
|
271935
272118
|
placeLargeAssetsInMedia: () => placeLargeAssetsInMedia,
|
|
271936
272119
|
withMediaPlacements: () => withMediaPlacements
|
|
271937
272120
|
});
|
|
271938
|
-
import { createHash as
|
|
272121
|
+
import { createHash as createHash87 } from "node:crypto";
|
|
271939
272122
|
function isMediaArchiveName(name) {
|
|
271940
272123
|
return /\.zip$/i.test(name);
|
|
271941
272124
|
}
|
|
@@ -271973,8 +272156,8 @@ async function placeLargeAssetsInMedia(opts) {
|
|
|
271973
272156
|
const fail19 = (code3, error, hint, status2) => ({ ok: false, code: code3, error, sha256: u2.sha256, names: u2.names, ...status2 ? { status: status2 } : {}, hint });
|
|
271974
272157
|
const name = mediaFileName(u2);
|
|
271975
272158
|
const bytes2 = await u2.read();
|
|
271976
|
-
const md53 =
|
|
271977
|
-
if (
|
|
272159
|
+
const md53 = createHash87("md5").update(bytes2).digest("hex");
|
|
272160
|
+
if (createHash87("sha256").update(bytes2).digest("hex") !== u2.sha256) {
|
|
271978
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");
|
|
271979
272162
|
}
|
|
271980
272163
|
const found = await api4("files/search", { search: name, mediaTypes: ["ARCHIVE", "DOCUMENT"] });
|
|
@@ -272211,7 +272394,7 @@ var init_ring_pins = __esm({
|
|
|
272211
272394
|
});
|
|
272212
272395
|
|
|
272213
272396
|
// src/commands/push.ts
|
|
272214
|
-
import { createHash as
|
|
272397
|
+
import { createHash as createHash88 } from "node:crypto";
|
|
272215
272398
|
import { existsSync as existsSync138 } from "node:fs";
|
|
272216
272399
|
import { join as join172, relative as relative32 } from "node:path";
|
|
272217
272400
|
function loopbackTargetWarning(base2, explicitTarget) {
|
|
@@ -272521,7 +272704,7 @@ async function pushCommand(ctx) {
|
|
|
272521
272704
|
try {
|
|
272522
272705
|
const { collectAppSource: collectAppSource2, zipAppSource: zipAppSource2, PUSH_EXCLUDED_ROOTS: PUSH_EXCLUDED_ROOTS2 } = await Promise.resolve().then(() => (init_app_source(), app_source_exports));
|
|
272523
272706
|
const { largeAssetSourcePaths: largeAssetSourcePaths2 } = await Promise.resolve().then(() => (init_app_assets(), app_assets_exports));
|
|
272524
|
-
localSourceHash =
|
|
272707
|
+
localSourceHash = createHash88("sha256").update(zipAppSource2(collectAppSource2(dir, { excludeRoots: PUSH_EXCLUDED_ROOTS2, excludePaths: largeAssetSourcePaths2(dir) }).entries).toString("base64")).digest("hex");
|
|
272525
272708
|
} catch {
|
|
272526
272709
|
}
|
|
272527
272710
|
const staleShared = staleSharedWarnings(report9);
|
|
@@ -273640,7 +273823,7 @@ var init_preview_assets_format = __esm({
|
|
|
273640
273823
|
|
|
273641
273824
|
// src/preview-embed-cache.ts
|
|
273642
273825
|
import { spawnSync as spawnSync12 } from "node:child_process";
|
|
273643
|
-
import { createHash as
|
|
273826
|
+
import { createHash as createHash89 } from "node:crypto";
|
|
273644
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";
|
|
273645
273828
|
import { join as join174 } from "node:path";
|
|
273646
273829
|
import { pathToFileURL as pathToFileURL10 } from "node:url";
|
|
@@ -273668,7 +273851,7 @@ function previewEmbedKey(repoRoot2) {
|
|
|
273668
273851
|
if (ids2.length !== PREVIEW_EMBED_KEY_ROOTS.length) return null;
|
|
273669
273852
|
const webs = appWebTrees(repoRoot2);
|
|
273670
273853
|
if (!webs) return null;
|
|
273671
|
-
return
|
|
273854
|
+
return createHash89("sha256").update([...ids2, ...webs].join("\n")).digest("hex").slice(0, 24);
|
|
273672
273855
|
}
|
|
273673
273856
|
function entriesWithContentTypes(manifest2, lib) {
|
|
273674
273857
|
return lib.manifestEntries(manifest2).map((e2) => {
|
|
@@ -274501,8 +274684,8 @@ function randomToken(byteLength = 32) {
|
|
|
274501
274684
|
}
|
|
274502
274685
|
async function generatePkce() {
|
|
274503
274686
|
const verifier2 = randomToken(32);
|
|
274504
|
-
const
|
|
274505
|
-
return { verifier: verifier2, challenge: base64url(new Uint8Array(
|
|
274687
|
+
const digest3 = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(verifier2));
|
|
274688
|
+
return { verifier: verifier2, challenge: base64url(new Uint8Array(digest3)) };
|
|
274506
274689
|
}
|
|
274507
274690
|
async function hostedAuthUrl(req, visitorToken, fetchImpl = fetch) {
|
|
274508
274691
|
const res = await fetchImpl(`${WIX_API3}${REDIRECT_SESSION_PATH}`, {
|
|
@@ -278458,7 +278641,7 @@ var init_git = __esm({
|
|
|
278458
278641
|
|
|
278459
278642
|
// src/commands/patch.ts
|
|
278460
278643
|
import { readFileSync as readFileSync169, existsSync as existsSync145 } from "node:fs";
|
|
278461
|
-
import { createHash as
|
|
278644
|
+
import { createHash as createHash90 } from "node:crypto";
|
|
278462
278645
|
async function patchCommand(ctx) {
|
|
278463
278646
|
const { io: io2, pos, flags, client: client4, runReleasePatch, patchBlastRadius } = ctx;
|
|
278464
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>]";
|
|
@@ -278611,7 +278794,7 @@ async function patchCommand(ctx) {
|
|
|
278611
278794
|
});
|
|
278612
278795
|
}
|
|
278613
278796
|
const bytes2 = readFileSync169(file2);
|
|
278614
|
-
const sha7 =
|
|
278797
|
+
const sha7 = createHash90("sha256").update(bytes2).digest("hex");
|
|
278615
278798
|
const forScreens = (str3(flags["for-screen"]) ?? "").split(",").map((s5) => s5.trim()).filter(Boolean);
|
|
278616
278799
|
if (flags["no-rebind"] !== void 0 && flags["no-rebind"] !== true) {
|
|
278617
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 }));
|
|
@@ -283261,7 +283444,7 @@ var init_iap_catalog_api = __esm({
|
|
|
283261
283444
|
});
|
|
283262
283445
|
|
|
283263
283446
|
// ../store-release/iap-manifest.ts
|
|
283264
|
-
import { createHash as
|
|
283447
|
+
import { createHash as createHash91 } from "node:crypto";
|
|
283265
283448
|
function readTarget(reader, value2) {
|
|
283266
283449
|
const obj30 = reader.object(value2, "target", TARGET_KEYS);
|
|
283267
283450
|
return {
|
|
@@ -283407,7 +283590,7 @@ function canonicalJson4(value2) {
|
|
|
283407
283590
|
return JSON.stringify(sortKeys(value2));
|
|
283408
283591
|
}
|
|
283409
283592
|
function sha256Digest(value2) {
|
|
283410
|
-
return `sha256:${
|
|
283593
|
+
return `sha256:${createHash91("sha256").update(canonicalJson4(value2)).digest("hex")}`;
|
|
283411
283594
|
}
|
|
283412
283595
|
function manifestDigest(manifest2) {
|
|
283413
283596
|
return sha256Digest(manifest2);
|
|
@@ -283767,7 +283950,7 @@ var init_screenshot_display_types = __esm({
|
|
|
283767
283950
|
});
|
|
283768
283951
|
|
|
283769
283952
|
// ../store-release/iap-review-screenshot.ts
|
|
283770
|
-
import { createHash as
|
|
283953
|
+
import { createHash as createHash92 } from "node:crypto";
|
|
283771
283954
|
import { basename as basename41, resolve as resolve117 } from "node:path";
|
|
283772
283955
|
function pngSize2(bytes2) {
|
|
283773
283956
|
const signed = PNG_SIGNATURE2.every((b3, i2) => bytes2[i2] === b3);
|
|
@@ -283786,7 +283969,7 @@ function readImageSize(bytes2) {
|
|
|
283786
283969
|
return pngSize2(buffer) ?? jpegSize2(buffer);
|
|
283787
283970
|
}
|
|
283788
283971
|
function md5Hex2(bytes2) {
|
|
283789
|
-
return
|
|
283972
|
+
return createHash92("md5").update(bytes2).digest("hex");
|
|
283790
283973
|
}
|
|
283791
283974
|
function isAppStoreScreenshotSize(file2) {
|
|
283792
283975
|
return displayTypeForSize(file2.width, file2.height) !== null;
|
|
@@ -284811,11 +284994,11 @@ var init_credential_profile = __esm({
|
|
|
284811
284994
|
});
|
|
284812
284995
|
|
|
284813
284996
|
// ../store-release/iap-credentials.ts
|
|
284814
|
-
import { createHash as
|
|
284815
|
-
import { existsSync as existsSync150, readFileSync as readFileSync176, realpathSync as
|
|
284997
|
+
import { createHash as createHash93 } from "node:crypto";
|
|
284998
|
+
import { existsSync as existsSync150, readFileSync as readFileSync176, realpathSync as realpathSync22 } from "node:fs";
|
|
284816
284999
|
import { homedir as homedir19 } from "node:os";
|
|
284817
285000
|
function accountFingerprint(keyId, issuerId) {
|
|
284818
|
-
return `sha256:${
|
|
285001
|
+
return `sha256:${createHash93("sha256").update(`${issuerId}:${keyId}`).digest("hex").slice(0, 16)}`;
|
|
284819
285002
|
}
|
|
284820
285003
|
function requireExplicitProfile(profileFlag, target) {
|
|
284821
285004
|
const profile = profileFlag?.trim();
|
|
@@ -284850,7 +285033,7 @@ function resolveIapCredentials(options2) {
|
|
|
284850
285033
|
const { target } = options2;
|
|
284851
285034
|
const home2 = options2.home ?? homedir19();
|
|
284852
285035
|
const readFile26 = options2.readFile ?? ((p2) => readFileSync176(p2, "utf8"));
|
|
284853
|
-
const realpath3 = options2.realpath ??
|
|
285036
|
+
const realpath3 = options2.realpath ?? realpathSync22;
|
|
284854
285037
|
const profile = requireExplicitProfile(options2.profileFlag, target);
|
|
284855
285038
|
const creds = resolveStoreCredentials({
|
|
284856
285039
|
app: target.himiApp,
|
|
@@ -284887,7 +285070,7 @@ var init_iap_credentials = __esm({
|
|
|
284887
285070
|
});
|
|
284888
285071
|
|
|
284889
285072
|
// ../store-release/iap-draft.ts
|
|
284890
|
-
import { createHash as
|
|
285073
|
+
import { createHash as createHash94 } from "node:crypto";
|
|
284891
285074
|
function fit(text32, max) {
|
|
284892
285075
|
const chars = [...text32];
|
|
284893
285076
|
return chars.length <= max ? text32 : `${chars.slice(0, max - 1).join("").trimEnd()}${ELLIPSIS}`;
|
|
@@ -285043,7 +285226,7 @@ var init_iap_draft = __esm({
|
|
|
285043
285226
|
TIER_DESCRIPTION = "Unlocks one item in the app";
|
|
285044
285227
|
ELLIPSIS = "\u2026";
|
|
285045
285228
|
entityKey = (entityType, entityId) => `${entityType}:${entityId}`;
|
|
285046
|
-
sha4 = (text32) =>
|
|
285229
|
+
sha4 = (text32) => createHash94("sha256").update(text32).digest("hex");
|
|
285047
285230
|
ENTITIES3 = { "&": "&", " ": " ", "<": "<", ">": ">", """: '"', "'": "'" };
|
|
285048
285231
|
MAX_SUFFIX = 24;
|
|
285049
285232
|
ReferenceNames = class {
|
|
@@ -286231,7 +286414,7 @@ __export(store_iap_exports, {
|
|
|
286231
286414
|
});
|
|
286232
286415
|
import { execFileSync as execFileSync10 } from "node:child_process";
|
|
286233
286416
|
import { randomUUID as randomUUID17 } from "node:crypto";
|
|
286234
|
-
import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync63, readFileSync as readFileSync179, realpathSync as
|
|
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";
|
|
286235
286418
|
import { homedir as homedir20, hostname as hostname7 } from "node:os";
|
|
286236
286419
|
import { dirname as dirname81, join as join190, resolve as resolve118 } from "node:path";
|
|
286237
286420
|
function scrubDeep(value2, scrub) {
|
|
@@ -286631,7 +286814,7 @@ function readInAppPurchaseKey(flags, deps, creds) {
|
|
|
286631
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}"`);
|
|
286632
286815
|
let privateKey2;
|
|
286633
286816
|
try {
|
|
286634
|
-
assertCredentialOutsideRepo("--iap-key", (deps.realpath ??
|
|
286817
|
+
assertCredentialOutsideRepo("--iap-key", (deps.realpath ?? realpathSync23)(path2));
|
|
286635
286818
|
privateKey2 = readInput2(deps, path2, "In-App Purchase key");
|
|
286636
286819
|
} catch (error) {
|
|
286637
286820
|
throw new KeyError(error.message);
|
|
@@ -287487,7 +287670,7 @@ __export(preflight_app_exports, {
|
|
|
287487
287670
|
readXcconfigVars: () => readXcconfigVars
|
|
287488
287671
|
});
|
|
287489
287672
|
import { readFileSync as readFileSync180, existsSync as existsSync153, readdirSync as readdirSync63, statSync as statSync52 } from "node:fs";
|
|
287490
|
-
import { createHash as
|
|
287673
|
+
import { createHash as createHash95 } from "node:crypto";
|
|
287491
287674
|
import { dirname as dirname82, join as join191 } from "node:path";
|
|
287492
287675
|
function analyze(projectYml, storeConfig, icon, account2, adopted) {
|
|
287493
287676
|
const f2 = [];
|
|
@@ -287886,7 +288069,7 @@ function placeholderHashes2() {
|
|
|
287886
288069
|
const p2 = join191(templateIos, target, "Assets.xcassets", "AppIcon.appiconset", "icon_1024.png");
|
|
287887
288070
|
try {
|
|
287888
288071
|
if (!statSync52(p2).isFile()) continue;
|
|
287889
|
-
return [LEGACY_PLACEHOLDER_SHA2562,
|
|
288072
|
+
return [LEGACY_PLACEHOLDER_SHA2562, createHash95("sha256").update(readFileSync180(p2)).digest("hex")];
|
|
287890
288073
|
} catch {
|
|
287891
288074
|
}
|
|
287892
288075
|
}
|
|
@@ -287923,7 +288106,7 @@ async function appIconState(iosDir) {
|
|
|
287923
288106
|
try {
|
|
287924
288107
|
if (!statSync52(p2).isFile()) continue;
|
|
287925
288108
|
const bytes2 = readFileSync180(p2);
|
|
287926
|
-
const hash3 =
|
|
288109
|
+
const hash3 = createHash95("sha256").update(bytes2).digest("hex");
|
|
287927
288110
|
const pixels = await pixelIssues(bytes2);
|
|
287928
288111
|
return {
|
|
287929
288112
|
exists: true,
|
|
@@ -291948,7 +292131,7 @@ var init_cms2 = __esm({
|
|
|
291948
292131
|
});
|
|
291949
292132
|
|
|
291950
292133
|
// src/data.ts
|
|
291951
|
-
import { createHash as
|
|
292134
|
+
import { createHash as createHash96 } from "node:crypto";
|
|
291952
292135
|
async function planData(options2) {
|
|
291953
292136
|
const kv = [];
|
|
291954
292137
|
for (const spec of options2.data?.kv ?? []) {
|
|
@@ -292013,7 +292196,7 @@ var init_data2 = __esm({
|
|
|
292013
292196
|
url.searchParams.set("site", scope3.siteId);
|
|
292014
292197
|
url.searchParams.set("environment", scope3.environment);
|
|
292015
292198
|
const serialized = body === void 0 ? void 0 : JSON.stringify(body);
|
|
292016
|
-
const idempotencyKey = serialized === void 0 ? void 0 :
|
|
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");
|
|
292017
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 } });
|
|
292018
292201
|
if (response.status === 404 && method === "GET") return { exists: false };
|
|
292019
292202
|
if (!response.ok) throw new Error(`data admin ${method} failed (${response.status}): ${(await response.text()).slice(0, 256)}`);
|
|
@@ -292288,7 +292471,7 @@ var init_site_member = __esm({
|
|
|
292288
292471
|
});
|
|
292289
292472
|
|
|
292290
292473
|
// src/notify-ping-all.ts
|
|
292291
|
-
import { createHash as
|
|
292474
|
+
import { createHash as createHash97 } from "node:crypto";
|
|
292292
292475
|
async function listApprovedMembers(input) {
|
|
292293
292476
|
const first = await scanMembers(input);
|
|
292294
292477
|
const second = await scanMembers(input);
|
|
@@ -292342,7 +292525,7 @@ async function scanMembers(input) {
|
|
|
292342
292525
|
}
|
|
292343
292526
|
}
|
|
292344
292527
|
function campaignRequestId(campaignId, memberId) {
|
|
292345
|
-
const bytes2 =
|
|
292528
|
+
const bytes2 = createHash97("sha256").update(JSON.stringify(["himi-push-campaign", campaignId, memberId])).digest().subarray(0, 16);
|
|
292346
292529
|
bytes2[6] = bytes2[6] & 15 | 80;
|
|
292347
292530
|
bytes2[8] = bytes2[8] & 63 | 128;
|
|
292348
292531
|
const hex2 = bytes2.toString("hex");
|
|
@@ -293945,7 +294128,7 @@ __export(runtime_copy_exports, {
|
|
|
293945
294128
|
renderTs: () => renderTs,
|
|
293946
294129
|
rowId: () => rowId
|
|
293947
294130
|
});
|
|
293948
|
-
import { createHash as
|
|
294131
|
+
import { createHash as createHash98 } from "node:crypto";
|
|
293949
294132
|
import { existsSync as existsSync158, readFileSync as readFileSync190, writeFileSync as writeFileSync70 } from "node:fs";
|
|
293950
294133
|
import { readdirSync as readdirSync64 } from "node:fs";
|
|
293951
294134
|
import { dirname as dirname85, join as join198, relative as relative34, resolve as resolve123 } from "node:path";
|
|
@@ -294016,7 +294199,7 @@ export const RUNTIME_RENDERER_COPY: Readonly<Record<string, string>> = ${JSON.st
|
|
|
294016
294199
|
`;
|
|
294017
294200
|
}
|
|
294018
294201
|
function rowId(key4) {
|
|
294019
|
-
return "n_" +
|
|
294202
|
+
return "n_" + createHash98("sha1").update("runtime-copy:" + key4).digest("hex").slice(0, 12);
|
|
294020
294203
|
}
|
|
294021
294204
|
function injectRuntimeRows(catalog4, table = loadTable()) {
|
|
294022
294205
|
const prior = catalog4.messages ?? {};
|
|
@@ -294103,7 +294286,7 @@ __export(auth_gate_copy_exports, {
|
|
|
294103
294286
|
scanProse: () => scanProse,
|
|
294104
294287
|
scanThrownMessages: () => scanThrownMessages
|
|
294105
294288
|
});
|
|
294106
|
-
import { createHash as
|
|
294289
|
+
import { createHash as createHash99 } from "node:crypto";
|
|
294107
294290
|
import { existsSync as existsSync159, readdirSync as readdirSync65, readFileSync as readFileSync191, writeFileSync as writeFileSync71 } from "node:fs";
|
|
294108
294291
|
import { dirname as dirname86, join as join199, relative as relative35, resolve as resolve124 } from "node:path";
|
|
294109
294292
|
import { fileURLToPath as fileURLToPath42 } from "node:url";
|
|
@@ -294181,7 +294364,7 @@ ${rows}
|
|
|
294181
294364
|
`;
|
|
294182
294365
|
}
|
|
294183
294366
|
function rowId2(key4) {
|
|
294184
|
-
return "n_" +
|
|
294367
|
+
return "n_" + createHash99("sha1").update("auth-gate:" + key4).digest("hex").slice(0, 12);
|
|
294185
294368
|
}
|
|
294186
294369
|
function injectGateRows(catalog4, table = loadTable2()) {
|
|
294187
294370
|
const prior = catalog4.messages ?? {};
|
|
@@ -294229,7 +294412,7 @@ function loadAppTable(appDir3) {
|
|
|
294229
294412
|
return out2;
|
|
294230
294413
|
}
|
|
294231
294414
|
function nativeRowId(key4) {
|
|
294232
|
-
return "n_" +
|
|
294415
|
+
return "n_" + createHash99("sha1").update("app-native:" + key4).digest("hex").slice(0, 12);
|
|
294233
294416
|
}
|
|
294234
294417
|
function injectNativeRows(catalog4, table, keys2) {
|
|
294235
294418
|
const prior = catalog4.messages ?? {};
|
|
@@ -294409,10 +294592,10 @@ var init_auth_gate_copy = __esm({
|
|
|
294409
294592
|
|
|
294410
294593
|
// ../l10n/extract.ts
|
|
294411
294594
|
import { resolve as resolve125, join as join200, relative as relative36, dirname as dirname87 } from "node:path";
|
|
294412
|
-
import { createHash as
|
|
294595
|
+
import { createHash as createHash100 } from "node:crypto";
|
|
294413
294596
|
import { fileURLToPath as fileURLToPath43 } from "node:url";
|
|
294414
294597
|
function keyOf4(source2) {
|
|
294415
|
-
return "h_" +
|
|
294598
|
+
return "h_" + createHash100("sha1").update(source2).digest("hex").slice(0, 12);
|
|
294416
294599
|
}
|
|
294417
294600
|
var ROOT8;
|
|
294418
294601
|
var init_extract = __esm({
|
|
@@ -294706,7 +294889,7 @@ import {
|
|
|
294706
294889
|
openSync as openSync13,
|
|
294707
294890
|
readFileSync as readFileSync192,
|
|
294708
294891
|
readdirSync as readdirSync66,
|
|
294709
|
-
realpathSync as
|
|
294892
|
+
realpathSync as realpathSync24,
|
|
294710
294893
|
renameSync as renameSync26,
|
|
294711
294894
|
rmSync as rmSync47,
|
|
294712
294895
|
statSync as statSync54,
|
|
@@ -294949,8 +295132,8 @@ async function l10nCommand(ctx) {
|
|
|
294949
295132
|
try {
|
|
294950
295133
|
mkdirSync65(join201(appDir3, "l10n"), { recursive: true });
|
|
294951
295134
|
const swapped = unsafeDestination(appDir3, requested);
|
|
294952
|
-
const l10nReal =
|
|
294953
|
-
if (swapped !== void 0 || l10nReal !== join201(
|
|
295135
|
+
const l10nReal = realpathSync24(join201(appDir3, "l10n"));
|
|
295136
|
+
if (swapped !== void 0 || l10nReal !== join201(realpathSync24(appDir3), "l10n")) {
|
|
294954
295137
|
throw new UnsafePath(swapped ?? `${join201(appDir3, "l10n")} resolves outside the app`);
|
|
294955
295138
|
}
|
|
294956
295139
|
for (const tag2 of requested) {
|
|
@@ -295463,7 +295646,7 @@ __export(generate_exports, {
|
|
|
295463
295646
|
withHeader: () => withHeader,
|
|
295464
295647
|
writeGenerated: () => writeGenerated2
|
|
295465
295648
|
});
|
|
295466
|
-
import { createHash as
|
|
295649
|
+
import { createHash as createHash101 } from "node:crypto";
|
|
295467
295650
|
import { existsSync as existsSync162, mkdirSync as mkdirSync66, readdirSync as readdirSync67, readFileSync as readFileSync194, writeFileSync as writeFileSync74 } from "node:fs";
|
|
295468
295651
|
import { dirname as dirname89, join as join203 } from "node:path";
|
|
295469
295652
|
function withHeader(body) {
|
|
@@ -295630,7 +295813,7 @@ var init_generate2 = __esm({
|
|
|
295630
295813
|
GENERATED_HEADER = "// @generated by himi base44 screens \u2014 sha256:";
|
|
295631
295814
|
HEADER_RE = /^\/\/ @generated by himi base44 screens — sha256:([0-9a-f]{64})\n/;
|
|
295632
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"];
|
|
295633
|
-
sha2568 = (s5) =>
|
|
295816
|
+
sha2568 = (s5) => createHash101("sha256").update(s5).digest("hex");
|
|
295634
295817
|
planFile = (p2) => `${p2.ids.bundleDetail}-plan`;
|
|
295635
295818
|
ident = (p2) => `plan_${p2.ids.detail.replace(/^b44_/, "")}`;
|
|
295636
295819
|
json8 = (v2) => JSON.stringify(v2, null, 2);
|
|
@@ -302122,7 +302305,7 @@ var init_one_app_page = __esm({
|
|
|
302122
302305
|
});
|
|
302123
302306
|
|
|
302124
302307
|
// src/one-app/pages.ts
|
|
302125
|
-
import { createHash as
|
|
302308
|
+
import { createHash as createHash102 } from "node:crypto";
|
|
302126
302309
|
function oneAppPagePlacements(raw) {
|
|
302127
302310
|
const sections2 = object14(raw.sections);
|
|
302128
302311
|
const placements = [];
|
|
@@ -302187,7 +302370,7 @@ var init_pages = __esm({
|
|
|
302187
302370
|
init_errors4();
|
|
302188
302371
|
object14 = (v2) => v2 && typeof v2 === "object" && !Array.isArray(v2) ? v2 : {};
|
|
302189
302372
|
pointer2 = (s5) => s5.replaceAll("~", "~0").replaceAll("/", "~1");
|
|
302190
|
-
hash2 = (s5) =>
|
|
302373
|
+
hash2 = (s5) => createHash102("sha256").update(s5).digest("hex");
|
|
302191
302374
|
ONE_APP_PAGES_BASE = "https://apps.wix.com/social-content/api/v1/pages/";
|
|
302192
302375
|
}
|
|
302193
302376
|
});
|
|
@@ -302200,7 +302383,7 @@ __export(collect_exports, {
|
|
|
302200
302383
|
resolveSourceLocale: () => resolveSourceLocale,
|
|
302201
302384
|
sourceMemberChat: () => sourceMemberChat
|
|
302202
302385
|
});
|
|
302203
|
-
import { createHash as
|
|
302386
|
+
import { createHash as createHash103 } from "node:crypto";
|
|
302204
302387
|
function isObject3(value2) {
|
|
302205
302388
|
return value2 !== null && typeof value2 === "object" && !Array.isArray(value2);
|
|
302206
302389
|
}
|
|
@@ -302316,7 +302499,7 @@ function semanticFingerprint(structure) {
|
|
|
302316
302499
|
}
|
|
302317
302500
|
return JSON.stringify(value2);
|
|
302318
302501
|
};
|
|
302319
|
-
return
|
|
302502
|
+
return createHash103("sha256").update(canonical9(structure, true)).digest("hex");
|
|
302320
302503
|
}
|
|
302321
302504
|
async function collectOneApp(input, deps = {}) {
|
|
302322
302505
|
const locale = resolveSourceLocale(input.locale);
|
|
@@ -303349,7 +303532,7 @@ var init_widget_velo = __esm({
|
|
|
303349
303532
|
});
|
|
303350
303533
|
|
|
303351
303534
|
// src/one-app/widget-inspect.ts
|
|
303352
|
-
import { createHash as
|
|
303535
|
+
import { createHash as createHash104 } from "node:crypto";
|
|
303353
303536
|
import { mkdirSync as mkdirSync70, mkdtempSync as mkdtempSync16, rmSync as rmSync52, writeFileSync as writeFileSync81, readFileSync as readFileSync200, renameSync as renameSync27 } from "node:fs";
|
|
303354
303537
|
import { tmpdir as tmpdir17 } from "node:os";
|
|
303355
303538
|
import { join as join212 } from "node:path";
|
|
@@ -304003,7 +304186,7 @@ var init_widget_inspect = __esm({
|
|
|
304003
304186
|
obj26 = (v2) => v2 && typeof v2 === "object" && !Array.isArray(v2) ? v2 : {};
|
|
304004
304187
|
arr5 = (v2) => Array.isArray(v2) ? v2 : [];
|
|
304005
304188
|
str24 = (v2) => typeof v2 === "string" ? v2 : "";
|
|
304006
|
-
sha5 = (v2) =>
|
|
304189
|
+
sha5 = (v2) => createHash104("sha256").update(v2).digest("hex");
|
|
304007
304190
|
INSPECTION_SCHEMA = 1;
|
|
304008
304191
|
VETTED_ASSET_HOSTS = ["static.parastorage.com", "siteassets.parastorage.com", "bundler-velo.parastorage.com", "static.wixstatic.com", "video.wixstatic.com"];
|
|
304009
304192
|
PAGE_BUNDLE_HOST = "bundler-velo.parastorage.com";
|
|
@@ -304044,7 +304227,7 @@ var init_widget_inspect = __esm({
|
|
|
304044
304227
|
});
|
|
304045
304228
|
|
|
304046
304229
|
// src/one-app/widget-tests.ts
|
|
304047
|
-
import { createHash as
|
|
304230
|
+
import { createHash as createHash105 } from "node:crypto";
|
|
304048
304231
|
import { mkdirSync as mkdirSync71, readFileSync as readFileSync201, writeFileSync as writeFileSync82 } from "node:fs";
|
|
304049
304232
|
import { isAbsolute as isAbsolute22, join as join213, relative as relative38, resolve as resolve132 } from "node:path";
|
|
304050
304233
|
function runWidgetTests(options2) {
|
|
@@ -304134,7 +304317,7 @@ var init_widget_tests = __esm({
|
|
|
304134
304317
|
init_widgets_plan();
|
|
304135
304318
|
init_widget_run();
|
|
304136
304319
|
obj27 = (v2) => v2 && typeof v2 === "object" && !Array.isArray(v2) ? v2 : {};
|
|
304137
|
-
sha6 = (v2) =>
|
|
304320
|
+
sha6 = (v2) => createHash105("sha256").update(v2).digest("hex");
|
|
304138
304321
|
}
|
|
304139
304322
|
});
|
|
304140
304323
|
|
|
@@ -304766,8 +304949,8 @@ __export(cli_exports2, {
|
|
|
304766
304949
|
ONE_APP_WORKFLOW: () => ONE_APP_WORKFLOW,
|
|
304767
304950
|
runOneAppCommand: () => runOneAppCommand
|
|
304768
304951
|
});
|
|
304769
|
-
import { closeSync as closeSync15, constants as constants13, lstatSync as lstatSync44, mkdirSync as mkdirSync72, openSync as openSync14, readFileSync as readFileSync204, realpathSync as
|
|
304770
|
-
import { createHash as
|
|
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";
|
|
304771
304954
|
import { isIP as isIP2 } from "node:net";
|
|
304772
304955
|
import { dirname as dirname92, join as join216, parse as parse13, resolve as resolve135 } from "node:path";
|
|
304773
304956
|
function nativeSiteHost(host) {
|
|
@@ -304991,7 +305174,7 @@ validate-payments checks site-bound payment evidence and explicit paid-flow deci
|
|
|
304991
305174
|
throw new OneAppError("artifact_write_failed", "Could not save the migration evidence. Existing files were kept.", { stage });
|
|
304992
305175
|
}
|
|
304993
305176
|
artifacts[name] = path2;
|
|
304994
|
-
hashes[name] =
|
|
305177
|
+
hashes[name] = createHash106("sha256").update(content).digest("hex");
|
|
304995
305178
|
return path2;
|
|
304996
305179
|
};
|
|
304997
305180
|
const progress = (nextStage) => {
|
|
@@ -305019,7 +305202,7 @@ validate-payments checks site-bound payment evidence and explicit paid-flow deci
|
|
|
305019
305202
|
mkdirSync72(options2.parentDir, { recursive: true, mode: 448 });
|
|
305020
305203
|
assertSafeParents(options2.parentDir);
|
|
305021
305204
|
mkdirSync72(options2.workspace, { mode: 448 });
|
|
305022
|
-
if (
|
|
305205
|
+
if (realpathSync25(options2.workspace) !== options2.workspace) throw new Error("destination changed");
|
|
305023
305206
|
evidenceDir = join216(options2.workspace, ".himi", "one-app");
|
|
305024
305207
|
mkdirSync72(evidenceDir, { recursive: true, mode: 448 });
|
|
305025
305208
|
} catch (error) {
|
|
@@ -307293,7 +307476,7 @@ var init_customer_build = __esm({
|
|
|
307293
307476
|
});
|
|
307294
307477
|
|
|
307295
307478
|
// src/site-analyze/apply.ts
|
|
307296
|
-
import { existsSync as existsSync174, readFileSync as readFileSync206, writeFileSync as writeFileSync84, copyFileSync as copyFileSync5, mkdirSync as mkdirSync73, realpathSync as
|
|
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";
|
|
307297
307480
|
import { dirname as dirname93, isAbsolute as isAbsolute23, join as join218, resolve as resolve136, sep as sep36 } from "node:path";
|
|
307298
307481
|
import { spawnSync as spawnSync15 } from "node:child_process";
|
|
307299
307482
|
function inRepoBakeRefusal(repoRoot2, shell) {
|
|
@@ -307646,8 +307829,8 @@ function buildMergedContract(options2) {
|
|
|
307646
307829
|
let real;
|
|
307647
307830
|
let realRoot;
|
|
307648
307831
|
try {
|
|
307649
|
-
real =
|
|
307650
|
-
realRoot =
|
|
307832
|
+
real = realpathSync26(from);
|
|
307833
|
+
realRoot = realpathSync26(packageDir);
|
|
307651
307834
|
} catch {
|
|
307652
307835
|
return void 0;
|
|
307653
307836
|
}
|
|
@@ -310210,7 +310393,7 @@ __export(check_report_exports, {
|
|
|
310210
310393
|
sendCheckResult: () => sendCheckResult,
|
|
310211
310394
|
takeCheckReportTarget: () => takeCheckReportTarget
|
|
310212
310395
|
});
|
|
310213
|
-
import { createHash as
|
|
310396
|
+
import { createHash as createHash107, randomUUID as randomUUID20 } from "node:crypto";
|
|
310214
310397
|
import { request as httpRequest2 } from "node:http";
|
|
310215
310398
|
import { createConnection } from "node:net";
|
|
310216
310399
|
import { isAbsolute as isAbsolute24, relative as relative39, resolve as resolve138 } from "node:path";
|
|
@@ -310382,7 +310565,7 @@ function errorFindings(run4, mode) {
|
|
|
310382
310565
|
if (mode === "functions") {
|
|
310383
310566
|
return envelope.functions.map(record6).filter((f2) => f2.ok === false).map((f2) => ({
|
|
310384
310567
|
// Stable per function, in the HimiReport id alphabet: the name may hold anything.
|
|
310385
|
-
id: `test:functions:${
|
|
310568
|
+
id: `test:functions:${createHash107("sha256").update(text31(f2.name) ?? "").digest("hex").slice(0, 12)}`,
|
|
310386
310569
|
severity: "error",
|
|
310387
310570
|
message: `function "${text31(f2.name) ?? "?"}" (${text31(f2.method) ?? "?"} ${text31(f2.path) ?? "?"}) answered HTTP ${String(f2.status)}`
|
|
310388
310571
|
}));
|
|
@@ -311676,7 +311859,7 @@ __export(fidelity_exports, {
|
|
|
311676
311859
|
himalayaRepoRoot: () => himalayaRepoRoot
|
|
311677
311860
|
});
|
|
311678
311861
|
import { execFileSync as execFileSync12 } from "node:child_process";
|
|
311679
|
-
import { existsSync as existsSync180, realpathSync as
|
|
311862
|
+
import { existsSync as existsSync180, realpathSync as realpathSync27 } from "node:fs";
|
|
311680
311863
|
import { join as join226, relative as relative40, sep as sep37 } from "node:path";
|
|
311681
311864
|
function himalayaRepoRoot(dir) {
|
|
311682
311865
|
let top;
|
|
@@ -311686,7 +311869,7 @@ function himalayaRepoRoot(dir) {
|
|
|
311686
311869
|
return null;
|
|
311687
311870
|
}
|
|
311688
311871
|
if (!existsSync180(join226(top, "tools/judges/fidelity/JUDGE.md"))) return null;
|
|
311689
|
-
const rel2 = relative40(
|
|
311872
|
+
const rel2 = relative40(realpathSync27(top), realpathSync27(dir));
|
|
311690
311873
|
return rel2.startsWith(`..${sep37}`) || rel2 === ".." ? null : top;
|
|
311691
311874
|
}
|
|
311692
311875
|
function fidelityEnvelope(report9) {
|