@poveste/vendors 0.14.0 → 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/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,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "confbox",
|
|
3
|
+
"version": "0.2.4",
|
|
4
|
+
"description": "Compact YAML, TOML, JSONC, JSON5 and INI parser and serializer",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"config",
|
|
7
|
+
"ini",
|
|
8
|
+
"json5",
|
|
9
|
+
"jsonc",
|
|
10
|
+
"toml",
|
|
11
|
+
"unjs",
|
|
12
|
+
"yaml"
|
|
13
|
+
],
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"repository": "unjs/confbox",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"type": "module",
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"types": "./dist/index.d.mts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": "./dist/index.mjs",
|
|
24
|
+
"./ini": "./dist/ini.mjs",
|
|
25
|
+
"./json5": "./dist/json5.mjs",
|
|
26
|
+
"./jsonc": "./dist/jsonc.mjs",
|
|
27
|
+
"./toml": "./dist/toml.mjs",
|
|
28
|
+
"./yaml": "./dist/yaml.mjs"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "obuild",
|
|
32
|
+
"dev": "vitest dev --coverage",
|
|
33
|
+
"bench": "pnpm build && node test/bench.mjs",
|
|
34
|
+
"lint": "oxlint && oxfmt --check src test",
|
|
35
|
+
"lint:fix": "oxlint --fix && oxfmt src test",
|
|
36
|
+
"prepack": "pnpm build",
|
|
37
|
+
"release": "pnpm test && pnpm build && changelogen --release && npm publish && git push --follow-tags",
|
|
38
|
+
"test": "pnpm lint && pnpm test:types && vitest run --coverage",
|
|
39
|
+
"test:types": "tsgo --noEmit --skipLibCheck"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/ini": "^4.1.1",
|
|
43
|
+
"@types/js-yaml": "^4.0.9",
|
|
44
|
+
"@types/node": "^25.2.1",
|
|
45
|
+
"@typescript/native-preview": "7.0.0-dev.20260206.1",
|
|
46
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
47
|
+
"automd": "^0.4.3",
|
|
48
|
+
"changelogen": "^0.6.2",
|
|
49
|
+
"detect-indent": "^7.0.2",
|
|
50
|
+
"ini": "^6.0.0",
|
|
51
|
+
"jiti": "^2.6.1",
|
|
52
|
+
"js-toml": "^1.0.2",
|
|
53
|
+
"js-yaml": "^4.1.1",
|
|
54
|
+
"json5": "^2.2.3",
|
|
55
|
+
"jsonc-parser": "^3.3.1",
|
|
56
|
+
"mitata": "^1.0.34",
|
|
57
|
+
"obuild": "^0.4.26",
|
|
58
|
+
"oxfmt": "^0.28.0",
|
|
59
|
+
"oxlint": "^1.43.0",
|
|
60
|
+
"smol-toml": "^1.6.0",
|
|
61
|
+
"toml": "^3.0.0",
|
|
62
|
+
"typescript": "^5.9.3",
|
|
63
|
+
"vitest": "^4.0.18",
|
|
64
|
+
"yaml": "^2.8.2"
|
|
65
|
+
},
|
|
66
|
+
"packageManager": "pnpm@10.28.2"
|
|
67
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options to configure module resolution.
|
|
3
|
+
*/
|
|
4
|
+
type ResolveOptions = {
|
|
5
|
+
/**
|
|
6
|
+
* A URL, path, or array of URLs/paths from which to resolve the module.
|
|
7
|
+
* If not provided, resolution starts from the current working directory.
|
|
8
|
+
* You can use `import.meta.url` to mimic the behavior of `import.meta.resolve()`.
|
|
9
|
+
* For better performance, use a `file://` URL or path that ends with `/`.
|
|
10
|
+
*/
|
|
11
|
+
from?: string | URL | (string | URL)[];
|
|
12
|
+
/**
|
|
13
|
+
* Resolve cache (enabled by default with a shared global object).
|
|
14
|
+
* Can be set to `false` to disable or a custom `Map` to bring your own cache object.
|
|
15
|
+
*/
|
|
16
|
+
cache?: boolean | Map<string, unknown>;
|
|
17
|
+
/**
|
|
18
|
+
* Additional file extensions to check.
|
|
19
|
+
* For better performance, use explicit extensions and avoid this option.
|
|
20
|
+
*/
|
|
21
|
+
extensions?: string[];
|
|
22
|
+
/**
|
|
23
|
+
* Conditions to apply when resolving package exports.
|
|
24
|
+
* Defaults to `["node", "import"]`.
|
|
25
|
+
* Conditions are applied without order.
|
|
26
|
+
*/
|
|
27
|
+
conditions?: string[];
|
|
28
|
+
/**
|
|
29
|
+
* Path suffixes to check.
|
|
30
|
+
* For better performance, use explicit paths and avoid this option.
|
|
31
|
+
* Example: `["", "/index"]`
|
|
32
|
+
*/
|
|
33
|
+
suffixes?: string[];
|
|
34
|
+
/**
|
|
35
|
+
* If set to `true` and the module cannot be resolved,
|
|
36
|
+
* the resolver returns `undefined` instead of throwing an error.
|
|
37
|
+
*/
|
|
38
|
+
try?: boolean;
|
|
39
|
+
};
|
|
40
|
+
type ResolverOptions = Omit<ResolveOptions, "try">;
|
|
41
|
+
type ResolveRes<Opts extends ResolveOptions> = Opts["try"] extends true ? string | undefined : string;
|
|
42
|
+
/**
|
|
43
|
+
* Synchronously resolves a module url based on the options provided.
|
|
44
|
+
*
|
|
45
|
+
* @param {string} input - The identifier or path of the module to resolve.
|
|
46
|
+
* @param {ResolveOptions} [options] - Options to resolve the module. See {@link ResolveOptions}.
|
|
47
|
+
* @returns {string} The resolved URL as a string.
|
|
48
|
+
*/
|
|
49
|
+
declare function resolveModuleURL<O extends ResolveOptions>(input: string | URL, options?: O): ResolveRes<O>;
|
|
50
|
+
/**
|
|
51
|
+
* Synchronously resolves a module then converts it to a file path
|
|
52
|
+
*
|
|
53
|
+
* (throws error if reolved path is not file:// scheme)
|
|
54
|
+
*
|
|
55
|
+
* @param {string} id - The identifier or path of the module to resolve.
|
|
56
|
+
* @param {ResolveOptions} [options] - Options to resolve the module. See {@link ResolveOptions}.
|
|
57
|
+
* @returns {string} The resolved URL as a string.
|
|
58
|
+
*/
|
|
59
|
+
declare function resolveModulePath<O extends ResolveOptions>(id: string | URL, options?: O): ResolveRes<O>;
|
|
60
|
+
declare function createResolver(defaults?: ResolverOptions): {
|
|
61
|
+
resolveModuleURL: <O extends ResolveOptions>(id: string | URL, opts: ResolveOptions) => ResolveRes<O>;
|
|
62
|
+
resolveModulePath: <O extends ResolveOptions>(id: string | URL, opts: ResolveOptions) => ResolveRes<O>;
|
|
63
|
+
clearResolveCache: () => void;
|
|
64
|
+
};
|
|
65
|
+
declare function clearResolveCache(): void;
|
|
66
|
+
export { type ResolveOptions, type ResolverOptions, clearResolveCache, createResolver, resolveModulePath, resolveModuleURL };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "exsolve",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "Module resolution utilities based on Node.js upstream implementation.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "unjs/exsolve",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"type": "module",
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"types": "./dist/index.d.mts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": "./dist/index.mjs"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "obuild",
|
|
18
|
+
"dev": "vitest dev",
|
|
19
|
+
"lint": "oxlint . && oxfmt --check .",
|
|
20
|
+
"fmt": "automd && oxlint && oxfmt .",
|
|
21
|
+
"node-ts": "node --disable-warning=ExperimentalWarning --experimental-strip-types",
|
|
22
|
+
"prepack": "pnpm build",
|
|
23
|
+
"release": "pnpm test && changelogen --release && npm publish && git push --follow-tags",
|
|
24
|
+
"test": "pnpm lint && pnpm test:types && vitest run --coverage",
|
|
25
|
+
"test:types": "tsc --noEmit --skipLibCheck"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/node": "^26.1.1",
|
|
29
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
30
|
+
"automd": "^0.4.3",
|
|
31
|
+
"changelogen": "^0.6.2",
|
|
32
|
+
"eslint-config-unjs": "^0.6.2",
|
|
33
|
+
"happy-dom": "^20.11.1",
|
|
34
|
+
"jiti": "^2.7.0",
|
|
35
|
+
"obuild": "^0.4.38",
|
|
36
|
+
"oxfmt": "^0.60.0",
|
|
37
|
+
"oxlint": "^1.75.0",
|
|
38
|
+
"typescript": "^7.0.2",
|
|
39
|
+
"vitest": "^4.1.10"
|
|
40
|
+
},
|
|
41
|
+
"packageManager": "pnpm@11.17.0"
|
|
42
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import * as nativeFs from "fs";
|
|
3
|
+
import picomatch from "picomatch";
|
|
4
|
+
|
|
5
|
+
//#region src/api/aborter.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* AbortController is not supported on Node 14 so we use this until we can drop
|
|
8
|
+
* support for Node 14.
|
|
9
|
+
*/
|
|
10
|
+
declare class Aborter {
|
|
11
|
+
aborted: boolean;
|
|
12
|
+
abort(): void;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/api/queue.d.ts
|
|
16
|
+
type OnQueueEmptyCallback = (error: Error | null, output: WalkerState) => void;
|
|
17
|
+
/**
|
|
18
|
+
* This is a custom stateless queue to track concurrent async fs calls.
|
|
19
|
+
* It increments a counter whenever a call is queued and decrements it
|
|
20
|
+
* as soon as it completes. When the counter hits 0, it calls onQueueEmpty.
|
|
21
|
+
*/
|
|
22
|
+
declare class Queue {
|
|
23
|
+
private onQueueEmpty?;
|
|
24
|
+
count: number;
|
|
25
|
+
constructor(onQueueEmpty?: OnQueueEmptyCallback | undefined);
|
|
26
|
+
enqueue(): number;
|
|
27
|
+
dequeue(error: Error | null, output: WalkerState): void;
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/types.d.ts
|
|
31
|
+
type Counts = {
|
|
32
|
+
files: number;
|
|
33
|
+
directories: number;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated use `directories` instead. Will be removed in v7.0.
|
|
36
|
+
*/
|
|
37
|
+
dirs: number;
|
|
38
|
+
};
|
|
39
|
+
type Group = {
|
|
40
|
+
directory: string;
|
|
41
|
+
files: string[];
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated use `directory` instead. Will be removed in v7.0.
|
|
44
|
+
*/
|
|
45
|
+
dir: string;
|
|
46
|
+
};
|
|
47
|
+
type GroupOutput = Group[];
|
|
48
|
+
type OnlyCountsOutput = Counts;
|
|
49
|
+
type PathsOutput = string[];
|
|
50
|
+
type Output = OnlyCountsOutput | PathsOutput | GroupOutput;
|
|
51
|
+
type FSLike = {
|
|
52
|
+
readdir: typeof nativeFs.readdir;
|
|
53
|
+
readdirSync: typeof nativeFs.readdirSync;
|
|
54
|
+
realpath: typeof nativeFs.realpath;
|
|
55
|
+
realpathSync: typeof nativeFs.realpathSync;
|
|
56
|
+
stat: typeof nativeFs.stat;
|
|
57
|
+
statSync: typeof nativeFs.statSync;
|
|
58
|
+
};
|
|
59
|
+
type WalkerState = {
|
|
60
|
+
root: string;
|
|
61
|
+
paths: string[];
|
|
62
|
+
groups: Group[];
|
|
63
|
+
counts: Counts;
|
|
64
|
+
options: Options;
|
|
65
|
+
queue: Queue;
|
|
66
|
+
controller: Aborter;
|
|
67
|
+
fs: FSLike;
|
|
68
|
+
symlinks: Map<string, string>;
|
|
69
|
+
visited: string[];
|
|
70
|
+
};
|
|
71
|
+
type ResultCallback<TOutput extends Output> = (error: Error | null, output: TOutput) => void;
|
|
72
|
+
type FilterPredicate = (path: string, isDirectory: boolean) => boolean;
|
|
73
|
+
type ExcludePredicate = (dirName: string, dirPath: string) => boolean;
|
|
74
|
+
type PathSeparator = "/" | "\\";
|
|
75
|
+
type Options<TGlobFunction = unknown> = {
|
|
76
|
+
includeBasePath?: boolean;
|
|
77
|
+
includeDirs?: boolean;
|
|
78
|
+
normalizePath?: boolean;
|
|
79
|
+
maxDepth: number;
|
|
80
|
+
maxFiles?: number;
|
|
81
|
+
resolvePaths?: boolean;
|
|
82
|
+
suppressErrors: boolean;
|
|
83
|
+
group?: boolean;
|
|
84
|
+
onlyCounts?: boolean;
|
|
85
|
+
filters: FilterPredicate[];
|
|
86
|
+
resolveSymlinks?: boolean;
|
|
87
|
+
useRealPaths?: boolean;
|
|
88
|
+
excludeFiles?: boolean;
|
|
89
|
+
excludeSymlinks?: boolean;
|
|
90
|
+
exclude?: ExcludePredicate;
|
|
91
|
+
relativePaths?: boolean;
|
|
92
|
+
pathSeparator: PathSeparator;
|
|
93
|
+
signal?: AbortSignal;
|
|
94
|
+
globFunction?: TGlobFunction;
|
|
95
|
+
fs?: FSLike;
|
|
96
|
+
};
|
|
97
|
+
type GlobMatcher = (test: string) => boolean;
|
|
98
|
+
type GlobFunction = (glob: string | string[], ...params: unknown[]) => GlobMatcher;
|
|
99
|
+
type GlobParams<T> = T extends ((globs: string | string[], ...params: infer TParams extends unknown[]) => GlobMatcher) ? TParams : [];
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/builder/api-builder.d.ts
|
|
102
|
+
declare class APIBuilder<TReturnType extends Output> {
|
|
103
|
+
private readonly root;
|
|
104
|
+
private readonly options;
|
|
105
|
+
constructor(root: string, options: Options);
|
|
106
|
+
withPromise(): Promise<TReturnType>;
|
|
107
|
+
withCallback(cb: ResultCallback<TReturnType>): void;
|
|
108
|
+
sync(): TReturnType;
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region src/builder/index.d.ts
|
|
112
|
+
declare class Builder<TReturnType extends Output = PathsOutput, TGlobFunction = typeof picomatch> {
|
|
113
|
+
private readonly globCache;
|
|
114
|
+
private options;
|
|
115
|
+
private globFunction?;
|
|
116
|
+
constructor(options?: Partial<Options<TGlobFunction>>);
|
|
117
|
+
group(): Builder<GroupOutput, TGlobFunction>;
|
|
118
|
+
withPathSeparator(separator: "/" | "\\"): this;
|
|
119
|
+
withBasePath(): this;
|
|
120
|
+
withRelativePaths(): this;
|
|
121
|
+
withDirs(): this;
|
|
122
|
+
withMaxDepth(depth: number): this;
|
|
123
|
+
withMaxFiles(limit: number): this;
|
|
124
|
+
withFullPaths(): this;
|
|
125
|
+
withErrors(): this;
|
|
126
|
+
withSymlinks({
|
|
127
|
+
resolvePaths
|
|
128
|
+
}?: {
|
|
129
|
+
resolvePaths?: boolean | undefined;
|
|
130
|
+
}): this;
|
|
131
|
+
withAbortSignal(signal: AbortSignal): this;
|
|
132
|
+
normalize(): this;
|
|
133
|
+
filter(predicate: FilterPredicate): this;
|
|
134
|
+
onlyDirs(): this;
|
|
135
|
+
exclude(predicate: ExcludePredicate): this;
|
|
136
|
+
onlyCounts(): Builder<OnlyCountsOutput, TGlobFunction>;
|
|
137
|
+
crawl(root?: string): APIBuilder<TReturnType>;
|
|
138
|
+
withGlobFunction<TFunc>(fn: TFunc): Builder<TReturnType, TFunc>;
|
|
139
|
+
/**
|
|
140
|
+
* @deprecated Pass options using the constructor instead:
|
|
141
|
+
* ```ts
|
|
142
|
+
* new fdir(options).crawl("/path/to/root");
|
|
143
|
+
* ```
|
|
144
|
+
* This method will be removed in v7.0
|
|
145
|
+
*/
|
|
146
|
+
crawlWithOptions(root: string, options: Partial<Options<TGlobFunction>>): APIBuilder<TReturnType>;
|
|
147
|
+
glob(...patterns: string[]): Builder<TReturnType, TGlobFunction>;
|
|
148
|
+
globWithOptions(patterns: string[]): Builder<TReturnType, TGlobFunction>;
|
|
149
|
+
globWithOptions(patterns: string[], ...options: GlobParams<TGlobFunction>): Builder<TReturnType, TGlobFunction>;
|
|
150
|
+
}
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region src/index.d.ts
|
|
153
|
+
type Fdir = typeof Builder;
|
|
154
|
+
//#endregion
|
|
155
|
+
export { Counts, ExcludePredicate, FSLike, Fdir, FilterPredicate, GlobFunction, GlobMatcher, GlobParams, Group, GroupOutput, OnlyCountsOutput, Options, Output, PathSeparator, PathsOutput, ResultCallback, WalkerState, Builder as fdir };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fdir",
|
|
3
|
+
"version": "6.5.0",
|
|
4
|
+
"description": "The fastest directory crawler & globbing alternative to glob, fast-glob, & tiny-glob. Crawls 1m files in < 1s",
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
|
+
"types": "./dist/index.d.cts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"prepublishOnly": "npm run test && npm run build",
|
|
10
|
+
"build": "tsdown",
|
|
11
|
+
"format": "prettier --write src __tests__ benchmarks",
|
|
12
|
+
"test": "vitest run __tests__/",
|
|
13
|
+
"test:coverage": "vitest run --coverage __tests__/",
|
|
14
|
+
"test:watch": "vitest __tests__/",
|
|
15
|
+
"bench": "ts-node benchmarks/benchmark.js",
|
|
16
|
+
"bench:glob": "ts-node benchmarks/glob-benchmark.ts",
|
|
17
|
+
"bench:fdir": "ts-node benchmarks/fdir-benchmark.ts",
|
|
18
|
+
"release": "./scripts/release.sh"
|
|
19
|
+
},
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=12.0.0"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/thecodrr/fdir.git"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"util",
|
|
29
|
+
"os",
|
|
30
|
+
"sys",
|
|
31
|
+
"fs",
|
|
32
|
+
"walk",
|
|
33
|
+
"crawler",
|
|
34
|
+
"directory",
|
|
35
|
+
"files",
|
|
36
|
+
"io",
|
|
37
|
+
"tiny-glob",
|
|
38
|
+
"glob",
|
|
39
|
+
"fast-glob",
|
|
40
|
+
"speed",
|
|
41
|
+
"javascript",
|
|
42
|
+
"nodejs"
|
|
43
|
+
],
|
|
44
|
+
"author": "thecodrr <thecodrr@protonmail.com>",
|
|
45
|
+
"license": "MIT",
|
|
46
|
+
"bugs": {
|
|
47
|
+
"url": "https://github.com/thecodrr/fdir/issues"
|
|
48
|
+
},
|
|
49
|
+
"homepage": "https://github.com/thecodrr/fdir#readme",
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/glob": "^8.1.0",
|
|
52
|
+
"@types/mock-fs": "^4.13.4",
|
|
53
|
+
"@types/node": "^20.9.4",
|
|
54
|
+
"@types/picomatch": "^4.0.0",
|
|
55
|
+
"@types/tap": "^15.0.11",
|
|
56
|
+
"@vitest/coverage-v8": "^0.34.6",
|
|
57
|
+
"all-files-in-tree": "^1.1.2",
|
|
58
|
+
"benny": "^3.7.1",
|
|
59
|
+
"csv-to-markdown-table": "^1.3.1",
|
|
60
|
+
"expect": "^29.7.0",
|
|
61
|
+
"fast-glob": "^3.3.2",
|
|
62
|
+
"fdir1": "npm:fdir@1.2.0",
|
|
63
|
+
"fdir2": "npm:fdir@2.1.0",
|
|
64
|
+
"fdir3": "npm:fdir@3.4.2",
|
|
65
|
+
"fdir4": "npm:fdir@4.1.0",
|
|
66
|
+
"fdir5": "npm:fdir@5.0.0",
|
|
67
|
+
"fs-readdir-recursive": "^1.1.0",
|
|
68
|
+
"get-all-files": "^4.1.0",
|
|
69
|
+
"glob": "^10.3.10",
|
|
70
|
+
"klaw-sync": "^6.0.0",
|
|
71
|
+
"mock-fs": "^5.2.0",
|
|
72
|
+
"picomatch": "^4.0.2",
|
|
73
|
+
"prettier": "^3.5.3",
|
|
74
|
+
"recur-readdir": "0.0.1",
|
|
75
|
+
"recursive-files": "^1.0.2",
|
|
76
|
+
"recursive-fs": "^2.1.0",
|
|
77
|
+
"recursive-readdir": "^2.2.3",
|
|
78
|
+
"rrdir": "^12.1.0",
|
|
79
|
+
"systeminformation": "^5.21.17",
|
|
80
|
+
"tiny-glob": "^0.2.9",
|
|
81
|
+
"ts-node": "^10.9.1",
|
|
82
|
+
"tsdown": "^0.12.5",
|
|
83
|
+
"typescript": "^5.3.2",
|
|
84
|
+
"vitest": "^0.34.6",
|
|
85
|
+
"walk-sync": "^3.0.0"
|
|
86
|
+
},
|
|
87
|
+
"peerDependencies": {
|
|
88
|
+
"picomatch": "^3 || ^4"
|
|
89
|
+
},
|
|
90
|
+
"peerDependenciesMeta": {
|
|
91
|
+
"picomatch": {
|
|
92
|
+
"optional": true
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"module": "./dist/index.mjs",
|
|
96
|
+
"exports": {
|
|
97
|
+
".": {
|
|
98
|
+
"import": "./dist/index.mjs",
|
|
99
|
+
"require": "./dist/index.cjs"
|
|
100
|
+
},
|
|
101
|
+
"./package.json": "./package.json"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
type HookCallback = (...arguments_: any) => Promise<void> | void;
|
|
2
|
+
interface Hooks {
|
|
3
|
+
[key: string]: HookCallback;
|
|
4
|
+
}
|
|
5
|
+
type HookKeys<T> = keyof T & string;
|
|
6
|
+
type DeprecatedHook<T> = {
|
|
7
|
+
message?: string;
|
|
8
|
+
to: HookKeys<T>;
|
|
9
|
+
};
|
|
10
|
+
type DeprecatedHooks<T> = {
|
|
11
|
+
[name in HookKeys<T>]: DeprecatedHook<T>;
|
|
12
|
+
};
|
|
13
|
+
type ValueOf<C> = C extends Record<any, any> ? C[keyof C] : never;
|
|
14
|
+
type Strings<T> = Exclude<keyof T, number | symbol>;
|
|
15
|
+
type KnownKeys<T> = keyof {
|
|
16
|
+
[K in keyof T as string extends K ? never : number extends K ? never : K]: never;
|
|
17
|
+
};
|
|
18
|
+
type StripGeneric<T> = Pick<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
|
|
19
|
+
type OnlyGeneric<T> = Omit<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
|
|
20
|
+
type Namespaces<T> = ValueOf<{
|
|
21
|
+
[key in Strings<T>]: key extends `${infer Namespace}:${string}` ? Namespace : never;
|
|
22
|
+
}>;
|
|
23
|
+
type BareHooks<T> = ValueOf<{
|
|
24
|
+
[key in Strings<T>]: key extends `${string}:${string}` ? never : key;
|
|
25
|
+
}>;
|
|
26
|
+
type HooksInNamespace<T, Namespace extends string> = ValueOf<{
|
|
27
|
+
[key in Strings<T>]: key extends `${Namespace}:${infer HookName}` ? HookName : never;
|
|
28
|
+
}>;
|
|
29
|
+
type WithoutNamespace<T, Namespace extends string> = {
|
|
30
|
+
[key in HooksInNamespace<T, Namespace>]: `${Namespace}:${key}` extends keyof T ? T[`${Namespace}:${key}`] : never;
|
|
31
|
+
};
|
|
32
|
+
type NestedHooks<T> = (Partial<StripGeneric<T>> | Partial<OnlyGeneric<T>>) & Partial<{
|
|
33
|
+
[key in Namespaces<StripGeneric<T>>]: NestedHooks<WithoutNamespace<T, key>>;
|
|
34
|
+
}> & Partial<{
|
|
35
|
+
[key in BareHooks<StripGeneric<T>>]: T[key];
|
|
36
|
+
}>;
|
|
37
|
+
|
|
38
|
+
type InferCallback<HT, HN extends keyof HT> = HT[HN] extends HookCallback ? HT[HN] : never;
|
|
39
|
+
type InferSpyEvent<HT extends Record<string, any>> = {
|
|
40
|
+
[key in keyof HT]: {
|
|
41
|
+
name: key;
|
|
42
|
+
args: Parameters<HT[key]>;
|
|
43
|
+
context: Record<string, any>;
|
|
44
|
+
};
|
|
45
|
+
}[keyof HT];
|
|
46
|
+
declare class Hookable<HooksT extends Record<string, any> = Record<string, HookCallback>, HookNameT extends HookKeys<HooksT> = HookKeys<HooksT>> {
|
|
47
|
+
private _hooks;
|
|
48
|
+
private _before?;
|
|
49
|
+
private _after?;
|
|
50
|
+
private _deprecatedHooks;
|
|
51
|
+
private _deprecatedMessages?;
|
|
52
|
+
constructor();
|
|
53
|
+
hook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>, options?: {
|
|
54
|
+
allowDeprecated?: boolean;
|
|
55
|
+
}): () => void;
|
|
56
|
+
hookOnce<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): () => void;
|
|
57
|
+
removeHook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): void;
|
|
58
|
+
deprecateHook<NameT extends HookNameT>(name: NameT, deprecated: HookKeys<HooksT> | DeprecatedHook<HooksT>): void;
|
|
59
|
+
deprecateHooks(deprecatedHooks: Partial<Record<HookNameT, DeprecatedHook<HooksT>>>): void;
|
|
60
|
+
addHooks(configHooks: NestedHooks<HooksT>): () => void;
|
|
61
|
+
removeHooks(configHooks: NestedHooks<HooksT>): void;
|
|
62
|
+
removeAllHooks(): void;
|
|
63
|
+
callHook<NameT extends HookNameT>(name: NameT, ...arguments_: Parameters<InferCallback<HooksT, NameT>>): Promise<any>;
|
|
64
|
+
callHookParallel<NameT extends HookNameT>(name: NameT, ...arguments_: Parameters<InferCallback<HooksT, NameT>>): Promise<any[]>;
|
|
65
|
+
callHookWith<NameT extends HookNameT, CallFunction extends (hooks: HookCallback[], arguments_: Parameters<InferCallback<HooksT, NameT>>) => any>(caller: CallFunction, name: NameT, ...arguments_: Parameters<InferCallback<HooksT, NameT>>): ReturnType<CallFunction>;
|
|
66
|
+
beforeEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
|
|
67
|
+
afterEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
|
|
68
|
+
}
|
|
69
|
+
declare function createHooks<T extends Record<string, any>>(): Hookable<T>;
|
|
70
|
+
|
|
71
|
+
declare function flatHooks<T>(configHooks: NestedHooks<T>, hooks?: T, parentName?: string): T;
|
|
72
|
+
declare function mergeHooks<T>(...hooks: NestedHooks<T>[]): T;
|
|
73
|
+
declare function serial<T>(tasks: T[], function_: (task: T) => Promise<any> | any): Promise<any>;
|
|
74
|
+
/** @deprecated */
|
|
75
|
+
declare function serialCaller(hooks: HookCallback[], arguments_?: any[]): Promise<void>;
|
|
76
|
+
/** @deprecated */
|
|
77
|
+
declare function parallelCaller(hooks: HookCallback[], args?: any[]): Promise<void[]>;
|
|
78
|
+
|
|
79
|
+
interface CreateDebuggerOptions {
|
|
80
|
+
/** An optional tag to prefix console logs with */
|
|
81
|
+
tag?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Show hook params to the console output
|
|
84
|
+
*
|
|
85
|
+
* Enabled for browsers by default
|
|
86
|
+
*/
|
|
87
|
+
inspect?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Use group/groupEnd wrapper around logs happening during a specific hook
|
|
90
|
+
*
|
|
91
|
+
* Enabled for browsers by default
|
|
92
|
+
*/
|
|
93
|
+
group?: boolean;
|
|
94
|
+
/** Filter which hooks to enable debugger for. Can be a string prefix or fn. */
|
|
95
|
+
filter?: string | ((event: string) => boolean);
|
|
96
|
+
}
|
|
97
|
+
/** Start debugging hook names and timing in console */
|
|
98
|
+
declare function createDebugger(hooks: Hookable<any>, _options?: CreateDebuggerOptions): {
|
|
99
|
+
/** Stop debugging and remove listeners */
|
|
100
|
+
close: () => void;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export { CreateDebuggerOptions, DeprecatedHook, DeprecatedHooks, HookCallback, HookKeys, Hookable, Hooks, NestedHooks, createDebugger, createHooks, flatHooks, mergeHooks, parallelCaller, serial, serialCaller };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hookable",
|
|
3
|
+
"version": "5.5.3",
|
|
4
|
+
"description": "Awaitable hook system",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"hook",
|
|
7
|
+
"hookable",
|
|
8
|
+
"plugin",
|
|
9
|
+
"tapable",
|
|
10
|
+
"tappable"
|
|
11
|
+
],
|
|
12
|
+
"repository": "unjs/hookable",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"exports": {
|
|
15
|
+
"import": "./dist/index.mjs",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"require": "./dist/index.cjs"
|
|
18
|
+
},
|
|
19
|
+
"main": "./dist/index.cjs",
|
|
20
|
+
"module": "./dist/index.mjs",
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/node": "^18.15.11",
|
|
27
|
+
"@vitest/coverage-c8": "^0.29.8",
|
|
28
|
+
"changelogen": "^0.5.2",
|
|
29
|
+
"eslint": "^8.37.0",
|
|
30
|
+
"eslint-config-unjs": "^0.1.0",
|
|
31
|
+
"expect-type": "^0.15.0",
|
|
32
|
+
"prettier": "^2.8.7",
|
|
33
|
+
"typescript": "^5.0.2",
|
|
34
|
+
"unbuild": "^1.1.2",
|
|
35
|
+
"vite": "^4.2.1",
|
|
36
|
+
"vitest": "^0.29.8"
|
|
37
|
+
},
|
|
38
|
+
"packageManager": "pnpm@8.0.0",
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "unbuild",
|
|
41
|
+
"dev": "vitest",
|
|
42
|
+
"lint": "eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src test",
|
|
43
|
+
"lint:fix": "eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src test -w",
|
|
44
|
+
"prepublish": "pnpm build",
|
|
45
|
+
"release": "pnpm test && pnpm build && changelogen --release --push && pnpm publish",
|
|
46
|
+
"test": "pnpm lint && vitest run --coverage",
|
|
47
|
+
"test:types": "tsc --noEmit"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as quansync_types from 'quansync/types';
|
|
2
|
+
import { PackageJson } from 'pkg-types';
|
|
3
|
+
|
|
4
|
+
interface PackageInfo {
|
|
5
|
+
name: string;
|
|
6
|
+
rootPath: string;
|
|
7
|
+
packageJsonPath: string;
|
|
8
|
+
version: string;
|
|
9
|
+
packageJson: PackageJson;
|
|
10
|
+
}
|
|
11
|
+
interface PackageResolvingOptions {
|
|
12
|
+
paths?: string[];
|
|
13
|
+
/**
|
|
14
|
+
* @default 'auto'
|
|
15
|
+
* Resolve path as posix or win32
|
|
16
|
+
*/
|
|
17
|
+
platform?: 'posix' | 'win32' | 'auto';
|
|
18
|
+
}
|
|
19
|
+
declare function resolveModule(name: string, options?: PackageResolvingOptions): string | undefined;
|
|
20
|
+
declare function importModule<T = any>(path: string): Promise<T>;
|
|
21
|
+
declare function isPackageExists(name: string, options?: PackageResolvingOptions): boolean;
|
|
22
|
+
declare const getPackageInfo: quansync_types.QuansyncFn<{
|
|
23
|
+
name: string;
|
|
24
|
+
version: string | undefined;
|
|
25
|
+
rootPath: string;
|
|
26
|
+
packageJsonPath: string;
|
|
27
|
+
packageJson: PackageJson;
|
|
28
|
+
} | undefined, [name: string, options?: PackageResolvingOptions | undefined]>;
|
|
29
|
+
declare const getPackageInfoSync: (name: string, options?: PackageResolvingOptions | undefined) => {
|
|
30
|
+
name: string;
|
|
31
|
+
version: string | undefined;
|
|
32
|
+
rootPath: string;
|
|
33
|
+
packageJsonPath: string;
|
|
34
|
+
packageJson: PackageJson;
|
|
35
|
+
} | undefined;
|
|
36
|
+
declare const loadPackageJSON: quansync_types.QuansyncFn<PackageJson | null, [cwd?: Args[0] | undefined]>;
|
|
37
|
+
declare const loadPackageJSONSync: (cwd?: Args[0] | undefined) => PackageJson | null;
|
|
38
|
+
declare const isPackageListed: quansync_types.QuansyncFn<boolean, [name: string, cwd?: string | undefined]>;
|
|
39
|
+
declare const isPackageListedSync: (name: string, cwd?: string | undefined) => boolean;
|
|
40
|
+
|
|
41
|
+
export { getPackageInfo, getPackageInfoSync, importModule, isPackageExists, isPackageListed, isPackageListedSync, loadPackageJSON, loadPackageJSONSync, resolveModule };
|
|
42
|
+
export type { PackageInfo, PackageResolvingOptions };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as quansync_types from 'quansync/types';
|
|
2
|
+
import { PackageJson } from 'pkg-types';
|
|
3
|
+
|
|
4
|
+
interface PackageInfo {
|
|
5
|
+
name: string;
|
|
6
|
+
rootPath: string;
|
|
7
|
+
packageJsonPath: string;
|
|
8
|
+
version: string;
|
|
9
|
+
packageJson: PackageJson;
|
|
10
|
+
}
|
|
11
|
+
interface PackageResolvingOptions {
|
|
12
|
+
paths?: string[];
|
|
13
|
+
/**
|
|
14
|
+
* @default 'auto'
|
|
15
|
+
* Resolve path as posix or win32
|
|
16
|
+
*/
|
|
17
|
+
platform?: 'posix' | 'win32' | 'auto';
|
|
18
|
+
}
|
|
19
|
+
declare function resolveModule(name: string, options?: PackageResolvingOptions): string | undefined;
|
|
20
|
+
declare function importModule<T = any>(path: string): Promise<T>;
|
|
21
|
+
declare function isPackageExists(name: string, options?: PackageResolvingOptions): boolean;
|
|
22
|
+
declare const getPackageInfo: quansync_types.QuansyncFn<{
|
|
23
|
+
name: string;
|
|
24
|
+
version: string | undefined;
|
|
25
|
+
rootPath: string;
|
|
26
|
+
packageJsonPath: string;
|
|
27
|
+
packageJson: PackageJson;
|
|
28
|
+
} | undefined, [name: string, options?: PackageResolvingOptions | undefined]>;
|
|
29
|
+
declare const getPackageInfoSync: (name: string, options?: PackageResolvingOptions | undefined) => {
|
|
30
|
+
name: string;
|
|
31
|
+
version: string | undefined;
|
|
32
|
+
rootPath: string;
|
|
33
|
+
packageJsonPath: string;
|
|
34
|
+
packageJson: PackageJson;
|
|
35
|
+
} | undefined;
|
|
36
|
+
declare const loadPackageJSON: quansync_types.QuansyncFn<PackageJson | null, [cwd?: Args[0] | undefined]>;
|
|
37
|
+
declare const loadPackageJSONSync: (cwd?: Args[0] | undefined) => PackageJson | null;
|
|
38
|
+
declare const isPackageListed: quansync_types.QuansyncFn<boolean, [name: string, cwd?: string | undefined]>;
|
|
39
|
+
declare const isPackageListedSync: (name: string, cwd?: string | undefined) => boolean;
|
|
40
|
+
|
|
41
|
+
export { getPackageInfo, getPackageInfoSync, importModule, isPackageExists, isPackageListed, isPackageListedSync, loadPackageJSON, loadPackageJSONSync, resolveModule };
|
|
42
|
+
export type { PackageInfo, PackageResolvingOptions };
|