windmill-cli 1.600.1 → 1.601.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.
Files changed (46) hide show
  1. package/esm/gen/core/OpenAPI.js +1 -1
  2. package/esm/src/commands/app/app_metadata.js +9 -3
  3. package/esm/src/commands/app/dev.js +5 -4
  4. package/esm/src/commands/app/lint.js +3 -2
  5. package/esm/src/commands/app/new.js +2 -1
  6. package/esm/src/commands/dev/dev.js +5 -3
  7. package/esm/src/commands/flow/flow_metadata.js +2 -3
  8. package/esm/src/commands/init/init.js +1 -0
  9. package/esm/src/commands/script/script.js +20 -7
  10. package/esm/src/commands/sync/sync.js +22 -24
  11. package/esm/src/commands/workspace/fork.js +1 -1
  12. package/esm/src/core/conf.js +4 -0
  13. package/esm/src/core/constants.js +5 -0
  14. package/esm/src/core/context.js +1 -1
  15. package/esm/src/main.js +3 -2
  16. package/esm/src/types.js +10 -9
  17. package/esm/src/utils/git.js +1 -1
  18. package/esm/src/utils/resource_folders.js +329 -0
  19. package/esm/src/utils/utils.js +2 -1
  20. package/esm/windmill-utils-internal/src/inline-scripts/extractor.js +3 -2
  21. package/esm/windmill-utils-internal/src/path-utils/path-assigner.js +11 -3
  22. package/package.json +1 -1
  23. package/types/src/commands/app/app_metadata.d.ts.map +1 -1
  24. package/types/src/commands/app/dev.d.ts.map +1 -1
  25. package/types/src/commands/app/lint.d.ts.map +1 -1
  26. package/types/src/commands/app/new.d.ts.map +1 -1
  27. package/types/src/commands/dev/dev.d.ts.map +1 -1
  28. package/types/src/commands/flow/flow_metadata.d.ts.map +1 -1
  29. package/types/src/commands/init/init.d.ts.map +1 -1
  30. package/types/src/commands/script/script.d.ts +10 -0
  31. package/types/src/commands/script/script.d.ts.map +1 -1
  32. package/types/src/commands/sync/sync.d.ts.map +1 -1
  33. package/types/src/core/conf.d.ts +2 -1
  34. package/types/src/core/conf.d.ts.map +1 -1
  35. package/types/src/core/constants.d.ts +6 -0
  36. package/types/src/core/constants.d.ts.map +1 -0
  37. package/types/src/main.d.ts +2 -2
  38. package/types/src/main.d.ts.map +1 -1
  39. package/types/src/types.d.ts.map +1 -1
  40. package/types/src/utils/resource_folders.d.ts +160 -0
  41. package/types/src/utils/resource_folders.d.ts.map +1 -0
  42. package/types/src/utils/utils.d.ts.map +1 -1
  43. package/types/windmill-utils-internal/src/inline-scripts/extractor.d.ts +9 -1
  44. package/types/windmill-utils-internal/src/inline-scripts/extractor.d.ts.map +1 -1
  45. package/types/windmill-utils-internal/src/path-utils/path-assigner.d.ts +9 -1
  46. package/types/windmill-utils-internal/src/path-utils/path-assigner.d.ts.map +1 -1
@@ -0,0 +1,160 @@
1
+ /**
2
+ * Utility module for handling resource folder naming conventions.
3
+ *
4
+ * This module centralizes the logic for detecting and manipulating paths
5
+ * that contain resource folders (.flow, .app, .raw_app).
6
+ *
7
+ * The folder suffixes can be configured to use either dot-prefixed names
8
+ * (.flow, .app, .raw_app) or dunder-prefixed names (__flow, __app, __raw_app).
9
+ */
10
+ export type FolderResourceType = "flow" | "app" | "raw_app";
11
+ declare const DOTTED_SUFFIXES: {
12
+ readonly flow: ".flow";
13
+ readonly app: ".app";
14
+ readonly raw_app: ".raw_app";
15
+ };
16
+ declare const NON_DOTTED_SUFFIXES: {
17
+ readonly flow: "__flow";
18
+ readonly app: "__app";
19
+ readonly raw_app: "__raw_app";
20
+ };
21
+ export type FolderSuffixes = typeof DOTTED_SUFFIXES | typeof NON_DOTTED_SUFFIXES;
22
+ /**
23
+ * Set whether to use non-dotted paths (__flow, __app, __raw_app)
24
+ * instead of dotted paths (.flow, .app, .raw_app).
25
+ * This should be called once at startup based on wmill.yaml configuration.
26
+ */
27
+ export declare function setNonDottedPaths(value: boolean): void;
28
+ /**
29
+ * Get the current nonDottedPaths setting.
30
+ */
31
+ export declare function getNonDottedPaths(): boolean;
32
+ /**
33
+ * Get the folder suffixes based on the global configuration.
34
+ */
35
+ export declare function getFolderSuffixes(): FolderSuffixes;
36
+ /**
37
+ * Get the folder suffix for a resource type (e.g., ".flow", ".app", ".raw_app" or "__flow", "__app", "__raw_app")
38
+ */
39
+ export declare function getFolderSuffix(type: FolderResourceType): string;
40
+ /**
41
+ * Get the folder suffix with path separator (e.g., ".flow/", ".app/", ".raw_app/")
42
+ */
43
+ export declare function getFolderSuffixWithSep(type: FolderResourceType): string;
44
+ /**
45
+ * Get the metadata file name for a resource type
46
+ */
47
+ export declare function getMetadataFileName(type: FolderResourceType, format: "yaml" | "json"): string;
48
+ /**
49
+ * Get the full metadata file path suffix (e.g., ".flow/flow.yaml" or "__flow/flow.yaml")
50
+ */
51
+ export declare function getMetadataPathSuffix(type: FolderResourceType, format: "yaml" | "json"): string;
52
+ /**
53
+ * Check if a path is inside a flow folder
54
+ */
55
+ export declare function isFlowPath(p: string): boolean;
56
+ /**
57
+ * Check if a path is inside an app folder
58
+ */
59
+ export declare function isAppPath(p: string): boolean;
60
+ /**
61
+ * Check if a path is inside a raw_app folder
62
+ */
63
+ export declare function isRawAppPath(p: string): boolean;
64
+ /**
65
+ * Check if a path is inside any folder-based resource (flow, app, or raw_app)
66
+ */
67
+ export declare function isFolderResourcePath(p: string): boolean;
68
+ /**
69
+ * Detect the resource type from a path, if any
70
+ */
71
+ export declare function detectFolderResourceType(p: string): FolderResourceType | null;
72
+ /**
73
+ * Check if a path is inside a raw app backend folder.
74
+ * Matches patterns like: .../myApp.raw_app/backend/... or .../myApp__raw_app/backend/...
75
+ */
76
+ export declare function isRawAppBackendPath(filePath: string): boolean;
77
+ /**
78
+ * Check if a path is inside a normal app folder (inline script).
79
+ * Matches patterns like: .../myApp.app/... or .../myApp__app/...
80
+ * This is used to detect inline scripts that belong to normal apps.
81
+ */
82
+ export declare function isAppInlineScriptPath(filePath: string): boolean;
83
+ /**
84
+ * Check if a path is inside a flow folder (inline script).
85
+ * Matches patterns like: .../myFlow.flow/... or .../myFlow__flow/...
86
+ * This is used to detect inline scripts that belong to flows.
87
+ */
88
+ export declare function isFlowInlineScriptPath(filePath: string): boolean;
89
+ /**
90
+ * Extract the resource name from a path (the part before the folder suffix)
91
+ * e.g., "f/my_flow.flow/flow.yaml" -> "f/my_flow"
92
+ */
93
+ export declare function extractResourceName(p: string, type: FolderResourceType): string | null;
94
+ /**
95
+ * Extract the folder path (resource name + folder suffix)
96
+ * e.g., "f/my_flow.flow/flow.yaml" -> "f/my_flow.flow/"
97
+ */
98
+ export declare function extractFolderPath(p: string, type: FolderResourceType): string | null;
99
+ /**
100
+ * Build a folder path from a resource name
101
+ * e.g., ("f/my_flow", "flow") -> "f/my_flow.flow"
102
+ */
103
+ export declare function buildFolderPath(resourceName: string, type: FolderResourceType): string;
104
+ /**
105
+ * Build a metadata file path from a resource name
106
+ * e.g., ("f/my_flow", "flow", "yaml") -> "f/my_flow.flow/flow.yaml"
107
+ */
108
+ export declare function buildMetadataPath(resourceName: string, type: FolderResourceType, format: "yaml" | "json"): string;
109
+ /**
110
+ * Check if a directory name ends with a specific resource folder suffix
111
+ * e.g., "my_app.raw_app" ends with ".raw_app" or "my_app__raw_app" ends with "__raw_app"
112
+ */
113
+ export declare function hasFolderSuffix(dirName: string, type: FolderResourceType): boolean;
114
+ /**
115
+ * Validate that a directory name has the expected folder suffix
116
+ * Returns an error message if invalid, null if valid
117
+ */
118
+ export declare function validateFolderName(dirName: string, type: FolderResourceType): string | null;
119
+ /**
120
+ * Extract the resource name from a folder name by removing the suffix
121
+ * e.g., "my_app.raw_app" -> "my_app" or "my_app__raw_app" -> "my_app"
122
+ */
123
+ export declare function extractNameFromFolder(folderName: string, type: FolderResourceType): string;
124
+ /**
125
+ * Check if a path ends with a flow metadata file suffix.
126
+ * Detects BOTH API format (always dotted: .flow.json) and local format (user-configured).
127
+ * This is necessary because the API always returns dotted format, but local files
128
+ * may use non-dotted format if nonDottedPaths is configured.
129
+ */
130
+ export declare function isFlowMetadataFile(p: string): boolean;
131
+ /**
132
+ * Check if a path ends with an app metadata file suffix.
133
+ * Detects BOTH API format (always dotted: .app.json) and local format (user-configured).
134
+ */
135
+ export declare function isAppMetadataFile(p: string): boolean;
136
+ /**
137
+ * Check if a path ends with a raw_app metadata file suffix.
138
+ * Detects BOTH API format (always dotted: .raw_app.json) and local format (user-configured).
139
+ */
140
+ export declare function isRawAppMetadataFile(p: string): boolean;
141
+ /**
142
+ * Check if a path ends with a specific raw_app metadata file
143
+ * (inside the folder, e.g., ".raw_app/raw_app.yaml" or "__raw_app/raw_app.yaml")
144
+ */
145
+ export declare function isRawAppFolderMetadataFile(p: string): boolean;
146
+ /**
147
+ * Get the path suffix to remove when converting local path to API path
148
+ * for delete operations
149
+ */
150
+ export declare function getDeleteSuffix(type: FolderResourceType, format: "yaml" | "json"): string;
151
+ /**
152
+ * Transform a JSON path from API format to local directory path for sync.
153
+ * The API always returns dotted format (.flow.json, .app.json, .raw_app.json).
154
+ * This function transforms to the user's configured format (dotted or non-dotted).
155
+ * e.g., with nonDottedPaths=true: "f/my_flow.flow.json" -> "f/my_flow__flow"
156
+ * e.g., with nonDottedPaths=false: "f/my_flow.flow.json" -> "f/my_flow.flow"
157
+ */
158
+ export declare function transformJsonPathToDir(p: string, type: FolderResourceType): string;
159
+ export {};
160
+ //# sourceMappingURL=resource_folders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource_folders.d.ts","sourceRoot":"","sources":["../../../src/src/utils/resource_folders.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC;AAI5D,QAAA,MAAM,eAAe;;;;CAIX,CAAC;AAGX,QAAA,MAAM,mBAAmB;;;;CAIf,CAAC;AAEX,MAAM,MAAM,cAAc,GACtB,OAAO,eAAe,GACtB,OAAO,mBAAmB,CAAC;AAK/B;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAKtD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,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;AAGD,wBAAsB,gBAAgB,CAAC,CAAC,SAAS,UAAU,EACzD,YAAY,EAAE,CAAC,EAAE,EACjB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,CAAC,CAAC,CAiDZ;AAGD,wBAAsB,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,CAMjD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAkBrE;AAED,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,MAAM,CAAC,CAMjB;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,UAIhC;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C"}
@@ -9,6 +9,13 @@ interface InlineScript {
9
9
  /** The actual script content */
10
10
  content: string;
11
11
  }
12
+ /**
13
+ * Options for extractInlineScripts function
14
+ */
15
+ export interface ExtractInlineScriptsOptions {
16
+ /** When true, skip the .inline_script. suffix in file names */
17
+ skipInlineScriptSuffix?: boolean;
18
+ }
12
19
  /**
13
20
  * Extracts inline scripts from flow modules, converting them to separate files
14
21
  * and replacing the original content with file references.
@@ -18,9 +25,10 @@ interface InlineScript {
18
25
  * @param separator - Path separator to use
19
26
  * @param defaultTs - Default TypeScript runtime to use ("bun" or "deno")
20
27
  * @param pathAssigner - Optional path assigner to reuse (for nested calls)
28
+ * @param options - Optional configuration options
21
29
  * @returns Array of inline scripts with their paths and content
22
30
  */
23
- export declare function extractInlineScripts(modules: FlowModule[], mapping?: Record<string, string>, separator?: string, defaultTs?: "bun" | "deno", pathAssigner?: PathAssigner): InlineScript[];
31
+ export declare function extractInlineScripts(modules: FlowModule[], mapping?: Record<string, string>, separator?: string, defaultTs?: "bun" | "deno", pathAssigner?: PathAssigner, options?: ExtractInlineScriptsOptions): InlineScript[];
24
32
  /**
25
33
  * Extracts the current mapping of module IDs to file paths from flow modules
26
34
  * by analyzing existing inline script references.
@@ -1 +1 @@
1
- {"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../../../src/windmill-utils-internal/src/inline-scripts/extractor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD;;GAEG;AACH,UAAU,YAAY;IACpB,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,UAAU,EAAE,EACrB,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EACpC,SAAS,GAAE,MAAY,EACvB,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,EAC1B,YAAY,CAAC,EAAE,YAAY,GAC1B,YAAY,EAAE,CA6DhB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,UAAU,EAAE,GAAG,SAAS,EACjC,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GACnC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgCxB"}
1
+ {"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../../../src/windmill-utils-internal/src/inline-scripts/extractor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD;;GAEG;AACH,UAAU,YAAY;IACpB,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,+DAA+D;IAC/D,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,UAAU,EAAE,EACrB,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EACpC,SAAS,GAAE,MAAY,EACvB,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,EAC1B,YAAY,CAAC,EAAE,YAAY,EAC3B,OAAO,CAAC,EAAE,2BAA2B,GACpC,YAAY,EAAE,CA6DhB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,UAAU,EAAE,GAAG,SAAS,EACjC,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GACnC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgCxB"}
@@ -32,13 +32,21 @@ export declare function getLanguageFromExtension(ext: string, defaultTs?: "bun"
32
32
  export interface PathAssigner {
33
33
  assignPath(summary: string | undefined, language: SupportedLanguage): [string, string];
34
34
  }
35
+ export interface PathAssignerOptions {
36
+ defaultTs: "bun" | "deno";
37
+ /** When true, skip the .inline_script. suffix in file names */
38
+ skipInlineScriptSuffix?: boolean;
39
+ }
35
40
  /**
36
41
  * Creates a new path assigner for inline scripts.
37
42
  *
38
43
  * @param defaultTs - Default TypeScript runtime ("bun" or "deno")
44
+ * @param options - Optional configuration (can pass options object instead of defaultTs)
39
45
  * @returns Path assigner function
40
46
  */
41
- export declare function newPathAssigner(defaultTs: "bun" | "deno"): PathAssigner;
47
+ export declare function newPathAssigner(defaultTs: "bun" | "deno" | PathAssignerOptions, options?: {
48
+ skipInlineScriptSuffix?: boolean;
49
+ }): PathAssigner;
42
50
  /**
43
51
  * Creates a new path assigner for raw app runnables.
44
52
  * Unlike newPathAssigner, this does NOT add ".inline_script." prefix since
@@ -1 +1 @@
1
- {"version":3,"file":"path-assigner.d.ts","sourceRoot":"","sources":["../../../../src/windmill-utils-internal/src/path-utils/path-assigner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE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