@enhance-eng/sandbox 0.3.10 → 0.3.16
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/assets/enhance-runtime.js +1 -1
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +43 -92
- package/dist/index.js +1 -1
- package/dist/postinstall.d.ts +2 -0
- package/dist/postinstall.js +1 -1
- package/dist/sw-enhance.js +1 -1
- package/dist/vite/index.d.ts +5 -0
- package/dist/vite/index.js +1 -0
- package/package.json +11 -8
- package/bin/enhance-sandbox.js +0 -2
- package/dist/index.cjs +0 -1
- package/dist/index.d.cts +0 -121
- package/dist/manifest.json +0 -7
package/dist/index.d.cts
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
interface WorkerHmrConfiguration {
|
|
4
|
-
protocols?: string[];
|
|
5
|
-
pathHints?: string[];
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
declare const optionsSchema: z.ZodObject<{
|
|
9
|
-
sandboxBaseURL: z.ZodOptional<z.ZodString>;
|
|
10
|
-
callbackBypass: z.ZodArray<z.ZodString, "many">;
|
|
11
|
-
assetHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
12
|
-
overlay: z.ZodOptional<z.ZodObject<{
|
|
13
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
-
position: z.ZodOptional<z.ZodEnum<["top-left", "top-right", "bottom-left", "bottom-right"]>>;
|
|
15
|
-
enableViteHmr: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
-
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
enabled?: boolean | undefined;
|
|
18
|
-
position?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | undefined;
|
|
19
|
-
enableViteHmr?: boolean | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
enabled?: boolean | undefined;
|
|
22
|
-
position?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | undefined;
|
|
23
|
-
enableViteHmr?: boolean | undefined;
|
|
24
|
-
}>>;
|
|
25
|
-
hmr: z.ZodOptional<z.ZodObject<{
|
|
26
|
-
protocols: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
27
|
-
pathHints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
28
|
-
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
protocols?: string[] | undefined;
|
|
30
|
-
pathHints?: string[] | undefined;
|
|
31
|
-
}, {
|
|
32
|
-
protocols?: string[] | undefined;
|
|
33
|
-
pathHints?: string[] | undefined;
|
|
34
|
-
}>>;
|
|
35
|
-
logLevel: z.ZodOptional<z.ZodEnum<["silent", "info", "debug"]>>;
|
|
36
|
-
swPath: z.ZodOptional<z.ZodString>;
|
|
37
|
-
overlayPath: z.ZodOptional<z.ZodString>;
|
|
38
|
-
runtimeScriptPath: z.ZodOptional<z.ZodString>;
|
|
39
|
-
storageKeysOverride: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
40
|
-
security: z.ZodOptional<z.ZodEnum<["permissive", "custom"]>>;
|
|
41
|
-
}, "strip", z.ZodTypeAny, {
|
|
42
|
-
callbackBypass: string[];
|
|
43
|
-
sandboxBaseURL?: string | undefined;
|
|
44
|
-
assetHosts?: string[] | undefined;
|
|
45
|
-
overlay?: {
|
|
46
|
-
enabled?: boolean | undefined;
|
|
47
|
-
position?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | undefined;
|
|
48
|
-
enableViteHmr?: boolean | undefined;
|
|
49
|
-
} | undefined;
|
|
50
|
-
hmr?: {
|
|
51
|
-
protocols?: string[] | undefined;
|
|
52
|
-
pathHints?: string[] | undefined;
|
|
53
|
-
} | undefined;
|
|
54
|
-
logLevel?: "silent" | "info" | "debug" | undefined;
|
|
55
|
-
swPath?: string | undefined;
|
|
56
|
-
overlayPath?: string | undefined;
|
|
57
|
-
runtimeScriptPath?: string | undefined;
|
|
58
|
-
storageKeysOverride?: Record<string, string> | undefined;
|
|
59
|
-
security?: "custom" | "permissive" | undefined;
|
|
60
|
-
}, {
|
|
61
|
-
callbackBypass: string[];
|
|
62
|
-
sandboxBaseURL?: string | undefined;
|
|
63
|
-
assetHosts?: string[] | undefined;
|
|
64
|
-
overlay?: {
|
|
65
|
-
enabled?: boolean | undefined;
|
|
66
|
-
position?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | undefined;
|
|
67
|
-
enableViteHmr?: boolean | undefined;
|
|
68
|
-
} | undefined;
|
|
69
|
-
hmr?: {
|
|
70
|
-
protocols?: string[] | undefined;
|
|
71
|
-
pathHints?: string[] | undefined;
|
|
72
|
-
} | undefined;
|
|
73
|
-
logLevel?: "silent" | "info" | "debug" | undefined;
|
|
74
|
-
swPath?: string | undefined;
|
|
75
|
-
overlayPath?: string | undefined;
|
|
76
|
-
runtimeScriptPath?: string | undefined;
|
|
77
|
-
storageKeysOverride?: Record<string, string> | undefined;
|
|
78
|
-
security?: "custom" | "permissive" | undefined;
|
|
79
|
-
}>;
|
|
80
|
-
type RawOptions = z.input<typeof optionsSchema>;
|
|
81
|
-
declare global {
|
|
82
|
-
interface Window {
|
|
83
|
-
__enhanceSandboxHmr?: WorkerHmrConfiguration | (() => WorkerHmrConfiguration | undefined);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
interface EnhanceInitOptions extends RawOptions {
|
|
88
|
-
}
|
|
89
|
-
interface EnhanceStatus {
|
|
90
|
-
enabled: boolean;
|
|
91
|
-
controlled: boolean;
|
|
92
|
-
version: string;
|
|
93
|
-
sandboxHits: number;
|
|
94
|
-
sandboxFallbacks: number;
|
|
95
|
-
}
|
|
96
|
-
interface EnhanceController {
|
|
97
|
-
enable(token?: string): void;
|
|
98
|
-
disable(): void;
|
|
99
|
-
status(): EnhanceStatus;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
type EnhanceOptions = EnhanceInitOptions;
|
|
103
|
-
interface EnhanceAssetManifest {
|
|
104
|
-
serviceWorker: string;
|
|
105
|
-
runtime: string;
|
|
106
|
-
version: string;
|
|
107
|
-
serviceWorkerDigest: string | null;
|
|
108
|
-
runtimeDigest: string | null;
|
|
109
|
-
}
|
|
110
|
-
declare const Enhance: {
|
|
111
|
-
init(options: EnhanceInitOptions): EnhanceController;
|
|
112
|
-
serviceWorkerURL(): string;
|
|
113
|
-
runtimeURL(): string;
|
|
114
|
-
assetManifest(): EnhanceAssetManifest;
|
|
115
|
-
};
|
|
116
|
-
declare function getAssetManifest(): EnhanceAssetManifest;
|
|
117
|
-
declare function resolveServiceWorkerPath(): string;
|
|
118
|
-
declare function serviceWorkerURL(): string;
|
|
119
|
-
declare function runtimeURL(): string;
|
|
120
|
-
|
|
121
|
-
export { Enhance, type EnhanceAssetManifest, type EnhanceController, type EnhanceOptions, type EnhanceStatus, getAssetManifest, resolveServiceWorkerPath, runtimeURL, serviceWorkerURL };
|
package/dist/manifest.json
DELETED