@kaathewise/ssg 0.8.4 → 0.8.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/dist/render.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,MAAM,MAAM,IAAI,GAAG;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B,CAAA;AAED,wBAAsB,MAAM,CAC3B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,MAAW,GACjB,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,MAAM,MAAM,IAAI,GAAG;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B,CAAA;AAED,wBAAsB,MAAM,CAC3B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,MAAW,GACjB,OAAO,CAAC,IAAI,CAAC,CAmBf;AAED,wBAAsB,SAAS,CAC9B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,EAAE,CAAC,CAgBjB;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAgB1E"}
|
package/dist/render.js
CHANGED
|
@@ -7,12 +7,11 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
|
|
|
7
7
|
return path;
|
|
8
8
|
};
|
|
9
9
|
export async function render(modulePath, pagesDir, params = {}) {
|
|
10
|
-
const worker = new Worker(new URL("./render_worker.
|
|
10
|
+
const worker = new Worker(new URL("./render_worker.js", import.meta.url), {
|
|
11
11
|
type: "module",
|
|
12
12
|
});
|
|
13
13
|
return new Promise((resolve, reject) => {
|
|
14
14
|
worker.onmessage = (e) => {
|
|
15
|
-
console.log("e:", e);
|
|
16
15
|
worker.terminate();
|
|
17
16
|
if (e.data.page) {
|
|
18
17
|
resolve(e.data.page);
|
package/dist/render_worker.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Page } from "./render";
|
|
1
|
+
import { type Page } from "./render.js";
|
|
2
2
|
import type { Params } from "./router.ts";
|
|
3
3
|
export declare function render(modulePath: string, pagesDir: string, params?: Params): Promise<Page>;
|
|
4
4
|
//# sourceMappingURL=render_worker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render_worker.d.ts","sourceRoot":"","sources":["../src/render_worker.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,EAAoB,MAAM,
|
|
1
|
+
{"version":3,"file":"render_worker.d.ts","sourceRoot":"","sources":["../src/render_worker.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,EAAoB,MAAM,aAAa,CAAA;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,wBAAsB,MAAM,CAC3B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,MAAW,GACjB,OAAO,CAAC,IAAI,CAAC,CAkCf"}
|
package/dist/render_worker.js
CHANGED
|
@@ -7,10 +7,9 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
|
|
|
7
7
|
return path;
|
|
8
8
|
};
|
|
9
9
|
import * as path from "node:path";
|
|
10
|
-
import { substituteParams } from "./render";
|
|
10
|
+
import { substituteParams } from "./render.js";
|
|
11
11
|
export async function render(modulePath, pagesDir, params = {}) {
|
|
12
12
|
const module = await import(__rewriteRelativeImportExtension(modulePath));
|
|
13
|
-
console.log(module);
|
|
14
13
|
let contentType = null;
|
|
15
14
|
if ("getContentType" in module) {
|
|
16
15
|
contentType = module.getContentType();
|