@wix/himalaya-cli 0.1959.0 → 0.1961.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +311 -117
- package/guides/qa-builds.md +17 -17
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -3964,6 +3964,7 @@ var init_himi_package = __esm({
|
|
|
3964
3964
|
var ICON_VIEW_BOX, ICON_STROKE_WIDTH, ICON_FALLBACK, ICON_CATALOG, ICON_NORMALIZED_INDEX, ICON_NAMES;
|
|
3965
3965
|
var init_icon_catalog_generated = __esm({
|
|
3966
3966
|
"../../core/ts/src/icon-catalog.generated.ts"() {
|
|
3967
|
+
"use strict";
|
|
3967
3968
|
init_define_HHP_CATALOG();
|
|
3968
3969
|
ICON_VIEW_BOX = 24;
|
|
3969
3970
|
ICON_STROKE_WIDTH = 2;
|
|
@@ -10714,7 +10715,7 @@ var init_catalog_cache = __esm({
|
|
|
10714
10715
|
return [f2.path, f2];
|
|
10715
10716
|
})
|
|
10716
10717
|
);
|
|
10717
|
-
const seen = /* @__PURE__ */ new Set(),
|
|
10718
|
+
const seen = /* @__PURE__ */ new Set(), decoded3 = [];
|
|
10718
10719
|
let total = 0;
|
|
10719
10720
|
for (const f2 of pack.files) {
|
|
10720
10721
|
file(f2);
|
|
@@ -10731,7 +10732,7 @@ var init_catalog_cache = __esm({
|
|
|
10731
10732
|
if (total > MAX_EXPANDED || body.length !== f2.bytes || spec.bytes !== f2.bytes || hash(body) !== f2.digest || spec.digest !== f2.digest)
|
|
10732
10733
|
fail("catalog_digest_mismatch", "reference file size/digest mismatch");
|
|
10733
10734
|
seen.add(f2.path);
|
|
10734
|
-
|
|
10735
|
+
decoded3.push({ path: f2.path, body });
|
|
10735
10736
|
}
|
|
10736
10737
|
for (const r3 of m2.resources.filter(
|
|
10737
10738
|
(r4) => r4.pack ? r4.pack === "references" : !["templates", "examples"].includes(r4.kind ?? "") && r4.id !== "foundations/browser-runtime"
|
|
@@ -10747,7 +10748,7 @@ var init_catalog_cache = __esm({
|
|
|
10747
10748
|
const tempRel = `staging-${randomUUID()}`;
|
|
10748
10749
|
mkdirSync3(this.target(tempRel), { recursive: true });
|
|
10749
10750
|
try {
|
|
10750
|
-
for (const f2 of
|
|
10751
|
+
for (const f2 of decoded3) {
|
|
10751
10752
|
const p2 = this.target(`${tempRel}/${f2.path}`);
|
|
10752
10753
|
mkdirSync3(dirname6(p2), { recursive: true });
|
|
10753
10754
|
writeFileSync3(p2, f2.body);
|
|
@@ -10757,7 +10758,7 @@ var init_catalog_cache = __esm({
|
|
|
10757
10758
|
mkdirSync3(dirname6(dest), { recursive: true });
|
|
10758
10759
|
if (!existsSync5(dest)) renameSync(this.target(tempRel), dest);
|
|
10759
10760
|
else {
|
|
10760
|
-
for (const f2 of
|
|
10761
|
+
for (const f2 of decoded3)
|
|
10761
10762
|
this.readCachedFile(selected, expected.get(f2.path));
|
|
10762
10763
|
renameSync(
|
|
10763
10764
|
this.target(`${tempRel}/manifest.json`),
|
|
@@ -21514,46 +21515,76 @@ var init_validator = __esm({
|
|
|
21514
21515
|
});
|
|
21515
21516
|
|
|
21516
21517
|
// ../../core/dev-server/src/bundle-source-map.ts
|
|
21517
|
-
function
|
|
21518
|
+
function decode(mapJson) {
|
|
21519
|
+
decodes += 1;
|
|
21520
|
+
let map2;
|
|
21518
21521
|
try {
|
|
21519
|
-
|
|
21520
|
-
|
|
21521
|
-
|
|
21522
|
-
|
|
21523
|
-
|
|
21524
|
-
|
|
21525
|
-
|
|
21526
|
-
|
|
21527
|
-
|
|
21528
|
-
|
|
21529
|
-
|
|
21530
|
-
|
|
21531
|
-
|
|
21532
|
-
|
|
21533
|
-
|
|
21534
|
-
|
|
21535
|
-
|
|
21536
|
-
|
|
21537
|
-
|
|
21538
|
-
}
|
|
21539
|
-
|
|
21540
|
-
shift = 0;
|
|
21541
|
-
value2 = 0;
|
|
21522
|
+
map2 = JSON.parse(mapJson);
|
|
21523
|
+
} catch {
|
|
21524
|
+
return null;
|
|
21525
|
+
}
|
|
21526
|
+
if (!map2 || !Array.isArray(map2.sources) || typeof map2.mappings !== "string") return null;
|
|
21527
|
+
const rawLines = map2.mappings.split(";");
|
|
21528
|
+
const out2 = { sources: map2.sources, lineCount: rawLines.length, lines: [] };
|
|
21529
|
+
let srcIdx = 0, srcLine = 0;
|
|
21530
|
+
for (let li2 = 0; li2 < rawLines.length; li2++) {
|
|
21531
|
+
const segments2 = [];
|
|
21532
|
+
out2.lines.push(segments2);
|
|
21533
|
+
let genColAcc = 0;
|
|
21534
|
+
for (const seg2 of rawLines[li2].split(",")) {
|
|
21535
|
+
if (!seg2) continue;
|
|
21536
|
+
const fields2 = [];
|
|
21537
|
+
let shift = 0, value2 = 0;
|
|
21538
|
+
for (const ch2 of seg2) {
|
|
21539
|
+
const digit = VLQ.indexOf(ch2);
|
|
21540
|
+
if (digit < 0) {
|
|
21541
|
+
out2.bad = { line: li2, before: segments2.length };
|
|
21542
|
+
return out2;
|
|
21542
21543
|
}
|
|
21543
|
-
|
|
21544
|
-
|
|
21544
|
+
value2 += (digit & 31) << shift;
|
|
21545
|
+
if (digit & 32) {
|
|
21546
|
+
shift += 5;
|
|
21545
21547
|
continue;
|
|
21546
21548
|
}
|
|
21547
|
-
|
|
21548
|
-
|
|
21549
|
-
|
|
21550
|
-
srcCol += fields2[3];
|
|
21551
|
-
if (li2 === genLine - 1) {
|
|
21552
|
-
if (genColAcc > genCol && best) break;
|
|
21553
|
-
best = { srcIdx, srcLine };
|
|
21554
|
-
}
|
|
21549
|
+
fields2.push(value2 & 1 ? -(value2 >>> 1) : value2 >>> 1);
|
|
21550
|
+
shift = 0;
|
|
21551
|
+
value2 = 0;
|
|
21555
21552
|
}
|
|
21553
|
+
if (fields2.length < 4) {
|
|
21554
|
+
genColAcc += fields2[0] ?? 0;
|
|
21555
|
+
continue;
|
|
21556
|
+
}
|
|
21557
|
+
genColAcc += fields2[0];
|
|
21558
|
+
srcIdx += fields2[1];
|
|
21559
|
+
srcLine += fields2[2];
|
|
21560
|
+
segments2.push({ genCol: genColAcc, srcIdx, srcLine });
|
|
21561
|
+
}
|
|
21562
|
+
}
|
|
21563
|
+
return out2;
|
|
21564
|
+
}
|
|
21565
|
+
function decodedMap(mapJson) {
|
|
21566
|
+
if (decoded2.has(mapJson)) return decoded2.get(mapJson);
|
|
21567
|
+
const result = decode(mapJson);
|
|
21568
|
+
if (decoded2.size >= DECODED_MAX) decoded2.delete(decoded2.keys().next().value);
|
|
21569
|
+
decoded2.set(mapJson, result);
|
|
21570
|
+
return result;
|
|
21571
|
+
}
|
|
21572
|
+
function mapBundleFrame(mapJson, genLine, genCol) {
|
|
21573
|
+
try {
|
|
21574
|
+
const map2 = decodedMap(mapJson);
|
|
21575
|
+
if (!map2) return null;
|
|
21576
|
+
if (genLine < 1 || genLine > map2.lineCount) return null;
|
|
21577
|
+
const target = genLine - 1;
|
|
21578
|
+
if (map2.bad && map2.bad.line < target) return null;
|
|
21579
|
+
const segments2 = map2.lines[target] ?? [];
|
|
21580
|
+
let best = null;
|
|
21581
|
+
let reached = 0;
|
|
21582
|
+
for (const segment3 of segments2) {
|
|
21583
|
+
if (segment3.genCol > genCol && best) break;
|
|
21584
|
+
best = segment3;
|
|
21585
|
+
reached += 1;
|
|
21556
21586
|
}
|
|
21587
|
+
if (map2.bad && map2.bad.line === target && reached === map2.bad.before) return null;
|
|
21557
21588
|
if (!best || !map2.sources[best.srcIdx]) return null;
|
|
21558
21589
|
const raw = String(map2.sources[best.srcIdx]).replace(/^(\.\.\/)+/, "");
|
|
21559
21590
|
return `${raw}:${best.srcLine + 1}`;
|
|
@@ -21561,11 +21592,14 @@ function mapBundleFrame(mapJson, genLine, genCol) {
|
|
|
21561
21592
|
return null;
|
|
21562
21593
|
}
|
|
21563
21594
|
}
|
|
21564
|
-
var VLQ;
|
|
21595
|
+
var VLQ, decoded2, DECODED_MAX, decodes;
|
|
21565
21596
|
var init_bundle_source_map = __esm({
|
|
21566
21597
|
"../../core/dev-server/src/bundle-source-map.ts"() {
|
|
21567
21598
|
init_define_HHP_CATALOG();
|
|
21568
21599
|
VLQ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
21600
|
+
decoded2 = /* @__PURE__ */ new Map();
|
|
21601
|
+
DECODED_MAX = 8;
|
|
21602
|
+
decodes = 0;
|
|
21569
21603
|
}
|
|
21570
21604
|
});
|
|
21571
21605
|
|
|
@@ -31688,8 +31722,8 @@ async function rasterizeSvg(svg, scale = 3, inputPixelLimit = SHARP_INPUT_PIXEL_
|
|
|
31688
31722
|
const { width = 0, height = 0 } = await sharp(svg, { limitInputPixels: false }).metadata();
|
|
31689
31723
|
const edge = Math.max(width, height);
|
|
31690
31724
|
const density = edge > 0 ? Math.max(1, Math.min(72 * scale, 72 * SVG_RASTER_MAX_EDGE / edge)) : 72 * scale;
|
|
31691
|
-
const
|
|
31692
|
-
if (
|
|
31725
|
+
const decoded3 = Math.round(width * density / 72) * Math.round(height * density / 72);
|
|
31726
|
+
if (decoded3 > inputPixelLimit) {
|
|
31693
31727
|
throw new Error(`SVG is too large to rasterize: ${width}x${height} intrinsic size; give it a width/height (or viewBox) under ${Math.floor(72 * Math.sqrt(inputPixelLimit))}px per side`);
|
|
31694
31728
|
}
|
|
31695
31729
|
return sharp(svg, { density, limitInputPixels: inputPixelLimit }).resize({ width: SVG_RASTER_MAX_EDGE, height: SVG_RASTER_MAX_EDGE, fit: "inside", withoutEnlargement: true }).png().toBuffer();
|
|
@@ -44599,6 +44633,7 @@ function resolveIdiom(tokens2, ctx = {}) {
|
|
|
44599
44633
|
var IDIOM_CONTEXTS, UNSAFE_KEYS;
|
|
44600
44634
|
var init_idiom = __esm({
|
|
44601
44635
|
"../../core/ts/src/idiom.ts"() {
|
|
44636
|
+
"use strict";
|
|
44602
44637
|
init_define_HHP_CATALOG();
|
|
44603
44638
|
IDIOM_CONTEXTS = {
|
|
44604
44639
|
ios: { native: ["ios"] },
|
|
@@ -46360,6 +46395,7 @@ function shouldRevealError(args) {
|
|
|
46360
46395
|
var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
|
|
46361
46396
|
var init_validation = __esm({
|
|
46362
46397
|
"../../core/ts/src/validation.ts"() {
|
|
46398
|
+
"use strict";
|
|
46363
46399
|
init_define_HHP_CATALOG();
|
|
46364
46400
|
EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
|
|
46365
46401
|
URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
|
|
@@ -59221,10 +59257,10 @@ function richTextEditedHtml(originalHtml, originalText, nextText) {
|
|
|
59221
59257
|
}
|
|
59222
59258
|
continue;
|
|
59223
59259
|
}
|
|
59224
|
-
const
|
|
59225
|
-
if (raw.startsWith("&")) append(
|
|
59260
|
+
const decoded3 = decodeHTML(raw);
|
|
59261
|
+
if (raw.startsWith("&")) append(decoded3, start2, start2 + raw.length);
|
|
59226
59262
|
else {
|
|
59227
|
-
for (let i2 = 0; i2 <
|
|
59263
|
+
for (let i2 = 0; i2 < decoded3.length; i2++) append(decoded3[i2], start2 + i2, start2 + i2 + 1);
|
|
59228
59264
|
}
|
|
59229
59265
|
}
|
|
59230
59266
|
const entries = spans.map((span, i2) => ({ char: visible[i2], ...span }));
|
|
@@ -60614,16 +60650,16 @@ function getPdfFilenameFromUrl(url, defaultFilename = "document.pdf") {
|
|
|
60614
60650
|
if (!newURL) {
|
|
60615
60651
|
return defaultFilename;
|
|
60616
60652
|
}
|
|
60617
|
-
const
|
|
60653
|
+
const decode2 = (name) => {
|
|
60618
60654
|
try {
|
|
60619
|
-
let
|
|
60620
|
-
if (
|
|
60621
|
-
|
|
60622
|
-
if (
|
|
60655
|
+
let decoded3 = decodeURIComponent(name);
|
|
60656
|
+
if (decoded3.includes("/")) {
|
|
60657
|
+
decoded3 = stripPath(decoded3);
|
|
60658
|
+
if (decoded3.length === 4 && pdfRegex.test(decoded3)) {
|
|
60623
60659
|
return name;
|
|
60624
60660
|
}
|
|
60625
60661
|
}
|
|
60626
|
-
return
|
|
60662
|
+
return decoded3;
|
|
60627
60663
|
} catch {
|
|
60628
60664
|
return name;
|
|
60629
60665
|
}
|
|
@@ -60631,13 +60667,13 @@ function getPdfFilenameFromUrl(url, defaultFilename = "document.pdf") {
|
|
|
60631
60667
|
const pdfRegex = /\.pdf$/i;
|
|
60632
60668
|
const filename = stripPath(newURL.pathname);
|
|
60633
60669
|
if (pdfRegex.test(filename)) {
|
|
60634
|
-
return
|
|
60670
|
+
return decode2(filename);
|
|
60635
60671
|
}
|
|
60636
60672
|
if (newURL.searchParams.size > 0) {
|
|
60637
60673
|
const getLast = (iterator) => [...iterator].findLast((v2) => pdfRegex.test(v2));
|
|
60638
60674
|
const name = getLast(newURL.searchParams.values()) ?? getLast(newURL.searchParams.keys());
|
|
60639
60675
|
if (name) {
|
|
60640
|
-
return
|
|
60676
|
+
return decode2(name);
|
|
60641
60677
|
}
|
|
60642
60678
|
}
|
|
60643
60679
|
if (newURL.hash) {
|
|
@@ -60656,7 +60692,7 @@ function getPdfFilenameFromUrl(url, defaultFilename = "document.pdf") {
|
|
|
60656
60692
|
filenameStart--;
|
|
60657
60693
|
}
|
|
60658
60694
|
if (filenameStart < extensionStart) {
|
|
60659
|
-
return
|
|
60695
|
+
return decode2(hash3.slice(filenameStart, extensionStart + 4));
|
|
60660
60696
|
}
|
|
60661
60697
|
}
|
|
60662
60698
|
}
|
|
@@ -104382,7 +104418,7 @@ var init_pdf_worker_min = __esm({
|
|
|
104382
104418
|
e3.runningState >= 0 && (e3.runningState = t3);
|
|
104383
104419
|
throw new Error("Brotli error code: " + t3);
|
|
104384
104420
|
}
|
|
104385
|
-
return function
|
|
104421
|
+
return function decode2(e3, t3) {
|
|
104386
104422
|
let n3 = new State();
|
|
104387
104423
|
n3.input = new InputStream(e3);
|
|
104388
104424
|
initState(n3);
|
|
@@ -167650,8 +167686,8 @@ function contentDir(flags) {
|
|
|
167650
167686
|
function renameRestoredSource(restored, declaredApp, renamed) {
|
|
167651
167687
|
const text32 = {};
|
|
167652
167688
|
for (const entry of restored) {
|
|
167653
|
-
const
|
|
167654
|
-
if (Buffer.from(
|
|
167689
|
+
const decoded3 = entry.bytes.toString("utf8");
|
|
167690
|
+
if (Buffer.from(decoded3, "utf8").equals(entry.bytes)) text32[entry.path] = decoded3;
|
|
167655
167691
|
}
|
|
167656
167692
|
const sentineled = sentinelizeArchive(text32, declaredApp);
|
|
167657
167693
|
for (const entry of restored) {
|
|
@@ -177566,11 +177602,11 @@ function decodeCustomerSigningAssets(assets, expected, now) {
|
|
|
177566
177602
|
if (!/^[A-Z0-9]{10}$/.test(expected.teamId) || !/^[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)+$/.test(expected.bundleId)) {
|
|
177567
177603
|
return refuse2("customer_signing_identity_mismatch");
|
|
177568
177604
|
}
|
|
177569
|
-
const
|
|
177570
|
-
if (!
|
|
177571
|
-
if (!
|
|
177572
|
-
if (!
|
|
177573
|
-
const cert =
|
|
177605
|
+
const decoded3 = decodePkcs12(Buffer.from(assets.certificate), assets.certificatePassword);
|
|
177606
|
+
if (!decoded3?.certificate) return refuse2("customer_certificate_invalid");
|
|
177607
|
+
if (!decoded3.privateKeyPem) return refuse2("customer_private_key_missing");
|
|
177608
|
+
if (!decoded3.matchesCertificate) return refuse2("customer_private_key_mismatch");
|
|
177609
|
+
const cert = decoded3.certificate;
|
|
177574
177610
|
if (Date.parse(cert.validTo) <= now.getTime()) return refuse2("customer_certificate_expired");
|
|
177575
177611
|
if (Date.parse(cert.validFrom) > now.getTime()) return refuse2("customer_certificate_not_yet_valid");
|
|
177576
177612
|
const profile = readCustomerProfile(assets.provisioningProfile);
|
|
@@ -177598,19 +177634,19 @@ function apnsEnvironment(entitlements, required3) {
|
|
|
177598
177634
|
if (apns !== "production") return refuse2("customer_profile_apns_mismatch");
|
|
177599
177635
|
return "production";
|
|
177600
177636
|
}
|
|
177601
|
-
function toBundle(assets, expected,
|
|
177637
|
+
function toBundle(assets, expected, decoded3, profileType, apns, deviceCount) {
|
|
177602
177638
|
return {
|
|
177603
177639
|
signing: "byo",
|
|
177604
177640
|
...expected,
|
|
177605
177641
|
profileType,
|
|
177606
|
-
profileFileName: String(
|
|
177642
|
+
profileFileName: String(decoded3.profile.UUID),
|
|
177607
177643
|
certificate: Buffer.from(assets.certificate).toString("base64"),
|
|
177608
177644
|
certificatePassword: Buffer.from(assets.certificatePassword).toString("base64"),
|
|
177609
177645
|
provisioningProfile: Buffer.from(assets.provisioningProfile).toString("base64"),
|
|
177610
177646
|
profileSha256: sha2564(assets.provisioningProfile),
|
|
177611
|
-
certificateSha256: sha2564(
|
|
177612
|
-
certificateSha1: createHash30("sha1").update(
|
|
177613
|
-
expiresAt: new Date(Math.min(
|
|
177647
|
+
certificateSha256: sha2564(decoded3.cert.raw),
|
|
177648
|
+
certificateSha1: createHash30("sha1").update(decoded3.cert.raw).digest("hex").toUpperCase(),
|
|
177649
|
+
expiresAt: new Date(Math.min(decoded3.expiration, Date.parse(decoded3.cert.validTo))).toISOString(),
|
|
177614
177650
|
...apns ? { apnsEnvironment: apns } : {},
|
|
177615
177651
|
deviceCount
|
|
177616
177652
|
};
|
|
@@ -177625,14 +177661,14 @@ function inspectCustomerSigningAssets(assets, expected, now = /* @__PURE__ */ ne
|
|
|
177625
177661
|
if (stored.profile.ProvisionsAllDevices === true || stored.entitlements["get-task-allow"] !== false || !Array.isArray(devices) || !devices.length || devices.some((d2) => typeof d2 !== "string" || !d2)) {
|
|
177626
177662
|
return refuse2("customer_profile_not_adhoc");
|
|
177627
177663
|
}
|
|
177628
|
-
const
|
|
177629
|
-
const apns = apnsEnvironment(
|
|
177630
|
-
return toBundle(assets, expected,
|
|
177664
|
+
const decoded3 = decodeCustomerSigningAssets(assets, expected, now);
|
|
177665
|
+
const apns = apnsEnvironment(decoded3.entitlements, true);
|
|
177666
|
+
return toBundle(assets, expected, decoded3, "AD_HOC", apns, devices.length);
|
|
177631
177667
|
}
|
|
177632
177668
|
function customerDistributionTeamId(assets) {
|
|
177633
|
-
const
|
|
177634
|
-
if (!
|
|
177635
|
-
const ids2 =
|
|
177669
|
+
const decoded3 = decodePkcs12(Buffer.from(assets.certificate), assets.certificatePassword);
|
|
177670
|
+
if (!decoded3?.certificate) return void 0;
|
|
177671
|
+
const ids2 = decoded3.certificate.subject.split("\n").flatMap((line) => {
|
|
177636
177672
|
const match = /^OU=([A-Z0-9]{10})$/.exec(line);
|
|
177637
177673
|
return match ? [match[1]] : [];
|
|
177638
177674
|
});
|
|
@@ -177641,8 +177677,8 @@ function customerDistributionTeamId(assets) {
|
|
|
177641
177677
|
function inspectCustomerAppStoreSigningAssets(assets, expected, now = /* @__PURE__ */ new Date()) {
|
|
177642
177678
|
const teamId = expected.teamId ?? customerDistributionTeamId(assets);
|
|
177643
177679
|
if (!teamId) {
|
|
177644
|
-
const
|
|
177645
|
-
return refuse2(
|
|
177680
|
+
const decoded4 = decodePkcs12(Buffer.from(assets.certificate), assets.certificatePassword);
|
|
177681
|
+
return refuse2(decoded4?.certificate ? "customer_signing_identity_mismatch" : "customer_certificate_invalid");
|
|
177646
177682
|
}
|
|
177647
177683
|
const stored = profileEntitlements(assets.provisioningProfile);
|
|
177648
177684
|
const devices = stored.profile.ProvisionedDevices;
|
|
@@ -177650,9 +177686,9 @@ function inspectCustomerAppStoreSigningAssets(assets, expected, now = /* @__PURE
|
|
|
177650
177686
|
return refuse2("customer_profile_not_app_store");
|
|
177651
177687
|
}
|
|
177652
177688
|
const identity = { bundleId: expected.bundleId, teamId };
|
|
177653
|
-
const
|
|
177654
|
-
const apns = apnsEnvironment(
|
|
177655
|
-
return toBundle(assets, identity,
|
|
177689
|
+
const decoded3 = decodeCustomerSigningAssets(assets, identity, now);
|
|
177690
|
+
const apns = apnsEnvironment(decoded3.entitlements, false);
|
|
177691
|
+
return toBundle(assets, identity, decoded3, "APP_STORE", apns, 0);
|
|
177656
177692
|
}
|
|
177657
177693
|
var sha2564, refuse2;
|
|
177658
177694
|
var init_customer_signing_assets = __esm({
|
|
@@ -180192,7 +180228,9 @@ __export(template_adopt_exports, {
|
|
|
180192
180228
|
leadingEmptySlot: () => leadingEmptySlot,
|
|
180193
180229
|
matrixMarkdown: () => matrixMarkdown,
|
|
180194
180230
|
moduleEvaluationCalls: () => moduleEvaluationCalls,
|
|
180231
|
+
moduleEvaluationParses: () => moduleEvaluationParses,
|
|
180195
180232
|
primaryNodeIds: () => primaryNodeIds,
|
|
180233
|
+
readAppEntrySources: () => readAppEntrySources,
|
|
180196
180234
|
readAppSources: () => readAppSources,
|
|
180197
180235
|
removeScreens: () => removeScreens,
|
|
180198
180236
|
replaceScreen: () => replaceScreen,
|
|
@@ -180209,12 +180247,16 @@ __export(template_adopt_exports, {
|
|
|
180209
180247
|
import { existsSync as existsSync55, lstatSync as lstatSync19, mkdirSync as mkdirSync27, readdirSync as readdirSync31, readFileSync as readFileSync59, renameSync as renameSync11, statSync as statSync18, writeFileSync as writeFileSync23 } from "node:fs";
|
|
180210
180248
|
import { dirname as dirname33, join as join48, posix as posix2, relative as relative13 } from "node:path";
|
|
180211
180249
|
import ts10 from "typescript";
|
|
180212
|
-
function
|
|
180250
|
+
function readAppEntrySources(dir) {
|
|
180213
180251
|
const devPath = join48(dir, "dev", "index.ts");
|
|
180214
180252
|
const configPath = join48(dir, "config.ts");
|
|
180215
180253
|
if (!existsSync55(devPath) || !existsSync55(configPath)) {
|
|
180216
180254
|
throw new TrimRefusal(`no dev/index.ts + config.ts under ${dir} \u2014 run this in (or point --content at) an app \`himi init --template\` scaffolded`);
|
|
180217
180255
|
}
|
|
180256
|
+
return { dev: readFileSync59(devPath, "utf8"), config: readFileSync59(configPath, "utf8") };
|
|
180257
|
+
}
|
|
180258
|
+
function readAppSources(dir) {
|
|
180259
|
+
const { dev, config } = readAppEntrySources(dir);
|
|
180218
180260
|
const workers = /* @__PURE__ */ new Map();
|
|
180219
180261
|
const root = join48(dir, "tier5-src");
|
|
180220
180262
|
if (existsSync55(root)) {
|
|
@@ -180235,10 +180277,24 @@ function readAppSources(dir) {
|
|
|
180235
180277
|
workers.set(name, files);
|
|
180236
180278
|
}
|
|
180237
180279
|
}
|
|
180238
|
-
return { dev
|
|
180280
|
+
return { dev, config, workers };
|
|
180239
180281
|
}
|
|
180240
180282
|
function moduleEvaluationCalls(text32, fileName = "worker.ts") {
|
|
180241
|
-
const
|
|
180283
|
+
const kind = /\.[cm]?tsx$|\.jsx$/.test(fileName) ? ts10.ScriptKind.TSX : ts10.ScriptKind.TS;
|
|
180284
|
+
const key4 = `${kind}\0${text32}`;
|
|
180285
|
+
const cached3 = moduleCallsCache.get(key4);
|
|
180286
|
+
if (cached3) return [...cached3];
|
|
180287
|
+
const calls = parseModuleEvaluationCalls(text32, fileName, kind);
|
|
180288
|
+
if (moduleCallsCache.size >= MODULE_CALLS_CACHE_MAX) moduleCallsCache.delete(moduleCallsCache.keys().next().value);
|
|
180289
|
+
moduleCallsCache.set(key4, calls);
|
|
180290
|
+
return [...calls];
|
|
180291
|
+
}
|
|
180292
|
+
function moduleEvaluationParses() {
|
|
180293
|
+
return moduleCallParses;
|
|
180294
|
+
}
|
|
180295
|
+
function parseModuleEvaluationCalls(text32, fileName, kind) {
|
|
180296
|
+
moduleCallParses += 1;
|
|
180297
|
+
const source2 = ts10.createSourceFile(fileName, text32, ts10.ScriptTarget.Latest, false, kind);
|
|
180242
180298
|
const out2 = [];
|
|
180243
180299
|
const label4 = (callee) => {
|
|
180244
180300
|
let e2 = callee;
|
|
@@ -180588,7 +180644,7 @@ function findRoute(app2, id) {
|
|
|
180588
180644
|
return app2.routes.find((r3) => r3.label === id);
|
|
180589
180645
|
}
|
|
180590
180646
|
function replaceScreen(dir, id, entry) {
|
|
180591
|
-
const src =
|
|
180647
|
+
const src = readAppEntrySources(dir);
|
|
180592
180648
|
const app2 = parseApp(src.dev, src.config);
|
|
180593
180649
|
const r3 = findRoute(app2, id);
|
|
180594
180650
|
if (!r3) throw new TrimRefusal(`no screen "${id}" in dev/index.ts \u2014 \`himi template screens\` lists the ids`);
|
|
@@ -180906,7 +180962,7 @@ function droppedPrimaryTaps(dropped, primaryIds = /* @__PURE__ */ new Set()) {
|
|
|
180906
180962
|
}
|
|
180907
180963
|
return [...out2.values()];
|
|
180908
180964
|
}
|
|
180909
|
-
var ADOPT_FILE, JOURNEY_STUB_FILE, ADOPT_MATRIX_FILE, WIX_MODULE, SDK_MODULE, LOCAL_ONLY_SDK, RELATIVE_IMPORT, PURE_CALLS, BUILTIN_CONSTRUCTORS, reaches, UI_VERB, DESTRUCTIVE_VERB, PAYMENT_VERB, WRITE_VERB, ABORT_DIALOG, DESTRUCTIVE_ANYWHERE, VIEW_STATE, COMMIT_TRIGGER, PLACEHOLDER, SAMPLE_COPY, IGNORED, SUBMIT, INPUT_TYPES, LIST_HOSTS;
|
|
180965
|
+
var ADOPT_FILE, JOURNEY_STUB_FILE, ADOPT_MATRIX_FILE, WIX_MODULE, SDK_MODULE, LOCAL_ONLY_SDK, RELATIVE_IMPORT, PURE_CALLS, BUILTIN_CONSTRUCTORS, moduleCallsCache, MODULE_CALLS_CACHE_MAX, moduleCallParses, reaches, UI_VERB, DESTRUCTIVE_VERB, PAYMENT_VERB, WRITE_VERB, ABORT_DIALOG, DESTRUCTIVE_ANYWHERE, VIEW_STATE, COMMIT_TRIGGER, PLACEHOLDER, SAMPLE_COPY, IGNORED, SUBMIT, INPUT_TYPES, LIST_HOSTS;
|
|
180910
180966
|
var init_template_adopt = __esm({
|
|
180911
180967
|
"src/template-adopt.ts"() {
|
|
180912
180968
|
init_define_HHP_CATALOG();
|
|
@@ -180944,6 +181000,9 @@ var init_template_adopt = __esm({
|
|
|
180944
181000
|
RELATIVE_IMPORT = /(?:from|import)\s*\(?\s*["'](\.{1,2}\/[^"']+)["']/g;
|
|
180945
181001
|
PURE_CALLS = /* @__PURE__ */ new Set(["defineService"]);
|
|
180946
181002
|
BUILTIN_CONSTRUCTORS = /* @__PURE__ */ new Set(["Set", "Map", "WeakMap", "WeakSet", "Date", "Error", "TypeError", "RangeError", "URL", "URLSearchParams", "RegExp", "Array", "Object", "TextEncoder", "TextDecoder", "AbortController", "Uint8Array", "ArrayBuffer", "Intl.NumberFormat", "Intl.DateTimeFormat", "Intl.Collator", "Intl.PluralRules", "Intl.RelativeTimeFormat", "Intl.Segmenter", "Intl.ListFormat"]);
|
|
181003
|
+
moduleCallsCache = /* @__PURE__ */ new Map();
|
|
181004
|
+
MODULE_CALLS_CACHE_MAX = 4096;
|
|
181005
|
+
moduleCallParses = 0;
|
|
180947
181006
|
reaches = (r3) => !!r3 && (r3.wixModules.length > 0 || r3.rawWixApi || r3.fetch || r3.unresolvedImports.length > 0);
|
|
180948
181007
|
UI_VERB = /^(?:change|select|search|filter|sort|toggle|open|close|show|hide|expand|collapse|refresh|reload|load|retry|next|prev|previous|page|go|nav|navigate|tab|focus|blur|scroll|dismiss|clear[A-Z]?\w*(?:Filter|Search|Query)|set\w*(?:Filter|Tab|Query|Sort|Draft|Mode|View|Page))/;
|
|
180949
181008
|
DESTRUCTIVE_VERB = /^(?:delete|remove|cancel|archive|refund|void|unpublish|revoke|block|ban|deactivate|disable|reject|leave|unfollow|unsubscribe|destroy|purge|wipe)/i;
|
|
@@ -196047,7 +196106,7 @@ function validateEntry(app2, raw, fail19) {
|
|
|
196047
196106
|
const at2 = `apps.${app2}`;
|
|
196048
196107
|
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) fail19(`${at2} must be a JSON object`);
|
|
196049
196108
|
const o2 = raw;
|
|
196050
|
-
const extra = Object.keys(o2).filter((k3) => !["stage", "modules", "adapters"].includes(k3));
|
|
196109
|
+
const extra = Object.keys(o2).filter((k3) => !["stage", "modules", "adapters", "dormantGraph"].includes(k3));
|
|
196051
196110
|
if (extra.length) fail19(`${at2}: unknown key(s): ${extra.join(", ")}`);
|
|
196052
196111
|
if (typeof o2.stage !== "string" || !o2.stage) fail19(`${at2}.stage must be a non-empty string`);
|
|
196053
196112
|
const modules = {};
|
|
@@ -196061,7 +196120,20 @@ function validateEntry(app2, raw, fail19) {
|
|
|
196061
196120
|
}
|
|
196062
196121
|
const adapters = o2.adapters ?? [];
|
|
196063
196122
|
if (!Array.isArray(adapters) || adapters.some((a3) => typeof a3 !== "string")) fail19(`${at2}.adapters must be an array of satellite names`);
|
|
196064
|
-
|
|
196123
|
+
const entry = { stage: o2.stage, modules, adapters: [...new Set(adapters)] };
|
|
196124
|
+
if (o2.dormantGraph !== void 0) entry.dormantGraph = validateDormantGraph(at2, o2.dormantGraph, fail19);
|
|
196125
|
+
return entry;
|
|
196126
|
+
}
|
|
196127
|
+
function validateDormantGraph(at2, raw, fail19) {
|
|
196128
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) fail19(`${at2}.dormantGraph must be an object {"debug": boolean, "release": boolean}`);
|
|
196129
|
+
const o2 = raw;
|
|
196130
|
+
const extra = Object.keys(o2).filter((k3) => k3 !== "debug" && k3 !== "release");
|
|
196131
|
+
if (extra.length) fail19(`${at2}.dormantGraph: unknown key(s): ${extra.join(", ")}`);
|
|
196132
|
+
for (const key4 of ["debug", "release"]) {
|
|
196133
|
+
if (o2[key4] !== void 0 && typeof o2[key4] !== "boolean") fail19(`${at2}.dormantGraph.${key4} must be a boolean (got ${JSON.stringify(o2[key4])})`);
|
|
196134
|
+
}
|
|
196135
|
+
if (o2.release === true) fail19(`${at2}.dormantGraph.release is true, but no slice record (S1) names this app: a Release build constructs nothing from Core until S1`);
|
|
196136
|
+
return { debug: o2.debug === true, release: false };
|
|
196065
196137
|
}
|
|
196066
196138
|
function validateAdoptionStages(raw, where = ADOPTION_STAGES_PATH) {
|
|
196067
196139
|
const fail19 = (why) => {
|
|
@@ -196212,6 +196284,11 @@ function declaredAuth(configTs) {
|
|
|
196212
196284
|
visit(initializer);
|
|
196213
196285
|
return out2;
|
|
196214
196286
|
}
|
|
196287
|
+
function configLiteral(configTs, key4) {
|
|
196288
|
+
const file2 = ts18.createSourceFile("config.ts", configTs, ts18.ScriptTarget.Latest, true, ts18.ScriptKind.TS);
|
|
196289
|
+
const app2 = appObject(file2);
|
|
196290
|
+
return app2 && literalProp(app2, key4);
|
|
196291
|
+
}
|
|
196215
196292
|
function pushPayloadAdapter(configTs) {
|
|
196216
196293
|
const file2 = ts18.createSourceFile("config.ts", configTs, ts18.ScriptTarget.Latest, true, ts18.ScriptKind.TS);
|
|
196217
196294
|
const push = appObject(file2)?.properties.find((p2) => propName6(p2) === "push");
|
|
@@ -196310,7 +196387,7 @@ function readNativeCoreAdoption(app2, opts = {}) {
|
|
|
196310
196387
|
checkListedAdapters(app2, entry, table, fail19);
|
|
196311
196388
|
const derived2 = needs.adapters.filter((a3) => a3 in table);
|
|
196312
196389
|
const adapters = [.../* @__PURE__ */ new Set([...derived2, ...entry.adapters])];
|
|
196313
|
-
return { app: app2, satellites: [NATIVE_CORE_BASE_SATELLITE_NAME, ...adapters], adapters, stage: entry.stage };
|
|
196390
|
+
return { app: app2, satellites: [NATIVE_CORE_BASE_SATELLITE_NAME, ...adapters], adapters, stage: entry.stage, dormantGraph: entry.dormantGraph ?? { debug: false, release: false } };
|
|
196314
196391
|
}
|
|
196315
196392
|
var ADOPTION_STAGES_KIND, ADOPTION_STAGES_SCHEMA_VERSION, ADOPTION_STAGES_PATH, RUNTIME_SERVED_APPS, ACTIVATION_MODULES, STAGE_OWNERS, WIX_PROVIDER_FACTORIES, MEMBER_FACTORY, MEMBER_PROVIDER_ID, readText;
|
|
196316
196393
|
var init_native_core_needs = __esm({
|
|
@@ -196349,6 +196426,78 @@ var init_native_core_needs = __esm({
|
|
|
196349
196426
|
}
|
|
196350
196427
|
});
|
|
196351
196428
|
|
|
196429
|
+
// ../native-config/native-core-dormant.ts
|
|
196430
|
+
function renderNativeCoreIosFlags(flags, indent) {
|
|
196431
|
+
if (!flags.debug) return [];
|
|
196432
|
+
return [`${indent}SWIFT_ACTIVE_COMPILATION_CONDITIONS: "$(inherited) ${DORMANT_FLAG}"`];
|
|
196433
|
+
}
|
|
196434
|
+
function renderNativeCoreAndroidFlags(flags, indent) {
|
|
196435
|
+
const field = (value2) => `buildConfigField("boolean", "${DORMANT_FLAG}", "${value2}")`;
|
|
196436
|
+
return [
|
|
196437
|
+
`${indent}buildTypes {`,
|
|
196438
|
+
`${indent} getByName("debug") { ${field(flags.debug)} }`,
|
|
196439
|
+
`${indent} getByName("release") { ${field(flags.release)} }`,
|
|
196440
|
+
`${indent}}`
|
|
196441
|
+
];
|
|
196442
|
+
}
|
|
196443
|
+
function renderNativeCoreSwiftImport(indent) {
|
|
196444
|
+
return [`${indent}#if canImport(${NATIVE_CORE_SATELLITE_PRODUCT}) && HIMALAYA_LINKED_${NATIVE_CORE_SATELLITE_PRODUCT}`, `${indent}import ${NATIVE_CORE_SATELLITE_PRODUCT}`, `${indent}#endif`];
|
|
196445
|
+
}
|
|
196446
|
+
function renderNativeCoreSwiftInstall(indent) {
|
|
196447
|
+
return [`${indent}#if canImport(${NATIVE_CORE_SATELLITE_PRODUCT}) && HIMALAYA_LINKED_${NATIVE_CORE_SATELLITE_PRODUCT}`, `${indent}${NATIVE_CORE_SATELLITE_PRODUCT}.install()`, `${indent}#endif`];
|
|
196448
|
+
}
|
|
196449
|
+
function isValidHeaderValue(value2) {
|
|
196450
|
+
return /^[\x20-\x7e]+$/.test(value2) && value2.trim() !== "";
|
|
196451
|
+
}
|
|
196452
|
+
function nativeCoreRuntimeMetadata(app2, configId) {
|
|
196453
|
+
const values = { mobileAppType: app2, mobileBrandedAppId: configId, mobileAppId: configId, rpcCallerId: app2 };
|
|
196454
|
+
for (const [field, value2] of Object.entries(values)) {
|
|
196455
|
+
if (!isValidHeaderValue(value2)) throw new Error(`native-config: ${app2}: NativeCoreRuntimeMetadata.${field} would be ${JSON.stringify(value2)}, which Core refuses as a request header (non-blank, printable ASCII only)`);
|
|
196456
|
+
}
|
|
196457
|
+
return values;
|
|
196458
|
+
}
|
|
196459
|
+
function renderNativeCoreRuntimeMetadataSwift(values) {
|
|
196460
|
+
return [
|
|
196461
|
+
`// ${GENERATED_HEADER}`,
|
|
196462
|
+
"",
|
|
196463
|
+
"/// The request-header identifiers the dormant Core graph is built with. Identifiers only, never a display name.",
|
|
196464
|
+
"enum NativeCoreRuntimeMetadata {",
|
|
196465
|
+
` static let mobileAppType = ${JSON.stringify(values.mobileAppType)}`,
|
|
196466
|
+
` static let mobileBrandedAppId = ${JSON.stringify(values.mobileBrandedAppId)}`,
|
|
196467
|
+
` static let mobileAppId = ${JSON.stringify(values.mobileAppId)}`,
|
|
196468
|
+
` static let rpcCallerId = ${JSON.stringify(values.rpcCallerId)}`,
|
|
196469
|
+
"}",
|
|
196470
|
+
""
|
|
196471
|
+
].join("\n");
|
|
196472
|
+
}
|
|
196473
|
+
function renderNativeCoreRuntimeMetadataKotlin(pkg, values) {
|
|
196474
|
+
return [
|
|
196475
|
+
`// ${GENERATED_HEADER}`,
|
|
196476
|
+
`package ${pkg}`,
|
|
196477
|
+
"",
|
|
196478
|
+
"/** The request-header identifiers the dormant Core graph is built with. Identifiers only, never a display name. */",
|
|
196479
|
+
"internal object NativeCoreRuntimeMetadata {",
|
|
196480
|
+
` const val mobileAppType = ${JSON.stringify(values.mobileAppType)}`,
|
|
196481
|
+
` const val mobileBrandedAppId = ${JSON.stringify(values.mobileBrandedAppId)}`,
|
|
196482
|
+
` const val mobileAppId = ${JSON.stringify(values.mobileAppId)}`,
|
|
196483
|
+
` const val rpcCallerId = ${JSON.stringify(values.rpcCallerId)}`,
|
|
196484
|
+
"}",
|
|
196485
|
+
""
|
|
196486
|
+
].join("\n");
|
|
196487
|
+
}
|
|
196488
|
+
var NATIVE_CORE_SATELLITE_PRODUCT, NATIVE_CORE_ANDROID_INSTALLER, LABEL_NATIVE_CORE_FLAGS, DORMANT_FLAG, dormantInAnyBuild, GENERATED_HEADER;
|
|
196489
|
+
var init_native_core_dormant = __esm({
|
|
196490
|
+
"../native-config/native-core-dormant.ts"() {
|
|
196491
|
+
init_define_HHP_CATALOG();
|
|
196492
|
+
NATIVE_CORE_SATELLITE_PRODUCT = "HimalayaWixNativeCore";
|
|
196493
|
+
NATIVE_CORE_ANDROID_INSTALLER = "io.himalaya.wixnativecore.NativeCoreInstall";
|
|
196494
|
+
LABEL_NATIVE_CORE_FLAGS = "himalaya:native-core:flags";
|
|
196495
|
+
DORMANT_FLAG = "HIMALAYA_NATIVE_CORE_DORMANT";
|
|
196496
|
+
dormantInAnyBuild = (flags) => flags.debug || flags.release;
|
|
196497
|
+
GENERATED_HEADER = "Generated by gen-native-config (Phase 2 \xA713) from config.ts \u2014 do not edit. Run `npm run native-config`.";
|
|
196498
|
+
}
|
|
196499
|
+
});
|
|
196500
|
+
|
|
196352
196501
|
// ../lib/swiftpm-manifest.ts
|
|
196353
196502
|
import { basename as basename19, resolve as resolve55 } from "node:path";
|
|
196354
196503
|
function parseSwiftManifest(src) {
|
|
@@ -197682,6 +197831,7 @@ __export(gen_native_config_exports, {
|
|
|
197682
197831
|
countBeginMarkers: () => countBeginMarkers,
|
|
197683
197832
|
countEndMarkers: () => countEndMarkers,
|
|
197684
197833
|
distBootInfo: () => distBootInfo,
|
|
197834
|
+
dormantGraphOf: () => dormantGraphOf,
|
|
197685
197835
|
duplicateModuleInstalls: () => duplicateModuleInstalls,
|
|
197686
197836
|
genCapabilityRegistrations: () => genCapabilityRegistrations,
|
|
197687
197837
|
genCoreModuleInstallers: () => genCoreModuleInstallers,
|
|
@@ -198080,6 +198230,32 @@ function renderNativeCoreAndroidInclude(plan, indent) {
|
|
|
198080
198230
|
function renderNativeCoreAndroidDep(plan, indent) {
|
|
198081
198231
|
return plan.androidDeps.map((p2) => `${indent}implementation(project("${p2}"))`);
|
|
198082
198232
|
}
|
|
198233
|
+
function dormantGraphOf(app2, root) {
|
|
198234
|
+
return readAdoptionStages(root)[app2]?.dormantGraph ?? { debug: false, release: false };
|
|
198235
|
+
}
|
|
198236
|
+
function genNativeCoreDormant(app2, flags, paths2, check) {
|
|
198237
|
+
if (!dormantInAnyBuild(flags)) return [];
|
|
198238
|
+
const requireBlock = (path2, kind) => {
|
|
198239
|
+
if (!existsSync81(path2)) return false;
|
|
198240
|
+
if (!hasMarkers(readFileSync89(path2, "utf8"), kind, LABEL_NATIVE_CORE_FLAGS)) {
|
|
198241
|
+
throw new Error(`native-config: ${app2}'s dormantGraph is set but ${path2} has no "${LABEL_NATIVE_CORE_FLAGS}" markers, so the flag would never reach the build. Add the marker pair (see apps/himi-owner-lite).`);
|
|
198242
|
+
}
|
|
198243
|
+
return true;
|
|
198244
|
+
};
|
|
198245
|
+
const files = [];
|
|
198246
|
+
if (requireBlock(paths2.ios, "yaml")) files.push(applyToFile(paths2.ios, "yaml", LABEL_NATIVE_CORE_FLAGS, (i2) => renderNativeCoreIosFlags(flags, i2), check));
|
|
198247
|
+
if (requireBlock(paths2.androidApp, "slash")) files.push(applyToFile(paths2.androidApp, "slash", LABEL_NATIVE_CORE_FLAGS, (i2) => renderNativeCoreAndroidFlags(flags, i2), check));
|
|
198248
|
+
const appRoot = paths2.root ? join79(paths2.root, "apps", app2) : appDir(app2);
|
|
198249
|
+
const configPath = join79(appRoot, "config.ts");
|
|
198250
|
+
const id = existsSync81(configPath) ? configLiteral(readFileSync89(configPath, "utf8"), "id") : void 0;
|
|
198251
|
+
if (!id) throw new Error(`native-config: ${app2}'s dormantGraph needs a string-literal \`id\` in ${configPath} for NativeCoreRuntimeMetadata`);
|
|
198252
|
+
const metadata2 = nativeCoreRuntimeMetadata(app2, id);
|
|
198253
|
+
const bootDirs = [...new Set(swiftFilesWithModuleMarkersIn(dirname46(paths2.ios)).map((file2) => dirname46(file2)))];
|
|
198254
|
+
for (const dir of bootDirs) files.push(applyWholeFile(join79(dir, "NativeCoreRuntimeMetadata.swift"), renderNativeCoreRuntimeMetadataSwift(metadata2), check));
|
|
198255
|
+
const androidSrc = join79(dirname46(paths2.androidApp), "src", "main", "kotlin", ...id.split("."));
|
|
198256
|
+
if (existsSync81(dirname46(paths2.androidApp))) files.push(applyWholeFile(join79(androidSrc, "NativeCoreRuntimeMetadata.kt"), renderNativeCoreRuntimeMetadataKotlin(id, metadata2), check));
|
|
198257
|
+
return files;
|
|
198258
|
+
}
|
|
198083
198259
|
function genNativeCore(app2, check, native = {}) {
|
|
198084
198260
|
const at2 = native.root ? join79(native.root, "apps", app2) : void 0;
|
|
198085
198261
|
const paths2 = {
|
|
@@ -198127,6 +198303,7 @@ function genNativeCore(app2, check, native = {}) {
|
|
|
198127
198303
|
}
|
|
198128
198304
|
const [ios, macos, androidSettings, androidApp] = targets;
|
|
198129
198305
|
return [
|
|
198306
|
+
...genNativeCoreDormant(app2, adoption.dormantGraph, { ios: ios.path, androidApp: androidApp.path, root: native.root }, check),
|
|
198130
198307
|
applyToFile(ios.path, "yaml", LABEL_NATIVE_CORE_IOS_PACKAGE, (i2) => renderNativeCoreIosPackage(plan, i2, "ios"), check),
|
|
198131
198308
|
applyToFile(ios.path, "yaml", LABEL_NATIVE_CORE_IOS_LINK, (i2) => renderNativeCoreIosLink(plan, i2, "ios"), check),
|
|
198132
198309
|
applyToFile(macos.path, "yaml", LABEL_NATIVE_CORE_IOS_PACKAGE, (i2) => renderNativeCoreIosPackage(plan, i2, "macos"), check),
|
|
@@ -198256,24 +198433,28 @@ function moduleLinkRenderers(modules, binary2) {
|
|
|
198256
198433
|
function renderModulesIosFlags(products, indent) {
|
|
198257
198434
|
return [`${indent}OTHER_SWIFT_FLAGS: "${["$(inherited)", ...products.map((p2) => `-D${linkedFlag(p2)}`)].join(" ")}"`];
|
|
198258
198435
|
}
|
|
198259
|
-
function renderModulesSwiftImport(indent) {
|
|
198260
|
-
|
|
198436
|
+
function renderModulesSwiftImport(indent, nativeCoreSatellite = false) {
|
|
198437
|
+
const modules = NATIVE_MODULES.flatMap(
|
|
198261
198438
|
(m2) => m2.ios ? [`${indent}#if canImport(${m2.ios.product}) && ${linkedFlag(m2.ios.product)}`, `${indent}import ${m2.ios.product}`, `${indent}#endif`] : []
|
|
198262
198439
|
);
|
|
198440
|
+
return nativeCoreSatellite ? [...modules, ...renderNativeCoreSwiftImport(indent)] : modules;
|
|
198263
198441
|
}
|
|
198264
|
-
function renderModulesSwiftInstall(indent) {
|
|
198265
|
-
|
|
198442
|
+
function renderModulesSwiftInstall(indent, nativeCoreSatellite = false) {
|
|
198443
|
+
const modules = NATIVE_MODULES.flatMap(
|
|
198266
198444
|
(m2) => m2.ios ? [`${indent}#if canImport(${m2.ios.product}) && ${linkedFlag(m2.ios.product)}`, `${indent}${m2.ios.product}.install()`, `${indent}#endif`] : []
|
|
198267
198445
|
);
|
|
198446
|
+
return nativeCoreSatellite ? [...modules, ...renderNativeCoreSwiftInstall(indent)] : modules;
|
|
198268
198447
|
}
|
|
198269
198448
|
function renderModulesAndroidInstallers(indent) {
|
|
198270
|
-
return NATIVE_MODULES.flatMap((m2) => m2.android ? [`${indent}"${m2.android.installer}",`] : []);
|
|
198449
|
+
return [...NATIVE_MODULES.flatMap((m2) => m2.android ? [`${indent}"${m2.android.installer}",`] : []), `${indent}"${NATIVE_CORE_ANDROID_INSTALLER}",`];
|
|
198271
198450
|
}
|
|
198272
198451
|
function genCoreModuleInstallers(check) {
|
|
198273
198452
|
return applyToFile(CORE_ANDROID_CAPABILITY_MODULES, "slash", LABEL_MODULES_ANDROID_INSTALLERS, renderModulesAndroidInstallers, check);
|
|
198274
198453
|
}
|
|
198275
198454
|
function swiftFilesWithModuleMarkers(app2) {
|
|
198276
|
-
|
|
198455
|
+
return swiftFilesWithModuleMarkersIn(join79(appDir(app2), "ios"));
|
|
198456
|
+
}
|
|
198457
|
+
function swiftFilesWithModuleMarkersIn(root) {
|
|
198277
198458
|
if (!existsSync81(root)) return [];
|
|
198278
198459
|
const out2 = [];
|
|
198279
198460
|
const stack = [root];
|
|
@@ -198928,7 +199109,7 @@ function genNativeConfig(app2, opts = {}) {
|
|
|
198928
199109
|
// published AARs (#4055): no source package, no settings include.
|
|
198929
199110
|
applyToFile(iosProjectYml(app2), "yaml", LABEL_MODULES_IOS_PACKAGE, moduleLinks.iosPackage, check),
|
|
198930
199111
|
applyToFile(iosProjectYml(app2), "yaml", LABEL_MODULES_IOS_LINK, moduleLinks.iosLink, check),
|
|
198931
|
-
applyModuleFlags(iosProjectYml(app2), moduleLinks.iosLinked(), check, adsIds),
|
|
199112
|
+
applyModuleFlags(iosProjectYml(app2), [...moduleLinks.iosLinked(), ...dormantInAnyBuild(dormantGraphOf(app2)) ? [NATIVE_CORE_SATELLITE_PRODUCT] : []], check, adsIds),
|
|
198932
199113
|
applyAdsIosCheck(iosProjectYml(app2), !!adsIds, check),
|
|
198933
199114
|
// Model B, `url:` form: the trait selector package that enables the linked satellites' traits
|
|
198934
199115
|
// in the published package (#4129). Removed when the app links none, or is not in that form.
|
|
@@ -199004,13 +199185,14 @@ function genNativeConfig(app2, opts = {}) {
|
|
|
199004
199185
|
}
|
|
199005
199186
|
}
|
|
199006
199187
|
}
|
|
199188
|
+
const satellite = dormantInAnyBuild(dormantGraphOf(app2));
|
|
199007
199189
|
for (const swift of swiftFilesWithModuleMarkers(app2)) {
|
|
199008
199190
|
const text32 = readFileSync89(swift, "utf8");
|
|
199009
199191
|
if (!hasMarkers(text32, "slash", LABEL_MODULES_SWIFT_IMPORT) || !hasMarkers(text32, "slash", LABEL_MODULES_SWIFT_INSTALL)) {
|
|
199010
199192
|
throw new Error(`${app2}: ${swift} must carry both ${LABEL_MODULES_SWIFT_IMPORT} and ${LABEL_MODULES_SWIFT_INSTALL} markers`);
|
|
199011
199193
|
}
|
|
199012
|
-
files.push(applyToFile(swift, "slash", LABEL_MODULES_SWIFT_IMPORT, renderModulesSwiftImport, check));
|
|
199013
|
-
files.push(applyToFile(swift, "slash", LABEL_MODULES_SWIFT_INSTALL, renderModulesSwiftInstall, check));
|
|
199194
|
+
files.push(applyToFile(swift, "slash", LABEL_MODULES_SWIFT_IMPORT, (i2) => renderModulesSwiftImport(i2, satellite), check));
|
|
199195
|
+
files.push(applyToFile(swift, "slash", LABEL_MODULES_SWIFT_INSTALL, (i2) => renderModulesSwiftInstall(i2, satellite), check));
|
|
199014
199196
|
}
|
|
199015
199197
|
files.push(...genCapabilityRegistrations(appDir(app2), ids2, check));
|
|
199016
199198
|
const rce = declaresRichContentEditor(configTs);
|
|
@@ -199083,6 +199265,7 @@ var init_gen_native_config = __esm({
|
|
|
199083
199265
|
init_prebuild();
|
|
199084
199266
|
init_native_core2();
|
|
199085
199267
|
init_native_core_needs();
|
|
199268
|
+
init_native_core_dormant();
|
|
199086
199269
|
init_native_core_check();
|
|
199087
199270
|
init_admob_ids();
|
|
199088
199271
|
init_store_adopt2();
|
|
@@ -213204,8 +213387,7 @@ function provisionChatTarget(dir, memberChat, dryRun = false) {
|
|
|
213204
213387
|
if (!dryRun) {
|
|
213205
213388
|
if (config.fixed) writeFileSync46(join104(dir, "config.ts"), config.fixed, "utf8");
|
|
213206
213389
|
for (const id of screens) {
|
|
213207
|
-
const
|
|
213208
|
-
const descriptor = parseEntry(readAppSources(dir).dev.slice(route.lineStart, route.end), id);
|
|
213390
|
+
const descriptor = readEntry(dir, id);
|
|
213209
213391
|
reopenAsInbox(descriptor);
|
|
213210
213392
|
replaceScreen(dir, id, screenEntry(id, descriptor));
|
|
213211
213393
|
}
|
|
@@ -213255,11 +213437,21 @@ function provisionAppName(dir, displayName3, dryRun = false) {
|
|
|
213255
213437
|
return { status: "set", from: correction.current, to: displayName3.trim() };
|
|
213256
213438
|
}
|
|
213257
213439
|
function readEntry(dir, screenId) {
|
|
213258
|
-
const
|
|
213259
|
-
const
|
|
213260
|
-
|
|
213261
|
-
|
|
213262
|
-
|
|
213440
|
+
const { dev, config } = readAppEntrySources(dir);
|
|
213441
|
+
const span = screenSpans(dev, config).get(screenId);
|
|
213442
|
+
if (!span) return void 0;
|
|
213443
|
+
return parseEntry(dev.slice(span[0], span[1]), screenId);
|
|
213444
|
+
}
|
|
213445
|
+
function screenSpans(dev, config) {
|
|
213446
|
+
const key4 = `${config}\0${dev}`;
|
|
213447
|
+
const known2 = spansByText.get(key4);
|
|
213448
|
+
if (known2) return known2;
|
|
213449
|
+
spanParses += 1;
|
|
213450
|
+
const spans = /* @__PURE__ */ new Map();
|
|
213451
|
+
for (const r3 of parseApp(dev, config).routes) if (r3.kind === "screen" && !spans.has(r3.label)) spans.set(r3.label, [r3.lineStart, r3.end]);
|
|
213452
|
+
if (spansByText.size >= 4) spansByText.delete(spansByText.keys().next().value);
|
|
213453
|
+
spansByText.set(key4, spans);
|
|
213454
|
+
return spans;
|
|
213263
213455
|
}
|
|
213264
213456
|
function parseEntry(entryText2, screenId) {
|
|
213265
213457
|
try {
|
|
@@ -213416,7 +213608,7 @@ async function runOneAppProvision(args, io2) {
|
|
|
213416
213608
|
return report3(io2, false, { code: "content_invalid", error: error instanceof Error ? error.message : String(error) });
|
|
213417
213609
|
}
|
|
213418
213610
|
}
|
|
213419
|
-
var obj20, PROVISION_USAGE, PROVISIONED_PARAMS, propName8, propOf, GUID2, BUSINESS_CHAT_SCREEN2, INBOX_DOOR_SCREENS, NAME_SLOTS;
|
|
213611
|
+
var obj20, PROVISION_USAGE, PROVISIONED_PARAMS, propName8, propOf, GUID2, BUSINESS_CHAT_SCREEN2, INBOX_DOOR_SCREENS, NAME_SLOTS, spansByText, spanParses;
|
|
213420
213612
|
var init_provision = __esm({
|
|
213421
213613
|
"src/one-app/provision.ts"() {
|
|
213422
213614
|
init_define_HHP_CATALOG();
|
|
@@ -213451,6 +213643,8 @@ var init_provision = __esm({
|
|
|
213451
213643
|
BUSINESS_CHAT_SCREEN2 = "himi_business_chat";
|
|
213452
213644
|
INBOX_DOOR_SCREENS = ["himi_account", "himi_chat_thread"];
|
|
213453
213645
|
NAME_SLOTS = /* @__PURE__ */ new Set([...DISPLAY_KEYS, "title", "text", "displayName"]);
|
|
213646
|
+
spansByText = /* @__PURE__ */ new Map();
|
|
213647
|
+
spanParses = 0;
|
|
213454
213648
|
}
|
|
213455
213649
|
});
|
|
213456
213650
|
|
|
@@ -215848,7 +216042,7 @@ function createFunctionDataCapability(options2) {
|
|
|
215848
216042
|
});
|
|
215849
216043
|
return encoded3;
|
|
215850
216044
|
};
|
|
215851
|
-
const
|
|
216045
|
+
const decode2 = (result) => {
|
|
215852
216046
|
if (!result || typeof result !== "object") return result;
|
|
215853
216047
|
const output = structuredClone(result);
|
|
215854
216048
|
const decodeItem2 = (item2) => {
|
|
@@ -215863,15 +216057,15 @@ function createFunctionDataCapability(options2) {
|
|
|
215863
216057
|
return output;
|
|
215864
216058
|
};
|
|
215865
216059
|
return Object.freeze({
|
|
215866
|
-
query: async (query = {}) =>
|
|
216060
|
+
query: async (query = {}) => decode2(await options2.wix.call("POST", "/wix-data/v2/items/query", { dataCollectionId: id, query: encodeQuery(query) })),
|
|
215867
216061
|
insert: async (item2) => {
|
|
215868
216062
|
if (readOnly) throw new Error(`adopted collection "${id}" is read-only`);
|
|
215869
|
-
return
|
|
216063
|
+
return decode2(await options2.wix.call("POST", "/wix-data/v2/items", { dataCollectionId: id, dataItem: { data: encode2(item2) } }));
|
|
215870
216064
|
},
|
|
215871
216065
|
update: async (itemId3, item2) => {
|
|
215872
216066
|
if (readOnly) throw new Error(`adopted collection "${id}" is read-only`);
|
|
215873
216067
|
if (!itemId3) throw new Error("item id is required");
|
|
215874
|
-
return
|
|
216068
|
+
return decode2(await options2.wix.call("PUT", `/wix-data/v2/items/${encodeURIComponent(itemId3)}`, { dataCollectionId: id, dataItem: { id: itemId3, data: encode2(item2) } }));
|
|
215875
216069
|
}
|
|
215876
216070
|
});
|
|
215877
216071
|
}
|
|
@@ -215907,14 +216101,14 @@ function routeMatch(template, actual) {
|
|
|
215907
216101
|
for (let i2 = 0; i2 < expected.length; i2++) {
|
|
215908
216102
|
const left = expected[i2];
|
|
215909
216103
|
const right = received[i2];
|
|
215910
|
-
let
|
|
216104
|
+
let decoded3;
|
|
215911
216105
|
try {
|
|
215912
|
-
|
|
216106
|
+
decoded3 = decodeURIComponent(right);
|
|
215913
216107
|
} catch {
|
|
215914
216108
|
return null;
|
|
215915
216109
|
}
|
|
215916
|
-
if (left.startsWith(":")) params[left.slice(1)] =
|
|
215917
|
-
else if (left !==
|
|
216110
|
+
if (left.startsWith(":")) params[left.slice(1)] = decoded3;
|
|
216111
|
+
else if (left !== decoded3) return null;
|
|
215918
216112
|
}
|
|
215919
216113
|
return params;
|
|
215920
216114
|
}
|
|
@@ -250976,8 +251170,8 @@ function codeFromRow(row2) {
|
|
|
250976
251170
|
return plain5;
|
|
250977
251171
|
if (!row2.attributedBody?.length)
|
|
250978
251172
|
return void 0;
|
|
250979
|
-
const
|
|
250980
|
-
return
|
|
251173
|
+
const decoded3 = decodeTypedstreamString(row2.attributedBody);
|
|
251174
|
+
return decoded3 && extractAppleCode(decoded3) || extractAppleCode(row2.attributedBody.toString("utf8").replace(/�/g, " "));
|
|
250981
251175
|
}
|
|
250982
251176
|
function selectAppleCode(rows, cutoffMs) {
|
|
250983
251177
|
const sorted3 = [...rows].sort((a3, b3) => messagesDateToMs(b3.date) - messagesDateToMs(a3.date) || (b3.rowId > a3.rowId ? 1 : b3.rowId < a3.rowId ? -1 : 0));
|
|
@@ -295658,7 +295852,7 @@ var init_plan5 = __esm({
|
|
|
295658
295852
|
var generate_exports = {};
|
|
295659
295853
|
__export(generate_exports, {
|
|
295660
295854
|
ENGINE_FILES: () => ENGINE_FILES,
|
|
295661
|
-
GENERATED_HEADER: () =>
|
|
295855
|
+
GENERATED_HEADER: () => GENERATED_HEADER2,
|
|
295662
295856
|
isEdited: () => isEdited,
|
|
295663
295857
|
orphanedFiles: () => orphanedFiles,
|
|
295664
295858
|
renderAll: () => renderAll,
|
|
@@ -295674,7 +295868,7 @@ import { createHash as createHash101 } from "node:crypto";
|
|
|
295674
295868
|
import { existsSync as existsSync162, mkdirSync as mkdirSync66, readdirSync as readdirSync67, readFileSync as readFileSync194, writeFileSync as writeFileSync74 } from "node:fs";
|
|
295675
295869
|
import { dirname as dirname89, join as join203 } from "node:path";
|
|
295676
295870
|
function withHeader(body) {
|
|
295677
|
-
return `${
|
|
295871
|
+
return `${GENERATED_HEADER2}${sha2568(body)}
|
|
295678
295872
|
${body}`;
|
|
295679
295873
|
}
|
|
295680
295874
|
function isEdited(content) {
|
|
@@ -295825,16 +296019,16 @@ function orphanedFiles(dir, current) {
|
|
|
295825
296019
|
}
|
|
295826
296020
|
for (const rel2 of candidates.sort()) {
|
|
295827
296021
|
if (keep.has(rel2) || !existsSync162(join203(dir, rel2))) continue;
|
|
295828
|
-
if (readFileSync194(join203(dir, rel2), "utf8").startsWith(
|
|
296022
|
+
if (readFileSync194(join203(dir, rel2), "utf8").startsWith(GENERATED_HEADER2)) found.push(rel2);
|
|
295829
296023
|
}
|
|
295830
296024
|
return found;
|
|
295831
296025
|
}
|
|
295832
|
-
var
|
|
296026
|
+
var GENERATED_HEADER2, HEADER_RE, ENGINE_FILES, sha2568, planFile, ident, json8, byName2;
|
|
295833
296027
|
var init_generate2 = __esm({
|
|
295834
296028
|
"src/base44-screens/generate.ts"() {
|
|
295835
296029
|
init_define_HHP_CATALOG();
|
|
295836
296030
|
init_plan5();
|
|
295837
|
-
|
|
296031
|
+
GENERATED_HEADER2 = "// @generated by himi base44 screens \u2014 sha256:";
|
|
295838
296032
|
HEADER_RE = /^\/\/ @generated by himi base44 screens — sha256:([0-9a-f]{64})\n/;
|
|
295839
296033
|
ENGINE_FILES = ["tier5-src/_shared/entity-list.ts", "tier5-src/_shared/entity-detail.ts", "tier5-src/_shared/entity-plan.ts", "dev/entity-screens.ts"];
|
|
295840
296034
|
sha2568 = (s5) => createHash101("sha256").update(s5).digest("hex");
|
package/guides/qa-builds.md
CHANGED
|
@@ -761,10 +761,21 @@ change carry a 9-char sha and are genuinely un-buildable; re-push them.
|
|
|
761
761
|
The caller never supplies the shell commit. Honoring a caller-chosen sha would be
|
|
762
762
|
arbitrary code execution on a shared Mac pool.
|
|
763
763
|
|
|
764
|
-
## Path B — a
|
|
764
|
+
## Path B — a pull-request build from Wix native CI
|
|
765
765
|
|
|
766
|
-
|
|
767
|
-
|
|
766
|
+
Wix native CI automatically builds a signed, installable dev IPA/APK when a pull request changes a
|
|
767
|
+
registered native project or one of its declared dependencies. Its
|
|
768
|
+
`Mobile Apps CI/CD / Native iOS Build (<path>)` or `Native Android Build (<path>)` check, and its PR
|
|
769
|
+
comment, carry the download link.
|
|
770
|
+
|
|
771
|
+
There is no `#release` or empty-commit trigger. Native CI intentionally ignores an empty commit,
|
|
772
|
+
and carries or skips a project when the push changes none of that project's inputs. Use `himi dist`
|
|
773
|
+
(Path A) when you need an explicit QA build without a native input change.
|
|
774
|
+
|
|
775
|
+
## A `[dist]` tag on a device test run
|
|
776
|
+
|
|
777
|
+
The tag still works when you start a device test run yourself. Put it in the HEAD commit message,
|
|
778
|
+
and the run folds a QA build in (next section):
|
|
768
779
|
|
|
769
780
|
| Commit message contains | Builds |
|
|
770
781
|
|---|---|
|
|
@@ -772,20 +783,9 @@ QA builds are **opt-in per commit** so they stay off the every-PR path. Put a
|
|
|
772
783
|
| `[dist:ios]` / `[dist ios]` | iOS only |
|
|
773
784
|
| `[dist:android]` | Android only |
|
|
774
785
|
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
git commit --allow-empty -m "[dist] QA build"
|
|
779
|
-
git push
|
|
780
|
-
```
|
|
781
|
-
|
|
782
|
-
Falcon rebuilds, the platform's Argus job sees the tag, and folds the QA build in
|
|
783
|
-
(next section). This system-originated path retains its branch label and puts the
|
|
784
|
-
install link in the build log and, when a PR token is available, in a **PR comment**.
|
|
785
|
-
Interactive `himi dist` and owner-browser requests are user-originated instead: they
|
|
786
|
-
are labelled with the app name and id, and never report or comment on a PR. The
|
|
787
|
-
**`/dist-himalaya-app`** skill automates the
|
|
788
|
-
whole loop (empty commit → PR → watch Falcon → hand back the link).
|
|
786
|
+
Such a run is system-originated: it keeps its branch label and puts the install link in the build
|
|
787
|
+
log. Interactive `himi dist` and owner-browser requests are user-originated instead: they are
|
|
788
|
+
labelled with the app name and id, and never report or comment on a PR.
|
|
789
789
|
|
|
790
790
|
## How it runs: folded into the warm Argus job (build once)
|
|
791
791
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1961.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": "3dc7e1a57a31bc14c60f06a7554814f23a51182b9c07ccb96a878554"
|
|
86
86
|
}
|