@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,217 @@
|
|
|
1
|
+
/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */
|
|
2
|
+
import { EventEmitter } from 'node:events';
|
|
3
|
+
import { Stats } from 'node:fs';
|
|
4
|
+
import { type EntryInfo, type ReaddirpOptions, ReaddirpStream } from 'readdirp';
|
|
5
|
+
import { EVENTS as EV, type EventName, NodeFsHandler, type Path, type WatchHandlers } from './handler.js';
|
|
6
|
+
export type AWF = {
|
|
7
|
+
stabilityThreshold: number;
|
|
8
|
+
pollInterval: number;
|
|
9
|
+
};
|
|
10
|
+
type BasicOpts = {
|
|
11
|
+
persistent: boolean;
|
|
12
|
+
ignoreInitial: boolean;
|
|
13
|
+
followSymlinks: boolean;
|
|
14
|
+
cwd?: string;
|
|
15
|
+
usePolling: boolean;
|
|
16
|
+
interval: number;
|
|
17
|
+
binaryInterval: number;
|
|
18
|
+
alwaysStat?: boolean;
|
|
19
|
+
depth?: number;
|
|
20
|
+
ignorePermissionErrors: boolean;
|
|
21
|
+
atomic: boolean | number;
|
|
22
|
+
};
|
|
23
|
+
export type Throttler = {
|
|
24
|
+
timeoutObject: NodeJS.Timeout;
|
|
25
|
+
clear: () => void;
|
|
26
|
+
count: number;
|
|
27
|
+
};
|
|
28
|
+
export type ChokidarOptions = Partial<BasicOpts & {
|
|
29
|
+
ignored: Matcher | Matcher[];
|
|
30
|
+
awaitWriteFinish: boolean | Partial<AWF>;
|
|
31
|
+
}>;
|
|
32
|
+
export type FSWInstanceOptions = BasicOpts & {
|
|
33
|
+
ignored: Matcher[];
|
|
34
|
+
awaitWriteFinish: false | AWF;
|
|
35
|
+
};
|
|
36
|
+
export type ThrottleType = 'readdir' | 'watch' | 'add' | 'remove' | 'change';
|
|
37
|
+
export type EmitArgs = [path: Path, stats?: Stats];
|
|
38
|
+
export type EmitErrorArgs = [error: Error, stats?: Stats];
|
|
39
|
+
export type EmitArgsWithName = [event: EventName, ...EmitArgs];
|
|
40
|
+
export type MatchFunction = (val: string, stats?: Stats) => boolean;
|
|
41
|
+
export interface MatcherObject {
|
|
42
|
+
path: string;
|
|
43
|
+
recursive?: boolean;
|
|
44
|
+
}
|
|
45
|
+
export type Matcher = string | RegExp | MatchFunction | MatcherObject;
|
|
46
|
+
/**
|
|
47
|
+
* Directory entry.
|
|
48
|
+
*/
|
|
49
|
+
declare class DirEntry {
|
|
50
|
+
path: Path;
|
|
51
|
+
_removeWatcher: (dir: string, base: string) => void;
|
|
52
|
+
items: Set<Path>;
|
|
53
|
+
constructor(dir: Path, removeWatcher: (dir: string, base: string) => void);
|
|
54
|
+
add(item: string): void;
|
|
55
|
+
remove(item: string): Promise<void>;
|
|
56
|
+
has(item: string): boolean | undefined;
|
|
57
|
+
getChildren(): string[];
|
|
58
|
+
dispose(): void;
|
|
59
|
+
}
|
|
60
|
+
export declare class WatchHelper {
|
|
61
|
+
fsw: FSWatcher;
|
|
62
|
+
path: string;
|
|
63
|
+
watchPath: string;
|
|
64
|
+
fullWatchPath: string;
|
|
65
|
+
dirParts: string[][];
|
|
66
|
+
followSymlinks: boolean;
|
|
67
|
+
statMethod: 'stat' | 'lstat';
|
|
68
|
+
constructor(path: string, follow: boolean, fsw: FSWatcher);
|
|
69
|
+
entryPath(entry: EntryInfo): Path;
|
|
70
|
+
filterPath(entry: EntryInfo): boolean;
|
|
71
|
+
filterDir(entry: EntryInfo): boolean;
|
|
72
|
+
}
|
|
73
|
+
export interface FSWatcherEventMap {
|
|
74
|
+
[EV.READY]: [];
|
|
75
|
+
[EV.RAW]: Parameters<WatchHandlers['rawEmitter']>;
|
|
76
|
+
[EV.ERROR]: Parameters<WatchHandlers['errHandler']>;
|
|
77
|
+
[EV.ALL]: [event: EventName, ...EmitArgs];
|
|
78
|
+
[EV.ADD]: EmitArgs;
|
|
79
|
+
[EV.CHANGE]: EmitArgs;
|
|
80
|
+
[EV.ADD_DIR]: EmitArgs;
|
|
81
|
+
[EV.UNLINK]: EmitArgs;
|
|
82
|
+
[EV.UNLINK_DIR]: EmitArgs;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Watches files & directories for changes. Emitted events:
|
|
86
|
+
* `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error`
|
|
87
|
+
*
|
|
88
|
+
* new FSWatcher()
|
|
89
|
+
* .add(directories)
|
|
90
|
+
* .on('add', path => log('File', path, 'was added'))
|
|
91
|
+
*/
|
|
92
|
+
export declare class FSWatcher extends EventEmitter<FSWatcherEventMap> {
|
|
93
|
+
closed: boolean;
|
|
94
|
+
options: FSWInstanceOptions;
|
|
95
|
+
_closers: Map<string, Array<any>>;
|
|
96
|
+
_ignoredPaths: Set<Matcher>;
|
|
97
|
+
_throttled: Map<ThrottleType, Map<any, any>>;
|
|
98
|
+
_streams: Set<ReaddirpStream>;
|
|
99
|
+
_symlinkPaths: Map<Path, string | boolean>;
|
|
100
|
+
_watched: Map<string, DirEntry>;
|
|
101
|
+
_pendingWrites: Map<string, any>;
|
|
102
|
+
_pendingUnlinks: Map<string, EmitArgsWithName>;
|
|
103
|
+
_readyCount: number;
|
|
104
|
+
_emitReady: () => void;
|
|
105
|
+
_closePromise?: Promise<void>;
|
|
106
|
+
_userIgnored?: MatchFunction;
|
|
107
|
+
_readyEmitted: boolean;
|
|
108
|
+
_emitRaw: WatchHandlers['rawEmitter'];
|
|
109
|
+
_boundRemove: (dir: string, item: string) => void;
|
|
110
|
+
_nodeFsHandler: NodeFsHandler;
|
|
111
|
+
constructor(_opts?: ChokidarOptions);
|
|
112
|
+
_addIgnoredPath(matcher: Matcher): void;
|
|
113
|
+
_removeIgnoredPath(matcher: Matcher): void;
|
|
114
|
+
/**
|
|
115
|
+
* Adds paths to be watched on an existing FSWatcher instance.
|
|
116
|
+
* @param paths_ file or file list. Other arguments are unused
|
|
117
|
+
*/
|
|
118
|
+
add(paths_: Path | Path[], _origAdd?: string, _internal?: boolean): FSWatcher;
|
|
119
|
+
/**
|
|
120
|
+
* Close watchers or start ignoring events from specified paths.
|
|
121
|
+
*/
|
|
122
|
+
unwatch(paths_: Path | Path[]): FSWatcher;
|
|
123
|
+
/**
|
|
124
|
+
* Close watchers and remove all listeners from watched paths.
|
|
125
|
+
*/
|
|
126
|
+
close(): Promise<void>;
|
|
127
|
+
/**
|
|
128
|
+
* Expose list of watched paths
|
|
129
|
+
* @returns for chaining
|
|
130
|
+
*/
|
|
131
|
+
getWatched(): Record<string, string[]>;
|
|
132
|
+
emitWithAll(event: EventName, args: EmitArgs): void;
|
|
133
|
+
/**
|
|
134
|
+
* Normalize and emit events.
|
|
135
|
+
* Calling _emit DOES NOT MEAN emit() would be called!
|
|
136
|
+
* @param event Type of event
|
|
137
|
+
* @param path File or directory path
|
|
138
|
+
* @param stats arguments to be passed with event
|
|
139
|
+
* @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag
|
|
140
|
+
*/
|
|
141
|
+
_emit(event: EventName, path: Path, stats?: Stats): Promise<this | undefined>;
|
|
142
|
+
/**
|
|
143
|
+
* Common handler for errors
|
|
144
|
+
* @returns The error if defined, otherwise the value of the FSWatcher instance's `closed` flag
|
|
145
|
+
*/
|
|
146
|
+
_handleError(error: Error): Error | boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Helper utility for throttling
|
|
149
|
+
* @param actionType type being throttled
|
|
150
|
+
* @param path being acted upon
|
|
151
|
+
* @param timeout duration of time to suppress duplicate actions
|
|
152
|
+
* @returns tracking object or false if action should be suppressed
|
|
153
|
+
*/
|
|
154
|
+
_throttle(actionType: ThrottleType, path: Path, timeout: number): Throttler | false;
|
|
155
|
+
_incrReadyCount(): number;
|
|
156
|
+
/**
|
|
157
|
+
* Awaits write operation to finish.
|
|
158
|
+
* Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback.
|
|
159
|
+
* @param path being acted upon
|
|
160
|
+
* @param threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished
|
|
161
|
+
* @param event
|
|
162
|
+
* @param awfEmit Callback to be called when ready for event to be emitted.
|
|
163
|
+
*/
|
|
164
|
+
_awaitWriteFinish(path: Path, threshold: number, event: EventName, awfEmit: (err?: Error, stat?: Stats) => void): void;
|
|
165
|
+
/**
|
|
166
|
+
* Determines whether user has asked to ignore this path.
|
|
167
|
+
*/
|
|
168
|
+
_isIgnored(path: Path, stats?: Stats): boolean;
|
|
169
|
+
_isntIgnored(path: Path, stat?: Stats): boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Provides a set of common helpers and properties relating to symlink handling.
|
|
172
|
+
* @param path file or directory pattern being watched
|
|
173
|
+
*/
|
|
174
|
+
_getWatchHelpers(path: Path): WatchHelper;
|
|
175
|
+
/**
|
|
176
|
+
* Provides directory tracking objects
|
|
177
|
+
* @param directory path of the directory
|
|
178
|
+
*/
|
|
179
|
+
_getWatchedDir(directory: string): DirEntry;
|
|
180
|
+
/**
|
|
181
|
+
* Check for read permissions: https://stackoverflow.com/a/11781404/1358405
|
|
182
|
+
*/
|
|
183
|
+
_hasReadPermissions(stats: Stats): boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Handles emitting unlink events for
|
|
186
|
+
* files and directories, and via recursion, for
|
|
187
|
+
* files and directories within directories that are unlinked
|
|
188
|
+
* @param directory within which the following item is located
|
|
189
|
+
* @param item base path of item/directory
|
|
190
|
+
*/
|
|
191
|
+
_remove(directory: string, item: string, isDirectory?: boolean): void;
|
|
192
|
+
/**
|
|
193
|
+
* Closes all watchers for a path
|
|
194
|
+
*/
|
|
195
|
+
_closePath(path: Path): void;
|
|
196
|
+
/**
|
|
197
|
+
* Closes only file-specific watchers
|
|
198
|
+
*/
|
|
199
|
+
_closeFile(path: Path): void;
|
|
200
|
+
_addPathCloser(path: Path, closer: () => void): void;
|
|
201
|
+
_readdirp(root: Path, opts?: Partial<ReaddirpOptions>): ReaddirpStream | undefined;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Instantiates watcher with paths to be tracked.
|
|
205
|
+
* @param paths file / directory paths
|
|
206
|
+
* @param options opts, such as `atomic`, `awaitWriteFinish`, `ignored`, and others
|
|
207
|
+
* @returns an instance of FSWatcher for chaining.
|
|
208
|
+
* @example
|
|
209
|
+
* const watcher = watch('.').on('all', (event, path) => { console.log(event, path); });
|
|
210
|
+
* watch('.', { atomic: true, awaitWriteFinish: true, ignored: (f, stats) => stats?.isFile() && !f.endsWith('.js') })
|
|
211
|
+
*/
|
|
212
|
+
export declare function watch(paths: string | string[], options?: ChokidarOptions): FSWatcher;
|
|
213
|
+
declare const _default: {
|
|
214
|
+
watch: typeof watch;
|
|
215
|
+
FSWatcher: typeof FSWatcher;
|
|
216
|
+
};
|
|
217
|
+
export default _default;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "chokidar",
|
|
3
|
+
"description": "Minimal and efficient cross-platform file watching library",
|
|
4
|
+
"version": "5.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"homepage": "https://github.com/paulmillr/chokidar",
|
|
7
|
+
"author": "Paul Miller (https://paulmillr.com)",
|
|
8
|
+
"files": [
|
|
9
|
+
"index.js",
|
|
10
|
+
"index.d.ts",
|
|
11
|
+
"handler.js",
|
|
12
|
+
"handler.d.ts"
|
|
13
|
+
],
|
|
14
|
+
"main": "./index.js",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"default": "./index.js"
|
|
18
|
+
},
|
|
19
|
+
"./handler.js": {
|
|
20
|
+
"default": "./handler.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"readdirp": "^5.0.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@paulmillr/jsbt": "0.4.5",
|
|
28
|
+
"@types/node": "24.10.1",
|
|
29
|
+
"prettier": "3.5.2",
|
|
30
|
+
"tinyspy": "3.0.2",
|
|
31
|
+
"typescript": "5.9.2",
|
|
32
|
+
"upath": "2.0.1"
|
|
33
|
+
},
|
|
34
|
+
"sideEffects": false,
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">= 20.19.0"
|
|
37
|
+
},
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/paulmillr/chokidar.git"
|
|
41
|
+
},
|
|
42
|
+
"bugs": {
|
|
43
|
+
"url": "https://github.com/paulmillr/chokidar/issues"
|
|
44
|
+
},
|
|
45
|
+
"license": "MIT",
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "tsc",
|
|
48
|
+
"lint": "prettier --check src",
|
|
49
|
+
"format": "prettier --write src",
|
|
50
|
+
"test": "node index.test.js",
|
|
51
|
+
"test:bun1": "bun index.test.js"
|
|
52
|
+
},
|
|
53
|
+
"keywords": [
|
|
54
|
+
"fs",
|
|
55
|
+
"watch",
|
|
56
|
+
"watchFile",
|
|
57
|
+
"watcher",
|
|
58
|
+
"watching",
|
|
59
|
+
"file",
|
|
60
|
+
"fsevents"
|
|
61
|
+
],
|
|
62
|
+
"funding": "https://paulmillr.com/funding/"
|
|
63
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/_format.d.ts
|
|
2
|
+
interface FormatOptions {
|
|
3
|
+
/**
|
|
4
|
+
* A String or Number object that's used to insert white space into the output JSON string for readability purposes.
|
|
5
|
+
*
|
|
6
|
+
* When provided, identation won't be auto detected anymore.
|
|
7
|
+
*/
|
|
8
|
+
indent?: string | number;
|
|
9
|
+
/**
|
|
10
|
+
* Set to `false` to skip indentation preservation.
|
|
11
|
+
*/
|
|
12
|
+
preserveIndentation?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Set to `false` to skip whitespace preservation.
|
|
15
|
+
*/
|
|
16
|
+
preserveWhitespace?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The number of characters to sample from the start of the text.
|
|
19
|
+
*
|
|
20
|
+
* Default: 1024
|
|
21
|
+
*/
|
|
22
|
+
sampleSize?: number;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { FormatOptions as t };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { t as FormatOptions } from "./_chunks/_format.mjs";
|
|
2
|
+
import { JSON5ParseOptions, JSON5StringifyOptions, parseJSON5, stringifyJSON5 } from "./json5.mjs";
|
|
3
|
+
import { JSONCParseError, JSONCParseOptions, parseJSONC, stringifyJSONC } from "./jsonc.mjs";
|
|
4
|
+
import { YAMLParseOptions, YAMLStringifyOptions, parseYAML, stringifyYAML } from "./yaml.mjs";
|
|
5
|
+
import { parseTOML, stringifyTOML } from "./toml.mjs";
|
|
6
|
+
import { INIParseOptions, INIStringifyOptions, parseINI, stringifyINI } from "./ini.mjs";
|
|
7
|
+
|
|
8
|
+
//#region src/json.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* Converts a [JSON](https://www.json.org/json-en.html) string into an object.
|
|
11
|
+
*
|
|
12
|
+
* Indentation status is auto-detected and preserved when stringifying back using `stringifyJSON`
|
|
13
|
+
*/
|
|
14
|
+
declare function parseJSON<T = unknown>(text: string, options?: JSONParseOptions): T;
|
|
15
|
+
/**
|
|
16
|
+
* Converts a JavaScript value to a [JSON](https://www.json.org/json-en.html) string.
|
|
17
|
+
*
|
|
18
|
+
* Indentation status is auto detected and preserved when using value from parseJSON.
|
|
19
|
+
*/
|
|
20
|
+
declare function stringifyJSON(value: any, options?: JSONStringifyOptions): string;
|
|
21
|
+
interface JSONParseOptions extends FormatOptions {
|
|
22
|
+
/**
|
|
23
|
+
* A function that transforms the results. This function is called for each member of the object.
|
|
24
|
+
*/
|
|
25
|
+
reviver?: (this: any, key: string, value: any) => any;
|
|
26
|
+
}
|
|
27
|
+
interface JSONStringifyOptions extends FormatOptions {
|
|
28
|
+
/**
|
|
29
|
+
* A function that transforms the results. This function is called for each member of the object.
|
|
30
|
+
*/
|
|
31
|
+
replacer?: (this: any, key: string, value: any) => any;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { type INIParseOptions, type INIStringifyOptions, type JSON5ParseOptions, type JSON5StringifyOptions, type JSONCParseError, type JSONCParseOptions, type JSONParseOptions, type JSONStringifyOptions, type YAMLParseOptions, type YAMLStringifyOptions, parseINI, parseJSON, parseJSON5, parseJSONC, parseTOML, parseYAML, stringifyINI, stringifyJSON, stringifyJSON5, stringifyJSONC, stringifyTOML, stringifyYAML };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//#region src/ini.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Converts an [INI](https://www.ini.org/ini-en.html) string into an object.
|
|
4
|
+
*
|
|
5
|
+
* **Note:** Style and indentation are not preserved currently.
|
|
6
|
+
*/
|
|
7
|
+
declare function parseINI<T = unknown>(text: string, options?: INIParseOptions): T;
|
|
8
|
+
/**
|
|
9
|
+
* Converts a JavaScript value to an [INI](https://www.ini.org/ini-en.html) string.
|
|
10
|
+
*
|
|
11
|
+
* **Note:** Style and indentation are not preserved currently.
|
|
12
|
+
*/
|
|
13
|
+
declare function stringifyINI(value: any, options?: INIStringifyOptions): string;
|
|
14
|
+
interface INIParseOptions {
|
|
15
|
+
/**
|
|
16
|
+
* Whether to append `[]` to array keys.
|
|
17
|
+
*
|
|
18
|
+
* Some parsers treat duplicate names by themselves as arrays.
|
|
19
|
+
*/
|
|
20
|
+
bracketedArray?: boolean;
|
|
21
|
+
}
|
|
22
|
+
interface INIStringifyOptions {
|
|
23
|
+
/**
|
|
24
|
+
* Whether to insert spaces before & after `=` character.
|
|
25
|
+
* Enabled by default.
|
|
26
|
+
*/
|
|
27
|
+
whitespace?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Whether to align the `=` character for each section.
|
|
30
|
+
*/
|
|
31
|
+
align?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Identifier to use for global items
|
|
34
|
+
* and to prepend to all other sections.
|
|
35
|
+
*/
|
|
36
|
+
section?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Whether to sort all sections & their keys alphabetically.
|
|
39
|
+
*/
|
|
40
|
+
sort?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Whether to insert a newline after each section header.
|
|
43
|
+
*/
|
|
44
|
+
newline?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Which platforms line-endings should be used.
|
|
47
|
+
*
|
|
48
|
+
* win32 -> CR+LF
|
|
49
|
+
* other -> LF
|
|
50
|
+
*
|
|
51
|
+
* Default is the current platform
|
|
52
|
+
*/
|
|
53
|
+
platform?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Whether to append `[]` to array keys.
|
|
56
|
+
*
|
|
57
|
+
* Some parsers treat duplicate names by themselves as arrays
|
|
58
|
+
*/
|
|
59
|
+
bracketedArray?: boolean;
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
export { INIParseOptions, INIStringifyOptions, parseINI, stringifyINI };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { t as FormatOptions } from "./_chunks/_format.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/json5.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Converts a [JSON5](https://json5.org/) string into an object.
|
|
6
|
+
*
|
|
7
|
+
* @template T The type of the return value.
|
|
8
|
+
* @param text The string to parse as JSON5.
|
|
9
|
+
* @param options Parsing options.
|
|
10
|
+
* @returns The JavaScript value converted from the JSON5 string.
|
|
11
|
+
*/
|
|
12
|
+
declare function parseJSON5<T = unknown>(text: string, options?: JSON5ParseOptions): T;
|
|
13
|
+
/**
|
|
14
|
+
* Converts a JavaScript value to a [JSON5](https://json5.org/) string.
|
|
15
|
+
*
|
|
16
|
+
* @param value
|
|
17
|
+
* @param options
|
|
18
|
+
* @returns The JSON string converted from the JavaScript value.
|
|
19
|
+
*/
|
|
20
|
+
declare function stringifyJSON5(value: any, options?: JSON5StringifyOptions): string;
|
|
21
|
+
interface JSON5ParseOptions extends FormatOptions {
|
|
22
|
+
/**
|
|
23
|
+
* A function that alters the behavior of the parsing process, or an array of
|
|
24
|
+
* String and Number objects that serve as a allowlist for selecting/filtering
|
|
25
|
+
* the properties of the value object to be included in the resulting
|
|
26
|
+
* JavaScript object. If this value is null or not provided, all properties of
|
|
27
|
+
* the object are included in the resulting JavaScript object.
|
|
28
|
+
*/
|
|
29
|
+
reviver?: (this: any, key: string, value: any) => any;
|
|
30
|
+
}
|
|
31
|
+
interface JSON5StringifyOptions extends FormatOptions {
|
|
32
|
+
/**
|
|
33
|
+
* A function that alters the behavior of the stringification process, or an
|
|
34
|
+
* array of String and Number objects that serve as a allowlist for
|
|
35
|
+
* selecting/filtering the properties of the value object to be included in
|
|
36
|
+
* the JSON5 string. If this value is null or not provided, all properties
|
|
37
|
+
* of the object are included in the resulting JSON5 string.
|
|
38
|
+
*/
|
|
39
|
+
replacer?: ((this: any, key: string, value: any) => any) | null;
|
|
40
|
+
/**
|
|
41
|
+
* A String or Number object that's used to insert white space into the
|
|
42
|
+
* output JSON5 string for readability purposes. If this is a Number, it
|
|
43
|
+
* indicates the number of space characters to use as white space; this
|
|
44
|
+
* number is capped at 10 (if it is greater, the value is just 10). Values
|
|
45
|
+
* less than 1 indicate that no space should be used. If this is a String,
|
|
46
|
+
* the string (or the first 10 characters of the string, if it's longer than
|
|
47
|
+
* that) is used as white space. If this parameter is not provided (or is
|
|
48
|
+
* null), no white space is used. If white space is used, trailing commas
|
|
49
|
+
* will be used in objects and arrays.
|
|
50
|
+
*/
|
|
51
|
+
space?: string | number | null;
|
|
52
|
+
/**
|
|
53
|
+
* A String representing the quote character to use when serializing
|
|
54
|
+
* strings.
|
|
55
|
+
*/
|
|
56
|
+
quote?: string | null;
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { JSON5ParseOptions, JSON5StringifyOptions, parseJSON5, stringifyJSON5 };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { t as FormatOptions } from "./_chunks/_format.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/jsonc.d.ts
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* Converts a [JSONC](https://github.com/microsoft/node-jsonc-parser) string into an object.
|
|
7
|
+
*
|
|
8
|
+
* @NOTE On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.
|
|
9
|
+
*
|
|
10
|
+
* @NOTE Comments and trailing commas are not preserved after parsing.
|
|
11
|
+
*
|
|
12
|
+
* @template T The type of the return value.
|
|
13
|
+
* @param text The string to parse as JSONC.
|
|
14
|
+
* @param options Parsing options.
|
|
15
|
+
* @returns The JavaScript value converted from the JSONC string.
|
|
16
|
+
*/
|
|
17
|
+
declare function parseJSONC<T = unknown>(text: string, options?: JSONCParseOptions): T;
|
|
18
|
+
/**
|
|
19
|
+
* Converts a JavaScript value to a [JSONC](https://github.com/microsoft/node-jsonc-parser) string.
|
|
20
|
+
*
|
|
21
|
+
* @NOTE Comments and trailing commas are not preserved in the output.
|
|
22
|
+
*
|
|
23
|
+
* @param value
|
|
24
|
+
* @param options
|
|
25
|
+
* @returns The JSON string converted from the JavaScript value.
|
|
26
|
+
*/
|
|
27
|
+
declare function stringifyJSONC(value: any, options?: JSONCStringifyOptions): string;
|
|
28
|
+
interface JSONCParseOptions extends FormatOptions {
|
|
29
|
+
disallowComments?: boolean;
|
|
30
|
+
allowTrailingComma?: boolean;
|
|
31
|
+
allowEmptyContent?: boolean;
|
|
32
|
+
errors?: JSONCParseError[];
|
|
33
|
+
}
|
|
34
|
+
interface JSONCStringifyOptions extends FormatOptions {}
|
|
35
|
+
interface JSONCParseError {
|
|
36
|
+
error: number;
|
|
37
|
+
offset: number;
|
|
38
|
+
length: number;
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { JSONCParseError, JSONCParseOptions, JSONCStringifyOptions, parseJSONC, stringifyJSONC };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/toml.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Converts a [TOML](https://toml.io/) string into an object.
|
|
4
|
+
*
|
|
5
|
+
* @NOTE Comments and indentation is not preserved after parsing.
|
|
6
|
+
*
|
|
7
|
+
* @template T The type of the return value.
|
|
8
|
+
* @param text The TOML string to parse.
|
|
9
|
+
* @returns The JavaScript value converted from the TOML string.
|
|
10
|
+
*/
|
|
11
|
+
declare function parseTOML<T = unknown>(text: string): T;
|
|
12
|
+
/**
|
|
13
|
+
* Converts a JavaScript value to a [TOML](https://toml.io/) string.
|
|
14
|
+
*
|
|
15
|
+
* @NOTE Comments and indentation is not preserved in the output.
|
|
16
|
+
*
|
|
17
|
+
* @param value
|
|
18
|
+
* @param options
|
|
19
|
+
* @returns The YAML string converted from the JavaScript value.
|
|
20
|
+
*/
|
|
21
|
+
declare function stringifyTOML(value: any): string;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { parseTOML, stringifyTOML };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { t as FormatOptions } from "./_chunks/_format.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/yaml.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Converts a [YAML](https://yaml.org/) string into an object.
|
|
6
|
+
*
|
|
7
|
+
* @NOTE This function does **not** understand multi-document sources, it throws exception on those.
|
|
8
|
+
*
|
|
9
|
+
* @NOTE Comments are not preserved after parsing.
|
|
10
|
+
*
|
|
11
|
+
* @NOTE This function does **not** support schema-specific tag resolution restrictions.
|
|
12
|
+
* So, the JSON schema is not as strictly defined in the YAML specification.
|
|
13
|
+
* It allows numbers in any notation, use `Null` and `NULL` as `null`, etc.
|
|
14
|
+
* The core schema also has no such restrictions. It allows binary notation for integers.
|
|
15
|
+
*
|
|
16
|
+
* @template T The type of the return value.
|
|
17
|
+
* @param text The YAML string to parse.
|
|
18
|
+
* @param options Parsing options.
|
|
19
|
+
* @returns The JavaScript value converted from the YAML string.
|
|
20
|
+
*/
|
|
21
|
+
declare function parseYAML<T = unknown>(text: string, options?: YAMLParseOptions): T;
|
|
22
|
+
/**
|
|
23
|
+
* Converts a JavaScript value to a [YAML](https://yaml.org/) string.
|
|
24
|
+
*
|
|
25
|
+
* @NOTE Comments are not preserved in the output.
|
|
26
|
+
*
|
|
27
|
+
* @param value
|
|
28
|
+
* @param options
|
|
29
|
+
* @returns The YAML string converted from the JavaScript value.
|
|
30
|
+
*/
|
|
31
|
+
declare function stringifyYAML(value: any, options?: YAMLStringifyOptions): string;
|
|
32
|
+
interface YAMLParseOptions extends FormatOptions {
|
|
33
|
+
/** string to be used as a file path in error/warning messages. */
|
|
34
|
+
filename?: string | undefined;
|
|
35
|
+
/** function to call on warning messages. */
|
|
36
|
+
onWarning?(this: null, e: YAMLException): void;
|
|
37
|
+
/** specifies a schema to use. */
|
|
38
|
+
schema?: any | undefined;
|
|
39
|
+
/** compatibility with JSON.parse behaviour. */
|
|
40
|
+
json?: boolean | undefined;
|
|
41
|
+
/** listener for parse events */
|
|
42
|
+
listener?(this: any, eventType: any, state: any): void;
|
|
43
|
+
}
|
|
44
|
+
interface YAMLStringifyOptions extends FormatOptions {
|
|
45
|
+
/** indentation width to use (in spaces). */
|
|
46
|
+
indent?: number | undefined;
|
|
47
|
+
/** when true, will not add an indentation level to array elements */
|
|
48
|
+
noArrayIndent?: boolean | undefined;
|
|
49
|
+
/** do not throw on invalid types (like function in the safe schema) and skip pairs and single values with such types. */
|
|
50
|
+
skipInvalid?: boolean | undefined;
|
|
51
|
+
/** specifies level of nesting, when to switch from block to flow style for collections. -1 means block style everwhere */
|
|
52
|
+
flowLevel?: number | undefined;
|
|
53
|
+
/** Each tag may have own set of styles. - "tag" => "style" map. */
|
|
54
|
+
styles?: {
|
|
55
|
+
[x: string]: any;
|
|
56
|
+
} | undefined;
|
|
57
|
+
/** specifies a schema to use. */
|
|
58
|
+
schema?: any | undefined;
|
|
59
|
+
/** if true, sort keys when dumping YAML. If a function, use the function to sort the keys. (default: false) */
|
|
60
|
+
sortKeys?: boolean | ((a: any, b: any) => number) | undefined;
|
|
61
|
+
/** set max line width. (default: 80) */
|
|
62
|
+
lineWidth?: number | undefined;
|
|
63
|
+
/** if true, don't convert duplicate objects into references (default: false) */
|
|
64
|
+
noRefs?: boolean | undefined;
|
|
65
|
+
/** if true don't try to be compatible with older yaml versions. Currently: don't quote "yes", "no" and so on, as required for YAML 1.1 (default: false) */
|
|
66
|
+
noCompatMode?: boolean | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* if true flow sequences will be condensed, omitting the space between `key: value` or `a, b`. Eg. `'[a,b]'` or `{a:{b:c}}`.
|
|
69
|
+
* Can be useful when using yaml for pretty URL query params as spaces are %-encoded. (default: false).
|
|
70
|
+
*/
|
|
71
|
+
condenseFlow?: boolean | undefined;
|
|
72
|
+
/** strings will be quoted using this quoting style. If you specify single quotes, double quotes will still be used for non-printable characters. (default: `'`) */
|
|
73
|
+
quotingType?: "'" | '"' | undefined;
|
|
74
|
+
/** if true, all non-key strings will be quoted even if they normally don't need to. (default: false) */
|
|
75
|
+
forceQuotes?: boolean | undefined;
|
|
76
|
+
/** callback `function (key, value)` called recursively on each key/value in source object (see `replacer` docs for `JSON.stringify`). */
|
|
77
|
+
replacer?: ((key: string, value: any) => any) | undefined;
|
|
78
|
+
}
|
|
79
|
+
interface Mark {
|
|
80
|
+
buffer: string;
|
|
81
|
+
column: number;
|
|
82
|
+
line: number;
|
|
83
|
+
name: string;
|
|
84
|
+
position: number;
|
|
85
|
+
snippet: string;
|
|
86
|
+
}
|
|
87
|
+
declare class YAMLException extends Error {
|
|
88
|
+
constructor(reason?: string, mark?: Mark);
|
|
89
|
+
toString(compact?: boolean): string;
|
|
90
|
+
name: string;
|
|
91
|
+
reason: string;
|
|
92
|
+
message: string;
|
|
93
|
+
mark: Mark;
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
export { YAMLParseOptions, YAMLStringifyOptions, parseYAML, stringifyYAML };
|