@luna-park/plugin 1.8.0 → 2.0.0

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,7 +1,5 @@
1
- //#region src/preview/server.d.ts
2
1
  export declare function startPreviewServer(config: {
3
2
  dist: string;
4
3
  externals: Array<string>;
5
4
  port: number;
6
- }): Promise<void>;
7
- //#endregion
5
+ }): Promise<void>;
package/dist/preview.mjs CHANGED
@@ -3,7 +3,7 @@ import { existsSync, readFileSync } from "fs";
3
3
  import fastifyCors from "@fastify/cors";
4
4
  import fastifyStatic from "@fastify/static";
5
5
  import Fastify from "fastify";
6
- //#region src/preview/transform.ts
6
+ // src/preview/transform.ts
7
7
  function transformImports(content, externals) {
8
8
  return content.replace(/\bimport\s+(.*?)\s+from\s+['"]([^.'/][^'"]*)['"];/g, (match, imports, pkg) => {
9
9
  if (externals.includes(pkg)) return match;
@@ -13,8 +13,7 @@ function transformImports(content, externals) {
13
13
  return `import 'https://esm.sh/${pkg}';`;
14
14
  });
15
15
  }
16
- //#endregion
17
- //#region src/preview/server.ts
16
+ // src/preview/server.ts
18
17
  async function startPreviewServer(config) {
19
18
  const fastify = Fastify({ logger: false });
20
19
  fastify.register(fastifyCors, { origin: [
@@ -43,5 +42,4 @@ async function startPreviewServer(config) {
43
42
  });
44
43
  console.log(`Preview server started at http://127.0.0.1:${config.port}`);
45
44
  }
46
- //#endregion
47
45
  export { startPreviewServer };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luna-park/plugin",
3
- "version": "1.8.0",
3
+ "version": "2.0.0",
4
4
  "private": false,
5
5
  "description": "Plugin helper for Luna Park.",
6
6
  "homepage": "https://luna-park.app",
@@ -15,19 +15,26 @@
15
15
  "type": "module",
16
16
  "exports": {
17
17
  ".": {
18
+ "source": "./src/index.ts",
18
19
  "types": "./dist/index.d.mts",
19
20
  "import": "./dist/index.mjs"
20
21
  },
21
22
  "./eslint": {
23
+ "source": "./src/eslint/index.ts",
22
24
  "types": "./dist/eslint.d.mts",
23
25
  "import": "./dist/eslint.mjs"
24
26
  },
25
27
  "./extractor": {
28
+ "source": "./src/extractor/index.ts",
26
29
  "types": "./dist/extractor.d.mts",
27
30
  "import": "./dist/extractor.mjs"
28
31
  },
29
32
  "./index.css": "./dist/style.css"
30
33
  },
34
+ "imports": {
35
+ "#plugin/*.vue": "./src/*.vue",
36
+ "#plugin/*": "./src/*.ts"
37
+ },
31
38
  "module": "./dist/index.mjs",
32
39
  "types": "./dist/index.d.mts",
33
40
  "bin": {
@@ -37,42 +44,42 @@
37
44
  "dist/**"
38
45
  ],
39
46
  "dependencies": {
40
- "@electric-sql/pglite": "^0.5.8",
41
- "@fastify/cors": "^11.3.0",
42
- "@fastify/static": "^10.1.3",
47
+ "@electric-sql/pglite": "^0.5.11",
48
+ "@fastify/cors": "^11.3.1",
49
+ "@fastify/static": "^10.1.6",
43
50
  "@fortawesome/fontawesome-svg-core": "^7.3.1",
44
51
  "@sinclair/typebox": "^0.34.52",
45
- "fastify": "^5.12.4",
46
- "jsep": "^1.4.0",
52
+ "fastify": "^5.12.7",
53
+ "jsep": "^1.6.0",
47
54
  "lite-cron": "^1.1.0",
48
55
  "typescript": "^6.0.3",
49
- "vue": "^3.5.42"
56
+ "vue": "^3.5.44"
50
57
  },
51
58
  "devDependencies": {
52
- "@luna-park/eslint-config": "^1.4.3",
59
+ "@luna-park/eslint-config": "^1.4.5",
53
60
  "@luna-park/logicnodes": "^2.0.0",
54
61
  "@luna-park/shared": "^1.0.0",
55
62
  "@luna-park/utils": "^2.0.0",
56
- "@tsdown/css": "^0.23.0",
57
- "@vitejs/plugin-vue": "^6.0.8",
58
- "@vitest/ui": "^5.0.0",
59
- "@vue/language-core": "^3.3.11",
60
- "eslint": "^10.10.0",
61
- "rimraf": "^6.1.3",
62
- "rolldown-plugin-dts": "^0.28.5",
63
- "tsdown": "^0.23.0",
63
+ "@tsdown/css": "^0.23.1",
64
+ "@vitejs/plugin-vue": "^6.0.10",
65
+ "@vitest/ui": "^5.0.5",
66
+ "@vue/language-core": "^3.3.13",
67
+ "eslint": "^10.13.0",
68
+ "rolldown-plugin-dts": "^0.28.8",
69
+ "tsdown": "^0.23.1",
64
70
  "typescript": "^6.0.3",
65
- "typescript-eslint": "^8.70.0",
66
- "unplugin-vue": "^7.2.0",
67
- "vite": "^8.3.0",
68
- "vitest": "^5.0.0",
69
- "vue": "^3.5.42"
71
+ "typescript-eslint": "^8.72.0",
72
+ "unplugin-vue": "^8.0.0",
73
+ "vite": "^8.3.5",
74
+ "vitest": "^5.0.5",
75
+ "vue": "^3.5.44"
70
76
  },
71
77
  "scripts": {
72
- "build": "rimraf dist && tsdown",
78
+ "build": "tsdown",
73
79
  "dev": "tsdown --watch",
74
80
  "dev:test": "vitest --ui",
75
81
  "test": "vitest",
76
- "test:preview": "node bin/preview.js"
82
+ "test:preview": "node bin/preview.js",
83
+ "typecheck": "vue-tsc --noEmit"
77
84
  }
78
85
  }