@mokup/shared 1.1.4 → 2.0.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/README.md +58 -0
- package/dist/chokidar.d.mts +3 -8
- package/dist/chokidar.d.ts +3 -9
- package/dist/chokidar.mjs +2 -1
- package/dist/chunk-_iGcCiPk.mjs +28 -0
- package/dist/{config-core.d.cts → config-core-dqVMz7on.d.mts} +3 -2
- package/dist/config-core-dqVMz7on.d.ts +5 -0
- package/dist/config-core.d.mts +2 -4
- package/dist/config-core.d.ts +2 -4
- package/dist/config-core.mjs +3 -2
- package/dist/config-utils-DFu0_9tl.d.mts +59 -0
- package/dist/config-utils-DFu0_9tl.d.ts +59 -0
- package/dist/config-utils.d.mts +3 -62
- package/dist/config-utils.d.ts +3 -62
- package/dist/config-utils.mjs +143 -159
- package/dist/define-config-CzB1-X1m.d.mts +20 -0
- package/dist/define-config-CzB1-X1m.d.ts +20 -0
- package/dist/define-config.d.mts +2 -20
- package/dist/define-config.d.ts +2 -20
- package/dist/define-config.mjs +146 -162
- package/dist/diagnostic-types-DqAzUbgn.d.mts +39 -0
- package/dist/diagnostic-types-DqAzUbgn.d.ts +39 -0
- package/dist/diagnostic-types.d.mts +2 -0
- package/dist/diagnostic-types.d.ts +2 -0
- package/dist/diagnostic-types.mjs +29 -0
- package/dist/diagnostics-C3QaEtqE.d.mts +101 -0
- package/dist/diagnostics-C3QaEtqE.d.ts +101 -0
- package/dist/diagnostics.d.mts +2 -0
- package/dist/diagnostics.d.ts +2 -0
- package/dist/diagnostics.mjs +129 -0
- package/dist/hono.d.mts +4 -3
- package/dist/hono.d.ts +4 -3
- package/dist/hono.mjs +4 -3
- package/dist/index-5prVUGOX.d.mts +113 -0
- package/dist/index-5prVUGOX.d.ts +113 -0
- package/dist/index.d.mts +13 -10
- package/dist/index.d.ts +13 -10
- package/dist/index.mjs +13 -18
- package/dist/jsonc-parser.d.mts +1 -1
- package/dist/jsonc-parser.d.ts +1 -1
- package/dist/jsonc-parser.mjs +8 -1
- package/dist/jsonc-utils-_Hs6a39T.d.mts +7 -0
- package/dist/jsonc-utils-_Hs6a39T.d.ts +7 -0
- package/dist/jsonc-utils.d.mts +2 -7
- package/dist/jsonc-utils.d.ts +2 -7
- package/dist/jsonc-utils.mjs +20 -20
- package/dist/load-rules-D_kCpu9I.d.mts +14 -0
- package/dist/load-rules-D_kCpu9I.d.ts +14 -0
- package/dist/load-rules.d.mts +2 -14
- package/dist/load-rules.d.ts +2 -14
- package/dist/load-rules.mjs +16 -34
- package/dist/logger-types-BbqYCr6j.d.mts +50 -0
- package/dist/logger-types-BbqYCr6j.d.ts +50 -0
- package/dist/logger.browser.d.mts +4 -3
- package/dist/logger.browser.d.ts +4 -3
- package/dist/logger.browser.mjs +49 -48
- package/dist/logger.d.mts +4 -3
- package/dist/logger.d.ts +4 -3
- package/dist/logger.mjs +49 -48
- package/dist/{mock-files.d.cts → mock-files-DfGigWmY.d.mts} +5 -5
- package/dist/mock-files-DfGigWmY.d.ts +10 -0
- package/dist/mock-files.d.mts +2 -10
- package/dist/mock-files.d.ts +2 -10
- package/dist/mock-files.mjs +38 -50
- package/dist/{module-loader.d.cts → module-loader-nAQlwo3D.d.mts} +7 -6
- package/dist/module-loader-nAQlwo3D.d.ts +14 -0
- package/dist/module-loader.d.mts +2 -13
- package/dist/module-loader.d.ts +2 -13
- package/dist/module-loader.mjs +60 -69
- package/dist/path-utils.d.mts +3 -2
- package/dist/path-utils.d.ts +3 -2
- package/dist/path-utils.mjs +25 -35
- package/dist/pathe.d.mts +1 -1
- package/dist/pathe.d.ts +1 -1
- package/dist/pathe.mjs +8 -1
- package/dist/playground-grouping.d.mts +6 -6
- package/dist/playground-grouping.d.ts +6 -6
- package/dist/playground-grouping.mjs +57 -77
- package/dist/rolldown.d.mts +37 -0
- package/dist/rolldown.d.ts +37 -0
- package/dist/rolldown.mjs +81 -0
- package/dist/{route-constants.d.cts → route-constants-BUi36iYR.d.mts} +3 -2
- package/dist/route-constants-BUi36iYR.d.ts +8 -0
- package/dist/route-constants.d.mts +2 -7
- package/dist/route-constants.d.ts +2 -7
- package/dist/route-constants.mjs +25 -21
- package/dist/route-utils-BiWFUqo-.d.mts +42 -0
- package/dist/route-utils-BiWFUqo-.d.ts +42 -0
- package/dist/route-utils.d.mts +2 -42
- package/dist/route-utils.d.ts +2 -42
- package/dist/route-utils.mjs +94 -121
- package/dist/scan-utils.d.mts +2 -114
- package/dist/scan-utils.d.ts +2 -114
- package/dist/scan-utils.mjs +14 -25
- package/dist/timing.d.mts +3 -2
- package/dist/timing.d.ts +3 -2
- package/dist/timing.mjs +11 -12
- package/package.json +88 -128
- package/dist/chokidar.cjs +0 -11
- package/dist/chokidar.d.cts +0 -9
- package/dist/config-core.cjs +0 -9
- package/dist/config-utils.cjs +0 -179
- package/dist/config-utils.d.cts +0 -62
- package/dist/define-config.cjs +0 -169
- package/dist/define-config.d.cts +0 -20
- package/dist/esbuild.cjs +0 -16
- package/dist/esbuild.d.cts +0 -1
- package/dist/esbuild.d.mts +0 -1
- package/dist/esbuild.d.ts +0 -1
- package/dist/esbuild.mjs +0 -1
- package/dist/hono.cjs +0 -20
- package/dist/hono.d.cts +0 -3
- package/dist/index.cjs +0 -50
- package/dist/index.d.cts +0 -10
- package/dist/jsonc-parser.cjs +0 -16
- package/dist/jsonc-parser.d.cts +0 -1
- package/dist/jsonc-utils.cjs +0 -25
- package/dist/jsonc-utils.d.cts +0 -7
- package/dist/load-rules.cjs +0 -39
- package/dist/load-rules.d.cts +0 -14
- package/dist/logger.browser.cjs +0 -55
- package/dist/logger.browser.d.cts +0 -21
- package/dist/logger.cjs +0 -55
- package/dist/logger.d.cts +0 -21
- package/dist/mock-files.cjs +0 -65
- package/dist/module-loader.cjs +0 -93
- package/dist/path-utils.cjs +0 -57
- package/dist/path-utils.d.cts +0 -7
- package/dist/pathe.cjs +0 -16
- package/dist/pathe.d.cts +0 -1
- package/dist/playground-grouping.cjs +0 -95
- package/dist/playground-grouping.d.cts +0 -12
- package/dist/route-constants.cjs +0 -30
- package/dist/route-utils.cjs +0 -126
- package/dist/route-utils.d.cts +0 -42
- package/dist/scan-utils.cjs +0 -39
- package/dist/scan-utils.d.cts +0 -114
- package/dist/shared/shared.DazgCdsk.d.cts +0 -49
- package/dist/shared/shared.DazgCdsk.d.mts +0 -49
- package/dist/shared/shared.DazgCdsk.d.ts +0 -49
- package/dist/timing.cjs +0 -20
- package/dist/timing.d.cts +0 -4
package/dist/scan-utils.d.ts
CHANGED
|
@@ -1,114 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import './define-config.js';
|
|
4
|
-
import './jsonc-utils.js';
|
|
5
|
-
import './load-rules.js';
|
|
6
|
-
import './mock-files.js';
|
|
7
|
-
import './module-loader.js';
|
|
8
|
-
import './route-constants.js';
|
|
9
|
-
import './route-utils.js';
|
|
10
|
-
|
|
11
|
-
declare function normalizeMethod(method?: string | null): string | undefined;
|
|
12
|
-
declare function normalizePrefix(prefix: string): string;
|
|
13
|
-
declare function resolveDirs(dir: DirInput, root: string): string[];
|
|
14
|
-
declare function normalizeIgnorePrefix(value: string | string[] | undefined, fallback?: string[]): string[];
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Directory input for mock scanning.
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* import type { DirInput } from '@mokup/shared'
|
|
21
|
-
*
|
|
22
|
-
* const dir: DirInput = ['mock', 'fixtures']
|
|
23
|
-
*/
|
|
24
|
-
type DirInput = string | string[] | ((root: string) => string | string[]) | undefined;
|
|
25
|
-
/**
|
|
26
|
-
* Shared entry options for mokup scanners and plugins.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* import type { MockEntryOptions } from '@mokup/shared'
|
|
30
|
-
*
|
|
31
|
-
* const entry: MockEntryOptions = {
|
|
32
|
-
* dir: 'mock',
|
|
33
|
-
* prefix: '/api',
|
|
34
|
-
* watch: true,
|
|
35
|
-
* }
|
|
36
|
-
*/
|
|
37
|
-
interface MockEntryOptions {
|
|
38
|
-
/**
|
|
39
|
-
* Directory (or directories) to scan for mock routes.
|
|
40
|
-
*
|
|
41
|
-
* @default "mock" (resolved by Vite/webpack plugins)
|
|
42
|
-
*/
|
|
43
|
-
dir?: DirInput;
|
|
44
|
-
/**
|
|
45
|
-
* Request path prefix to mount mock routes under.
|
|
46
|
-
*
|
|
47
|
-
* @default ""
|
|
48
|
-
*/
|
|
49
|
-
prefix?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Include filter for files to scan.
|
|
52
|
-
*
|
|
53
|
-
* @default undefined
|
|
54
|
-
*/
|
|
55
|
-
include?: RegExp | RegExp[];
|
|
56
|
-
/**
|
|
57
|
-
* Exclude filter for files to scan.
|
|
58
|
-
*
|
|
59
|
-
* @default undefined
|
|
60
|
-
*/
|
|
61
|
-
exclude?: RegExp | RegExp[];
|
|
62
|
-
/**
|
|
63
|
-
* Ignore file or folder prefixes when scanning.
|
|
64
|
-
*
|
|
65
|
-
* @default ["."]
|
|
66
|
-
*/
|
|
67
|
-
ignorePrefix?: string | string[];
|
|
68
|
-
/**
|
|
69
|
-
* Enable file watching for live route updates.
|
|
70
|
-
*
|
|
71
|
-
* @default true
|
|
72
|
-
*/
|
|
73
|
-
watch?: boolean;
|
|
74
|
-
/**
|
|
75
|
-
* Enable mokup logging.
|
|
76
|
-
*
|
|
77
|
-
* @default true
|
|
78
|
-
*/
|
|
79
|
-
log?: boolean;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Playground configuration input.
|
|
83
|
-
*
|
|
84
|
-
* @example
|
|
85
|
-
* import type { PlaygroundOptionsInput } from '@mokup/shared'
|
|
86
|
-
*
|
|
87
|
-
* const playground: PlaygroundOptionsInput = {
|
|
88
|
-
* path: '/__mokup',
|
|
89
|
-
* enabled: true,
|
|
90
|
-
* }
|
|
91
|
-
*/
|
|
92
|
-
type PlaygroundOptionsInput = boolean | {
|
|
93
|
-
/**
|
|
94
|
-
* Base path for the playground UI.
|
|
95
|
-
*
|
|
96
|
-
* @default "/__mokup"
|
|
97
|
-
*/
|
|
98
|
-
path?: string;
|
|
99
|
-
/**
|
|
100
|
-
* Emit playground assets during production builds.
|
|
101
|
-
*
|
|
102
|
-
* @default false
|
|
103
|
-
*/
|
|
104
|
-
build?: boolean;
|
|
105
|
-
/**
|
|
106
|
-
* Enable or disable the playground routes.
|
|
107
|
-
*
|
|
108
|
-
* @default true
|
|
109
|
-
*/
|
|
110
|
-
enabled?: boolean;
|
|
111
|
-
} | undefined;
|
|
112
|
-
|
|
113
|
-
export { normalizeIgnorePrefix, normalizeMethod, normalizePrefix, resolveDirs };
|
|
114
|
-
export type { DirInput as D, MockEntryOptions as M, PlaygroundOptionsInput as P };
|
|
1
|
+
import { a as normalizeMethod, i as normalizeIgnorePrefix, o as normalizePrefix, s as resolveDirs } from "./index-5prVUGOX.mjs";
|
|
2
|
+
export { normalizeIgnorePrefix, normalizeMethod, normalizePrefix, resolveDirs };
|
package/dist/scan-utils.mjs
CHANGED
|
@@ -1,34 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { methodSet } from
|
|
3
|
-
|
|
1
|
+
import { t as pathe_exports } from "./pathe.mjs";
|
|
2
|
+
import { methodSet } from "./route-constants.mjs";
|
|
3
|
+
//#region src/scan-utils.ts
|
|
4
4
|
function normalizeMethod(method) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const normalized = method.toUpperCase();
|
|
9
|
-
if (methodSet.has(normalized)) {
|
|
10
|
-
return normalized;
|
|
11
|
-
}
|
|
12
|
-
return void 0;
|
|
5
|
+
if (!method) return;
|
|
6
|
+
const normalized = method.toUpperCase();
|
|
7
|
+
if (methodSet.has(normalized)) return normalized;
|
|
13
8
|
}
|
|
14
9
|
function normalizePrefix(prefix) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const normalized = prefix.startsWith("/") ? prefix : `/${prefix}`;
|
|
19
|
-
return normalized.endsWith("/") ? normalized.slice(0, -1) : normalized;
|
|
10
|
+
if (!prefix) return "";
|
|
11
|
+
const normalized = prefix.startsWith("/") ? prefix : `/${prefix}`;
|
|
12
|
+
return normalized.endsWith("/") ? normalized.slice(0, -1) : normalized;
|
|
20
13
|
}
|
|
21
14
|
function resolveDirs(dir, root) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
(entry) => isAbsolute(entry) ? entry : resolve(root, entry)
|
|
26
|
-
);
|
|
27
|
-
return Array.from(new Set(normalized));
|
|
15
|
+
const raw = typeof dir === "function" ? dir(root) : dir;
|
|
16
|
+
const normalized = (Array.isArray(raw) ? raw : raw ? [raw] : ["mock"]).map((entry) => (0, pathe_exports.isAbsolute)(entry) ? entry : (0, pathe_exports.resolve)(root, entry));
|
|
17
|
+
return Array.from(new Set(normalized));
|
|
28
18
|
}
|
|
29
19
|
function normalizeIgnorePrefix(value, fallback = ["."]) {
|
|
30
|
-
|
|
31
|
-
return list.filter((entry) => typeof entry === "string" && entry.length > 0);
|
|
20
|
+
return (typeof value === "undefined" ? fallback : Array.isArray(value) ? value : [value]).filter((entry) => typeof entry === "string" && entry.length > 0);
|
|
32
21
|
}
|
|
33
|
-
|
|
22
|
+
//#endregion
|
|
34
23
|
export { normalizeIgnorePrefix, normalizeMethod, normalizePrefix, resolveDirs };
|
package/dist/timing.d.mts
CHANGED
package/dist/timing.d.ts
CHANGED
package/dist/timing.mjs
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
+
//#region src/timing.ts
|
|
1
2
|
function createDebouncer(delayMs, fn) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}, delayMs);
|
|
11
|
-
};
|
|
3
|
+
let timer = null;
|
|
4
|
+
return () => {
|
|
5
|
+
if (timer) clearTimeout(timer);
|
|
6
|
+
timer = setTimeout(() => {
|
|
7
|
+
timer = null;
|
|
8
|
+
fn();
|
|
9
|
+
}, delayMs);
|
|
10
|
+
};
|
|
12
11
|
}
|
|
13
12
|
function delay(ms) {
|
|
14
|
-
|
|
13
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
15
14
|
}
|
|
16
|
-
|
|
15
|
+
//#endregion
|
|
17
16
|
export { createDebouncer, delay };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mokup/shared",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"description": "Shared dependency exports for mokup.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://mokup.icebreaker.top",
|
|
@@ -12,251 +12,211 @@
|
|
|
12
12
|
},
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
15
|
-
"types":
|
|
16
|
-
"import": "./dist/index.d.mts",
|
|
17
|
-
"require": "./dist/index.d.cts"
|
|
18
|
-
},
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
19
16
|
"import": "./dist/index.mjs",
|
|
20
|
-
"
|
|
17
|
+
"default": "./dist/index.mjs"
|
|
21
18
|
},
|
|
22
19
|
"./chokidar": {
|
|
23
|
-
"types":
|
|
24
|
-
"import": "./dist/chokidar.d.mts",
|
|
25
|
-
"require": "./dist/chokidar.d.cts"
|
|
26
|
-
},
|
|
20
|
+
"types": "./dist/chokidar.d.ts",
|
|
27
21
|
"import": "./dist/chokidar.mjs",
|
|
28
|
-
"
|
|
22
|
+
"default": "./dist/chokidar.mjs"
|
|
29
23
|
},
|
|
30
24
|
"./config-utils": {
|
|
31
|
-
"types":
|
|
32
|
-
"import": "./dist/config-utils.d.mts",
|
|
33
|
-
"require": "./dist/config-utils.d.cts"
|
|
34
|
-
},
|
|
25
|
+
"types": "./dist/config-utils.d.ts",
|
|
35
26
|
"import": "./dist/config-utils.mjs",
|
|
36
|
-
"
|
|
27
|
+
"default": "./dist/config-utils.mjs"
|
|
37
28
|
},
|
|
38
29
|
"./config-core": {
|
|
39
|
-
"types":
|
|
40
|
-
"import": "./dist/config-core.d.mts",
|
|
41
|
-
"require": "./dist/config-core.d.cts"
|
|
42
|
-
},
|
|
30
|
+
"types": "./dist/config-core.d.ts",
|
|
43
31
|
"import": "./dist/config-core.mjs",
|
|
44
|
-
"
|
|
32
|
+
"default": "./dist/config-core.mjs"
|
|
45
33
|
},
|
|
46
34
|
"./define-config": {
|
|
47
|
-
"types":
|
|
48
|
-
"import": "./dist/define-config.d.mts",
|
|
49
|
-
"require": "./dist/define-config.d.cts"
|
|
50
|
-
},
|
|
35
|
+
"types": "./dist/define-config.d.ts",
|
|
51
36
|
"import": "./dist/define-config.mjs",
|
|
52
|
-
"
|
|
37
|
+
"default": "./dist/define-config.mjs"
|
|
53
38
|
},
|
|
54
|
-
"./
|
|
55
|
-
"types":
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
39
|
+
"./diagnostic-types": {
|
|
40
|
+
"types": "./dist/diagnostic-types.d.ts",
|
|
41
|
+
"import": "./dist/diagnostic-types.mjs",
|
|
42
|
+
"default": "./dist/diagnostic-types.mjs"
|
|
43
|
+
},
|
|
44
|
+
"./diagnostics": {
|
|
45
|
+
"types": "./dist/diagnostics.d.ts",
|
|
46
|
+
"import": "./dist/diagnostics.mjs",
|
|
47
|
+
"default": "./dist/diagnostics.mjs"
|
|
48
|
+
},
|
|
49
|
+
"./rolldown": {
|
|
50
|
+
"types": "./dist/rolldown.d.ts",
|
|
51
|
+
"import": "./dist/rolldown.mjs",
|
|
52
|
+
"default": "./dist/rolldown.mjs"
|
|
61
53
|
},
|
|
62
54
|
"./hono": {
|
|
63
|
-
"types":
|
|
64
|
-
"import": "./dist/hono.d.mts",
|
|
65
|
-
"require": "./dist/hono.d.cts"
|
|
66
|
-
},
|
|
55
|
+
"types": "./dist/hono.d.ts",
|
|
67
56
|
"import": "./dist/hono.mjs",
|
|
68
|
-
"
|
|
57
|
+
"default": "./dist/hono.mjs"
|
|
69
58
|
},
|
|
70
59
|
"./jsonc-parser": {
|
|
71
|
-
"types":
|
|
72
|
-
"import": "./dist/jsonc-parser.d.mts",
|
|
73
|
-
"require": "./dist/jsonc-parser.d.cts"
|
|
74
|
-
},
|
|
60
|
+
"types": "./dist/jsonc-parser.d.ts",
|
|
75
61
|
"import": "./dist/jsonc-parser.mjs",
|
|
76
|
-
"
|
|
62
|
+
"default": "./dist/jsonc-parser.mjs"
|
|
77
63
|
},
|
|
78
64
|
"./jsonc-utils": {
|
|
79
|
-
"types":
|
|
80
|
-
"import": "./dist/jsonc-utils.d.mts",
|
|
81
|
-
"require": "./dist/jsonc-utils.d.cts"
|
|
82
|
-
},
|
|
65
|
+
"types": "./dist/jsonc-utils.d.ts",
|
|
83
66
|
"import": "./dist/jsonc-utils.mjs",
|
|
84
|
-
"
|
|
67
|
+
"default": "./dist/jsonc-utils.mjs"
|
|
85
68
|
},
|
|
86
69
|
"./load-rules": {
|
|
87
|
-
"types":
|
|
88
|
-
"import": "./dist/load-rules.d.mts",
|
|
89
|
-
"require": "./dist/load-rules.d.cts"
|
|
90
|
-
},
|
|
70
|
+
"types": "./dist/load-rules.d.ts",
|
|
91
71
|
"import": "./dist/load-rules.mjs",
|
|
92
|
-
"
|
|
72
|
+
"default": "./dist/load-rules.mjs"
|
|
93
73
|
},
|
|
94
74
|
"./logger": {
|
|
95
|
-
"types":
|
|
96
|
-
"import": "./dist/logger.d.mts",
|
|
97
|
-
"require": "./dist/logger.d.cts"
|
|
98
|
-
},
|
|
75
|
+
"types": "./dist/logger.d.ts",
|
|
99
76
|
"browser": "./dist/logger.browser.mjs",
|
|
100
77
|
"worker": "./dist/logger.browser.mjs",
|
|
101
78
|
"import": "./dist/logger.mjs",
|
|
102
|
-
"
|
|
79
|
+
"default": "./dist/logger.mjs"
|
|
103
80
|
},
|
|
104
81
|
"./mock-files": {
|
|
105
|
-
"types":
|
|
106
|
-
"import": "./dist/mock-files.d.mts",
|
|
107
|
-
"require": "./dist/mock-files.d.cts"
|
|
108
|
-
},
|
|
82
|
+
"types": "./dist/mock-files.d.ts",
|
|
109
83
|
"import": "./dist/mock-files.mjs",
|
|
110
|
-
"
|
|
84
|
+
"default": "./dist/mock-files.mjs"
|
|
111
85
|
},
|
|
112
86
|
"./module-loader": {
|
|
113
|
-
"types":
|
|
114
|
-
"import": "./dist/module-loader.d.mts",
|
|
115
|
-
"require": "./dist/module-loader.d.cts"
|
|
116
|
-
},
|
|
87
|
+
"types": "./dist/module-loader.d.ts",
|
|
117
88
|
"import": "./dist/module-loader.mjs",
|
|
118
|
-
"
|
|
89
|
+
"default": "./dist/module-loader.mjs"
|
|
119
90
|
},
|
|
120
91
|
"./pathe": {
|
|
121
|
-
"types":
|
|
122
|
-
"import": "./dist/pathe.d.mts",
|
|
123
|
-
"require": "./dist/pathe.d.cts"
|
|
124
|
-
},
|
|
92
|
+
"types": "./dist/pathe.d.ts",
|
|
125
93
|
"import": "./dist/pathe.mjs",
|
|
126
|
-
"
|
|
94
|
+
"default": "./dist/pathe.mjs"
|
|
127
95
|
},
|
|
128
96
|
"./path-utils": {
|
|
129
|
-
"types":
|
|
130
|
-
"import": "./dist/path-utils.d.mts",
|
|
131
|
-
"require": "./dist/path-utils.d.cts"
|
|
132
|
-
},
|
|
97
|
+
"types": "./dist/path-utils.d.ts",
|
|
133
98
|
"import": "./dist/path-utils.mjs",
|
|
134
|
-
"
|
|
99
|
+
"default": "./dist/path-utils.mjs"
|
|
135
100
|
},
|
|
136
101
|
"./playground-grouping": {
|
|
137
|
-
"types":
|
|
138
|
-
"import": "./dist/playground-grouping.d.mts",
|
|
139
|
-
"require": "./dist/playground-grouping.d.cts"
|
|
140
|
-
},
|
|
102
|
+
"types": "./dist/playground-grouping.d.ts",
|
|
141
103
|
"import": "./dist/playground-grouping.mjs",
|
|
142
|
-
"
|
|
104
|
+
"default": "./dist/playground-grouping.mjs"
|
|
143
105
|
},
|
|
144
106
|
"./route-constants": {
|
|
145
|
-
"types":
|
|
146
|
-
"import": "./dist/route-constants.d.mts",
|
|
147
|
-
"require": "./dist/route-constants.d.cts"
|
|
148
|
-
},
|
|
107
|
+
"types": "./dist/route-constants.d.ts",
|
|
149
108
|
"import": "./dist/route-constants.mjs",
|
|
150
|
-
"
|
|
109
|
+
"default": "./dist/route-constants.mjs"
|
|
151
110
|
},
|
|
152
111
|
"./route-utils": {
|
|
153
|
-
"types":
|
|
154
|
-
"import": "./dist/route-utils.d.mts",
|
|
155
|
-
"require": "./dist/route-utils.d.cts"
|
|
156
|
-
},
|
|
112
|
+
"types": "./dist/route-utils.d.ts",
|
|
157
113
|
"import": "./dist/route-utils.mjs",
|
|
158
|
-
"
|
|
114
|
+
"default": "./dist/route-utils.mjs"
|
|
159
115
|
},
|
|
160
116
|
"./scan-utils": {
|
|
161
|
-
"types":
|
|
162
|
-
"import": "./dist/scan-utils.d.mts",
|
|
163
|
-
"require": "./dist/scan-utils.d.cts"
|
|
164
|
-
},
|
|
117
|
+
"types": "./dist/scan-utils.d.ts",
|
|
165
118
|
"import": "./dist/scan-utils.mjs",
|
|
166
|
-
"
|
|
119
|
+
"default": "./dist/scan-utils.mjs"
|
|
167
120
|
},
|
|
168
121
|
"./timing": {
|
|
169
|
-
"types":
|
|
170
|
-
"import": "./dist/timing.d.mts",
|
|
171
|
-
"require": "./dist/timing.d.cts"
|
|
172
|
-
},
|
|
122
|
+
"types": "./dist/timing.d.ts",
|
|
173
123
|
"import": "./dist/timing.mjs",
|
|
174
|
-
"
|
|
124
|
+
"default": "./dist/timing.mjs"
|
|
175
125
|
}
|
|
176
126
|
},
|
|
177
127
|
"publishConfig": {
|
|
178
128
|
"access": "public"
|
|
179
129
|
},
|
|
180
|
-
"main": "./dist/index.
|
|
130
|
+
"main": "./dist/index.mjs",
|
|
181
131
|
"module": "./dist/index.mjs",
|
|
182
132
|
"types": "./dist/index.d.ts",
|
|
183
133
|
"typesVersions": {
|
|
184
134
|
"*": {
|
|
185
135
|
"chokidar": [
|
|
186
|
-
"dist/chokidar.d.
|
|
136
|
+
"dist/chokidar.d.ts"
|
|
187
137
|
],
|
|
188
138
|
"config-utils": [
|
|
189
|
-
"dist/config-utils.d.
|
|
139
|
+
"dist/config-utils.d.ts"
|
|
190
140
|
],
|
|
191
141
|
"config-core": [
|
|
192
|
-
"dist/config-core.d.
|
|
142
|
+
"dist/config-core.d.ts"
|
|
193
143
|
],
|
|
194
144
|
"define-config": [
|
|
195
|
-
"dist/define-config.d.
|
|
145
|
+
"dist/define-config.d.ts"
|
|
146
|
+
],
|
|
147
|
+
"diagnostic-types": [
|
|
148
|
+
"dist/diagnostic-types.d.ts"
|
|
196
149
|
],
|
|
197
|
-
"
|
|
198
|
-
"dist/
|
|
150
|
+
"diagnostics": [
|
|
151
|
+
"dist/diagnostics.d.ts"
|
|
152
|
+
],
|
|
153
|
+
"rolldown": [
|
|
154
|
+
"dist/rolldown.d.ts"
|
|
199
155
|
],
|
|
200
156
|
"hono": [
|
|
201
|
-
"dist/hono.d.
|
|
157
|
+
"dist/hono.d.ts"
|
|
202
158
|
],
|
|
203
159
|
"jsonc-parser": [
|
|
204
|
-
"dist/jsonc-parser.d.
|
|
160
|
+
"dist/jsonc-parser.d.ts"
|
|
205
161
|
],
|
|
206
162
|
"jsonc-utils": [
|
|
207
|
-
"dist/jsonc-utils.d.
|
|
163
|
+
"dist/jsonc-utils.d.ts"
|
|
208
164
|
],
|
|
209
165
|
"load-rules": [
|
|
210
|
-
"dist/load-rules.d.
|
|
166
|
+
"dist/load-rules.d.ts"
|
|
211
167
|
],
|
|
212
168
|
"logger": [
|
|
213
|
-
"dist/logger.d.
|
|
169
|
+
"dist/logger.d.ts"
|
|
214
170
|
],
|
|
215
171
|
"mock-files": [
|
|
216
|
-
"dist/mock-files.d.
|
|
172
|
+
"dist/mock-files.d.ts"
|
|
217
173
|
],
|
|
218
174
|
"module-loader": [
|
|
219
|
-
"dist/module-loader.d.
|
|
175
|
+
"dist/module-loader.d.ts"
|
|
220
176
|
],
|
|
221
177
|
"pathe": [
|
|
222
|
-
"dist/pathe.d.
|
|
178
|
+
"dist/pathe.d.ts"
|
|
223
179
|
],
|
|
224
180
|
"path-utils": [
|
|
225
|
-
"dist/path-utils.d.
|
|
181
|
+
"dist/path-utils.d.ts"
|
|
226
182
|
],
|
|
227
183
|
"playground-grouping": [
|
|
228
|
-
"dist/playground-grouping.d.
|
|
184
|
+
"dist/playground-grouping.d.ts"
|
|
229
185
|
],
|
|
230
186
|
"route-constants": [
|
|
231
|
-
"dist/route-constants.d.
|
|
187
|
+
"dist/route-constants.d.ts"
|
|
232
188
|
],
|
|
233
189
|
"route-utils": [
|
|
234
|
-
"dist/route-utils.d.
|
|
190
|
+
"dist/route-utils.d.ts"
|
|
235
191
|
],
|
|
236
192
|
"scan-utils": [
|
|
237
|
-
"dist/scan-utils.d.
|
|
193
|
+
"dist/scan-utils.d.ts"
|
|
238
194
|
],
|
|
239
195
|
"timing": [
|
|
240
|
-
"dist/timing.d.
|
|
196
|
+
"dist/timing.d.ts"
|
|
241
197
|
]
|
|
242
198
|
}
|
|
243
199
|
},
|
|
244
200
|
"files": [
|
|
245
201
|
"dist"
|
|
246
202
|
],
|
|
203
|
+
"engines": {
|
|
204
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
205
|
+
},
|
|
247
206
|
"dependencies": {
|
|
248
207
|
"chokidar": "^5.0.0",
|
|
249
208
|
"consola": "^3.4.2",
|
|
250
|
-
"
|
|
251
|
-
"hono": "^4.11.8",
|
|
209
|
+
"hono": "^4.12.12",
|
|
252
210
|
"jsonc-parser": "^3.3.1",
|
|
253
211
|
"pathe": "^2.0.3",
|
|
212
|
+
"rolldown": "1.0.0-rc.13",
|
|
254
213
|
"tsx": "^4.21.0"
|
|
255
214
|
},
|
|
256
215
|
"scripts": {
|
|
257
|
-
"build": "
|
|
258
|
-
"dev": "
|
|
216
|
+
"build": "tsdown",
|
|
217
|
+
"dev": "tsdown --watch",
|
|
259
218
|
"lint": "eslint .",
|
|
219
|
+
"test": "vitest run --config vitest.config.ts",
|
|
260
220
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
261
221
|
"test:types": "tsd"
|
|
262
222
|
}
|
package/dist/chokidar.cjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const chokidar = require('chokidar');
|
|
4
|
-
|
|
5
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
6
|
-
|
|
7
|
-
const chokidar__default = /*#__PURE__*/_interopDefaultCompat(chokidar);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
module.exports = chokidar__default;
|
package/dist/chokidar.d.cts
DELETED
package/dist/config-core.cjs
DELETED