vite-plugin-windmill 1.687.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/LICENSE +21 -0
- package/README.md +164 -0
- package/bin/vite-plugin-windmill +3 -0
- package/dist/cli.d.mts +4 -0
- package/dist/cli.mjs +475 -0
- package/dist/index.d.mts +128 -0
- package/dist/index.mjs +1044 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +77 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { Policy } from "windmill-client";
|
|
2
|
+
import { Plugin, ProxyOptions } from "vite";
|
|
3
|
+
|
|
4
|
+
//#region src/types.d.ts
|
|
5
|
+
interface WindmillApiProxyOptions extends ProxyOptions {
|
|
6
|
+
context?: string;
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
target?: string;
|
|
9
|
+
token?: string;
|
|
10
|
+
}
|
|
11
|
+
interface PluginDeployOptions {
|
|
12
|
+
deploy?: boolean;
|
|
13
|
+
dry?: boolean;
|
|
14
|
+
message?: string;
|
|
15
|
+
}
|
|
16
|
+
interface PluginOptions {
|
|
17
|
+
base?: string;
|
|
18
|
+
deploy?: boolean | PluginDeployOptions;
|
|
19
|
+
dir?: string;
|
|
20
|
+
entry?: string;
|
|
21
|
+
message?: string;
|
|
22
|
+
nonDotted?: boolean;
|
|
23
|
+
path?: string;
|
|
24
|
+
proxy?: boolean | WindmillApiProxyOptions;
|
|
25
|
+
root?: string;
|
|
26
|
+
token?: string;
|
|
27
|
+
ts?: string;
|
|
28
|
+
url?: string;
|
|
29
|
+
workspace?: string;
|
|
30
|
+
}
|
|
31
|
+
interface Project {
|
|
32
|
+
base: string;
|
|
33
|
+
config?: string;
|
|
34
|
+
dir: string;
|
|
35
|
+
entry: string;
|
|
36
|
+
nonDotted: boolean;
|
|
37
|
+
path: string;
|
|
38
|
+
root: string;
|
|
39
|
+
syncExcludes: string[];
|
|
40
|
+
ts: string;
|
|
41
|
+
workspace?: string;
|
|
42
|
+
token?: string;
|
|
43
|
+
url?: string;
|
|
44
|
+
yaml: string;
|
|
45
|
+
}
|
|
46
|
+
interface RawAppFileConfig {
|
|
47
|
+
summary: string;
|
|
48
|
+
custom_path?: string;
|
|
49
|
+
public?: boolean;
|
|
50
|
+
data?: unknown;
|
|
51
|
+
policy?: Policy;
|
|
52
|
+
runnables?: Record<string, RawAppRunnable>;
|
|
53
|
+
}
|
|
54
|
+
interface RawAppField {
|
|
55
|
+
allowUserResources?: boolean;
|
|
56
|
+
ctx?: string;
|
|
57
|
+
type?: string;
|
|
58
|
+
value?: unknown;
|
|
59
|
+
[key: string]: unknown;
|
|
60
|
+
}
|
|
61
|
+
interface RawInlineScript {
|
|
62
|
+
cache_ttl?: number;
|
|
63
|
+
content?: string;
|
|
64
|
+
id?: number;
|
|
65
|
+
language?: string;
|
|
66
|
+
lock?: string;
|
|
67
|
+
schema?: unknown;
|
|
68
|
+
}
|
|
69
|
+
interface RawAppRunnable {
|
|
70
|
+
fields?: Record<string, RawAppField>;
|
|
71
|
+
inlineScript?: RawInlineScript;
|
|
72
|
+
path?: string;
|
|
73
|
+
runType?: "flow" | "hubscript" | "script";
|
|
74
|
+
schema?: unknown;
|
|
75
|
+
type?: string;
|
|
76
|
+
[key: string]: unknown;
|
|
77
|
+
}
|
|
78
|
+
interface RawAppProject {
|
|
79
|
+
config: RawAppFileConfig;
|
|
80
|
+
files: Record<string, string>;
|
|
81
|
+
policy: Policy;
|
|
82
|
+
runnables: Record<string, RawAppRunnable>;
|
|
83
|
+
value: {
|
|
84
|
+
data?: unknown;
|
|
85
|
+
files: Record<string, string>;
|
|
86
|
+
runnables: Record<string, RawAppRunnable>;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
interface BundleContents {
|
|
90
|
+
css: string;
|
|
91
|
+
js: string;
|
|
92
|
+
}
|
|
93
|
+
interface DeployOptions {
|
|
94
|
+
base?: string;
|
|
95
|
+
bundles?: BundleContents;
|
|
96
|
+
css?: string;
|
|
97
|
+
dir?: string;
|
|
98
|
+
dry?: boolean;
|
|
99
|
+
entry?: string;
|
|
100
|
+
js?: string;
|
|
101
|
+
message?: string;
|
|
102
|
+
path?: string;
|
|
103
|
+
root?: string;
|
|
104
|
+
token?: string;
|
|
105
|
+
url?: string;
|
|
106
|
+
workspace?: string;
|
|
107
|
+
}
|
|
108
|
+
interface DeployRawAppResult {
|
|
109
|
+
action: "create" | "dry-run" | "update";
|
|
110
|
+
base: string;
|
|
111
|
+
path: string;
|
|
112
|
+
workspace: string;
|
|
113
|
+
}
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region src/deploy.d.ts
|
|
116
|
+
/**
|
|
117
|
+
* Deploys a raw app to Windmill using `windmill-client` instead of shelling out to the CLI.
|
|
118
|
+
*/
|
|
119
|
+
declare const deploy: (options: DeployOptions) => Promise<DeployRawAppResult>;
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region src/plugin.d.ts
|
|
122
|
+
/**
|
|
123
|
+
* Creates a Vite plugin that aligns a SPA with Windmill raw-app build and deploy behavior.
|
|
124
|
+
*/
|
|
125
|
+
declare const windmill: (options?: PluginOptions) => Plugin;
|
|
126
|
+
//#endregion
|
|
127
|
+
export { type BundleContents, type DeployOptions, type DeployRawAppResult, type PluginDeployOptions, type PluginOptions, type Project, type RawAppField, type RawAppFileConfig, type RawAppProject, type RawAppRunnable, type WindmillApiProxyOptions, windmill as default, windmill, deploy };
|
|
128
|
+
//# sourceMappingURL=index.d.mts.map
|