@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.
Files changed (51) hide show
  1. package/package.json +8 -7
  2. package/src/index.ts +9 -0
  3. package/src/plugins/setupSsrContext.ts +3 -0
  4. package/src/routes/wix-apis/api.ts +31 -0
  5. package/tsup.config.mjs +3 -0
  6. package/build/index.d.ts +0 -9
  7. package/build/index.js +0 -17165
  8. package/build/index.js.map +0 -1
  9. package/build-browser-runtime/setup.d.ts +0 -5
  10. package/build-browser-runtime/setup.js +0 -849
  11. package/build-runtime/chunk-7EHL72JI.js +0 -1079
  12. package/build-runtime/chunk-EK7YZVWJ.js +0 -353
  13. package/build-runtime/chunk-HPW4ZAEJ.js +0 -23
  14. package/build-runtime/chunk-NKY4T53W.js +0 -709
  15. package/build-runtime/chunk-NVTQFGTR.js +0 -7
  16. package/build-runtime/chunk-PSHIUVP2.js +0 -131
  17. package/build-runtime/chunk-U67V476Y.js +0 -35
  18. package/build-runtime/chunk-UZPSWWI5.js +0 -13
  19. package/build-runtime/chunk-W73LN534.js +0 -24
  20. package/build-runtime/chunk-WE3ELMU5.js +0 -3104
  21. package/build-runtime/chunk-YX6EVX5Q.js +0 -11
  22. package/build-runtime/context/elevated.d.ts +0 -2
  23. package/build-runtime/context/elevated.js +0 -25
  24. package/build-runtime/context/nonElevated.d.ts +0 -2
  25. package/build-runtime/context/nonElevated.js +0 -38
  26. package/build-runtime/context/setupServicePlugin.d.ts +0 -5
  27. package/build-runtime/context/setupServicePlugin.js +0 -16
  28. package/build-runtime/context/setupWebhook.d.ts +0 -5
  29. package/build-runtime/context/setupWebhook.js +0 -16
  30. package/build-runtime/middleware/auth.d.ts +0 -5
  31. package/build-runtime/middleware/auth.js +0 -74
  32. package/build-runtime/middleware/html-embeds.d.ts +0 -5
  33. package/build-runtime/middleware/html-embeds.js +0 -166
  34. package/build-runtime/routes/auth/callback.d.ts +0 -5
  35. package/build-runtime/routes/auth/callback.js +0 -52
  36. package/build-runtime/routes/auth/login.d.ts +0 -5
  37. package/build-runtime/routes/auth/login.js +0 -45
  38. package/build-runtime/routes/auth/logout-callback.d.ts +0 -5
  39. package/build-runtime/routes/auth/logout-callback.js +0 -23
  40. package/build-runtime/routes/auth/logout.d.ts +0 -5
  41. package/build-runtime/routes/auth/logout.js +0 -32
  42. package/build-runtime/routes/paylink/checkout.d.ts +0 -5
  43. package/build-runtime/routes/paylink/checkout.js +0 -35
  44. package/build-runtime/routes/paylink/paylink.d.ts +0 -5
  45. package/build-runtime/routes/paylink/paylink.js +0 -34
  46. package/build-runtime/routes/robots/robots.d.ts +0 -5
  47. package/build-runtime/routes/robots/robots.js +0 -44
  48. package/build-runtime/routes/servicePluginsDevRoute.d.ts +0 -5
  49. package/build-runtime/routes/servicePluginsDevRoute.js +0 -13
  50. package/build-runtime/routes/webhooksDevRoute.d.ts +0 -5
  51. 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,5 +0,0 @@
1
- import { APIRoute } from 'astro';
2
-
3
- declare const ALL: APIRoute;
4
-
5
- export { ALL };
@@ -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,5 +0,0 @@
1
- import { APIRoute } from 'astro';
2
-
3
- declare const ALL: APIRoute;
4
-
5
- export { ALL };
@@ -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
- };