@ttsc/unplugin 0.30.3 → 0.30.4
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/lib/core/index.js +12 -1
- package/lib/core/index.js.map +1 -1
- package/lib/core/index.mjs +12 -1
- package/lib/core/index.mjs.map +1 -1
- package/lib/core/transform.d.cts +13 -5
- package/lib/core/transform.d.mts +13 -5
- package/lib/core/transform.d.ts +13 -5
- package/lib/core/transform.js +447 -100
- package/lib/core/transform.js.map +1 -1
- package/lib/core/transform.mjs +447 -100
- package/lib/core/transform.mjs.map +1 -1
- package/lib/core/viteServe.d.cts +25 -6
- package/lib/core/viteServe.d.mts +25 -6
- package/lib/core/viteServe.d.ts +25 -6
- package/lib/core/viteServe.js +595 -94
- package/lib/core/viteServe.js.map +1 -1
- package/lib/core/viteServe.mjs +595 -94
- package/lib/core/viteServe.mjs.map +1 -1
- package/package.json +3 -4
- package/src/core/index.ts +12 -1
- package/src/core/transform.ts +590 -142
- package/src/core/viteServe.ts +671 -101
package/lib/core/viteServe.d.cts
CHANGED
|
@@ -30,27 +30,46 @@ interface ViteEnvironmentLike {
|
|
|
30
30
|
* carries.
|
|
31
31
|
*/
|
|
32
32
|
export interface ViteDevServerLike {
|
|
33
|
+
config?: {
|
|
34
|
+
root?: string;
|
|
35
|
+
};
|
|
33
36
|
environments?: Record<string, ViteEnvironmentLike>;
|
|
34
37
|
hot?: ViteHotChannelLike;
|
|
35
38
|
moduleGraph?: ViteModuleGraphLike;
|
|
36
39
|
ws?: ViteHotChannelLike;
|
|
37
40
|
}
|
|
41
|
+
export interface ViteServeWatchOperations {
|
|
42
|
+
/** Override case-policy discovery for a simulated host filesystem. */
|
|
43
|
+
caseSensitive?(directory: string): boolean;
|
|
44
|
+
/** Override path semantics when testing a non-host platform. */
|
|
45
|
+
platform?: NodeJS.Platform;
|
|
46
|
+
poll(listener: () => void): {
|
|
47
|
+
close(): void;
|
|
48
|
+
};
|
|
49
|
+
watch(root: string, listener: (eventType: string, file: string | null) => void, onError: () => void): {
|
|
50
|
+
close(): void;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
38
53
|
/** Serve-time compiler dependencies never enter Vite's runtime import graph. */
|
|
39
54
|
export interface ViteServeInputWatch {
|
|
40
55
|
attach(server: ViteDevServerLike): void;
|
|
56
|
+
begin(): number;
|
|
41
57
|
dispose(): Promise<void>;
|
|
42
|
-
|
|
58
|
+
/** Release every compiler input owned by one removed source module. */
|
|
59
|
+
forget(importer: string): void;
|
|
60
|
+
replace(importer: string, inputs: readonly TtscWatchInput[], failed?: boolean, startedAt?: number): void;
|
|
43
61
|
}
|
|
44
62
|
/**
|
|
45
|
-
*
|
|
63
|
+
* A bounded recursive filesystem observer shared by all served modules.
|
|
46
64
|
*
|
|
47
65
|
* Vite resolves transform-context addWatchFile as a runtime import, including
|
|
48
66
|
* type-only .server files and non-module plugin assets. Use a separate watcher
|
|
49
67
|
* for compiler inputs, including node_modules, which Vite's watcher ignores.
|
|
50
68
|
* Ordinary files use events after their initial subscription is observed.
|
|
51
|
-
* Missing spellings and directory predicates
|
|
52
|
-
*
|
|
53
|
-
*
|
|
69
|
+
* Missing spellings and directory predicates use the recursive observer for
|
|
70
|
+
* their nearest available scope. Inputs a native scope cannot safely cover
|
|
71
|
+
* share one bounded fallback poll; linked files also share topology checks
|
|
72
|
+
* because retargeting a junction need not emit events on its old descendants.
|
|
54
73
|
*/
|
|
55
|
-
export declare function createViteServeInputWatch(): ViteServeInputWatch;
|
|
74
|
+
export declare function createViteServeInputWatch(operations?: Partial<ViteServeWatchOperations>): ViteServeInputWatch;
|
|
56
75
|
export {};
|
package/lib/core/viteServe.d.mts
CHANGED
|
@@ -30,27 +30,46 @@ interface ViteEnvironmentLike {
|
|
|
30
30
|
* carries.
|
|
31
31
|
*/
|
|
32
32
|
export interface ViteDevServerLike {
|
|
33
|
+
config?: {
|
|
34
|
+
root?: string;
|
|
35
|
+
};
|
|
33
36
|
environments?: Record<string, ViteEnvironmentLike>;
|
|
34
37
|
hot?: ViteHotChannelLike;
|
|
35
38
|
moduleGraph?: ViteModuleGraphLike;
|
|
36
39
|
ws?: ViteHotChannelLike;
|
|
37
40
|
}
|
|
41
|
+
export interface ViteServeWatchOperations {
|
|
42
|
+
/** Override case-policy discovery for a simulated host filesystem. */
|
|
43
|
+
caseSensitive?(directory: string): boolean;
|
|
44
|
+
/** Override path semantics when testing a non-host platform. */
|
|
45
|
+
platform?: NodeJS.Platform;
|
|
46
|
+
poll(listener: () => void): {
|
|
47
|
+
close(): void;
|
|
48
|
+
};
|
|
49
|
+
watch(root: string, listener: (eventType: string, file: string | null) => void, onError: () => void): {
|
|
50
|
+
close(): void;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
38
53
|
/** Serve-time compiler dependencies never enter Vite's runtime import graph. */
|
|
39
54
|
export interface ViteServeInputWatch {
|
|
40
55
|
attach(server: ViteDevServerLike): void;
|
|
56
|
+
begin(): number;
|
|
41
57
|
dispose(): Promise<void>;
|
|
42
|
-
|
|
58
|
+
/** Release every compiler input owned by one removed source module. */
|
|
59
|
+
forget(importer: string): void;
|
|
60
|
+
replace(importer: string, inputs: readonly TtscWatchInput[], failed?: boolean, startedAt?: number): void;
|
|
43
61
|
}
|
|
44
62
|
/**
|
|
45
|
-
*
|
|
63
|
+
* A bounded recursive filesystem observer shared by all served modules.
|
|
46
64
|
*
|
|
47
65
|
* Vite resolves transform-context addWatchFile as a runtime import, including
|
|
48
66
|
* type-only .server files and non-module plugin assets. Use a separate watcher
|
|
49
67
|
* for compiler inputs, including node_modules, which Vite's watcher ignores.
|
|
50
68
|
* Ordinary files use events after their initial subscription is observed.
|
|
51
|
-
* Missing spellings and directory predicates
|
|
52
|
-
*
|
|
53
|
-
*
|
|
69
|
+
* Missing spellings and directory predicates use the recursive observer for
|
|
70
|
+
* their nearest available scope. Inputs a native scope cannot safely cover
|
|
71
|
+
* share one bounded fallback poll; linked files also share topology checks
|
|
72
|
+
* because retargeting a junction need not emit events on its old descendants.
|
|
54
73
|
*/
|
|
55
|
-
export declare function createViteServeInputWatch(): ViteServeInputWatch;
|
|
74
|
+
export declare function createViteServeInputWatch(operations?: Partial<ViteServeWatchOperations>): ViteServeInputWatch;
|
|
56
75
|
export {};
|
package/lib/core/viteServe.d.ts
CHANGED
|
@@ -30,27 +30,46 @@ interface ViteEnvironmentLike {
|
|
|
30
30
|
* carries.
|
|
31
31
|
*/
|
|
32
32
|
export interface ViteDevServerLike {
|
|
33
|
+
config?: {
|
|
34
|
+
root?: string;
|
|
35
|
+
};
|
|
33
36
|
environments?: Record<string, ViteEnvironmentLike>;
|
|
34
37
|
hot?: ViteHotChannelLike;
|
|
35
38
|
moduleGraph?: ViteModuleGraphLike;
|
|
36
39
|
ws?: ViteHotChannelLike;
|
|
37
40
|
}
|
|
41
|
+
export interface ViteServeWatchOperations {
|
|
42
|
+
/** Override case-policy discovery for a simulated host filesystem. */
|
|
43
|
+
caseSensitive?(directory: string): boolean;
|
|
44
|
+
/** Override path semantics when testing a non-host platform. */
|
|
45
|
+
platform?: NodeJS.Platform;
|
|
46
|
+
poll(listener: () => void): {
|
|
47
|
+
close(): void;
|
|
48
|
+
};
|
|
49
|
+
watch(root: string, listener: (eventType: string, file: string | null) => void, onError: () => void): {
|
|
50
|
+
close(): void;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
38
53
|
/** Serve-time compiler dependencies never enter Vite's runtime import graph. */
|
|
39
54
|
export interface ViteServeInputWatch {
|
|
40
55
|
attach(server: ViteDevServerLike): void;
|
|
56
|
+
begin(): number;
|
|
41
57
|
dispose(): Promise<void>;
|
|
42
|
-
|
|
58
|
+
/** Release every compiler input owned by one removed source module. */
|
|
59
|
+
forget(importer: string): void;
|
|
60
|
+
replace(importer: string, inputs: readonly TtscWatchInput[], failed?: boolean, startedAt?: number): void;
|
|
43
61
|
}
|
|
44
62
|
/**
|
|
45
|
-
*
|
|
63
|
+
* A bounded recursive filesystem observer shared by all served modules.
|
|
46
64
|
*
|
|
47
65
|
* Vite resolves transform-context addWatchFile as a runtime import, including
|
|
48
66
|
* type-only .server files and non-module plugin assets. Use a separate watcher
|
|
49
67
|
* for compiler inputs, including node_modules, which Vite's watcher ignores.
|
|
50
68
|
* Ordinary files use events after their initial subscription is observed.
|
|
51
|
-
* Missing spellings and directory predicates
|
|
52
|
-
*
|
|
53
|
-
*
|
|
69
|
+
* Missing spellings and directory predicates use the recursive observer for
|
|
70
|
+
* their nearest available scope. Inputs a native scope cannot safely cover
|
|
71
|
+
* share one bounded fallback poll; linked files also share topology checks
|
|
72
|
+
* because retargeting a junction need not emit events on its old descendants.
|
|
54
73
|
*/
|
|
55
|
-
export declare function createViteServeInputWatch(): ViteServeInputWatch;
|
|
74
|
+
export declare function createViteServeInputWatch(operations?: Partial<ViteServeWatchOperations>): ViteServeInputWatch;
|
|
56
75
|
export {};
|