windmill-cli 1.586.0 → 1.586.2

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 (475) hide show
  1. package/esm/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/_create_walk_entry.js +2 -2
  2. package/esm/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/_is_same_path.js +1 -1
  3. package/esm/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/_is_subdir.js +2 -2
  4. package/esm/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/_to_path_string.js +1 -1
  5. package/esm/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/copy.js +5 -4
  6. package/esm/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/empty_dir.js +1 -1
  7. package/esm/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/ensure_file.js +1 -1
  8. package/esm/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/ensure_link.js +1 -1
  9. package/esm/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/ensure_symlink.js +4 -3
  10. package/esm/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/expand_glob.js +12 -36
  11. package/esm/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/move.js +1 -2
  12. package/esm/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/walk.js +1 -1
  13. package/esm/deps/jsr.io/@std/io/0.225.2/read_all.js +1 -1
  14. package/esm/deps/jsr.io/@std/log/0.224.14/console_handler.js +1 -1
  15. package/esm/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.js +1 -1
  16. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/assert_path.js +1 -1
  17. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/basename.js +1 -1
  18. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/common.js +1 -1
  19. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/constants.js +1 -1
  20. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/dirname.js +1 -1
  21. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/format.js +1 -1
  22. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/from_file_url.js +1 -1
  23. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/glob_to_reg_exp.js +1 -1
  24. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/normalize.js +1 -1
  25. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/normalize_string.js +1 -1
  26. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/relative.js +1 -1
  27. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/strip_trailing_separators.js +1 -1
  28. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/to_file_url.js +1 -1
  29. package/esm/deps/jsr.io/@std/path/1.0.8/_os.js +9 -0
  30. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/basename.js +5 -4
  31. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/common.js +1 -1
  32. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/constants.js +2 -2
  33. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/dirname.js +5 -4
  34. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/extname.js +5 -4
  35. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/format.js +2 -2
  36. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/from_file_url.js +2 -2
  37. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/glob_to_regexp.js +2 -2
  38. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/is_absolute.js +2 -2
  39. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/is_glob.js +2 -2
  40. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/join.js +7 -7
  41. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/join_globs.js +2 -2
  42. package/esm/deps/jsr.io/@std/path/1.0.8/mod.js +57 -0
  43. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/normalize.js +5 -4
  44. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/normalize_glob.js +2 -2
  45. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/parse.js +2 -2
  46. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/_util.js +1 -1
  47. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/basename.js +4 -7
  48. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/constants.js +1 -1
  49. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/dirname.js +4 -6
  50. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/extname.js +4 -8
  51. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/format.js +1 -1
  52. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/from_file_url.js +1 -1
  53. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/glob_to_regexp.js +1 -1
  54. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/is_absolute.js +1 -1
  55. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/join.js +8 -11
  56. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/join_globs.js +1 -1
  57. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/normalize.js +6 -7
  58. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/normalize_glob.js +1 -1
  59. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/parse.js +1 -1
  60. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/relative.js +1 -1
  61. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/resolve.js +1 -1
  62. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/to_file_url.js +1 -1
  63. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/to_namespaced_path.js +1 -1
  64. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/relative.js +2 -2
  65. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/resolve.js +2 -2
  66. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/to_file_url.js +2 -2
  67. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/to_namespaced_path.js +2 -2
  68. package/esm/deps/jsr.io/@std/path/1.0.8/types.js +3 -0
  69. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/_util.js +1 -1
  70. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/basename.js +4 -7
  71. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/constants.js +1 -1
  72. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/dirname.js +6 -7
  73. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/extname.js +6 -7
  74. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/format.js +1 -1
  75. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/from_file_url.js +1 -1
  76. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/glob_to_regexp.js +1 -1
  77. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/is_absolute.js +1 -1
  78. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/join.js +7 -10
  79. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/join_globs.js +1 -1
  80. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/normalize.js +6 -7
  81. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/normalize_glob.js +1 -1
  82. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/parse.js +1 -1
  83. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/relative.js +1 -1
  84. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/resolve.js +1 -1
  85. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/to_file_url.js +1 -1
  86. package/esm/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/to_namespaced_path.js +1 -1
  87. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_chars.js +1 -1
  88. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_dumper_state.js +5 -14
  89. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_loader_state.js +150 -168
  90. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_schema.js +6 -11
  91. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/bool.js +1 -1
  92. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/float.js +1 -1
  93. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/int.js +1 -1
  94. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/map.js +1 -1
  95. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/merge.js +1 -1
  96. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/nil.js +1 -1
  97. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/omap.js +1 -1
  98. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/pairs.js +1 -1
  99. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/regexp.js +1 -1
  100. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/seq.js +1 -1
  101. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/set.js +1 -1
  102. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/str.js +1 -1
  103. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/timestamp.js +1 -1
  104. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/undefined.js +1 -1
  105. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type.js +1 -1
  106. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_utils.js +1 -1
  107. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/mod.js +1 -1
  108. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/parse.js +1 -1
  109. package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/stringify.js +1 -1
  110. package/esm/deps/jsr.io/@windmill-labs/shared-utils/1.0.10/lib.es.js +1522 -0
  111. package/esm/deps.js +6 -6
  112. package/esm/gen/services.gen.js +138 -0
  113. package/esm/src/commands/app/app_metadata.js +287 -0
  114. package/esm/src/commands/app/apps.js +65 -31
  115. package/esm/src/commands/app/bundle.js +249 -0
  116. package/esm/src/commands/app/dev.js +591 -0
  117. package/esm/src/commands/app/metadata.js +1 -0
  118. package/esm/src/commands/app/raw_apps.js +212 -0
  119. package/esm/src/commands/app/wmillTsDev.js +89 -0
  120. package/esm/src/commands/dependencies/dependencies.js +66 -0
  121. package/esm/src/commands/dev/dev.js +1 -1
  122. package/esm/src/commands/flow/flow.js +4 -5
  123. package/esm/src/commands/flow/flow_metadata.js +140 -0
  124. package/esm/src/commands/script/script.js +20 -37
  125. package/esm/src/commands/sync/pull.js +5 -3
  126. package/esm/src/commands/sync/sync.js +264 -76
  127. package/esm/src/commands/workspace/fork.js +6 -8
  128. package/esm/src/commands/workspace/workspace.js +7 -4
  129. package/esm/src/core/conf.js +5 -1
  130. package/esm/src/core/context.js +57 -47
  131. package/esm/src/main.js +2 -0
  132. package/esm/src/types.js +33 -16
  133. package/esm/src/utils/metadata.js +58 -178
  134. package/esm/src/utils/script_common.js +5 -5
  135. package/esm/src/utils/utils.js +21 -9
  136. package/package.json +4 -3
  137. package/types/deps/jsr.io/@std/bytes/{1.0.6 → 1.0.5}/_types.d.ts.map +1 -1
  138. package/types/deps/jsr.io/@std/bytes/{1.0.6 → 1.0.5}/concat.d.ts +1 -1
  139. package/types/deps/jsr.io/@std/bytes/{1.0.6 → 1.0.5}/concat.d.ts.map +1 -1
  140. package/types/deps/jsr.io/@std/fmt/{1.0.8 → 1.0.6}/colors.d.ts.map +1 -1
  141. package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/_create_walk_entry.d.ts.map +1 -1
  142. package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/_get_file_info_type.d.ts.map +1 -1
  143. package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/_is_same_path.d.ts.map +1 -1
  144. package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/_is_subdir.d.ts.map +1 -1
  145. package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/_to_path_string.d.ts.map +1 -1
  146. package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/copy.d.ts.map +1 -1
  147. package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/empty_dir.d.ts.map +1 -1
  148. package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/ensure_dir.d.ts.map +1 -1
  149. package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/ensure_file.d.ts.map +1 -1
  150. package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/ensure_link.d.ts.map +1 -1
  151. package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/ensure_symlink.d.ts.map +1 -1
  152. package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/eol.d.ts.map +1 -1
  153. package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/exists.d.ts.map +1 -1
  154. package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/expand_glob.d.ts +1 -1
  155. package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/expand_glob.d.ts.map +1 -1
  156. package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/mod.d.ts.map +1 -1
  157. package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/move.d.ts.map +1 -1
  158. package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/walk.d.ts.map +1 -1
  159. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/assert_path.d.ts.map +1 -1
  160. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/basename.d.ts.map +1 -1
  161. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/common.d.ts.map +1 -1
  162. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/constants.d.ts.map +1 -1
  163. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/dirname.d.ts.map +1 -1
  164. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/format.d.ts.map +1 -1
  165. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/from_file_url.d.ts.map +1 -1
  166. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/glob_to_reg_exp.d.ts.map +1 -1
  167. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/normalize.d.ts.map +1 -1
  168. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/normalize_string.d.ts.map +1 -1
  169. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/relative.d.ts.map +1 -1
  170. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/strip_trailing_separators.d.ts.map +1 -1
  171. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/to_file_url.d.ts.map +1 -1
  172. package/types/deps/jsr.io/@std/path/1.0.8/_os.d.ts +2 -0
  173. package/types/deps/jsr.io/@std/path/1.0.8/_os.d.ts.map +1 -0
  174. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/basename.d.ts +4 -3
  175. package/types/deps/jsr.io/@std/path/1.0.8/basename.d.ts.map +1 -0
  176. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/common.d.ts.map +1 -1
  177. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/constants.d.ts.map +1 -1
  178. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/dirname.d.ts +4 -3
  179. package/types/deps/jsr.io/@std/path/1.0.8/dirname.d.ts.map +1 -0
  180. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/extname.d.ts +4 -3
  181. package/types/deps/jsr.io/@std/path/1.0.8/extname.d.ts.map +1 -0
  182. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/format.d.ts.map +1 -1
  183. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/from_file_url.d.ts.map +1 -1
  184. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/glob_to_regexp.d.ts.map +1 -1
  185. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/is_absolute.d.ts.map +1 -1
  186. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/is_glob.d.ts.map +1 -1
  187. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/join.d.ts +4 -4
  188. package/types/deps/jsr.io/@std/path/1.0.8/join.d.ts.map +1 -0
  189. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/join_globs.d.ts.map +1 -1
  190. package/types/deps/jsr.io/@std/path/1.0.8/mod.d.ts +54 -0
  191. package/types/deps/jsr.io/@std/path/1.0.8/mod.d.ts.map +1 -0
  192. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/normalize.d.ts +4 -3
  193. package/types/deps/jsr.io/@std/path/1.0.8/normalize.d.ts.map +1 -0
  194. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/normalize_glob.d.ts.map +1 -1
  195. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/parse.d.ts.map +1 -1
  196. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/_util.d.ts.map +1 -1
  197. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/basename.d.ts +4 -3
  198. package/types/deps/jsr.io/@std/path/1.0.8/posix/basename.d.ts.map +1 -0
  199. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/constants.d.ts.map +1 -1
  200. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/dirname.d.ts +4 -2
  201. package/types/deps/jsr.io/@std/path/1.0.8/posix/dirname.d.ts.map +1 -0
  202. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/extname.d.ts +4 -4
  203. package/types/deps/jsr.io/@std/path/1.0.8/posix/extname.d.ts.map +1 -0
  204. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/format.d.ts.map +1 -1
  205. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/from_file_url.d.ts.map +1 -1
  206. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/glob_to_regexp.d.ts.map +1 -1
  207. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/is_absolute.d.ts.map +1 -1
  208. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/join.d.ts +6 -4
  209. package/types/deps/jsr.io/@std/path/1.0.8/posix/join.d.ts.map +1 -0
  210. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/join_globs.d.ts.map +1 -1
  211. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/normalize.d.ts +6 -3
  212. package/types/deps/jsr.io/@std/path/1.0.8/posix/normalize.d.ts.map +1 -0
  213. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/normalize_glob.d.ts.map +1 -1
  214. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/parse.d.ts.map +1 -1
  215. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/relative.d.ts.map +1 -1
  216. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/resolve.d.ts.map +1 -1
  217. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/to_file_url.d.ts.map +1 -1
  218. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/to_namespaced_path.d.ts.map +1 -1
  219. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/relative.d.ts.map +1 -1
  220. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/resolve.d.ts.map +1 -1
  221. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/to_file_url.d.ts.map +1 -1
  222. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/to_namespaced_path.d.ts.map +1 -1
  223. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/types.d.ts.map +1 -1
  224. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/_util.d.ts.map +1 -1
  225. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/basename.d.ts +4 -3
  226. package/types/deps/jsr.io/@std/path/1.0.8/windows/basename.d.ts.map +1 -0
  227. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/constants.d.ts.map +1 -1
  228. package/types/deps/jsr.io/@std/path/1.0.8/windows/dirname.d.ts +20 -0
  229. package/types/deps/jsr.io/@std/path/1.0.8/windows/dirname.d.ts.map +1 -0
  230. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/extname.d.ts +6 -3
  231. package/types/deps/jsr.io/@std/path/1.0.8/windows/extname.d.ts.map +1 -0
  232. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/format.d.ts.map +1 -1
  233. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/from_file_url.d.ts.map +1 -1
  234. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/glob_to_regexp.d.ts.map +1 -1
  235. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/is_absolute.d.ts.map +1 -1
  236. package/types/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts +20 -0
  237. package/types/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts.map +1 -0
  238. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/join_globs.d.ts.map +1 -1
  239. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/normalize.d.ts +6 -3
  240. package/types/deps/jsr.io/@std/path/1.0.8/windows/normalize.d.ts.map +1 -0
  241. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/normalize_glob.d.ts.map +1 -1
  242. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/parse.d.ts.map +1 -1
  243. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/relative.d.ts.map +1 -1
  244. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/resolve.d.ts.map +1 -1
  245. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/to_file_url.d.ts.map +1 -1
  246. package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/to_namespaced_path.d.ts.map +1 -1
  247. package/types/deps/jsr.io/@std/yaml/1.0.5/_chars.d.ts.map +1 -0
  248. package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_dumper_state.d.ts +1 -8
  249. package/types/deps/jsr.io/@std/yaml/1.0.5/_dumper_state.d.ts.map +1 -0
  250. package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_loader_state.d.ts +8 -14
  251. package/types/deps/jsr.io/@std/yaml/1.0.5/_loader_state.d.ts.map +1 -0
  252. package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_schema.d.ts +3 -7
  253. package/types/deps/jsr.io/@std/yaml/1.0.5/_schema.d.ts.map +1 -0
  254. package/types/deps/jsr.io/@std/yaml/1.0.5/_type/binary.d.ts.map +1 -0
  255. package/types/deps/jsr.io/@std/yaml/1.0.5/_type/bool.d.ts.map +1 -0
  256. package/types/deps/jsr.io/@std/yaml/1.0.5/_type/float.d.ts.map +1 -0
  257. package/types/deps/jsr.io/@std/yaml/1.0.5/_type/int.d.ts.map +1 -0
  258. package/types/deps/jsr.io/@std/yaml/1.0.5/_type/map.d.ts.map +1 -0
  259. package/types/deps/jsr.io/@std/yaml/1.0.5/_type/merge.d.ts.map +1 -0
  260. package/types/deps/jsr.io/@std/yaml/1.0.5/_type/nil.d.ts.map +1 -0
  261. package/types/deps/jsr.io/@std/yaml/1.0.5/_type/omap.d.ts.map +1 -0
  262. package/types/deps/jsr.io/@std/yaml/1.0.5/_type/pairs.d.ts.map +1 -0
  263. package/types/deps/jsr.io/@std/yaml/1.0.5/_type/regexp.d.ts.map +1 -0
  264. package/types/deps/jsr.io/@std/yaml/1.0.5/_type/seq.d.ts.map +1 -0
  265. package/types/deps/jsr.io/@std/yaml/1.0.5/_type/set.d.ts.map +1 -0
  266. package/types/deps/jsr.io/@std/yaml/1.0.5/_type/str.d.ts.map +1 -0
  267. package/types/deps/jsr.io/@std/yaml/1.0.5/_type/timestamp.d.ts.map +1 -0
  268. package/types/deps/jsr.io/@std/yaml/1.0.5/_type/undefined.d.ts.map +1 -0
  269. package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type.d.ts +0 -16
  270. package/types/deps/jsr.io/@std/yaml/1.0.5/_type.d.ts.map +1 -0
  271. package/types/deps/jsr.io/@std/yaml/1.0.5/_utils.d.ts.map +1 -0
  272. package/types/deps/jsr.io/@std/yaml/1.0.5/mod.d.ts.map +1 -0
  273. package/types/deps/jsr.io/@std/yaml/1.0.5/parse.d.ts.map +1 -0
  274. package/types/deps/jsr.io/@std/yaml/1.0.5/stringify.d.ts.map +1 -0
  275. package/types/deps/jsr.io/@windmill-labs/shared-utils/1.0.10/lib.es.d.ts +7 -0
  276. package/types/deps/jsr.io/@windmill-labs/shared-utils/1.0.10/lib.es.d.ts.map +1 -0
  277. package/types/deps.d.ts +6 -6
  278. package/types/deps.d.ts.map +1 -1
  279. package/types/gen/services.gen.d.ts +66 -1
  280. package/types/gen/services.gen.d.ts.map +1 -1
  281. package/types/gen/types.gen.d.ts +73 -0
  282. package/types/gen/types.gen.d.ts.map +1 -1
  283. package/types/src/commands/app/app_metadata.d.ts +26 -0
  284. package/types/src/commands/app/app_metadata.d.ts.map +1 -0
  285. package/types/src/commands/app/apps.d.ts +10 -1
  286. package/types/src/commands/app/apps.d.ts.map +1 -1
  287. package/types/src/commands/app/bundle.d.ts +70 -0
  288. package/types/src/commands/app/bundle.d.ts.map +1 -0
  289. package/types/src/commands/app/dev.d.ts +18 -0
  290. package/types/src/commands/app/dev.d.ts.map +1 -0
  291. package/types/src/commands/app/metadata.d.ts +20 -0
  292. package/types/src/commands/app/metadata.d.ts.map +1 -0
  293. package/types/src/commands/app/raw_apps.d.ts +18 -0
  294. package/types/src/commands/app/raw_apps.d.ts.map +1 -0
  295. package/types/src/commands/app/wmillTsDev.d.ts +2 -0
  296. package/types/src/commands/app/wmillTsDev.d.ts.map +1 -0
  297. package/types/src/commands/dependencies/dependencies.d.ts +15 -0
  298. package/types/src/commands/dependencies/dependencies.d.ts.map +1 -0
  299. package/types/src/commands/flow/flow.d.ts.map +1 -1
  300. package/types/src/commands/flow/flow_metadata.d.ts +8 -0
  301. package/types/src/commands/flow/flow_metadata.d.ts.map +1 -0
  302. package/types/src/commands/script/script.d.ts +4 -5
  303. package/types/src/commands/script/script.d.ts.map +1 -1
  304. package/types/src/commands/sync/pull.d.ts +1 -1
  305. package/types/src/commands/sync/pull.d.ts.map +1 -1
  306. package/types/src/commands/sync/sync.d.ts +7 -1
  307. package/types/src/commands/sync/sync.d.ts.map +1 -1
  308. package/types/src/commands/workspace/fork.d.ts.map +1 -1
  309. package/types/src/commands/workspace/workspace.d.ts.map +1 -1
  310. package/types/src/core/conf.d.ts +8 -1
  311. package/types/src/core/conf.d.ts.map +1 -1
  312. package/types/src/core/context.d.ts.map +1 -1
  313. package/types/src/main.d.ts.map +1 -1
  314. package/types/src/types.d.ts +1 -1
  315. package/types/src/types.d.ts.map +1 -1
  316. package/types/src/utils/metadata.d.ts +8 -9
  317. package/types/src/utils/metadata.d.ts.map +1 -1
  318. package/types/src/utils/script_common.d.ts +6 -6
  319. package/types/src/utils/script_common.d.ts.map +1 -1
  320. package/types/src/utils/utils.d.ts +2 -0
  321. package/types/src/utils/utils.d.ts.map +1 -1
  322. package/types/windmill-utils-internal/src/gen/types.gen.d.ts +73 -0
  323. package/types/windmill-utils-internal/src/gen/types.gen.d.ts.map +1 -1
  324. package/esm/deps/jsr.io/@std/internal/1.0.12/_os.js +0 -12
  325. package/esm/deps/jsr.io/@std/internal/1.0.12/os.js +0 -5
  326. package/esm/deps/jsr.io/@std/path/1.1.3/mod.js +0 -216
  327. package/esm/deps/jsr.io/@std/path/1.1.3/types.js +0 -3
  328. package/types/deps/jsr.io/@std/internal/1.0.12/_os.d.ts +0 -2
  329. package/types/deps/jsr.io/@std/internal/1.0.12/_os.d.ts.map +0 -1
  330. package/types/deps/jsr.io/@std/internal/1.0.12/os.d.ts +0 -3
  331. package/types/deps/jsr.io/@std/internal/1.0.12/os.d.ts.map +0 -1
  332. package/types/deps/jsr.io/@std/path/1.1.3/basename.d.ts.map +0 -1
  333. package/types/deps/jsr.io/@std/path/1.1.3/dirname.d.ts.map +0 -1
  334. package/types/deps/jsr.io/@std/path/1.1.3/extname.d.ts.map +0 -1
  335. package/types/deps/jsr.io/@std/path/1.1.3/join.d.ts.map +0 -1
  336. package/types/deps/jsr.io/@std/path/1.1.3/mod.d.ts +0 -213
  337. package/types/deps/jsr.io/@std/path/1.1.3/mod.d.ts.map +0 -1
  338. package/types/deps/jsr.io/@std/path/1.1.3/normalize.d.ts.map +0 -1
  339. package/types/deps/jsr.io/@std/path/1.1.3/posix/basename.d.ts.map +0 -1
  340. package/types/deps/jsr.io/@std/path/1.1.3/posix/dirname.d.ts.map +0 -1
  341. package/types/deps/jsr.io/@std/path/1.1.3/posix/extname.d.ts.map +0 -1
  342. package/types/deps/jsr.io/@std/path/1.1.3/posix/join.d.ts.map +0 -1
  343. package/types/deps/jsr.io/@std/path/1.1.3/posix/normalize.d.ts.map +0 -1
  344. package/types/deps/jsr.io/@std/path/1.1.3/windows/basename.d.ts.map +0 -1
  345. package/types/deps/jsr.io/@std/path/1.1.3/windows/dirname.d.ts +0 -17
  346. package/types/deps/jsr.io/@std/path/1.1.3/windows/dirname.d.ts.map +0 -1
  347. package/types/deps/jsr.io/@std/path/1.1.3/windows/extname.d.ts.map +0 -1
  348. package/types/deps/jsr.io/@std/path/1.1.3/windows/join.d.ts +0 -18
  349. package/types/deps/jsr.io/@std/path/1.1.3/windows/join.d.ts.map +0 -1
  350. package/types/deps/jsr.io/@std/path/1.1.3/windows/normalize.d.ts.map +0 -1
  351. package/types/deps/jsr.io/@std/yaml/1.0.10/_chars.d.ts.map +0 -1
  352. package/types/deps/jsr.io/@std/yaml/1.0.10/_dumper_state.d.ts.map +0 -1
  353. package/types/deps/jsr.io/@std/yaml/1.0.10/_loader_state.d.ts.map +0 -1
  354. package/types/deps/jsr.io/@std/yaml/1.0.10/_schema.d.ts.map +0 -1
  355. package/types/deps/jsr.io/@std/yaml/1.0.10/_type/binary.d.ts.map +0 -1
  356. package/types/deps/jsr.io/@std/yaml/1.0.10/_type/bool.d.ts.map +0 -1
  357. package/types/deps/jsr.io/@std/yaml/1.0.10/_type/float.d.ts.map +0 -1
  358. package/types/deps/jsr.io/@std/yaml/1.0.10/_type/int.d.ts.map +0 -1
  359. package/types/deps/jsr.io/@std/yaml/1.0.10/_type/map.d.ts.map +0 -1
  360. package/types/deps/jsr.io/@std/yaml/1.0.10/_type/merge.d.ts.map +0 -1
  361. package/types/deps/jsr.io/@std/yaml/1.0.10/_type/nil.d.ts.map +0 -1
  362. package/types/deps/jsr.io/@std/yaml/1.0.10/_type/omap.d.ts.map +0 -1
  363. package/types/deps/jsr.io/@std/yaml/1.0.10/_type/pairs.d.ts.map +0 -1
  364. package/types/deps/jsr.io/@std/yaml/1.0.10/_type/regexp.d.ts.map +0 -1
  365. package/types/deps/jsr.io/@std/yaml/1.0.10/_type/seq.d.ts.map +0 -1
  366. package/types/deps/jsr.io/@std/yaml/1.0.10/_type/set.d.ts.map +0 -1
  367. package/types/deps/jsr.io/@std/yaml/1.0.10/_type/str.d.ts.map +0 -1
  368. package/types/deps/jsr.io/@std/yaml/1.0.10/_type/timestamp.d.ts.map +0 -1
  369. package/types/deps/jsr.io/@std/yaml/1.0.10/_type/undefined.d.ts.map +0 -1
  370. package/types/deps/jsr.io/@std/yaml/1.0.10/_type.d.ts.map +0 -1
  371. package/types/deps/jsr.io/@std/yaml/1.0.10/_utils.d.ts.map +0 -1
  372. package/types/deps/jsr.io/@std/yaml/1.0.10/mod.d.ts.map +0 -1
  373. package/types/deps/jsr.io/@std/yaml/1.0.10/parse.d.ts.map +0 -1
  374. package/types/deps/jsr.io/@std/yaml/1.0.10/stringify.d.ts.map +0 -1
  375. /package/esm/deps/jsr.io/@std/bytes/{1.0.6 → 1.0.5}/_types.js +0 -0
  376. /package/esm/deps/jsr.io/@std/bytes/{1.0.6 → 1.0.5}/concat.js +0 -0
  377. /package/esm/deps/jsr.io/@std/fmt/{1.0.8 → 1.0.6}/colors.js +0 -0
  378. /package/esm/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/_get_file_info_type.js +0 -0
  379. /package/esm/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/ensure_dir.js +0 -0
  380. /package/esm/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/eol.js +0 -0
  381. /package/esm/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/exists.js +0 -0
  382. /package/esm/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/mod.js +0 -0
  383. /package/esm/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/binary.js +0 -0
  384. /package/types/deps/jsr.io/@std/bytes/{1.0.6 → 1.0.5}/_types.d.ts +0 -0
  385. /package/types/deps/jsr.io/@std/fmt/{1.0.8 → 1.0.6}/colors.d.ts +0 -0
  386. /package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/_create_walk_entry.d.ts +0 -0
  387. /package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/_get_file_info_type.d.ts +0 -0
  388. /package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/_is_same_path.d.ts +0 -0
  389. /package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/_is_subdir.d.ts +0 -0
  390. /package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/_to_path_string.d.ts +0 -0
  391. /package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/copy.d.ts +0 -0
  392. /package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/empty_dir.d.ts +0 -0
  393. /package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/ensure_dir.d.ts +0 -0
  394. /package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/ensure_file.d.ts +0 -0
  395. /package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/ensure_link.d.ts +0 -0
  396. /package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/ensure_symlink.d.ts +0 -0
  397. /package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/eol.d.ts +0 -0
  398. /package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/exists.d.ts +0 -0
  399. /package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/mod.d.ts +0 -0
  400. /package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/move.d.ts +0 -0
  401. /package/types/deps/jsr.io/@std/fs/{1.0.20 → 1.0.16}/walk.d.ts +0 -0
  402. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/assert_path.d.ts +0 -0
  403. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/basename.d.ts +0 -0
  404. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/common.d.ts +0 -0
  405. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/constants.d.ts +0 -0
  406. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/dirname.d.ts +0 -0
  407. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/format.d.ts +0 -0
  408. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/from_file_url.d.ts +0 -0
  409. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/glob_to_reg_exp.d.ts +0 -0
  410. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/normalize.d.ts +0 -0
  411. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/normalize_string.d.ts +0 -0
  412. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/relative.d.ts +0 -0
  413. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/strip_trailing_separators.d.ts +0 -0
  414. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/_common/to_file_url.d.ts +0 -0
  415. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/common.d.ts +0 -0
  416. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/constants.d.ts +0 -0
  417. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/format.d.ts +0 -0
  418. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/from_file_url.d.ts +0 -0
  419. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/glob_to_regexp.d.ts +0 -0
  420. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/is_absolute.d.ts +0 -0
  421. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/is_glob.d.ts +0 -0
  422. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/join_globs.d.ts +0 -0
  423. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/normalize_glob.d.ts +0 -0
  424. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/parse.d.ts +0 -0
  425. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/_util.d.ts +0 -0
  426. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/constants.d.ts +0 -0
  427. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/format.d.ts +0 -0
  428. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/from_file_url.d.ts +0 -0
  429. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/glob_to_regexp.d.ts +0 -0
  430. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/is_absolute.d.ts +0 -0
  431. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/join_globs.d.ts +0 -0
  432. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/normalize_glob.d.ts +0 -0
  433. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/parse.d.ts +0 -0
  434. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/relative.d.ts +0 -0
  435. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/resolve.d.ts +0 -0
  436. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/to_file_url.d.ts +0 -0
  437. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/posix/to_namespaced_path.d.ts +0 -0
  438. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/relative.d.ts +0 -0
  439. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/resolve.d.ts +0 -0
  440. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/to_file_url.d.ts +0 -0
  441. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/to_namespaced_path.d.ts +0 -0
  442. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/types.d.ts +0 -0
  443. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/_util.d.ts +0 -0
  444. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/constants.d.ts +0 -0
  445. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/format.d.ts +0 -0
  446. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/from_file_url.d.ts +0 -0
  447. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/glob_to_regexp.d.ts +0 -0
  448. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/is_absolute.d.ts +0 -0
  449. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/join_globs.d.ts +0 -0
  450. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/normalize_glob.d.ts +0 -0
  451. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/parse.d.ts +0 -0
  452. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/relative.d.ts +0 -0
  453. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/resolve.d.ts +0 -0
  454. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/to_file_url.d.ts +0 -0
  455. /package/types/deps/jsr.io/@std/path/{1.1.3 → 1.0.8}/windows/to_namespaced_path.d.ts +0 -0
  456. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_chars.d.ts +0 -0
  457. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/binary.d.ts +0 -0
  458. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/bool.d.ts +0 -0
  459. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/float.d.ts +0 -0
  460. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/int.d.ts +0 -0
  461. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/map.d.ts +0 -0
  462. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/merge.d.ts +0 -0
  463. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/nil.d.ts +0 -0
  464. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/omap.d.ts +0 -0
  465. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/pairs.d.ts +0 -0
  466. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/regexp.d.ts +0 -0
  467. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/seq.d.ts +0 -0
  468. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/set.d.ts +0 -0
  469. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/str.d.ts +0 -0
  470. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/timestamp.d.ts +0 -0
  471. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_type/undefined.d.ts +0 -0
  472. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/_utils.d.ts +0 -0
  473. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/mod.d.ts +0 -0
  474. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/parse.d.ts +0 -0
  475. /package/types/deps/jsr.io/@std/yaml/{1.0.10 → 1.0.5}/stringify.d.ts +0 -0
@@ -0,0 +1,591 @@
1
+ // deno-lint-ignore-file no-explicit-any
2
+ import * as dntShim from "../../../_dnt.shims.js";
3
+ import { Command, colors, log, getPort, open, windmillUtils, yamlParseFile, } from "../../../deps.js";
4
+ import * as http from "node:http";
5
+ import * as fs from "node:fs";
6
+ import * as path from "node:path";
7
+ import process from "node:process";
8
+ import { writeFileSync } from "node:fs";
9
+ import { WebSocketServer } from "ws";
10
+ import { getDevBuildOptions, ensureNodeModules, createFrameworkPlugins, detectFrameworks } from "./bundle.js";
11
+ import { wmillTsDev as wmillTs } from "./wmillTsDev.js";
12
+ import * as wmill from "../../../gen/services.gen.js";
13
+ import { resolveWorkspace } from "../../core/context.js";
14
+ import { requireLogin } from "../../core/auth.js";
15
+ import { GLOBAL_CONFIG_OPT } from "../../core/conf.js";
16
+ import { replaceInlineScripts } from "./apps.js";
17
+ import { inferRunnableSchemaFromFile } from "./app_metadata.js";
18
+ const DEFAULT_PORT = 4000;
19
+ const DEFAULT_HOST = "localhost";
20
+ // HTML template with live reload
21
+ const createHTML = (jsPath, cssPath) => `
22
+ <!DOCTYPE html>
23
+ <html lang="en">
24
+ <head>
25
+ <meta charset="UTF-8">
26
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
27
+ <title>Windmill App Dev Preview</title>
28
+ <link rel="stylesheet" href="${cssPath}">
29
+ <style>
30
+ * {
31
+ margin: 0;
32
+ padding: 0;
33
+ box-sizing: border-box;
34
+ }
35
+ body {
36
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
37
+ 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
38
+ -webkit-font-smoothing: antialiased;
39
+ -moz-osx-font-smoothing: grayscale;
40
+ }
41
+ #root {
42
+ width: 100%;
43
+ height: 100vh;
44
+ }
45
+ </style>
46
+ </head>
47
+ <body>
48
+ <div id="root"></div>
49
+ <script src="${jsPath}"></script>
50
+ <script>
51
+ // Live reload via EventSource
52
+ const evtSource = new EventSource('/__events');
53
+ evtSource.addEventListener('change', () => {
54
+ console.log('🔄 Files changed, reloading...');
55
+ location.reload();
56
+ });
57
+ evtSource.addEventListener('error', () => {
58
+ console.log('⚠️ Lost connection to dev server, retrying...');
59
+ });
60
+ </script>
61
+ </body>
62
+ </html>
63
+ `;
64
+ async function dev(opts) {
65
+ GLOBAL_CONFIG_OPT.noCdToRoot = true;
66
+ // Resolve workspace and authenticate
67
+ const workspace = await resolveWorkspace(opts);
68
+ await requireLogin(opts);
69
+ const workspaceId = workspace.workspaceId;
70
+ // Load app path from raw_app.yaml
71
+ const rawAppPath = path.join(process.cwd(), "raw_app.yaml");
72
+ const rawApp = fs.existsSync(rawAppPath)
73
+ ? (await yamlParseFile(rawAppPath))
74
+ : {};
75
+ const appPath = rawApp?.custom_path ?? "u/unknown/newapp";
76
+ // Dynamically import esbuild only when the dev command is called
77
+ const esbuild = await import("esbuild");
78
+ const port = opts.port ??
79
+ (await getPort.default({
80
+ port: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((p) => p + DEFAULT_PORT),
81
+ }));
82
+ const host = opts.host ?? DEFAULT_HOST;
83
+ const shouldOpen = opts.open ?? true;
84
+ // Detect frameworks to determine default entry point
85
+ const frameworks = detectFrameworks(process.cwd());
86
+ const defaultEntry = (frameworks.svelte || frameworks.vue) ? "index.ts" : "index.tsx";
87
+ const entryPoint = opts.entry ?? defaultEntry;
88
+ // Verify entry point exists
89
+ if (!fs.existsSync(entryPoint)) {
90
+ log.error(colors.red(`Entry point "${entryPoint}" not found. Please specify a valid entry point with --entry.`));
91
+ dntShim.Deno.exit(1);
92
+ }
93
+ // Ensure node_modules exists
94
+ const appDir = path.dirname(entryPoint) || process.cwd();
95
+ await ensureNodeModules(appDir);
96
+ // In-memory cache of inferred schemas (runnableId -> schema)
97
+ // Used to generate wmill.d.ts without modifying raw_app.yaml
98
+ const inferredSchemas = {};
99
+ genRunnablesTs(inferredSchemas);
100
+ // Ensure dist directory exists
101
+ const distDir = path.join(process.cwd(), "dist");
102
+ if (!fs.existsSync(distDir)) {
103
+ fs.mkdirSync(distDir);
104
+ }
105
+ // SSE clients for live reload
106
+ const clients = [];
107
+ function notifyClients() {
108
+ clients.forEach((client) => {
109
+ client.write(`event: change\ndata: reload\n\n`);
110
+ });
111
+ }
112
+ const buildOptions = getDevBuildOptions(entryPoint);
113
+ // Load framework-specific plugins (svelte, vue) based on package.json
114
+ const frameworkPlugins = await createFrameworkPlugins(appDir);
115
+ const wmillPlugin = {
116
+ name: "wmill-virtual",
117
+ setup(build) {
118
+ // Intercept imports of /wmill.ts, /wmill, ./wmill.ts, or ./wmill
119
+ build.onResolve({ filter: /^(\.\/|\/)?wmill(\.ts)?$/ }, (args) => {
120
+ log.info(colors.yellow(`[wmill-virtual] Intercepted: ${args.path}`));
121
+ return {
122
+ path: args.path,
123
+ namespace: "wmill-virtual",
124
+ };
125
+ });
126
+ // Provide the virtual module content
127
+ build.onLoad({ filter: /.*/, namespace: "wmill-virtual" }, (args) => {
128
+ log.info(colors.yellow(`[wmill-virtual] Loading virtual module: ${args.path}`));
129
+ return {
130
+ contents: wmillTs(port),
131
+ loader: "ts",
132
+ };
133
+ });
134
+ },
135
+ };
136
+ // Create esbuild context
137
+ const ctx = await esbuild.context({
138
+ ...buildOptions,
139
+ plugins: [
140
+ ...frameworkPlugins,
141
+ {
142
+ name: "notify-on-rebuild",
143
+ setup(build) {
144
+ build.onEnd((result) => {
145
+ if (result.errors.length === 0) {
146
+ log.info(colors.green("✅ Build succeeded, notifying clients..."));
147
+ notifyClients();
148
+ }
149
+ else {
150
+ log.error(colors.red("❌ Build failed:"));
151
+ result.errors.forEach((error) => {
152
+ log.error(colors.red(error.text));
153
+ });
154
+ }
155
+ });
156
+ },
157
+ },
158
+ wmillPlugin,
159
+ ],
160
+ });
161
+ // Start watching
162
+ await ctx.watch();
163
+ log.info(colors.blue("👀 Watching for file changes...\n"));
164
+ // Initial build
165
+ await ctx.rebuild();
166
+ // Watch runnables folder for changes
167
+ const runnablesPath = path.join(process.cwd(), "runnables");
168
+ let runnablesWatcher;
169
+ if (fs.existsSync(runnablesPath)) {
170
+ log.info(colors.blue(`👁️ Watching runnables folder at: ${runnablesPath}\n`));
171
+ runnablesWatcher = dntShim.Deno.watchFs(runnablesPath);
172
+ // Per-file debounce timeouts for schema inference (longer debounce for typing)
173
+ const schemaInferenceTimeouts = {};
174
+ const SCHEMA_DEBOUNCE_MS = 500; // Wait 500ms after last change before inferring schema
175
+ // Handle runnables file changes in the background
176
+ (async () => {
177
+ try {
178
+ for await (const event of runnablesWatcher) {
179
+ // Process each changed path with individual debouncing
180
+ for (const changedPath of event.paths) {
181
+ const relativePath = path.relative(process.cwd(), changedPath);
182
+ const relativeToRunnables = path.relative(runnablesPath, changedPath);
183
+ // Skip non-modify events for schema inference
184
+ if (event.kind !== "modify" && event.kind !== "create") {
185
+ continue;
186
+ }
187
+ // Skip lock files
188
+ if (changedPath.endsWith(".lock")) {
189
+ continue;
190
+ }
191
+ // Log the change event
192
+ log.info(colors.cyan(`📝 Runnable changed [${event.kind}]: ${relativePath}`));
193
+ // Debounce schema inference per file (wait for typing to finish)
194
+ if (schemaInferenceTimeouts[changedPath]) {
195
+ clearTimeout(schemaInferenceTimeouts[changedPath]);
196
+ }
197
+ schemaInferenceTimeouts[changedPath] = setTimeout(async () => {
198
+ delete schemaInferenceTimeouts[changedPath];
199
+ try {
200
+ log.info(colors.cyan(`📝 Inferring schema for: ${relativeToRunnables}`));
201
+ // Infer schema for this runnable (returns schema in memory, doesn't write to file)
202
+ const result = await inferRunnableSchemaFromFile(process.cwd(), relativeToRunnables);
203
+ if (result) {
204
+ // log.info(colors.green(` Schema: ${JSON.stringify(result.schema, null, 2)}`));
205
+ // log.info(colors.green(` Runnable ID: ${result.runnableId}`));
206
+ // Store inferred schema in memory
207
+ inferredSchemas[result.runnableId] = result.schema;
208
+ log.info(colors.green(` Inferred Schemas: ${JSON.stringify(inferredSchemas, null, 2)}`));
209
+ // Regenerate wmill.d.ts with updated schema from memory
210
+ await genRunnablesTs(inferredSchemas);
211
+ }
212
+ }
213
+ catch (error) {
214
+ log.error(colors.red(`Error inferring schema: ${error.message}`));
215
+ }
216
+ }, SCHEMA_DEBOUNCE_MS);
217
+ }
218
+ }
219
+ }
220
+ catch (error) {
221
+ if (error.name !== "Interrupted") {
222
+ log.error(colors.red(`Error watching runnables: ${error.message}`));
223
+ }
224
+ }
225
+ })();
226
+ }
227
+ else {
228
+ log.info(colors.gray("ℹ️ No runnables folder found (will not watch for runnable changes)\n"));
229
+ }
230
+ // Create HTTP server
231
+ const server = http.createServer((req, res) => {
232
+ const url = req.url || "/";
233
+ // SSE endpoint for live reload
234
+ if (url === "/__events") {
235
+ res.writeHead(200, {
236
+ "Content-Type": "text/event-stream",
237
+ "Cache-Control": "no-cache",
238
+ Connection: "keep-alive",
239
+ });
240
+ res.write("data: connected\n\n");
241
+ clients.push(res);
242
+ req.on("close", () => {
243
+ const index = clients.indexOf(res);
244
+ if (index !== -1)
245
+ clients.splice(index, 1);
246
+ });
247
+ return;
248
+ }
249
+ // Serve the bundled JS
250
+ if (url === "/dist/bundle.js" || url === "/bundle.js") {
251
+ const jsPath = path.join(process.cwd(), "dist/bundle.js");
252
+ if (fs.existsSync(jsPath)) {
253
+ res.writeHead(200, { "Content-Type": "application/javascript" });
254
+ res.end(fs.readFileSync(jsPath));
255
+ }
256
+ else {
257
+ res.writeHead(404);
258
+ res.end("Bundle not found");
259
+ }
260
+ return;
261
+ }
262
+ // Serve the bundled CSS
263
+ if (url === "/dist/bundle.css" || url === "/bundle.css") {
264
+ const cssPath = path.join(process.cwd(), "dist/bundle.css");
265
+ if (fs.existsSync(cssPath)) {
266
+ res.writeHead(200, { "Content-Type": "text/css" });
267
+ res.end(fs.readFileSync(cssPath));
268
+ }
269
+ else {
270
+ res.writeHead(404);
271
+ res.end("CSS not found");
272
+ }
273
+ return;
274
+ }
275
+ // Serve source maps
276
+ if (url === "/dist/bundle.js.map" || url === "/bundle.js.map") {
277
+ const mapPath = path.join(process.cwd(), "dist/bundle.js.map");
278
+ if (fs.existsSync(mapPath)) {
279
+ res.writeHead(200, { "Content-Type": "application/json" });
280
+ res.end(fs.readFileSync(mapPath));
281
+ }
282
+ else {
283
+ res.writeHead(404);
284
+ res.end("Source map not found");
285
+ }
286
+ return;
287
+ }
288
+ if (url === "/dist/bundle.css.map" || url === "/bundle.css.map") {
289
+ const mapPath = path.join(process.cwd(), "dist/bundle.css.map");
290
+ if (fs.existsSync(mapPath)) {
291
+ res.writeHead(200, { "Content-Type": "application/json" });
292
+ res.end(fs.readFileSync(mapPath));
293
+ }
294
+ else {
295
+ res.writeHead(404);
296
+ res.end("Source map not found");
297
+ }
298
+ return;
299
+ }
300
+ // Serve injected HTML for root and any other path
301
+ res.writeHead(200, { "Content-Type": "text/html" });
302
+ res.end(createHTML("/dist/bundle.js", "/dist/bundle.css"));
303
+ });
304
+ // Create WebSocket server on the same HTTP server
305
+ const wss = new WebSocketServer({ server });
306
+ wss.on("connection", (ws) => {
307
+ log.info(colors.cyan("[WebSocket] Client connected"));
308
+ ws.on("message", async (data) => {
309
+ try {
310
+ const message = JSON.parse(data.toString());
311
+ log.info(colors.cyan(`[WebSocket] Received: ${JSON.stringify(message)}`));
312
+ const { type, reqId, runnable_id, v, jobId } = message;
313
+ // Helper to send response
314
+ const respond = (responseType, result, error) => {
315
+ ws.send(JSON.stringify({ type: responseType, reqId, result, error }));
316
+ };
317
+ // Helper to execute and wait for result
318
+ const runAndWaitForResult = async (runnableId, args) => {
319
+ const runnables = await loadRunnables();
320
+ const runnable = runnables[runnableId];
321
+ if (!runnable) {
322
+ throw new Error(`Runnable not found: ${runnableId}`);
323
+ }
324
+ const uuid = await executeRunnable(runnable, workspaceId, appPath, runnableId, args);
325
+ log.info(colors.gray(`[backend] Job started: ${uuid}`));
326
+ const result = await waitForJob(workspaceId, uuid);
327
+ return { uuid, result };
328
+ };
329
+ switch (type) {
330
+ case "backend": {
331
+ // Run a runnable synchronously and wait for result
332
+ log.info(colors.blue(`[backend] Running runnable: ${runnable_id}`));
333
+ try {
334
+ const { result } = await runAndWaitForResult(runnable_id, v);
335
+ respond("backendRes", result, false);
336
+ }
337
+ catch (error) {
338
+ log.error(colors.red(`[backend] Error: ${error.message}`));
339
+ respond("backendRes", { message: error.message, stack: error.stack }, true);
340
+ }
341
+ break;
342
+ }
343
+ case "backendAsync": {
344
+ // Run a runnable asynchronously and return job ID immediately
345
+ log.info(colors.blue(`[backendAsync] Running runnable async: ${runnable_id}`));
346
+ try {
347
+ const runnables = await loadRunnables();
348
+ const runnable = runnables[runnable_id];
349
+ if (!runnable) {
350
+ throw new Error(`Runnable not found: ${runnable_id}`);
351
+ }
352
+ const uuid = await executeRunnable(runnable, workspaceId, appPath, runnable_id, v);
353
+ log.info(colors.gray(`[backendAsync] Job started: ${uuid}`));
354
+ // Return job ID immediately
355
+ respond("backendAsyncRes", uuid, false);
356
+ // Wait for result in the background and send it when done
357
+ waitForJob(workspaceId, uuid)
358
+ .then((result) => {
359
+ respond("backendRes", result, false);
360
+ })
361
+ .catch((error) => {
362
+ respond("backendRes", { message: error.message, stack: error.stack }, true);
363
+ });
364
+ }
365
+ catch (error) {
366
+ log.error(colors.red(`[backendAsync] Error: ${error.message}`));
367
+ respond("backendAsyncRes", { message: error.message, stack: error.stack }, true);
368
+ }
369
+ break;
370
+ }
371
+ case "waitJob": {
372
+ // Wait for a job to complete and return its result
373
+ log.info(colors.blue(`[waitJob] Waiting for job: ${jobId}`));
374
+ try {
375
+ const result = await waitForJob(workspaceId, jobId);
376
+ respond("backendRes", result, false);
377
+ }
378
+ catch (error) {
379
+ log.error(colors.red(`[waitJob] Error: ${error.message}`));
380
+ respond("backendRes", { message: error.message, stack: error.stack }, true);
381
+ }
382
+ break;
383
+ }
384
+ case "getJob": {
385
+ // Get the current status/result of a job
386
+ log.info(colors.blue(`[getJob] Getting job status: ${jobId}`));
387
+ try {
388
+ const result = await getJobStatus(workspaceId, jobId);
389
+ respond("backendRes", result, false);
390
+ }
391
+ catch (error) {
392
+ log.error(colors.red(`[getJob] Error: ${error.message}`));
393
+ respond("backendRes", { message: error.message, stack: error.stack }, true);
394
+ }
395
+ break;
396
+ }
397
+ default:
398
+ log.warn(colors.yellow(`[WebSocket] Unknown message type: ${type}`));
399
+ respond("error", { message: `Unknown message type: ${type}` }, true);
400
+ }
401
+ }
402
+ catch (error) {
403
+ log.error(colors.red(`[WebSocket] Failed to parse message: ${error.message}`));
404
+ }
405
+ });
406
+ ws.on("close", () => {
407
+ log.info(colors.cyan("[WebSocket] Client disconnected"));
408
+ });
409
+ ws.on("error", (error) => {
410
+ log.error(colors.red(`[WebSocket] Error: ${error.message}`));
411
+ });
412
+ });
413
+ server.listen(port, host, () => {
414
+ const url = `http://${host}:${port}`;
415
+ log.info(colors.bold.green(`🚀 Dev server running at ${url}`));
416
+ log.info(colors.cyan(`🔌 WebSocket server running at ws://${host}:${port}`));
417
+ log.info(colors.gray(`📦 Serving files from: ${process.cwd()}`));
418
+ log.info(colors.gray(`🔄 Live reload enabled\n`));
419
+ // Open browser if requested
420
+ if (shouldOpen) {
421
+ try {
422
+ open
423
+ .openApp(open.apps.browser, { arguments: [url] })
424
+ .catch((error) => {
425
+ log.error(colors.yellow(`Failed to open browser automatically: ${error.message}`));
426
+ });
427
+ log.info(colors.gray("Opened browser for you"));
428
+ }
429
+ catch (error) {
430
+ log.error(colors.yellow(`Failed to open browser: ${error.message}`));
431
+ }
432
+ }
433
+ });
434
+ // Graceful shutdown
435
+ process.on("SIGINT", async () => {
436
+ log.info(colors.yellow("\n\n🛑 Shutting down..."));
437
+ clients.forEach((client) => client.end());
438
+ server.close();
439
+ // Close runnables watcher if it exists
440
+ if (runnablesWatcher) {
441
+ runnablesWatcher.close();
442
+ }
443
+ await ctx.dispose();
444
+ process.exit(0);
445
+ });
446
+ }
447
+ const command = new Command()
448
+ .description("Start a development server for building apps with live reload and hot module replacement")
449
+ .option("--port <port:number>", "Port to run the dev server on (will find next available port if occupied)")
450
+ .option("--host <host:string>", "Host to bind the dev server to", {
451
+ default: DEFAULT_HOST,
452
+ })
453
+ .option("--entry <entry:string>", "Entry point file (default: index.ts for Svelte/Vue, index.tsx otherwise)")
454
+ .option("--no-open", "Don't automatically open the browser")
455
+ .action(dev);
456
+ export default command;
457
+ /**
458
+ * Generates wmill.d.ts with type definitions for runnables.
459
+ * Merges in-memory inferred schemas with runnables from raw_app.yaml.
460
+ *
461
+ * @param schemaOverrides - In-memory schema overrides (runnableId -> schema)
462
+ */
463
+ async function genRunnablesTs(schemaOverrides = {}) {
464
+ log.info(colors.blue("🔄 Generating wmill.d.ts..."));
465
+ const rawApp = (await yamlParseFile(path.join(process.cwd(), "raw_app.yaml")));
466
+ const runnables = rawApp?.["runnables"];
467
+ // Apply schema overrides from in-memory cache
468
+ if (runnables && Object.keys(schemaOverrides).length > 0) {
469
+ for (const [runnableId, schema] of Object.entries(schemaOverrides)) {
470
+ if (runnables[runnableId]?.inlineScript) {
471
+ runnables[runnableId].inlineScript.schema = schema;
472
+ runnables[runnableId].type = "inline";
473
+ }
474
+ }
475
+ }
476
+ try {
477
+ const newWmillTs = windmillUtils.genWmillTs(runnables);
478
+ writeFileSync(path.join(process.cwd(), "wmill.d.ts"), newWmillTs);
479
+ }
480
+ catch (error) {
481
+ log.error(colors.red(`Failed to generate wmill.d.ts: ${error.message}`));
482
+ }
483
+ }
484
+ async function loadRunnables() {
485
+ try {
486
+ const localPath = process.cwd();
487
+ const rawApp = (await yamlParseFile(path.join(localPath, "raw_app.yaml")));
488
+ replaceInlineScripts(rawApp.runnables, path.join(localPath, "runnables/"));
489
+ return rawApp?.runnables ?? {};
490
+ }
491
+ catch (error) {
492
+ log.error(colors.red(`Failed to load runnables: ${error.message}`));
493
+ return {};
494
+ }
495
+ }
496
+ async function executeRunnable(runnable, workspace, appPath, runnableId, args) {
497
+ const requestBody = {
498
+ component: runnableId,
499
+ args,
500
+ force_viewer_static_fields: {},
501
+ force_viewer_one_of_fields: {},
502
+ force_viewer_allow_user_resources: [],
503
+ };
504
+ // Handle static fields
505
+ if (runnable.fields) {
506
+ for (const [key, field] of Object.entries(runnable.fields)) {
507
+ if (field?.type === "static") {
508
+ requestBody.force_viewer_static_fields[key] = field.value;
509
+ }
510
+ if (field?.type === "user" && field?.allowUserResources) {
511
+ requestBody.force_viewer_allow_user_resources.push(key);
512
+ }
513
+ }
514
+ }
515
+ if ((runnable.type === "inline" || runnable.type === "runnableByName") && runnable.inlineScript) {
516
+ const inlineScript = runnable.inlineScript;
517
+ if (inlineScript.id !== undefined) {
518
+ requestBody.id = inlineScript.id;
519
+ }
520
+ requestBody.raw_code = {
521
+ content: inlineScript.id === undefined ? inlineScript.content : "",
522
+ language: inlineScript.language ?? "",
523
+ path: `${appPath}/${runnableId}`,
524
+ lock: inlineScript.id === undefined ? inlineScript.lock : undefined,
525
+ cache_ttl: inlineScript.cache_ttl,
526
+ };
527
+ }
528
+ else if ((runnable.type === "path" || runnable.type === "runnableByPath") && runnable.path) {
529
+ const runType = runnable.runType ?? "script";
530
+ requestBody.path =
531
+ runType !== "hubscript"
532
+ ? `${runType}/${runnable.path}`
533
+ : `script/${runnable.path}`;
534
+ }
535
+ const uuid = await wmill.executeComponent({
536
+ workspace,
537
+ path: appPath,
538
+ requestBody,
539
+ });
540
+ return uuid;
541
+ }
542
+ const ITERATIONS_BEFORE_SLOW_REFRESH = 10;
543
+ const ITERATIONS_BEFORE_SUPER_SLOW_REFRESH = 100;
544
+ async function waitForJob(workspace, jobId) {
545
+ if (!jobId) {
546
+ throw new Error("Job ID is required");
547
+ }
548
+ let syncIteration = 0;
549
+ return new Promise((resolve, reject) => {
550
+ async function checkJob() {
551
+ try {
552
+ const maybeJob = await wmill.getCompletedJobResultMaybe({
553
+ workspace,
554
+ id: jobId,
555
+ getStarted: false,
556
+ });
557
+ if (maybeJob.completed) {
558
+ if (!maybeJob.success &&
559
+ typeof maybeJob.result === "object" &&
560
+ maybeJob.result !== null &&
561
+ "error" in maybeJob.result) {
562
+ reject(maybeJob.result.error);
563
+ }
564
+ else {
565
+ resolve(maybeJob.result);
566
+ }
567
+ return;
568
+ }
569
+ }
570
+ catch (err) {
571
+ log.error(colors.red(`Error checking job ${jobId}: ${err.message}`));
572
+ }
573
+ syncIteration++;
574
+ let nextIteration = 50;
575
+ if (syncIteration > ITERATIONS_BEFORE_SUPER_SLOW_REFRESH) {
576
+ nextIteration = 2000;
577
+ }
578
+ else if (syncIteration > ITERATIONS_BEFORE_SLOW_REFRESH) {
579
+ nextIteration = 500;
580
+ }
581
+ setTimeout(checkJob, nextIteration);
582
+ }
583
+ checkJob();
584
+ });
585
+ }
586
+ async function getJobStatus(workspace, jobId) {
587
+ return await wmill.getJob({
588
+ workspace,
589
+ id: jobId,
590
+ });
591
+ }
@@ -0,0 +1 @@
1
+ export {};