@wix/himalaya-cli 0.1812.0 → 0.1814.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"] },
|
|
@@ -42326,7 +42318,6 @@ function shouldRevealError(args) {
|
|
|
42326
42318
|
var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
|
|
42327
42319
|
var init_validation = __esm({
|
|
42328
42320
|
"../../core/ts/src/validation.ts"() {
|
|
42329
|
-
"use strict";
|
|
42330
42321
|
init_define_HHP_CATALOG();
|
|
42331
42322
|
EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
|
|
42332
42323
|
URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
|
|
@@ -152281,7 +152272,7 @@ var init_wix_placeholders = __esm({
|
|
|
152281
152272
|
|
|
152282
152273
|
// ../release-build/pinned-language.ts
|
|
152283
152274
|
import { existsSync as existsSync42, readFileSync as readFileSync45 } from "node:fs";
|
|
152284
|
-
import { join as join37, relative as relative9, isAbsolute as
|
|
152275
|
+
import { join as join37, relative as relative9, isAbsolute as isAbsolute4 } from "node:path";
|
|
152285
152276
|
function pinsSingleLanguage(locale) {
|
|
152286
152277
|
const tag = locale?.default;
|
|
152287
152278
|
if (!tag || tag === "en" || !locale?.pin) return false;
|
|
@@ -152293,7 +152284,7 @@ function pinnedLanguageSwap(locale, appDir3) {
|
|
|
152293
152284
|
const directory = join37(appDir3, "l10n");
|
|
152294
152285
|
const path2 = join37(directory, `${locale.default}.json`);
|
|
152295
152286
|
const outside = relative9(directory, path2);
|
|
152296
|
-
if (outside.startsWith("..") ||
|
|
152287
|
+
if (outside.startsWith("..") || isAbsolute4(outside)) return void 0;
|
|
152297
152288
|
const map2 = existsSync42(path2) ? sourceMap(parseCatalog(readFileSync45(path2, "utf8"))) : /* @__PURE__ */ new Map();
|
|
152298
152289
|
return (descriptor, workerSource) => {
|
|
152299
152290
|
translateWith(descriptor, map2);
|
|
@@ -162555,10 +162546,10 @@ __export(preflight_exports, {
|
|
|
162555
162546
|
requireEnv: () => requireEnv
|
|
162556
162547
|
});
|
|
162557
162548
|
import { existsSync as existsSync51, readFileSync as readFileSync54 } from "node:fs";
|
|
162558
|
-
import { isAbsolute as
|
|
162549
|
+
import { isAbsolute as isAbsolute5, relative as relative11, resolve as resolve41 } from "node:path";
|
|
162559
162550
|
function isInsideRepo(p2) {
|
|
162560
162551
|
const rel2 = relative11(REPO_ROOT, resolve41(p2));
|
|
162561
|
-
return rel2 !== "" && !rel2.startsWith("..") && !
|
|
162552
|
+
return rel2 !== "" && !rel2.startsWith("..") && !isAbsolute5(rel2);
|
|
162562
162553
|
}
|
|
162563
162554
|
function assertCredentialOutsideRepo(label4, p2) {
|
|
162564
162555
|
if (isInsideRepo(p2)) {
|
|
@@ -169692,7 +169683,7 @@ __export(signing_inspect_exports, {
|
|
|
169692
169683
|
runSigningInspect: () => runSigningInspect
|
|
169693
169684
|
});
|
|
169694
169685
|
import { existsSync as existsSync53, readFileSync as readFileSync56, statSync as statSync14 } from "node:fs";
|
|
169695
|
-
import { isAbsolute as
|
|
169686
|
+
import { isAbsolute as isAbsolute6, resolve as resolve43 } from "node:path";
|
|
169696
169687
|
function fail5(io2, code2, fields2 = {}) {
|
|
169697
169688
|
io2.error(JSON.stringify({ ok: false, code: code2, ...fields2 }));
|
|
169698
169689
|
return code2.endsWith("_required") || code2.endsWith("_usage") ? 2 : 1;
|
|
@@ -169748,7 +169739,7 @@ async function runSigningInspect(pos, flags, io2, deps = {}) {
|
|
|
169748
169739
|
hint: "Pass --bundle-id --team-id and ASC key flags, or set ASC_KEY_PATH / ASC_KEY_ID / ASC_ISSUER_ID."
|
|
169749
169740
|
});
|
|
169750
169741
|
}
|
|
169751
|
-
const resolvedKey =
|
|
169742
|
+
const resolvedKey = isAbsolute6(keyFile) ? keyFile : resolve43(process.cwd(), keyFile);
|
|
169752
169743
|
try {
|
|
169753
169744
|
assertCredentialOutsideRepo("asc-key-file", resolvedKey);
|
|
169754
169745
|
} catch (error) {
|
|
@@ -169773,8 +169764,8 @@ async function runSigningInspect(pos, flags, io2, deps = {}) {
|
|
|
169773
169764
|
error: "local asset check needs --cert-file, --cert-password, and --profile-file together"
|
|
169774
169765
|
});
|
|
169775
169766
|
}
|
|
169776
|
-
const certPath =
|
|
169777
|
-
const profilePath2 =
|
|
169767
|
+
const certPath = isAbsolute6(certFile) ? certFile : resolve43(process.cwd(), certFile);
|
|
169768
|
+
const profilePath2 = isAbsolute6(profileFile) ? profileFile : resolve43(process.cwd(), profileFile);
|
|
169778
169769
|
try {
|
|
169779
169770
|
assertCredentialOutsideRepo("cert-file", certPath);
|
|
169780
169771
|
assertCredentialOutsideRepo("profile-file", profilePath2);
|
|
@@ -172815,7 +172806,7 @@ __export(spec_exports, {
|
|
|
172815
172806
|
siteUrlOf: () => siteUrlOf
|
|
172816
172807
|
});
|
|
172817
172808
|
import { existsSync as existsSync56, readFileSync as readFileSync60 } from "node:fs";
|
|
172818
|
-
import { dirname as dirname34, isAbsolute as
|
|
172809
|
+
import { dirname as dirname34, isAbsolute as isAbsolute7, resolve as resolve44 } from "node:path";
|
|
172819
172810
|
function invalid(message5) {
|
|
172820
172811
|
throw new FromUrlError("app_spec_invalid", `app spec: ${message5}`);
|
|
172821
172812
|
}
|
|
@@ -172869,7 +172860,7 @@ function parseAppSpec(raw, specDir = process.cwd()) {
|
|
|
172869
172860
|
if (!icon.startsWith("https://")) invalid(`icon must be a local file or an https URL, got ${JSON.stringify(icon)}`);
|
|
172870
172861
|
spec.icon = icon;
|
|
172871
172862
|
} else {
|
|
172872
|
-
const path2 =
|
|
172863
|
+
const path2 = isAbsolute7(icon) ? icon : resolve44(specDir, icon);
|
|
172873
172864
|
if (!existsSync56(path2)) invalid(`icon file not found: ${path2}`);
|
|
172874
172865
|
spec.icon = path2;
|
|
172875
172866
|
}
|
|
@@ -179894,7 +179885,7 @@ import { createHash as createHash34, randomUUID as randomUUID10 } from "node:cry
|
|
|
179894
179885
|
import { spawn as spawn4 } from "node:child_process";
|
|
179895
179886
|
import { closeSync as closeSync6, existsSync as existsSync65, lstatSync as lstatSync24, readFileSync as readFileSync72, statSync as statSync20 } from "node:fs";
|
|
179896
179887
|
import { createServer as createServer3 } from "node:net";
|
|
179897
|
-
import { basename as basename18, dirname as dirname39, isAbsolute as
|
|
179888
|
+
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
179889
|
function homeShotPath(dir, home2) {
|
|
179899
179890
|
const root = resolve50(dir);
|
|
179900
179891
|
const base2 = resolve50(root, ".himi", "shots");
|
|
@@ -179910,7 +179901,7 @@ function homeShotPath(dir, home2) {
|
|
|
179910
179901
|
}
|
|
179911
179902
|
function displayPath(p2, cwd = process.cwd()) {
|
|
179912
179903
|
const rel2 = relative14(cwd, p2);
|
|
179913
|
-
return rel2 && !rel2.startsWith("..") && !
|
|
179904
|
+
return rel2 && !rel2.startsWith("..") && !isAbsolute8(rel2) ? rel2 : p2;
|
|
179914
179905
|
}
|
|
179915
179906
|
function progressCommand(opts) {
|
|
179916
179907
|
return `himi progress "<${opts.what}>"${opts.step ? ` --step ${opts.step}` : ""}${opts.image ? ` --image ${shellQuote2(opts.image)}` : ""}${contentArg(opts.content)}`;
|
|
@@ -180051,7 +180042,7 @@ async function openBoardForSession(dir, cwd = process.cwd()) {
|
|
|
180051
180042
|
const { openStudio: openStudio2 } = await Promise.resolve().then(() => (init_studio(), studio_exports));
|
|
180052
180043
|
const { page, url } = openStudio2(dir);
|
|
180053
180044
|
const rel2 = relative14(cwd, page);
|
|
180054
|
-
return { page: rel2 && !rel2.startsWith("..") && !
|
|
180045
|
+
return { page: rel2 && !rel2.startsWith("..") && !isAbsolute8(rel2) ? rel2 : page, url, opened: false };
|
|
180055
180046
|
} catch (e2) {
|
|
180056
180047
|
return { opened: false, error: `the build board was not created: ${e2.message} \u2014 \`himi studio --no-open\` in the app retries it` };
|
|
180057
180048
|
}
|
|
@@ -186890,16 +186881,16 @@ var init_prebuild = __esm({
|
|
|
186890
186881
|
import { execFileSync as execFileSync4 } from "node:child_process";
|
|
186891
186882
|
import { existsSync as existsSync77, mkdtempSync as mkdtempSync3, readFileSync as readFileSync84, rmSync as rmSync21, writeFileSync as writeFileSync31 } from "node:fs";
|
|
186892
186883
|
import { tmpdir as tmpdir4 } from "node:os";
|
|
186893
|
-
import { isAbsolute as
|
|
186884
|
+
import { isAbsolute as isAbsolute9, join as join75, relative as relative16, resolve as resolve54, sep as sep22 } from "node:path";
|
|
186894
186885
|
function carrierGeneratedRoot(root, carrierInstallDir) {
|
|
186895
186886
|
return resolve54(root, carrierInstallDir, "generated");
|
|
186896
186887
|
}
|
|
186897
186888
|
function isInside(dir, target) {
|
|
186898
186889
|
const rel2 = relative16(dir, target);
|
|
186899
|
-
return rel2 !== "" && rel2 !== ".." && !rel2.startsWith(`..${sep22}`) && !
|
|
186890
|
+
return rel2 !== "" && rel2 !== ".." && !rel2.startsWith(`..${sep22}`) && !isAbsolute9(rel2);
|
|
186900
186891
|
}
|
|
186901
186892
|
function carrierPathProblem(dir, from, root, carrierInstallDir) {
|
|
186902
|
-
if (
|
|
186893
|
+
if (isAbsolute9(dir)) return "is absolute";
|
|
186903
186894
|
if (!`/${dir}`.includes(CARRIER_GENERATED_SEGMENT)) return `is not under ${CARRIER_GENERATED_SEGMENT.slice(1)}`;
|
|
186904
186895
|
const generated = carrierGeneratedRoot(root, carrierInstallDir);
|
|
186905
186896
|
if (!isInside(generated, resolve54(from, dir))) return `resolves outside the installed carrier (${relative16(root, generated)})`;
|
|
@@ -192725,7 +192716,7 @@ var init_policy = __esm({
|
|
|
192725
192716
|
// ../pre-pr-review/scope.mjs
|
|
192726
192717
|
import { execFileSync as execFileSync6 } from "node:child_process";
|
|
192727
192718
|
import { createHash as createHash37 } from "node:crypto";
|
|
192728
|
-
import { resolve as resolve62, dirname as dirname50, isAbsolute as
|
|
192719
|
+
import { resolve as resolve62, dirname as dirname50, isAbsolute as isAbsolute10, join as join88 } from "node:path";
|
|
192729
192720
|
import { fileURLToPath as fileURLToPath32 } from "node:url";
|
|
192730
192721
|
function resolveRepoRoot2(cwd = process.cwd()) {
|
|
192731
192722
|
let top;
|
|
@@ -193638,7 +193629,7 @@ var init_attestation = __esm({
|
|
|
193638
193629
|
|
|
193639
193630
|
// src/ux-evidence.ts
|
|
193640
193631
|
import { existsSync as existsSync91, mkdirSync as mkdirSync40, readFileSync as readFileSync100, writeFileSync as writeFileSync40 } from "node:fs";
|
|
193641
|
-
import { dirname as dirname52, isAbsolute as
|
|
193632
|
+
import { dirname as dirname52, isAbsolute as isAbsolute11, join as join92, relative as relative19, resolve as resolve65 } from "node:path";
|
|
193642
193633
|
function isNativePlatform(value2) {
|
|
193643
193634
|
return typeof value2 === "string" && NATIVE_PLATFORMS.includes(value2);
|
|
193644
193635
|
}
|
|
@@ -193687,7 +193678,7 @@ function writeEvidence(path2, evidence) {
|
|
|
193687
193678
|
}
|
|
193688
193679
|
function recordedFilePath(dir, file2) {
|
|
193689
193680
|
const rel2 = relative19(dir, resolve65(file2));
|
|
193690
|
-
return rel2 && !rel2.startsWith("..") && !
|
|
193681
|
+
return rel2 && !rel2.startsWith("..") && !isAbsolute11(rel2) ? rel2 : file2;
|
|
193691
193682
|
}
|
|
193692
193683
|
function recordRenderWidth(content, entry) {
|
|
193693
193684
|
try {
|
|
@@ -195822,7 +195813,7 @@ var init_cli_bridge = __esm({
|
|
|
195822
195813
|
// src/mcp/file-tools.ts
|
|
195823
195814
|
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
195815
|
import { randomBytes as randomBytes4 } from "node:crypto";
|
|
195825
|
-
import { dirname as dirname53, isAbsolute as
|
|
195816
|
+
import { dirname as dirname53, isAbsolute as isAbsolute12, join as join98, relative as relative20, resolve as resolve67, sep as sep25 } from "node:path";
|
|
195826
195817
|
import * as z2 from "zod";
|
|
195827
195818
|
function within(root, p2) {
|
|
195828
195819
|
return p2 === root || p2.startsWith(root.endsWith(sep25) ? root : root + sep25);
|
|
@@ -195896,7 +195887,7 @@ function denied(appDir3, abs) {
|
|
|
195896
195887
|
function confinedPath(appDir3, rel2) {
|
|
195897
195888
|
if (typeof rel2 !== "string" || !rel2.trim()) return { error: "a path is required" };
|
|
195898
195889
|
if (rel2.includes("\0")) return { error: "a path may not contain NUL" };
|
|
195899
|
-
if (
|
|
195890
|
+
if (isAbsolute12(rel2)) return { error: `"${rel2}" is absolute \u2014 give a path inside the app folder` };
|
|
195900
195891
|
const abs = resolve67(appDir3, rel2);
|
|
195901
195892
|
if (!within(appDir3, abs) || abs === appDir3) return { error: `"${rel2}" is outside the app folder` };
|
|
195902
195893
|
const real = realish(abs);
|
|
@@ -212270,7 +212261,7 @@ import * as __ascBuiltin125 from "node:crypto";
|
|
|
212270
212261
|
import * as __ascBuiltin212 from "node:os";
|
|
212271
212262
|
import * as __ascBuiltin34 from "node:path";
|
|
212272
212263
|
function assertOutsideRepo(what, path2, fs2 = nodeFs) {
|
|
212273
|
-
if (!
|
|
212264
|
+
if (!isAbsolute13(path2))
|
|
212274
212265
|
throw new CredentialError(`${what} must be an absolute path outside any repository`);
|
|
212275
212266
|
for (let dir = dirname63(resolve76(path2)); ; dir = dirname63(dir)) {
|
|
212276
212267
|
if (fs2.exists(join117(dir, ".git")))
|
|
@@ -212323,7 +212314,7 @@ function readKey(fs2, path2, what, providerId) {
|
|
|
212323
212314
|
throw new CredentialError(`${what} could not be read`, providerId, "unavailable");
|
|
212324
212315
|
}
|
|
212325
212316
|
}
|
|
212326
|
-
var chmodSync3, existsSync100, mkdirSync43, readdirSync45, readFileSync111, unlinkSync6, writeFileSync42, randomBytes11, homedir13, dirname63,
|
|
212317
|
+
var chmodSync3, existsSync100, mkdirSync43, readdirSync45, readFileSync111, unlinkSync6, writeFileSync42, randomBytes11, homedir13, dirname63, isAbsolute13, join117, resolve76, nodeFs, TRUTHY2, EnvCredentialProvider, PROFILE_FIELDS, FileCredentialProvider;
|
|
212327
212318
|
var init_local = __esm({
|
|
212328
212319
|
"../../node_modules/@wix/asc-core/dist/providers/local.js"() {
|
|
212329
212320
|
init_define_HHP_CATALOG();
|
|
@@ -212333,7 +212324,7 @@ var init_local = __esm({
|
|
|
212333
212324
|
({ chmodSync: chmodSync3, existsSync: existsSync100, mkdirSync: mkdirSync43, readdirSync: readdirSync45, readFileSync: readFileSync111, unlinkSync: unlinkSync6, writeFileSync: writeFileSync42 } = __ascBuiltin038);
|
|
212334
212325
|
({ randomBytes: randomBytes11 } = __ascBuiltin125);
|
|
212335
212326
|
({ homedir: homedir13 } = __ascBuiltin212);
|
|
212336
|
-
({ dirname: dirname63, isAbsolute:
|
|
212327
|
+
({ dirname: dirname63, isAbsolute: isAbsolute13, join: join117, resolve: resolve76 } = __ascBuiltin34);
|
|
212337
212328
|
nodeFs = {
|
|
212338
212329
|
readFile: (p2) => readFileSync111(p2, "utf8"),
|
|
212339
212330
|
exists: existsSync100,
|
|
@@ -227708,7 +227699,7 @@ function gitCheckoutOf(path2) {
|
|
|
227708
227699
|
}
|
|
227709
227700
|
}
|
|
227710
227701
|
function checkKeyDirectory(dir) {
|
|
227711
|
-
if (!
|
|
227702
|
+
if (!isAbsolute14(dir))
|
|
227712
227703
|
throw new AscError("invalid", `--output-dir must be an absolute path (got ${dir})`);
|
|
227713
227704
|
const checkout = gitCheckoutOf(dir);
|
|
227714
227705
|
if (checkout)
|
|
@@ -227757,14 +227748,14 @@ function reserveKeyFile(dir, keyId) {
|
|
|
227757
227748
|
}
|
|
227758
227749
|
};
|
|
227759
227750
|
}
|
|
227760
|
-
var createPrivateKey6, closeSync9, existsSync101, mkdirSync44, openSync8, realpathSync14, statSync28, unlinkSync7, writeSync3, basename29, dirname64,
|
|
227751
|
+
var createPrivateKey6, closeSync9, existsSync101, mkdirSync44, openSync8, realpathSync14, statSync28, unlinkSync7, writeSync3, basename29, dirname64, isAbsolute14, join123, resolve77, TEAM_KEY_ROLES, DOWNLOAD_ATTEMPTS, ApiKeysApi;
|
|
227761
227752
|
var init_api_keys = __esm({
|
|
227762
227753
|
"../../node_modules/@wix/asc-web/dist/api-keys.js"() {
|
|
227763
227754
|
init_define_HHP_CATALOG();
|
|
227764
227755
|
init_dist3();
|
|
227765
227756
|
({ createPrivateKey: createPrivateKey6 } = __ascBuiltin051);
|
|
227766
227757
|
({ closeSync: closeSync9, existsSync: existsSync101, mkdirSync: mkdirSync44, openSync: openSync8, realpathSync: realpathSync14, statSync: statSync28, unlinkSync: unlinkSync7, writeSync: writeSync3 } = __ascBuiltin133);
|
|
227767
|
-
({ basename: basename29, dirname: dirname64, isAbsolute:
|
|
227758
|
+
({ basename: basename29, dirname: dirname64, isAbsolute: isAbsolute14, join: join123, resolve: resolve77 } = __ascBuiltin217);
|
|
227768
227759
|
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
227760
|
DOWNLOAD_ATTEMPTS = 3;
|
|
227770
227761
|
ApiKeysApi = class {
|
|
@@ -230224,7 +230215,7 @@ function bundleToSession(text32, now = Date.now()) {
|
|
|
230224
230215
|
return { session, skippedExpired };
|
|
230225
230216
|
}
|
|
230226
230217
|
function writeSessionBundle(path2, bundle, overwrite) {
|
|
230227
|
-
if (!
|
|
230218
|
+
if (!isAbsolute15(path2))
|
|
230228
230219
|
throw new SessionBundleError(`${path2} is relative; name an absolute path outside any repository`);
|
|
230229
230220
|
const checkout = gitCheckoutOf(path2);
|
|
230230
230221
|
if (checkout)
|
|
@@ -230267,7 +230258,7 @@ function readSessionBundle(path2) {
|
|
|
230267
230258
|
throw new SessionBundleError(`the session bundle is larger than ${MAX_SESSION_BUNDLE_BYTES} bytes`);
|
|
230268
230259
|
return readFileSync115(path2, "utf8");
|
|
230269
230260
|
}
|
|
230270
|
-
var chmodSync4, closeSync11, constants9, fstatSync3, lstatSync33, mkdirSync47, openSync10, readFileSync115, renameSync17, rmSync28, statSync33, writeSync5, createHash67, randomBytes16, dirname65,
|
|
230261
|
+
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
230262
|
var init_session_transfer = __esm({
|
|
230272
230263
|
"../../node_modules/@wix/asc-web/dist/session-transfer.js"() {
|
|
230273
230264
|
init_define_HHP_CATALOG();
|
|
@@ -230277,7 +230268,7 @@ var init_session_transfer = __esm({
|
|
|
230277
230268
|
init_session();
|
|
230278
230269
|
({ 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
230270
|
({ createHash: createHash67, randomBytes: randomBytes16 } = __ascBuiltin139);
|
|
230280
|
-
({ dirname: dirname65, isAbsolute:
|
|
230271
|
+
({ dirname: dirname65, isAbsolute: isAbsolute15, join: join128, resolve: resolve79 } = __ascBuiltin220);
|
|
230281
230272
|
SESSION_BUNDLE_KIND = "asc-node-web-session";
|
|
230282
230273
|
SESSION_BUNDLE_VERSION = 1;
|
|
230283
230274
|
MAX_SESSION_BUNDLE_BYTES = 1 << 20;
|
|
@@ -240154,7 +240145,7 @@ ${o2.detail}` : ""}` };
|
|
|
240154
240145
|
function enabledTools(env, o2 = {}) {
|
|
240155
240146
|
return TOOLS.filter((t2) => !t2.write || env.ASC_MCP_WRITE === "1" || o2.approvals === true);
|
|
240156
240147
|
}
|
|
240157
|
-
var mkdirSync49, readFileSync123, realpathSync15, statSync36, writeFileSync47, delimiter3,
|
|
240148
|
+
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
240149
|
var init_tools2 = __esm({
|
|
240159
240150
|
"../../node_modules/@wix/asc-mcp/dist/tools.js"() {
|
|
240160
240151
|
init_define_HHP_CATALOG();
|
|
@@ -240165,7 +240156,7 @@ var init_tools2 = __esm({
|
|
|
240165
240156
|
init_dist7();
|
|
240166
240157
|
init_action_catalog_generated();
|
|
240167
240158
|
({ mkdirSync: mkdirSync49, readFileSync: readFileSync123, realpathSync: realpathSync15, statSync: statSync36, writeFileSync: writeFileSync47 } = __ascBuiltin075);
|
|
240168
|
-
({ delimiter: delimiter3, isAbsolute:
|
|
240159
|
+
({ delimiter: delimiter3, isAbsolute: isAbsolute16, join: join133, relative: relative24, resolve: resolve85, sep: sep28 } = __ascBuiltin148);
|
|
240169
240160
|
READ = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true };
|
|
240170
240161
|
PLAN = { readOnlyHint: true, destructiveHint: false, idempotentHint: false, openWorldHint: true };
|
|
240171
240162
|
APPLY = { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true };
|
|
@@ -240222,7 +240213,7 @@ var init_tools2 = __esm({
|
|
|
240222
240213
|
};
|
|
240223
240214
|
inside2 = (root, path2) => {
|
|
240224
240215
|
const rel2 = relative24(root, path2);
|
|
240225
|
-
return rel2 !== ".." && !rel2.startsWith(`..${sep28}`) && !
|
|
240216
|
+
return rel2 !== ".." && !rel2.startsWith(`..${sep28}`) && !isAbsolute16(rel2);
|
|
240226
240217
|
};
|
|
240227
240218
|
identityFile = (ctx, jobId) => join133(ctx.stateDir, "mcp", "web-jobs", `${jobId.replace(/[^A-Za-z0-9_-]/g, "_")}.json`);
|
|
240228
240219
|
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 +242458,7 @@ __export(store_host_exports, {
|
|
|
242467
242458
|
import { spawn as spawn8 } from "node:child_process";
|
|
242468
242459
|
import { existsSync as existsSync104, lstatSync as lstatSync34, readFileSync as readFileSync125, readdirSync as readdirSync49, realpathSync as realpathSync17 } from "node:fs";
|
|
242469
242460
|
import { homedir as homedir16, hostname as hostname6, userInfo as userInfo3 } from "node:os";
|
|
242470
|
-
import { delimiter as delimiter4, dirname as dirname66, isAbsolute as
|
|
242461
|
+
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
242462
|
function storeNodeRefusal(version5 = process.versions.node) {
|
|
242472
242463
|
const major = Number(version5.split(".")[0]);
|
|
242473
242464
|
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 +242529,7 @@ function storeContext(rt2, io2, policy = customerPolicy(rt2)) {
|
|
|
242538
242529
|
function appDirFor(appRef2, root, exists2 = existsSync104) {
|
|
242539
242530
|
const base2 = resolve86(root);
|
|
242540
242531
|
const ref = appRef2.trim();
|
|
242541
|
-
const dir = !ref || ref === "." ? base2 :
|
|
242532
|
+
const dir = !ref || ref === "." ? base2 : isAbsolute17(ref) ? resolve86(ref) : resolve86(base2, ref);
|
|
242542
242533
|
const inside4 = dir === base2 || dir.startsWith(base2.endsWith(sep29) ? base2 : base2 + sep29);
|
|
242543
242534
|
if (inside4 && ["config.ts", "config.js", "config.mjs", STORE_FACTS_FILE].some((f2) => exists2(join135(dir, f2)))) return dir;
|
|
242544
242535
|
throw new StoreFactsError(
|
|
@@ -242637,7 +242628,7 @@ function ownerAnswers(dir, ownerPath, deps, note, rel2, render3) {
|
|
|
242637
242628
|
}
|
|
242638
242629
|
function factPathIn(dir, realDir, key4, p2, file2 = STORE_FACTS_FILE) {
|
|
242639
242630
|
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 (
|
|
242631
|
+
if (isAbsolute17(p2)) throw refuse10();
|
|
242641
242632
|
const base2 = resolve86(dir);
|
|
242642
242633
|
const path2 = resolve86(base2, p2);
|
|
242643
242634
|
if (path2 === base2 || !path2.startsWith(base2 + sep29)) throw refuse10();
|
|
@@ -246120,12 +246111,12 @@ __export(coverage_exports, {
|
|
|
246120
246111
|
});
|
|
246121
246112
|
import { createHash as createHash74 } from "node:crypto";
|
|
246122
246113
|
import { existsSync as existsSync111, readFileSync as readFileSync131, writeFileSync as writeFileSync52 } from "node:fs";
|
|
246123
|
-
import { isAbsolute as
|
|
246114
|
+
import { isAbsolute as isAbsolute18, join as join144, resolve as resolve92 } from "node:path";
|
|
246124
246115
|
function sectionVisibilityProof(record5, contentDir2) {
|
|
246125
246116
|
const proof = obj7(record5.sectionVisibility);
|
|
246126
246117
|
const states = obj7(proof.states), report9 = obj7(proof.testReport);
|
|
246127
246118
|
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() ||
|
|
246119
|
+
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
246120
|
try {
|
|
246130
246121
|
return sha3(readFileSync131(join144(resolve92(contentDir2), path2))) === report9.sha256;
|
|
246131
246122
|
} catch {
|
|
@@ -246317,7 +246308,7 @@ function verifyNativeProof(contentDir2, releaseHash, requirementIds) {
|
|
|
246317
246308
|
continue;
|
|
246318
246309
|
}
|
|
246319
246310
|
const artifact = record5.artifact;
|
|
246320
|
-
if (typeof artifact !== "string" || !artifact.trim() ||
|
|
246311
|
+
if (typeof artifact !== "string" || !artifact.trim() || isAbsolute18(artifact) || artifact.split(/[\\/]/).includes("..") || !existsSync111(join144(root, artifact))) {
|
|
246321
246312
|
issues.push(`Native walkthrough check ${id} needs a reviewable artifact file.`);
|
|
246322
246313
|
}
|
|
246323
246314
|
}
|
|
@@ -246462,7 +246453,7 @@ function verifyCoverage(evidenceDir, contentDir2, releaseHash, builtScreenIds) {
|
|
|
246462
246453
|
}
|
|
246463
246454
|
for (const check of matching) {
|
|
246464
246455
|
const path2 = check.evidence;
|
|
246465
|
-
if (typeof path2 !== "string" || !path2.trim() ||
|
|
246456
|
+
if (typeof path2 !== "string" || !path2.trim() || isAbsolute18(path2) || path2.split(/[\\/]/).includes("..")) {
|
|
246466
246457
|
issues.push({ id, message: `Check ${required3} needs a safe relative evidence path.` });
|
|
246467
246458
|
} else if (!existsSync111(join144(resolve92(contentDir2), path2))) {
|
|
246468
246459
|
issues.push({ id, message: `Check ${required3} evidence file is absent: ${path2}.` });
|
|
@@ -246478,14 +246469,14 @@ function verifyCoverage(evidenceDir, contentDir2, releaseHash, builtScreenIds) {
|
|
|
246478
246469
|
issues.push({ id, message: "Member-only section visibility needs deterministic automated transition assertions, zero hidden member reads and a hashed test report." });
|
|
246479
246470
|
}
|
|
246480
246471
|
const artifact = record5.artifact;
|
|
246481
|
-
if (typeof artifact !== "string" || !artifact.trim() ||
|
|
246472
|
+
if (typeof artifact !== "string" || !artifact.trim() || isAbsolute18(artifact) || artifact.split(/[\\/]/).includes("..") || !existsSync111(join144(resolve92(contentDir2), artifact))) {
|
|
246482
246473
|
issues.push({ id, message: `Check ${required3} needs a reviewable artifact file.` });
|
|
246483
246474
|
}
|
|
246484
246475
|
if (kind === "native-widget") {
|
|
246485
246476
|
const baseline = obj7(record5.sourceBaseline);
|
|
246486
246477
|
const context = obj7(record5.targetContext);
|
|
246487
246478
|
const sourceArtifact = baseline.artifact;
|
|
246488
|
-
if (baseline.kind !== "native-device" || typeof sourceArtifact !== "string" || !sourceArtifact.trim() ||
|
|
246479
|
+
if (baseline.kind !== "native-device" || typeof sourceArtifact !== "string" || !sourceArtifact.trim() || isAbsolute18(sourceArtifact) || sourceArtifact.split(/[\\/]/).includes("..") || !existsSync111(join144(resolve92(contentDir2), sourceArtifact))) {
|
|
246489
246480
|
issues.push({ id, message: "Native widget behavior needs a source-device baseline artifact; editor-only observations are unverified." });
|
|
246490
246481
|
}
|
|
246491
246482
|
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 +248612,7 @@ __export(validate_design_exports, {
|
|
|
248621
248612
|
});
|
|
248622
248613
|
import { randomBytes as randomBytes20 } from "node:crypto";
|
|
248623
248614
|
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
|
|
248615
|
+
import { dirname as dirname71, isAbsolute as isAbsolute19, join as join154, relative as relative30, resolve as resolve97, sep as sep32, win32 } from "node:path";
|
|
248625
248616
|
import ts23 from "typescript";
|
|
248626
248617
|
function readColorToken(tokens2, name) {
|
|
248627
248618
|
const entry = obj9(tokens2.colors)?.[name];
|
|
@@ -248840,13 +248831,13 @@ function activeIdiomNames(contentDir2, tokens2) {
|
|
|
248840
248831
|
return /* @__PURE__ */ new Set();
|
|
248841
248832
|
}
|
|
248842
248833
|
function writableTokensPath(contentDir2, location) {
|
|
248843
|
-
if (
|
|
248834
|
+
if (isAbsolute19(location) || win32.isAbsolute(location) || location.split(/[\\/]/).includes("..")) {
|
|
248844
248835
|
throw new Error("--fix requires a token path inside the content directory without traversal.");
|
|
248845
248836
|
}
|
|
248846
248837
|
const root = realpathSync19(contentDir2);
|
|
248847
248838
|
const path2 = resolve97(root, location);
|
|
248848
248839
|
const rel2 = relative30(root, path2);
|
|
248849
|
-
if (!rel2 || rel2 === ".." || rel2.startsWith(`..${sep32}`) ||
|
|
248840
|
+
if (!rel2 || rel2 === ".." || rel2.startsWith(`..${sep32}`) || isAbsolute19(rel2)) {
|
|
248850
248841
|
throw new Error("--fix requires a token path inside the content directory.");
|
|
248851
248842
|
}
|
|
248852
248843
|
let current = root;
|
|
@@ -248859,7 +248850,7 @@ function writableTokensPath(contentDir2, location) {
|
|
|
248859
248850
|
}
|
|
248860
248851
|
}
|
|
248861
248852
|
const real = relative30(root, realpathSync19(path2));
|
|
248862
|
-
if (!real || real === ".." || real.startsWith(`..${sep32}`) ||
|
|
248853
|
+
if (!real || real === ".." || real.startsWith(`..${sep32}`) || isAbsolute19(real)) {
|
|
248863
248854
|
throw new Error("--fix cannot write outside the content directory.");
|
|
248864
248855
|
}
|
|
248865
248856
|
return path2;
|
|
@@ -249059,7 +249050,7 @@ function safeEvidencePath(contentDir2, name) {
|
|
|
249059
249050
|
const dir = realDirIn(root, ".himi/one-app");
|
|
249060
249051
|
if (!dir) throw new Error("The design evidence directory is not a regular directory.");
|
|
249061
249052
|
const real = relative30(root, realpathSync19(dir));
|
|
249062
|
-
if (!real || real === ".." || real.startsWith(`..${sep32}`) ||
|
|
249053
|
+
if (!real || real === ".." || real.startsWith(`..${sep32}`) || isAbsolute19(real)) {
|
|
249063
249054
|
throw new Error("The design evidence directory is outside the content directory.");
|
|
249064
249055
|
}
|
|
249065
249056
|
const path2 = join154(dir, name);
|
|
@@ -278659,7 +278650,7 @@ var init_customer_build = __esm({
|
|
|
278659
278650
|
|
|
278660
278651
|
// src/site-analyze/apply.ts
|
|
278661
278652
|
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
|
|
278653
|
+
import { dirname as dirname87, isAbsolute as isAbsolute20, join as join201, resolve as resolve125, sep as sep34 } from "node:path";
|
|
278663
278654
|
import { spawnSync as spawnSync13 } from "node:child_process";
|
|
278664
278655
|
function inRepoBakeRefusal(repoRoot2, shell) {
|
|
278665
278656
|
if (isBrandable(repoRoot2, shell)) return null;
|
|
@@ -278993,7 +278984,7 @@ function buildMergedContract(options2) {
|
|
|
278993
278984
|
const branding = merged.branding ?? {};
|
|
278994
278985
|
const staged = [];
|
|
278995
278986
|
const contained = (root, rel2) => {
|
|
278996
|
-
if (
|
|
278987
|
+
if (isAbsolute20(rel2)) return void 0;
|
|
278997
278988
|
const full = resolve125(root, rel2);
|
|
278998
278989
|
return full.startsWith(resolve125(root) + sep34) ? full : void 0;
|
|
278999
278990
|
};
|
|
@@ -281467,7 +281458,7 @@ __export(check_report_exports, {
|
|
|
281467
281458
|
import { createHash as createHash98, randomUUID as randomUUID20 } from "node:crypto";
|
|
281468
281459
|
import { request as httpRequest2 } from "node:http";
|
|
281469
281460
|
import { createConnection } from "node:net";
|
|
281470
|
-
import { isAbsolute as
|
|
281461
|
+
import { isAbsolute as isAbsolute21, relative as relative36, resolve as resolve127 } from "node:path";
|
|
281471
281462
|
function credentialValue(value2) {
|
|
281472
281463
|
const v2 = value2.trim();
|
|
281473
281464
|
if (!v2 || /^(?:[01]|true|false|yes|no|on|off|null|none|undefined)$/i.test(v2)) return null;
|
|
@@ -281559,9 +281550,9 @@ function boundedText(value2, secrets) {
|
|
|
281559
281550
|
return clean3.length <= MAX_TEXT4 ? clean3 : `${clean3.slice(0, MAX_TEXT4 - 1)}\u2026`;
|
|
281560
281551
|
}
|
|
281561
281552
|
function contentRelative(file2, contentDir2) {
|
|
281562
|
-
const rel2 =
|
|
281553
|
+
const rel2 = isAbsolute21(file2) ? relative36(resolve127(contentDir2), file2) : file2;
|
|
281563
281554
|
const normal = rel2.split(/[\\/]+/).filter((part5) => part5 && part5 !== ".");
|
|
281564
|
-
if (!normal.length ||
|
|
281555
|
+
if (!normal.length || isAbsolute21(rel2) || normal.includes("..")) return void 0;
|
|
281565
281556
|
const joined = normal.join("/");
|
|
281566
281557
|
return joined.length <= 256 ? joined : void 0;
|
|
281567
281558
|
}
|
|
@@ -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.1814.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": "e11433feaaaa9b4b4658b76c97d474221a7542e2125cc3bc94e5d05d"
|
|
86
86
|
}
|