@ic-reactor/vite-plugin 0.5.0 → 0.5.1

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/index.cjs CHANGED
@@ -89,7 +89,7 @@ function icReactorPlugin(options) {
89
89
  outDir,
90
90
  clientManagerPath
91
91
  };
92
- return {
92
+ const plugin = {
93
93
  name: "ic-reactor-plugin",
94
94
  enforce: "pre",
95
95
  // Run before other plugins
@@ -181,6 +181,7 @@ function icReactorPlugin(options) {
181
181
  }
182
182
  }
183
183
  };
184
+ return plugin;
184
185
  }
185
186
  // Annotate the CommonJS export names for ESM import in node:
186
187
  0 && (module.exports = {
package/dist/index.d.cts CHANGED
@@ -1,4 +1,3 @@
1
- import { Plugin } from 'vite';
2
1
  import { CanisterConfig } from '@ic-reactor/codegen';
3
2
 
4
3
  /**
@@ -32,6 +31,6 @@ interface IcReactorPluginOptions {
32
31
  */
33
32
  injectEnvironment?: boolean;
34
33
  }
35
- declare function icReactorPlugin(options: IcReactorPluginOptions): Plugin;
34
+ declare function icReactorPlugin(options: IcReactorPluginOptions): any;
36
35
 
37
36
  export { type IcReactorPluginOptions, icReactorPlugin };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { Plugin } from 'vite';
2
1
  import { CanisterConfig } from '@ic-reactor/codegen';
3
2
 
4
3
  /**
@@ -32,6 +31,6 @@ interface IcReactorPluginOptions {
32
31
  */
33
32
  injectEnvironment?: boolean;
34
33
  }
35
- declare function icReactorPlugin(options: IcReactorPluginOptions): Plugin;
34
+ declare function icReactorPlugin(options: IcReactorPluginOptions): any;
36
35
 
37
36
  export { type IcReactorPluginOptions, icReactorPlugin };
package/dist/index.js CHANGED
@@ -57,7 +57,7 @@ function icReactorPlugin(options) {
57
57
  outDir,
58
58
  clientManagerPath
59
59
  };
60
- return {
60
+ const plugin = {
61
61
  name: "ic-reactor-plugin",
62
62
  enforce: "pre",
63
63
  // Run before other plugins
@@ -149,6 +149,7 @@ function icReactorPlugin(options) {
149
149
  }
150
150
  }
151
151
  };
152
+ return plugin;
152
153
  }
153
154
  export {
154
155
  icReactorPlugin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ic-reactor/vite-plugin",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Vite plugin for zero-config IC reactor generation from Candid files",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -37,17 +37,16 @@
37
37
  "url": "https://github.com/B3Pay/ic-reactor/issues"
38
38
  },
39
39
  "dependencies": {
40
- "@ic-reactor/codegen": "0.5.0"
40
+ "@ic-reactor/codegen": "0.5.1"
41
41
  },
42
42
  "peerDependencies": {
43
- "vite": "^5.0.0 || ^6.0.0 || ^7.0.0"
43
+ "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@icp-sdk/bindgen": "^0.2.1",
47
47
  "@types/node": "^25.2.3",
48
48
  "tsup": "^8.5.1",
49
49
  "typescript": "^5.9.3",
50
- "vite": "^7.3.1",
51
50
  "vitest": "^4.0.18"
52
51
  },
53
52
  "scripts": {
package/src/index.test.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { describe, it, expect, vi, beforeEach } from "vitest"
2
2
  import { icReactorPlugin, type IcReactorPluginOptions } from "./index"
3
- import fs from "fs"
4
3
  import path from "path"
5
4
  import { execFileSync } from "child_process"
6
5
  import { runCanisterPipeline } from "@ic-reactor/codegen"
package/src/index.ts CHANGED
@@ -7,8 +7,7 @@
7
7
  * 3. Hot-reloads when .did files change
8
8
  */
9
9
 
10
- import type { Plugin, UserConfig } from "vite"
11
- import fs from "node:fs"
10
+ import type { Plugin } from "vite"
12
11
  import path from "node:path"
13
12
  import {
14
13
  runCanisterPipeline,
@@ -40,7 +39,7 @@ export interface IcReactorPluginOptions {
40
39
  injectEnvironment?: boolean
41
40
  }
42
41
 
43
- export function icReactorPlugin(options: IcReactorPluginOptions): Plugin {
42
+ export function icReactorPlugin(options: IcReactorPluginOptions): any {
44
43
  const {
45
44
  canisters,
46
45
  outDir = "src/declarations",
@@ -54,7 +53,7 @@ export function icReactorPlugin(options: IcReactorPluginOptions): Plugin {
54
53
  clientManagerPath,
55
54
  }
56
55
 
57
- return {
56
+ const plugin: Plugin = {
58
57
  name: "ic-reactor-plugin",
59
58
  enforce: "pre", // Run before other plugins
60
59
 
@@ -176,4 +175,6 @@ export function icReactorPlugin(options: IcReactorPluginOptions): Plugin {
176
175
  }
177
176
  },
178
177
  }
178
+
179
+ return plugin
179
180
  }