@wervt/nitro 0.0.4 → 0.0.6

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 (2) hide show
  1. package/dist/index.js +3 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -6,7 +6,8 @@ import { BUNDLE_MANIFEST } from "@wervt/core";
6
6
  import { SEED_TASK, resolveAppName, setupDev, unscheduleSeed } from "@wervt/platform/dev";
7
7
  // src/index.ts
8
8
  const ext = import.meta.url.endsWith(".ts") ? ".ts" : ".js";
9
- const runtime = (name) => fileURLToPath(new URL(`./runtime/${name}${ext}`, import.meta.url));
9
+ const runtimeDir = fileURLToPath(new URL("./runtime/", import.meta.url));
10
+ const runtime = (name) => `${runtimeDir}${name}${ext}`;
10
11
  /** The module, configured: `modules: [wervt({ timezone: 'Europe/Berlin' })]`. */
11
12
  function wervt(options = {}) {
12
13
  const module = {
@@ -40,6 +41,7 @@ async function setup(nitro, options) {
40
41
  method: "GET",
41
42
  handler: runtime("user")
42
43
  });
44
+ if (nitro.options.noExternals !== true) nitro.options.noExternals = [...nitro.options.noExternals || [], runtimeDir];
43
45
  if (dev) {
44
46
  if (!process.env.NITRO_PRERENDER) await setupDevServer(nitro, app, options.dev ?? {});
45
47
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wervt/nitro",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Nitro module for apps hosted on wervt: Deno build for the runtime, tasks, local database and the bundle manifest.",
5
5
  "keywords": [
6
6
  "nitro",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@wervt/core": "^0.0.3",
35
- "@wervt/platform": "^0.0.3"
35
+ "@wervt/platform": "^0.0.4"
36
36
  },
37
37
  "devDependencies": {
38
38
  "nitro": "3.0.261102-rc",