@supsign/unplugin-interfaces 0.1.1 → 0.2.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.
package/dist/astro.js CHANGED
@@ -1,4 +1,4 @@
1
- import { src_default } from "./src-DyBB0CwK.js";
1
+ import { src_default } from "./src-BKy9tiI6.js";
2
2
 
3
3
  //#region src/astro.ts
4
4
  var astro_default = (options) => ({
package/dist/esbuild.js CHANGED
@@ -1,4 +1,4 @@
1
- import { unpluginFactory } from "./src-DyBB0CwK.js";
1
+ import { unpluginFactory } from "./src-BKy9tiI6.js";
2
2
  import { createEsbuildPlugin } from "unplugin";
3
3
 
4
4
  //#region src/esbuild.ts
package/dist/farm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { unpluginFactory } from "./src-DyBB0CwK.js";
1
+ import { unpluginFactory } from "./src-BKy9tiI6.js";
2
2
  import { createFarmPlugin } from "unplugin";
3
3
 
4
4
  //#region src/farm.ts
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { esbuild, rollup, src_default, unplugin, unpluginFactory, vite, webpack } from "./src-DyBB0CwK.js";
1
+ import { esbuild, rollup, src_default, unplugin, unpluginFactory, vite, webpack } from "./src-BKy9tiI6.js";
2
2
 
3
3
  export { src_default as default, esbuild, rollup, unplugin, unpluginFactory, vite, webpack };
package/dist/nuxt.js CHANGED
@@ -1,6 +1,6 @@
1
- import "./src-DyBB0CwK.js";
2
- import { vite_default } from "./vite-Bc6kO4Bd.js";
3
- import { webpack_default } from "./webpack-7x38_B5C.js";
1
+ import "./src-BKy9tiI6.js";
2
+ import { vite_default } from "./vite-gMMORSxX.js";
3
+ import { webpack_default } from "./webpack-BsOsB8pU.js";
4
4
  import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
5
5
 
6
6
  //#region src/nuxt.ts
package/dist/rollup.js CHANGED
@@ -1,4 +1,4 @@
1
- import { unpluginFactory } from "./src-DyBB0CwK.js";
1
+ import { unpluginFactory } from "./src-BKy9tiI6.js";
2
2
  import { createRollupPlugin } from "unplugin";
3
3
 
4
4
  //#region src/rollup.ts
package/dist/rspack.js CHANGED
@@ -1,4 +1,4 @@
1
- import { unpluginFactory } from "./src-DyBB0CwK.js";
1
+ import { unpluginFactory } from "./src-BKy9tiI6.js";
2
2
  import { createRspackPlugin } from "unplugin";
3
3
 
4
4
  //#region src/rspack.ts
@@ -1566,7 +1566,10 @@ function generateInterfaces(opts) {
1566
1566
  const interfaces = [];
1567
1567
  for (const file of files) {
1568
1568
  const filePath = path.join(interfaceDir, file);
1569
- const names = [...fs.readFileSync(filePath, "utf-8").matchAll(/export\s+interface\s+(\w+)/g)].map((m) => m[1]);
1569
+ const content = fs.readFileSync(filePath, "utf-8");
1570
+ const interfaceNames = [...content.matchAll(/export\s+interface\s+(\w+)/g)].map((m) => m[1]);
1571
+ const namedExportNames = [...content.matchAll(/export\s*\{\s*([^}]+)\s*\}/g)].flatMap((m) => m[1].split(",").map((item) => item.trim().split(/\s+as\s+/)[0].trim()));
1572
+ const names = [...interfaceNames, ...namedExportNames];
1570
1573
  if (names.length) interfaces.push({
1571
1574
  file,
1572
1575
  names
@@ -1,4 +1,4 @@
1
- import { unpluginFactory } from "./src-DyBB0CwK.js";
1
+ import { unpluginFactory } from "./src-BKy9tiI6.js";
2
2
  import { createVitePlugin } from "unplugin";
3
3
 
4
4
  //#region src/vite.ts
package/dist/vite.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./src-DyBB0CwK.js";
2
- import { vite_default } from "./vite-Bc6kO4Bd.js";
1
+ import "./src-BKy9tiI6.js";
2
+ import { vite_default } from "./vite-gMMORSxX.js";
3
3
 
4
4
  export { vite_default as default };
@@ -1,4 +1,4 @@
1
- import { unpluginFactory } from "./src-DyBB0CwK.js";
1
+ import { unpluginFactory } from "./src-BKy9tiI6.js";
2
2
  import { createWebpackPlugin } from "unplugin";
3
3
 
4
4
  //#region src/webpack.ts
package/dist/webpack.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./src-DyBB0CwK.js";
2
- import { webpack_default } from "./webpack-7x38_B5C.js";
1
+ import "./src-BKy9tiI6.js";
2
+ import { webpack_default } from "./webpack-BsOsB8pU.js";
3
3
 
4
4
  export { webpack_default as default };
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@supsign/unplugin-interfaces",
3
3
  "type": "module",
4
- "version": "0.1.1",
4
+ "version": "0.2.0",
5
+ "packageManager": "pnpm@10.18.3",
5
6
  "description": "",
6
7
  "license": "MIT",
7
8
  "homepage": "https://github.com/supsign/unplugin-interfaces#readme",
@@ -46,6 +47,16 @@
46
47
  "files": [
47
48
  "dist"
48
49
  ],
50
+ "scripts": {
51
+ "build": "tsdown",
52
+ "dev": "tsdown -w",
53
+ "lint": "eslint .",
54
+ "play": "npm -C playground run dev",
55
+ "prepublishOnly": "npm run build",
56
+ "release": "bumpp && pnpm publish",
57
+ "start": "tsx src/index.ts",
58
+ "test": "vitest"
59
+ },
49
60
  "peerDependencies": {
50
61
  "@farmfe/core": ">=1",
51
62
  "@nuxt/kit": "^3",
@@ -97,14 +108,5 @@
97
108
  "vite": "^6.4.0",
98
109
  "vitest": "^3.2.4",
99
110
  "webpack": "^5.102.1"
100
- },
101
- "scripts": {
102
- "build": "tsdown",
103
- "dev": "tsdown -w",
104
- "lint": "eslint .",
105
- "play": "npm -C playground run dev",
106
- "release": "bumpp && pnpm publish",
107
- "start": "tsx src/index.ts",
108
- "test": "vitest"
109
111
  }
110
- }
112
+ }