@analogjs/platform 0.1.0-beta.4 → 0.1.0-beta.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@analogjs/platform",
3
- "version": "0.1.0-beta.4",
3
+ "version": "0.1.0-beta.5",
4
4
  "type": "commonjs",
5
5
  "description": "The fullstack meta-framework for Angular",
6
6
  "author": "Brandon Roberts <robertsbt@gmail.com>",
@@ -1,9 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const h3_1 = require("h3");
4
- exports.default = (0, h3_1.eventHandler)(async (event) => {
5
- if (event.req.url?.startsWith('/api')) {
6
- return $fetch(`${event.req.url?.replace('/api', '')}`);
7
- }
1
+ /**
2
+ * This file is written in JavaScript
3
+ * because it is used by Nitro to build
4
+ * the renderer for SSR.
5
+ *
6
+ * The package is shipped as commonjs
7
+ * which won't be parsed by Nitro correctly.
8
+ */
9
+ import { eventHandler } from 'h3';
10
+
11
+ export default eventHandler(async (event) => {
12
+ if (event.req.url?.startsWith('/api')) {
13
+ return $fetch(`${event.req.url?.replace('/api', '')}`);
14
+ }
8
15
  });
9
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLW1pZGRsZXdhcmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9wbGF0Zm9ybS9zcmMvbGliL3J1bnRpbWUvYXBpLW1pZGRsZXdhcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwyQkFBa0M7QUFFbEMsa0JBQWUsSUFBQSxpQkFBWSxFQUFDLEtBQUssRUFBRSxLQUFLLEVBQUUsRUFBRTtJQUMxQyxJQUFJLEtBQUssQ0FBQyxHQUFHLENBQUMsR0FBRyxFQUFFLFVBQVUsQ0FBQyxNQUFNLENBQUMsRUFBRTtRQUNyQyxPQUFPLE1BQU0sQ0FBQyxHQUFHLEtBQUssQ0FBQyxHQUFHLENBQUMsR0FBRyxFQUFFLE9BQU8sQ0FBQyxNQUFNLEVBQUUsRUFBRSxDQUFDLEVBQUUsQ0FBQyxDQUFDO0tBQ3hEO0FBQ0gsQ0FBQyxDQUFDLENBQUMifQ==
@@ -1,14 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const h3_1 = require("h3");
4
- // @ts-ignore
5
- const _imports_1 = require("#imports");
6
- exports.default = (0, h3_1.eventHandler)(async (event) => {
7
- // @ts-ignore
8
- const render = (await Promise.resolve().then(() => require('#build/../ssr/main.server.mjs')))['default'];
9
- // @ts-ignore
10
- const template = await (0, _imports_1.useStorage)().getItem(`/assets/public:index.html`);
11
- const html = await render(event.req.url, template);
12
- return html;
1
+ /**
2
+ * This file is written in JavaScript
3
+ * because it is used by Nitro to build
4
+ * the renderer for SSR.
5
+ *
6
+ * The package is shipped as commonjs
7
+ * which won't be parsed by Nitro correctly.
8
+ */
9
+ import { eventHandler } from 'h3';
10
+ import { useStorage } from '#imports';
11
+
12
+ export default eventHandler(async (event) => {
13
+ const render = (await import('#build/../ssr/main.server.mjs'))['default'];
14
+ const template = await useStorage().getItem(`/assets/public:index.html`);
15
+
16
+ const html = await render(event.req.url, template);
17
+
18
+ return html;
13
19
  });
14
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVuZGVyZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9wbGF0Zm9ybS9zcmMvbGliL3J1bnRpbWUvcmVuZGVyZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwyQkFBa0M7QUFDbEMsYUFBYTtBQUNiLHVDQUFzQztBQUV0QyxrQkFBZSxJQUFBLGlCQUFZLEVBQUMsS0FBSyxFQUFFLEtBQUssRUFBRSxFQUFFO0lBQzFDLGFBQWE7SUFDYixNQUFNLE1BQU0sR0FBRyxDQUFDLDJDQUFhLCtCQUErQixFQUFDLENBQUMsQ0FBQyxTQUFTLENBQUMsQ0FBQztJQUUxRSxhQUFhO0lBQ2IsTUFBTSxRQUFRLEdBQUcsTUFBTSxJQUFBLHFCQUFVLEdBQUUsQ0FBQyxPQUFPLENBQUMsMkJBQTJCLENBQUMsQ0FBQztJQUV6RSxNQUFNLElBQUksR0FBRyxNQUFNLE1BQU0sQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLEdBQUcsRUFBRSxRQUFRLENBQUMsQ0FBQztJQUVuRCxPQUFPLElBQUksQ0FBQztBQUNkLENBQUMsQ0FBQyxDQUFDIn0=
@@ -1,2 +0,0 @@
1
- declare const _default: import("h3").EventHandler<unknown>;
2
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: import("h3").EventHandler<any>;
2
- export default _default;