@wix/himalaya-cli 0.1812.0 → 0.1813.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/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/state/src/index.d.ts
CHANGED
|
@@ -288,7 +288,8 @@ export type AppServiceErrorCode = "not_booted" | "unavailable" | "no_service" |
|
|
|
288
288
|
/**
|
|
289
289
|
* The rejection `app.read` / `app.dispatch` produce: an `Error` named `AppServiceError` with a
|
|
290
290
|
* `code`. Never a null result — "nothing ran" always rejects. A plain `Error` rather than a
|
|
291
|
-
* subclass,
|
|
291
|
+
* subclass, so a bundle that opts into the Hermes-safe profile (`HERMES_SAFE_BUNDLES`, build-lib.mjs:
|
|
292
|
+
* no `class` syntax) can still import the SDK.
|
|
292
293
|
*/
|
|
293
294
|
export type AppServiceError = Error & {
|
|
294
295
|
readonly code: AppServiceErrorCode;
|
package/dist/cli.mjs
CHANGED
|
@@ -4411,7 +4411,6 @@ var init_himi_package = __esm({
|
|
|
4411
4411
|
var ICON_VIEW_BOX, ICON_STROKE_WIDTH, ICON_FALLBACK, ICON_CATALOG, ICON_NORMALIZED_INDEX, ICON_NAMES;
|
|
4412
4412
|
var init_icon_catalog_generated = __esm({
|
|
4413
4413
|
"../../core/ts/src/icon-catalog.generated.ts"() {
|
|
4414
|
-
"use strict";
|
|
4415
4414
|
init_define_HHP_CATALOG();
|
|
4416
4415
|
ICON_VIEW_BOX = 24;
|
|
4417
4416
|
ICON_STROKE_WIDTH = 2;
|
|
@@ -14232,9 +14231,8 @@ __export(build_lib_exports, {
|
|
|
14232
14231
|
CONTAINED_CONFIG_SERVICE: () => CONTAINED_CONFIG_SERVICE,
|
|
14233
14232
|
CONTAINED_DEV_MODULE_ACTION: () => CONTAINED_DEV_MODULE_ACTION,
|
|
14234
14233
|
CONTAINED_DEV_MODULE_SERVICE: () => CONTAINED_DEV_MODULE_SERVICE,
|
|
14234
|
+
HERMES_SAFE_BUNDLES: () => HERMES_SAFE_BUNDLES,
|
|
14235
14235
|
HERMES_SAFE_SUPPORTED: () => HERMES_SAFE_SUPPORTED,
|
|
14236
|
-
HERMES_UNSAFE_APP_BUNDLES: () => HERMES_UNSAFE_APP_BUNDLES,
|
|
14237
|
-
HERMES_UNSAFE_BUNDLES: () => HERMES_UNSAFE_BUNDLES,
|
|
14238
14236
|
OUT_DIR: () => OUT_DIR,
|
|
14239
14237
|
SRC_DIR: () => SRC_DIR,
|
|
14240
14238
|
alias: () => alias,
|
|
@@ -14245,6 +14243,7 @@ __export(build_lib_exports, {
|
|
|
14245
14243
|
buildContainedAppConfig: () => buildContainedAppConfig,
|
|
14246
14244
|
buildContainedDevModule: () => buildContainedDevModule,
|
|
14247
14245
|
bundleBuildOptions: () => bundleBuildOptions,
|
|
14246
|
+
bundleResolution: () => bundleResolution,
|
|
14248
14247
|
confinementMatcher: () => confinementMatcher,
|
|
14249
14248
|
confinementPlugin: () => confinementPlugin,
|
|
14250
14249
|
confinementRoots: () => confinementRoots,
|
|
@@ -14260,7 +14259,7 @@ __export(build_lib_exports, {
|
|
|
14260
14259
|
umbrellaRewritePlugin: () => umbrellaRewritePlugin
|
|
14261
14260
|
});
|
|
14262
14261
|
import { fileURLToPath as fileURLToPath8, pathToFileURL } from "node:url";
|
|
14263
|
-
import { basename as basename4, dirname as dirname12, join as join13, resolve as resolve10, sep as sep6 } from "node:path";
|
|
14262
|
+
import { basename as basename4, dirname as dirname12, isAbsolute as isAbsolute2, join as join13, resolve as resolve10, sep as sep6 } from "node:path";
|
|
14264
14263
|
import { readdirSync as readdirSync8, existsSync as existsSync12, mkdirSync as mkdirSync9, readFileSync as readFileSync13, realpathSync as realpathSync3, statSync as statSync3, writeFileSync as writeFileSync9 } from "node:fs";
|
|
14265
14264
|
async function loadCompiler() {
|
|
14266
14265
|
try {
|
|
@@ -14288,7 +14287,13 @@ function transform(input, opts) {
|
|
|
14288
14287
|
return compiler().then((c2) => c2.transform(input, opts));
|
|
14289
14288
|
}
|
|
14290
14289
|
function supportedFor(name) {
|
|
14291
|
-
return
|
|
14290
|
+
return HERMES_SAFE_BUNDLES.has(name) ? HERMES_SAFE_SUPPORTED : void 0;
|
|
14291
|
+
}
|
|
14292
|
+
function bundleResolution() {
|
|
14293
|
+
return {
|
|
14294
|
+
platform: _confinementRequired && !_trustedDependenciesOnly ? "neutral" : "browser",
|
|
14295
|
+
define: { "process.env.NODE_ENV": '"production"' }
|
|
14296
|
+
};
|
|
14292
14297
|
}
|
|
14293
14298
|
function isOffRepo() {
|
|
14294
14299
|
if (process.env.HIMI_OFF_REPO === "1") return true;
|
|
@@ -14409,6 +14414,7 @@ function confinementPlugin(contentRoot2) {
|
|
|
14409
14414
|
});
|
|
14410
14415
|
b3.onLoad({ filter: /.*/ }, (args) => {
|
|
14411
14416
|
if (args.namespace && args.namespace !== "file") return void 0;
|
|
14417
|
+
if (args.namespace === "" && !isAbsolute2(args.path)) return void 0;
|
|
14412
14418
|
if (allows(args.path)) return void 0;
|
|
14413
14419
|
return {
|
|
14414
14420
|
errors: [{
|
|
@@ -14647,8 +14653,8 @@ function bundleBuildOptions(name, outfile, resolution = "source") {
|
|
|
14647
14653
|
bundle: true,
|
|
14648
14654
|
format: "iife",
|
|
14649
14655
|
target: ["es2020"],
|
|
14650
|
-
platform: "neutral",
|
|
14651
14656
|
minify: false,
|
|
14657
|
+
...bundleResolution(),
|
|
14652
14658
|
supported: supportedFor(name),
|
|
14653
14659
|
absWorkingDir: REPO_ROOT2,
|
|
14654
14660
|
banner: { js: `// @himalaya tier5 bundle: ${name}` },
|
|
@@ -14708,8 +14714,8 @@ async function buildBundleFromEntry(entry, outfile, opts = {}) {
|
|
|
14708
14714
|
bundle: true,
|
|
14709
14715
|
format: "iife",
|
|
14710
14716
|
target: ["es2020"],
|
|
14711
|
-
platform: "neutral",
|
|
14712
14717
|
minify: false,
|
|
14718
|
+
...bundleResolution(),
|
|
14713
14719
|
supported: supportedFor(name),
|
|
14714
14720
|
absWorkingDir,
|
|
14715
14721
|
banner: { js: `// @himalaya tier5 bundle: ${name}` },
|
|
@@ -14863,7 +14869,7 @@ globalThis.__himiInstallDevBridge(__himiDevModule);
|
|
|
14863
14869
|
if (!out2) throw new Error(`the contained dev-module bundle produced no output: ${entry}`);
|
|
14864
14870
|
return out2.text;
|
|
14865
14871
|
}
|
|
14866
|
-
var _compilerP, __dirname, REPO_ROOT2, SDK, alias, sourceAliases, SRC_DIR, OUT_DIR, HERMES_SAFE_SUPPORTED,
|
|
14872
|
+
var _compilerP, __dirname, REPO_ROOT2, SDK, alias, sourceAliases, SRC_DIR, OUT_DIR, HERMES_SAFE_SUPPORTED, HERMES_SAFE_BUNDLES, _confinementRequired, _trustedDependenciesOnly, APP_ENTRY_TARGET, CONTAINED_CONFIG_SERVICE, CONTAINED_DEV_MODULE_SERVICE, CONTAINED_DEV_MODULE_ACTION, containedDevBridgeBanner;
|
|
14867
14873
|
var init_build_lib = __esm({
|
|
14868
14874
|
"../../core/dev-server/tier5-bundles-src/build-lib.mjs"() {
|
|
14869
14875
|
"use strict";
|
|
@@ -15053,22 +15059,7 @@ var init_build_lib = __esm({
|
|
|
15053
15059
|
SRC_DIR = __dirname;
|
|
15054
15060
|
OUT_DIR = resolve10(REPO_ROOT2, "core/dev-server/tier5-bundles");
|
|
15055
15061
|
HERMES_SAFE_SUPPORTED = { arrow: false, class: false };
|
|
15056
|
-
|
|
15057
|
-
// worker-safe wix-auth showcase pulls ~11 classes from stdlib/auth-providers.
|
|
15058
|
-
"demo-app-wix-platform"
|
|
15059
|
-
]);
|
|
15060
|
-
HERMES_UNSAFE_APP_BUNDLES = /* @__PURE__ */ new Set([
|
|
15061
|
-
// #4680: Nano's widget host validates with the contract's zod 3 schemas (classes); Nano never runs on RN.
|
|
15062
|
-
"nano-sdk-smoke",
|
|
15063
|
-
// #4687: the Viewer installs the same widget host; the Shared widget calls nano-api, whose
|
|
15064
|
-
// `NanoApiError` is a class.
|
|
15065
|
-
"nano-viewer",
|
|
15066
|
-
"nano-shared-widget",
|
|
15067
|
-
// #4685: widget Edit hosts the same widget host as the Viewer.
|
|
15068
|
-
"nano-edit",
|
|
15069
|
-
// #4692: the Explore pager installs the same widget host as the Viewer, once per page.
|
|
15070
|
-
"nano-explore-pager"
|
|
15071
|
-
]);
|
|
15062
|
+
HERMES_SAFE_BUNDLES = /* @__PURE__ */ new Set([]);
|
|
15072
15063
|
_confinementRequired = false;
|
|
15073
15064
|
_trustedDependenciesOnly = false;
|
|
15074
15065
|
APP_ENTRY_TARGET = ["node18"];
|
|
@@ -23631,7 +23622,7 @@ function findSkipDerive(bundleJs) {
|
|
|
23631
23622
|
for (const dv of derives) for (const f2 of dv.inputs) if (!outputUnion.has(f2)) baseInputs.add(f2);
|
|
23632
23623
|
if (baseInputs.size === 0 || outputUnion.size === 0) return [];
|
|
23633
23624
|
const findings = [];
|
|
23634
|
-
const retRe = /return\s*\{/g;
|
|
23625
|
+
const retRe = /(?:return\s*|=>\s*\(\s*)\{/g;
|
|
23635
23626
|
let r3;
|
|
23636
23627
|
while (r3 = retRe.exec(bundleJs)) {
|
|
23637
23628
|
const braceOpen = bundleJs.indexOf("{", r3.index + r3[0].length - 1);
|
|
@@ -28266,7 +28257,7 @@ var init_contained_dev_module = __esm({
|
|
|
28266
28257
|
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
28267
28258
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
28268
28259
|
import { existsSync as existsSync17, lstatSync as lstatSync10, mkdirSync as mkdirSync10, readFileSync as readFileSync17, readdirSync as readdirSync12, renameSync as renameSync5, rmSync as rmSync5, rmdirSync as rmdirSync2, statSync as statSync5, writeFileSync as writeFileSync10 } from "node:fs";
|
|
28269
|
-
import { dirname as dirname13, isAbsolute as
|
|
28260
|
+
import { dirname as dirname13, isAbsolute as isAbsolute3, join as join15, relative as relative5, resolve as resolve16, sep as sep9 } from "node:path";
|
|
28270
28261
|
import { fileURLToPath as fileURLToPath11 } from "node:url";
|
|
28271
28262
|
function generationBase(outRoot) {
|
|
28272
28263
|
const out2 = resolve16(outRoot);
|
|
@@ -28291,7 +28282,7 @@ function isLink(path2) {
|
|
|
28291
28282
|
function replaceLinkedRoot(path2, root = REPO2) {
|
|
28292
28283
|
const out2 = resolve16(path2);
|
|
28293
28284
|
const rel2 = relative5(root, out2);
|
|
28294
|
-
const outside = rel2 === ".." || rel2.startsWith(`..${sep9}`) ||
|
|
28285
|
+
const outside = rel2 === ".." || rel2.startsWith(`..${sep9}`) || isAbsolute3(rel2);
|
|
28295
28286
|
if (!outside && rel2.split(sep9)[0] !== "node_modules") {
|
|
28296
28287
|
for (let dir = dirname13(out2); dir !== root; dir = dirname13(dir)) {
|
|
28297
28288
|
if (isLink(dir)) throw new Error(`${relative5(root, dir)} is a symlink: refusing to generate ${rel2} through it`);
|
|
@@ -40591,6 +40582,7 @@ function resolveIdiom(tokens2, ctx = {}) {
|
|
|
40591
40582
|
var IDIOM_CONTEXTS, UNSAFE_KEYS;
|
|
40592
40583
|
var init_idiom = __esm({
|
|
40593
40584
|
"../../core/ts/src/idiom.ts"() {
|
|
40585
|
+
"use strict";
|
|
40594
40586
|
init_define_HHP_CATALOG();
|
|
40595
40587
|
IDIOM_CONTEXTS = {
|
|
40596
40588
|
ios: { native: ["ios"] },
|
|
@@ -152281,7 +152273,7 @@ var init_wix_placeholders = __esm({
|
|
|
152281
152273
|
|
|
152282
152274
|
// ../release-build/pinned-language.ts
|
|
152283
152275
|
import { existsSync as existsSync42, readFileSync as readFileSync45 } from "node:fs";
|
|
152284
|
-
import { join as join37, relative as relative9, isAbsolute as
|
|
152276
|
+
import { join as join37, relative as relative9, isAbsolute as isAbsolute4 } from "node:path";
|
|
152285
152277
|
function pinsSingleLanguage(locale) {
|
|
152286
152278
|
const tag = locale?.default;
|
|
152287
152279
|
if (!tag || tag === "en" || !locale?.pin) return false;
|
|
@@ -152293,7 +152285,7 @@ function pinnedLanguageSwap(locale, appDir3) {
|
|
|
152293
152285
|
const directory = join37(appDir3, "l10n");
|
|
152294
152286
|
const path2 = join37(directory, `${locale.default}.json`);
|
|
152295
152287
|
const outside = relative9(directory, path2);
|
|
152296
|
-
if (outside.startsWith("..") ||
|
|
152288
|
+
if (outside.startsWith("..") || isAbsolute4(outside)) return void 0;
|
|
152297
152289
|
const map2 = existsSync42(path2) ? sourceMap(parseCatalog(readFileSync45(path2, "utf8"))) : /* @__PURE__ */ new Map();
|
|
152298
152290
|
return (descriptor, workerSource) => {
|
|
152299
152291
|
translateWith(descriptor, map2);
|
|
@@ -162555,10 +162547,10 @@ __export(preflight_exports, {
|
|
|
162555
162547
|
requireEnv: () => requireEnv
|
|
162556
162548
|
});
|
|
162557
162549
|
import { existsSync as existsSync51, readFileSync as readFileSync54 } from "node:fs";
|
|
162558
|
-
import { isAbsolute as
|
|
162550
|
+
import { isAbsolute as isAbsolute5, relative as relative11, resolve as resolve41 } from "node:path";
|
|
162559
162551
|
function isInsideRepo(p2) {
|
|
162560
162552
|
const rel2 = relative11(REPO_ROOT, resolve41(p2));
|
|
162561
|
-
return rel2 !== "" && !rel2.startsWith("..") && !
|
|
162553
|
+
return rel2 !== "" && !rel2.startsWith("..") && !isAbsolute5(rel2);
|
|
162562
162554
|
}
|
|
162563
162555
|
function assertCredentialOutsideRepo(label4, p2) {
|
|
162564
162556
|
if (isInsideRepo(p2)) {
|
|
@@ -169692,7 +169684,7 @@ __export(signing_inspect_exports, {
|
|
|
169692
169684
|
runSigningInspect: () => runSigningInspect
|
|
169693
169685
|
});
|
|
169694
169686
|
import { existsSync as existsSync53, readFileSync as readFileSync56, statSync as statSync14 } from "node:fs";
|
|
169695
|
-
import { isAbsolute as
|
|
169687
|
+
import { isAbsolute as isAbsolute6, resolve as resolve43 } from "node:path";
|
|
169696
169688
|
function fail5(io2, code2, fields2 = {}) {
|
|
169697
169689
|
io2.error(JSON.stringify({ ok: false, code: code2, ...fields2 }));
|
|
169698
169690
|
return code2.endsWith("_required") || code2.endsWith("_usage") ? 2 : 1;
|
|
@@ -169748,7 +169740,7 @@ async function runSigningInspect(pos, flags, io2, deps = {}) {
|
|
|
169748
169740
|
hint: "Pass --bundle-id --team-id and ASC key flags, or set ASC_KEY_PATH / ASC_KEY_ID / ASC_ISSUER_ID."
|
|
169749
169741
|
});
|
|
169750
169742
|
}
|
|
169751
|
-
const resolvedKey =
|
|
169743
|
+
const resolvedKey = isAbsolute6(keyFile) ? keyFile : resolve43(process.cwd(), keyFile);
|
|
169752
169744
|
try {
|
|
169753
169745
|
assertCredentialOutsideRepo("asc-key-file", resolvedKey);
|
|
169754
169746
|
} catch (error) {
|
|
@@ -169773,8 +169765,8 @@ async function runSigningInspect(pos, flags, io2, deps = {}) {
|
|
|
169773
169765
|
error: "local asset check needs --cert-file, --cert-password, and --profile-file together"
|
|
169774
169766
|
});
|
|
169775
169767
|
}
|
|
169776
|
-
const certPath =
|
|
169777
|
-
const profilePath2 =
|
|
169768
|
+
const certPath = isAbsolute6(certFile) ? certFile : resolve43(process.cwd(), certFile);
|
|
169769
|
+
const profilePath2 = isAbsolute6(profileFile) ? profileFile : resolve43(process.cwd(), profileFile);
|
|
169778
169770
|
try {
|
|
169779
169771
|
assertCredentialOutsideRepo("cert-file", certPath);
|
|
169780
169772
|
assertCredentialOutsideRepo("profile-file", profilePath2);
|
|
@@ -172815,7 +172807,7 @@ __export(spec_exports, {
|
|
|
172815
172807
|
siteUrlOf: () => siteUrlOf
|
|
172816
172808
|
});
|
|
172817
172809
|
import { existsSync as existsSync56, readFileSync as readFileSync60 } from "node:fs";
|
|
172818
|
-
import { dirname as dirname34, isAbsolute as
|
|
172810
|
+
import { dirname as dirname34, isAbsolute as isAbsolute7, resolve as resolve44 } from "node:path";
|
|
172819
172811
|
function invalid(message5) {
|
|
172820
172812
|
throw new FromUrlError("app_spec_invalid", `app spec: ${message5}`);
|
|
172821
172813
|
}
|
|
@@ -172869,7 +172861,7 @@ function parseAppSpec(raw, specDir = process.cwd()) {
|
|
|
172869
172861
|
if (!icon.startsWith("https://")) invalid(`icon must be a local file or an https URL, got ${JSON.stringify(icon)}`);
|
|
172870
172862
|
spec.icon = icon;
|
|
172871
172863
|
} else {
|
|
172872
|
-
const path2 =
|
|
172864
|
+
const path2 = isAbsolute7(icon) ? icon : resolve44(specDir, icon);
|
|
172873
172865
|
if (!existsSync56(path2)) invalid(`icon file not found: ${path2}`);
|
|
172874
172866
|
spec.icon = path2;
|
|
172875
172867
|
}
|
|
@@ -179894,7 +179886,7 @@ import { createHash as createHash34, randomUUID as randomUUID10 } from "node:cry
|
|
|
179894
179886
|
import { spawn as spawn4 } from "node:child_process";
|
|
179895
179887
|
import { closeSync as closeSync6, existsSync as existsSync65, lstatSync as lstatSync24, readFileSync as readFileSync72, statSync as statSync20 } from "node:fs";
|
|
179896
179888
|
import { createServer as createServer3 } from "node:net";
|
|
179897
|
-
import { basename as basename18, dirname as dirname39, isAbsolute as
|
|
179889
|
+
import { basename as basename18, dirname as dirname39, isAbsolute as isAbsolute8, join as join61, relative as relative14, resolve as resolve50, sep as sep20 } from "node:path";
|
|
179898
179890
|
function homeShotPath(dir, home2) {
|
|
179899
179891
|
const root = resolve50(dir);
|
|
179900
179892
|
const base2 = resolve50(root, ".himi", "shots");
|
|
@@ -179910,7 +179902,7 @@ function homeShotPath(dir, home2) {
|
|
|
179910
179902
|
}
|
|
179911
179903
|
function displayPath(p2, cwd = process.cwd()) {
|
|
179912
179904
|
const rel2 = relative14(cwd, p2);
|
|
179913
|
-
return rel2 && !rel2.startsWith("..") && !
|
|
179905
|
+
return rel2 && !rel2.startsWith("..") && !isAbsolute8(rel2) ? rel2 : p2;
|
|
179914
179906
|
}
|
|
179915
179907
|
function progressCommand(opts) {
|
|
179916
179908
|
return `himi progress "<${opts.what}>"${opts.step ? ` --step ${opts.step}` : ""}${opts.image ? ` --image ${shellQuote2(opts.image)}` : ""}${contentArg(opts.content)}`;
|
|
@@ -180051,7 +180043,7 @@ async function openBoardForSession(dir, cwd = process.cwd()) {
|
|
|
180051
180043
|
const { openStudio: openStudio2 } = await Promise.resolve().then(() => (init_studio(), studio_exports));
|
|
180052
180044
|
const { page, url } = openStudio2(dir);
|
|
180053
180045
|
const rel2 = relative14(cwd, page);
|
|
180054
|
-
return { page: rel2 && !rel2.startsWith("..") && !
|
|
180046
|
+
return { page: rel2 && !rel2.startsWith("..") && !isAbsolute8(rel2) ? rel2 : page, url, opened: false };
|
|
180055
180047
|
} catch (e2) {
|
|
180056
180048
|
return { opened: false, error: `the build board was not created: ${e2.message} \u2014 \`himi studio --no-open\` in the app retries it` };
|
|
180057
180049
|
}
|
|
@@ -186890,16 +186882,16 @@ var init_prebuild = __esm({
|
|
|
186890
186882
|
import { execFileSync as execFileSync4 } from "node:child_process";
|
|
186891
186883
|
import { existsSync as existsSync77, mkdtempSync as mkdtempSync3, readFileSync as readFileSync84, rmSync as rmSync21, writeFileSync as writeFileSync31 } from "node:fs";
|
|
186892
186884
|
import { tmpdir as tmpdir4 } from "node:os";
|
|
186893
|
-
import { isAbsolute as
|
|
186885
|
+
import { isAbsolute as isAbsolute9, join as join75, relative as relative16, resolve as resolve54, sep as sep22 } from "node:path";
|
|
186894
186886
|
function carrierGeneratedRoot(root, carrierInstallDir) {
|
|
186895
186887
|
return resolve54(root, carrierInstallDir, "generated");
|
|
186896
186888
|
}
|
|
186897
186889
|
function isInside(dir, target) {
|
|
186898
186890
|
const rel2 = relative16(dir, target);
|
|
186899
|
-
return rel2 !== "" && rel2 !== ".." && !rel2.startsWith(`..${sep22}`) && !
|
|
186891
|
+
return rel2 !== "" && rel2 !== ".." && !rel2.startsWith(`..${sep22}`) && !isAbsolute9(rel2);
|
|
186900
186892
|
}
|
|
186901
186893
|
function carrierPathProblem(dir, from, root, carrierInstallDir) {
|
|
186902
|
-
if (
|
|
186894
|
+
if (isAbsolute9(dir)) return "is absolute";
|
|
186903
186895
|
if (!`/${dir}`.includes(CARRIER_GENERATED_SEGMENT)) return `is not under ${CARRIER_GENERATED_SEGMENT.slice(1)}`;
|
|
186904
186896
|
const generated = carrierGeneratedRoot(root, carrierInstallDir);
|
|
186905
186897
|
if (!isInside(generated, resolve54(from, dir))) return `resolves outside the installed carrier (${relative16(root, generated)})`;
|
|
@@ -192725,7 +192717,7 @@ var init_policy = __esm({
|
|
|
192725
192717
|
// ../pre-pr-review/scope.mjs
|
|
192726
192718
|
import { execFileSync as execFileSync6 } from "node:child_process";
|
|
192727
192719
|
import { createHash as createHash37 } from "node:crypto";
|
|
192728
|
-
import { resolve as resolve62, dirname as dirname50, isAbsolute as
|
|
192720
|
+
import { resolve as resolve62, dirname as dirname50, isAbsolute as isAbsolute10, join as join88 } from "node:path";
|
|
192729
192721
|
import { fileURLToPath as fileURLToPath32 } from "node:url";
|
|
192730
192722
|
function resolveRepoRoot2(cwd = process.cwd()) {
|
|
192731
192723
|
let top;
|
|
@@ -193638,7 +193630,7 @@ var init_attestation = __esm({
|
|
|
193638
193630
|
|
|
193639
193631
|
// src/ux-evidence.ts
|
|
193640
193632
|
import { existsSync as existsSync91, mkdirSync as mkdirSync40, readFileSync as readFileSync100, writeFileSync as writeFileSync40 } from "node:fs";
|
|
193641
|
-
import { dirname as dirname52, isAbsolute as
|
|
193633
|
+
import { dirname as dirname52, isAbsolute as isAbsolute11, join as join92, relative as relative19, resolve as resolve65 } from "node:path";
|
|
193642
193634
|
function isNativePlatform(value2) {
|
|
193643
193635
|
return typeof value2 === "string" && NATIVE_PLATFORMS.includes(value2);
|
|
193644
193636
|
}
|
|
@@ -193687,7 +193679,7 @@ function writeEvidence(path2, evidence) {
|
|
|
193687
193679
|
}
|
|
193688
193680
|
function recordedFilePath(dir, file2) {
|
|
193689
193681
|
const rel2 = relative19(dir, resolve65(file2));
|
|
193690
|
-
return rel2 && !rel2.startsWith("..") && !
|
|
193682
|
+
return rel2 && !rel2.startsWith("..") && !isAbsolute11(rel2) ? rel2 : file2;
|
|
193691
193683
|
}
|
|
193692
193684
|
function recordRenderWidth(content, entry) {
|
|
193693
193685
|
try {
|
|
@@ -195822,7 +195814,7 @@ var init_cli_bridge = __esm({
|
|
|
195822
195814
|
// src/mcp/file-tools.ts
|
|
195823
195815
|
import { closeSync as closeSync8, constants as constants6, lstatSync as lstatSync29, mkdirSync as mkdirSync41, openSync as openSync7, readdirSync as readdirSync42, readFileSync as readFileSync107, realpathSync as realpathSync12, renameSync as renameSync15, rmSync as rmSync26, statSync as statSync24, writeSync as writeSync2, existsSync as existsSync97 } from "node:fs";
|
|
195824
195816
|
import { randomBytes as randomBytes4 } from "node:crypto";
|
|
195825
|
-
import { dirname as dirname53, isAbsolute as
|
|
195817
|
+
import { dirname as dirname53, isAbsolute as isAbsolute12, join as join98, relative as relative20, resolve as resolve67, sep as sep25 } from "node:path";
|
|
195826
195818
|
import * as z2 from "zod";
|
|
195827
195819
|
function within(root, p2) {
|
|
195828
195820
|
return p2 === root || p2.startsWith(root.endsWith(sep25) ? root : root + sep25);
|
|
@@ -195896,7 +195888,7 @@ function denied(appDir3, abs) {
|
|
|
195896
195888
|
function confinedPath(appDir3, rel2) {
|
|
195897
195889
|
if (typeof rel2 !== "string" || !rel2.trim()) return { error: "a path is required" };
|
|
195898
195890
|
if (rel2.includes("\0")) return { error: "a path may not contain NUL" };
|
|
195899
|
-
if (
|
|
195891
|
+
if (isAbsolute12(rel2)) return { error: `"${rel2}" is absolute \u2014 give a path inside the app folder` };
|
|
195900
195892
|
const abs = resolve67(appDir3, rel2);
|
|
195901
195893
|
if (!within(appDir3, abs) || abs === appDir3) return { error: `"${rel2}" is outside the app folder` };
|
|
195902
195894
|
const real = realish(abs);
|
|
@@ -212270,7 +212262,7 @@ import * as __ascBuiltin125 from "node:crypto";
|
|
|
212270
212262
|
import * as __ascBuiltin212 from "node:os";
|
|
212271
212263
|
import * as __ascBuiltin34 from "node:path";
|
|
212272
212264
|
function assertOutsideRepo(what, path2, fs2 = nodeFs) {
|
|
212273
|
-
if (!
|
|
212265
|
+
if (!isAbsolute13(path2))
|
|
212274
212266
|
throw new CredentialError(`${what} must be an absolute path outside any repository`);
|
|
212275
212267
|
for (let dir = dirname63(resolve76(path2)); ; dir = dirname63(dir)) {
|
|
212276
212268
|
if (fs2.exists(join117(dir, ".git")))
|
|
@@ -212323,7 +212315,7 @@ function readKey(fs2, path2, what, providerId) {
|
|
|
212323
212315
|
throw new CredentialError(`${what} could not be read`, providerId, "unavailable");
|
|
212324
212316
|
}
|
|
212325
212317
|
}
|
|
212326
|
-
var chmodSync3, existsSync100, mkdirSync43, readdirSync45, readFileSync111, unlinkSync6, writeFileSync42, randomBytes11, homedir13, dirname63,
|
|
212318
|
+
var chmodSync3, existsSync100, mkdirSync43, readdirSync45, readFileSync111, unlinkSync6, writeFileSync42, randomBytes11, homedir13, dirname63, isAbsolute13, join117, resolve76, nodeFs, TRUTHY2, EnvCredentialProvider, PROFILE_FIELDS, FileCredentialProvider;
|
|
212327
212319
|
var init_local = __esm({
|
|
212328
212320
|
"../../node_modules/@wix/asc-core/dist/providers/local.js"() {
|
|
212329
212321
|
init_define_HHP_CATALOG();
|
|
@@ -212333,7 +212325,7 @@ var init_local = __esm({
|
|
|
212333
212325
|
({ chmodSync: chmodSync3, existsSync: existsSync100, mkdirSync: mkdirSync43, readdirSync: readdirSync45, readFileSync: readFileSync111, unlinkSync: unlinkSync6, writeFileSync: writeFileSync42 } = __ascBuiltin038);
|
|
212334
212326
|
({ randomBytes: randomBytes11 } = __ascBuiltin125);
|
|
212335
212327
|
({ homedir: homedir13 } = __ascBuiltin212);
|
|
212336
|
-
({ dirname: dirname63, isAbsolute:
|
|
212328
|
+
({ dirname: dirname63, isAbsolute: isAbsolute13, join: join117, resolve: resolve76 } = __ascBuiltin34);
|
|
212337
212329
|
nodeFs = {
|
|
212338
212330
|
readFile: (p2) => readFileSync111(p2, "utf8"),
|
|
212339
212331
|
exists: existsSync100,
|
|
@@ -227708,7 +227700,7 @@ function gitCheckoutOf(path2) {
|
|
|
227708
227700
|
}
|
|
227709
227701
|
}
|
|
227710
227702
|
function checkKeyDirectory(dir) {
|
|
227711
|
-
if (!
|
|
227703
|
+
if (!isAbsolute14(dir))
|
|
227712
227704
|
throw new AscError("invalid", `--output-dir must be an absolute path (got ${dir})`);
|
|
227713
227705
|
const checkout = gitCheckoutOf(dir);
|
|
227714
227706
|
if (checkout)
|
|
@@ -227757,14 +227749,14 @@ function reserveKeyFile(dir, keyId) {
|
|
|
227757
227749
|
}
|
|
227758
227750
|
};
|
|
227759
227751
|
}
|
|
227760
|
-
var createPrivateKey6, closeSync9, existsSync101, mkdirSync44, openSync8, realpathSync14, statSync28, unlinkSync7, writeSync3, basename29, dirname64,
|
|
227752
|
+
var createPrivateKey6, closeSync9, existsSync101, mkdirSync44, openSync8, realpathSync14, statSync28, unlinkSync7, writeSync3, basename29, dirname64, isAbsolute14, join123, resolve77, TEAM_KEY_ROLES, DOWNLOAD_ATTEMPTS, ApiKeysApi;
|
|
227761
227753
|
var init_api_keys = __esm({
|
|
227762
227754
|
"../../node_modules/@wix/asc-web/dist/api-keys.js"() {
|
|
227763
227755
|
init_define_HHP_CATALOG();
|
|
227764
227756
|
init_dist3();
|
|
227765
227757
|
({ createPrivateKey: createPrivateKey6 } = __ascBuiltin051);
|
|
227766
227758
|
({ closeSync: closeSync9, existsSync: existsSync101, mkdirSync: mkdirSync44, openSync: openSync8, realpathSync: realpathSync14, statSync: statSync28, unlinkSync: unlinkSync7, writeSync: writeSync3 } = __ascBuiltin133);
|
|
227767
|
-
({ basename: basename29, dirname: dirname64, isAbsolute:
|
|
227759
|
+
({ basename: basename29, dirname: dirname64, isAbsolute: isAbsolute14, join: join123, resolve: resolve77 } = __ascBuiltin217);
|
|
227768
227760
|
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"];
|
|
227769
227761
|
DOWNLOAD_ATTEMPTS = 3;
|
|
227770
227762
|
ApiKeysApi = class {
|
|
@@ -230224,7 +230216,7 @@ function bundleToSession(text32, now = Date.now()) {
|
|
|
230224
230216
|
return { session, skippedExpired };
|
|
230225
230217
|
}
|
|
230226
230218
|
function writeSessionBundle(path2, bundle, overwrite) {
|
|
230227
|
-
if (!
|
|
230219
|
+
if (!isAbsolute15(path2))
|
|
230228
230220
|
throw new SessionBundleError(`${path2} is relative; name an absolute path outside any repository`);
|
|
230229
230221
|
const checkout = gitCheckoutOf(path2);
|
|
230230
230222
|
if (checkout)
|
|
@@ -230267,7 +230259,7 @@ function readSessionBundle(path2) {
|
|
|
230267
230259
|
throw new SessionBundleError(`the session bundle is larger than ${MAX_SESSION_BUNDLE_BYTES} bytes`);
|
|
230268
230260
|
return readFileSync115(path2, "utf8");
|
|
230269
230261
|
}
|
|
230270
|
-
var chmodSync4, closeSync11, constants9, fstatSync3, lstatSync33, mkdirSync47, openSync10, readFileSync115, renameSync17, rmSync28, statSync33, writeSync5, createHash67, randomBytes16, dirname65,
|
|
230262
|
+
var chmodSync4, closeSync11, constants9, fstatSync3, lstatSync33, mkdirSync47, openSync10, readFileSync115, renameSync17, rmSync28, statSync33, writeSync5, createHash67, randomBytes16, dirname65, isAbsolute15, join128, resolve79, SESSION_BUNDLE_KIND, SESSION_BUNDLE_VERSION, MAX_SESSION_BUNDLE_BYTES, SessionBundleError, isAppleDomain, SESSION_FILE_VERSION, FileSessionStore, KEYRING_HINT, SecretServiceSessionStore;
|
|
230271
230263
|
var init_session_transfer = __esm({
|
|
230272
230264
|
"../../node_modules/@wix/asc-web/dist/session-transfer.js"() {
|
|
230273
230265
|
init_define_HHP_CATALOG();
|
|
@@ -230277,7 +230269,7 @@ var init_session_transfer = __esm({
|
|
|
230277
230269
|
init_session();
|
|
230278
230270
|
({ chmodSync: chmodSync4, closeSync: closeSync11, constants: constants9, fstatSync: fstatSync3, lstatSync: lstatSync33, mkdirSync: mkdirSync47, openSync: openSync10, readFileSync: readFileSync115, renameSync: renameSync17, rmSync: rmSync28, statSync: statSync33, writeSync: writeSync5 } = __ascBuiltin058);
|
|
230279
230271
|
({ createHash: createHash67, randomBytes: randomBytes16 } = __ascBuiltin139);
|
|
230280
|
-
({ dirname: dirname65, isAbsolute:
|
|
230272
|
+
({ dirname: dirname65, isAbsolute: isAbsolute15, join: join128, resolve: resolve79 } = __ascBuiltin220);
|
|
230281
230273
|
SESSION_BUNDLE_KIND = "asc-node-web-session";
|
|
230282
230274
|
SESSION_BUNDLE_VERSION = 1;
|
|
230283
230275
|
MAX_SESSION_BUNDLE_BYTES = 1 << 20;
|
|
@@ -240154,7 +240146,7 @@ ${o2.detail}` : ""}` };
|
|
|
240154
240146
|
function enabledTools(env, o2 = {}) {
|
|
240155
240147
|
return TOOLS.filter((t2) => !t2.write || env.ASC_MCP_WRITE === "1" || o2.approvals === true);
|
|
240156
240148
|
}
|
|
240157
|
-
var mkdirSync49, readFileSync123, realpathSync15, statSync36, writeFileSync47, delimiter3,
|
|
240149
|
+
var mkdirSync49, readFileSync123, realpathSync15, statSync36, writeFileSync47, delimiter3, isAbsolute16, join133, relative24, resolve85, sep28, 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;
|
|
240158
240150
|
var init_tools2 = __esm({
|
|
240159
240151
|
"../../node_modules/@wix/asc-mcp/dist/tools.js"() {
|
|
240160
240152
|
init_define_HHP_CATALOG();
|
|
@@ -240165,7 +240157,7 @@ var init_tools2 = __esm({
|
|
|
240165
240157
|
init_dist7();
|
|
240166
240158
|
init_action_catalog_generated();
|
|
240167
240159
|
({ mkdirSync: mkdirSync49, readFileSync: readFileSync123, realpathSync: realpathSync15, statSync: statSync36, writeFileSync: writeFileSync47 } = __ascBuiltin075);
|
|
240168
|
-
({ delimiter: delimiter3, isAbsolute:
|
|
240160
|
+
({ delimiter: delimiter3, isAbsolute: isAbsolute16, join: join133, relative: relative24, resolve: resolve85, sep: sep28 } = __ascBuiltin148);
|
|
240169
240161
|
READ = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true };
|
|
240170
240162
|
PLAN = { readOnlyHint: true, destructiveHint: false, idempotentHint: false, openWorldHint: true };
|
|
240171
240163
|
APPLY = { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true };
|
|
@@ -240222,7 +240214,7 @@ var init_tools2 = __esm({
|
|
|
240222
240214
|
};
|
|
240223
240215
|
inside2 = (root, path2) => {
|
|
240224
240216
|
const rel2 = relative24(root, path2);
|
|
240225
|
-
return rel2 !== ".." && !rel2.startsWith(`..${sep28}`) && !
|
|
240217
|
+
return rel2 !== ".." && !rel2.startsWith(`..${sep28}`) && !isAbsolute16(rel2);
|
|
240226
240218
|
};
|
|
240227
240219
|
identityFile = (ctx, jobId) => join133(ctx.stateDir, "mcp", "web-jobs", `${jobId.replace(/[^A-Za-z0-9_-]/g, "_")}.json`);
|
|
240228
240220
|
appleIdParam = z5.string().optional().describe("The signed-in Apple ID; default ASC_APPLE_ID. Never a password: a person signs in at a terminal with asc-node web auth login.");
|
|
@@ -242467,7 +242459,7 @@ __export(store_host_exports, {
|
|
|
242467
242459
|
import { spawn as spawn8 } from "node:child_process";
|
|
242468
242460
|
import { existsSync as existsSync104, lstatSync as lstatSync34, readFileSync as readFileSync125, readdirSync as readdirSync49, realpathSync as realpathSync17 } from "node:fs";
|
|
242469
242461
|
import { homedir as homedir16, hostname as hostname6, userInfo as userInfo3 } from "node:os";
|
|
242470
|
-
import { delimiter as delimiter4, dirname as dirname66, isAbsolute as
|
|
242462
|
+
import { delimiter as delimiter4, dirname as dirname66, isAbsolute as isAbsolute17, join as join135, relative as relative25, resolve as resolve86, sep as sep29 } from "node:path";
|
|
242471
242463
|
function storeNodeRefusal(version5 = process.versions.node) {
|
|
242472
242464
|
const major = Number(version5.split(".")[0]);
|
|
242473
242465
|
return Number.isFinite(major) && major >= STORE_MIN_NODE_MAJOR ? void 0 : `App Store submission needs Node ${STORE_MIN_NODE_MAJOR} or newer (this is Node ${version5}). Install a current Node, then run the command again.`;
|
|
@@ -242538,7 +242530,7 @@ function storeContext(rt2, io2, policy = customerPolicy(rt2)) {
|
|
|
242538
242530
|
function appDirFor(appRef2, root, exists2 = existsSync104) {
|
|
242539
242531
|
const base2 = resolve86(root);
|
|
242540
242532
|
const ref = appRef2.trim();
|
|
242541
|
-
const dir = !ref || ref === "." ? base2 :
|
|
242533
|
+
const dir = !ref || ref === "." ? base2 : isAbsolute17(ref) ? resolve86(ref) : resolve86(base2, ref);
|
|
242542
242534
|
const inside4 = dir === base2 || dir.startsWith(base2.endsWith(sep29) ? base2 : base2 + sep29);
|
|
242543
242535
|
if (inside4 && ["config.ts", "config.js", "config.mjs", STORE_FACTS_FILE].some((f2) => exists2(join135(dir, f2)))) return dir;
|
|
242544
242536
|
throw new StoreFactsError(
|
|
@@ -242637,7 +242629,7 @@ function ownerAnswers(dir, ownerPath, deps, note, rel2, render3) {
|
|
|
242637
242629
|
}
|
|
242638
242630
|
function factPathIn(dir, realDir, key4, p2, file2 = STORE_FACTS_FILE) {
|
|
242639
242631
|
const refuse10 = () => new StoreFactsError(`${key4} in ${file2} must be a path inside the app folder, relative to it; ${p2} is not`, "store_facts_invalid");
|
|
242640
|
-
if (
|
|
242632
|
+
if (isAbsolute17(p2)) throw refuse10();
|
|
242641
242633
|
const base2 = resolve86(dir);
|
|
242642
242634
|
const path2 = resolve86(base2, p2);
|
|
242643
242635
|
if (path2 === base2 || !path2.startsWith(base2 + sep29)) throw refuse10();
|
|
@@ -246120,12 +246112,12 @@ __export(coverage_exports, {
|
|
|
246120
246112
|
});
|
|
246121
246113
|
import { createHash as createHash74 } from "node:crypto";
|
|
246122
246114
|
import { existsSync as existsSync111, readFileSync as readFileSync131, writeFileSync as writeFileSync52 } from "node:fs";
|
|
246123
|
-
import { isAbsolute as
|
|
246115
|
+
import { isAbsolute as isAbsolute18, join as join144, resolve as resolve92 } from "node:path";
|
|
246124
246116
|
function sectionVisibilityProof(record5, contentDir2) {
|
|
246125
246117
|
const proof = obj7(record5.sectionVisibility);
|
|
246126
246118
|
const states = obj7(proof.states), report9 = obj7(proof.testReport);
|
|
246127
246119
|
const path2 = report9.path;
|
|
246128
|
-
if (proof.kind !== "automated" || typeof proof.command !== "string" || !proof.command.trim() || proof.hiddenMemberReads !== 0 || !Object.entries(SECTION_VISIBILITY_STATES).every(([key4, value2]) => states[key4] === value2) || typeof path2 !== "string" || !path2.trim() ||
|
|
246120
|
+
if (proof.kind !== "automated" || typeof proof.command !== "string" || !proof.command.trim() || proof.hiddenMemberReads !== 0 || !Object.entries(SECTION_VISIBILITY_STATES).every(([key4, value2]) => states[key4] === value2) || typeof path2 !== "string" || !path2.trim() || isAbsolute18(path2) || path2.split(/[\\/]/).includes("..") || typeof report9.sha256 !== "string" || !/^[a-f0-9]{64}$/.test(report9.sha256)) return false;
|
|
246129
246121
|
try {
|
|
246130
246122
|
return sha3(readFileSync131(join144(resolve92(contentDir2), path2))) === report9.sha256;
|
|
246131
246123
|
} catch {
|
|
@@ -246317,7 +246309,7 @@ function verifyNativeProof(contentDir2, releaseHash, requirementIds) {
|
|
|
246317
246309
|
continue;
|
|
246318
246310
|
}
|
|
246319
246311
|
const artifact = record5.artifact;
|
|
246320
|
-
if (typeof artifact !== "string" || !artifact.trim() ||
|
|
246312
|
+
if (typeof artifact !== "string" || !artifact.trim() || isAbsolute18(artifact) || artifact.split(/[\\/]/).includes("..") || !existsSync111(join144(root, artifact))) {
|
|
246321
246313
|
issues.push(`Native walkthrough check ${id} needs a reviewable artifact file.`);
|
|
246322
246314
|
}
|
|
246323
246315
|
}
|
|
@@ -246462,7 +246454,7 @@ function verifyCoverage(evidenceDir, contentDir2, releaseHash, builtScreenIds) {
|
|
|
246462
246454
|
}
|
|
246463
246455
|
for (const check of matching) {
|
|
246464
246456
|
const path2 = check.evidence;
|
|
246465
|
-
if (typeof path2 !== "string" || !path2.trim() ||
|
|
246457
|
+
if (typeof path2 !== "string" || !path2.trim() || isAbsolute18(path2) || path2.split(/[\\/]/).includes("..")) {
|
|
246466
246458
|
issues.push({ id, message: `Check ${required3} needs a safe relative evidence path.` });
|
|
246467
246459
|
} else if (!existsSync111(join144(resolve92(contentDir2), path2))) {
|
|
246468
246460
|
issues.push({ id, message: `Check ${required3} evidence file is absent: ${path2}.` });
|
|
@@ -246478,14 +246470,14 @@ function verifyCoverage(evidenceDir, contentDir2, releaseHash, builtScreenIds) {
|
|
|
246478
246470
|
issues.push({ id, message: "Member-only section visibility needs deterministic automated transition assertions, zero hidden member reads and a hashed test report." });
|
|
246479
246471
|
}
|
|
246480
246472
|
const artifact = record5.artifact;
|
|
246481
|
-
if (typeof artifact !== "string" || !artifact.trim() ||
|
|
246473
|
+
if (typeof artifact !== "string" || !artifact.trim() || isAbsolute18(artifact) || artifact.split(/[\\/]/).includes("..") || !existsSync111(join144(resolve92(contentDir2), artifact))) {
|
|
246482
246474
|
issues.push({ id, message: `Check ${required3} needs a reviewable artifact file.` });
|
|
246483
246475
|
}
|
|
246484
246476
|
if (kind === "native-widget") {
|
|
246485
246477
|
const baseline = obj7(record5.sourceBaseline);
|
|
246486
246478
|
const context = obj7(record5.targetContext);
|
|
246487
246479
|
const sourceArtifact = baseline.artifact;
|
|
246488
|
-
if (baseline.kind !== "native-device" || typeof sourceArtifact !== "string" || !sourceArtifact.trim() ||
|
|
246480
|
+
if (baseline.kind !== "native-device" || typeof sourceArtifact !== "string" || !sourceArtifact.trim() || isAbsolute18(sourceArtifact) || sourceArtifact.split(/[\\/]/).includes("..") || !existsSync111(join144(resolve92(contentDir2), sourceArtifact))) {
|
|
246489
246481
|
issues.push({ id, message: "Native widget behavior needs a source-device baseline artifact; editor-only observations are unverified." });
|
|
246490
246482
|
}
|
|
246491
246483
|
if (!["siteId", "identityContext"].every((key4) => typeof baseline[key4] === "string" && String(baseline[key4]).trim() && baseline[key4] === context[key4]) || typeof sourceSiteId !== "string" || baseline.siteId !== sourceSiteId) {
|
|
@@ -248621,7 +248613,7 @@ __export(validate_design_exports, {
|
|
|
248621
248613
|
});
|
|
248622
248614
|
import { randomBytes as randomBytes20 } from "node:crypto";
|
|
248623
248615
|
import { closeSync as closeSync12, constants as constants10, existsSync as existsSync119, lstatSync as lstatSync35, openSync as openSync11, readFileSync as readFileSync141, realpathSync as realpathSync19, renameSync as renameSync20, unlinkSync as unlinkSync9, writeFileSync as writeFileSync55 } from "node:fs";
|
|
248624
|
-
import { dirname as dirname71, isAbsolute as
|
|
248616
|
+
import { dirname as dirname71, isAbsolute as isAbsolute19, join as join154, relative as relative30, resolve as resolve97, sep as sep32, win32 } from "node:path";
|
|
248625
248617
|
import ts23 from "typescript";
|
|
248626
248618
|
function readColorToken(tokens2, name) {
|
|
248627
248619
|
const entry = obj9(tokens2.colors)?.[name];
|
|
@@ -248840,13 +248832,13 @@ function activeIdiomNames(contentDir2, tokens2) {
|
|
|
248840
248832
|
return /* @__PURE__ */ new Set();
|
|
248841
248833
|
}
|
|
248842
248834
|
function writableTokensPath(contentDir2, location) {
|
|
248843
|
-
if (
|
|
248835
|
+
if (isAbsolute19(location) || win32.isAbsolute(location) || location.split(/[\\/]/).includes("..")) {
|
|
248844
248836
|
throw new Error("--fix requires a token path inside the content directory without traversal.");
|
|
248845
248837
|
}
|
|
248846
248838
|
const root = realpathSync19(contentDir2);
|
|
248847
248839
|
const path2 = resolve97(root, location);
|
|
248848
248840
|
const rel2 = relative30(root, path2);
|
|
248849
|
-
if (!rel2 || rel2 === ".." || rel2.startsWith(`..${sep32}`) ||
|
|
248841
|
+
if (!rel2 || rel2 === ".." || rel2.startsWith(`..${sep32}`) || isAbsolute19(rel2)) {
|
|
248850
248842
|
throw new Error("--fix requires a token path inside the content directory.");
|
|
248851
248843
|
}
|
|
248852
248844
|
let current = root;
|
|
@@ -248859,7 +248851,7 @@ function writableTokensPath(contentDir2, location) {
|
|
|
248859
248851
|
}
|
|
248860
248852
|
}
|
|
248861
248853
|
const real = relative30(root, realpathSync19(path2));
|
|
248862
|
-
if (!real || real === ".." || real.startsWith(`..${sep32}`) ||
|
|
248854
|
+
if (!real || real === ".." || real.startsWith(`..${sep32}`) || isAbsolute19(real)) {
|
|
248863
248855
|
throw new Error("--fix cannot write outside the content directory.");
|
|
248864
248856
|
}
|
|
248865
248857
|
return path2;
|
|
@@ -249059,7 +249051,7 @@ function safeEvidencePath(contentDir2, name) {
|
|
|
249059
249051
|
const dir = realDirIn(root, ".himi/one-app");
|
|
249060
249052
|
if (!dir) throw new Error("The design evidence directory is not a regular directory.");
|
|
249061
249053
|
const real = relative30(root, realpathSync19(dir));
|
|
249062
|
-
if (!real || real === ".." || real.startsWith(`..${sep32}`) ||
|
|
249054
|
+
if (!real || real === ".." || real.startsWith(`..${sep32}`) || isAbsolute19(real)) {
|
|
249063
249055
|
throw new Error("The design evidence directory is outside the content directory.");
|
|
249064
249056
|
}
|
|
249065
249057
|
const path2 = join154(dir, name);
|
|
@@ -278659,7 +278651,7 @@ var init_customer_build = __esm({
|
|
|
278659
278651
|
|
|
278660
278652
|
// src/site-analyze/apply.ts
|
|
278661
278653
|
import { existsSync as existsSync156, readFileSync as readFileSync185, writeFileSync as writeFileSync77, copyFileSync as copyFileSync3, mkdirSync as mkdirSync68, realpathSync as realpathSync24, statSync as statSync50 } from "node:fs";
|
|
278662
|
-
import { dirname as dirname87, isAbsolute as
|
|
278654
|
+
import { dirname as dirname87, isAbsolute as isAbsolute20, join as join201, resolve as resolve125, sep as sep34 } from "node:path";
|
|
278663
278655
|
import { spawnSync as spawnSync13 } from "node:child_process";
|
|
278664
278656
|
function inRepoBakeRefusal(repoRoot2, shell) {
|
|
278665
278657
|
if (isBrandable(repoRoot2, shell)) return null;
|
|
@@ -278993,7 +278985,7 @@ function buildMergedContract(options2) {
|
|
|
278993
278985
|
const branding = merged.branding ?? {};
|
|
278994
278986
|
const staged = [];
|
|
278995
278987
|
const contained = (root, rel2) => {
|
|
278996
|
-
if (
|
|
278988
|
+
if (isAbsolute20(rel2)) return void 0;
|
|
278997
278989
|
const full = resolve125(root, rel2);
|
|
278998
278990
|
return full.startsWith(resolve125(root) + sep34) ? full : void 0;
|
|
278999
278991
|
};
|
|
@@ -281467,7 +281459,7 @@ __export(check_report_exports, {
|
|
|
281467
281459
|
import { createHash as createHash98, randomUUID as randomUUID20 } from "node:crypto";
|
|
281468
281460
|
import { request as httpRequest2 } from "node:http";
|
|
281469
281461
|
import { createConnection } from "node:net";
|
|
281470
|
-
import { isAbsolute as
|
|
281462
|
+
import { isAbsolute as isAbsolute21, relative as relative36, resolve as resolve127 } from "node:path";
|
|
281471
281463
|
function credentialValue(value2) {
|
|
281472
281464
|
const v2 = value2.trim();
|
|
281473
281465
|
if (!v2 || /^(?:[01]|true|false|yes|no|on|off|null|none|undefined)$/i.test(v2)) return null;
|
|
@@ -281559,9 +281551,9 @@ function boundedText(value2, secrets) {
|
|
|
281559
281551
|
return clean3.length <= MAX_TEXT4 ? clean3 : `${clean3.slice(0, MAX_TEXT4 - 1)}\u2026`;
|
|
281560
281552
|
}
|
|
281561
281553
|
function contentRelative(file2, contentDir2) {
|
|
281562
|
-
const rel2 =
|
|
281554
|
+
const rel2 = isAbsolute21(file2) ? relative36(resolve127(contentDir2), file2) : file2;
|
|
281563
281555
|
const normal = rel2.split(/[\\/]+/).filter((part5) => part5 && part5 !== ".");
|
|
281564
|
-
if (!normal.length ||
|
|
281556
|
+
if (!normal.length || isAbsolute21(rel2) || normal.includes("..")) return void 0;
|
|
281565
281557
|
const joined = normal.join("/");
|
|
281566
281558
|
return joined.length <= 256 ? joined : void 0;
|
|
281567
281559
|
}
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
{
|
|
134
134
|
"name": "AppServiceError",
|
|
135
135
|
"kind": "type",
|
|
136
|
-
"jsdoc": "/**\n * The rejection `app.read` / `app.dispatch` produce: an `Error` named `AppServiceError` with a\n * `code`. Never a null result — \"nothing ran\" always rejects. A plain `Error` rather than a\n * subclass,
|
|
136
|
+
"jsdoc": "/**\n * The rejection `app.read` / `app.dispatch` produce: an `Error` named `AppServiceError` with a\n * `code`. Never a null result — \"nothing ran\" always rejects. A plain `Error` rather than a\n * subclass, so a bundle that opts into the Hermes-safe profile (`HERMES_SAFE_BUNDLES`, build-lib.mjs:\n * no `class` syntax) can still import the SDK.\n */",
|
|
137
137
|
"decl": "export type AppServiceError = Error & { readonly code: AppServiceErrorCode };",
|
|
138
138
|
"verificationChecked": true
|
|
139
139
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1813.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
|
|
6
6
|
"keywords": [
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"artifactId": "himalaya-cli"
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
"falconPackageHash": "
|
|
85
|
+
"falconPackageHash": "3f4eebde2550392e6d5768d9c26ce506a895c32e644bf916f7616337"
|
|
86
86
|
}
|