@wix/himalaya-cli 0.1531.0 → 0.1532.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 +7 -2
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -166661,12 +166661,13 @@ ${releaseId}`;
|
|
|
166661
166661
|
const corsHeaders = (request) => {
|
|
166662
166662
|
const origin = request.headers.get("origin");
|
|
166663
166663
|
if (!origin) return {};
|
|
166664
|
-
|
|
166664
|
+
const path2 = new URL(request.url).pathname;
|
|
166665
|
+
if (isCookieAuthorizedPath(path2)) return {};
|
|
166665
166666
|
return {
|
|
166666
166667
|
"access-control-allow-origin": origin,
|
|
166667
166668
|
vary: "Origin",
|
|
166668
166669
|
"access-control-allow-methods": "GET, HEAD, POST, PUT, DELETE, OPTIONS",
|
|
166669
|
-
"access-control-allow-headers": "Content-Type, If-None-Match, X-Himalaya-Schema-Versions, Accept-Language, X-Himalaya-Session, X-Himalaya-User, X-Himalaya-Platform, X-Himalaya-App-Version, X-Himalaya-App, X-Himalaya-Release, X-Himalaya-Release-Source, X-Himalaya-Preview-Token, X-Himalaya-Member-Session",
|
|
166670
|
+
"access-control-allow-headers": (path2 === "/v1/__webwix/member-exchange" ? "Authorization, " : "") + "Content-Type, If-None-Match, X-Himalaya-Schema-Versions, Accept-Language, X-Himalaya-Session, X-Himalaya-User, X-Himalaya-Platform, X-Himalaya-App-Version, X-Himalaya-App, X-Himalaya-Release, X-Himalaya-Release-Source, X-Himalaya-Preview-Token, X-Himalaya-Member-Session",
|
|
166670
166671
|
"access-control-expose-headers": "ETag, X-Himalaya-Bundle-Integrity, X-Himalaya-App",
|
|
166671
166672
|
"access-control-allow-credentials": "true"
|
|
166672
166673
|
};
|
|
@@ -166925,6 +166926,10 @@ ${releaseId}`;
|
|
|
166925
166926
|
const exchanged = await exchangeMemberSession({ clientId: exchangeClient.clientId, sessionToken }, webwixFetch);
|
|
166926
166927
|
if (exchanged.ok) return json5(200, { accessToken: exchanged.accessToken, expiresAt: exchanged.expiresAt }, noStore);
|
|
166927
166928
|
if (exchanged.code === "bad_request") return json5(400, { error: "invalid_session_token", received }, noStore);
|
|
166929
|
+
if (exchanged.code === "redirect_session_failed" && exchanged.status === 428 && opts.memberPreviewFallback) {
|
|
166930
|
+
const member = await opts.memberPreviewFallback(request, gate.app).catch(() => null);
|
|
166931
|
+
if (member) return json5(200, member, noStore);
|
|
166932
|
+
}
|
|
166928
166933
|
return json5(502, { error: exchanged.code, ...exchanged.status !== void 0 ? { status: exchanged.status } : {} }, noStore);
|
|
166929
166934
|
}
|
|
166930
166935
|
if (request.method === "POST" && path2 === "/v1/__webwix/member-forward") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1532.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": "3ccd0341aa7b889c614ab89ac1e188b032d61a2a169233290a66781a"
|
|
75
75
|
}
|