@wix/himalaya-cli 0.1457.0 → 0.1459.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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const WIX_API = "https://www.wixapis.com";
|
|
1
2
|
/** The narrow Wix consumer endpoints allowed to receive credentials for SSE. */
|
|
2
3
|
export declare function isAllowedConsumerStreamTarget(raw: string): boolean;
|
|
3
4
|
/** Classify an absolute-URL rejection: an off-gateway Wix account host is a
|
package/dist/cli.mjs
CHANGED
|
@@ -1059,8 +1059,8 @@ function toBase64(bytes2) {
|
|
|
1059
1059
|
function utf8Decode(bytes2) {
|
|
1060
1060
|
return new TextDecoder("utf-8").decode(bytes2);
|
|
1061
1061
|
}
|
|
1062
|
-
function fromBase64Url(
|
|
1063
|
-
const std =
|
|
1062
|
+
function fromBase64Url(b64url4) {
|
|
1063
|
+
const std = b64url4.replace(/-/g, "+").replace(/_/g, "/");
|
|
1064
1064
|
return fromBase64(std + "=".repeat((4 - std.length % 4) % 4));
|
|
1065
1065
|
}
|
|
1066
1066
|
function toBase64Url(bytes2) {
|
|
@@ -8115,6 +8115,7 @@ function resolveTranslation(value, catalog3, sourceCatalog) {
|
|
|
8115
8115
|
var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
|
|
8116
8116
|
var init_bindings = __esm({
|
|
8117
8117
|
"../../core/ts/src/bindings.ts"() {
|
|
8118
|
+
"use strict";
|
|
8118
8119
|
BINDING_SIGILS = ["service", "flag", "item", "t"];
|
|
8119
8120
|
BINDING_SIGIL_RE = new RegExp(
|
|
8120
8121
|
`^\\$(?:${BINDING_SIGILS.filter((s2) => s2 !== "t").join("|")})\\b|^\\$t:`
|
|
@@ -160095,6 +160096,122 @@ var init_pinned_read = __esm({
|
|
|
160095
160096
|
}
|
|
160096
160097
|
});
|
|
160097
160098
|
|
|
160099
|
+
// ../../core/serve-runtime/src/member-exchange.ts
|
|
160100
|
+
function hopAllowed(url, firstHost) {
|
|
160101
|
+
if (url.protocol !== "https:" || url.port !== "" && url.port !== "443" || url.username || url.password) return false;
|
|
160102
|
+
const host = url.hostname.toLowerCase();
|
|
160103
|
+
return host === firstHost || host === "wix.com" || host.endsWith(".wix.com") || host.endsWith(".wixsite.com") || host === "wixapis.com" || host.endsWith(".wixapis.com");
|
|
160104
|
+
}
|
|
160105
|
+
async function exchangeMemberSession(input, fetchImpl = fetch, random = randomBytes6, now = Date.now, redirectUri = REGISTERED_REDIRECT_URI) {
|
|
160106
|
+
const { clientId, sessionToken } = input;
|
|
160107
|
+
if (typeof sessionToken !== "string" || !sessionToken || sessionToken.length > MAX_SESSION_TOKEN_LENGTH) {
|
|
160108
|
+
return { ok: false, code: "bad_request" };
|
|
160109
|
+
}
|
|
160110
|
+
const call = async (url2, init) => {
|
|
160111
|
+
try {
|
|
160112
|
+
return await fetchImpl(url2, { ...init, signal: AbortSignal.timeout(STEP_TIMEOUT_MS) });
|
|
160113
|
+
} catch {
|
|
160114
|
+
return null;
|
|
160115
|
+
}
|
|
160116
|
+
};
|
|
160117
|
+
const json8 = async (res) => {
|
|
160118
|
+
try {
|
|
160119
|
+
const v2 = await res.json();
|
|
160120
|
+
return v2 && typeof v2 === "object" ? v2 : {};
|
|
160121
|
+
} catch {
|
|
160122
|
+
return {};
|
|
160123
|
+
}
|
|
160124
|
+
};
|
|
160125
|
+
let visitor;
|
|
160126
|
+
try {
|
|
160127
|
+
visitor = await mintAnonymousVisitor(clientId, (u2, i2) => call(String(u2), i2 ?? {}).then((r2) => {
|
|
160128
|
+
if (!r2) throw new Error("unreachable");
|
|
160129
|
+
return r2;
|
|
160130
|
+
}));
|
|
160131
|
+
} catch (e2) {
|
|
160132
|
+
return { ok: false, code: e2?.message === "unreachable" ? "unreachable" : "visitor_token_failed" };
|
|
160133
|
+
}
|
|
160134
|
+
const verifier = b64url2(random(32));
|
|
160135
|
+
const challenge = b64url2(sha256(verifier));
|
|
160136
|
+
const state = b64url2(random(8));
|
|
160137
|
+
const rsRes = await call(`${WIX_API}/_api/redirects-api/v1/redirect-session`, {
|
|
160138
|
+
method: "POST",
|
|
160139
|
+
headers: { "Content-Type": "application/json", Authorization: `Bearer ${visitor}` },
|
|
160140
|
+
body: JSON.stringify({ auth: { authRequest: {
|
|
160141
|
+
clientId,
|
|
160142
|
+
responseType: "code",
|
|
160143
|
+
responseMode: "fragment",
|
|
160144
|
+
redirectUri,
|
|
160145
|
+
scope: "offline_access",
|
|
160146
|
+
state,
|
|
160147
|
+
nonce: state,
|
|
160148
|
+
codeChallenge: challenge,
|
|
160149
|
+
codeChallengeMethod: "S256",
|
|
160150
|
+
sessionToken
|
|
160151
|
+
}, prompt: "none" } })
|
|
160152
|
+
});
|
|
160153
|
+
if (!rsRes) return { ok: false, code: "unreachable" };
|
|
160154
|
+
const rs2 = await json8(rsRes);
|
|
160155
|
+
const fullUrl = rs2.redirectSession?.fullUrl;
|
|
160156
|
+
if (!rsRes.ok || typeof fullUrl !== "string") return { ok: false, code: "redirect_session_failed", status: rsRes.status };
|
|
160157
|
+
let url;
|
|
160158
|
+
try {
|
|
160159
|
+
url = new URL(fullUrl);
|
|
160160
|
+
} catch {
|
|
160161
|
+
return { ok: false, code: "redirect_session_failed", status: rsRes.status };
|
|
160162
|
+
}
|
|
160163
|
+
const firstHost = url.hostname.toLowerCase();
|
|
160164
|
+
let code;
|
|
160165
|
+
let lastStatus;
|
|
160166
|
+
for (let hop = 0; hop < MAX_HOPS; hop++) {
|
|
160167
|
+
if (!hopAllowed(url, firstHost)) return { ok: false, code: "authorize_host_refused" };
|
|
160168
|
+
const res = await call(url.toString(), { method: "GET", redirect: "manual", headers: { "User-Agent": "Mozilla/5.0" } });
|
|
160169
|
+
if (!res) return { ok: false, code: "unreachable" };
|
|
160170
|
+
lastStatus = res.status;
|
|
160171
|
+
const location = res.headers.get("location");
|
|
160172
|
+
if (!location) return { ok: false, code: res.status >= 400 ? "authorize_refused" : "authorize_no_code", status: res.status };
|
|
160173
|
+
if (location.startsWith(redirectUri)) {
|
|
160174
|
+
const params = new URLSearchParams(location.slice(redirectUri.length).replace(/^[?#]/, ""));
|
|
160175
|
+
if (params.get("state") !== state) return { ok: false, code: "authorize_state_mismatch" };
|
|
160176
|
+
code = params.get("code") ?? void 0;
|
|
160177
|
+
break;
|
|
160178
|
+
}
|
|
160179
|
+
try {
|
|
160180
|
+
url = new URL(location, url);
|
|
160181
|
+
} catch {
|
|
160182
|
+
return { ok: false, code: "authorize_no_code", status: res.status };
|
|
160183
|
+
}
|
|
160184
|
+
}
|
|
160185
|
+
if (!code) return { ok: false, code: "authorize_no_code", ...lastStatus !== void 0 ? { status: lastStatus } : {} };
|
|
160186
|
+
const tokRes = await call(`${WIX_API}/oauth2/token`, {
|
|
160187
|
+
method: "POST",
|
|
160188
|
+
headers: { "Content-Type": "application/json" },
|
|
160189
|
+
body: JSON.stringify({ clientId, grantType: "authorization_code", code, codeVerifier: verifier, redirectUri })
|
|
160190
|
+
});
|
|
160191
|
+
if (!tokRes) return { ok: false, code: "unreachable" };
|
|
160192
|
+
const tok = await json8(tokRes);
|
|
160193
|
+
if (!tokRes.ok || typeof tok.access_token !== "string" || !tok.access_token) return { ok: false, code: "token_exchange_failed", status: tokRes.status };
|
|
160194
|
+
const expiresIn = typeof tok.expires_in === "number" ? tok.expires_in : Number(tok.expires_in);
|
|
160195
|
+
return { ok: true, accessToken: tok.access_token, expiresAt: now() + (Number.isFinite(expiresIn) && expiresIn > 0 ? expiresIn : 3600) * 1e3 };
|
|
160196
|
+
}
|
|
160197
|
+
var REGISTERED_REDIRECT_URI, MAX_HOPS, STEP_TIMEOUT_MS, MAX_SESSION_TOKEN_LENGTH, b64url2, randomBytes6;
|
|
160198
|
+
var init_member_exchange = __esm({
|
|
160199
|
+
"../../core/serve-runtime/src/member-exchange.ts"() {
|
|
160200
|
+
init_sha256();
|
|
160201
|
+
init_wix_bridge();
|
|
160202
|
+
REGISTERED_REDIRECT_URI = "himalaya-appsmith://oauth/callback";
|
|
160203
|
+
MAX_HOPS = 8;
|
|
160204
|
+
STEP_TIMEOUT_MS = 8e3;
|
|
160205
|
+
MAX_SESSION_TOKEN_LENGTH = 4096;
|
|
160206
|
+
b64url2 = (bytes2) => {
|
|
160207
|
+
let s2 = "";
|
|
160208
|
+
for (const b2 of bytes2) s2 += String.fromCharCode(b2);
|
|
160209
|
+
return btoa(s2).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
160210
|
+
};
|
|
160211
|
+
randomBytes6 = (n2) => globalThis.crypto.getRandomValues(new Uint8Array(n2));
|
|
160212
|
+
}
|
|
160213
|
+
});
|
|
160214
|
+
|
|
160098
160215
|
// ../../core/serve-runtime/package-share.ts
|
|
160099
160216
|
function parseStored(bytes2, id) {
|
|
160100
160217
|
if (!bytes2) return null;
|
|
@@ -160929,6 +161046,32 @@ ${releaseId}`;
|
|
|
160929
161046
|
}
|
|
160930
161047
|
return new Response(upstream.body, { status: upstream.status, headers: responseHeaders });
|
|
160931
161048
|
}
|
|
161049
|
+
if (request.method === "POST" && path2 === "/v1/__webwix/member-exchange") {
|
|
161050
|
+
const noStore = { "cache-control": "no-store" };
|
|
161051
|
+
if (opts.webwixBridge === false) return json5(503, { error: "webwix_bridge_disabled" }, noStore);
|
|
161052
|
+
if (!opts.previewTokenSecret) return json5(503, { error: "preview_token_unavailable" }, noStore);
|
|
161053
|
+
const exchangeApp = resolveApp(request, url);
|
|
161054
|
+
if (!exchangeApp) return json5(400, { error: "app_required" }, noStore);
|
|
161055
|
+
const exchangePin = resolvePin(request, url);
|
|
161056
|
+
if (!exchangePin || !resolvePreviewToken(request, url)) return json5(403, { error: "draft_preview_required" }, noStore);
|
|
161057
|
+
const exchangeCfg = await appConfigFor(request, url, exchangeApp);
|
|
161058
|
+
if (!exchangeCfg.ok) return exchangeCfg.response;
|
|
161059
|
+
if ((await manifest(exchangeApp))?.releaseId === exchangePin || await isRingRelease(exchangeApp, exchangePin)) {
|
|
161060
|
+
return json5(403, { error: "draft_preview_required" }, noStore);
|
|
161061
|
+
}
|
|
161062
|
+
const exchangeClient = wixClientIdOf(utf8Decode(exchangeCfg.bytes));
|
|
161063
|
+
if ("error" in exchangeClient) return json5(501, { error: `member_exchange_${exchangeClient.error}` }, noStore);
|
|
161064
|
+
let exchangeBody;
|
|
161065
|
+
try {
|
|
161066
|
+
exchangeBody = await request.json();
|
|
161067
|
+
} catch {
|
|
161068
|
+
return json5(400, { error: "bad_request" }, noStore);
|
|
161069
|
+
}
|
|
161070
|
+
if (!exchangeBody || typeof exchangeBody !== "object") return json5(400, { error: "bad_request" }, noStore);
|
|
161071
|
+
const exchanged = await exchangeMemberSession({ clientId: exchangeClient.clientId, sessionToken: exchangeBody.sessionToken }, webwixFetch);
|
|
161072
|
+
if (exchanged.ok) return json5(200, { accessToken: exchanged.accessToken, expiresAt: exchanged.expiresAt }, noStore);
|
|
161073
|
+
return json5(exchanged.code === "bad_request" ? 400 : 502, { error: exchanged.code, ...exchanged.status !== void 0 ? { status: exchanged.status } : {} }, noStore);
|
|
161074
|
+
}
|
|
160932
161075
|
if (request.method === "POST" && path2 === "/v1/__webwix/call") {
|
|
160933
161076
|
const served = { rung: "none" };
|
|
160934
161077
|
let status = 500;
|
|
@@ -161545,6 +161688,7 @@ var init_server2 = __esm({
|
|
|
161545
161688
|
init_base64();
|
|
161546
161689
|
init_contract();
|
|
161547
161690
|
init_pinned_read();
|
|
161691
|
+
init_member_exchange();
|
|
161548
161692
|
init_package_share();
|
|
161549
161693
|
init_wix_bridge();
|
|
161550
161694
|
init_account_rung();
|
|
@@ -162004,32 +162148,32 @@ var init_preview_assets_generated = __esm({
|
|
|
162004
162148
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
162005
162149
|
init_preview_assets_format();
|
|
162006
162150
|
PREVIEW_ASSET_MANIFEST = [
|
|
162007
|
-
{ key: "assets/DashboardHost-
|
|
162008
|
-
{ key: "assets/DevDrawer-
|
|
162009
|
-
{ key: "assets/IdiomCompare-
|
|
162010
|
-
{ key: "assets/LightboxViewer-
|
|
162011
|
-
{ key: "assets/PhonePreviewControl-
|
|
162012
|
-
{ key: "assets/SchemeCompare-
|
|
162013
|
-
{ key: "assets/index-
|
|
162014
|
-
{ key: "assets/pdf-
|
|
162015
|
-
{ key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
162016
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset:
|
|
162017
|
-
{ key: "assets/pdfDocument-
|
|
162018
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
162019
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
162020
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
162021
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
162022
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
162023
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
162024
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
162025
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
162026
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
162027
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
162028
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
162029
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
162030
|
-
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
162031
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
162032
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
162151
|
+
{ key: "assets/DashboardHost-C43Yf5i0.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2916, sha256: "ed853f04eb950f074bb4b910d5b54777a593265eb3e9b6b69865a534afb4e367" },
|
|
162152
|
+
{ key: "assets/DevDrawer-Dtpdyj6s.js", contentType: "application/javascript; charset=utf-8", offset: 2924, length: 16744, sha256: "bd3f6e0dc4d77df24edc6945bc3a9d8271db4bb87b6d5504dbeac0c979fe97cc" },
|
|
162153
|
+
{ key: "assets/IdiomCompare-Q0N9nyRz.js", contentType: "application/javascript; charset=utf-8", offset: 19668, length: 1892, sha256: "f8c8dd05dd97b368107937763ce0713a6fd2a1dd8fbb443184e05fa8177b678c" },
|
|
162154
|
+
{ key: "assets/LightboxViewer-DXQZfuRl.js", contentType: "application/javascript; charset=utf-8", offset: 21560, length: 8132, sha256: "3b864e63b7d1edb62ae343113b949596a7db90cb85a598a778ee0e29a7bede10" },
|
|
162155
|
+
{ key: "assets/PhonePreviewControl-DNUNrsXI.js", contentType: "application/javascript; charset=utf-8", offset: 29692, length: 37729, sha256: "de870adf633b1f1075bb27f0cb75b3526b6409fc246d8ed8166e02c466004034" },
|
|
162156
|
+
{ key: "assets/SchemeCompare-nZarcCIk.js", contentType: "application/javascript; charset=utf-8", offset: 67421, length: 1824, sha256: "5f668d6a07cc16c4ba72d5867cb73f947f82a88abcb74aaefb2096ded87ffe88" },
|
|
162157
|
+
{ key: "assets/index-CkZmNXjh.js", contentType: "application/javascript; charset=utf-8", offset: 69245, length: 1274560, sha256: "12bd2fba7aa7c1bb8b01ca5a2fe87ebf6a1f33651e5e86b031f9205677408aad" },
|
|
162158
|
+
{ key: "assets/pdf-CGOkyAKC.js", contentType: "application/javascript; charset=utf-8", offset: 1343805, length: 488199, sha256: "25e2f49761cb2b6ffc967924e0aeea1225f60db8c80404928a4f6c20061aa6a8" },
|
|
162159
|
+
{ key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset: 1832004, length: 73, sha256: "41bcfda4f3c8c0a81c785ea87c69afc8e7d0ed8c333324aee94c273d881bb6aa" },
|
|
162160
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 1832077, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
162161
|
+
{ key: "assets/pdfDocument-lG038l52.js", contentType: "application/javascript; charset=utf-8", offset: 3149111, length: 2868, sha256: "2e062ad5b358932919bccd5594ece75c4e98f1a634811123cf334d791884663a" },
|
|
162162
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3151979, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
162163
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3156589, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
162164
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3645173, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
162165
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3736097, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
162166
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3827081, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
162167
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3918061, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
162168
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4008933, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
162169
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4099913, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
162170
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4208549, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
162171
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4317633, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
162172
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4426681, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
162173
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4534381, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
162174
|
+
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 4622489, length: 6748, sha256: "4a92459977d7cefa1a6a7e020c3a63509737f083b3f2773557c1a5771665811a" },
|
|
162175
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 4629237, length: 4947, sha256: "8f83cd54a8228dc903c5530de84080a2aff80f9ad4b7223985eb9da54f3a5c71" },
|
|
162176
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4634184, length: 17786, sha256: "084107ca997628c248f1b0ba3a7494744850df39fad813546ab8bdb82a6058da" }
|
|
162033
162177
|
];
|
|
162034
162178
|
}
|
|
162035
162179
|
});
|
|
@@ -162597,14 +162741,14 @@ var init_embedded_bundles = __esm({
|
|
|
162597
162741
|
// ../store-release/register-bundle.ts
|
|
162598
162742
|
import { readFileSync as readFileSync88 } from "node:fs";
|
|
162599
162743
|
import { createPrivateKey as createPrivateKey4, sign as sign2 } from "node:crypto";
|
|
162600
|
-
function
|
|
162744
|
+
function b64url3(b2) {
|
|
162601
162745
|
return Buffer.from(b2).toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
162602
162746
|
}
|
|
162603
162747
|
function ascJwt(keyId, issuerId, p8, now) {
|
|
162604
|
-
const header =
|
|
162605
|
-
const payload =
|
|
162748
|
+
const header = b64url3(JSON.stringify({ alg: "ES256", kid: keyId, typ: "JWT" }));
|
|
162749
|
+
const payload = b64url3(JSON.stringify({ iss: issuerId, iat: now, exp: now + 1200, aud: "appstoreconnect-v1" }));
|
|
162606
162750
|
const key3 = createPrivateKey4(p8);
|
|
162607
|
-
const sig =
|
|
162751
|
+
const sig = b64url3(sign2("sha256", Buffer.from(`${header}.${payload}`), { key: key3, dsaEncoding: "ieee-p1363" }));
|
|
162608
162752
|
return `${header}.${payload}.${sig}`;
|
|
162609
162753
|
}
|
|
162610
162754
|
function bundleIdBody(identifier, name, platform = "IOS") {
|
|
@@ -167781,7 +167925,7 @@ var init_connector_token = __esm({
|
|
|
167781
167925
|
});
|
|
167782
167926
|
|
|
167783
167927
|
// ../../core/functions-secrets/src/vault.ts
|
|
167784
|
-
import { createCipheriv, createDecipheriv as createDecipheriv2, randomBytes as
|
|
167928
|
+
import { createCipheriv, createDecipheriv as createDecipheriv2, randomBytes as randomBytes7 } from "node:crypto";
|
|
167785
167929
|
import { mkdir, readFile as readFile2, rename, writeFile as writeFile2 } from "node:fs/promises";
|
|
167786
167930
|
import { dirname as dirname44 } from "node:path";
|
|
167787
167931
|
function createJsonSecretStore(filePath) {
|
|
@@ -167839,7 +167983,7 @@ function createSecretVault(options) {
|
|
|
167839
167983
|
environment: input.environment,
|
|
167840
167984
|
name: input.name,
|
|
167841
167985
|
version: input.version,
|
|
167842
|
-
iv:
|
|
167986
|
+
iv: randomBytes7(12).toString("base64url"),
|
|
167843
167987
|
ciphertext: "",
|
|
167844
167988
|
authTag: ""
|
|
167845
167989
|
};
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1459.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
|
|
6
6
|
"keywords": [
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"artifactId": "himalaya-cli"
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
-
"falconPackageHash": "
|
|
74
|
+
"falconPackageHash": "db96f8e1d9f3f0a55120ae97f89b4211fed249d7a3f98225dc9269b1"
|
|
75
75
|
}
|