@wix/himalaya-cli 0.1478.0 → 0.1479.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +12 -5
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -10053,7 +10053,6 @@ function webViewOriginAllowed(url, origins) {
|
|
|
10053
10053
|
}
|
|
10054
10054
|
var init_webview_origin = __esm({
|
|
10055
10055
|
"../../core/ts/src/webview-origin.ts"() {
|
|
10056
|
-
"use strict";
|
|
10057
10056
|
}
|
|
10058
10057
|
});
|
|
10059
10058
|
|
|
@@ -162376,16 +162375,24 @@ ${releaseId}`;
|
|
|
162376
162375
|
}
|
|
162377
162376
|
const exchangeClient = wixClientIdOf(utf8Decode(exchangeCfg.bytes));
|
|
162378
162377
|
if ("error" in exchangeClient) return json5(501, { error: `member_exchange_${exchangeClient.error}` }, noStore);
|
|
162378
|
+
let rawBody;
|
|
162379
|
+
try {
|
|
162380
|
+
rawBody = await request.text();
|
|
162381
|
+
} catch {
|
|
162382
|
+
return json5(400, { error: "body_unreadable" }, noStore);
|
|
162383
|
+
}
|
|
162384
|
+
if (!rawBody) return json5(400, { error: "empty_body" }, noStore);
|
|
162379
162385
|
let exchangeBody;
|
|
162380
162386
|
try {
|
|
162381
|
-
exchangeBody =
|
|
162387
|
+
exchangeBody = JSON.parse(rawBody);
|
|
162382
162388
|
} catch {
|
|
162383
|
-
return json5(400, { error: "
|
|
162389
|
+
return json5(400, { error: "invalid_json" }, noStore);
|
|
162384
162390
|
}
|
|
162385
|
-
if (!exchangeBody || typeof exchangeBody !== "object") return json5(400, { error: "
|
|
162391
|
+
if (!exchangeBody || typeof exchangeBody !== "object" || Array.isArray(exchangeBody)) return json5(400, { error: "invalid_body" }, noStore);
|
|
162386
162392
|
const exchanged = await exchangeMemberSession({ clientId: exchangeClient.clientId, sessionToken: exchangeBody.sessionToken }, webwixFetch);
|
|
162387
162393
|
if (exchanged.ok) return json5(200, { accessToken: exchanged.accessToken, expiresAt: exchanged.expiresAt }, noStore);
|
|
162388
|
-
|
|
162394
|
+
if (exchanged.code === "bad_request") return json5(400, { error: "invalid_session_token" }, noStore);
|
|
162395
|
+
return json5(502, { error: exchanged.code, ...exchanged.status !== void 0 ? { status: exchanged.status } : {} }, noStore);
|
|
162389
162396
|
}
|
|
162390
162397
|
if (request.method === "POST" && path2 === "/v1/__webwix/call") {
|
|
162391
162398
|
const served = { rung: "none" };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1479.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": "fb248ed127f089ebaa1bc984e5388a4732b97e826a7524a503aafbc1"
|
|
75
75
|
}
|