@wix/astro 1.0.32 → 1.0.34
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/package.json +8 -7
- package/src/index.ts +9 -0
- package/src/plugins/setupSsrContext.ts +3 -0
- package/src/routes/wix-apis/api.ts +31 -0
- package/tsup.config.mjs +3 -0
- package/build/index.d.ts +0 -9
- package/build/index.js +0 -17165
- package/build/index.js.map +0 -1
- package/build-browser-runtime/setup.d.ts +0 -5
- package/build-browser-runtime/setup.js +0 -849
- package/build-runtime/chunk-7EHL72JI.js +0 -1079
- package/build-runtime/chunk-EK7YZVWJ.js +0 -353
- package/build-runtime/chunk-HPW4ZAEJ.js +0 -23
- package/build-runtime/chunk-NKY4T53W.js +0 -709
- package/build-runtime/chunk-NVTQFGTR.js +0 -7
- package/build-runtime/chunk-PSHIUVP2.js +0 -131
- package/build-runtime/chunk-U67V476Y.js +0 -35
- package/build-runtime/chunk-UZPSWWI5.js +0 -13
- package/build-runtime/chunk-W73LN534.js +0 -24
- package/build-runtime/chunk-WE3ELMU5.js +0 -3104
- package/build-runtime/chunk-YX6EVX5Q.js +0 -11
- package/build-runtime/context/elevated.d.ts +0 -2
- package/build-runtime/context/elevated.js +0 -25
- package/build-runtime/context/nonElevated.d.ts +0 -2
- package/build-runtime/context/nonElevated.js +0 -38
- package/build-runtime/context/setupServicePlugin.d.ts +0 -5
- package/build-runtime/context/setupServicePlugin.js +0 -16
- package/build-runtime/context/setupWebhook.d.ts +0 -5
- package/build-runtime/context/setupWebhook.js +0 -16
- package/build-runtime/middleware/auth.d.ts +0 -5
- package/build-runtime/middleware/auth.js +0 -74
- package/build-runtime/middleware/html-embeds.d.ts +0 -5
- package/build-runtime/middleware/html-embeds.js +0 -166
- package/build-runtime/routes/auth/callback.d.ts +0 -5
- package/build-runtime/routes/auth/callback.js +0 -52
- package/build-runtime/routes/auth/login.d.ts +0 -5
- package/build-runtime/routes/auth/login.js +0 -45
- package/build-runtime/routes/auth/logout-callback.d.ts +0 -5
- package/build-runtime/routes/auth/logout-callback.js +0 -23
- package/build-runtime/routes/auth/logout.d.ts +0 -5
- package/build-runtime/routes/auth/logout.js +0 -32
- package/build-runtime/routes/paylink/checkout.d.ts +0 -5
- package/build-runtime/routes/paylink/checkout.js +0 -35
- package/build-runtime/routes/paylink/paylink.d.ts +0 -5
- package/build-runtime/routes/paylink/paylink.js +0 -34
- package/build-runtime/routes/robots/robots.d.ts +0 -5
- package/build-runtime/routes/robots/robots.js +0 -44
- package/build-runtime/routes/servicePluginsDevRoute.d.ts +0 -5
- package/build-runtime/routes/servicePluginsDevRoute.js +0 -13
- package/build-runtime/routes/webhooksDevRoute.d.ts +0 -5
- package/build-runtime/routes/webhooksDevRoute.js +0 -13
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
normalizeWixRedirectUrl
|
|
3
|
-
} from "../../chunk-YX6EVX5Q.js";
|
|
4
|
-
import {
|
|
5
|
-
es_exports
|
|
6
|
-
} from "../../chunk-7EHL72JI.js";
|
|
7
|
-
import "../../chunk-EK7YZVWJ.js";
|
|
8
|
-
import "../../chunk-PSHIUVP2.js";
|
|
9
|
-
import "../../chunk-U67V476Y.js";
|
|
10
|
-
|
|
11
|
-
// src/routes/robots/robots.ts
|
|
12
|
-
import { auth } from "@wix/essentials";
|
|
13
|
-
import { WIX_CLIENT_ID } from "astro:env/client";
|
|
14
|
-
var GET = async ({ request }) => {
|
|
15
|
-
const { redirectUrlWixPages } = await auth.elevate(es_exports.getOAuthApp)(
|
|
16
|
-
WIX_CLIENT_ID
|
|
17
|
-
);
|
|
18
|
-
if (redirectUrlWixPages == null) {
|
|
19
|
-
throw new Error(`Invalid Redirect URL: '${redirectUrlWixPages}'`);
|
|
20
|
-
}
|
|
21
|
-
const baseUrl = normalizeWixRedirectUrl({
|
|
22
|
-
wixRedirectUrl: redirectUrlWixPages
|
|
23
|
-
});
|
|
24
|
-
const robotsUrl = new URL("robots.txt", baseUrl);
|
|
25
|
-
const userAgent = request.headers.get("user-agent");
|
|
26
|
-
const originalRobotsFileResponse = await fetch(robotsUrl, {
|
|
27
|
-
headers: { ...userAgent != null ? { "User-Agent": userAgent } : {} }
|
|
28
|
-
});
|
|
29
|
-
if (!originalRobotsFileResponse.ok) {
|
|
30
|
-
throw new Error(
|
|
31
|
-
`Failed to retrieve original robots.txt from: ${robotsUrl.toString()}. Error: ${originalRobotsFileResponse.statusText}`
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
const contentType = originalRobotsFileResponse.headers.get("content-type");
|
|
35
|
-
return new Response(originalRobotsFileResponse.body, {
|
|
36
|
-
headers: {
|
|
37
|
-
...contentType != null ? { "Content-Type": contentType } : {}
|
|
38
|
-
},
|
|
39
|
-
status: 200
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
export {
|
|
43
|
-
GET
|
|
44
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import "../chunk-U67V476Y.js";
|
|
2
|
-
|
|
3
|
-
// src/routes/servicePluginsDevRoute.ts
|
|
4
|
-
var ALL = async (context) => {
|
|
5
|
-
const { ALL: ALL2 } = await import(
|
|
6
|
-
/* @vite-ignore */
|
|
7
|
-
`/.astro/integrations/_wix_astro/extensions/service-plugins/${context.params.compId}/entry.ts`
|
|
8
|
-
);
|
|
9
|
-
return ALL2(context);
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
ALL
|
|
13
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import "../chunk-U67V476Y.js";
|
|
2
|
-
|
|
3
|
-
// src/routes/webhooksDevRoute.ts
|
|
4
|
-
var ALL = async (context) => {
|
|
5
|
-
const { ALL: ALL2 } = await import(
|
|
6
|
-
/* @vite-ignore */
|
|
7
|
-
`/.astro/integrations/_wix_astro/extensions/webhooks/${context.params.compId}/entry.ts`
|
|
8
|
-
);
|
|
9
|
-
return ALL2(context);
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
ALL
|
|
13
|
-
};
|