@dreamkit/dev 0.0.7 → 0.0.9

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.
@@ -1 +1 @@
1
- {"version":3,"file":"solid-start.d.ts","sourceRoot":"","sources":["../../src/adapters/solid-start.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAYtD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAM5B,wBAAsB,uBAAuB,CAAC,OAAO,EAAE;IACrD,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAqDhC;AAsCD,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,GAAG,EACb,SAAS,GAAE,qBAA0B,qBAoHtC"}
1
+ {"version":3,"file":"solid-start.d.ts","sourceRoot":"","sources":["../../src/adapters/solid-start.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAYtD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAkB5B,wBAAsB,uBAAuB,CAAC,OAAO,EAAE;IACrD,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAqDhC;AAsCD,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,GAAG,EACb,SAAS,GAAE,qBAA0B,qBAoHtC"}
@@ -8,6 +8,15 @@ import { onChangeVinxiRoutes, } from "../utils/vinxi.js";
8
8
  import { isRoute, $route } from "@dreamkit/app";
9
9
  import { join, resolve } from "path";
10
10
  const isEntryRoute = (id, value) => !id.startsWith("/") && isRoute(value);
11
+ // StackBlitz Polyfill
12
+ class $CustomEvent extends Event {
13
+ detail;
14
+ constructor(message, data) {
15
+ super(message);
16
+ this.detail = data?.detail;
17
+ }
18
+ }
19
+ const CustomEvent = globalThis.CustomEvent ?? $CustomEvent;
11
20
  export async function fetchDreamkitDevOptions(options) {
12
21
  const entry = join(options.root, "app.config.ts").replaceAll("\\", "/");
13
22
  const dummyDefineConfigSource = "virtual:config";
@@ -147,11 +156,9 @@ export function createDreamkitDevServer(vinxiApp, inOptions = {}) {
147
156
  if (!isVinxiRouterPage)
148
157
  return;
149
158
  const id = vinxiRoute.path;
150
- if (action === "remove") {
151
- if (router.name === "ssr" && server.app.objects.has(id))
152
- await server.app.remove([id]);
153
- }
154
- else if (action === "add" || action === "update") {
159
+ if (router.name === "ssr" && server.app.objects.has(id))
160
+ await server.app.remove([id]);
161
+ if (action === "add" || action === "update") {
155
162
  const routeObject = await server.fetchDefault(vinxiRoute.filePath);
156
163
  if (isRoute(routeObject))
157
164
  vinxiRoute.$$route = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamkit/dev",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "Development tools for DreamKit.",
5
5
  "homepage": "https://dreamkit.dev",
6
6
  "repository": {