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