@witchcraft/nuxt-electron 0.0.8 → 0.0.10

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/README.md CHANGED
@@ -260,7 +260,7 @@ Note we would ideally also remove "/" from the prerender, but this requires manu
260
260
 
261
261
  A `routeRules` redirect won't work, because it will trigger a request to electron's file protocol handler which we don't know what to do with.
262
262
 
263
- A redirect from a page (e.i. `if (process.client && isElectron) { navigateTo("/app") }`) works, but it takes a little big of time to navigate. This is still needed for development redirecting, but not in production.
263
+ A redirect from a page (e.i. `if (process.client && isElectron) { await navigateTo("/app") }`) works, but it takes a little big of time to navigate. This is still needed for development redirecting, but not in production.
264
264
 
265
265
  #### Build
266
266
 
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "electron",
3
3
  "configKey": "electron",
4
- "version": "0.0.8",
4
+ "version": "0.0.10",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -9,11 +9,6 @@ import { startup, build } from 'vite-plugin-electron';
9
9
  import { notBundle } from 'vite-plugin-electron/plugin';
10
10
  import { externalizeDeps } from 'vite-plugin-externalize-deps';
11
11
 
12
- const dependencies = {
13
- "@witchcraft/ui": "^0.3.2"};
14
- const pkg = {
15
- dependencies: dependencies};
16
-
17
12
  startup.exit = async () => {
18
13
  if ("electronApp" in process) {
19
14
  try {
@@ -52,7 +47,7 @@ const module = defineNuxtModule({
52
47
  },
53
48
  moduleDependencies: {
54
49
  "@witchcraft/ui/nuxt": {
55
- version: pkg.dependencies["@witchcraft/ui"]
50
+ version: "^0.3.2"
56
51
  }
57
52
  },
58
53
  async setup(options, nuxt) {
package/package.json CHANGED
@@ -1,93 +1,92 @@
1
1
  {
2
- "name": "@witchcraft/nuxt-electron",
3
- "version": "0.0.8",
4
- "description": "Nuxt module for working with electron.",
5
- "repository": "witchcraftjs/nuxt-electron",
6
- "license": "MIT",
7
- "type": "module",
8
- "sideEffects": false,
9
- "exports": {
10
- ".": {
11
- "types": "./dist/types.d.mts",
12
- "import": "./dist/module.mjs"
13
- },
14
- "./electron": {
15
- "types": "./dist/runtime/electron/index.d.ts",
16
- "import": "./dist/runtime/electron/index.js"
17
- },
18
- "./genDevDesktop": {
19
- "import": "./genDevDesktop.js"
20
- }
21
- },
22
- "files": [
23
- "src",
24
- "dist",
25
- "genDevDesktop.js"
26
- ],
27
- "scripts": {
28
- "prepare": "husky && pnpm nuxt-module-build prepare && pnpm build:only && cd playground && pnpm i --ignore-scripts --ignore-workspace",
29
- "build": "nuxt-module-build prepare && nuxt-module-build build && nuxi build playground",
30
- "build:only": "nuxt-module-build build",
31
- "dev": "nuxi dev playground",
32
- "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
33
- "lint": "eslint \"{src,test,playground/app}/**/*.{ts,vue}\" \"*.{js,cjs,mjs,ts}\"",
34
- "lint:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
35
- "test": "vitest run",
36
- "test:watch": "vitest watch"
37
- },
38
- "dependencies": {
39
- "@alanscodelog/utils": "^6.0.2",
40
- "@nuxt/kit": "^4.0.3",
41
- "@witchcraft/nuxt-utils": "^0.3.2",
42
- "@witchcraft/ui": "^0.3.2",
43
- "defu": "^6.1.4",
44
- "es-toolkit": "^1.39.10",
45
- "vite-plugin-electron": "^0.29.0",
46
- "vite-plugin-externalize-deps": "^0.9.0"
47
- },
48
- "peerDependencies": {
49
- "@witchcraft/ui": "^0.3.2",
50
- "unplugin-icons": "^22.1.0"
51
- },
52
- "peerDependenciesMeta": {
53
- "unplugin-icons": {
54
- "optional": true
55
- },
56
- "@witchcraft/ui": {
57
- "optional": true
58
- }
59
- },
60
- "devDependencies": {
61
- "@alanscodelog/eslint-config": "^6.3.1",
62
- "@alanscodelog/semantic-release-config": "^5.0.4",
63
- "@alanscodelog/tsconfigs": "^6.2.0",
64
- "@nuxt/eslint-config": "^1.9.0",
65
- "@nuxt/module-builder": "^1.0.2",
66
- "@nuxt/schema": "^4.0.3",
67
- "@nuxt/test-utils": "^3.19.2",
68
- "@types/node": "latest",
69
- "changelogen": "^0.6.2",
70
- "electron": "^38.0.0",
71
- "eslint": "^9.34.0",
72
- "husky": "^9.1.7",
73
- "json5": "^2.2.3",
74
- "nuxt": "^4.0.3",
75
- "typescript": "^5.8.3",
76
- "unplugin-icons": "^22.3.0",
77
- "vitest": "^3.2.4",
78
- "vue-tsc": "^3.0.6"
79
- },
80
- "release": {
81
- "extends": [
82
- "@alanscodelog/semantic-release-config"
83
- ]
84
- },
85
- "commitlint": {
86
- "extends": [
87
- "@alanscodelog"
88
- ]
89
- },
90
- "publishConfig": {
91
- "access": "public"
92
- }
93
- }
2
+ "name": "@witchcraft/nuxt-electron",
3
+ "version": "0.0.10",
4
+ "description": "Nuxt module for working with electron.",
5
+ "repository": "witchcraftjs/nuxt-electron",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "sideEffects": false,
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/types.d.mts",
12
+ "import": "./dist/module.mjs"
13
+ },
14
+ "./electron": {
15
+ "types": "./dist/runtime/electron/index.d.ts",
16
+ "import": "./dist/runtime/electron/index.js"
17
+ },
18
+ "./genDevDesktop": {
19
+ "import": "./genDevDesktop.js"
20
+ }
21
+ },
22
+ "files": [
23
+ "src",
24
+ "dist",
25
+ "genDevDesktop.js"
26
+ ],
27
+ "dependencies": {
28
+ "@alanscodelog/utils": "^6.0.2",
29
+ "@nuxt/kit": "^4.0.3",
30
+ "@witchcraft/nuxt-utils": "^0.3.2",
31
+ "@witchcraft/ui": "^0.3.2",
32
+ "defu": "^6.1.4",
33
+ "es-toolkit": "^1.39.10",
34
+ "vite-plugin-electron": "^0.29.0",
35
+ "vite-plugin-externalize-deps": "^0.9.0"
36
+ },
37
+ "peerDependencies": {
38
+ "@witchcraft/ui": "^0.3.2",
39
+ "unplugin-icons": "^22.3.0"
40
+ },
41
+ "peerDependenciesMeta": {
42
+ "unplugin-icons": {
43
+ "optional": true
44
+ },
45
+ "@witchcraft/ui": {
46
+ "optional": true
47
+ }
48
+ },
49
+ "devDependencies": {
50
+ "@alanscodelog/eslint-config": "^6.3.1",
51
+ "@alanscodelog/semantic-release-config": "^6.0.0",
52
+ "@alanscodelog/tsconfigs": "^6.2.0",
53
+ "@nuxt/eslint-config": "^1.9.0",
54
+ "@nuxt/module-builder": "^1.0.2",
55
+ "@nuxt/schema": "^4.0.3",
56
+ "@nuxt/test-utils": "^3.19.2",
57
+ "@types/node": "latest",
58
+ "changelogen": "^0.6.2",
59
+ "electron": "^38.0.0",
60
+ "eslint": "^9.34.0",
61
+ "husky": "^9.1.7",
62
+ "json5": "^2.2.3",
63
+ "nuxt": "^4.0.3",
64
+ "typescript": "^5.8.3",
65
+ "unplugin-icons": "^22.3.0",
66
+ "vitest": "^3.2.4",
67
+ "vue-tsc": "^3.0.6"
68
+ },
69
+ "release": {
70
+ "extends": [
71
+ "@alanscodelog/semantic-release-config"
72
+ ]
73
+ },
74
+ "commitlint": {
75
+ "extends": [
76
+ "@alanscodelog"
77
+ ]
78
+ },
79
+ "publishConfig": {
80
+ "access": "public"
81
+ },
82
+ "scripts": {
83
+ "build": "nuxt-module-build prepare && nuxt-module-build build && nuxi build playground",
84
+ "build:only": "nuxt-module-build build",
85
+ "dev": "nuxi dev playground",
86
+ "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
87
+ "lint": "eslint \"{src,test,playground/app}/**/*.{ts,vue}\" \"*.{js,cjs,mjs,ts}\"",
88
+ "lint:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
89
+ "test": "vitest run",
90
+ "test:watch": "vitest watch"
91
+ }
92
+ }
package/src/module.ts CHANGED
@@ -175,7 +175,7 @@ export default defineNuxtModule<ModuleOptions>({
175
175
  },
176
176
  moduleDependencies: {
177
177
  "@witchcraft/ui/nuxt": {
178
- version: pkg.dependencies["@witchcraft/ui"]
178
+ version: "^0.3.2"
179
179
  }
180
180
  },
181
181
  async setup(options, nuxt) {