@poveste/vendors 0.13.1 → 0.15.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/client/b-floating-vue.js +1 -1
- package/dist/client/b-iconify.js +1429 -1416
- package/dist/client/b-pinia.js +1359 -1936
- package/dist/client/b-vue-router.js +787 -502
- package/dist/client/b-vue-use.js +497 -367
- package/dist/client/b-vue.js +1 -1
- package/dist/client/devtools-api.js +6568 -0
- package/dist/client/index.js +178 -162
- package/dist/client/node_modules/@iconify/vue/dist/iconify.d.ts +17 -72
- package/dist/client/node_modules/@iconify/vue/dist/offline.d.ts +7 -12
- package/dist/client/node_modules/@iconify/vue/offline/package.json +2 -2
- package/dist/client/node_modules/@iconify/vue/package.json +13 -16
- package/dist/client/node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts +88 -0
- package/dist/client/node_modules/@jridgewell/gen-mapping/dist/types/set-array.d.ts +32 -0
- package/dist/client/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts +12 -0
- package/dist/client/node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts +43 -0
- package/dist/client/node_modules/@jridgewell/gen-mapping/package.json +67 -0
- package/dist/client/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts +89 -0
- package/dist/client/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts +33 -0
- package/dist/client/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts +13 -0
- package/dist/client/node_modules/@jridgewell/gen-mapping/types/types.d.mts +44 -0
- package/dist/client/node_modules/@jridgewell/remapping/package.json +71 -0
- package/dist/client/node_modules/@jridgewell/remapping/types/build-source-map-tree.d.mts +15 -0
- package/dist/client/node_modules/@jridgewell/remapping/types/remapping.d.mts +21 -0
- package/dist/client/node_modules/@jridgewell/remapping/types/source-map-tree.d.mts +46 -0
- package/dist/client/node_modules/@jridgewell/remapping/types/source-map.d.mts +19 -0
- package/dist/client/node_modules/@jridgewell/remapping/types/types.d.mts +16 -0
- package/dist/client/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts +4 -0
- package/dist/client/node_modules/@jridgewell/resolve-uri/package.json +69 -0
- package/dist/client/node_modules/@jridgewell/trace-mapping/package.json +67 -0
- package/dist/client/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts +33 -0
- package/dist/client/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts +4 -0
- package/dist/client/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts +9 -0
- package/dist/client/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts +4 -0
- package/dist/client/node_modules/@jridgewell/trace-mapping/types/sort.d.mts +4 -0
- package/dist/client/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts +17 -0
- package/dist/client/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts +5 -0
- package/dist/client/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts +80 -0
- package/dist/client/node_modules/@jridgewell/trace-mapping/types/types.d.mts +107 -0
- package/dist/client/node_modules/@vue/devtools-api/dist/index-node.d.ts +11 -0
- package/dist/client/node_modules/@vue/devtools-api/dist/index.d.ts +2 -0
- package/dist/client/node_modules/@vue/devtools-api/package.json +25 -24
- package/dist/client/node_modules/@vue/devtools-kit/dist/index.d.ts +1170 -0
- package/dist/client/node_modules/@vue/devtools-kit/global.d.ts +20 -0
- package/dist/client/node_modules/@vue/devtools-kit/package.json +44 -0
- package/dist/client/node_modules/@vue/devtools-kit/types.d.ts +2 -0
- package/dist/client/node_modules/@vue/devtools-shared/dist/index.d.ts +40 -0
- package/dist/client/node_modules/@vue/devtools-shared/package.json +33 -0
- package/dist/client/node_modules/@vue-macros/common/dist/index.d.ts +124 -0
- package/dist/client/node_modules/@vue-macros/common/package.json +63 -0
- package/dist/client/node_modules/@vueuse/core/dist/index.d.ts +223 -111
- package/dist/client/node_modules/@vueuse/core/package.json +10 -3
- package/dist/client/node_modules/@vueuse/metadata/package.json +4 -1
- package/dist/client/node_modules/@vueuse/shared/dist/index.d.ts +2 -2
- package/dist/client/node_modules/@vueuse/shared/package.json +4 -1
- package/dist/client/node_modules/acorn/dist/acorn.d.mts +897 -0
- package/dist/client/node_modules/acorn/dist/acorn.d.ts +897 -0
- package/dist/client/node_modules/acorn/package.json +50 -0
- package/dist/client/node_modules/ast-kit/dist/index.d.ts +380 -0
- package/dist/client/node_modules/ast-kit/package.json +63 -0
- package/dist/client/node_modules/ast-walker-scope/dist/index.d.mts +51 -0
- package/dist/client/node_modules/ast-walker-scope/package.json +60 -0
- package/dist/client/node_modules/birpc/dist/index.d.mts +215 -0
- package/dist/client/node_modules/birpc/dist/index.d.ts +215 -0
- package/dist/client/node_modules/birpc/package.json +57 -0
- package/dist/client/node_modules/chokidar/handler.d.ts +90 -0
- package/dist/client/node_modules/chokidar/index.d.ts +217 -0
- package/dist/client/node_modules/chokidar/package.json +63 -0
- package/dist/client/node_modules/confbox/dist/_chunks/_format.d.mts +25 -0
- package/dist/client/node_modules/confbox/dist/index.d.mts +34 -0
- package/dist/client/node_modules/confbox/dist/ini.d.mts +62 -0
- package/dist/client/node_modules/confbox/dist/json5.d.mts +59 -0
- package/dist/client/node_modules/confbox/dist/jsonc.d.mts +41 -0
- package/dist/client/node_modules/confbox/dist/toml.d.mts +23 -0
- package/dist/client/node_modules/confbox/dist/yaml.d.mts +96 -0
- package/dist/client/node_modules/confbox/package.json +67 -0
- package/dist/client/node_modules/exsolve/dist/index.d.mts +66 -0
- package/dist/client/node_modules/exsolve/package.json +42 -0
- package/dist/client/node_modules/fdir/dist/index.d.mts +155 -0
- package/dist/client/node_modules/fdir/package.json +103 -0
- package/dist/client/node_modules/hookable/dist/index.d.ts +103 -0
- package/dist/client/node_modules/hookable/package.json +49 -0
- package/dist/client/node_modules/local-pkg/dist/index.d.mts +42 -0
- package/dist/client/node_modules/local-pkg/dist/index.d.ts +42 -0
- package/dist/client/node_modules/local-pkg/package.json +65 -0
- package/dist/client/node_modules/magic-string-ast/dist/index.d.ts +67 -0
- package/dist/client/node_modules/magic-string-ast/package.json +64 -0
- package/dist/client/node_modules/mlly/dist/index.d.mts +564 -0
- package/dist/client/node_modules/mlly/dist/index.d.ts +564 -0
- package/dist/client/node_modules/mlly/node_modules/confbox/dist/index.d.mts +32 -0
- package/dist/client/node_modules/mlly/node_modules/confbox/dist/index.d.ts +32 -0
- package/dist/client/node_modules/mlly/node_modules/confbox/dist/json5.d.mts +58 -0
- package/dist/client/node_modules/mlly/node_modules/confbox/dist/json5.d.ts +58 -0
- package/dist/client/node_modules/mlly/node_modules/confbox/dist/jsonc.d.mts +41 -0
- package/dist/client/node_modules/mlly/node_modules/confbox/dist/jsonc.d.ts +41 -0
- package/dist/client/node_modules/mlly/node_modules/confbox/dist/shared/confbox.9745c98f.d.mts +24 -0
- package/dist/client/node_modules/mlly/node_modules/confbox/dist/shared/confbox.9745c98f.d.ts +24 -0
- package/dist/client/node_modules/mlly/node_modules/confbox/dist/toml.d.mts +22 -0
- package/dist/client/node_modules/mlly/node_modules/confbox/dist/toml.d.ts +22 -0
- package/dist/client/node_modules/mlly/node_modules/confbox/dist/yaml.d.mts +95 -0
- package/dist/client/node_modules/mlly/node_modules/confbox/dist/yaml.d.ts +95 -0
- package/dist/client/node_modules/mlly/node_modules/confbox/json5.d.ts +2 -0
- package/dist/client/node_modules/mlly/node_modules/confbox/jsonc.d.ts +2 -0
- package/dist/client/node_modules/mlly/node_modules/confbox/package.json +86 -0
- package/dist/client/node_modules/mlly/node_modules/confbox/toml.d.ts +2 -0
- package/dist/client/node_modules/mlly/node_modules/confbox/yaml.d.ts +2 -0
- package/dist/client/node_modules/mlly/node_modules/pkg-types/dist/index.d.mts +411 -0
- package/dist/client/node_modules/mlly/node_modules/pkg-types/dist/index.d.ts +411 -0
- package/dist/client/node_modules/mlly/node_modules/pkg-types/package.json +47 -0
- package/dist/client/node_modules/mlly/package.json +55 -0
- package/dist/client/node_modules/muggle-string/out/base.d.ts +6 -0
- package/dist/client/node_modules/muggle-string/out/basic.d.ts +6 -0
- package/dist/client/node_modules/muggle-string/out/binarySearch.d.ts +1 -0
- package/dist/client/node_modules/muggle-string/out/common.d.ts +9 -0
- package/dist/client/node_modules/muggle-string/out/getLength.d.ts +2 -0
- package/dist/client/node_modules/muggle-string/out/index.d.ts +10 -0
- package/dist/client/node_modules/muggle-string/out/map.d.ts +3 -0
- package/dist/client/node_modules/muggle-string/out/overwriteSource.d.ts +3 -0
- package/dist/client/node_modules/muggle-string/out/replace.d.ts +3 -0
- package/dist/client/node_modules/muggle-string/out/segment.d.ts +6 -0
- package/dist/client/node_modules/muggle-string/out/sourceBased.d.ts +3 -0
- package/dist/client/node_modules/muggle-string/out/toString.d.ts +2 -0
- package/dist/client/node_modules/muggle-string/out/track.d.ts +6 -0
- package/dist/client/node_modules/muggle-string/out/types.d.ts +16 -0
- package/dist/client/node_modules/muggle-string/package.json +22 -0
- package/dist/client/node_modules/nanoid/package.json +1 -1
- package/dist/client/node_modules/nostics/dist/diagnostic-wduO7saY.d.mts +295 -0
- package/dist/client/node_modules/nostics/dist/formatters/ansi.d.mts +15 -0
- package/dist/client/node_modules/nostics/dist/formatters/json.d.mts +7 -0
- package/dist/client/node_modules/nostics/dist/index.d.mts +51 -0
- package/dist/client/node_modules/nostics/dist/reporters/dev.d.mts +13 -0
- package/dist/client/node_modules/nostics/dist/reporters/fetch.d.mts +11 -0
- package/dist/client/node_modules/nostics/dist/reporters/node.d.mts +43 -0
- package/dist/client/node_modules/nostics/package.json +125 -0
- package/dist/client/node_modules/pathe/dist/index.d.mts +47 -0
- package/dist/client/node_modules/pathe/dist/index.d.ts +47 -0
- package/dist/client/node_modules/pathe/dist/utils.d.mts +32 -0
- package/dist/client/node_modules/pathe/dist/utils.d.ts +32 -0
- package/dist/client/node_modules/pathe/package.json +61 -0
- package/dist/client/node_modules/pathe/utils.d.ts +1 -0
- package/dist/client/node_modules/perfect-debounce/dist/index.d.mts +49 -0
- package/dist/client/node_modules/perfect-debounce/package.json +41 -0
- package/dist/client/node_modules/picomatch/package.json +83 -0
- package/dist/client/node_modules/pinia/dist/pinia.d.ts +937 -1056
- package/dist/client/node_modules/pinia/package.json +53 -67
- package/dist/client/node_modules/pkg-types/dist/index.d.mts +695 -0
- package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/_chunks/_format.d.mts +22 -0
- package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/_chunks/libs/js-yaml.d.mts +33 -0
- package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/index.d.mts +7 -0
- package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/ini.d.mts +59 -0
- package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/json.d.mts +25 -0
- package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/json5.d.mts +55 -0
- package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/jsonc.d.mts +29 -0
- package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/toml.d.mts +20 -0
- package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/yaml.d.mts +101 -0
- package/dist/client/node_modules/pkg-types/node_modules/confbox/package.json +68 -0
- package/dist/client/node_modules/pkg-types/package.json +47 -0
- package/dist/client/node_modules/quansync/dist/index.d.mts +22 -0
- package/dist/client/node_modules/quansync/dist/index.d.ts +22 -0
- package/dist/client/node_modules/quansync/dist/macro.d.mts +18 -0
- package/dist/client/node_modules/quansync/dist/macro.d.ts +18 -0
- package/dist/client/node_modules/quansync/dist/types.d.mts +27 -0
- package/dist/client/node_modules/quansync/dist/types.d.ts +27 -0
- package/dist/client/node_modules/quansync/package.json +95 -0
- package/dist/client/node_modules/readdirp/index.d.ts +117 -0
- package/dist/client/node_modules/readdirp/package.json +62 -0
- package/dist/client/node_modules/scule/dist/index.d.mts +57 -0
- package/dist/client/node_modules/scule/dist/index.d.ts +57 -0
- package/dist/client/node_modules/scule/package.json +43 -0
- package/dist/client/node_modules/tinyglobby/dist/index.d.mts +148 -0
- package/dist/client/node_modules/tinyglobby/package.json +70 -0
- package/dist/client/node_modules/ufo/dist/index.d.mts +714 -0
- package/dist/client/node_modules/ufo/dist/index.d.ts +714 -0
- package/dist/client/node_modules/ufo/package.json +48 -0
- package/dist/client/node_modules/unplugin/dist/index.d.mts +241 -0
- package/dist/client/node_modules/unplugin/dist/rspack/loaders/load.d.mts +4 -0
- package/dist/client/node_modules/unplugin/dist/rspack/loaders/transform.d.mts +4 -0
- package/dist/client/node_modules/unplugin/dist/webpack/loaders/load.d.mts +4 -0
- package/dist/client/node_modules/unplugin/dist/webpack/loaders/transform.d.mts +4 -0
- package/dist/client/node_modules/unplugin/package.json +146 -0
- package/dist/client/node_modules/unplugin-utils/dist/index.d.ts +31 -0
- package/dist/client/node_modules/unplugin-utils/package.json +61 -0
- package/dist/client/node_modules/vue-router/dist/experimental/index.d.ts +7 -0
- package/dist/client/node_modules/vue-router/dist/experimental/pinia-colada.d.ts +151 -0
- package/dist/client/node_modules/vue-router/dist/{router-CWoNjPRp.d.mts → index-D7ja2BKs.d.ts} +2480 -1160
- package/dist/client/node_modules/vue-router/dist/options-CwYZKRl4.d.mts +2923 -0
- package/dist/client/node_modules/vue-router/dist/unplugin/esbuild.d.mts +10 -0
- package/dist/client/node_modules/vue-router/dist/unplugin/index.d.mts +62 -0
- package/dist/client/node_modules/vue-router/dist/unplugin/options.d.mts +7 -0
- package/dist/client/node_modules/vue-router/dist/unplugin/rolldown.d.mts +10 -0
- package/dist/client/node_modules/vue-router/dist/unplugin/rollup.d.mts +10 -0
- package/dist/client/node_modules/vue-router/dist/unplugin/types.d.mts +7 -0
- package/dist/client/node_modules/vue-router/dist/unplugin/vite.d.mts +10 -0
- package/dist/client/node_modules/vue-router/dist/unplugin/webpack.d.mts +10 -0
- package/dist/client/node_modules/vue-router/dist/vue-router.d.ts +7 -0
- package/dist/client/node_modules/vue-router/package.json +153 -95
- package/dist/client/node_modules/vue-router/vue-router-auto-resolver.d.mts +22 -17
- package/dist/client/node_modules/vue-router/vue-router-auto-routes.d.mts +53 -0
- package/dist/client/node_modules/vue-router/vue-router-auto.d.ts +2 -1
- package/dist/client/node_modules/webpack-virtual-modules/lib/index.d.ts +15 -0
- package/dist/client/node_modules/webpack-virtual-modules/lib/virtual-stats.d.ts +11 -0
- package/dist/client/node_modules/webpack-virtual-modules/package.json +82 -0
- package/dist/client/vue.runtime.esm-bundler.js +1 -176
- package/package.json +8 -7
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/api.d.ts +0 -108
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/app.d.ts +0 -1
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/component.d.ts +0 -78
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/context.d.ts +0 -5
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/hooks.d.ts +0 -180
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/index.d.ts +0 -6
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/util.d.ts +0 -4
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/const.d.ts +0 -2
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/env.d.ts +0 -15
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/index.d.ts +0 -18
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/plugin.d.ts +0 -47
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/proxy.d.ts +0 -20
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/time.d.ts +0 -2
- package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/index.d.ts +0 -22
- package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2/index.d.ts +0 -33
- package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2.7/index.d.ts +0 -38
- package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v3/index.d.ts +0 -22
- package/dist/client/node_modules/pinia/node_modules/vue-demi/package.json +0 -47
- package/dist/client/node_modules/vue-router/dist/experimental/index.d.mts +0 -38
- package/dist/client/node_modules/vue-router/dist/vue-router.d.mts +0 -361
- package/dist/client/node_modules/vue-router/vue-router-auto-routes.d.ts +0 -4
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ufo",
|
|
3
|
+
"version": "1.6.4",
|
|
4
|
+
"description": "URL utils for humans",
|
|
5
|
+
"repository": "unjs/ufo",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.cjs",
|
|
13
|
+
"default": "./dist/index.mjs"
|
|
14
|
+
},
|
|
15
|
+
"./*": "./*"
|
|
16
|
+
},
|
|
17
|
+
"main": "./dist/index.cjs",
|
|
18
|
+
"module": "./dist/index.mjs",
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "automd && unbuild",
|
|
25
|
+
"automd": "automd",
|
|
26
|
+
"dev": "vitest",
|
|
27
|
+
"lint": "eslint . && prettier -c src test",
|
|
28
|
+
"lint:fix": "eslint --fix . && prettier -w src test",
|
|
29
|
+
"prepack": "pnpm build",
|
|
30
|
+
"release": "pnpm test && changelogen --release && npm publish && git push --follow-tags",
|
|
31
|
+
"test": "pnpm lint && vitest run --typecheck"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/node": "^25.6.0",
|
|
35
|
+
"@vitest/coverage-v8": "^4.1.5",
|
|
36
|
+
"automd": "^0.4.3",
|
|
37
|
+
"changelogen": "^0.6.2",
|
|
38
|
+
"eslint": "^10.2.1",
|
|
39
|
+
"eslint-config-unjs": "^0.6.2",
|
|
40
|
+
"jiti": "^2.6.1",
|
|
41
|
+
"prettier": "^3.8.3",
|
|
42
|
+
"typescript": "^6.0.3",
|
|
43
|
+
"unbuild": "^3.6.1",
|
|
44
|
+
"untyped": "^2.0.0",
|
|
45
|
+
"vitest": "^4.1.5"
|
|
46
|
+
},
|
|
47
|
+
"packageManager": "pnpm@10.33.2"
|
|
48
|
+
}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import VirtualModulesPlugin from "webpack-virtual-modules";
|
|
2
|
+
import { CompilationContext, JsPlugin } from "@farmfe/core";
|
|
3
|
+
import { RsbuildPlugin } from "@rsbuild/core";
|
|
4
|
+
import { Compilation, Compiler as RspackCompiler, LoaderContext, RspackPluginInstance } from "@rspack/core";
|
|
5
|
+
import { BunPlugin, Loader, PluginBuilder } from "bun";
|
|
6
|
+
import { BuildOptions, Loader as Loader$1, Plugin as EsbuildPlugin, PluginBuild } from "esbuild";
|
|
7
|
+
import { Plugin as RolldownPlugin } from "rolldown";
|
|
8
|
+
import { EmittedAsset, Plugin as RollupPlugin, PluginContextMeta, SourceMapInput } from "rollup";
|
|
9
|
+
import { Plugin as UnloaderPlugin } from "unloader";
|
|
10
|
+
import { Plugin as VitePlugin } from "vite";
|
|
11
|
+
import { Compilation as Compilation$1, Compiler as WebpackCompiler, LoaderContext as LoaderContext$1, WebpackPluginInstance } from "webpack";
|
|
12
|
+
//#region src/types.d.ts
|
|
13
|
+
export type Thenable<T> = T | Promise<T>;
|
|
14
|
+
/**
|
|
15
|
+
* Null or whatever
|
|
16
|
+
*/
|
|
17
|
+
export type Nullable<T> = T | null | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Array, or not yet
|
|
20
|
+
*/
|
|
21
|
+
export type Arrayable<T> = T | Array<T>;
|
|
22
|
+
export interface SourceMapCompact {
|
|
23
|
+
file?: string | undefined;
|
|
24
|
+
mappings: string;
|
|
25
|
+
names: string[];
|
|
26
|
+
sourceRoot?: string | undefined;
|
|
27
|
+
sources: string[];
|
|
28
|
+
sourcesContent?: (string | null)[] | undefined;
|
|
29
|
+
version: number;
|
|
30
|
+
}
|
|
31
|
+
export type TransformResult = string | {
|
|
32
|
+
code: string;
|
|
33
|
+
map?: SourceMapInput | SourceMapCompact | null | undefined;
|
|
34
|
+
} | null | undefined | void;
|
|
35
|
+
export interface ExternalIdResult {
|
|
36
|
+
id: string;
|
|
37
|
+
external?: boolean | undefined;
|
|
38
|
+
}
|
|
39
|
+
export type NativeBuildContext = {
|
|
40
|
+
framework: "webpack";
|
|
41
|
+
compiler: WebpackCompiler;
|
|
42
|
+
compilation?: Compilation$1 | undefined;
|
|
43
|
+
loaderContext?: LoaderContext$1<{
|
|
44
|
+
unpluginName: string;
|
|
45
|
+
}> | undefined;
|
|
46
|
+
inputSourceMap?: any;
|
|
47
|
+
} | {
|
|
48
|
+
framework: "esbuild";
|
|
49
|
+
build: PluginBuild;
|
|
50
|
+
} | {
|
|
51
|
+
framework: "rspack";
|
|
52
|
+
compiler: RspackCompiler;
|
|
53
|
+
compilation: Compilation;
|
|
54
|
+
loaderContext?: LoaderContext | undefined;
|
|
55
|
+
inputSourceMap?: any;
|
|
56
|
+
} | {
|
|
57
|
+
framework: "farm";
|
|
58
|
+
context: CompilationContext;
|
|
59
|
+
} | {
|
|
60
|
+
framework: "bun";
|
|
61
|
+
build: PluginBuilder;
|
|
62
|
+
};
|
|
63
|
+
export interface UnpluginBuildContext {
|
|
64
|
+
addWatchFile: (id: string) => void;
|
|
65
|
+
emitFile: (emittedFile: EmittedAsset) => void;
|
|
66
|
+
getWatchFiles: () => string[];
|
|
67
|
+
parse: (input: string, options?: any) => any;
|
|
68
|
+
getNativeBuildContext?: (() => NativeBuildContext) | undefined;
|
|
69
|
+
}
|
|
70
|
+
export type StringOrRegExp = string | RegExp;
|
|
71
|
+
export type FilterPattern = Arrayable<StringOrRegExp>;
|
|
72
|
+
export type StringFilter = FilterPattern | {
|
|
73
|
+
include?: FilterPattern | undefined;
|
|
74
|
+
exclude?: FilterPattern | undefined;
|
|
75
|
+
};
|
|
76
|
+
export interface ResolveIdHookFilter {
|
|
77
|
+
id?: RegExp | undefined;
|
|
78
|
+
}
|
|
79
|
+
export interface LoadHookFilter {
|
|
80
|
+
id?: StringFilter | undefined;
|
|
81
|
+
}
|
|
82
|
+
export interface TransformHookFilter extends LoadHookFilter {
|
|
83
|
+
code?: StringFilter | undefined;
|
|
84
|
+
}
|
|
85
|
+
export interface ObjectHook<T extends HookFnMap[keyof HookFnMap], F> {
|
|
86
|
+
filter?: F | undefined;
|
|
87
|
+
handler: T;
|
|
88
|
+
}
|
|
89
|
+
export type Hook<T extends HookFnMap[keyof HookFnMap], F> = T | ObjectHook<T, F>;
|
|
90
|
+
export interface HookFnMap {
|
|
91
|
+
buildStart: (this: UnpluginBuildContext) => Thenable<void>;
|
|
92
|
+
buildEnd: (this: UnpluginBuildContext) => Thenable<void>;
|
|
93
|
+
transform: (this: UnpluginBuildContext & UnpluginContext, code: string, id: string) => Thenable<TransformResult>;
|
|
94
|
+
load: (this: UnpluginBuildContext & UnpluginContext, id: string) => Thenable<TransformResult>;
|
|
95
|
+
resolveId: (this: UnpluginBuildContext & UnpluginContext, id: string, importer: string | undefined, options: {
|
|
96
|
+
isEntry: boolean;
|
|
97
|
+
}) => Thenable<string | ExternalIdResult | null | undefined>;
|
|
98
|
+
writeBundle: (this: void) => Thenable<void>;
|
|
99
|
+
}
|
|
100
|
+
export interface UnpluginOptions {
|
|
101
|
+
name: string;
|
|
102
|
+
enforce?: "post" | "pre" | undefined;
|
|
103
|
+
buildStart?: HookFnMap["buildStart"] | undefined;
|
|
104
|
+
buildEnd?: HookFnMap["buildEnd"] | undefined;
|
|
105
|
+
transform?: Hook<HookFnMap["transform"], TransformHookFilter> | undefined;
|
|
106
|
+
load?: Hook<HookFnMap["load"], LoadHookFilter> | undefined;
|
|
107
|
+
resolveId?: Hook<HookFnMap["resolveId"], ResolveIdHookFilter> | undefined;
|
|
108
|
+
writeBundle?: HookFnMap["writeBundle"] | undefined;
|
|
109
|
+
watchChange?: ((this: UnpluginBuildContext, id: string, change: {
|
|
110
|
+
event: "create" | "update" | "delete";
|
|
111
|
+
}) => void) | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* Custom predicate function to filter modules to be loaded.
|
|
114
|
+
* When omitted, all modules will be included (might have potential perf impact on Webpack).
|
|
115
|
+
*
|
|
116
|
+
* @deprecated Use `load.filter` instead.
|
|
117
|
+
*/
|
|
118
|
+
loadInclude?: ((id: string) => boolean | null | undefined) | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* Custom predicate function to filter modules to be transformed.
|
|
121
|
+
* When omitted, all modules will be included (might have potential perf impact on Webpack).
|
|
122
|
+
*
|
|
123
|
+
* @deprecated Use `transform.filter` instead.
|
|
124
|
+
*/
|
|
125
|
+
transformInclude?: ((id: string) => boolean | null | undefined) | undefined;
|
|
126
|
+
rollup?: Partial<RollupPlugin> | undefined;
|
|
127
|
+
webpack?: ((compiler: WebpackCompiler) => void) | undefined;
|
|
128
|
+
rspack?: ((compiler: RspackCompiler) => void) | undefined;
|
|
129
|
+
rsbuild?: Partial<RsbuildPlugin> | undefined;
|
|
130
|
+
vite?: Partial<VitePlugin> | undefined;
|
|
131
|
+
unloader?: Partial<UnloaderPlugin> | undefined;
|
|
132
|
+
rolldown?: Partial<RolldownPlugin> | undefined;
|
|
133
|
+
esbuild?: {
|
|
134
|
+
onResolveFilter?: RegExp | undefined;
|
|
135
|
+
onLoadFilter?: RegExp | undefined;
|
|
136
|
+
loader?: Loader$1 | ((code: string, id: string) => Loader$1) | undefined;
|
|
137
|
+
setup?: ((build: PluginBuild) => void | Promise<void>) | undefined;
|
|
138
|
+
config?: ((options: BuildOptions) => void) | undefined;
|
|
139
|
+
} | undefined;
|
|
140
|
+
farm?: Partial<JsPlugin> | undefined;
|
|
141
|
+
bun?: {
|
|
142
|
+
loader?: Loader | ((code: string, id: string) => Loader) | undefined;
|
|
143
|
+
setup?: ((build: PluginBuilder) => void | Promise<void>) | undefined;
|
|
144
|
+
} | undefined;
|
|
145
|
+
}
|
|
146
|
+
export interface ResolvedUnpluginOptions extends UnpluginOptions {
|
|
147
|
+
__vfs?: VirtualModulesPlugin | undefined;
|
|
148
|
+
__vfsModules?: Map<string, Promise<unknown>> | Set<string> | undefined;
|
|
149
|
+
__virtualModulePrefix: string;
|
|
150
|
+
}
|
|
151
|
+
export type UnpluginFactory<UserOptions, Nested extends boolean = boolean> = (options: UserOptions, meta: UnpluginContextMeta) => Nested extends true ? Array<UnpluginOptions> : UnpluginOptions;
|
|
152
|
+
export type UnpluginFactoryOutput<UserOptions, Return> = undefined extends UserOptions ? (options?: UserOptions | undefined) => Return : (options: UserOptions) => Return;
|
|
153
|
+
export interface UnpluginInstance<UserOptions, Nested extends boolean = boolean> {
|
|
154
|
+
rollup: UnpluginFactoryOutput<UserOptions, Nested extends true ? Array<RollupPlugin> : RollupPlugin>;
|
|
155
|
+
vite: UnpluginFactoryOutput<UserOptions, Nested extends true ? Array<VitePlugin> : VitePlugin>;
|
|
156
|
+
rolldown: UnpluginFactoryOutput<UserOptions, Nested extends true ? Array<RolldownPlugin> : RolldownPlugin>;
|
|
157
|
+
webpack: UnpluginFactoryOutput<UserOptions, WebpackPluginInstance>;
|
|
158
|
+
rspack: UnpluginFactoryOutput<UserOptions, RspackPluginInstance>;
|
|
159
|
+
rsbuild: UnpluginFactoryOutput<UserOptions, Nested extends true ? Array<RsbuildPlugin> : RsbuildPlugin>;
|
|
160
|
+
esbuild: UnpluginFactoryOutput<UserOptions, EsbuildPlugin>;
|
|
161
|
+
unloader: UnpluginFactoryOutput<UserOptions, Nested extends true ? Array<UnloaderPlugin> : UnloaderPlugin>;
|
|
162
|
+
farm: UnpluginFactoryOutput<UserOptions, JsPlugin>;
|
|
163
|
+
bun: UnpluginFactoryOutput<UserOptions, BunPlugin>;
|
|
164
|
+
raw: UnpluginFactory<UserOptions, Nested>;
|
|
165
|
+
}
|
|
166
|
+
export type SupportedFramework = "rollup" | "vite" | "rolldown" | "farm" | "unloader" | "webpack" | "rspack" | "rsbuild" | "esbuild" | "bun";
|
|
167
|
+
export type UnpluginContextMeta = Partial<PluginContextMeta> & {
|
|
168
|
+
/**
|
|
169
|
+
* Version information for frameworks.
|
|
170
|
+
* Access the current framework version via: `meta.versions[meta.framework]`
|
|
171
|
+
*
|
|
172
|
+
* For Vite, includes both Vite's version and the underlying bundler (Rollup/Rolldown).
|
|
173
|
+
* For Rollup-compatible frameworks (vite, rollup, rolldown, unloader),
|
|
174
|
+
* versions are only available after the `buildStart` hook.
|
|
175
|
+
*
|
|
176
|
+
* The `unplugin` version is always available for all frameworks.
|
|
177
|
+
*/
|
|
178
|
+
versions: Partial<Record<SupportedFramework | "unplugin", string>>;
|
|
179
|
+
} & ({
|
|
180
|
+
framework: "rollup" | "vite" | "rolldown" | "farm" | "unloader";
|
|
181
|
+
} | {
|
|
182
|
+
framework: "webpack";
|
|
183
|
+
webpack: {
|
|
184
|
+
compiler: WebpackCompiler;
|
|
185
|
+
};
|
|
186
|
+
} | {
|
|
187
|
+
framework: "esbuild";
|
|
188
|
+
/** Set the host plugin name of esbuild when returning multiple plugins */
|
|
189
|
+
esbuildHostName?: string | undefined;
|
|
190
|
+
} | {
|
|
191
|
+
framework: "bun";
|
|
192
|
+
/** Set the host plugin name of bun when returning multiple plugins */
|
|
193
|
+
bunHostName?: string | undefined;
|
|
194
|
+
} | {
|
|
195
|
+
framework: "rspack";
|
|
196
|
+
rspack: {
|
|
197
|
+
compiler: RspackCompiler;
|
|
198
|
+
};
|
|
199
|
+
} | {
|
|
200
|
+
framework: "rsbuild";
|
|
201
|
+
});
|
|
202
|
+
export interface UnpluginMessage {
|
|
203
|
+
name?: string | undefined;
|
|
204
|
+
id?: string | undefined;
|
|
205
|
+
message: string;
|
|
206
|
+
stack?: string | undefined;
|
|
207
|
+
code?: string | undefined;
|
|
208
|
+
plugin?: string | undefined;
|
|
209
|
+
pluginCode?: unknown | undefined;
|
|
210
|
+
loc?: {
|
|
211
|
+
column: number;
|
|
212
|
+
file?: string | undefined;
|
|
213
|
+
line: number;
|
|
214
|
+
} | undefined;
|
|
215
|
+
meta?: any;
|
|
216
|
+
}
|
|
217
|
+
export interface UnpluginContext {
|
|
218
|
+
error: (message: string | UnpluginMessage) => void;
|
|
219
|
+
warn: (message: string | UnpluginMessage) => void;
|
|
220
|
+
}
|
|
221
|
+
//#endregion
|
|
222
|
+
//#region src/define.d.ts
|
|
223
|
+
export declare function createUnplugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginInstance<UserOptions, Nested>;
|
|
224
|
+
export declare function createEsbuildPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginInstance<UserOptions>["esbuild"];
|
|
225
|
+
export declare function createRollupPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginInstance<UserOptions>["rollup"];
|
|
226
|
+
export declare function createVitePlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginInstance<UserOptions>["vite"];
|
|
227
|
+
export declare function createRolldownPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginInstance<UserOptions>["rolldown"];
|
|
228
|
+
export declare function createWebpackPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginInstance<UserOptions>["webpack"];
|
|
229
|
+
export declare function createRspackPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginInstance<UserOptions>["rspack"];
|
|
230
|
+
export declare function createRsbuildPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginInstance<UserOptions, Nested>["rsbuild"];
|
|
231
|
+
export declare function createFarmPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginInstance<UserOptions>["farm"];
|
|
232
|
+
export declare function createUnloaderPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginInstance<UserOptions>["unloader"];
|
|
233
|
+
export declare function createBunPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginInstance<UserOptions>["bun"];
|
|
234
|
+
//#endregion
|
|
235
|
+
//#region src/utils/parse.d.ts
|
|
236
|
+
export declare function setParseImpl(customParse: (code: string, opts?: any) => any): void;
|
|
237
|
+
//#endregion
|
|
238
|
+
//#region src/index.d.ts
|
|
239
|
+
export declare const version: string;
|
|
240
|
+
//#endregion
|
|
241
|
+
export type { BunPlugin, EsbuildPlugin, RolldownPlugin, RollupPlugin, RsbuildPlugin, RspackCompiler, RspackPluginInstance, UnloaderPlugin, VitePlugin, WebpackCompiler, WebpackPluginInstance };
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "unplugin",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "3.4.0",
|
|
5
|
+
"description": "Unified plugin system for build tools",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://unplugin.unjs.io",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/unjs/unplugin.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/unjs/unplugin/issues"
|
|
14
|
+
},
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"exports": {
|
|
17
|
+
".": "./dist/index.mjs",
|
|
18
|
+
"./rspack/loaders/load": "./dist/rspack/loaders/load.mjs",
|
|
19
|
+
"./rspack/loaders/transform": "./dist/rspack/loaders/transform.mjs",
|
|
20
|
+
"./webpack/loaders/load": "./dist/webpack/loaders/load.mjs",
|
|
21
|
+
"./webpack/loaders/transform": "./dist/webpack/loaders/transform.mjs",
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
"types": "./dist/index.d.mts",
|
|
25
|
+
"files": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
30
|
+
},
|
|
31
|
+
"devEngines": {
|
|
32
|
+
"packageManager": {
|
|
33
|
+
"name": "pnpm",
|
|
34
|
+
"version": "12.4.2",
|
|
35
|
+
"onFail": "download"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"tag": "beta"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"@farmfe/core": "*",
|
|
43
|
+
"@rsbuild/core": "*",
|
|
44
|
+
"@rspack/core": "*",
|
|
45
|
+
"bun-types-no-globals": "*",
|
|
46
|
+
"esbuild": "*",
|
|
47
|
+
"rolldown": "*",
|
|
48
|
+
"rollup": "*",
|
|
49
|
+
"unloader": "*",
|
|
50
|
+
"vite": "*",
|
|
51
|
+
"webpack": "*"
|
|
52
|
+
},
|
|
53
|
+
"peerDependenciesMeta": {
|
|
54
|
+
"@farmfe/core": {
|
|
55
|
+
"optional": true
|
|
56
|
+
},
|
|
57
|
+
"@rsbuild/core": {
|
|
58
|
+
"optional": true
|
|
59
|
+
},
|
|
60
|
+
"@rspack/core": {
|
|
61
|
+
"optional": true
|
|
62
|
+
},
|
|
63
|
+
"bun-types-no-globals": {
|
|
64
|
+
"optional": true
|
|
65
|
+
},
|
|
66
|
+
"esbuild": {
|
|
67
|
+
"optional": true
|
|
68
|
+
},
|
|
69
|
+
"rolldown": {
|
|
70
|
+
"optional": true
|
|
71
|
+
},
|
|
72
|
+
"rollup": {
|
|
73
|
+
"optional": true
|
|
74
|
+
},
|
|
75
|
+
"unloader": {
|
|
76
|
+
"optional": true
|
|
77
|
+
},
|
|
78
|
+
"vite": {
|
|
79
|
+
"optional": true
|
|
80
|
+
},
|
|
81
|
+
"webpack": {
|
|
82
|
+
"optional": true
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"dependencies": {
|
|
86
|
+
"@jridgewell/remapping": "^2.3.5",
|
|
87
|
+
"picomatch": "^4.0.7",
|
|
88
|
+
"webpack-virtual-modules": "^0.6.2"
|
|
89
|
+
},
|
|
90
|
+
"devDependencies": {
|
|
91
|
+
"@antfu/eslint-config": "^9.5.1",
|
|
92
|
+
"@antfu/ni": "^30.6.0",
|
|
93
|
+
"@arethetypeswrong/core": "^0.18.5",
|
|
94
|
+
"@farmfe/cli": "^1.0.5",
|
|
95
|
+
"@farmfe/core": "^1.7.11",
|
|
96
|
+
"@rsbuild/core": "^2.2.7",
|
|
97
|
+
"@rspack/cli": "^2.2.5",
|
|
98
|
+
"@rspack/core": "^2.2.5",
|
|
99
|
+
"@types/node": "^26.4.1",
|
|
100
|
+
"@types/picomatch": "^4.0.3",
|
|
101
|
+
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
102
|
+
"ansis": "^4.4.0",
|
|
103
|
+
"bumpp": "^12.3.0",
|
|
104
|
+
"bun-types-no-globals": "^1.4.2",
|
|
105
|
+
"esbuild": "^0.28.2",
|
|
106
|
+
"eslint": "^10.10.0",
|
|
107
|
+
"eslint-plugin-format": "^2.0.1",
|
|
108
|
+
"lint-staged": "^17.5.1",
|
|
109
|
+
"magic-string": "^1.4.1",
|
|
110
|
+
"publint": "^0.3.24",
|
|
111
|
+
"rolldown": "^1.2.8",
|
|
112
|
+
"rollup": "^4.63.3",
|
|
113
|
+
"simple-git-hooks": "^2.14.0",
|
|
114
|
+
"tsdown": "^0.23.0",
|
|
115
|
+
"typescript": "~6.0.3",
|
|
116
|
+
"unloader": "^0.10.1",
|
|
117
|
+
"unplugin": "3.4.0",
|
|
118
|
+
"unplugin-unused": "^0.6.0",
|
|
119
|
+
"vite": "^8.3.0",
|
|
120
|
+
"vitest": "^5.0.1",
|
|
121
|
+
"webpack": "^5.111.0",
|
|
122
|
+
"webpack-cli": "^7.2.3"
|
|
123
|
+
},
|
|
124
|
+
"resolutions": {
|
|
125
|
+
"esbuild": "catalog:peer"
|
|
126
|
+
},
|
|
127
|
+
"simple-git-hooks": {
|
|
128
|
+
"pre-commit": "pnpm i --frozen-lockfile --ignore-scripts --offline && pnpm exec lint-staged"
|
|
129
|
+
},
|
|
130
|
+
"lint-staged": {
|
|
131
|
+
"*": "eslint --fix"
|
|
132
|
+
},
|
|
133
|
+
"scripts": {
|
|
134
|
+
"build": "tsdown",
|
|
135
|
+
"dev": "tsdown --watch src",
|
|
136
|
+
"lint": "eslint --cache .",
|
|
137
|
+
"lint:fix": "nr lint --fix",
|
|
138
|
+
"typecheck": "tsgo --noEmit",
|
|
139
|
+
"docs:dev": "pnpm -C docs run dev",
|
|
140
|
+
"docs:build": "pnpm -C docs run build",
|
|
141
|
+
"docs:gen-files": "pnpm -C docs run gen-files",
|
|
142
|
+
"release": "bumpp",
|
|
143
|
+
"test": "nr test:build && vitest run",
|
|
144
|
+
"test:build": "node scripts/buildFixtures.ts"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region src/filter.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* A valid `picomatch` glob pattern, or array of patterns.
|
|
4
|
+
*/
|
|
5
|
+
type FilterPattern = ReadonlyArray<string | RegExp> | string | RegExp | null;
|
|
6
|
+
/**
|
|
7
|
+
* Constructs a filter function which can be used to determine whether or not
|
|
8
|
+
* certain modules should be operated upon.
|
|
9
|
+
* @param include If `include` is omitted or has zero length, filter will return `true` by default.
|
|
10
|
+
* @param exclude ID must not match any of the `exclude` patterns.
|
|
11
|
+
* @param options Additional options.
|
|
12
|
+
* @param options.resolve Optionally resolves the patterns against a directory other than `process.cwd()`.
|
|
13
|
+
* If a `string` is specified, then the value will be used as the base directory.
|
|
14
|
+
* Relative paths will be resolved against `process.cwd()` first.
|
|
15
|
+
* If `false`, then the patterns will not be resolved against any directory.
|
|
16
|
+
* This can be useful if you want to create a filter for virtual module names.
|
|
17
|
+
*/
|
|
18
|
+
declare function createFilter(include?: FilterPattern, exclude?: FilterPattern, options?: {
|
|
19
|
+
resolve?: string | false | null;
|
|
20
|
+
}): (id: string | unknown) => boolean;
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/path.d.ts
|
|
23
|
+
/**
|
|
24
|
+
* Converts path separators to forward slash.
|
|
25
|
+
*/
|
|
26
|
+
declare function normalizePath(filename: string): string;
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/utils.d.ts
|
|
29
|
+
declare function toArray<T>(thing: readonly T[] | T | undefined | null): readonly T[];
|
|
30
|
+
//#endregion
|
|
31
|
+
export { FilterPattern, createFilter, normalizePath, toArray };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "unplugin-utils",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.3.2",
|
|
5
|
+
"description": "A set of utility functions commonly used by unplugins.",
|
|
6
|
+
"author": "Kevin Deng <sxzz@sxzz.moe>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"funding": "https://github.com/sponsors/sxzz",
|
|
9
|
+
"homepage": "https://github.com/sxzz/unplugin-utils#readme",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/sxzz/unplugin-utils.git"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/sxzz/unplugin-utils/issues"
|
|
16
|
+
},
|
|
17
|
+
"exports": {
|
|
18
|
+
".": "./dist/index.js",
|
|
19
|
+
"./package.json": "./package.json"
|
|
20
|
+
},
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public"
|
|
27
|
+
},
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=20.19.0"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"pathe": "^2.0.3",
|
|
33
|
+
"picomatch": "^4.0.4"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@sxzz/eslint-config": "^8.2.1",
|
|
37
|
+
"@sxzz/prettier-config": "^2.3.1",
|
|
38
|
+
"@types/node": "^26.0.1",
|
|
39
|
+
"@types/picomatch": "^4.0.3",
|
|
40
|
+
"@typescript/native-preview": "7.0.0-dev.20260629.1",
|
|
41
|
+
"@vitest/coverage-v8": "4.1.9",
|
|
42
|
+
"bumpp": "^11.1.0",
|
|
43
|
+
"eslint": "^10.6.0",
|
|
44
|
+
"prettier": "^3.9.3",
|
|
45
|
+
"tsdown": "^0.22.3",
|
|
46
|
+
"tsdown-preset-sxzz": "^0.6.0",
|
|
47
|
+
"typescript": "^6.0.3",
|
|
48
|
+
"vitest": "^4.1.9"
|
|
49
|
+
},
|
|
50
|
+
"prettier": "@sxzz/prettier-config",
|
|
51
|
+
"scripts": {
|
|
52
|
+
"lint": "eslint --cache .",
|
|
53
|
+
"lint:fix": "pnpm run lint --fix",
|
|
54
|
+
"build": "tsdown",
|
|
55
|
+
"dev": "tsdown --watch",
|
|
56
|
+
"test": "vitest",
|
|
57
|
+
"typecheck": "tsgo --noEmit",
|
|
58
|
+
"format": "prettier --cache --write .",
|
|
59
|
+
"release": "bumpp"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* vue-router v5.3.1
|
|
3
|
+
* (c) 2026 Eduardo San Martin Morote
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
import { $n as defineParamParserRaw, An as MatchMiss, Bn as EXPERIMENTAL_RouterOptions, Cn as ParamParserTypeOf, Dn as PathParamNamesForFilePath, En as ParamParsers_Native, Fn as EXPERIMENTAL_RouteRecordRaw, Gn as createFixedResolver, Hn as EXPERIMENTAL_Router_Base, In as EXPERIMENTAL_RouteRecord_Base, Jn as ExtractParamParserType, Kn as MatcherPatternQuery, Ln as EXPERIMENTAL_RouteRecord_Group, Mn as EXPERIMENTAL_RouteRecordNormalized, Nn as EXPERIMENTAL_RouteRecordNormalized_Group, On as _mergeRouteRecord, Pn as EXPERIMENTAL_RouteRecordNormalized_Matchable, Qn as defineParamParser, Rn as EXPERIMENTAL_RouteRecord_Matchable, Sn as ParamParserType, Tn as ParamParsers, Un as experimental_createRouter, Vn as EXPERIMENTAL_RouterOptions_Base, Wn as normalizeRouteRecord, Xn as PARAM_PARSER_INT, Yn as normalizeParamParser, Zn as PARAM_PARSER_BOOL, _ as getCurrentContext, _n as defineBasicLoader, a as DefineLoaderFn, ar as MatcherPatternPath, b as withLoaderContext, bn as DefinePageQueryParamOptions, c as UseDataLoaderResult, cn as NavigationResult, cr as MatcherPatternPathStatic, d as DataLoaderPluginOptions, dn as DefineDataLoaderOptions, f as NavigationResult$1, fn as DefineDataLoaderOptions_DefinedData, fr as ParamParser, gn as UseDataLoaderBasic_LaxData, h as useIsDataLoading, hn as UseDataLoaderBasic_DefinedData, i as DefineDataLoaderOptionsBase_LaxData, ir as MatcherPatternHash, jn as miss, kn as definePage, l as toLazyValue, ln as DataLoaderBasicEntry, lr as MatcherQueryParams, m as reroute, mn as UseDataLoaderBasic, n as DataLoaderEntryBase, nr as MatcherParamsFormatted, o as UseDataLoader, or as MatcherPatternPathDynamic, p as SetupLoaderGuardOptions, pn as DefineDataLoaderOptions_LaxData, qn as MatcherPatternQueryParam, r as DefineDataLoaderOptionsBase_DefinedData, rr as MatcherPattern, s as UseDataLoaderInternals, sr as MatcherPatternPathDynamic_ParamOptions, t as DataLoaderContextBase, tr as EmptyParams, u as DataLoaderPlugin, un as DataLoaderContext, ur as MatcherQueryParamsValue, v as setCurrentContext, vn as ErrorDefault, wn as ParamParserType_Native, xn as DefinePageQueryParamOptionsAny, y as trackRoute, yn as DefinePage, zn as EXPERIMENTAL_Router } from "../index-D7ja2BKs.js";
|
|
7
|
+
export { type DataLoaderBasicEntry, type DataLoaderContext, type DataLoaderContextBase, type DataLoaderEntryBase, DataLoaderPlugin, type DataLoaderPluginOptions, type DefineDataLoaderOptions, type DefineDataLoaderOptionsBase_DefinedData, type DefineDataLoaderOptionsBase_LaxData, type DefineDataLoaderOptions_DefinedData, type DefineDataLoaderOptions_LaxData, type DefineLoaderFn, type DefinePage, type DefinePageQueryParamOptions, type EXPERIMENTAL_RouteRecordNormalized, type EXPERIMENTAL_RouteRecordNormalized_Group, type EXPERIMENTAL_RouteRecordNormalized_Matchable, type EXPERIMENTAL_RouteRecordRaw, type EXPERIMENTAL_RouteRecord_Base, type EXPERIMENTAL_RouteRecord_Group, type EXPERIMENTAL_RouteRecord_Matchable, type EXPERIMENTAL_Router, type EXPERIMENTAL_RouterOptions, type EXPERIMENTAL_RouterOptions_Base, type EXPERIMENTAL_Router_Base, type EmptyParams, type ErrorDefault, type MatcherParamsFormatted, type MatcherPattern, type MatcherPatternHash, type MatcherPatternPath, MatcherPatternPathDynamic, type MatcherPatternPathDynamic_ParamOptions, MatcherPatternPathStatic, type MatcherPatternQuery, MatcherPatternQueryParam, type MatcherQueryParams, type MatcherQueryParamsValue, NavigationResult, PARAM_PARSER_BOOL, PARAM_PARSER_INT, type ParamParser, type ParamParserType, type ParamParserTypeOf, type ParamParserType_Native, type SetupLoaderGuardOptions, type UseDataLoader, type UseDataLoaderBasic, type UseDataLoaderBasic_DefinedData, type UseDataLoaderBasic_LaxData, type UseDataLoaderInternals, type UseDataLoaderResult, type DefinePageQueryParamOptionsAny as _DefinePageQueryParamOptionsAny, type ExtractParamParserType as _ExtractParamParserType, MatchMiss as _MatchMiss, NavigationResult$1 as _NavigationResult, type ParamParsers as _ParamParsers, type ParamParsers_Native as _ParamParsers_Native, type PathParamNamesForFilePath as _PathParamNamesForFilePath, _mergeRouteRecord, normalizeParamParser as _normalizeParamParser, createFixedResolver, defineBasicLoader, definePage, defineParamParser, defineParamParserRaw, experimental_createRouter, getCurrentContext, miss, normalizeRouteRecord, reroute, setCurrentContext, toLazyValue, trackRoute, useIsDataLoading, withLoaderContext };
|