@wix/himalaya-cli 0.1897.0 → 0.1898.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/dev-server/src/app-config.d.ts +11 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-module.d.ts +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +14 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +11 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +8 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +12 -0
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{0c2266c1d7d6e00c558adf2e3706e5ae360fdb6b5ca7663ed596d683a0f39f34.bin → 3c8ce407707a87e172345007371329f9c47e65e182a1e2ff617b7f75e6bb95ab.bin} +1 -1
- package/dist/browser-plane/sw.js +5 -5
- package/dist/cli.mjs +1118 -1004
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/capabilities.md +1 -1
- package/guides/qa-builds.md +29 -1
- package/guides/wix-business-context.md +2 -1
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -3255,731 +3255,6 @@ var init_app_link = __esm({
|
|
|
3255
3255
|
}
|
|
3256
3256
|
});
|
|
3257
3257
|
|
|
3258
|
-
// ../../core/serve-control/src/dist-jobs.ts
|
|
3259
|
-
var dist_jobs_exports = {};
|
|
3260
|
-
__export(dist_jobs_exports, {
|
|
3261
|
-
ANDROID_BUILD_TYPES: () => ANDROID_BUILD_TYPES,
|
|
3262
|
-
ANDROID_BUILD_TYPE_NOT_BUILT: () => ANDROID_BUILD_TYPE_NOT_BUILT,
|
|
3263
|
-
ANDROID_FORMATS: () => ANDROID_FORMATS,
|
|
3264
|
-
ANDROID_FORMAT_NOT_BUILT: () => ANDROID_FORMAT_NOT_BUILT,
|
|
3265
|
-
ANDROID_FORMAT_NOT_REQUESTED: () => ANDROID_FORMAT_NOT_REQUESTED,
|
|
3266
|
-
ANDROID_FORMAT_WRONG_SIGNER: () => ANDROID_FORMAT_WRONG_SIGNER,
|
|
3267
|
-
ANDROID_SIGNING_ALIASES: () => ANDROID_SIGNING_ALIASES,
|
|
3268
|
-
ANDROID_SIGNING_POLICIES: () => ANDROID_SIGNING_POLICIES,
|
|
3269
|
-
APPLE_ERROR_CODES_MAX: () => APPLE_ERROR_CODES_MAX,
|
|
3270
|
-
CUSTOMER_UPLOAD_ABANDONED: () => CUSTOMER_UPLOAD_ABANDONED,
|
|
3271
|
-
CUSTOMER_UPLOAD_LEASE_MS: () => CUSTOMER_UPLOAD_LEASE_MS,
|
|
3272
|
-
CUSTOMER_UPLOAD_MAX_ATTEMPTS: () => CUSTOMER_UPLOAD_MAX_ATTEMPTS,
|
|
3273
|
-
CUSTOMER_UPLOAD_RETRY_DELAYS_MS: () => CUSTOMER_UPLOAD_RETRY_DELAYS_MS,
|
|
3274
|
-
DEFAULT_ANDROID_BUILD_TYPE: () => DEFAULT_ANDROID_BUILD_TYPE,
|
|
3275
|
-
DEFAULT_ANDROID_FORMAT: () => DEFAULT_ANDROID_FORMAT,
|
|
3276
|
-
DEFAULT_ANDROID_SIGNING: () => DEFAULT_ANDROID_SIGNING,
|
|
3277
|
-
DEFAULT_BORROWABLE_IOS_IDS: () => DEFAULT_BORROWABLE_IOS_IDS,
|
|
3278
|
-
DEFAULT_DIST_SHELL: () => DEFAULT_DIST_SHELL,
|
|
3279
|
-
DEFAULT_DIST_SIGNING: () => DEFAULT_DIST_SIGNING,
|
|
3280
|
-
DEFAULT_GIT_URL: () => DEFAULT_GIT_URL,
|
|
3281
|
-
DEFAULT_IOS_FORMAT: () => DEFAULT_IOS_FORMAT,
|
|
3282
|
-
DIST_ERROR_CODES: () => DIST_ERROR_CODES,
|
|
3283
|
-
DIST_PACKAGE_NAME: () => DIST_PACKAGE_NAME,
|
|
3284
|
-
DIST_PARAMS_FLAG: () => DIST_PARAMS_FLAG,
|
|
3285
|
-
DIST_SHELLS: () => DIST_SHELLS,
|
|
3286
|
-
IOS_FORMATS: () => IOS_FORMATS,
|
|
3287
|
-
IOS_FORMAT_NOT_BUILT: () => IOS_FORMAT_NOT_BUILT,
|
|
3288
|
-
IOS_FORMAT_NOT_REQUESTED: () => IOS_FORMAT_NOT_REQUESTED,
|
|
3289
|
-
JobServiceBroker: () => JobServiceBroker,
|
|
3290
|
-
JobServiceError: () => JobServiceError,
|
|
3291
|
-
MAX_MEASURABLE_IDENTITY_WINDOW: () => MAX_MEASURABLE_IDENTITY_WINDOW,
|
|
3292
|
-
SCOPE_CANCEL: () => SCOPE_CANCEL,
|
|
3293
|
-
SCOPE_CREATE: () => SCOPE_CREATE,
|
|
3294
|
-
SCOPE_READ: () => SCOPE_READ,
|
|
3295
|
-
SITE_SHELL_SERVED_CAPABILITIES: () => SITE_SHELL_SERVED_CAPABILITIES,
|
|
3296
|
-
WIX_MANAGED_SIGNING_ALIASES: () => WIX_MANAGED_SIGNING_ALIASES,
|
|
3297
|
-
androidFormatSkewFailed: () => androidFormatSkewFailed,
|
|
3298
|
-
appleErrorCodesOf: () => appleErrorCodesOf,
|
|
3299
|
-
borrowableIosIds: () => borrowableIosIds,
|
|
3300
|
-
buildFormatSkewFailed: () => buildFormatSkewFailed,
|
|
3301
|
-
credsFromConfig: () => credsFromConfig,
|
|
3302
|
-
customerUploadClaimable: () => customerUploadClaimable,
|
|
3303
|
-
customerUploadFailure: () => customerUploadFailure,
|
|
3304
|
-
distErrorCodeOf: () => distErrorCodeOf,
|
|
3305
|
-
distJobSpec: () => distJobSpec,
|
|
3306
|
-
encodeDistParams: () => encodeDistParams,
|
|
3307
|
-
failureCodesOf: () => failureCodesOf,
|
|
3308
|
-
hasJobServiceEnded: () => hasJobServiceEnded,
|
|
3309
|
-
iosFormatSkewFailed: () => iosFormatSkewFailed,
|
|
3310
|
-
isBorrowableIosId: () => isBorrowableIosId,
|
|
3311
|
-
isSuccess: () => isSuccess,
|
|
3312
|
-
isTerminal: () => isTerminal,
|
|
3313
|
-
isTerminalTestflightStatus: () => isTerminalTestflightStatus,
|
|
3314
|
-
isValidDistAttemptId: () => isValidDistAttemptId,
|
|
3315
|
-
nextCustomerUploadClaim: () => nextCustomerUploadClaim,
|
|
3316
|
-
nextCustomerUploadSettlement: () => nextCustomerUploadSettlement,
|
|
3317
|
-
resolveAndroidBuildType: () => resolveAndroidBuildType,
|
|
3318
|
-
resolveAndroidFormat: () => resolveAndroidFormat,
|
|
3319
|
-
resolveAndroidSigning: () => resolveAndroidSigning,
|
|
3320
|
-
resolveBorrowedIosId: () => resolveBorrowedIosId,
|
|
3321
|
-
resolveDistSigning: () => resolveDistSigning,
|
|
3322
|
-
resolveIosFormat: () => resolveIosFormat,
|
|
3323
|
-
testflightStatusRank: () => testflightStatusRank
|
|
3324
|
-
});
|
|
3325
|
-
function isTerminal(status2) {
|
|
3326
|
-
return !!status2 && !IN_FLIGHT.has(status2);
|
|
3327
|
-
}
|
|
3328
|
-
function hasJobServiceEnded(status2) {
|
|
3329
|
-
return !!status2 && JOB_SERVICE_ENDED.has(status2);
|
|
3330
|
-
}
|
|
3331
|
-
function isSuccess(status2) {
|
|
3332
|
-
return status2 === "SUCCESS";
|
|
3333
|
-
}
|
|
3334
|
-
function snapshot(job) {
|
|
3335
|
-
return {
|
|
3336
|
-
id: String(job.id),
|
|
3337
|
-
status: job.status ?? "STATUS_UNKNOWN",
|
|
3338
|
-
...job.buildUrl ? { buildUrl: String(job.buildUrl) } : {},
|
|
3339
|
-
...job.output ? { output: String(job.output) } : {},
|
|
3340
|
-
...typeof job.attemptNumber === "number" ? { attemptNumber: job.attemptNumber } : {}
|
|
3341
|
-
};
|
|
3342
|
-
}
|
|
3343
|
-
function truncate(s5, max = 400) {
|
|
3344
|
-
return s5.length > max ? `${s5.slice(0, max)}\u2026` : s5;
|
|
3345
|
-
}
|
|
3346
|
-
function credsFromConfig(cfg) {
|
|
3347
|
-
const appDefId = cfg("POCO_APP_DEF_ID")?.trim();
|
|
3348
|
-
const appSecret = cfg("POCO_APP_SECRET")?.trim();
|
|
3349
|
-
if (!appDefId || !appSecret) return void 0;
|
|
3350
|
-
return { appDefId, appSecret };
|
|
3351
|
-
}
|
|
3352
|
-
function isValidDistAttemptId(value2) {
|
|
3353
|
-
return typeof value2 === "string" && /^[A-Za-z0-9_-]{1,128}$/.test(value2);
|
|
3354
|
-
}
|
|
3355
|
-
function customerUploadClaimable(pending2, now) {
|
|
3356
|
-
if (!pending2) return false;
|
|
3357
|
-
if (pending2.status === "READY_FOR_UPLOAD") return customerUploadRetryDue(pending2, now);
|
|
3358
|
-
if (pending2.status !== "UPLOADING") return false;
|
|
3359
|
-
if (!pending2.claimedAt) return true;
|
|
3360
|
-
const claimedAt = Date.parse(pending2.claimedAt);
|
|
3361
|
-
const at2 = Date.parse(now);
|
|
3362
|
-
return Number.isFinite(claimedAt) && Number.isFinite(at2) && at2 - claimedAt >= CUSTOMER_UPLOAD_LEASE_MS;
|
|
3363
|
-
}
|
|
3364
|
-
function customerUploadRetryDue(pending2, now) {
|
|
3365
|
-
if (!pending2.retryAt) return true;
|
|
3366
|
-
const retryAt = Date.parse(pending2.retryAt);
|
|
3367
|
-
return !Number.isFinite(retryAt) || Date.parse(now) >= retryAt;
|
|
3368
|
-
}
|
|
3369
|
-
function customerUploadFailure(pending2, error, passing, now) {
|
|
3370
|
-
const failedAttempts = (pending2.failedAttempts ?? 0) + 1;
|
|
3371
|
-
const delayMs = CUSTOMER_UPLOAD_RETRY_DELAYS_MS[failedAttempts - 1];
|
|
3372
|
-
if (!passing || delayMs === void 0) return { status: "FAILED", error, failedAttempts };
|
|
3373
|
-
const retryAt = new Date(Date.parse(now) + delayMs).toISOString();
|
|
3374
|
-
return { status: "READY_FOR_UPLOAD", lastError: error, failedAttempts, retryAt };
|
|
3375
|
-
}
|
|
3376
|
-
function nextCustomerUploadClaim(record6, now) {
|
|
3377
|
-
if (!record6 || record6.status !== "SUCCESS" || !customerUploadClaimable(record6.customerAppStore, now)) return void 0;
|
|
3378
|
-
const pending2 = record6.customerAppStore;
|
|
3379
|
-
const takeover = pending2.status === "UPLOADING" ? { failedAttempts: (pending2.failedAttempts ?? 0) + 1, lastError: CUSTOMER_UPLOAD_ABANDONED } : {};
|
|
3380
|
-
return {
|
|
3381
|
-
...record6,
|
|
3382
|
-
customerAppStore: { ...pending2, ...takeover, status: "UPLOADING", claimedAt: now },
|
|
3383
|
-
updatedAt: now
|
|
3384
|
-
};
|
|
3385
|
-
}
|
|
3386
|
-
function nextCustomerUploadSettlement(record6, claimedAt, update, now) {
|
|
3387
|
-
const pending2 = record6?.customerAppStore;
|
|
3388
|
-
if (!record6 || pending2?.status !== "UPLOADING" || pending2.claimedAt !== claimedAt) return void 0;
|
|
3389
|
-
return {
|
|
3390
|
-
...record6,
|
|
3391
|
-
customerAppStore: {
|
|
3392
|
-
version: pending2.version,
|
|
3393
|
-
mode: pending2.mode,
|
|
3394
|
-
claimedAt: pending2.claimedAt,
|
|
3395
|
-
status: update.status,
|
|
3396
|
-
...update.error ? { error: update.error } : {},
|
|
3397
|
-
...update.delivery ? { delivery: update.delivery } : {},
|
|
3398
|
-
...retryFieldsOf(update.failedAttempts === void 0 ? pending2 : update)
|
|
3399
|
-
},
|
|
3400
|
-
updatedAt: now
|
|
3401
|
-
};
|
|
3402
|
-
}
|
|
3403
|
-
function retryFieldsOf(source2) {
|
|
3404
|
-
return {
|
|
3405
|
-
...source2.failedAttempts ? { failedAttempts: source2.failedAttempts } : {},
|
|
3406
|
-
...source2.status === "READY_FOR_UPLOAD" && source2.retryAt ? { retryAt: source2.retryAt } : {},
|
|
3407
|
-
...source2.status === "READY_FOR_UPLOAD" && source2.lastError ? { lastError: source2.lastError } : {}
|
|
3408
|
-
};
|
|
3409
|
-
}
|
|
3410
|
-
function isTerminalTestflightStatus(status2) {
|
|
3411
|
-
return /(?:^|_)(?:COMPLETED|FAILED|NOT_FOUND)$/.test(status2?.toUpperCase() ?? "");
|
|
3412
|
-
}
|
|
3413
|
-
function testflightStatusRank(status2) {
|
|
3414
|
-
const normalized2 = status2?.toUpperCase() ?? "";
|
|
3415
|
-
if (isTerminalTestflightStatus(normalized2)) return 3;
|
|
3416
|
-
if (/(?:^|_)UPLOADING$/.test(normalized2)) return 2;
|
|
3417
|
-
if (/(?:^|_)PENDING$/.test(normalized2)) return 1;
|
|
3418
|
-
return 0;
|
|
3419
|
-
}
|
|
3420
|
-
function borrowableIosIds(raw) {
|
|
3421
|
-
const parsed = (raw ?? "").split(",").map((s5) => s5.trim().toLowerCase()).filter(Boolean);
|
|
3422
|
-
return parsed.length > 0 ? parsed : DEFAULT_BORROWABLE_IOS_IDS;
|
|
3423
|
-
}
|
|
3424
|
-
function isBorrowableIosId(id, allowed2 = DEFAULT_BORROWABLE_IOS_IDS) {
|
|
3425
|
-
const candidate = id.toLowerCase();
|
|
3426
|
-
return allowed2.some(
|
|
3427
|
-
(pattern) => pattern.endsWith("*") ? candidate.startsWith(pattern.slice(0, -1)) : candidate === pattern
|
|
3428
|
-
);
|
|
3429
|
-
}
|
|
3430
|
-
function resolveBorrowedIosId(opts) {
|
|
3431
|
-
const { requested, platform } = opts;
|
|
3432
|
-
if (requested === void 0 || requested === null || requested === "") return {};
|
|
3433
|
-
if (opts.selfServe && !opts.wixStaff || opts.role === "owner") {
|
|
3434
|
-
return {
|
|
3435
|
-
error: {
|
|
3436
|
-
error: "operator_only_borrow_id",
|
|
3437
|
-
message: "borrowIosBundleId is not available to self-serve credentials",
|
|
3438
|
-
hint: "Ship the change over-the-air instead \u2014 OTA needs no rebuild and no borrowed signing identity."
|
|
3439
|
-
}
|
|
3440
|
-
};
|
|
3441
|
-
}
|
|
3442
|
-
if (typeof requested !== "string") {
|
|
3443
|
-
return { error: { error: "invalid_borrow_id", message: "borrowIosBundleId must be a string" } };
|
|
3444
|
-
}
|
|
3445
|
-
const id = requested.trim().toLowerCase();
|
|
3446
|
-
if (platform !== "ios") {
|
|
3447
|
-
return {
|
|
3448
|
-
error: {
|
|
3449
|
-
error: "borrow_id_ios_only",
|
|
3450
|
-
message: `borrowIosBundleId applies to iOS signing only (got platform "${platform}")`,
|
|
3451
|
-
hint: "Android needs no provisioning profile \u2014 drop the flag for android builds."
|
|
3452
|
-
}
|
|
3453
|
-
};
|
|
3454
|
-
}
|
|
3455
|
-
if (!BUNDLE_ID_RE.test(id)) {
|
|
3456
|
-
return {
|
|
3457
|
-
error: {
|
|
3458
|
-
error: "invalid_borrow_id",
|
|
3459
|
-
message: `"${requested}" is not a valid reverse-DNS bundle id`
|
|
3460
|
-
}
|
|
3461
|
-
};
|
|
3462
|
-
}
|
|
3463
|
-
const allowed2 = opts.allowed ?? DEFAULT_BORROWABLE_IOS_IDS;
|
|
3464
|
-
if (!isBorrowableIosId(id, allowed2)) {
|
|
3465
|
-
return {
|
|
3466
|
-
error: {
|
|
3467
|
-
error: "borrow_id_not_allowed",
|
|
3468
|
-
message: `"${id}" is not borrowable; allowed: ${allowed2.join(", ")}`,
|
|
3469
|
-
hint: "Only internal enterprise ids may be borrowed \u2014 a store id would replace the real App Store app on the device. An operator can change this with HIMI_DIST_BORROWABLE_IOS_IDS."
|
|
3470
|
-
}
|
|
3471
|
-
};
|
|
3472
|
-
}
|
|
3473
|
-
return { bundleId: id };
|
|
3474
|
-
}
|
|
3475
|
-
function resolveDistSigning(requested) {
|
|
3476
|
-
if (requested === void 0 || requested === null || requested === "") {
|
|
3477
|
-
return { policy: DEFAULT_DIST_SIGNING };
|
|
3478
|
-
}
|
|
3479
|
-
if (typeof requested !== "string") {
|
|
3480
|
-
return { error: { status: 400, body: { error: "invalid_signing", message: "signing must be a string" } } };
|
|
3481
|
-
}
|
|
3482
|
-
const want = requested.trim().toLowerCase();
|
|
3483
|
-
if (WIX_MANAGED_SIGNING_ALIASES.includes(want)) return { policy: "wix-managed" };
|
|
3484
|
-
if (want === "byo") return { policy: "byo" };
|
|
3485
|
-
return {
|
|
3486
|
-
error: {
|
|
3487
|
-
status: 501,
|
|
3488
|
-
body: {
|
|
3489
|
-
error: "dist_signing_unsupported",
|
|
3490
|
-
message: `signing "${requested}" is not implemented`,
|
|
3491
|
-
supported: [DEFAULT_DIST_SIGNING, "byo"]
|
|
3492
|
-
}
|
|
3493
|
-
}
|
|
3494
|
-
};
|
|
3495
|
-
}
|
|
3496
|
-
function resolveAndroidSigning(requested) {
|
|
3497
|
-
if (requested === void 0 || requested === null || requested === "") {
|
|
3498
|
-
return { policy: DEFAULT_ANDROID_SIGNING };
|
|
3499
|
-
}
|
|
3500
|
-
if (typeof requested !== "string") {
|
|
3501
|
-
return { error: { status: 400, body: { error: "invalid_android_signing", message: "androidSigning must be a string" } } };
|
|
3502
|
-
}
|
|
3503
|
-
const want = requested.trim().toLowerCase();
|
|
3504
|
-
const policy = Object.hasOwn(ANDROID_SIGNING_ALIASES, want) ? ANDROID_SIGNING_ALIASES[want] : void 0;
|
|
3505
|
-
if (policy) return { policy };
|
|
3506
|
-
return {
|
|
3507
|
-
error: {
|
|
3508
|
-
status: 400,
|
|
3509
|
-
body: {
|
|
3510
|
-
error: "invalid_android_signing",
|
|
3511
|
-
message: `androidSigning "${requested}" is not a known policy`,
|
|
3512
|
-
supported: [...ANDROID_SIGNING_POLICIES]
|
|
3513
|
-
}
|
|
3514
|
-
}
|
|
3515
|
-
};
|
|
3516
|
-
}
|
|
3517
|
-
function androidFormatSkewFailed(record6) {
|
|
3518
|
-
return record6.platform === "android" && typeof record6.error === "string" && [ANDROID_FORMAT_NOT_BUILT, ANDROID_FORMAT_WRONG_SIGNER, ANDROID_FORMAT_NOT_REQUESTED, ANDROID_BUILD_TYPE_NOT_BUILT].some((code3) => record6.error.includes(`${code3}:`));
|
|
3519
|
-
}
|
|
3520
|
-
function distErrorCodeOf(error) {
|
|
3521
|
-
if (typeof error !== "string") return void 0;
|
|
3522
|
-
const code3 = /^[a-z][a-z0-9_]*/.exec(error)?.[0];
|
|
3523
|
-
return DIST_ERROR_CODES.includes(code3 ?? "") ? code3 : void 0;
|
|
3524
|
-
}
|
|
3525
|
-
function appleErrorCodesOf(diagnostics) {
|
|
3526
|
-
if (typeof diagnostics !== "string") return void 0;
|
|
3527
|
-
const codes4 = [...new Set(diagnostics.match(/\bITMS-\d{4,5}\b/g) ?? [])].slice(0, APPLE_ERROR_CODES_MAX);
|
|
3528
|
-
return codes4.length > 0 ? codes4 : void 0;
|
|
3529
|
-
}
|
|
3530
|
-
function failureCodesOf(record6, body) {
|
|
3531
|
-
const errorCode2 = distErrorCodeOf(body.error);
|
|
3532
|
-
if (errorCode2 === "customer_signing_fetch_failed" && record6.errorCode) return {};
|
|
3533
|
-
const validation = errorCode2 === "customer_app_store_validation_failed";
|
|
3534
|
-
return { errorCode: errorCode2, appleErrorCodes: validation ? appleErrorCodesOf(body.diagnostics) : void 0 };
|
|
3535
|
-
}
|
|
3536
|
-
function resolveAndroidFormat(requested) {
|
|
3537
|
-
if (requested === void 0 || requested === null || requested === "") return { format: DEFAULT_ANDROID_FORMAT };
|
|
3538
|
-
if (typeof requested === "string" && ANDROID_FORMATS.includes(requested)) {
|
|
3539
|
-
return { format: requested };
|
|
3540
|
-
}
|
|
3541
|
-
return {
|
|
3542
|
-
error: {
|
|
3543
|
-
status: 400,
|
|
3544
|
-
body: {
|
|
3545
|
-
error: "invalid_android_format",
|
|
3546
|
-
message: `androidFormat ${typeof requested === "string" ? `"${requested.slice(0, 40)}"` : `of type ${typeof requested}`} is not a known format`,
|
|
3547
|
-
supported: [...ANDROID_FORMATS]
|
|
3548
|
-
}
|
|
3549
|
-
}
|
|
3550
|
-
};
|
|
3551
|
-
}
|
|
3552
|
-
function resolveAndroidBuildType(requested) {
|
|
3553
|
-
if (requested === void 0 || requested === null || requested === "") return { buildType: DEFAULT_ANDROID_BUILD_TYPE };
|
|
3554
|
-
if (typeof requested === "string" && ANDROID_BUILD_TYPES.includes(requested)) {
|
|
3555
|
-
return { buildType: requested };
|
|
3556
|
-
}
|
|
3557
|
-
return {
|
|
3558
|
-
error: {
|
|
3559
|
-
status: 400,
|
|
3560
|
-
body: {
|
|
3561
|
-
error: "invalid_android_build_type",
|
|
3562
|
-
message: `androidBuildType ${typeof requested === "string" ? `"${requested.slice(0, 40)}"` : `of type ${typeof requested}`} is not a known build type`,
|
|
3563
|
-
supported: [...ANDROID_BUILD_TYPES]
|
|
3564
|
-
}
|
|
3565
|
-
}
|
|
3566
|
-
};
|
|
3567
|
-
}
|
|
3568
|
-
function resolveIosFormat(requested) {
|
|
3569
|
-
if (requested === void 0 || requested === null || requested === "") return { format: DEFAULT_IOS_FORMAT };
|
|
3570
|
-
if (typeof requested === "string" && IOS_FORMATS.includes(requested)) {
|
|
3571
|
-
return { format: requested };
|
|
3572
|
-
}
|
|
3573
|
-
return {
|
|
3574
|
-
error: {
|
|
3575
|
-
status: 400,
|
|
3576
|
-
body: {
|
|
3577
|
-
error: "invalid_ios_format",
|
|
3578
|
-
message: `iosFormat ${typeof requested === "string" ? `"${requested.slice(0, 40)}"` : `of type ${typeof requested}`} is not a known format`,
|
|
3579
|
-
supported: [...IOS_FORMATS]
|
|
3580
|
-
}
|
|
3581
|
-
}
|
|
3582
|
-
};
|
|
3583
|
-
}
|
|
3584
|
-
function iosFormatSkewFailed(record6) {
|
|
3585
|
-
return record6.platform === "ios" && typeof record6.error === "string" && [IOS_FORMAT_NOT_BUILT, IOS_FORMAT_NOT_REQUESTED].some((code3) => record6.error.includes(`${code3}:`));
|
|
3586
|
-
}
|
|
3587
|
-
function buildFormatSkewFailed(record6) {
|
|
3588
|
-
return androidFormatSkewFailed(record6) || iosFormatSkewFailed(record6);
|
|
3589
|
-
}
|
|
3590
|
-
function encodeDistParams(env) {
|
|
3591
|
-
return Buffer.from(JSON.stringify(env), "utf8").toString("base64url");
|
|
3592
|
-
}
|
|
3593
|
-
function distJobSpec(req) {
|
|
3594
|
-
const params = {
|
|
3595
|
-
APP_DIR: req.appDir,
|
|
3596
|
-
// WHICH APP this binary is FOR, as distinct from which shell builds it. Without it the pool
|
|
3597
|
-
// can only infer an app from APP_DIR — i.e. the shell — so it baked the SHELL's content and
|
|
3598
|
-
// resolved the SHELL's OTA app id. A device-verified consequence: `himi dist --app demo-app`
|
|
3599
|
-
// produced a binary rendering himi_branded_home. The shell is the container; this is the app.
|
|
3600
|
-
HIMI_DIST_APP: req.app,
|
|
3601
|
-
// (HIMI_DIST_PROVISIONING_ENV is set at the END of this object, after `req.env` — see there.)
|
|
3602
|
-
// run-dist gates iOS on DIST_ENABLE_IOS / DIST_PROVISIONING_PROFILE / an explicit
|
|
3603
|
-
// `[dist:ios]` IN THE COMMIT MESSAGE. A serve-brokered job has no commit by design, and
|
|
3604
|
-
// `--force` only bypasses the `[dist]` tag gate — so without this an `--platform ios`
|
|
3605
|
-
// request would skip the build and finish as SUCCESS with no install link. Asking for iOS
|
|
3606
|
-
// through the API IS the explicit opt-in that `[dist:ios]` represents.
|
|
3607
|
-
...req.platform === "ios" ? { DIST_ENABLE_IOS: "1" } : {},
|
|
3608
|
-
...req.release ? { HIMI_DIST_RELEASE_PIN: req.release } : {},
|
|
3609
|
-
...req.contractUrl ? { HIMI_DIST_CONTRACT_URL: req.contractUrl } : {},
|
|
3610
|
-
// Where the pool fetches the RELEASE to bake its offline seed from. Its absence is what makes
|
|
3611
|
-
// the classic Falcon `[dist]` path fall back to building the seed from repo source.
|
|
3612
|
-
...req.seedUrl ? { HIMI_DIST_SEED_URL: req.seedUrl } : {},
|
|
3613
|
-
...req.platform === "android" && req.androidConfigUrl ? { HIMI_DIST_ANDROID_CONFIG_URL: req.androidConfigUrl } : {},
|
|
3614
|
-
// Where the pool fetches its SIGNING IDENTITY (profile + p12 + password). A URL, not the
|
|
3615
|
-
// bytes: the envelope is ~20KB of base64 and `command` is capped at MAX_COMMAND_CHARS — the
|
|
3616
|
-
// same reason the brand contract travels this way. It also keeps key material out of the
|
|
3617
|
-
// job params, which the pool echoes into its log.
|
|
3618
|
-
...req.signingUrl ? { HIMI_DIST_SIGNING_URL: req.signingUrl } : {},
|
|
3619
|
-
// WHICH KEYSTORE the Android build signs with. Android only — on an iOS job this would be a
|
|
3620
|
-
// variable nothing reads, and dispatching one implies a decision that was never made.
|
|
3621
|
-
// A bundle dispatches the QA key BY NAME, never `wix-keystore`. `--aab` always means the Wix
|
|
3622
|
-
// production key, and the new run-dist derives that from DIST_ANDROID_FORMAT itself, overriding
|
|
3623
|
-
// this. Naming `wix-keystore` here would reach a run-dist OLDER than `--aab` too (the pool builds
|
|
3624
|
-
// the release's own commit): it ignores the format, builds an installable APK, signs it with the
|
|
3625
|
-
// Wix production key and uploads and announces it — the exact artifact the self-serve 403
|
|
3626
|
-
// withholds. Naming NOTHING is not safe either: a pool machine with DIST_ANDROID_USE_WIX_KEYSTORE=1
|
|
3627
|
-
// then hands that old runner the Wix key anyway. A named QA key outranks that machine setting, so
|
|
3628
|
-
// an old runner signs an ordinary QA APK and the job fails as `android_format_not_built`.
|
|
3629
|
-
...req.platform === "android" && req.androidSigning ? { DIST_ANDROID_SIGNING: req.androidFormat === "aab" ? "qa-keystore" : req.androidSigning } : {},
|
|
3630
|
-
// A Play bundle instead of an APK. Only when asked: the APK default needs no parameter, and a
|
|
3631
|
-
// runner that predates the variable ignores it — which the result callback catches.
|
|
3632
|
-
...req.platform === "android" && req.androidFormat === "aab" ? { DIST_ANDROID_FORMAT: "aab" } : {},
|
|
3633
|
-
// A debuggable APK instead of a release one. Only when asked, for the same reason as the format.
|
|
3634
|
-
...req.platform === "android" && req.androidBuildType === "debug" ? { DIST_ANDROID_BUILD_TYPE: "debug" } : {},
|
|
3635
|
-
...req.previewRoute ? { HIMI_DIST_PREVIEW_ROUTE: req.previewRoute } : {},
|
|
3636
|
-
...req.callbackUrl ? { HIMI_DIST_CALLBACK_URL: req.callbackUrl } : {},
|
|
3637
|
-
...req.callbackToken ? { HIMI_DIST_CALLBACK_TOKEN: req.callbackToken } : {},
|
|
3638
|
-
// The per-job artifact path component. Without it two concurrent jobs for one
|
|
3639
|
-
// app+shell+platform+commit wrote the same ipa, manifest.plist and install.html, and the
|
|
3640
|
-
// loser's install page then handed a tester the other build's binary.
|
|
3641
|
-
...req.jobNonce ? { HIMI_DIST_JOB_NONCE: req.jobNonce } : {},
|
|
3642
|
-
// Who to DM the install link to. See DistJobRequest.requestedBy: the git-history guess the pool
|
|
3643
|
-
// falls back to misroutes brokered builds to an unrelated colleague.
|
|
3644
|
-
...req.requestedBy ? { HIMI_DIST_REQUESTED_BY: req.requestedBy } : {},
|
|
3645
|
-
...operatorEnvWithoutIosFormat(req.env),
|
|
3646
|
-
// An unsigned simulator build instead of a signed IPA. Only when asked, and AFTER `req.env`:
|
|
3647
|
-
// the request decides the format, so operator config can't turn one into the other.
|
|
3648
|
-
...req.platform === "ios" && req.iosFormat === "simulator" ? { DIST_IOS_FORMAT: "simulator" } : {},
|
|
3649
|
-
...req.buildOrigin ? { HIMI_DIST_BUILD_ORIGIN: req.buildOrigin } : {},
|
|
3650
|
-
// AFTER `req.env`, deliberately. This one field is the SHELL's declared answer, and it is the
|
|
3651
|
-
// only thing standing between owner-lite and a build that reads the fetched contract under
|
|
3652
|
-
// branded-lite's key — i.e. ignores it and ships unbranded while reporting success. `req.env`
|
|
3653
|
-
// is operator config (`deps.env`), so a stray HIMI_DIST_PROVISIONING_ENV there is a plausible
|
|
3654
|
-
// misconfiguration, and it would silently unbrand EVERY shell at once. Generic overrides do
|
|
3655
|
-
// not get to answer a per-shell question.
|
|
3656
|
-
...req.provisioningEnv ? { HIMI_DIST_PROVISIONING_ENV: req.provisioningEnv } : {}
|
|
3657
|
-
};
|
|
3658
|
-
const command = `${req.runner === "linux" ? "linux:" : ""}dist:${req.platform} ${DIST_PARAMS_FLAG} ${encodeDistParams(params)}`;
|
|
3659
|
-
if (command.length > MAX_COMMAND_CHARS) {
|
|
3660
|
-
throw new Error(
|
|
3661
|
-
`dist command is ${command.length} chars (cap ${MAX_COMMAND_CHARS}); shrink the job env \u2014 pass large values as a URL the Mac job fetches, as the brand contract does`
|
|
3662
|
-
);
|
|
3663
|
-
}
|
|
3664
|
-
return {
|
|
3665
|
-
gitUrl: req.gitUrl ?? DEFAULT_GIT_URL,
|
|
3666
|
-
gitCommitSha: req.gitCommitSha,
|
|
3667
|
-
packageName: DIST_PACKAGE_NAME,
|
|
3668
|
-
command,
|
|
3669
|
-
// Job Service renders this metadata in Buildkite's job label. User labels are sanitized,
|
|
3670
|
-
// and the runner also carries buildOrigin so it does not treat them as GitHub PR refs.
|
|
3671
|
-
branchName: req.buildLabel ?? req.branchName ?? "master",
|
|
3672
|
-
envVars: withoutCallbackToken(params),
|
|
3673
|
-
...req.xcodeVersion ? { xcodeVersion: req.xcodeVersion } : {}
|
|
3674
|
-
};
|
|
3675
|
-
}
|
|
3676
|
-
function operatorEnvWithoutIosFormat(env) {
|
|
3677
|
-
const { DIST_IOS_FORMAT: _theRequestDecides, ...rest } = env ?? {};
|
|
3678
|
-
return rest;
|
|
3679
|
-
}
|
|
3680
|
-
function withoutCallbackToken(params) {
|
|
3681
|
-
const { HIMI_DIST_CALLBACK_TOKEN: _printedByThePool, ...printable2 } = params;
|
|
3682
|
-
return printable2;
|
|
3683
|
-
}
|
|
3684
|
-
var DIST_ERROR_CODES, APPLE_ERROR_CODES_MAX, IN_FLIGHT, JOB_SERVICE_ENDED, SCOPE_CREATE, SCOPE_READ, SCOPE_CANCEL, DEFAULT_BASE_URL, DEFAULT_OAUTH_URL, TOKEN_TTL_MS, JobServiceError, JobServiceBroker, CUSTOMER_UPLOAD_LEASE_MS, CUSTOMER_UPLOAD_RETRY_DELAYS_MS, CUSTOMER_UPLOAD_MAX_ATTEMPTS, CUSTOMER_UPLOAD_ABANDONED, MAX_MEASURABLE_IDENTITY_WINDOW, SITE_SHELL_SERVED_CAPABILITIES, DIST_SHELLS, DEFAULT_DIST_SHELL, DEFAULT_BORROWABLE_IOS_IDS, BUNDLE_ID_RE, DEFAULT_DIST_SIGNING, WIX_MANAGED_SIGNING_ALIASES, DEFAULT_ANDROID_SIGNING, ANDROID_SIGNING_POLICIES, ANDROID_SIGNING_ALIASES, DEFAULT_ANDROID_FORMAT, ANDROID_FORMATS, ANDROID_FORMAT_NOT_BUILT, ANDROID_FORMAT_WRONG_SIGNER, ANDROID_FORMAT_NOT_REQUESTED, DEFAULT_ANDROID_BUILD_TYPE, ANDROID_BUILD_TYPES, ANDROID_BUILD_TYPE_NOT_BUILT, DEFAULT_IOS_FORMAT, IOS_FORMATS, IOS_FORMAT_NOT_BUILT, IOS_FORMAT_NOT_REQUESTED, DEFAULT_GIT_URL, DIST_PACKAGE_NAME, DIST_PARAMS_FLAG, MAX_COMMAND_CHARS;
|
|
3685
|
-
var init_dist_jobs = __esm({
|
|
3686
|
-
"../../core/serve-control/src/dist-jobs.ts"() {
|
|
3687
|
-
init_define_HHP_CATALOG();
|
|
3688
|
-
DIST_ERROR_CODES = [
|
|
3689
|
-
"customer_agent_keychain_unavailable",
|
|
3690
|
-
"customer_app_store_ipa_unreadable",
|
|
3691
|
-
"customer_app_store_validation_failed",
|
|
3692
|
-
"customer_app_store_validation_key_missing",
|
|
3693
|
-
"customer_archive_invalid",
|
|
3694
|
-
"customer_artifact_identity_mismatch",
|
|
3695
|
-
"customer_build_failed",
|
|
3696
|
-
"customer_entitlement_not_granted",
|
|
3697
|
-
"customer_entitlements_unresolved",
|
|
3698
|
-
"customer_firebase_binding_missing",
|
|
3699
|
-
"customer_firebase_config_missing",
|
|
3700
|
-
"customer_firebase_fetch_failed",
|
|
3701
|
-
"customer_identity_preexisting",
|
|
3702
|
-
"customer_ipa_invalid",
|
|
3703
|
-
"customer_profile_invalid",
|
|
3704
|
-
"customer_profile_push_missing",
|
|
3705
|
-
"customer_signing_ambient_identity_unavailable",
|
|
3706
|
-
"customer_signing_binding_mismatch",
|
|
3707
|
-
"customer_signing_binding_missing",
|
|
3708
|
-
"customer_signing_cleanup_failed",
|
|
3709
|
-
"customer_signing_command_failed",
|
|
3710
|
-
"customer_signing_expired",
|
|
3711
|
-
"customer_signing_fetch_failed",
|
|
3712
|
-
"customer_signing_identity_unavailable",
|
|
3713
|
-
"customer_signing_install_failed",
|
|
3714
|
-
"customer_signing_noninteractive_unavailable",
|
|
3715
|
-
"customer_signing_policy_mismatch",
|
|
3716
|
-
"customer_signing_project_ambiguous",
|
|
3717
|
-
"customer_signing_runner_identity_unavailable"
|
|
3718
|
-
];
|
|
3719
|
-
APPLE_ERROR_CODES_MAX = 5;
|
|
3720
|
-
IN_FLIGHT = /* @__PURE__ */ new Set(["CREATED", "QUEUED", "WORKING"]);
|
|
3721
|
-
JOB_SERVICE_ENDED = /* @__PURE__ */ new Set(["SUCCESS", "FAILURE", "CANCELED", "TIMEOUT", "INTERNAL_ERROR"]);
|
|
3722
|
-
SCOPE_CREATE = "MRE.JOB_CREATE";
|
|
3723
|
-
SCOPE_READ = "MRE.JOB_READ";
|
|
3724
|
-
SCOPE_CANCEL = "MRE.CANCEL_JOB";
|
|
3725
|
-
DEFAULT_BASE_URL = "https://bo.wix.com/job-service";
|
|
3726
|
-
DEFAULT_OAUTH_URL = "https://www.wixapis.com/oauth/access";
|
|
3727
|
-
TOKEN_TTL_MS = 5 * 60 * 1e3;
|
|
3728
|
-
JobServiceError = class extends Error {
|
|
3729
|
-
constructor(message5, status2, body) {
|
|
3730
|
-
super(message5);
|
|
3731
|
-
this.status = status2;
|
|
3732
|
-
this.body = body;
|
|
3733
|
-
this.name = "JobServiceError";
|
|
3734
|
-
}
|
|
3735
|
-
};
|
|
3736
|
-
JobServiceBroker = class {
|
|
3737
|
-
baseUrl;
|
|
3738
|
-
oauthUrl;
|
|
3739
|
-
fetchImpl;
|
|
3740
|
-
now;
|
|
3741
|
-
creds;
|
|
3742
|
-
/** scope -> { token, expiresAt } */
|
|
3743
|
-
tokens = /* @__PURE__ */ new Map();
|
|
3744
|
-
constructor(opts) {
|
|
3745
|
-
if (!opts.creds?.appDefId || !opts.creds?.appSecret) {
|
|
3746
|
-
throw new JobServiceError("job service credentials missing (POCO_APP_DEF_ID / POCO_APP_SECRET)");
|
|
3747
|
-
}
|
|
3748
|
-
this.creds = opts.creds;
|
|
3749
|
-
this.baseUrl = (opts.baseUrl ?? DEFAULT_BASE_URL).replace(/\/+$/, "");
|
|
3750
|
-
this.oauthUrl = opts.oauthUrl ?? DEFAULT_OAUTH_URL;
|
|
3751
|
-
this.fetchImpl = opts.fetchImpl ?? fetch;
|
|
3752
|
-
this.now = opts.now ?? Date.now;
|
|
3753
|
-
}
|
|
3754
|
-
/** Mint (or reuse) a token for one MRE scope. */
|
|
3755
|
-
async token(scope3) {
|
|
3756
|
-
const cached3 = this.tokens.get(scope3);
|
|
3757
|
-
if (cached3 && cached3.expiresAt > this.now()) return cached3.token;
|
|
3758
|
-
const res = await this.fetchImpl(this.oauthUrl, {
|
|
3759
|
-
method: "POST",
|
|
3760
|
-
headers: { "content-type": "application/json" },
|
|
3761
|
-
body: JSON.stringify({
|
|
3762
|
-
grant_type: "client_credentials",
|
|
3763
|
-
client_id: this.creds.appDefId,
|
|
3764
|
-
client_secret: this.creds.appSecret,
|
|
3765
|
-
scope: scope3
|
|
3766
|
-
})
|
|
3767
|
-
});
|
|
3768
|
-
const text32 = await res.text();
|
|
3769
|
-
if (!res.ok) {
|
|
3770
|
-
throw new JobServiceError(`oauth failed for scope ${scope3}`, res.status, truncate(text32));
|
|
3771
|
-
}
|
|
3772
|
-
let token;
|
|
3773
|
-
try {
|
|
3774
|
-
token = JSON.parse(text32).access_token;
|
|
3775
|
-
} catch {
|
|
3776
|
-
throw new JobServiceError(`oauth returned non-JSON for scope ${scope3}`, res.status, truncate(text32));
|
|
3777
|
-
}
|
|
3778
|
-
if (!token) throw new JobServiceError(`oauth returned no access_token for scope ${scope3}`, res.status);
|
|
3779
|
-
this.tokens.set(scope3, { token, expiresAt: this.now() + TOKEN_TTL_MS });
|
|
3780
|
-
return token;
|
|
3781
|
-
}
|
|
3782
|
-
async call(scope3, method, path2, body) {
|
|
3783
|
-
const token = await this.token(scope3);
|
|
3784
|
-
const res = await this.fetchImpl(`${this.baseUrl}${path2}`, {
|
|
3785
|
-
method,
|
|
3786
|
-
// BARE token, not `Bearer <token>` — matches jobServiceApi's own header.
|
|
3787
|
-
headers: { Authorization: token, ...body ? { "content-type": "application/json" } : {} },
|
|
3788
|
-
...body ? { body: JSON.stringify(body) } : {}
|
|
3789
|
-
});
|
|
3790
|
-
const text32 = await res.text();
|
|
3791
|
-
if (!res.ok) {
|
|
3792
|
-
throw new JobServiceError(`job service ${method} ${path2} failed`, res.status, truncate(text32));
|
|
3793
|
-
}
|
|
3794
|
-
if (!text32) return {};
|
|
3795
|
-
try {
|
|
3796
|
-
return JSON.parse(text32);
|
|
3797
|
-
} catch {
|
|
3798
|
-
throw new JobServiceError(`job service ${method} ${path2} returned non-JSON`, res.status, truncate(text32));
|
|
3799
|
-
}
|
|
3800
|
-
}
|
|
3801
|
-
/**
|
|
3802
|
-
* Create a NODE_COMMAND job on the Mac (or Linux) pool. Returns as soon as Job Service has
|
|
3803
|
-
* queued it — this never waits for the build.
|
|
3804
|
-
*/
|
|
3805
|
-
async createNodeCommand(spec, os2 = "mac", notify) {
|
|
3806
|
-
for (const key4 of ["gitUrl", "gitCommitSha", "packageName", "command", "branchName"]) {
|
|
3807
|
-
if (!spec[key4]) throw new JobServiceError(`createNodeCommand: missing ${key4}`);
|
|
3808
|
-
}
|
|
3809
|
-
const optionsKey = os2 === "linux" ? "linuxNodeCommandOptions" : "nodeCommandOptions";
|
|
3810
|
-
const type2 = os2 === "linux" ? "LINUX_NODE_COMMAND" : "NODE_COMMAND";
|
|
3811
|
-
const options2 = {
|
|
3812
|
-
packageManager: "YARN",
|
|
3813
|
-
// the only value Job Service accepts
|
|
3814
|
-
gitUrl: spec.gitUrl,
|
|
3815
|
-
gitCommitSha: spec.gitCommitSha,
|
|
3816
|
-
packageName: spec.packageName,
|
|
3817
|
-
command: spec.command,
|
|
3818
|
-
branchName: spec.branchName,
|
|
3819
|
-
...spec.envVars ? { envVars: spec.envVars } : {}
|
|
3820
|
-
};
|
|
3821
|
-
if (os2 === "mac" && spec.xcodeVersion) options2.xcodeVersion = spec.xcodeVersion;
|
|
3822
|
-
const subscriptions = {
|
|
3823
|
-
...notify?.ownershipTags?.length ? { subscribedOwnershipTags: notify.ownershipTags } : {},
|
|
3824
|
-
...notify?.userIds?.length ? { subscribedUserIds: notify.userIds } : {}
|
|
3825
|
-
};
|
|
3826
|
-
const data = await this.call(SCOPE_CREATE, "POST", "/v1/job", {
|
|
3827
|
-
job: { type: type2, [optionsKey]: options2, ...subscriptions }
|
|
3828
|
-
});
|
|
3829
|
-
const job = data?.job;
|
|
3830
|
-
if (!job?.id) throw new JobServiceError("job service create returned no job id");
|
|
3831
|
-
return snapshot(job);
|
|
3832
|
-
}
|
|
3833
|
-
/** Current state of a job. */
|
|
3834
|
-
async read(jobId) {
|
|
3835
|
-
const data = await this.call(SCOPE_READ, "GET", `/v1/job/${encodeURIComponent(jobId)}`);
|
|
3836
|
-
const job = data?.job;
|
|
3837
|
-
if (!job) throw new JobServiceError(`job service read returned no job for ${jobId}`);
|
|
3838
|
-
return snapshot({ id: jobId, ...job });
|
|
3839
|
-
}
|
|
3840
|
-
/** Ask Job Service to cancel a queued/running job. */
|
|
3841
|
-
async cancel(jobId) {
|
|
3842
|
-
await this.call(SCOPE_CANCEL, "POST", `/v1/job/${encodeURIComponent(jobId)}/cancel`);
|
|
3843
|
-
}
|
|
3844
|
-
};
|
|
3845
|
-
CUSTOMER_UPLOAD_LEASE_MS = 15 * 60 * 1e3;
|
|
3846
|
-
CUSTOMER_UPLOAD_RETRY_DELAYS_MS = [6e4, 5 * 6e4, 15 * 6e4];
|
|
3847
|
-
CUSTOMER_UPLOAD_MAX_ATTEMPTS = CUSTOMER_UPLOAD_RETRY_DELAYS_MS.length + 1;
|
|
3848
|
-
CUSTOMER_UPLOAD_ABANDONED = "customer_app_store_upload_abandoned";
|
|
3849
|
-
MAX_MEASURABLE_IDENTITY_WINDOW = 100;
|
|
3850
|
-
SITE_SHELL_SERVED_CAPABILITIES = ["webview"];
|
|
3851
|
-
DIST_SHELLS = {
|
|
3852
|
-
"branded-lite": {
|
|
3853
|
-
appDir: "apps/himi-branded-lite",
|
|
3854
|
-
bundleId: { ios: "ent.wix.brandedlite.dev", android: "com.wix.himi.brandedlite.dev" },
|
|
3855
|
-
provisioningEnv: "HIMI_BRANDED_LITE_PROVISIONING_JSON",
|
|
3856
|
-
embeddedSuffixes: ["liveactivity"],
|
|
3857
|
-
extensibleCapabilities: true,
|
|
3858
|
-
// RFC 0080 P1 — the first (and so far only) shell that builds author native extensions.
|
|
3859
|
-
extensibleNative: true,
|
|
3860
|
-
// Its config.ts bakes Wix member login from the contract's `wix` (or none, visitor-only).
|
|
3861
|
-
projectsMemberBinding: true,
|
|
3862
|
-
// RFC 0079 §10 — Brandy becomes a template on this shell: a website-only release bakes its own
|
|
3863
|
-
// site block and starts from the minimal site capability profile.
|
|
3864
|
-
projectsSite: true,
|
|
3865
|
-
siteCapabilityProfile: true
|
|
3866
|
-
},
|
|
3867
|
-
"owner-lite": {
|
|
3868
|
-
appDir: "apps/himi-owner-lite",
|
|
3869
|
-
bundleId: { ios: "ent.wix.ownerlite.dev", android: "com.wix.himi.ownerlite.dev" },
|
|
3870
|
-
provisioningEnv: "HIMI_OWNER_LITE_PROVISIONING_JSON",
|
|
3871
|
-
// #4354 — the iOS project embeds its companion watch app (<host>.watchkitapp).
|
|
3872
|
-
embeddedSuffixes: ["liveactivity", "watchkitapp"],
|
|
3873
|
-
extensibleCapabilities: true
|
|
3874
|
-
},
|
|
3875
|
-
// RFC 0062 — the site shell: the customer's own website as native-framed tabs. Since RFC 0079 §10
|
|
3876
|
-
// (phase 6, the cut-over) `brandy` is an ALIAS of branded-lite: it builds branded-lite's tree, which
|
|
3877
|
-
// hosts site pages through the shared shell glue, and bakes the release's own site block. What it
|
|
3878
|
-
// keeps is Brandy's identity, so an installed Brandy build updates in place:
|
|
3879
|
-
// - its bundle ids (`DIST_BUNDLE_ID`, which the pool's bundle-id policy ships under), and the
|
|
3880
|
-
// per-app ids recorded for its apps (`recordedBundleIdOf` is per app, never per shell);
|
|
3881
|
-
// - its Android key: no shell has a key of its own — the job's `androidSigning` policy picks it
|
|
3882
|
-
// (the committed QA keystore by default), for the alias exactly as for Brandy;
|
|
3883
|
-
// - its entitlements: Brandy's profiles carry push + associated domains only, so the alias never
|
|
3884
|
-
// adds App Attest (`appAttest: false`) and starts every release from the site profile, which
|
|
3885
|
-
// drops `live_activity` and with it the App Group (still added when a release declares it, as
|
|
3886
|
-
// Brandy's own Live Activity target did).
|
|
3887
|
-
// `contentAppDir` is the in-repo Brandy content app (`apps/himi-brandy`: config, dev module, seed,
|
|
3888
|
-
// provisioning). Its committed `site` block is what `site analyze --shell brandy` reads to know the
|
|
3889
|
-
// target is a site shell. It has no native tree since 6F-b, so an in-repo `--apply --shell brandy`
|
|
3890
|
-
// has nothing to bake and refuses; the binary is always this alias's branded-lite build.
|
|
3891
|
-
brandy: {
|
|
3892
|
-
appDir: "apps/himi-branded-lite",
|
|
3893
|
-
aliasOf: "branded-lite",
|
|
3894
|
-
contentAppDir: "apps/himi-brandy",
|
|
3895
|
-
bundleId: { ios: "ent.wix.brandy.dev", android: "com.wix.himi.brandy.dev" },
|
|
3896
|
-
// The tree's gradle seam: branded-lite's build.gradle.kts reads THIS name, never Brandy's.
|
|
3897
|
-
provisioningEnv: "HIMI_BRANDED_LITE_PROVISIONING_JSON",
|
|
3898
|
-
embeddedSuffixes: ["liveactivity"],
|
|
3899
|
-
extensibleCapabilities: true,
|
|
3900
|
-
// Brandy never accepted author native code; the alias does not start to.
|
|
3901
|
-
projectsMemberBinding: true,
|
|
3902
|
-
projectsSite: true,
|
|
3903
|
-
siteCapabilityProfile: true,
|
|
3904
|
-
siteReleasesOnly: true,
|
|
3905
|
-
appAttest: false
|
|
3906
|
-
},
|
|
3907
|
-
// The Base44 shell (#3674): a Base44 app as a native binary. Brandable — dist bakes the fetched
|
|
3908
|
-
// contract's identity, icon, brand colour and `base44` binding (which Base44 app it talks to).
|
|
3909
|
-
base44: {
|
|
3910
|
-
appDir: "apps/himi-base44",
|
|
3911
|
-
bundleId: { ios: "ent.wix.himibase44.dev", android: "com.wix.himi.base44.dev" },
|
|
3912
|
-
provisioningEnv: "HIMI_BASE44_PROVISIONING_JSON",
|
|
3913
|
-
embeddedSuffixes: ["liveactivity"],
|
|
3914
|
-
extensibleCapabilities: true
|
|
3915
|
-
},
|
|
3916
|
-
// The Godot game shell (#5283 Phase 4): a game as a native binary. The ONLY shell that serves
|
|
3917
|
-
// `godot` — the four business shells above cannot link the engine and refuse it. The `.dev`
|
|
3918
|
-
// ids are placeholders, not real App Store / Play ids. `embeddedSuffixes` stays empty: the
|
|
3919
|
-
// watch id (`<host>.watch.dev`) is not the `<host>.<suffix>` shape the signing mint requires.
|
|
3920
|
-
game: {
|
|
3921
|
-
appDir: "apps/himi-game",
|
|
3922
|
-
bundleId: { ios: "com.himalaya.himigame.dev.dev", android: "com.himalaya.himigame.dev.dev" },
|
|
3923
|
-
provisioningEnv: "HIMI_GAME_PROVISIONING_JSON",
|
|
3924
|
-
embeddedSuffixes: [],
|
|
3925
|
-
// prepare:customer writes the release's capability list, gen.sh feeds it to native-config,
|
|
3926
|
-
// and both boots register the baked ids.
|
|
3927
|
-
extensibleCapabilities: true
|
|
3928
|
-
},
|
|
3929
|
-
player: {
|
|
3930
|
-
appDir: "apps/himi-player",
|
|
3931
|
-
bundleId: { ios: "dev.himalaya.player.dev", android: "dev.himalaya.player.dev" },
|
|
3932
|
-
provisioningEnv: "HIMI_PLAYER_PROVISIONING_JSON",
|
|
3933
|
-
// The Live Activity extension Player embeds since #3691 (hosted apps' lock-screen timers).
|
|
3934
|
-
embeddedSuffixes: ["liveactivity"],
|
|
3935
|
-
extensibleCapabilities: false
|
|
3936
|
-
},
|
|
3937
|
-
"demo-app": {
|
|
3938
|
-
appDir: "apps/demo-app",
|
|
3939
|
-
bundleId: { ios: "com.himalaya.demoapp.dev", android: "com.himalaya.demoapp.dev" },
|
|
3940
|
-
provisioningEnv: "DEMO_APP_PROVISIONING_JSON",
|
|
3941
|
-
embeddedSuffixes: ["widgets"],
|
|
3942
|
-
extensibleCapabilities: false
|
|
3943
|
-
}
|
|
3944
|
-
};
|
|
3945
|
-
DEFAULT_DIST_SHELL = "branded-lite";
|
|
3946
|
-
DEFAULT_BORROWABLE_IOS_IDS = ["ent.*"];
|
|
3947
|
-
BUNDLE_ID_RE = /^[a-z][a-z0-9]*(\.[a-z][a-z0-9]*)+$/;
|
|
3948
|
-
DEFAULT_DIST_SIGNING = "wix-managed";
|
|
3949
|
-
WIX_MANAGED_SIGNING_ALIASES = ["wix-managed", "wix", "pool-enterprise"];
|
|
3950
|
-
DEFAULT_ANDROID_SIGNING = "qa-keystore";
|
|
3951
|
-
ANDROID_SIGNING_POLICIES = ["qa-keystore", "wix-keystore", "debug", "oneapp-debug", "unsigned"];
|
|
3952
|
-
ANDROID_SIGNING_ALIASES = {
|
|
3953
|
-
// The canonical spellings, derived so the two lists cannot drift apart.
|
|
3954
|
-
...Object.fromEntries(ANDROID_SIGNING_POLICIES.map((p2) => [p2, p2])),
|
|
3955
|
-
qa: "qa-keystore",
|
|
3956
|
-
himi: "qa-keystore",
|
|
3957
|
-
wix: "wix-keystore",
|
|
3958
|
-
oneapp: "wix-keystore",
|
|
3959
|
-
"one-app-debug": "oneapp-debug",
|
|
3960
|
-
oneappdebug: "oneapp-debug",
|
|
3961
|
-
// The CLI's word for an owner bundle. `unsigned` is the fact about the file, which the pool reports.
|
|
3962
|
-
owner: "unsigned"
|
|
3963
|
-
};
|
|
3964
|
-
DEFAULT_ANDROID_FORMAT = "apk";
|
|
3965
|
-
ANDROID_FORMATS = ["apk", "aab"];
|
|
3966
|
-
ANDROID_FORMAT_NOT_BUILT = "android_format_not_built";
|
|
3967
|
-
ANDROID_FORMAT_WRONG_SIGNER = "android_format_wrong_signer";
|
|
3968
|
-
ANDROID_FORMAT_NOT_REQUESTED = "android_format_not_requested";
|
|
3969
|
-
DEFAULT_ANDROID_BUILD_TYPE = "release";
|
|
3970
|
-
ANDROID_BUILD_TYPES = ["release", "debug"];
|
|
3971
|
-
ANDROID_BUILD_TYPE_NOT_BUILT = "android_build_type_not_built";
|
|
3972
|
-
DEFAULT_IOS_FORMAT = "ipa";
|
|
3973
|
-
IOS_FORMATS = ["ipa", "simulator"];
|
|
3974
|
-
IOS_FORMAT_NOT_BUILT = "ios_format_not_built";
|
|
3975
|
-
IOS_FORMAT_NOT_REQUESTED = "ios_format_not_requested";
|
|
3976
|
-
DEFAULT_GIT_URL = "https://github.com/wix-private/himalaya";
|
|
3977
|
-
DIST_PACKAGE_NAME = "@himalaya/native-ci";
|
|
3978
|
-
DIST_PARAMS_FLAG = "--himi-dist";
|
|
3979
|
-
MAX_COMMAND_CHARS = 2e3;
|
|
3980
|
-
}
|
|
3981
|
-
});
|
|
3982
|
-
|
|
3983
3258
|
// ../../core/ts/src/registry-app-normalize.ts
|
|
3984
3259
|
function isPlayerRequirements(v2) {
|
|
3985
3260
|
if (!v2 || typeof v2 !== "object") return false;
|
|
@@ -4496,6 +3771,7 @@ var init_himi_package = __esm({
|
|
|
4496
3771
|
var ICON_VIEW_BOX, ICON_STROKE_WIDTH, ICON_FALLBACK, ICON_CATALOG, ICON_NORMALIZED_INDEX, ICON_NAMES;
|
|
4497
3772
|
var init_icon_catalog_generated = __esm({
|
|
4498
3773
|
"../../core/ts/src/icon-catalog.generated.ts"() {
|
|
3774
|
+
"use strict";
|
|
4499
3775
|
init_define_HHP_CATALOG();
|
|
4500
3776
|
ICON_VIEW_BOX = 24;
|
|
4501
3777
|
ICON_STROKE_WIDTH = 2;
|
|
@@ -8555,6 +7831,1008 @@ var init_site_shell = __esm({
|
|
|
8555
7831
|
}
|
|
8556
7832
|
});
|
|
8557
7833
|
|
|
7834
|
+
// ../native-config/bake-safe.ts
|
|
7835
|
+
function hasUnsafeBakeChars(value2) {
|
|
7836
|
+
return UNSAFE.test(value2);
|
|
7837
|
+
}
|
|
7838
|
+
function isBakeableGoogleClientId(value2) {
|
|
7839
|
+
return typeof value2 === "string" && GOOGLE_CLIENT_ID.test(value2) && !hasUnsafeBakeChars(value2);
|
|
7840
|
+
}
|
|
7841
|
+
function bakeableHttpsOrigin(value2) {
|
|
7842
|
+
if (typeof value2 !== "string") return void 0;
|
|
7843
|
+
const raw = value2;
|
|
7844
|
+
if (!raw || hasUnsafeBakeChars(raw) || raw.includes("%")) return void 0;
|
|
7845
|
+
let u2;
|
|
7846
|
+
try {
|
|
7847
|
+
u2 = new URL(raw);
|
|
7848
|
+
} catch {
|
|
7849
|
+
return void 0;
|
|
7850
|
+
}
|
|
7851
|
+
if (u2.protocol !== "https:" || u2.pathname !== "/" && u2.pathname !== "" || u2.search || u2.hash || u2.username || u2.password) return void 0;
|
|
7852
|
+
if (!HOSTNAME.test(u2.hostname)) return void 0;
|
|
7853
|
+
const origin = u2.origin;
|
|
7854
|
+
return hasUnsafeBakeChars(origin) ? void 0 : origin;
|
|
7855
|
+
}
|
|
7856
|
+
function isBakeableBase44AppId(value2) {
|
|
7857
|
+
return typeof value2 === "string" && /^[A-Za-z0-9]{8,64}$/.test(value2);
|
|
7858
|
+
}
|
|
7859
|
+
function isBase44TenantOrigin(origin) {
|
|
7860
|
+
const safe = bakeableHttpsOrigin(origin);
|
|
7861
|
+
if (!safe || safe !== origin) return false;
|
|
7862
|
+
const u2 = new URL(safe);
|
|
7863
|
+
if (u2.port !== "" || !u2.hostname.endsWith(BASE44_APP_SUFFIX)) return false;
|
|
7864
|
+
const tenant = u2.hostname.slice(0, -BASE44_APP_SUFFIX.length);
|
|
7865
|
+
return tenant.length > 0 && !tenant.includes(".");
|
|
7866
|
+
}
|
|
7867
|
+
function isWixFreeSiteUrl(url) {
|
|
7868
|
+
if (typeof url !== "string") return false;
|
|
7869
|
+
try {
|
|
7870
|
+
return isWixFreeSiteHost(new URL(url).hostname);
|
|
7871
|
+
} catch {
|
|
7872
|
+
return false;
|
|
7873
|
+
}
|
|
7874
|
+
}
|
|
7875
|
+
function wixDomainTwins(host) {
|
|
7876
|
+
const h2 = host.toLowerCase();
|
|
7877
|
+
return [h2, h2.startsWith("www.") ? h2.slice(4) : `www.${h2}`];
|
|
7878
|
+
}
|
|
7879
|
+
function wixSiteUrlVerifiedFor(url, clientId, verified2) {
|
|
7880
|
+
if (!verified2 || verified2.clientId !== clientId || typeof url !== "string") return false;
|
|
7881
|
+
const origin = bakeableHttpsOrigin(verified2.origin);
|
|
7882
|
+
if (!origin || origin !== verified2.origin) return false;
|
|
7883
|
+
let u2;
|
|
7884
|
+
try {
|
|
7885
|
+
u2 = new URL(url);
|
|
7886
|
+
} catch {
|
|
7887
|
+
return false;
|
|
7888
|
+
}
|
|
7889
|
+
if (u2.protocol !== "https:" || u2.port !== "" || u2.username || u2.password) return false;
|
|
7890
|
+
const want = new URL(origin);
|
|
7891
|
+
return want.port === "" && wixDomainTwins(want.hostname).includes(u2.hostname.toLowerCase());
|
|
7892
|
+
}
|
|
7893
|
+
function wixCustomDomainUrls(site, siteUrl) {
|
|
7894
|
+
if (!site || site.kind !== "wix") return [];
|
|
7895
|
+
const urls2 = [site.origin, siteUrl].filter((u2) => typeof u2 === "string" && u2.trim() !== "").map((u2) => u2.trim());
|
|
7896
|
+
return [...new Set(urls2)].filter((u2) => !isWixFreeSiteUrl(u2));
|
|
7897
|
+
}
|
|
7898
|
+
var UNSAFE, GOOGLE_CLIENT_ID, HOSTNAME, BASE44_APP_SITES, BASE44_APP_SUFFIX;
|
|
7899
|
+
var init_bake_safe = __esm({
|
|
7900
|
+
"../native-config/bake-safe.ts"() {
|
|
7901
|
+
init_define_HHP_CATALOG();
|
|
7902
|
+
init_site_shell();
|
|
7903
|
+
UNSAFE = /[\u0000-\u0020\u007f-\u009f\u00a0\u2028\u2029$(){}"'`\\<>&]/;
|
|
7904
|
+
GOOGLE_CLIENT_ID = /^[0-9]{6,20}(?:-[a-z0-9]{8,64})?\.apps\.googleusercontent\.com$/;
|
|
7905
|
+
HOSTNAME = /^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/;
|
|
7906
|
+
BASE44_APP_SITES = BASE44_ORIGINS.find((pattern) => pattern === "*.base44.app");
|
|
7907
|
+
if (!BASE44_APP_SITES) throw new Error("BASE44_ORIGINS no longer lists *.base44.app; bake-safe.ts's tenant rule must follow it");
|
|
7908
|
+
BASE44_APP_SUFFIX = BASE44_APP_SITES.slice(1);
|
|
7909
|
+
}
|
|
7910
|
+
});
|
|
7911
|
+
|
|
7912
|
+
// ../native-config/binding-spellings.ts
|
|
7913
|
+
function isPlainObject(value2) {
|
|
7914
|
+
return value2 !== null && typeof value2 === "object" && !Array.isArray(value2);
|
|
7915
|
+
}
|
|
7916
|
+
function blank(value2) {
|
|
7917
|
+
return value2 == null || value2 === "";
|
|
7918
|
+
}
|
|
7919
|
+
function sameValue(field, a3, b3) {
|
|
7920
|
+
if (typeof a3 === "string" && typeof b3 === "string") {
|
|
7921
|
+
return field === "siteId" ? a3.trim().toLowerCase() === b3.trim().toLowerCase() : a3.trim() === b3.trim();
|
|
7922
|
+
}
|
|
7923
|
+
return JSON.stringify(a3) === JSON.stringify(b3);
|
|
7924
|
+
}
|
|
7925
|
+
function mergeBlock(key4, legacy, nested) {
|
|
7926
|
+
if (nested != null && !isPlainObject(nested)) throw new Error(`provisioning.bindings.${key4} must be an object`);
|
|
7927
|
+
if (legacy == null) return nested ?? void 0;
|
|
7928
|
+
if (nested == null) return legacy;
|
|
7929
|
+
if (!isPlainObject(legacy)) return legacy;
|
|
7930
|
+
const merged = { ...legacy };
|
|
7931
|
+
for (const [field, value2] of Object.entries(nested)) {
|
|
7932
|
+
if (blank(value2)) continue;
|
|
7933
|
+
const other = legacy[field];
|
|
7934
|
+
if (!blank(other) && !sameValue(field, other, value2)) {
|
|
7935
|
+
throw new Error(
|
|
7936
|
+
`provisioning.${key4}.${field} (${JSON.stringify(other)}) and provisioning.bindings.${key4}.${field} (${JSON.stringify(value2)}) disagree. They are the same field (RFC 0079 \xA710) \u2014 keep one spelling, or make them agree.`
|
|
7937
|
+
);
|
|
7938
|
+
}
|
|
7939
|
+
merged[field] = value2;
|
|
7940
|
+
}
|
|
7941
|
+
return merged;
|
|
7942
|
+
}
|
|
7943
|
+
function bindingsEnvelope(input) {
|
|
7944
|
+
const raw = input.bindings;
|
|
7945
|
+
if (raw == null) return void 0;
|
|
7946
|
+
if (!isPlainObject(raw)) throw new Error("provisioning.bindings must be an object");
|
|
7947
|
+
for (const key4 of Object.keys(raw)) {
|
|
7948
|
+
if (!BINDING_KEYS.includes(key4)) {
|
|
7949
|
+
throw new Error(`provisioning.bindings.${key4} is not a binding (allowed: ${BINDING_KEYS.join(", ")})`);
|
|
7950
|
+
}
|
|
7951
|
+
}
|
|
7952
|
+
return raw;
|
|
7953
|
+
}
|
|
7954
|
+
function readBindingBlocks(input) {
|
|
7955
|
+
const nested = bindingsEnvelope(input) ?? {};
|
|
7956
|
+
return {
|
|
7957
|
+
wix: mergeBlock("wix", input.wix, nested.wix),
|
|
7958
|
+
base44: mergeBlock("base44", input.base44, nested.base44)
|
|
7959
|
+
};
|
|
7960
|
+
}
|
|
7961
|
+
var BINDING_KEYS;
|
|
7962
|
+
var init_binding_spellings = __esm({
|
|
7963
|
+
"../native-config/binding-spellings.ts"() {
|
|
7964
|
+
init_define_HHP_CATALOG();
|
|
7965
|
+
BINDING_KEYS = ["wix", "base44"];
|
|
7966
|
+
}
|
|
7967
|
+
});
|
|
7968
|
+
|
|
7969
|
+
// ../native-config/site-contract-fields.ts
|
|
7970
|
+
var SITE_CHROME_FLAGS, SITE_CHROME_LISTS, PAGE_WEBVIEW_BOOLEANS, PAGE_WEBVIEW_STRINGS, PAGE_WEBVIEW_LISTS, SITE_EMPTY_LIST_FIELDS, SITE_MEMBER_PAGE_KEYS, SITE_STRING_FIELDS, SITE_BOOLEAN_FIELDS;
|
|
7971
|
+
var init_site_contract_fields = __esm({
|
|
7972
|
+
"../native-config/site-contract-fields.ts"() {
|
|
7973
|
+
init_define_HHP_CATALOG();
|
|
7974
|
+
SITE_CHROME_FLAGS = ["hideSiteHeader", "hideSiteMenu", "hideSiteFooter", "hideWixAds"];
|
|
7975
|
+
SITE_CHROME_LISTS = ["hideSelectors"];
|
|
7976
|
+
PAGE_WEBVIEW_BOOLEANS = [
|
|
7977
|
+
"pullToRefresh",
|
|
7978
|
+
"showProgressBar",
|
|
7979
|
+
"hideHostedSiteHeader",
|
|
7980
|
+
"hideHostedSiteFooter",
|
|
7981
|
+
"hideHostedSiteMenu",
|
|
7982
|
+
"hideWixAds",
|
|
7983
|
+
"immersive",
|
|
7984
|
+
"keepAlive"
|
|
7985
|
+
];
|
|
7986
|
+
PAGE_WEBVIEW_STRINGS = ["loadingText", "errorTitle"];
|
|
7987
|
+
PAGE_WEBVIEW_LISTS = ["hideSelectors"];
|
|
7988
|
+
SITE_EMPTY_LIST_FIELDS = new Set(PAGE_WEBVIEW_LISTS.map((key4) => `pages[].webView.${key4}`));
|
|
7989
|
+
SITE_MEMBER_PAGE_KEYS = ["orders", "bookings"];
|
|
7990
|
+
SITE_STRING_FIELDS = {
|
|
7991
|
+
origin: "url",
|
|
7992
|
+
kind: "id",
|
|
7993
|
+
layout: "id",
|
|
7994
|
+
menuSource: "id",
|
|
7995
|
+
pageTitle: "id",
|
|
7996
|
+
"pages[].id": "id",
|
|
7997
|
+
"pages[].title": "text",
|
|
7998
|
+
"pages[].path": "path",
|
|
7999
|
+
"pages[].icon": "id",
|
|
8000
|
+
"pages[].placement": "id",
|
|
8001
|
+
...Object.fromEntries(PAGE_WEBVIEW_STRINGS.map((key4) => [`pages[].webView.${key4}`, "text"])),
|
|
8002
|
+
...Object.fromEntries(SITE_CHROME_LISTS.map((key4) => [`chrome.${key4}[]`, "selector"])),
|
|
8003
|
+
...Object.fromEntries(PAGE_WEBVIEW_LISTS.map((key4) => [`pages[].webView.${key4}[]`, "selector"])),
|
|
8004
|
+
...Object.fromEntries(SITE_MEMBER_PAGE_KEYS.map((key4) => [`memberPages.${key4}`, "path"])),
|
|
8005
|
+
// `site.topBar.actions[]` — trailing top-bar icons (core/ts/src/site-shell.ts `SiteTopBarAction`).
|
|
8006
|
+
"topBar.actions[].id": "id",
|
|
8007
|
+
"topBar.actions[].icon": "id",
|
|
8008
|
+
"topBar.actions[].label": "text",
|
|
8009
|
+
"topBar.actions[].target.page": "id",
|
|
8010
|
+
"topBar.actions[].target.screen": "id",
|
|
8011
|
+
"topBar.actions[].target.url": "link",
|
|
8012
|
+
// `site.nativePages[]` — the author's own native screens in the chrome (`SiteNativePage`).
|
|
8013
|
+
"nativePages[].id": "id",
|
|
8014
|
+
"nativePages[].screenId": "id",
|
|
8015
|
+
"nativePages[].title": "text",
|
|
8016
|
+
"nativePages[].icon": "id",
|
|
8017
|
+
"nativePages[].placement": "id",
|
|
8018
|
+
"nativePages[].after": "id"
|
|
8019
|
+
};
|
|
8020
|
+
SITE_BOOLEAN_FIELDS = /* @__PURE__ */ new Set([
|
|
8021
|
+
...SITE_CHROME_FLAGS.map((key4) => `chrome.${key4}`),
|
|
8022
|
+
...PAGE_WEBVIEW_BOOLEANS.map((key4) => `pages[].webView.${key4}`),
|
|
8023
|
+
"pages[].showTitle",
|
|
8024
|
+
"nativePages[].public",
|
|
8025
|
+
"nativePages[].requiresAuth"
|
|
8026
|
+
]);
|
|
8027
|
+
}
|
|
8028
|
+
});
|
|
8029
|
+
|
|
8030
|
+
// ../../core/serve-control/src/dist-release-contract.ts
|
|
8031
|
+
function isSafeFreeText(text32) {
|
|
8032
|
+
return !FREE_TEXT_UNSAFE.test(text32) && text32.length <= FREE_TEXT_MAX;
|
|
8033
|
+
}
|
|
8034
|
+
function base44RecordOwnsTenant(record6, origin, appId3) {
|
|
8035
|
+
const tenant = base44TenantOrigin(origin);
|
|
8036
|
+
if (!tenant || !record6 || typeof record6 !== "object") return false;
|
|
8037
|
+
const { id, slug } = record6;
|
|
8038
|
+
const label4 = new URL(tenant).hostname.slice(0, -".base44.app".length);
|
|
8039
|
+
return typeof id === "string" && id === appId3 && typeof slug === "string" && slug.toLowerCase() === label4;
|
|
8040
|
+
}
|
|
8041
|
+
function base44TenantOrigin(value2) {
|
|
8042
|
+
const origin = bakeableHttpsOrigin(value2);
|
|
8043
|
+
if (!origin) return void 0;
|
|
8044
|
+
const u2 = new URL(origin);
|
|
8045
|
+
return u2.port === "" && BASE44_TENANT_HOST.test(u2.hostname) ? origin : void 0;
|
|
8046
|
+
}
|
|
8047
|
+
var DIST_CONTRACT_REFUSAL_CODES, FREE_TEXT_UNSAFE, FREE_TEXT_MAX, BASE44_APP_RECORD_URL, BASE44_RECORD_MAX_BYTES, BASE44_TENANT_HOST;
|
|
8048
|
+
var init_dist_release_contract = __esm({
|
|
8049
|
+
"../../core/serve-control/src/dist-release-contract.ts"() {
|
|
8050
|
+
init_define_HHP_CATALOG();
|
|
8051
|
+
init_bake_safe();
|
|
8052
|
+
init_binding_spellings();
|
|
8053
|
+
init_site_contract_fields();
|
|
8054
|
+
init_site_shell();
|
|
8055
|
+
DIST_CONTRACT_REFUSAL_CODES = [
|
|
8056
|
+
/** The release serves a `contract.site` that is not a site-shell block (an https `origin`, a
|
|
8057
|
+
* `kind` of `wix`/`base44`/`web`, at least one page with `id`, `title`, `path`). */
|
|
8058
|
+
"release_site_invalid",
|
|
8059
|
+
/** The release's site is of kind `web`, which is visitor-only, and the release binds a Wix member
|
|
8060
|
+
* client or a Base44 app: a web site has no session bridge for either to sign in to. */
|
|
8061
|
+
"release_web_site_binding",
|
|
8062
|
+
/** A string in the release's site block is not safe to bake. */
|
|
8063
|
+
"release_site_unsafe",
|
|
8064
|
+
/** The release declares `base44`, and its Base44 binding is malformed or unsafe to bake. */
|
|
8065
|
+
"release_base44_binding_invalid",
|
|
8066
|
+
/** The release names two Base44 bindings that disagree (served `base44Config` vs the contract's,
|
|
8067
|
+
* or the contract's two spellings). */
|
|
8068
|
+
"release_base44_binding_conflict",
|
|
8069
|
+
/** The release declares `base44` and serves no Base44 binding at all. */
|
|
8070
|
+
"release_base44_binding_missing",
|
|
8071
|
+
/** The release's Base44 binding has no site block of kind `base44` with a bare https origin. */
|
|
8072
|
+
"release_base44_site_invalid",
|
|
8073
|
+
/** The Base44 site is not a Base44-hosted tenant (`https://<tenant>.base44.app`): a custom domain
|
|
8074
|
+
* cannot be tied to the app, so the session bridge will not trust it. */
|
|
8075
|
+
"release_base44_site_untrusted",
|
|
8076
|
+
/** The Base44 site's own published page was not checked (no verification for this origin). */
|
|
8077
|
+
"release_base44_site_unverified",
|
|
8078
|
+
/** The Base44 site's published page names a different app than the release's binding. */
|
|
8079
|
+
"release_base44_site_mismatch",
|
|
8080
|
+
/** An identity field the release serves is malformed or unsafe to bake. */
|
|
8081
|
+
"release_identity_invalid",
|
|
8082
|
+
/** The release declares `google_sign_in` and a Google client ID it serves is not one a build
|
|
8083
|
+
* can bake (`<project-number>[-<suffix>].apps.googleusercontent.com`). */
|
|
8084
|
+
"release_google_sign_in_invalid",
|
|
8085
|
+
/** The release's contract Wix binding is malformed, or its two spellings disagree. */
|
|
8086
|
+
"release_wix_binding_invalid",
|
|
8087
|
+
/** The release's Wix site is on a custom domain, binds a Wix member client, and Wix was not asked
|
|
8088
|
+
* (or could not say) which site that client belongs to — so the domain is not known to be the
|
|
8089
|
+
* client's, and the session bridge would carry the member's session into it. */
|
|
8090
|
+
"release_wix_site_unverified",
|
|
8091
|
+
/** Wix says the release's Wix client belongs to a site on another domain than the one the release
|
|
8092
|
+
* names (its site block's origin, or its binding's `siteUrl`). */
|
|
8093
|
+
"release_wix_site_mismatch",
|
|
8094
|
+
/** The release's Wix site URL is the editor's stand-in for a site that was not published yet
|
|
8095
|
+
* (`https://<msid>.unpublished.invalid`, `WIX_UNPUBLISHED_SITE_HOST_SUFFIX`): there is no site to
|
|
8096
|
+
* verify, so Wix is not asked. Publish the site, then make a new release. */
|
|
8097
|
+
"release_wix_site_unpublished",
|
|
8098
|
+
/** The shell builds site-shell releases only, and the release serves no contract site block. */
|
|
8099
|
+
"release_site_missing"
|
|
8100
|
+
];
|
|
8101
|
+
FREE_TEXT_UNSAFE = /[\u0000-\u001f\u007f-\u009f\u2028\u2029$`{}<>\\]/;
|
|
8102
|
+
FREE_TEXT_MAX = 200;
|
|
8103
|
+
BASE44_APP_RECORD_URL = (appId3) => `https://base44.app/api/apps/public/login-info/by-id/${encodeURIComponent(appId3)}`;
|
|
8104
|
+
BASE44_RECORD_MAX_BYTES = 256e3;
|
|
8105
|
+
BASE44_TENANT_HOST = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.base44\.app$/;
|
|
8106
|
+
}
|
|
8107
|
+
});
|
|
8108
|
+
|
|
8109
|
+
// ../../core/serve-control/src/dist-jobs.ts
|
|
8110
|
+
var dist_jobs_exports = {};
|
|
8111
|
+
__export(dist_jobs_exports, {
|
|
8112
|
+
ANDROID_BUILD_TYPES: () => ANDROID_BUILD_TYPES,
|
|
8113
|
+
ANDROID_BUILD_TYPE_NOT_BUILT: () => ANDROID_BUILD_TYPE_NOT_BUILT,
|
|
8114
|
+
ANDROID_FORMATS: () => ANDROID_FORMATS,
|
|
8115
|
+
ANDROID_FORMAT_NOT_BUILT: () => ANDROID_FORMAT_NOT_BUILT,
|
|
8116
|
+
ANDROID_FORMAT_NOT_REQUESTED: () => ANDROID_FORMAT_NOT_REQUESTED,
|
|
8117
|
+
ANDROID_FORMAT_WRONG_SIGNER: () => ANDROID_FORMAT_WRONG_SIGNER,
|
|
8118
|
+
ANDROID_SIGNING_ALIASES: () => ANDROID_SIGNING_ALIASES,
|
|
8119
|
+
ANDROID_SIGNING_POLICIES: () => ANDROID_SIGNING_POLICIES,
|
|
8120
|
+
APPLE_ERROR_CODES_MAX: () => APPLE_ERROR_CODES_MAX,
|
|
8121
|
+
CUSTOMER_UPLOAD_ABANDONED: () => CUSTOMER_UPLOAD_ABANDONED,
|
|
8122
|
+
CUSTOMER_UPLOAD_LEASE_MS: () => CUSTOMER_UPLOAD_LEASE_MS,
|
|
8123
|
+
CUSTOMER_UPLOAD_MAX_ATTEMPTS: () => CUSTOMER_UPLOAD_MAX_ATTEMPTS,
|
|
8124
|
+
CUSTOMER_UPLOAD_RETRY_DELAYS_MS: () => CUSTOMER_UPLOAD_RETRY_DELAYS_MS,
|
|
8125
|
+
DEFAULT_ANDROID_BUILD_TYPE: () => DEFAULT_ANDROID_BUILD_TYPE,
|
|
8126
|
+
DEFAULT_ANDROID_FORMAT: () => DEFAULT_ANDROID_FORMAT,
|
|
8127
|
+
DEFAULT_ANDROID_SIGNING: () => DEFAULT_ANDROID_SIGNING,
|
|
8128
|
+
DEFAULT_BORROWABLE_IOS_IDS: () => DEFAULT_BORROWABLE_IOS_IDS,
|
|
8129
|
+
DEFAULT_DIST_SHELL: () => DEFAULT_DIST_SHELL,
|
|
8130
|
+
DEFAULT_DIST_SIGNING: () => DEFAULT_DIST_SIGNING,
|
|
8131
|
+
DEFAULT_GIT_URL: () => DEFAULT_GIT_URL,
|
|
8132
|
+
DEFAULT_IOS_FORMAT: () => DEFAULT_IOS_FORMAT,
|
|
8133
|
+
DIST_ERROR_CODES: () => DIST_ERROR_CODES,
|
|
8134
|
+
DIST_PACKAGE_NAME: () => DIST_PACKAGE_NAME,
|
|
8135
|
+
DIST_PARAMS_FLAG: () => DIST_PARAMS_FLAG,
|
|
8136
|
+
DIST_SHELLS: () => DIST_SHELLS,
|
|
8137
|
+
IOS_FORMATS: () => IOS_FORMATS,
|
|
8138
|
+
IOS_FORMAT_NOT_BUILT: () => IOS_FORMAT_NOT_BUILT,
|
|
8139
|
+
IOS_FORMAT_NOT_REQUESTED: () => IOS_FORMAT_NOT_REQUESTED,
|
|
8140
|
+
JobServiceBroker: () => JobServiceBroker,
|
|
8141
|
+
JobServiceError: () => JobServiceError,
|
|
8142
|
+
MAX_MEASURABLE_IDENTITY_WINDOW: () => MAX_MEASURABLE_IDENTITY_WINDOW,
|
|
8143
|
+
SCOPE_CANCEL: () => SCOPE_CANCEL,
|
|
8144
|
+
SCOPE_CREATE: () => SCOPE_CREATE,
|
|
8145
|
+
SCOPE_READ: () => SCOPE_READ,
|
|
8146
|
+
SITE_SHELL_SERVED_CAPABILITIES: () => SITE_SHELL_SERVED_CAPABILITIES,
|
|
8147
|
+
WIX_MANAGED_SIGNING_ALIASES: () => WIX_MANAGED_SIGNING_ALIASES,
|
|
8148
|
+
androidFormatSkewFailed: () => androidFormatSkewFailed,
|
|
8149
|
+
appleErrorCodesOf: () => appleErrorCodesOf,
|
|
8150
|
+
borrowableIosIds: () => borrowableIosIds,
|
|
8151
|
+
buildFormatSkewFailed: () => buildFormatSkewFailed,
|
|
8152
|
+
credsFromConfig: () => credsFromConfig,
|
|
8153
|
+
customerUploadClaimable: () => customerUploadClaimable,
|
|
8154
|
+
customerUploadFailure: () => customerUploadFailure,
|
|
8155
|
+
distErrorCodeOf: () => distErrorCodeOf,
|
|
8156
|
+
distJobSpec: () => distJobSpec,
|
|
8157
|
+
encodeDistParams: () => encodeDistParams,
|
|
8158
|
+
failureCodesOf: () => failureCodesOf,
|
|
8159
|
+
hasJobServiceEnded: () => hasJobServiceEnded,
|
|
8160
|
+
iosFormatSkewFailed: () => iosFormatSkewFailed,
|
|
8161
|
+
isBorrowableIosId: () => isBorrowableIosId,
|
|
8162
|
+
isSuccess: () => isSuccess,
|
|
8163
|
+
isTerminal: () => isTerminal,
|
|
8164
|
+
isTerminalTestflightStatus: () => isTerminalTestflightStatus,
|
|
8165
|
+
isValidDistAttemptId: () => isValidDistAttemptId,
|
|
8166
|
+
nextCustomerUploadClaim: () => nextCustomerUploadClaim,
|
|
8167
|
+
nextCustomerUploadSettlement: () => nextCustomerUploadSettlement,
|
|
8168
|
+
resolveAndroidBuildType: () => resolveAndroidBuildType,
|
|
8169
|
+
resolveAndroidFormat: () => resolveAndroidFormat,
|
|
8170
|
+
resolveAndroidSigning: () => resolveAndroidSigning,
|
|
8171
|
+
resolveBorrowedIosId: () => resolveBorrowedIosId,
|
|
8172
|
+
resolveDistSigning: () => resolveDistSigning,
|
|
8173
|
+
resolveIosFormat: () => resolveIosFormat,
|
|
8174
|
+
testflightStatusRank: () => testflightStatusRank
|
|
8175
|
+
});
|
|
8176
|
+
function isTerminal(status2) {
|
|
8177
|
+
return !!status2 && !IN_FLIGHT.has(status2);
|
|
8178
|
+
}
|
|
8179
|
+
function hasJobServiceEnded(status2) {
|
|
8180
|
+
return !!status2 && JOB_SERVICE_ENDED.has(status2);
|
|
8181
|
+
}
|
|
8182
|
+
function isSuccess(status2) {
|
|
8183
|
+
return status2 === "SUCCESS";
|
|
8184
|
+
}
|
|
8185
|
+
function snapshot(job) {
|
|
8186
|
+
return {
|
|
8187
|
+
id: String(job.id),
|
|
8188
|
+
status: job.status ?? "STATUS_UNKNOWN",
|
|
8189
|
+
...job.buildUrl ? { buildUrl: String(job.buildUrl) } : {},
|
|
8190
|
+
...job.output ? { output: String(job.output) } : {},
|
|
8191
|
+
...typeof job.attemptNumber === "number" ? { attemptNumber: job.attemptNumber } : {}
|
|
8192
|
+
};
|
|
8193
|
+
}
|
|
8194
|
+
function truncate(s5, max = 400) {
|
|
8195
|
+
return s5.length > max ? `${s5.slice(0, max)}\u2026` : s5;
|
|
8196
|
+
}
|
|
8197
|
+
function credsFromConfig(cfg) {
|
|
8198
|
+
const appDefId = cfg("POCO_APP_DEF_ID")?.trim();
|
|
8199
|
+
const appSecret = cfg("POCO_APP_SECRET")?.trim();
|
|
8200
|
+
if (!appDefId || !appSecret) return void 0;
|
|
8201
|
+
return { appDefId, appSecret };
|
|
8202
|
+
}
|
|
8203
|
+
function isValidDistAttemptId(value2) {
|
|
8204
|
+
return typeof value2 === "string" && /^[A-Za-z0-9_-]{1,128}$/.test(value2);
|
|
8205
|
+
}
|
|
8206
|
+
function customerUploadClaimable(pending2, now) {
|
|
8207
|
+
if (!pending2) return false;
|
|
8208
|
+
if (pending2.status === "READY_FOR_UPLOAD") return customerUploadRetryDue(pending2, now);
|
|
8209
|
+
if (pending2.status !== "UPLOADING") return false;
|
|
8210
|
+
if (!pending2.claimedAt) return true;
|
|
8211
|
+
const claimedAt = Date.parse(pending2.claimedAt);
|
|
8212
|
+
const at2 = Date.parse(now);
|
|
8213
|
+
return Number.isFinite(claimedAt) && Number.isFinite(at2) && at2 - claimedAt >= CUSTOMER_UPLOAD_LEASE_MS;
|
|
8214
|
+
}
|
|
8215
|
+
function customerUploadRetryDue(pending2, now) {
|
|
8216
|
+
if (!pending2.retryAt) return true;
|
|
8217
|
+
const retryAt = Date.parse(pending2.retryAt);
|
|
8218
|
+
return !Number.isFinite(retryAt) || Date.parse(now) >= retryAt;
|
|
8219
|
+
}
|
|
8220
|
+
function customerUploadFailure(pending2, error, passing, now) {
|
|
8221
|
+
const failedAttempts = (pending2.failedAttempts ?? 0) + 1;
|
|
8222
|
+
const delayMs = CUSTOMER_UPLOAD_RETRY_DELAYS_MS[failedAttempts - 1];
|
|
8223
|
+
if (!passing || delayMs === void 0) return { status: "FAILED", error, failedAttempts };
|
|
8224
|
+
const retryAt = new Date(Date.parse(now) + delayMs).toISOString();
|
|
8225
|
+
return { status: "READY_FOR_UPLOAD", lastError: error, failedAttempts, retryAt };
|
|
8226
|
+
}
|
|
8227
|
+
function nextCustomerUploadClaim(record6, now) {
|
|
8228
|
+
if (!record6 || record6.status !== "SUCCESS" || !customerUploadClaimable(record6.customerAppStore, now)) return void 0;
|
|
8229
|
+
const pending2 = record6.customerAppStore;
|
|
8230
|
+
const takeover = pending2.status === "UPLOADING" ? { failedAttempts: (pending2.failedAttempts ?? 0) + 1, lastError: CUSTOMER_UPLOAD_ABANDONED } : {};
|
|
8231
|
+
return {
|
|
8232
|
+
...record6,
|
|
8233
|
+
customerAppStore: { ...pending2, ...takeover, status: "UPLOADING", claimedAt: now },
|
|
8234
|
+
updatedAt: now
|
|
8235
|
+
};
|
|
8236
|
+
}
|
|
8237
|
+
function nextCustomerUploadSettlement(record6, claimedAt, update, now) {
|
|
8238
|
+
const pending2 = record6?.customerAppStore;
|
|
8239
|
+
if (!record6 || pending2?.status !== "UPLOADING" || pending2.claimedAt !== claimedAt) return void 0;
|
|
8240
|
+
return {
|
|
8241
|
+
...record6,
|
|
8242
|
+
customerAppStore: {
|
|
8243
|
+
version: pending2.version,
|
|
8244
|
+
mode: pending2.mode,
|
|
8245
|
+
claimedAt: pending2.claimedAt,
|
|
8246
|
+
status: update.status,
|
|
8247
|
+
...update.error ? { error: update.error } : {},
|
|
8248
|
+
...update.delivery ? { delivery: update.delivery } : {},
|
|
8249
|
+
...retryFieldsOf(update.failedAttempts === void 0 ? pending2 : update)
|
|
8250
|
+
},
|
|
8251
|
+
updatedAt: now
|
|
8252
|
+
};
|
|
8253
|
+
}
|
|
8254
|
+
function retryFieldsOf(source2) {
|
|
8255
|
+
return {
|
|
8256
|
+
...source2.failedAttempts ? { failedAttempts: source2.failedAttempts } : {},
|
|
8257
|
+
...source2.status === "READY_FOR_UPLOAD" && source2.retryAt ? { retryAt: source2.retryAt } : {},
|
|
8258
|
+
...source2.status === "READY_FOR_UPLOAD" && source2.lastError ? { lastError: source2.lastError } : {}
|
|
8259
|
+
};
|
|
8260
|
+
}
|
|
8261
|
+
function isTerminalTestflightStatus(status2) {
|
|
8262
|
+
return /(?:^|_)(?:COMPLETED|FAILED|NOT_FOUND)$/.test(status2?.toUpperCase() ?? "");
|
|
8263
|
+
}
|
|
8264
|
+
function testflightStatusRank(status2) {
|
|
8265
|
+
const normalized2 = status2?.toUpperCase() ?? "";
|
|
8266
|
+
if (isTerminalTestflightStatus(normalized2)) return 3;
|
|
8267
|
+
if (/(?:^|_)UPLOADING$/.test(normalized2)) return 2;
|
|
8268
|
+
if (/(?:^|_)PENDING$/.test(normalized2)) return 1;
|
|
8269
|
+
return 0;
|
|
8270
|
+
}
|
|
8271
|
+
function borrowableIosIds(raw) {
|
|
8272
|
+
const parsed = (raw ?? "").split(",").map((s5) => s5.trim().toLowerCase()).filter(Boolean);
|
|
8273
|
+
return parsed.length > 0 ? parsed : DEFAULT_BORROWABLE_IOS_IDS;
|
|
8274
|
+
}
|
|
8275
|
+
function isBorrowableIosId(id, allowed2 = DEFAULT_BORROWABLE_IOS_IDS) {
|
|
8276
|
+
const candidate = id.toLowerCase();
|
|
8277
|
+
return allowed2.some(
|
|
8278
|
+
(pattern) => pattern.endsWith("*") ? candidate.startsWith(pattern.slice(0, -1)) : candidate === pattern
|
|
8279
|
+
);
|
|
8280
|
+
}
|
|
8281
|
+
function resolveBorrowedIosId(opts) {
|
|
8282
|
+
const { requested, platform } = opts;
|
|
8283
|
+
if (requested === void 0 || requested === null || requested === "") return {};
|
|
8284
|
+
if (opts.selfServe && !opts.wixStaff || opts.role === "owner") {
|
|
8285
|
+
return {
|
|
8286
|
+
error: {
|
|
8287
|
+
error: "operator_only_borrow_id",
|
|
8288
|
+
message: "borrowIosBundleId is not available to self-serve credentials",
|
|
8289
|
+
hint: "Ship the change over-the-air instead \u2014 OTA needs no rebuild and no borrowed signing identity."
|
|
8290
|
+
}
|
|
8291
|
+
};
|
|
8292
|
+
}
|
|
8293
|
+
if (typeof requested !== "string") {
|
|
8294
|
+
return { error: { error: "invalid_borrow_id", message: "borrowIosBundleId must be a string" } };
|
|
8295
|
+
}
|
|
8296
|
+
const id = requested.trim().toLowerCase();
|
|
8297
|
+
if (platform !== "ios") {
|
|
8298
|
+
return {
|
|
8299
|
+
error: {
|
|
8300
|
+
error: "borrow_id_ios_only",
|
|
8301
|
+
message: `borrowIosBundleId applies to iOS signing only (got platform "${platform}")`,
|
|
8302
|
+
hint: "Android needs no provisioning profile \u2014 drop the flag for android builds."
|
|
8303
|
+
}
|
|
8304
|
+
};
|
|
8305
|
+
}
|
|
8306
|
+
if (!BUNDLE_ID_RE.test(id)) {
|
|
8307
|
+
return {
|
|
8308
|
+
error: {
|
|
8309
|
+
error: "invalid_borrow_id",
|
|
8310
|
+
message: `"${requested}" is not a valid reverse-DNS bundle id`
|
|
8311
|
+
}
|
|
8312
|
+
};
|
|
8313
|
+
}
|
|
8314
|
+
const allowed2 = opts.allowed ?? DEFAULT_BORROWABLE_IOS_IDS;
|
|
8315
|
+
if (!isBorrowableIosId(id, allowed2)) {
|
|
8316
|
+
return {
|
|
8317
|
+
error: {
|
|
8318
|
+
error: "borrow_id_not_allowed",
|
|
8319
|
+
message: `"${id}" is not borrowable; allowed: ${allowed2.join(", ")}`,
|
|
8320
|
+
hint: "Only internal enterprise ids may be borrowed \u2014 a store id would replace the real App Store app on the device. An operator can change this with HIMI_DIST_BORROWABLE_IOS_IDS."
|
|
8321
|
+
}
|
|
8322
|
+
};
|
|
8323
|
+
}
|
|
8324
|
+
return { bundleId: id };
|
|
8325
|
+
}
|
|
8326
|
+
function resolveDistSigning(requested) {
|
|
8327
|
+
if (requested === void 0 || requested === null || requested === "") {
|
|
8328
|
+
return { policy: DEFAULT_DIST_SIGNING };
|
|
8329
|
+
}
|
|
8330
|
+
if (typeof requested !== "string") {
|
|
8331
|
+
return { error: { status: 400, body: { error: "invalid_signing", message: "signing must be a string" } } };
|
|
8332
|
+
}
|
|
8333
|
+
const want = requested.trim().toLowerCase();
|
|
8334
|
+
if (WIX_MANAGED_SIGNING_ALIASES.includes(want)) return { policy: "wix-managed" };
|
|
8335
|
+
if (want === "byo") return { policy: "byo" };
|
|
8336
|
+
return {
|
|
8337
|
+
error: {
|
|
8338
|
+
status: 501,
|
|
8339
|
+
body: {
|
|
8340
|
+
error: "dist_signing_unsupported",
|
|
8341
|
+
message: `signing "${requested}" is not implemented`,
|
|
8342
|
+
supported: [DEFAULT_DIST_SIGNING, "byo"]
|
|
8343
|
+
}
|
|
8344
|
+
}
|
|
8345
|
+
};
|
|
8346
|
+
}
|
|
8347
|
+
function resolveAndroidSigning(requested) {
|
|
8348
|
+
if (requested === void 0 || requested === null || requested === "") {
|
|
8349
|
+
return { policy: DEFAULT_ANDROID_SIGNING };
|
|
8350
|
+
}
|
|
8351
|
+
if (typeof requested !== "string") {
|
|
8352
|
+
return { error: { status: 400, body: { error: "invalid_android_signing", message: "androidSigning must be a string" } } };
|
|
8353
|
+
}
|
|
8354
|
+
const want = requested.trim().toLowerCase();
|
|
8355
|
+
const policy = Object.hasOwn(ANDROID_SIGNING_ALIASES, want) ? ANDROID_SIGNING_ALIASES[want] : void 0;
|
|
8356
|
+
if (policy) return { policy };
|
|
8357
|
+
return {
|
|
8358
|
+
error: {
|
|
8359
|
+
status: 400,
|
|
8360
|
+
body: {
|
|
8361
|
+
error: "invalid_android_signing",
|
|
8362
|
+
message: `androidSigning "${requested}" is not a known policy`,
|
|
8363
|
+
supported: [...ANDROID_SIGNING_POLICIES]
|
|
8364
|
+
}
|
|
8365
|
+
}
|
|
8366
|
+
};
|
|
8367
|
+
}
|
|
8368
|
+
function androidFormatSkewFailed(record6) {
|
|
8369
|
+
return record6.platform === "android" && typeof record6.error === "string" && [ANDROID_FORMAT_NOT_BUILT, ANDROID_FORMAT_WRONG_SIGNER, ANDROID_FORMAT_NOT_REQUESTED, ANDROID_BUILD_TYPE_NOT_BUILT].some((code3) => record6.error.includes(`${code3}:`));
|
|
8370
|
+
}
|
|
8371
|
+
function distErrorCodeOf(error) {
|
|
8372
|
+
if (typeof error !== "string") return void 0;
|
|
8373
|
+
const code3 = /^[a-z][a-z0-9_]*/.exec(error)?.[0];
|
|
8374
|
+
return DIST_ERROR_CODES.includes(code3 ?? "") ? code3 : void 0;
|
|
8375
|
+
}
|
|
8376
|
+
function appleErrorCodesOf(diagnostics) {
|
|
8377
|
+
if (typeof diagnostics !== "string") return void 0;
|
|
8378
|
+
const codes4 = [...new Set(diagnostics.match(/\bITMS-\d{4,5}\b/g) ?? [])].slice(0, APPLE_ERROR_CODES_MAX);
|
|
8379
|
+
return codes4.length > 0 ? codes4 : void 0;
|
|
8380
|
+
}
|
|
8381
|
+
function failureCodesOf(record6, body) {
|
|
8382
|
+
const errorCode2 = distErrorCodeOf(body.error);
|
|
8383
|
+
if (errorCode2 === "customer_signing_fetch_failed" && record6.errorCode) return {};
|
|
8384
|
+
const validation = errorCode2 === "customer_app_store_validation_failed";
|
|
8385
|
+
return { errorCode: errorCode2, appleErrorCodes: validation ? appleErrorCodesOf(body.diagnostics) : void 0 };
|
|
8386
|
+
}
|
|
8387
|
+
function resolveAndroidFormat(requested) {
|
|
8388
|
+
if (requested === void 0 || requested === null || requested === "") return { format: DEFAULT_ANDROID_FORMAT };
|
|
8389
|
+
if (typeof requested === "string" && ANDROID_FORMATS.includes(requested)) {
|
|
8390
|
+
return { format: requested };
|
|
8391
|
+
}
|
|
8392
|
+
return {
|
|
8393
|
+
error: {
|
|
8394
|
+
status: 400,
|
|
8395
|
+
body: {
|
|
8396
|
+
error: "invalid_android_format",
|
|
8397
|
+
message: `androidFormat ${typeof requested === "string" ? `"${requested.slice(0, 40)}"` : `of type ${typeof requested}`} is not a known format`,
|
|
8398
|
+
supported: [...ANDROID_FORMATS]
|
|
8399
|
+
}
|
|
8400
|
+
}
|
|
8401
|
+
};
|
|
8402
|
+
}
|
|
8403
|
+
function resolveAndroidBuildType(requested) {
|
|
8404
|
+
if (requested === void 0 || requested === null || requested === "") return { buildType: DEFAULT_ANDROID_BUILD_TYPE };
|
|
8405
|
+
if (typeof requested === "string" && ANDROID_BUILD_TYPES.includes(requested)) {
|
|
8406
|
+
return { buildType: requested };
|
|
8407
|
+
}
|
|
8408
|
+
return {
|
|
8409
|
+
error: {
|
|
8410
|
+
status: 400,
|
|
8411
|
+
body: {
|
|
8412
|
+
error: "invalid_android_build_type",
|
|
8413
|
+
message: `androidBuildType ${typeof requested === "string" ? `"${requested.slice(0, 40)}"` : `of type ${typeof requested}`} is not a known build type`,
|
|
8414
|
+
supported: [...ANDROID_BUILD_TYPES]
|
|
8415
|
+
}
|
|
8416
|
+
}
|
|
8417
|
+
};
|
|
8418
|
+
}
|
|
8419
|
+
function resolveIosFormat(requested) {
|
|
8420
|
+
if (requested === void 0 || requested === null || requested === "") return { format: DEFAULT_IOS_FORMAT };
|
|
8421
|
+
if (typeof requested === "string" && IOS_FORMATS.includes(requested)) {
|
|
8422
|
+
return { format: requested };
|
|
8423
|
+
}
|
|
8424
|
+
return {
|
|
8425
|
+
error: {
|
|
8426
|
+
status: 400,
|
|
8427
|
+
body: {
|
|
8428
|
+
error: "invalid_ios_format",
|
|
8429
|
+
message: `iosFormat ${typeof requested === "string" ? `"${requested.slice(0, 40)}"` : `of type ${typeof requested}`} is not a known format`,
|
|
8430
|
+
supported: [...IOS_FORMATS]
|
|
8431
|
+
}
|
|
8432
|
+
}
|
|
8433
|
+
};
|
|
8434
|
+
}
|
|
8435
|
+
function iosFormatSkewFailed(record6) {
|
|
8436
|
+
return record6.platform === "ios" && typeof record6.error === "string" && [IOS_FORMAT_NOT_BUILT, IOS_FORMAT_NOT_REQUESTED].some((code3) => record6.error.includes(`${code3}:`));
|
|
8437
|
+
}
|
|
8438
|
+
function buildFormatSkewFailed(record6) {
|
|
8439
|
+
return androidFormatSkewFailed(record6) || iosFormatSkewFailed(record6);
|
|
8440
|
+
}
|
|
8441
|
+
function encodeDistParams(env) {
|
|
8442
|
+
return Buffer.from(JSON.stringify(env), "utf8").toString("base64url");
|
|
8443
|
+
}
|
|
8444
|
+
function distJobSpec(req) {
|
|
8445
|
+
const params = {
|
|
8446
|
+
APP_DIR: req.appDir,
|
|
8447
|
+
// WHICH APP this binary is FOR, as distinct from which shell builds it. Without it the pool
|
|
8448
|
+
// can only infer an app from APP_DIR — i.e. the shell — so it baked the SHELL's content and
|
|
8449
|
+
// resolved the SHELL's OTA app id. A device-verified consequence: `himi dist --app demo-app`
|
|
8450
|
+
// produced a binary rendering himi_branded_home. The shell is the container; this is the app.
|
|
8451
|
+
HIMI_DIST_APP: req.app,
|
|
8452
|
+
// (HIMI_DIST_PROVISIONING_ENV is set at the END of this object, after `req.env` — see there.)
|
|
8453
|
+
// run-dist gates iOS on DIST_ENABLE_IOS / DIST_PROVISIONING_PROFILE / an explicit
|
|
8454
|
+
// `[dist:ios]` IN THE COMMIT MESSAGE. A serve-brokered job has no commit by design, and
|
|
8455
|
+
// `--force` only bypasses the `[dist]` tag gate — so without this an `--platform ios`
|
|
8456
|
+
// request would skip the build and finish as SUCCESS with no install link. Asking for iOS
|
|
8457
|
+
// through the API IS the explicit opt-in that `[dist:ios]` represents.
|
|
8458
|
+
...req.platform === "ios" ? { DIST_ENABLE_IOS: "1" } : {},
|
|
8459
|
+
...req.release ? { HIMI_DIST_RELEASE_PIN: req.release } : {},
|
|
8460
|
+
...req.contractUrl ? { HIMI_DIST_CONTRACT_URL: req.contractUrl } : {},
|
|
8461
|
+
// Where the pool fetches the RELEASE to bake its offline seed from. Its absence is what makes
|
|
8462
|
+
// the classic Falcon `[dist]` path fall back to building the seed from repo source.
|
|
8463
|
+
...req.seedUrl ? { HIMI_DIST_SEED_URL: req.seedUrl } : {},
|
|
8464
|
+
...req.platform === "android" && req.androidConfigUrl ? { HIMI_DIST_ANDROID_CONFIG_URL: req.androidConfigUrl } : {},
|
|
8465
|
+
// Where the pool fetches its SIGNING IDENTITY (profile + p12 + password). A URL, not the
|
|
8466
|
+
// bytes: the envelope is ~20KB of base64 and `command` is capped at MAX_COMMAND_CHARS — the
|
|
8467
|
+
// same reason the brand contract travels this way. It also keeps key material out of the
|
|
8468
|
+
// job params, which the pool echoes into its log.
|
|
8469
|
+
...req.signingUrl ? { HIMI_DIST_SIGNING_URL: req.signingUrl } : {},
|
|
8470
|
+
// WHICH KEYSTORE the Android build signs with. Android only — on an iOS job this would be a
|
|
8471
|
+
// variable nothing reads, and dispatching one implies a decision that was never made.
|
|
8472
|
+
// A bundle dispatches the QA key BY NAME, never `wix-keystore`. `--aab` always means the Wix
|
|
8473
|
+
// production key, and the new run-dist derives that from DIST_ANDROID_FORMAT itself, overriding
|
|
8474
|
+
// this. Naming `wix-keystore` here would reach a run-dist OLDER than `--aab` too (the pool builds
|
|
8475
|
+
// the release's own commit): it ignores the format, builds an installable APK, signs it with the
|
|
8476
|
+
// Wix production key and uploads and announces it — the exact artifact the self-serve 403
|
|
8477
|
+
// withholds. Naming NOTHING is not safe either: a pool machine with DIST_ANDROID_USE_WIX_KEYSTORE=1
|
|
8478
|
+
// then hands that old runner the Wix key anyway. A named QA key outranks that machine setting, so
|
|
8479
|
+
// an old runner signs an ordinary QA APK and the job fails as `android_format_not_built`.
|
|
8480
|
+
...req.platform === "android" && req.androidSigning ? { DIST_ANDROID_SIGNING: req.androidFormat === "aab" ? "qa-keystore" : req.androidSigning } : {},
|
|
8481
|
+
// A Play bundle instead of an APK. Only when asked: the APK default needs no parameter, and a
|
|
8482
|
+
// runner that predates the variable ignores it — which the result callback catches.
|
|
8483
|
+
...req.platform === "android" && req.androidFormat === "aab" ? { DIST_ANDROID_FORMAT: "aab" } : {},
|
|
8484
|
+
// A debuggable APK instead of a release one. Only when asked, for the same reason as the format.
|
|
8485
|
+
...req.platform === "android" && req.androidBuildType === "debug" ? { DIST_ANDROID_BUILD_TYPE: "debug" } : {},
|
|
8486
|
+
...req.previewRoute ? { HIMI_DIST_PREVIEW_ROUTE: req.previewRoute } : {},
|
|
8487
|
+
...req.callbackUrl ? { HIMI_DIST_CALLBACK_URL: req.callbackUrl } : {},
|
|
8488
|
+
...req.callbackToken ? { HIMI_DIST_CALLBACK_TOKEN: req.callbackToken } : {},
|
|
8489
|
+
// The per-job artifact path component. Without it two concurrent jobs for one
|
|
8490
|
+
// app+shell+platform+commit wrote the same ipa, manifest.plist and install.html, and the
|
|
8491
|
+
// loser's install page then handed a tester the other build's binary.
|
|
8492
|
+
...req.jobNonce ? { HIMI_DIST_JOB_NONCE: req.jobNonce } : {},
|
|
8493
|
+
// Who to DM the install link to. See DistJobRequest.requestedBy: the git-history guess the pool
|
|
8494
|
+
// falls back to misroutes brokered builds to an unrelated colleague.
|
|
8495
|
+
...req.requestedBy ? { HIMI_DIST_REQUESTED_BY: req.requestedBy } : {},
|
|
8496
|
+
...operatorEnvWithoutIosFormat(req.env),
|
|
8497
|
+
// An unsigned simulator build instead of a signed IPA. Only when asked, and AFTER `req.env`:
|
|
8498
|
+
// the request decides the format, so operator config can't turn one into the other.
|
|
8499
|
+
...req.platform === "ios" && req.iosFormat === "simulator" ? { DIST_IOS_FORMAT: "simulator" } : {},
|
|
8500
|
+
...req.buildOrigin ? { HIMI_DIST_BUILD_ORIGIN: req.buildOrigin } : {},
|
|
8501
|
+
// AFTER `req.env`, deliberately. This one field is the SHELL's declared answer, and it is the
|
|
8502
|
+
// only thing standing between owner-lite and a build that reads the fetched contract under
|
|
8503
|
+
// branded-lite's key — i.e. ignores it and ships unbranded while reporting success. `req.env`
|
|
8504
|
+
// is operator config (`deps.env`), so a stray HIMI_DIST_PROVISIONING_ENV there is a plausible
|
|
8505
|
+
// misconfiguration, and it would silently unbrand EVERY shell at once. Generic overrides do
|
|
8506
|
+
// not get to answer a per-shell question.
|
|
8507
|
+
...req.provisioningEnv ? { HIMI_DIST_PROVISIONING_ENV: req.provisioningEnv } : {}
|
|
8508
|
+
};
|
|
8509
|
+
const command = `${req.runner === "linux" ? "linux:" : ""}dist:${req.platform} ${DIST_PARAMS_FLAG} ${encodeDistParams(params)}`;
|
|
8510
|
+
if (command.length > MAX_COMMAND_CHARS) {
|
|
8511
|
+
throw new Error(
|
|
8512
|
+
`dist command is ${command.length} chars (cap ${MAX_COMMAND_CHARS}); shrink the job env \u2014 pass large values as a URL the Mac job fetches, as the brand contract does`
|
|
8513
|
+
);
|
|
8514
|
+
}
|
|
8515
|
+
return {
|
|
8516
|
+
gitUrl: req.gitUrl ?? DEFAULT_GIT_URL,
|
|
8517
|
+
gitCommitSha: req.gitCommitSha,
|
|
8518
|
+
packageName: DIST_PACKAGE_NAME,
|
|
8519
|
+
command,
|
|
8520
|
+
// Job Service renders this metadata in Buildkite's job label. User labels are sanitized,
|
|
8521
|
+
// and the runner also carries buildOrigin so it does not treat them as GitHub PR refs.
|
|
8522
|
+
branchName: req.buildLabel ?? req.branchName ?? "master",
|
|
8523
|
+
envVars: withoutCallbackToken(params),
|
|
8524
|
+
...req.xcodeVersion ? { xcodeVersion: req.xcodeVersion } : {}
|
|
8525
|
+
};
|
|
8526
|
+
}
|
|
8527
|
+
function operatorEnvWithoutIosFormat(env) {
|
|
8528
|
+
const { DIST_IOS_FORMAT: _theRequestDecides, ...rest } = env ?? {};
|
|
8529
|
+
return rest;
|
|
8530
|
+
}
|
|
8531
|
+
function withoutCallbackToken(params) {
|
|
8532
|
+
const { HIMI_DIST_CALLBACK_TOKEN: _printedByThePool, ...printable2 } = params;
|
|
8533
|
+
return printable2;
|
|
8534
|
+
}
|
|
8535
|
+
var DIST_ERROR_CODES, APPLE_ERROR_CODES_MAX, IN_FLIGHT, JOB_SERVICE_ENDED, SCOPE_CREATE, SCOPE_READ, SCOPE_CANCEL, DEFAULT_BASE_URL, DEFAULT_OAUTH_URL, TOKEN_TTL_MS, JobServiceError, JobServiceBroker, CUSTOMER_UPLOAD_LEASE_MS, CUSTOMER_UPLOAD_RETRY_DELAYS_MS, CUSTOMER_UPLOAD_MAX_ATTEMPTS, CUSTOMER_UPLOAD_ABANDONED, MAX_MEASURABLE_IDENTITY_WINDOW, SITE_SHELL_SERVED_CAPABILITIES, DIST_SHELLS, DEFAULT_DIST_SHELL, DEFAULT_BORROWABLE_IOS_IDS, BUNDLE_ID_RE, DEFAULT_DIST_SIGNING, WIX_MANAGED_SIGNING_ALIASES, DEFAULT_ANDROID_SIGNING, ANDROID_SIGNING_POLICIES, ANDROID_SIGNING_ALIASES, DEFAULT_ANDROID_FORMAT, ANDROID_FORMATS, ANDROID_FORMAT_NOT_BUILT, ANDROID_FORMAT_WRONG_SIGNER, ANDROID_FORMAT_NOT_REQUESTED, DEFAULT_ANDROID_BUILD_TYPE, ANDROID_BUILD_TYPES, ANDROID_BUILD_TYPE_NOT_BUILT, DEFAULT_IOS_FORMAT, IOS_FORMATS, IOS_FORMAT_NOT_BUILT, IOS_FORMAT_NOT_REQUESTED, DEFAULT_GIT_URL, DIST_PACKAGE_NAME, DIST_PARAMS_FLAG, MAX_COMMAND_CHARS;
|
|
8536
|
+
var init_dist_jobs = __esm({
|
|
8537
|
+
"../../core/serve-control/src/dist-jobs.ts"() {
|
|
8538
|
+
init_define_HHP_CATALOG();
|
|
8539
|
+
init_dist_release_contract();
|
|
8540
|
+
DIST_ERROR_CODES = [
|
|
8541
|
+
"customer_agent_keychain_unavailable",
|
|
8542
|
+
"customer_app_store_ipa_unreadable",
|
|
8543
|
+
"customer_app_store_validation_failed",
|
|
8544
|
+
"customer_app_store_validation_key_missing",
|
|
8545
|
+
"customer_archive_invalid",
|
|
8546
|
+
"customer_artifact_identity_mismatch",
|
|
8547
|
+
"customer_build_failed",
|
|
8548
|
+
"customer_entitlement_not_granted",
|
|
8549
|
+
"customer_entitlements_unresolved",
|
|
8550
|
+
"customer_firebase_binding_missing",
|
|
8551
|
+
"customer_firebase_config_missing",
|
|
8552
|
+
"customer_firebase_fetch_failed",
|
|
8553
|
+
"customer_identity_preexisting",
|
|
8554
|
+
"customer_ipa_invalid",
|
|
8555
|
+
"customer_profile_invalid",
|
|
8556
|
+
"customer_profile_push_missing",
|
|
8557
|
+
"customer_signing_ambient_identity_unavailable",
|
|
8558
|
+
"customer_signing_binding_mismatch",
|
|
8559
|
+
"customer_signing_binding_missing",
|
|
8560
|
+
"customer_signing_cleanup_failed",
|
|
8561
|
+
"customer_signing_command_failed",
|
|
8562
|
+
"customer_signing_expired",
|
|
8563
|
+
"customer_signing_fetch_failed",
|
|
8564
|
+
"customer_signing_identity_unavailable",
|
|
8565
|
+
"customer_signing_install_failed",
|
|
8566
|
+
"customer_signing_noninteractive_unavailable",
|
|
8567
|
+
"customer_signing_policy_mismatch",
|
|
8568
|
+
"customer_signing_project_ambiguous",
|
|
8569
|
+
"customer_signing_runner_identity_unavailable",
|
|
8570
|
+
...DIST_CONTRACT_REFUSAL_CODES
|
|
8571
|
+
];
|
|
8572
|
+
APPLE_ERROR_CODES_MAX = 5;
|
|
8573
|
+
IN_FLIGHT = /* @__PURE__ */ new Set(["CREATED", "QUEUED", "WORKING"]);
|
|
8574
|
+
JOB_SERVICE_ENDED = /* @__PURE__ */ new Set(["SUCCESS", "FAILURE", "CANCELED", "TIMEOUT", "INTERNAL_ERROR"]);
|
|
8575
|
+
SCOPE_CREATE = "MRE.JOB_CREATE";
|
|
8576
|
+
SCOPE_READ = "MRE.JOB_READ";
|
|
8577
|
+
SCOPE_CANCEL = "MRE.CANCEL_JOB";
|
|
8578
|
+
DEFAULT_BASE_URL = "https://bo.wix.com/job-service";
|
|
8579
|
+
DEFAULT_OAUTH_URL = "https://www.wixapis.com/oauth/access";
|
|
8580
|
+
TOKEN_TTL_MS = 5 * 60 * 1e3;
|
|
8581
|
+
JobServiceError = class extends Error {
|
|
8582
|
+
constructor(message5, status2, body) {
|
|
8583
|
+
super(message5);
|
|
8584
|
+
this.status = status2;
|
|
8585
|
+
this.body = body;
|
|
8586
|
+
this.name = "JobServiceError";
|
|
8587
|
+
}
|
|
8588
|
+
};
|
|
8589
|
+
JobServiceBroker = class {
|
|
8590
|
+
baseUrl;
|
|
8591
|
+
oauthUrl;
|
|
8592
|
+
fetchImpl;
|
|
8593
|
+
now;
|
|
8594
|
+
creds;
|
|
8595
|
+
/** scope -> { token, expiresAt } */
|
|
8596
|
+
tokens = /* @__PURE__ */ new Map();
|
|
8597
|
+
constructor(opts) {
|
|
8598
|
+
if (!opts.creds?.appDefId || !opts.creds?.appSecret) {
|
|
8599
|
+
throw new JobServiceError("job service credentials missing (POCO_APP_DEF_ID / POCO_APP_SECRET)");
|
|
8600
|
+
}
|
|
8601
|
+
this.creds = opts.creds;
|
|
8602
|
+
this.baseUrl = (opts.baseUrl ?? DEFAULT_BASE_URL).replace(/\/+$/, "");
|
|
8603
|
+
this.oauthUrl = opts.oauthUrl ?? DEFAULT_OAUTH_URL;
|
|
8604
|
+
this.fetchImpl = opts.fetchImpl ?? fetch;
|
|
8605
|
+
this.now = opts.now ?? Date.now;
|
|
8606
|
+
}
|
|
8607
|
+
/** Mint (or reuse) a token for one MRE scope. */
|
|
8608
|
+
async token(scope3) {
|
|
8609
|
+
const cached3 = this.tokens.get(scope3);
|
|
8610
|
+
if (cached3 && cached3.expiresAt > this.now()) return cached3.token;
|
|
8611
|
+
const res = await this.fetchImpl(this.oauthUrl, {
|
|
8612
|
+
method: "POST",
|
|
8613
|
+
headers: { "content-type": "application/json" },
|
|
8614
|
+
body: JSON.stringify({
|
|
8615
|
+
grant_type: "client_credentials",
|
|
8616
|
+
client_id: this.creds.appDefId,
|
|
8617
|
+
client_secret: this.creds.appSecret,
|
|
8618
|
+
scope: scope3
|
|
8619
|
+
})
|
|
8620
|
+
});
|
|
8621
|
+
const text32 = await res.text();
|
|
8622
|
+
if (!res.ok) {
|
|
8623
|
+
throw new JobServiceError(`oauth failed for scope ${scope3}`, res.status, truncate(text32));
|
|
8624
|
+
}
|
|
8625
|
+
let token;
|
|
8626
|
+
try {
|
|
8627
|
+
token = JSON.parse(text32).access_token;
|
|
8628
|
+
} catch {
|
|
8629
|
+
throw new JobServiceError(`oauth returned non-JSON for scope ${scope3}`, res.status, truncate(text32));
|
|
8630
|
+
}
|
|
8631
|
+
if (!token) throw new JobServiceError(`oauth returned no access_token for scope ${scope3}`, res.status);
|
|
8632
|
+
this.tokens.set(scope3, { token, expiresAt: this.now() + TOKEN_TTL_MS });
|
|
8633
|
+
return token;
|
|
8634
|
+
}
|
|
8635
|
+
async call(scope3, method, path2, body) {
|
|
8636
|
+
const token = await this.token(scope3);
|
|
8637
|
+
const res = await this.fetchImpl(`${this.baseUrl}${path2}`, {
|
|
8638
|
+
method,
|
|
8639
|
+
// BARE token, not `Bearer <token>` — matches jobServiceApi's own header.
|
|
8640
|
+
headers: { Authorization: token, ...body ? { "content-type": "application/json" } : {} },
|
|
8641
|
+
...body ? { body: JSON.stringify(body) } : {}
|
|
8642
|
+
});
|
|
8643
|
+
const text32 = await res.text();
|
|
8644
|
+
if (!res.ok) {
|
|
8645
|
+
throw new JobServiceError(`job service ${method} ${path2} failed`, res.status, truncate(text32));
|
|
8646
|
+
}
|
|
8647
|
+
if (!text32) return {};
|
|
8648
|
+
try {
|
|
8649
|
+
return JSON.parse(text32);
|
|
8650
|
+
} catch {
|
|
8651
|
+
throw new JobServiceError(`job service ${method} ${path2} returned non-JSON`, res.status, truncate(text32));
|
|
8652
|
+
}
|
|
8653
|
+
}
|
|
8654
|
+
/**
|
|
8655
|
+
* Create a NODE_COMMAND job on the Mac (or Linux) pool. Returns as soon as Job Service has
|
|
8656
|
+
* queued it — this never waits for the build.
|
|
8657
|
+
*/
|
|
8658
|
+
async createNodeCommand(spec, os2 = "mac", notify) {
|
|
8659
|
+
for (const key4 of ["gitUrl", "gitCommitSha", "packageName", "command", "branchName"]) {
|
|
8660
|
+
if (!spec[key4]) throw new JobServiceError(`createNodeCommand: missing ${key4}`);
|
|
8661
|
+
}
|
|
8662
|
+
const optionsKey = os2 === "linux" ? "linuxNodeCommandOptions" : "nodeCommandOptions";
|
|
8663
|
+
const type2 = os2 === "linux" ? "LINUX_NODE_COMMAND" : "NODE_COMMAND";
|
|
8664
|
+
const options2 = {
|
|
8665
|
+
packageManager: "YARN",
|
|
8666
|
+
// the only value Job Service accepts
|
|
8667
|
+
gitUrl: spec.gitUrl,
|
|
8668
|
+
gitCommitSha: spec.gitCommitSha,
|
|
8669
|
+
packageName: spec.packageName,
|
|
8670
|
+
command: spec.command,
|
|
8671
|
+
branchName: spec.branchName,
|
|
8672
|
+
...spec.envVars ? { envVars: spec.envVars } : {}
|
|
8673
|
+
};
|
|
8674
|
+
if (os2 === "mac" && spec.xcodeVersion) options2.xcodeVersion = spec.xcodeVersion;
|
|
8675
|
+
const subscriptions = {
|
|
8676
|
+
...notify?.ownershipTags?.length ? { subscribedOwnershipTags: notify.ownershipTags } : {},
|
|
8677
|
+
...notify?.userIds?.length ? { subscribedUserIds: notify.userIds } : {}
|
|
8678
|
+
};
|
|
8679
|
+
const data = await this.call(SCOPE_CREATE, "POST", "/v1/job", {
|
|
8680
|
+
job: { type: type2, [optionsKey]: options2, ...subscriptions }
|
|
8681
|
+
});
|
|
8682
|
+
const job = data?.job;
|
|
8683
|
+
if (!job?.id) throw new JobServiceError("job service create returned no job id");
|
|
8684
|
+
return snapshot(job);
|
|
8685
|
+
}
|
|
8686
|
+
/** Current state of a job. */
|
|
8687
|
+
async read(jobId) {
|
|
8688
|
+
const data = await this.call(SCOPE_READ, "GET", `/v1/job/${encodeURIComponent(jobId)}`);
|
|
8689
|
+
const job = data?.job;
|
|
8690
|
+
if (!job) throw new JobServiceError(`job service read returned no job for ${jobId}`);
|
|
8691
|
+
return snapshot({ id: jobId, ...job });
|
|
8692
|
+
}
|
|
8693
|
+
/** Ask Job Service to cancel a queued/running job. */
|
|
8694
|
+
async cancel(jobId) {
|
|
8695
|
+
await this.call(SCOPE_CANCEL, "POST", `/v1/job/${encodeURIComponent(jobId)}/cancel`);
|
|
8696
|
+
}
|
|
8697
|
+
};
|
|
8698
|
+
CUSTOMER_UPLOAD_LEASE_MS = 15 * 60 * 1e3;
|
|
8699
|
+
CUSTOMER_UPLOAD_RETRY_DELAYS_MS = [6e4, 5 * 6e4, 15 * 6e4];
|
|
8700
|
+
CUSTOMER_UPLOAD_MAX_ATTEMPTS = CUSTOMER_UPLOAD_RETRY_DELAYS_MS.length + 1;
|
|
8701
|
+
CUSTOMER_UPLOAD_ABANDONED = "customer_app_store_upload_abandoned";
|
|
8702
|
+
MAX_MEASURABLE_IDENTITY_WINDOW = 100;
|
|
8703
|
+
SITE_SHELL_SERVED_CAPABILITIES = ["webview"];
|
|
8704
|
+
DIST_SHELLS = {
|
|
8705
|
+
"branded-lite": {
|
|
8706
|
+
appDir: "apps/himi-branded-lite",
|
|
8707
|
+
bundleId: { ios: "ent.wix.brandedlite.dev", android: "com.wix.himi.brandedlite.dev" },
|
|
8708
|
+
provisioningEnv: "HIMI_BRANDED_LITE_PROVISIONING_JSON",
|
|
8709
|
+
embeddedSuffixes: ["liveactivity"],
|
|
8710
|
+
extensibleCapabilities: true,
|
|
8711
|
+
// RFC 0080 P1 — the first (and so far only) shell that builds author native extensions.
|
|
8712
|
+
extensibleNative: true,
|
|
8713
|
+
// Its config.ts bakes Wix member login from the contract's `wix` (or none, visitor-only).
|
|
8714
|
+
projectsMemberBinding: true,
|
|
8715
|
+
// RFC 0079 §10 — Brandy becomes a template on this shell: a website-only release bakes its own
|
|
8716
|
+
// site block and starts from the minimal site capability profile.
|
|
8717
|
+
projectsSite: true,
|
|
8718
|
+
siteCapabilityProfile: true
|
|
8719
|
+
},
|
|
8720
|
+
"owner-lite": {
|
|
8721
|
+
appDir: "apps/himi-owner-lite",
|
|
8722
|
+
bundleId: { ios: "ent.wix.ownerlite.dev", android: "com.wix.himi.ownerlite.dev" },
|
|
8723
|
+
provisioningEnv: "HIMI_OWNER_LITE_PROVISIONING_JSON",
|
|
8724
|
+
// #4354 — the iOS project embeds its companion watch app (<host>.watchkitapp).
|
|
8725
|
+
embeddedSuffixes: ["liveactivity", "watchkitapp"],
|
|
8726
|
+
extensibleCapabilities: true
|
|
8727
|
+
},
|
|
8728
|
+
// RFC 0062 — the site shell: the customer's own website as native-framed tabs. Since RFC 0079 §10
|
|
8729
|
+
// (phase 6, the cut-over) `brandy` is an ALIAS of branded-lite: it builds branded-lite's tree, which
|
|
8730
|
+
// hosts site pages through the shared shell glue, and bakes the release's own site block. What it
|
|
8731
|
+
// keeps is Brandy's identity, so an installed Brandy build updates in place:
|
|
8732
|
+
// - its bundle ids (`DIST_BUNDLE_ID`, which the pool's bundle-id policy ships under), and the
|
|
8733
|
+
// per-app ids recorded for its apps (`recordedBundleIdOf` is per app, never per shell);
|
|
8734
|
+
// - its Android key: no shell has a key of its own — the job's `androidSigning` policy picks it
|
|
8735
|
+
// (the committed QA keystore by default), for the alias exactly as for Brandy;
|
|
8736
|
+
// - its entitlements: Brandy's profiles carry push + associated domains only, so the alias never
|
|
8737
|
+
// adds App Attest (`appAttest: false`) and starts every release from the site profile, which
|
|
8738
|
+
// drops `live_activity` and with it the App Group (still added when a release declares it, as
|
|
8739
|
+
// Brandy's own Live Activity target did).
|
|
8740
|
+
// `contentAppDir` is the in-repo Brandy content app (`apps/himi-brandy`: config, dev module, seed,
|
|
8741
|
+
// provisioning). Its committed `site` block is what `site analyze --shell brandy` reads to know the
|
|
8742
|
+
// target is a site shell. It has no native tree since 6F-b, so an in-repo `--apply --shell brandy`
|
|
8743
|
+
// has nothing to bake and refuses; the binary is always this alias's branded-lite build.
|
|
8744
|
+
brandy: {
|
|
8745
|
+
appDir: "apps/himi-branded-lite",
|
|
8746
|
+
aliasOf: "branded-lite",
|
|
8747
|
+
contentAppDir: "apps/himi-brandy",
|
|
8748
|
+
bundleId: { ios: "ent.wix.brandy.dev", android: "com.wix.himi.brandy.dev" },
|
|
8749
|
+
// The tree's gradle seam: branded-lite's build.gradle.kts reads THIS name, never Brandy's.
|
|
8750
|
+
provisioningEnv: "HIMI_BRANDED_LITE_PROVISIONING_JSON",
|
|
8751
|
+
embeddedSuffixes: ["liveactivity"],
|
|
8752
|
+
extensibleCapabilities: true,
|
|
8753
|
+
// Brandy never accepted author native code; the alias does not start to.
|
|
8754
|
+
projectsMemberBinding: true,
|
|
8755
|
+
projectsSite: true,
|
|
8756
|
+
siteCapabilityProfile: true,
|
|
8757
|
+
siteReleasesOnly: true,
|
|
8758
|
+
appAttest: false
|
|
8759
|
+
},
|
|
8760
|
+
// The Base44 shell (#3674): a Base44 app as a native binary. Brandable — dist bakes the fetched
|
|
8761
|
+
// contract's identity, icon, brand colour and `base44` binding (which Base44 app it talks to).
|
|
8762
|
+
base44: {
|
|
8763
|
+
appDir: "apps/himi-base44",
|
|
8764
|
+
bundleId: { ios: "ent.wix.himibase44.dev", android: "com.wix.himi.base44.dev" },
|
|
8765
|
+
provisioningEnv: "HIMI_BASE44_PROVISIONING_JSON",
|
|
8766
|
+
embeddedSuffixes: ["liveactivity"],
|
|
8767
|
+
extensibleCapabilities: true
|
|
8768
|
+
},
|
|
8769
|
+
// The Godot game shell (#5283 Phase 4): a game as a native binary. The ONLY shell that serves
|
|
8770
|
+
// `godot` — the four business shells above cannot link the engine and refuse it. The `.dev`
|
|
8771
|
+
// ids are placeholders, not real App Store / Play ids. `embeddedSuffixes` stays empty: the
|
|
8772
|
+
// watch id (`<host>.watch.dev`) is not the `<host>.<suffix>` shape the signing mint requires.
|
|
8773
|
+
game: {
|
|
8774
|
+
appDir: "apps/himi-game",
|
|
8775
|
+
bundleId: { ios: "com.himalaya.himigame.dev.dev", android: "com.himalaya.himigame.dev.dev" },
|
|
8776
|
+
provisioningEnv: "HIMI_GAME_PROVISIONING_JSON",
|
|
8777
|
+
embeddedSuffixes: [],
|
|
8778
|
+
// prepare:customer writes the release's capability list, gen.sh feeds it to native-config,
|
|
8779
|
+
// and both boots register the baked ids.
|
|
8780
|
+
extensibleCapabilities: true
|
|
8781
|
+
},
|
|
8782
|
+
player: {
|
|
8783
|
+
appDir: "apps/himi-player",
|
|
8784
|
+
bundleId: { ios: "dev.himalaya.player.dev", android: "dev.himalaya.player.dev" },
|
|
8785
|
+
provisioningEnv: "HIMI_PLAYER_PROVISIONING_JSON",
|
|
8786
|
+
// The Live Activity extension Player embeds since #3691 (hosted apps' lock-screen timers).
|
|
8787
|
+
embeddedSuffixes: ["liveactivity"],
|
|
8788
|
+
extensibleCapabilities: false
|
|
8789
|
+
},
|
|
8790
|
+
"demo-app": {
|
|
8791
|
+
appDir: "apps/demo-app",
|
|
8792
|
+
bundleId: { ios: "com.himalaya.demoapp.dev", android: "com.himalaya.demoapp.dev" },
|
|
8793
|
+
provisioningEnv: "DEMO_APP_PROVISIONING_JSON",
|
|
8794
|
+
embeddedSuffixes: ["widgets"],
|
|
8795
|
+
extensibleCapabilities: false
|
|
8796
|
+
}
|
|
8797
|
+
};
|
|
8798
|
+
DEFAULT_DIST_SHELL = "branded-lite";
|
|
8799
|
+
DEFAULT_BORROWABLE_IOS_IDS = ["ent.*"];
|
|
8800
|
+
BUNDLE_ID_RE = /^[a-z][a-z0-9]*(\.[a-z][a-z0-9]*)+$/;
|
|
8801
|
+
DEFAULT_DIST_SIGNING = "wix-managed";
|
|
8802
|
+
WIX_MANAGED_SIGNING_ALIASES = ["wix-managed", "wix", "pool-enterprise"];
|
|
8803
|
+
DEFAULT_ANDROID_SIGNING = "qa-keystore";
|
|
8804
|
+
ANDROID_SIGNING_POLICIES = ["qa-keystore", "wix-keystore", "debug", "oneapp-debug", "unsigned"];
|
|
8805
|
+
ANDROID_SIGNING_ALIASES = {
|
|
8806
|
+
// The canonical spellings, derived so the two lists cannot drift apart.
|
|
8807
|
+
...Object.fromEntries(ANDROID_SIGNING_POLICIES.map((p2) => [p2, p2])),
|
|
8808
|
+
qa: "qa-keystore",
|
|
8809
|
+
himi: "qa-keystore",
|
|
8810
|
+
wix: "wix-keystore",
|
|
8811
|
+
oneapp: "wix-keystore",
|
|
8812
|
+
"one-app-debug": "oneapp-debug",
|
|
8813
|
+
oneappdebug: "oneapp-debug",
|
|
8814
|
+
// The CLI's word for an owner bundle. `unsigned` is the fact about the file, which the pool reports.
|
|
8815
|
+
owner: "unsigned"
|
|
8816
|
+
};
|
|
8817
|
+
DEFAULT_ANDROID_FORMAT = "apk";
|
|
8818
|
+
ANDROID_FORMATS = ["apk", "aab"];
|
|
8819
|
+
ANDROID_FORMAT_NOT_BUILT = "android_format_not_built";
|
|
8820
|
+
ANDROID_FORMAT_WRONG_SIGNER = "android_format_wrong_signer";
|
|
8821
|
+
ANDROID_FORMAT_NOT_REQUESTED = "android_format_not_requested";
|
|
8822
|
+
DEFAULT_ANDROID_BUILD_TYPE = "release";
|
|
8823
|
+
ANDROID_BUILD_TYPES = ["release", "debug"];
|
|
8824
|
+
ANDROID_BUILD_TYPE_NOT_BUILT = "android_build_type_not_built";
|
|
8825
|
+
DEFAULT_IOS_FORMAT = "ipa";
|
|
8826
|
+
IOS_FORMATS = ["ipa", "simulator"];
|
|
8827
|
+
IOS_FORMAT_NOT_BUILT = "ios_format_not_built";
|
|
8828
|
+
IOS_FORMAT_NOT_REQUESTED = "ios_format_not_requested";
|
|
8829
|
+
DEFAULT_GIT_URL = "https://github.com/wix-private/himalaya";
|
|
8830
|
+
DIST_PACKAGE_NAME = "@himalaya/native-ci";
|
|
8831
|
+
DIST_PARAMS_FLAG = "--himi-dist";
|
|
8832
|
+
MAX_COMMAND_CHARS = 2e3;
|
|
8833
|
+
}
|
|
8834
|
+
});
|
|
8835
|
+
|
|
8558
8836
|
// ../../core/ts/src/site-pages-host.ts
|
|
8559
8837
|
function isWebsitePagesBlock(site) {
|
|
8560
8838
|
return !!site && Array.isArray(site.pages) && site.pages.length > 0 && site.pages.every((page) => page.placement === "drawer");
|
|
@@ -16036,6 +16314,7 @@ function deriveAppMeta(name, m2, platforms = {}, provisioning = {}) {
|
|
|
16036
16314
|
base44: config.base44,
|
|
16037
16315
|
wixIap: config.wixIap,
|
|
16038
16316
|
socialSignIn: config.socialSignIn,
|
|
16317
|
+
ads: config.ads,
|
|
16039
16318
|
// RFC 0042 Phase 2 — optional per-app Wix Platform productionization block.
|
|
16040
16319
|
// Read loosely (AppConfig in @himalaya/core doesn't type it yet) so apps can
|
|
16041
16320
|
// opt in without a core-types bump; absent ⇒ all members keep the dev seam.
|
|
@@ -16068,21 +16347,21 @@ var init_app_module = __esm({
|
|
|
16068
16347
|
import { readFileSync as readFileSync16 } from "node:fs";
|
|
16069
16348
|
import { resolve as resolve14 } from "node:path";
|
|
16070
16349
|
function servedReleaseContractOf(raw) {
|
|
16071
|
-
if (!
|
|
16350
|
+
if (!isPlainObject2(raw)) return void 0;
|
|
16072
16351
|
const site = raw.site;
|
|
16073
|
-
if (!
|
|
16352
|
+
if (!isPlainObject2(site) || !("origin" in site) || !("pages" in site)) return void 0;
|
|
16074
16353
|
const contract = { site: jsonCopy(site) };
|
|
16075
16354
|
for (const key4 of ["bindings", "wix", "base44"]) {
|
|
16076
16355
|
if (raw[key4] != null) contract[key4] = jsonCopy(raw[key4]);
|
|
16077
16356
|
}
|
|
16078
|
-
if (
|
|
16357
|
+
if (isPlainObject2(raw.identity)) {
|
|
16079
16358
|
const identity = {};
|
|
16080
16359
|
for (const key4 of SERVED_IDENTITY_KEYS) if (raw.identity[key4] != null) identity[key4] = jsonCopy(raw.identity[key4]);
|
|
16081
16360
|
if (Object.keys(identity).length) contract.identity = identity;
|
|
16082
16361
|
} else if (raw.identity != null) {
|
|
16083
16362
|
contract.identity = jsonCopy(raw.identity);
|
|
16084
16363
|
}
|
|
16085
|
-
if (
|
|
16364
|
+
if (isPlainObject2(raw.branding)) {
|
|
16086
16365
|
if (raw.branding.secondaryColor != null) contract.branding = { secondaryColor: jsonCopy(raw.branding.secondaryColor) };
|
|
16087
16366
|
} else if (raw.branding != null) {
|
|
16088
16367
|
contract.branding = jsonCopy(raw.branding);
|
|
@@ -16107,12 +16386,12 @@ function readProvisioningFacts(dir) {
|
|
|
16107
16386
|
...contract ? { contract } : {}
|
|
16108
16387
|
};
|
|
16109
16388
|
}
|
|
16110
|
-
var SERVED_IDENTITY_KEYS,
|
|
16389
|
+
var SERVED_IDENTITY_KEYS, isPlainObject2, jsonCopy;
|
|
16111
16390
|
var init_provisioning_facts = __esm({
|
|
16112
16391
|
"../../core/dev-server/src/provisioning-facts.ts"() {
|
|
16113
16392
|
init_define_HHP_CATALOG();
|
|
16114
16393
|
SERVED_IDENTITY_KEYS = ["businessName", "tagline", "supportUrl", "privacyUrl", "termsUrl"];
|
|
16115
|
-
|
|
16394
|
+
isPlainObject2 = (value2) => !!value2 && typeof value2 === "object" && !Array.isArray(value2);
|
|
16116
16395
|
jsonCopy = (value2) => JSON.parse(JSON.stringify(value2));
|
|
16117
16396
|
}
|
|
16118
16397
|
});
|
|
@@ -30975,6 +31254,7 @@ __export(config_exports2, {
|
|
|
30975
31254
|
saveLocalFlags: () => saveLocalFlags,
|
|
30976
31255
|
serializeRevocationsYaml: () => serializeRevocationsYaml,
|
|
30977
31256
|
serializeRolloutYaml: () => serializeRolloutYaml,
|
|
31257
|
+
validateAdsConfig: () => validateAdsConfig,
|
|
30978
31258
|
validateOverlayPatch: () => validateOverlayPatch
|
|
30979
31259
|
});
|
|
30980
31260
|
import { mkdirSync as mkdirSync13, readFileSync as readFileSync20, writeFileSync as writeFileSync12 } from "node:fs";
|
|
@@ -31085,6 +31365,29 @@ function appIconBadgeSourcesErrors(value2) {
|
|
|
31085
31365
|
}
|
|
31086
31366
|
return [];
|
|
31087
31367
|
}
|
|
31368
|
+
function validateAdsConfig(v2) {
|
|
31369
|
+
const fail17 = (error) => ({ ok: false, error: `adsConfig: ${error}` });
|
|
31370
|
+
if (!v2 || typeof v2 !== "object" || Array.isArray(v2)) return fail17("must be a JSON object");
|
|
31371
|
+
const o2 = v2;
|
|
31372
|
+
for (const k3 of Object.keys(o2)) if (!ADS_KEYS.has(k3)) return fail17(`unknown field "${k3}"`);
|
|
31373
|
+
if ("enabled" in o2 && typeof o2.enabled !== "boolean") return fail17('"enabled" must be a boolean');
|
|
31374
|
+
if ("adFreeEntitlements" in o2) {
|
|
31375
|
+
const a3 = o2.adFreeEntitlements;
|
|
31376
|
+
if (!Array.isArray(a3) || a3.some((x2) => typeof x2 !== "string" || x2 === "")) return fail17('"adFreeEntitlements" must be an array of product id strings');
|
|
31377
|
+
}
|
|
31378
|
+
if ("slots" in o2) {
|
|
31379
|
+
const s5 = o2.slots;
|
|
31380
|
+
if (!s5 || typeof s5 !== "object" || Array.isArray(s5)) return fail17('"slots" must be an object keyed by slot name');
|
|
31381
|
+
for (const [name, slot] of Object.entries(s5)) {
|
|
31382
|
+
if (!slot || typeof slot !== "object" || Array.isArray(slot)) return fail17(`slot "${name}" must be an object`);
|
|
31383
|
+
for (const [k3, val] of Object.entries(slot)) {
|
|
31384
|
+
if (!ADS_SLOT_KEYS.has(k3)) return fail17(`slot "${name}" has unknown field "${k3}"`);
|
|
31385
|
+
if (typeof val !== "string" || !AD_UNIT_RE.test(val)) return fail17(`slot "${name}".${k3} must be an ad unit id like "ca-app-pub-123/456"`);
|
|
31386
|
+
}
|
|
31387
|
+
}
|
|
31388
|
+
}
|
|
31389
|
+
return { ok: true };
|
|
31390
|
+
}
|
|
31088
31391
|
function validateOverlayPatch(patch) {
|
|
31089
31392
|
const errs = [];
|
|
31090
31393
|
if (!patch || typeof patch !== "object" || Array.isArray(patch)) return ["overlay must be a JSON object"];
|
|
@@ -31093,6 +31396,10 @@ function validateOverlayPatch(patch) {
|
|
|
31093
31396
|
if (STRUCTURAL_KEYS.has(k3)) errs.push(`"${k3}" is structural \u2014 edit it in source (deriveNavigationConfig), not the overlay`);
|
|
31094
31397
|
else if (!OPERATIONAL_OVERLAY_KEYS.has(k3)) errs.push(`"${k3}" is not an allowed operational overlay key`);
|
|
31095
31398
|
else if (k3 === "appIconBadgeSources") errs.push(...appIconBadgeSourcesErrors(obj30[k3]));
|
|
31399
|
+
else if (k3 === "adsConfig") {
|
|
31400
|
+
const r3 = validateAdsConfig(obj30[k3]);
|
|
31401
|
+
if (!r3.ok) errs.push(r3.error);
|
|
31402
|
+
}
|
|
31096
31403
|
}
|
|
31097
31404
|
return errs;
|
|
31098
31405
|
}
|
|
@@ -31158,7 +31465,7 @@ function loadRevocationsStrict(app2, root = REPO_ROOT3) {
|
|
|
31158
31465
|
}
|
|
31159
31466
|
return parseRevocationsYaml(text32).revoked;
|
|
31160
31467
|
}
|
|
31161
|
-
var REPO_ROOT3, OPERATIONAL_OVERLAY_KEYS, STRUCTURAL_KEYS, OPERATOR_ONLY_OVERLAY_KEYS;
|
|
31468
|
+
var REPO_ROOT3, OPERATIONAL_OVERLAY_KEYS, STRUCTURAL_KEYS, OPERATOR_ONLY_OVERLAY_KEYS, ADS_SLOT_KEYS, ADS_KEYS, AD_UNIT_RE;
|
|
31162
31469
|
var init_config2 = __esm({
|
|
31163
31470
|
"../../core/serve-control/src/config.ts"() {
|
|
31164
31471
|
init_define_HHP_CATALOG();
|
|
@@ -31179,6 +31486,9 @@ var init_config2 = __esm({
|
|
|
31179
31486
|
// (which store products the paywall shows + order + copy). Store owns price +
|
|
31180
31487
|
// purchase, so nothing secret/structural here.
|
|
31181
31488
|
"iapConfig",
|
|
31489
|
+
// In-app ads (docs/ads.md): the kill switch, per-slot ad unit IDs and the ad-free product list.
|
|
31490
|
+
// The AdMob APP ids stay baked at build time and are never part of this block.
|
|
31491
|
+
"adsConfig",
|
|
31182
31492
|
// RFC 0010 nav-modes / RFC 0013 amendment — navigation is an OPERATIONAL lever:
|
|
31183
31493
|
// the shell mode + tab/drawer/sidebar structure can be changed live OTA from the
|
|
31184
31494
|
// admin (durable, audited, revertible overlay) without a source PR. config.ts
|
|
@@ -31226,6 +31536,9 @@ var init_config2 = __esm({
|
|
|
31226
31536
|
"prodControlBaseUrl",
|
|
31227
31537
|
"push"
|
|
31228
31538
|
]);
|
|
31539
|
+
ADS_SLOT_KEYS = /* @__PURE__ */ new Set(["iosUnitId", "androidUnitId"]);
|
|
31540
|
+
ADS_KEYS = /* @__PURE__ */ new Set(["enabled", "slots", "adFreeEntitlements"]);
|
|
31541
|
+
AD_UNIT_RE = /^ca-app-pub-\d+\/\d+$/;
|
|
31229
31542
|
}
|
|
31230
31543
|
});
|
|
31231
31544
|
|
|
@@ -36769,145 +37082,6 @@ var init_capabilities_generated = __esm({
|
|
|
36769
37082
|
}
|
|
36770
37083
|
});
|
|
36771
37084
|
|
|
36772
|
-
// ../native-config/site-contract-fields.ts
|
|
36773
|
-
var SITE_CHROME_FLAGS, SITE_CHROME_LISTS, PAGE_WEBVIEW_BOOLEANS, PAGE_WEBVIEW_STRINGS, PAGE_WEBVIEW_LISTS, SITE_EMPTY_LIST_FIELDS, SITE_MEMBER_PAGE_KEYS, SITE_STRING_FIELDS, SITE_BOOLEAN_FIELDS;
|
|
36774
|
-
var init_site_contract_fields = __esm({
|
|
36775
|
-
"../native-config/site-contract-fields.ts"() {
|
|
36776
|
-
init_define_HHP_CATALOG();
|
|
36777
|
-
SITE_CHROME_FLAGS = ["hideSiteHeader", "hideSiteMenu", "hideSiteFooter", "hideWixAds"];
|
|
36778
|
-
SITE_CHROME_LISTS = ["hideSelectors"];
|
|
36779
|
-
PAGE_WEBVIEW_BOOLEANS = [
|
|
36780
|
-
"pullToRefresh",
|
|
36781
|
-
"showProgressBar",
|
|
36782
|
-
"hideHostedSiteHeader",
|
|
36783
|
-
"hideHostedSiteFooter",
|
|
36784
|
-
"hideHostedSiteMenu",
|
|
36785
|
-
"hideWixAds",
|
|
36786
|
-
"immersive",
|
|
36787
|
-
"keepAlive"
|
|
36788
|
-
];
|
|
36789
|
-
PAGE_WEBVIEW_STRINGS = ["loadingText", "errorTitle"];
|
|
36790
|
-
PAGE_WEBVIEW_LISTS = ["hideSelectors"];
|
|
36791
|
-
SITE_EMPTY_LIST_FIELDS = new Set(PAGE_WEBVIEW_LISTS.map((key4) => `pages[].webView.${key4}`));
|
|
36792
|
-
SITE_MEMBER_PAGE_KEYS = ["orders", "bookings"];
|
|
36793
|
-
SITE_STRING_FIELDS = {
|
|
36794
|
-
origin: "url",
|
|
36795
|
-
kind: "id",
|
|
36796
|
-
layout: "id",
|
|
36797
|
-
menuSource: "id",
|
|
36798
|
-
pageTitle: "id",
|
|
36799
|
-
"pages[].id": "id",
|
|
36800
|
-
"pages[].title": "text",
|
|
36801
|
-
"pages[].path": "path",
|
|
36802
|
-
"pages[].icon": "id",
|
|
36803
|
-
"pages[].placement": "id",
|
|
36804
|
-
...Object.fromEntries(PAGE_WEBVIEW_STRINGS.map((key4) => [`pages[].webView.${key4}`, "text"])),
|
|
36805
|
-
...Object.fromEntries(SITE_CHROME_LISTS.map((key4) => [`chrome.${key4}[]`, "selector"])),
|
|
36806
|
-
...Object.fromEntries(PAGE_WEBVIEW_LISTS.map((key4) => [`pages[].webView.${key4}[]`, "selector"])),
|
|
36807
|
-
...Object.fromEntries(SITE_MEMBER_PAGE_KEYS.map((key4) => [`memberPages.${key4}`, "path"])),
|
|
36808
|
-
// `site.topBar.actions[]` — trailing top-bar icons (core/ts/src/site-shell.ts `SiteTopBarAction`).
|
|
36809
|
-
"topBar.actions[].id": "id",
|
|
36810
|
-
"topBar.actions[].icon": "id",
|
|
36811
|
-
"topBar.actions[].label": "text",
|
|
36812
|
-
"topBar.actions[].target.page": "id",
|
|
36813
|
-
"topBar.actions[].target.screen": "id",
|
|
36814
|
-
"topBar.actions[].target.url": "link",
|
|
36815
|
-
// `site.nativePages[]` — the author's own native screens in the chrome (`SiteNativePage`).
|
|
36816
|
-
"nativePages[].id": "id",
|
|
36817
|
-
"nativePages[].screenId": "id",
|
|
36818
|
-
"nativePages[].title": "text",
|
|
36819
|
-
"nativePages[].icon": "id",
|
|
36820
|
-
"nativePages[].placement": "id",
|
|
36821
|
-
"nativePages[].after": "id"
|
|
36822
|
-
};
|
|
36823
|
-
SITE_BOOLEAN_FIELDS = /* @__PURE__ */ new Set([
|
|
36824
|
-
...SITE_CHROME_FLAGS.map((key4) => `chrome.${key4}`),
|
|
36825
|
-
...PAGE_WEBVIEW_BOOLEANS.map((key4) => `pages[].webView.${key4}`),
|
|
36826
|
-
"pages[].showTitle",
|
|
36827
|
-
"nativePages[].public",
|
|
36828
|
-
"nativePages[].requiresAuth"
|
|
36829
|
-
]);
|
|
36830
|
-
}
|
|
36831
|
-
});
|
|
36832
|
-
|
|
36833
|
-
// ../native-config/bake-safe.ts
|
|
36834
|
-
function hasUnsafeBakeChars(value2) {
|
|
36835
|
-
return UNSAFE.test(value2);
|
|
36836
|
-
}
|
|
36837
|
-
function isBakeableGoogleClientId(value2) {
|
|
36838
|
-
return typeof value2 === "string" && GOOGLE_CLIENT_ID.test(value2) && !hasUnsafeBakeChars(value2);
|
|
36839
|
-
}
|
|
36840
|
-
function bakeableHttpsOrigin(value2) {
|
|
36841
|
-
if (typeof value2 !== "string") return void 0;
|
|
36842
|
-
const raw = value2;
|
|
36843
|
-
if (!raw || hasUnsafeBakeChars(raw) || raw.includes("%")) return void 0;
|
|
36844
|
-
let u2;
|
|
36845
|
-
try {
|
|
36846
|
-
u2 = new URL(raw);
|
|
36847
|
-
} catch {
|
|
36848
|
-
return void 0;
|
|
36849
|
-
}
|
|
36850
|
-
if (u2.protocol !== "https:" || u2.pathname !== "/" && u2.pathname !== "" || u2.search || u2.hash || u2.username || u2.password) return void 0;
|
|
36851
|
-
if (!HOSTNAME.test(u2.hostname)) return void 0;
|
|
36852
|
-
const origin = u2.origin;
|
|
36853
|
-
return hasUnsafeBakeChars(origin) ? void 0 : origin;
|
|
36854
|
-
}
|
|
36855
|
-
function isBakeableBase44AppId(value2) {
|
|
36856
|
-
return typeof value2 === "string" && /^[A-Za-z0-9]{8,64}$/.test(value2);
|
|
36857
|
-
}
|
|
36858
|
-
function isBase44TenantOrigin(origin) {
|
|
36859
|
-
const safe = bakeableHttpsOrigin(origin);
|
|
36860
|
-
if (!safe || safe !== origin) return false;
|
|
36861
|
-
const u2 = new URL(safe);
|
|
36862
|
-
if (u2.port !== "" || !u2.hostname.endsWith(BASE44_APP_SUFFIX)) return false;
|
|
36863
|
-
const tenant = u2.hostname.slice(0, -BASE44_APP_SUFFIX.length);
|
|
36864
|
-
return tenant.length > 0 && !tenant.includes(".");
|
|
36865
|
-
}
|
|
36866
|
-
function isWixFreeSiteUrl(url) {
|
|
36867
|
-
if (typeof url !== "string") return false;
|
|
36868
|
-
try {
|
|
36869
|
-
return isWixFreeSiteHost(new URL(url).hostname);
|
|
36870
|
-
} catch {
|
|
36871
|
-
return false;
|
|
36872
|
-
}
|
|
36873
|
-
}
|
|
36874
|
-
function wixDomainTwins(host) {
|
|
36875
|
-
const h2 = host.toLowerCase();
|
|
36876
|
-
return [h2, h2.startsWith("www.") ? h2.slice(4) : `www.${h2}`];
|
|
36877
|
-
}
|
|
36878
|
-
function wixSiteUrlVerifiedFor(url, clientId, verified2) {
|
|
36879
|
-
if (!verified2 || verified2.clientId !== clientId || typeof url !== "string") return false;
|
|
36880
|
-
const origin = bakeableHttpsOrigin(verified2.origin);
|
|
36881
|
-
if (!origin || origin !== verified2.origin) return false;
|
|
36882
|
-
let u2;
|
|
36883
|
-
try {
|
|
36884
|
-
u2 = new URL(url);
|
|
36885
|
-
} catch {
|
|
36886
|
-
return false;
|
|
36887
|
-
}
|
|
36888
|
-
if (u2.protocol !== "https:" || u2.port !== "" || u2.username || u2.password) return false;
|
|
36889
|
-
const want = new URL(origin);
|
|
36890
|
-
return want.port === "" && wixDomainTwins(want.hostname).includes(u2.hostname.toLowerCase());
|
|
36891
|
-
}
|
|
36892
|
-
function wixCustomDomainUrls(site, siteUrl) {
|
|
36893
|
-
if (!site || site.kind !== "wix") return [];
|
|
36894
|
-
const urls2 = [site.origin, siteUrl].filter((u2) => typeof u2 === "string" && u2.trim() !== "").map((u2) => u2.trim());
|
|
36895
|
-
return [...new Set(urls2)].filter((u2) => !isWixFreeSiteUrl(u2));
|
|
36896
|
-
}
|
|
36897
|
-
var UNSAFE, GOOGLE_CLIENT_ID, HOSTNAME, BASE44_APP_SITES, BASE44_APP_SUFFIX;
|
|
36898
|
-
var init_bake_safe = __esm({
|
|
36899
|
-
"../native-config/bake-safe.ts"() {
|
|
36900
|
-
init_define_HHP_CATALOG();
|
|
36901
|
-
init_site_shell();
|
|
36902
|
-
UNSAFE = /[\u0000-\u0020\u007f-\u009f\u00a0\u2028\u2029$(){}"'`\\<>&]/;
|
|
36903
|
-
GOOGLE_CLIENT_ID = /^[0-9]{6,20}(?:-[a-z0-9]{8,64})?\.apps\.googleusercontent\.com$/;
|
|
36904
|
-
HOSTNAME = /^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/;
|
|
36905
|
-
BASE44_APP_SITES = BASE44_ORIGINS.find((pattern) => pattern === "*.base44.app");
|
|
36906
|
-
if (!BASE44_APP_SITES) throw new Error("BASE44_ORIGINS no longer lists *.base44.app; bake-safe.ts's tenant rule must follow it");
|
|
36907
|
-
BASE44_APP_SUFFIX = BASE44_APP_SITES.slice(1);
|
|
36908
|
-
}
|
|
36909
|
-
});
|
|
36910
|
-
|
|
36911
37085
|
// ../native-config/site-contract.ts
|
|
36912
37086
|
function defaultWebSdkBundle(capabilities) {
|
|
36913
37087
|
return capabilities.length === 1 && capabilities[0] === "health" ? HEALTH_PROOF_BUNDLE : companionBundleName(capabilities);
|
|
@@ -36989,63 +37163,6 @@ var init_site_contract = __esm({
|
|
|
36989
37163
|
}
|
|
36990
37164
|
});
|
|
36991
37165
|
|
|
36992
|
-
// ../native-config/binding-spellings.ts
|
|
36993
|
-
function isPlainObject2(value2) {
|
|
36994
|
-
return value2 !== null && typeof value2 === "object" && !Array.isArray(value2);
|
|
36995
|
-
}
|
|
36996
|
-
function blank(value2) {
|
|
36997
|
-
return value2 == null || value2 === "";
|
|
36998
|
-
}
|
|
36999
|
-
function sameValue(field, a3, b3) {
|
|
37000
|
-
if (typeof a3 === "string" && typeof b3 === "string") {
|
|
37001
|
-
return field === "siteId" ? a3.trim().toLowerCase() === b3.trim().toLowerCase() : a3.trim() === b3.trim();
|
|
37002
|
-
}
|
|
37003
|
-
return JSON.stringify(a3) === JSON.stringify(b3);
|
|
37004
|
-
}
|
|
37005
|
-
function mergeBlock(key4, legacy, nested) {
|
|
37006
|
-
if (nested != null && !isPlainObject2(nested)) throw new Error(`provisioning.bindings.${key4} must be an object`);
|
|
37007
|
-
if (legacy == null) return nested ?? void 0;
|
|
37008
|
-
if (nested == null) return legacy;
|
|
37009
|
-
if (!isPlainObject2(legacy)) return legacy;
|
|
37010
|
-
const merged = { ...legacy };
|
|
37011
|
-
for (const [field, value2] of Object.entries(nested)) {
|
|
37012
|
-
if (blank(value2)) continue;
|
|
37013
|
-
const other = legacy[field];
|
|
37014
|
-
if (!blank(other) && !sameValue(field, other, value2)) {
|
|
37015
|
-
throw new Error(
|
|
37016
|
-
`provisioning.${key4}.${field} (${JSON.stringify(other)}) and provisioning.bindings.${key4}.${field} (${JSON.stringify(value2)}) disagree. They are the same field (RFC 0079 \xA710) \u2014 keep one spelling, or make them agree.`
|
|
37017
|
-
);
|
|
37018
|
-
}
|
|
37019
|
-
merged[field] = value2;
|
|
37020
|
-
}
|
|
37021
|
-
return merged;
|
|
37022
|
-
}
|
|
37023
|
-
function bindingsEnvelope(input) {
|
|
37024
|
-
const raw = input.bindings;
|
|
37025
|
-
if (raw == null) return void 0;
|
|
37026
|
-
if (!isPlainObject2(raw)) throw new Error("provisioning.bindings must be an object");
|
|
37027
|
-
for (const key4 of Object.keys(raw)) {
|
|
37028
|
-
if (!BINDING_KEYS.includes(key4)) {
|
|
37029
|
-
throw new Error(`provisioning.bindings.${key4} is not a binding (allowed: ${BINDING_KEYS.join(", ")})`);
|
|
37030
|
-
}
|
|
37031
|
-
}
|
|
37032
|
-
return raw;
|
|
37033
|
-
}
|
|
37034
|
-
function readBindingBlocks(input) {
|
|
37035
|
-
const nested = bindingsEnvelope(input) ?? {};
|
|
37036
|
-
return {
|
|
37037
|
-
wix: mergeBlock("wix", input.wix, nested.wix),
|
|
37038
|
-
base44: mergeBlock("base44", input.base44, nested.base44)
|
|
37039
|
-
};
|
|
37040
|
-
}
|
|
37041
|
-
var BINDING_KEYS;
|
|
37042
|
-
var init_binding_spellings = __esm({
|
|
37043
|
-
"../native-config/binding-spellings.ts"() {
|
|
37044
|
-
init_define_HHP_CATALOG();
|
|
37045
|
-
BINDING_KEYS = ["wix", "base44"];
|
|
37046
|
-
}
|
|
37047
|
-
});
|
|
37048
|
-
|
|
37049
37166
|
// ../native-config/web-sdk-companion.ts
|
|
37050
37167
|
var web_sdk_companion_exports = {};
|
|
37051
37168
|
__export(web_sdk_companion_exports, {
|
|
@@ -41841,6 +41958,7 @@ function deriveNavigationConfig(app2, bundleCtx) {
|
|
|
41841
41958
|
if (app2.cashier !== void 0) config.cashierConfig = app2.cashier;
|
|
41842
41959
|
if (app2.base44 !== void 0) config.base44Config = { appId: app2.base44.appId, ...app2.base44.serverUrl !== void 0 ? { serverUrl: app2.base44.serverUrl } : {} };
|
|
41843
41960
|
if (app2.wixIap !== void 0) config.wixIapConfig = app2.wixIap;
|
|
41961
|
+
if (app2.ads !== void 0) config.adsConfig = deriveAdsConfig(app2.ads);
|
|
41844
41962
|
if (app2.socialSignIn !== void 0) config.socialSignInConfig = app2.socialSignIn;
|
|
41845
41963
|
if (app2.releaseContract !== void 0) config.contract = app2.releaseContract;
|
|
41846
41964
|
if (app2.wixPlatform !== void 0) config.wixPlatformConfig = app2.wixPlatform;
|
|
@@ -41924,6 +42042,13 @@ function handleAppConfigRequest(req, res, meta, override, bundleCtx, devNetMocks
|
|
|
41924
42042
|
});
|
|
41925
42043
|
res.end(body);
|
|
41926
42044
|
}
|
|
42045
|
+
function deriveAdsConfig(ads) {
|
|
42046
|
+
return {
|
|
42047
|
+
enabled: ads.enabled === true,
|
|
42048
|
+
slots: ads.slots ?? {},
|
|
42049
|
+
adFreeEntitlements: ads.adFreeEntitlements ?? []
|
|
42050
|
+
};
|
|
42051
|
+
}
|
|
41927
42052
|
var SHARED_WIX_SENTRY_DSN, NAV_OVERRIDES, requiresAuthWarned;
|
|
41928
42053
|
var init_app_config = __esm({
|
|
41929
42054
|
"../../core/dev-server/src/app-config.ts"() {
|
|
@@ -44092,6 +44217,7 @@ function shouldRevealError(args) {
|
|
|
44092
44217
|
var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
|
|
44093
44218
|
var init_validation = __esm({
|
|
44094
44219
|
"../../core/ts/src/validation.ts"() {
|
|
44220
|
+
"use strict";
|
|
44095
44221
|
init_define_HHP_CATALOG();
|
|
44096
44222
|
EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
|
|
44097
44223
|
URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
|
|
@@ -141849,10 +141975,28 @@ function renderInner(node4, ctx, boundMotion) {
|
|
|
141849
141975
|
const fallback = extensionFallbackChild(props2);
|
|
141850
141976
|
return fallback ? /* @__PURE__ */ jsx16("div", { style: { alignSelf: "stretch", ...wrap }, children: renderNode(fallback, ctx) }) : null;
|
|
141851
141977
|
}
|
|
141978
|
+
if (pkg === AD_BANNER_PACKAGE && type2 === AD_BANNER_TYPE) {
|
|
141979
|
+
return unknownComponentShowsDeveloperLabel(ctx) ? /* @__PURE__ */ jsx16("div", { style: { alignSelf: "stretch", ...wrap }, children: adBannerPlaceholder(props2) }) : null;
|
|
141980
|
+
}
|
|
141852
141981
|
return /* @__PURE__ */ jsx16(UnknownComponentNode, { pkg: pkg ?? "himalaya", type: type2, props: props2, ctx, wrap });
|
|
141853
141982
|
}
|
|
141854
141983
|
}
|
|
141855
141984
|
}
|
|
141985
|
+
function adBannerPlaceholderLabel(props2) {
|
|
141986
|
+
const slot = typeof props2.slot === "string" && props2.slot ? props2.slot : "?";
|
|
141987
|
+
const size = typeof props2.size === "string" && props2.size ? props2.size : "adaptive";
|
|
141988
|
+
return `Ad \xB7 ${slot} \xB7 ${size}`;
|
|
141989
|
+
}
|
|
141990
|
+
function adBannerPlaceholder(props2) {
|
|
141991
|
+
return /* @__PURE__ */ jsx16(
|
|
141992
|
+
"div",
|
|
141993
|
+
{
|
|
141994
|
+
"data-testid": "ad-banner-placeholder",
|
|
141995
|
+
style: { border: "1px dashed #8a93a3", borderRadius: 6, minHeight: 50, display: "flex", alignItems: "center", justifyContent: "center", color: "#636b78", fontSize: 12, fontFamily: "system-ui, sans-serif" },
|
|
141996
|
+
children: adBannerPlaceholderLabel(props2)
|
|
141997
|
+
}
|
|
141998
|
+
);
|
|
141999
|
+
}
|
|
141856
142000
|
function isExtensionPackage(pkg) {
|
|
141857
142001
|
return pkg.startsWith("ext.") && pkg.length > 4;
|
|
141858
142002
|
}
|
|
@@ -141883,7 +142027,7 @@ function listSeparatorStyle(separator, horizontal) {
|
|
|
141883
142027
|
const insetLeading = Math.max(0, Number(s5.insetLeading ?? s5.inset_leading ?? 0) || 0);
|
|
141884
142028
|
return { token, thickness, insetLeading };
|
|
141885
142029
|
}
|
|
141886
|
-
var MOTION_WRAPPER_ATTRS, AppearanceActionContext, rowValue, loadPdfFetch, WebViewBridgeHost2, useIsomorphicLayoutEffect3, GridColumnsContext, GridBoundList, GRID_SPAN_ALL, ResponsiveGrid, MasonryCells, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, appearKeyframesInjected, valueSwapKeyframesInjected, NUMERIC_TEXT, shimmerKeyframesInjected, APPEAR_KEYFRAMES, linkedEntranceKeyframesInjected, pressStylesInjected, REVEAL_ON_FOCUS_ATTR, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, ENTER_KEYFRAMES, ENTRANCE_KEYFRAMES_CSS, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, AMBIENT_HOST_STYLE, AmbientMotionBox, vectorAnimStylesInjected, scrollProgressRuntimeInjected, scrollLinkedRuntime, confettiRuntimeInjected, lottieRuntimeInjected, lottieAssetHeaders, LOTTIE_RUNTIME_ATTRIBUTES, lottieAnims, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, fillsZLayer, presentsFromOwnSurface, zLayerIndex, ZFILL_CSS, zFillStylesInjected, hAlignItems, bodyFont, kids2, columnKids, PLACED_TYPES, unplaced, columnPlaceStyle, rowKidCtx, rowKids, staggeredKids, asTextL10n, asFinalTextL10n, asBoundText, useBoundString, asBoundCopy, useBoundCopy, InterpolatedTextView, txt, oneLineDir, txtRaw, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, MediaFieldNode, WorkerSubtreeNode, RichContentNode, substituteItemDeep, resolveItemDeep2, resolveRowAction2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, withRootStyle, InScreenMorphHost, ReactiveDirectScalars, resolveNodeBoundTransforms, HiddenGate, ScrollPastGate, ExitPresence, StatefulSectionNode, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOCOMPLETE_TOKENS, AUTOGROW_CEILING, EditableField, MENU_ANCHOR_CONTROL, MenuNode, MENU_LONG_PRESS_MS, menuOpensOnLongPress, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfDocumentCanvas, PdfViewNode, WebViewNode, InteractivePicker, InteractiveDatePicker, InteractiveSearchField, InteractiveStepper, NODE_EXTRAS_TARGET, SYNTHETIC_TAP_ROLE, SYNTHETIC_TABINDEX, INFERRED_DECORATIVE, SELF_RENDERED_LEAF, ROLE_WHEN_NAMED, AUTHORED_ROLE, PENDING_RANGE, RANGE_ROLES, NODE_A11Y_ATTRS, INTERACTIVE_ROLES, ALWAYS_INTERACTIVE_COMPONENT_TYPES, TAP_ACTIVATOR_ATTR, TAP_GROUP_ATTR, NESTED_CONTROL_SELECTOR, VISUALLY_HIDDEN, NAME_SKIP_SELECTOR, activatorNameObservers, ACTIVATOR_STATE_ATTRS, controlNode, ToggleNode, SliderNode, SelectionControlNode, TabsNode, SegmentedControlNode, DisclosureGroupNode, GridNode, SplitViewNode, REVEAL_RELEASE_MS, REVEAL_FADE_MS, REVEAL_BUFFER, revealProgress, countWords, RevealText, TextNode, ImageNode, ANIMATION_LEAF, LottieNode, RiveNode, AvatarNode, IconNode, EMPTY_STATE_SPACING, EmptyStateNode, ERROR_STATE_VARIANTS, ERROR_STATE_SPACING, ErrorStateNode, ButtonNode, OtpInputNode, ProgressBarNode, SnackbarNode, ACTIVITY_DEFAULT_NAME, ACTIVITY_RING_ARC, ActivityIndicatorNode, NATIVELY_TABBABLE, BottomSheetNode, BOTTOM_DRAWER_HOST_STACK_EVENT, ModalBottomSheetNode, BottomDrawerNode, PRESENTED_OVERLAY_ATTR, TooltipNode, PopoverNode, ChipsInputNode, ChipNode, TableNode, GaugeRing, GaugeNode, RATING_METRICS, ratingMetrics, RatingNode, AVATAR_RING_INSET, AVATAR_BORDER_INSET, AvatarStripNode, CHART_STROKE_CYCLE, chartStrokeAt, chartBarCenter, ChartNode, donutSliceOpacity, DonutChartNode, QrCodeNode, ShapeNode, LegendMarker, LegendNode, cellAlign, dataTableProbe, DataTableNode, voiceNoteState, voiceNoteDelivery, VOICE_NOTE_DEFAULT_BARS, clampBarCount, VoiceNoteNode, LiveWaveformNode, PageControlNode, TimelineNode, ECHO_WINDOW_MS, heldPageIndex, LiveWindowMeasured, LiveWindowPage, PagingNode, WheelPickerNode, ColorPickerNode, FilterChipsNode, TILE_PX, MAX_MERCATOR_LAT, DEFAULT_TILE_MAX_ZOOM, CIRCLE_SEGMENTS, METRES_PER_DEG_LAT, MARKER_HIT_RADIUS, SHAPE_HIT_RADIUS, MapNode, CAROUSEL_SETTLE_MS, railScrollLeft, carouselScrollLeft, scrollCarouselTo, carouselDotsDrawn, CarouselNode, BannerNode, CollapsingHeaderNode, UnsupportedOnSurface, ptrCopy, CALENDAR_DATE_ONLY_RE, CAL_DEFAULT_MAX_DOTS, CAL_AGENDA_INITIAL_DAYS, CAL_AGENDA_PAGE_DAYS, CAL_DEFAULT_SNAP_MINUTES, CAL_UNASSIGNED_LANE_ID, MonthCalendarNode, TimeGridNode, AgendaNode, ARIA_ROLE, initialFocusScheduled, PRESENTED_SCOPE, focusRoots, A11yHintDescription, rowRenderers, railRowFrame, renderRailRow, RowAnchors, reportedUnknownComponents, UnknownComponentNode, WebRenderer, ScrollIntoViewNode;
|
|
142030
|
+
var MOTION_WRAPPER_ATTRS, AppearanceActionContext, rowValue, loadPdfFetch, WebViewBridgeHost2, useIsomorphicLayoutEffect3, GridColumnsContext, GridBoundList, GRID_SPAN_ALL, ResponsiveGrid, MasonryCells, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, appearKeyframesInjected, valueSwapKeyframesInjected, NUMERIC_TEXT, shimmerKeyframesInjected, APPEAR_KEYFRAMES, linkedEntranceKeyframesInjected, pressStylesInjected, REVEAL_ON_FOCUS_ATTR, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, ENTER_KEYFRAMES, ENTRANCE_KEYFRAMES_CSS, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, AMBIENT_HOST_STYLE, AmbientMotionBox, vectorAnimStylesInjected, scrollProgressRuntimeInjected, scrollLinkedRuntime, confettiRuntimeInjected, lottieRuntimeInjected, lottieAssetHeaders, LOTTIE_RUNTIME_ATTRIBUTES, lottieAnims, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, fillsZLayer, presentsFromOwnSurface, zLayerIndex, ZFILL_CSS, zFillStylesInjected, hAlignItems, bodyFont, kids2, columnKids, PLACED_TYPES, unplaced, columnPlaceStyle, rowKidCtx, rowKids, staggeredKids, asTextL10n, asFinalTextL10n, asBoundText, useBoundString, asBoundCopy, useBoundCopy, InterpolatedTextView, txt, oneLineDir, txtRaw, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, MediaFieldNode, WorkerSubtreeNode, RichContentNode, substituteItemDeep, resolveItemDeep2, resolveRowAction2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, withRootStyle, InScreenMorphHost, ReactiveDirectScalars, resolveNodeBoundTransforms, HiddenGate, ScrollPastGate, ExitPresence, StatefulSectionNode, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOCOMPLETE_TOKENS, AUTOGROW_CEILING, EditableField, MENU_ANCHOR_CONTROL, MenuNode, MENU_LONG_PRESS_MS, menuOpensOnLongPress, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfDocumentCanvas, PdfViewNode, WebViewNode, InteractivePicker, InteractiveDatePicker, InteractiveSearchField, InteractiveStepper, NODE_EXTRAS_TARGET, SYNTHETIC_TAP_ROLE, SYNTHETIC_TABINDEX, INFERRED_DECORATIVE, SELF_RENDERED_LEAF, ROLE_WHEN_NAMED, AUTHORED_ROLE, PENDING_RANGE, RANGE_ROLES, NODE_A11Y_ATTRS, INTERACTIVE_ROLES, ALWAYS_INTERACTIVE_COMPONENT_TYPES, TAP_ACTIVATOR_ATTR, TAP_GROUP_ATTR, NESTED_CONTROL_SELECTOR, VISUALLY_HIDDEN, NAME_SKIP_SELECTOR, activatorNameObservers, ACTIVATOR_STATE_ATTRS, controlNode, ToggleNode, SliderNode, SelectionControlNode, TabsNode, SegmentedControlNode, DisclosureGroupNode, GridNode, SplitViewNode, REVEAL_RELEASE_MS, REVEAL_FADE_MS, REVEAL_BUFFER, revealProgress, countWords, RevealText, TextNode, ImageNode, ANIMATION_LEAF, LottieNode, RiveNode, AvatarNode, IconNode, EMPTY_STATE_SPACING, EmptyStateNode, ERROR_STATE_VARIANTS, ERROR_STATE_SPACING, ErrorStateNode, ButtonNode, OtpInputNode, ProgressBarNode, SnackbarNode, ACTIVITY_DEFAULT_NAME, ACTIVITY_RING_ARC, ActivityIndicatorNode, NATIVELY_TABBABLE, BottomSheetNode, BOTTOM_DRAWER_HOST_STACK_EVENT, ModalBottomSheetNode, BottomDrawerNode, PRESENTED_OVERLAY_ATTR, TooltipNode, PopoverNode, ChipsInputNode, ChipNode, TableNode, GaugeRing, GaugeNode, RATING_METRICS, ratingMetrics, RatingNode, AVATAR_RING_INSET, AVATAR_BORDER_INSET, AvatarStripNode, CHART_STROKE_CYCLE, chartStrokeAt, chartBarCenter, ChartNode, donutSliceOpacity, DonutChartNode, QrCodeNode, ShapeNode, LegendMarker, LegendNode, cellAlign, dataTableProbe, DataTableNode, voiceNoteState, voiceNoteDelivery, VOICE_NOTE_DEFAULT_BARS, clampBarCount, VoiceNoteNode, LiveWaveformNode, PageControlNode, TimelineNode, ECHO_WINDOW_MS, heldPageIndex, LiveWindowMeasured, LiveWindowPage, PagingNode, WheelPickerNode, ColorPickerNode, FilterChipsNode, TILE_PX, MAX_MERCATOR_LAT, DEFAULT_TILE_MAX_ZOOM, CIRCLE_SEGMENTS, METRES_PER_DEG_LAT, MARKER_HIT_RADIUS, SHAPE_HIT_RADIUS, MapNode, CAROUSEL_SETTLE_MS, railScrollLeft, carouselScrollLeft, scrollCarouselTo, carouselDotsDrawn, CarouselNode, BannerNode, CollapsingHeaderNode, UnsupportedOnSurface, ptrCopy, CALENDAR_DATE_ONLY_RE, CAL_DEFAULT_MAX_DOTS, CAL_AGENDA_INITIAL_DAYS, CAL_AGENDA_PAGE_DAYS, CAL_DEFAULT_SNAP_MINUTES, CAL_UNASSIGNED_LANE_ID, MonthCalendarNode, TimeGridNode, AgendaNode, ARIA_ROLE, initialFocusScheduled, PRESENTED_SCOPE, focusRoots, A11yHintDescription, rowRenderers, railRowFrame, renderRailRow, RowAnchors, AD_BANNER_PACKAGE, AD_BANNER_TYPE, reportedUnknownComponents, UnknownComponentNode, WebRenderer, ScrollIntoViewNode;
|
|
141887
142031
|
var init_renderNode = __esm({
|
|
141888
142032
|
"../../core/web-renderer/src/renderNode.tsx"() {
|
|
141889
142033
|
"use strict";
|
|
@@ -149118,6 +149262,8 @@ var init_renderNode = __esm({
|
|
|
149118
149262
|
}, [jump, rows]);
|
|
149119
149263
|
return /* @__PURE__ */ jsx16("div", { ref: rootRef, "data-himalaya-row-anchors": "", style: { display: "contents" }, children: /* @__PURE__ */ jsx16(RevealRowContext.Provider, { value: target, children: children2 }) });
|
|
149120
149264
|
};
|
|
149265
|
+
AD_BANNER_PACKAGE = "himi_ads";
|
|
149266
|
+
AD_BANNER_TYPE = "AdBanner";
|
|
149121
149267
|
reportedUnknownComponents = /* @__PURE__ */ new Set();
|
|
149122
149268
|
UnknownComponentNode = ({ pkg, type: type2, props: props2, ctx, wrap, ...extras }) => {
|
|
149123
149269
|
const hasTelemetry = !!ctx.emitTelemetry;
|
|
@@ -176623,39 +176769,6 @@ var init_net_guard = __esm({
|
|
|
176623
176769
|
}
|
|
176624
176770
|
});
|
|
176625
176771
|
|
|
176626
|
-
// ../../core/serve-control/src/dist-release-contract.ts
|
|
176627
|
-
function isSafeFreeText(text32) {
|
|
176628
|
-
return !FREE_TEXT_UNSAFE.test(text32) && text32.length <= FREE_TEXT_MAX;
|
|
176629
|
-
}
|
|
176630
|
-
function base44RecordOwnsTenant(record6, origin, appId3) {
|
|
176631
|
-
const tenant = base44TenantOrigin(origin);
|
|
176632
|
-
if (!tenant || !record6 || typeof record6 !== "object") return false;
|
|
176633
|
-
const { id, slug } = record6;
|
|
176634
|
-
const label4 = new URL(tenant).hostname.slice(0, -".base44.app".length);
|
|
176635
|
-
return typeof id === "string" && id === appId3 && typeof slug === "string" && slug.toLowerCase() === label4;
|
|
176636
|
-
}
|
|
176637
|
-
function base44TenantOrigin(value2) {
|
|
176638
|
-
const origin = bakeableHttpsOrigin(value2);
|
|
176639
|
-
if (!origin) return void 0;
|
|
176640
|
-
const u2 = new URL(origin);
|
|
176641
|
-
return u2.port === "" && BASE44_TENANT_HOST.test(u2.hostname) ? origin : void 0;
|
|
176642
|
-
}
|
|
176643
|
-
var FREE_TEXT_UNSAFE, FREE_TEXT_MAX, BASE44_APP_RECORD_URL, BASE44_RECORD_MAX_BYTES, BASE44_TENANT_HOST;
|
|
176644
|
-
var init_dist_release_contract = __esm({
|
|
176645
|
-
"../../core/serve-control/src/dist-release-contract.ts"() {
|
|
176646
|
-
init_define_HHP_CATALOG();
|
|
176647
|
-
init_bake_safe();
|
|
176648
|
-
init_binding_spellings();
|
|
176649
|
-
init_site_contract_fields();
|
|
176650
|
-
init_site_shell();
|
|
176651
|
-
FREE_TEXT_UNSAFE = /[\u0000-\u001f\u007f-\u009f\u2028\u2029$`{}<>\\]/;
|
|
176652
|
-
FREE_TEXT_MAX = 200;
|
|
176653
|
-
BASE44_APP_RECORD_URL = (appId3) => `https://base44.app/api/apps/public/login-info/by-id/${encodeURIComponent(appId3)}`;
|
|
176654
|
-
BASE44_RECORD_MAX_BYTES = 256e3;
|
|
176655
|
-
BASE44_TENANT_HOST = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.base44\.app$/;
|
|
176656
|
-
}
|
|
176657
|
-
});
|
|
176658
|
-
|
|
176659
176772
|
// src/from-url/spec.ts
|
|
176660
176773
|
var spec_exports = {};
|
|
176661
176774
|
__export(spec_exports, {
|
|
@@ -265758,53 +265871,53 @@ var init_preview_assets_generated = __esm({
|
|
|
265758
265871
|
init_define_HHP_CATALOG();
|
|
265759
265872
|
init_preview_assets_format();
|
|
265760
265873
|
PREVIEW_ASSET_MANIFEST = [
|
|
265761
|
-
{ key: "assets/DashboardHost-
|
|
265762
|
-
{ key: "assets/DevDrawer-
|
|
265763
|
-
{ key: "assets/IdiomCompare-
|
|
265764
|
-
{ key: "assets/LightboxViewer-
|
|
265765
|
-
{ key: "assets/OfflineReadingBar-
|
|
265766
|
-
{ key: "assets/PhonePreviewControl-
|
|
265767
|
-
{ key: "assets/SchemeCompare-
|
|
265768
|
-
{ key: "assets/TopBarSearchStates-
|
|
265769
|
-
{ key: "assets/WixFrogTelemetrySink-
|
|
265874
|
+
{ key: "assets/DashboardHost-CpxpNsAZ.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2985, sha256: "2191fba5809d5048f72f96bba0d55c560cd6b0fda4efbfe3372237a2a44cb498" },
|
|
265875
|
+
{ key: "assets/DevDrawer-C9gpptnH.js", contentType: "application/javascript; charset=utf-8", offset: 2993, length: 16783, sha256: "84485a88eb70ecf6283c760f6d398b6253e977387e91c724f87b1ae8a7252441" },
|
|
265876
|
+
{ key: "assets/IdiomCompare-fj2MIhjh.js", contentType: "application/javascript; charset=utf-8", offset: 19776, length: 1926, sha256: "2e7477a938541f08cf3cfd8c17d61d8bb57faa71025cde538c123f39125b7504" },
|
|
265877
|
+
{ key: "assets/LightboxViewer-CxPHdzeq.js", contentType: "application/javascript; charset=utf-8", offset: 21702, length: 15965, sha256: "fc9f9696f37b98957c00fcad310512230d63cae63052c0dbfd7af6319dc03dd6" },
|
|
265878
|
+
{ key: "assets/OfflineReadingBar-CkBkNWmt.js", contentType: "application/javascript; charset=utf-8", offset: 37667, length: 1761, sha256: "fd798f4a8d931bef5cc121c732ae7f266bff085c28b556f1d1bf867f6dfea5bb" },
|
|
265879
|
+
{ key: "assets/PhonePreviewControl-DvZ_2U4L.js", contentType: "application/javascript; charset=utf-8", offset: 39428, length: 37851, sha256: "4b36d246632422391a628feaf2143789670633ca399369b9abecf93096d44c30" },
|
|
265880
|
+
{ key: "assets/SchemeCompare-kdPdVLRl.js", contentType: "application/javascript; charset=utf-8", offset: 77279, length: 1858, sha256: "e8618c06b5449d07e4497cbdcc8acadbd8fa502c9b41ac6487e884f3f601d494" },
|
|
265881
|
+
{ key: "assets/TopBarSearchStates-D54tCuJg.js", contentType: "application/javascript; charset=utf-8", offset: 79137, length: 4068, sha256: "ee94084f9bfc2f36fb05145254445b24996f898b863a6b3135950b27847f41b7" },
|
|
265882
|
+
{ key: "assets/WixFrogTelemetrySink-DyVpm0g_.js", contentType: "application/javascript; charset=utf-8", offset: 83205, length: 3515, sha256: "da2927c255f747ee6ee04806cd5da9c57f81fcb4293bfd3fbfef521980fc16d7" },
|
|
265770
265883
|
{ key: "assets/calendar-ics-BvfIYWjG.js", contentType: "application/javascript; charset=utf-8", offset: 86720, length: 2192, sha256: "1636167041e9829ceccd3544297b86b8475c38bd2f759c4dbc17c813dc6e9254" },
|
|
265771
265884
|
{ key: "assets/catalog-B4UJpy5D.js", contentType: "application/javascript; charset=utf-8", offset: 88912, length: 35626, sha256: "90111ffcf2d13eff399836acafd1f2b387859440a29dcd4a0afd8370915992cb" },
|
|
265772
|
-
{ key: "assets/catalogFontFaces-
|
|
265885
|
+
{ key: "assets/catalogFontFaces-BC_E84_V.js", contentType: "application/javascript; charset=utf-8", offset: 124538, length: 1111, sha256: "37c38fd7a3914eb94f8489e07a2727d9cc8f7671ff95103362ef18d85aa5945f" },
|
|
265773
265886
|
{ key: "assets/contacts-vcard-BcohPQ0m.js", contentType: "application/javascript; charset=utf-8", offset: 125649, length: 2567, sha256: "c4ff75e96cd909bbb9182c5dc78794fcebc65139fbddef2537711d774fb33ad0" },
|
|
265774
|
-
{ key: "assets/files-transfer-
|
|
265887
|
+
{ key: "assets/files-transfer-POZ_lle9.js", contentType: "application/javascript; charset=utf-8", offset: 128216, length: 6446, sha256: "8bea6918f5d80b20e3fc0ed27e0e325d4384dc4bcd9e9e8b69e98a9561fd81ef" },
|
|
265775
265888
|
{ key: "assets/frogActionMap-CTMe3Bz1.js", contentType: "application/javascript; charset=utf-8", offset: 134662, length: 1172, sha256: "9f1ce4c70a680dfb902949e1f482c7e47500b69c3350cd091b1b51d674032d53" },
|
|
265776
|
-
{ key: "assets/frogApiRules-
|
|
265889
|
+
{ key: "assets/frogApiRules-Bwhfke7x.js", contentType: "application/javascript; charset=utf-8", offset: 135834, length: 2207, sha256: "c4dc01d01fca9139a25e781b163e048adf1eb957c7bf0fd0f03ed1d5908890e3" },
|
|
265777
265890
|
{ key: "assets/frogScreenMap-S_IRnz20.js", contentType: "application/javascript; charset=utf-8", offset: 138041, length: 1067, sha256: "22b2f71e1b06df8f1e79b890d47fe42e983d37865c2cc9be753e4121764c91e1" },
|
|
265778
265891
|
{ key: "assets/glassPreviewBrowser-OVmIRgHt.js", contentType: "application/javascript; charset=utf-8", offset: 139108, length: 6800, sha256: "3671697a4f66a1f5f68610fab57d590630be70be934f59675ef1bda9a96e6fe3" },
|
|
265779
265892
|
{ key: "assets/image-preparation-Cj4gldm6.js", contentType: "application/javascript; charset=utf-8", offset: 145908, length: 2704, sha256: "32944ea587c2f3b84389b66b50a850437560238f1c8d33b6275973ee04eee865" },
|
|
265780
|
-
{ key: "assets/index-
|
|
265781
|
-
{ key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
265782
|
-
{ key: "assets/on-device-ml-D5QGvW8P.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
265783
|
-
{ key: "assets/pdf-
|
|
265784
|
-
{ key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
265785
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset:
|
|
265786
|
-
{ key: "assets/pdfDocument-
|
|
265787
|
-
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
265788
|
-
{ key: "assets/scrollLinkedRuntime-
|
|
265789
|
-
{ key: "assets/webviewBridgeHost-
|
|
265790
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
265791
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
265792
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
265793
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
265794
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
265795
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
265796
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
265797
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
265798
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
265799
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
265800
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
265801
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
265802
|
-
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
265803
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
265804
|
-
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset:
|
|
265805
|
-
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset:
|
|
265806
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
265807
|
-
{ key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
265893
|
+
{ key: "assets/index-BY6XtMfk.js", contentType: "application/javascript; charset=utf-8", offset: 148612, length: 1728555, sha256: "e52fb0cd005de170a68b62b7f41b7d64fe8811d99365a69dcfbb9260f38bc98f" },
|
|
265894
|
+
{ key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset: 1877167, length: 7751, sha256: "42a78b508d0f309f6a4a6efbb8669015211b3c26574c5b0929884c4d9d20b806" },
|
|
265895
|
+
{ key: "assets/on-device-ml-D5QGvW8P.js", contentType: "application/javascript; charset=utf-8", offset: 1884918, length: 10531, sha256: "914ea54d973624e7bc82d1847444f26084ac16d69be3051b4b5938b1e35beced" },
|
|
265896
|
+
{ key: "assets/pdf-BPtDeeCf.js", contentType: "application/javascript; charset=utf-8", offset: 1895449, length: 488215, sha256: "3c8ce407707a87e172345007371329f9c47e65e182a1e2ff617b7f75e6bb95ab" },
|
|
265897
|
+
{ key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset: 2383664, length: 90, sha256: "521a0e528916d678d7588b2cddf3dadd3bb959a6d62426382f61c77a82017e35" },
|
|
265898
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 2383754, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
265899
|
+
{ key: "assets/pdfDocument-DpUMCkGZ.js", contentType: "application/javascript; charset=utf-8", offset: 3700788, length: 3836, sha256: "b8ca9997e600e32113db133935de245c0e4d261a06bccf1953b089abd7258204" },
|
|
265900
|
+
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3704624, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
|
|
265901
|
+
{ key: "assets/scrollLinkedRuntime-auD4CUPW.js", contentType: "application/javascript; charset=utf-8", offset: 3706890, length: 2278, sha256: "10bced6d9d3342a497e26f3a9722918079e0d1ecf115fd690e3434a3cf31a4ca" },
|
|
265902
|
+
{ key: "assets/webviewBridgeHost-CdyIY1b_.js", contentType: "application/javascript; charset=utf-8", offset: 3709168, length: 9890, sha256: "527957646ee45ed774ce1453b7a6e51dc8e24f1ef56d6fc775bb26b3dd723430" },
|
|
265903
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3719058, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
265904
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3723668, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
265905
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 4212252, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
265906
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 4303176, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
265907
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 4394160, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
265908
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4485140, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
265909
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4576012, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
265910
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4666992, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
265911
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4775628, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
265912
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4884712, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
265913
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4993760, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
265914
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 5101460, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
265915
|
+
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 5189568, length: 6818, sha256: "835250c3d8004f27c2b67f9b471984351ba6df07b916d97e33b43c691200a18c" },
|
|
265916
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 5196386, length: 4924, sha256: "5e3cffd608be93af8a867a830d501f4be0ca484f91dd3f9ecad77097751e0dce" },
|
|
265917
|
+
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 5201310, length: 15585, sha256: "98ec60ef8f9568532f0746d1092b5c76f1c52d718365c586c8bade8f62c7c5eb" },
|
|
265918
|
+
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 5216895, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
|
|
265919
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 5218066, length: 24303, sha256: "7ee3dbacf4e6da69c1c7085a2423e33e2adaec933cd897fb2ee2391e3277c3ae" },
|
|
265920
|
+
{ key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset: 5242369, length: 24320, sha256: "d24f399a1fcfa7f696a0d96aadbc983d2624b45712dae9a15545f6914dbb9506" }
|
|
265808
265921
|
];
|
|
265809
265922
|
}
|
|
265810
265923
|
});
|
|
@@ -274848,7 +274961,7 @@ function scannableUrl(rec) {
|
|
|
274848
274961
|
return rec.platform === "ios" ? a3.installPageUrl ?? a3.downloadUrl : a3.downloadUrl ?? a3.installPageUrl;
|
|
274849
274962
|
}
|
|
274850
274963
|
function isInternalOnlyBuild(r3) {
|
|
274851
|
-
return r3.wixStaff === true || r3.androidBuildType === "debug" || r3.androidSigning === "oneapp-debug" || !!r3.borrowedIosBundleId;
|
|
274964
|
+
return r3.wixStaff === true || r3.androidBuildType === "debug" || r3.androidSigning === "oneapp-debug" || !!r3.borrowedIosBundleId || !!r3.testBuild;
|
|
274852
274965
|
}
|
|
274853
274966
|
function isAppStoreBuild(r3) {
|
|
274854
274967
|
return !!r3.appStoreBuild || !!r3.customerAppStore || !!r3.testflight;
|
|
@@ -287521,7 +287634,8 @@ var init_spaces_host_manifest = __esm({
|
|
|
287521
287634
|
"web": []
|
|
287522
287635
|
},
|
|
287523
287636
|
"nativeComponents": [
|
|
287524
|
-
"himi_spaces_lite.HimiSpacesLiteCard"
|
|
287637
|
+
"himi_spaces_lite.HimiSpacesLiteCard",
|
|
287638
|
+
"himi_ads.AdBanner"
|
|
287525
287639
|
],
|
|
287526
287640
|
"authProviders": [
|
|
287527
287641
|
"wix-consumer",
|