windmill-cli 1.586.0 → 1.586.1

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 +5 -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,212 @@
1
+ // deno-lint-ignore-file no-explicit-any
2
+ import * as dntShim from "../../../_dnt.shims.js";
3
+ import { requireLogin } from "../../core/auth.js";
4
+ import { resolveWorkspace, validatePath } from "../../core/context.js";
5
+ import { colors, log, SEP, windmillUtils, yamlParseFile, } from "../../../deps.js";
6
+ import * as wmill from "../../../gen/services.gen.js";
7
+ import { isSuperset } from "../../types.js";
8
+ import { replaceInlineScripts, repopulateFields } from "./apps.js";
9
+ import { createBundle, detectFrameworks } from "./bundle.js";
10
+ import { mergeConfigWithConfigFile } from "../../core/conf.js";
11
+ const alreadySynced = [];
12
+ async function collectAppFiles(localPath) {
13
+ const files = {};
14
+ async function readDirRecursive(dir, basePath = "/") {
15
+ for await (const entry of dntShim.Deno.readDir(dir)) {
16
+ const fullPath = dir + entry.name;
17
+ const relativePath = basePath + entry.name;
18
+ if (entry.isDirectory) {
19
+ // Skip the runnables and node_modules subfolders
20
+ if (entry.name === "runnables" || entry.name === "node_modules" || entry.name === "dist" || entry.name === ".claude") {
21
+ continue;
22
+ }
23
+ await readDirRecursive(fullPath + SEP, relativePath + SEP);
24
+ }
25
+ else if (entry.isFile) {
26
+ // Skip raw_app.yaml as it's metadata, not an app file
27
+ // Skip node_modules and package-lock.json as they are generated
28
+ if (relativePath === "raw_app.yaml" ||
29
+ relativePath === "package-lock.json") {
30
+ continue;
31
+ }
32
+ const content = await dntShim.Deno.readTextFile(fullPath);
33
+ files[relativePath] = content;
34
+ }
35
+ }
36
+ }
37
+ await readDirRecursive(localPath);
38
+ return files;
39
+ }
40
+ export async function pushRawApp(workspace, remotePath, localPath, message) {
41
+ if (alreadySynced.includes(localPath)) {
42
+ return;
43
+ }
44
+ alreadySynced.push(localPath);
45
+ remotePath = remotePath.replaceAll(SEP, "/");
46
+ let app = undefined;
47
+ // deleting old app if it exists in raw mode
48
+ try {
49
+ app = await wmill.getAppByPath({
50
+ workspace,
51
+ path: remotePath,
52
+ });
53
+ }
54
+ catch {
55
+ //ignore
56
+ }
57
+ if (app?.["policy"]?.["execution_mode"] == "anonymous") {
58
+ app.public = true;
59
+ }
60
+ // console.log(app);
61
+ if (app) {
62
+ app.policy = undefined;
63
+ }
64
+ if (!localPath.endsWith(SEP)) {
65
+ localPath += SEP;
66
+ }
67
+ const path = localPath + "raw_app.yaml";
68
+ const localApp = (await yamlParseFile(path));
69
+ replaceInlineScripts(localApp.runnables, localPath + SEP + "runnables/");
70
+ repopulateFields(localApp.runnables);
71
+ await generatingPolicy(localApp, remotePath, localApp?.["public"] ?? false);
72
+ const files = await collectAppFiles(localPath);
73
+ async function createBundleRaw() {
74
+ log.info(colors.yellow.bold(`Creating raw app ${remotePath} bundle...`));
75
+ // Detect frameworks to determine entry point
76
+ const frameworks = detectFrameworks(localPath);
77
+ const entryFile = (frameworks.svelte || frameworks.vue) ? "index.ts" : "index.tsx";
78
+ const entryPoint = localPath + entryFile;
79
+ return await createBundle({
80
+ entryPoint: entryPoint,
81
+ production: true,
82
+ minify: true,
83
+ });
84
+ }
85
+ if (app) {
86
+ if (isSuperset(localApp, app)) {
87
+ log.info(colors.green(`App ${remotePath} is up to date`));
88
+ return;
89
+ }
90
+ const { js, css } = await createBundleRaw();
91
+ log.info(colors.bold.yellow(`Updating app ${remotePath}...`));
92
+ await wmill.updateAppRaw({
93
+ workspace,
94
+ path: remotePath,
95
+ formData: {
96
+ app: {
97
+ value: { runnables: localApp.runnables, files },
98
+ path: remotePath,
99
+ summary: localApp.summary,
100
+ policy: localApp.policy,
101
+ deployment_message: message,
102
+ custom_path: localApp.custom_path,
103
+ },
104
+ js,
105
+ css,
106
+ },
107
+ });
108
+ }
109
+ else {
110
+ const { js, css } = await createBundleRaw();
111
+ await wmill.createAppRaw({
112
+ workspace,
113
+ formData: {
114
+ app: {
115
+ value: { runnables: localApp.runnables, files },
116
+ path: remotePath,
117
+ summary: localApp.summary,
118
+ policy: localApp.policy,
119
+ deployment_message: message,
120
+ custom_path: localApp.custom_path,
121
+ },
122
+ js,
123
+ css,
124
+ },
125
+ });
126
+ // await wmill.createApp({
127
+ // workspace,
128
+ // requestBody: {
129
+ // path: remotePath,
130
+ // deployment_message: message,
131
+ // value: { runnables: localApp.runnables, files },
132
+ // summary: localApp.summary,
133
+ // policy: localApp.policy,
134
+ // },
135
+ // });
136
+ }
137
+ }
138
+ export async function generatingPolicy(app, path, publicApp) {
139
+ log.info(colors.gray(`Generating fresh policy for app ${path}...`));
140
+ try {
141
+ app.policy = await windmillUtils.updateRawAppPolicy(app.runnables, app.policy);
142
+ app.policy.execution_mode = publicApp ? "anonymous" : "publisher";
143
+ }
144
+ catch (e) {
145
+ log.error(colors.red(`Error generating policy for app ${path}: ${e}`));
146
+ throw e;
147
+ }
148
+ }
149
+ export async function generateLocksCommand(opts, appPath) {
150
+ const { generateAppLocksInternal } = await import("./app_metadata.js");
151
+ const { elementsToMap, FSFSElement } = await import("../sync/sync.js");
152
+ const { ignoreF } = await import("../sync/sync.js");
153
+ const { Confirm } = await import("../../../deps.js");
154
+ if (appPath == "") {
155
+ appPath = undefined;
156
+ }
157
+ const workspace = await resolveWorkspace(opts);
158
+ await requireLogin(opts);
159
+ opts = await mergeConfigWithConfigFile(opts);
160
+ if (appPath) {
161
+ // Generate metadata for a specific app
162
+ await generateAppLocksInternal(appPath, false, workspace, opts, false, false);
163
+ }
164
+ else {
165
+ // Generate metadata for all apps
166
+ const ignore = await ignoreF(opts);
167
+ const elems = await elementsToMap(await FSFSElement(dntShim.Deno.cwd(), [], true), (p, isD) => {
168
+ return ignore(p, isD) || (!isD && !p.endsWith(SEP + "raw_app.yaml"));
169
+ }, false, {});
170
+ const appFolders = Object.keys(elems)
171
+ .filter((p) => p.endsWith(SEP + "raw_app.yaml"))
172
+ .map((p) => p.substring(0, p.length - (SEP + "raw_app.yaml").length));
173
+ let hasAny = false;
174
+ log.info("Checking metadata for all apps:");
175
+ for (const appFolder of appFolders) {
176
+ const candidate = await generateAppLocksInternal(appFolder, true, workspace, opts, false, true);
177
+ if (candidate) {
178
+ hasAny = true;
179
+ log.info(colors.green(`+ ${candidate}`));
180
+ }
181
+ }
182
+ if (hasAny) {
183
+ if (opts.dryRun) {
184
+ log.info(colors.gray(`Dry run complete.`));
185
+ return;
186
+ }
187
+ if (!opts.yes &&
188
+ !(await Confirm.prompt({
189
+ message: "Update the metadata of the above apps?",
190
+ default: true,
191
+ }))) {
192
+ return;
193
+ }
194
+ }
195
+ else {
196
+ log.info(colors.green.bold("No metadata to update"));
197
+ return;
198
+ }
199
+ for (const appFolder of appFolders) {
200
+ await generateAppLocksInternal(appFolder, false, workspace, opts, false, true);
201
+ }
202
+ }
203
+ }
204
+ async function pushRawAppCommand(opts, filePath, remotePath) {
205
+ if (!validatePath(remotePath)) {
206
+ return;
207
+ }
208
+ const workspace = await resolveWorkspace(opts);
209
+ await requireLogin(opts);
210
+ await pushRawApp(workspace.workspaceId, remotePath, filePath);
211
+ log.info(colors.bold.underline.green("Raw app pushed"));
212
+ }
@@ -0,0 +1,89 @@
1
+ //comment this line and last to dev
2
+ export function wmillTsDev(port) {
3
+ return `
4
+ let reqs: Record<string, any> = {}
5
+ let ws: WebSocket | null = null
6
+ let wsReady: Promise<void>
7
+ let wsReadyResolve: () => void
8
+
9
+ function initWebSocket() {
10
+ wsReady = new Promise((resolve) => {
11
+ wsReadyResolve = resolve
12
+ })
13
+
14
+ ws = new WebSocket('ws://localhost:${port}')
15
+
16
+ ws.onopen = () => {
17
+ console.log('[wmill] WebSocket connected')
18
+ wsReadyResolve()
19
+ }
20
+
21
+ ws.onmessage = (event) => {
22
+ const data = JSON.parse(event.data)
23
+ if (data.type === 'backendRes' || data.type === 'backendAsyncRes') {
24
+ console.log('Message from WebSocket backend', data)
25
+ const job = reqs[data.reqId]
26
+ if (job) {
27
+ const result = data.result
28
+ if (data.error) {
29
+ job.reject(new Error(result.stack ?? result.message))
30
+ } else {
31
+ job.resolve(result)
32
+ }
33
+ delete reqs[data.reqId]
34
+ } else {
35
+ console.error('No job found for', data.reqId)
36
+ }
37
+ }
38
+ }
39
+
40
+ ws.onerror = (error) => {
41
+ console.error('[wmill] WebSocket error:', error)
42
+ }
43
+
44
+ ws.onclose = () => {
45
+ console.log('[wmill] WebSocket closed, reconnecting...')
46
+ setTimeout(initWebSocket, 1000)
47
+ }
48
+ }
49
+
50
+ initWebSocket()
51
+
52
+ async function doRequest(type: string, o: object) {
53
+ await wsReady
54
+ return new Promise((resolve, reject) => {
55
+ const reqId = Math.random().toString(36)
56
+ reqs[reqId] = { resolve, reject }
57
+ ws?.send(JSON.stringify({ ...o, type, reqId }))
58
+ })
59
+ }
60
+
61
+ export const backend = new Proxy(
62
+ {},
63
+ {
64
+ get(_, runnable_id: string) {
65
+ return (v: any) => {
66
+ return doRequest('backend', { runnable_id, v })
67
+ }
68
+ }
69
+ })
70
+
71
+ export const backendAsync = new Proxy(
72
+ {},
73
+ {
74
+ get(_, runnable_id: string) {
75
+ return (v: any) => {
76
+ return doRequest('backendAsync', { runnable_id, v })
77
+ }
78
+ }
79
+ })
80
+
81
+ export function waitJob(jobId: string) {
82
+ return doRequest('waitJob', { jobId })
83
+ }
84
+
85
+ export function getJob(jobId: string) {
86
+ return doRequest('getJob', { jobId })
87
+ }
88
+ `;
89
+ }
@@ -0,0 +1,66 @@
1
+ // deno-lint-ignore-file no-explicit-any
2
+ import { requireLogin } from "../../core/auth.js";
3
+ import { resolveWorkspace } from "../../core/context.js";
4
+ import { colors, Command, log } from "../../../deps.js";
5
+ import * as wmill from "../../../gen/services.gen.js";
6
+ import fs from "node:fs";
7
+ import { generateHash } from "../../utils/utils.js";
8
+ import { checkifMetadataUptodate, updateMetadataGlobalLock, workspaceDependenciesPathToLanguageAndFilename } from "../../utils/metadata.js";
9
+ async function push(opts, filePath, language, name) {
10
+ const workspace = await resolveWorkspace(opts);
11
+ await requireLogin(opts);
12
+ if (!fs.existsSync(filePath)) {
13
+ throw new Error(`File not found: ${filePath}`);
14
+ }
15
+ const content = fs.readFileSync(filePath, "utf8");
16
+ // Use the existing pushWorkspaceDependencies function
17
+ await pushWorkspaceDependencies(workspace.workspaceId, filePath, null, content);
18
+ }
19
+ const command = new Command()
20
+ .alias("deps")
21
+ .description("workspace dependencies related commands")
22
+ .command("push", "Push workspace dependencies from a local file")
23
+ .arguments("<file_path:string>")
24
+ .option("--language <language:string>", "Programming language (python3, typescript, go, php). If not specified, will be inferred from file extension.")
25
+ .option("--name <name:string>", "Name for the dependencies. If not specified, creates workspace default dependencies.")
26
+ .action(push);
27
+ export async function pushWorkspaceDependencies(workspace, path, _befObj, newDependenciesContent) {
28
+ try {
29
+ let res = workspaceDependenciesPathToLanguageAndFilename(path);
30
+ if (!res) {
31
+ throw new Error(`Unknown workspace dependencies file format: ${path}`);
32
+ }
33
+ let { language, name } = res;
34
+ // TODO: include workspace?
35
+ // Generate hash for workspace dependencies content and metadata
36
+ const contentHash = await generateHash(newDependenciesContent + path);
37
+ // Check if dependencies are up-to-date using wmill-lock.yaml tracking
38
+ const isUpToDate = await checkifMetadataUptodate(path, contentHash, undefined);
39
+ if (isUpToDate) {
40
+ const displayName = name ? `named dependencies "${name}"` : `workspace default dependencies`;
41
+ log.info(colors.green(`${displayName} for ${language} are up-to-date, skipping push`));
42
+ return;
43
+ }
44
+ log.info(colors.yellow(`Pushing ${name ? 'named' : 'workspace default'} dependencies for ${language}...`));
45
+ await wmill.createWorkspaceDependencies({
46
+ workspace,
47
+ requestBody: {
48
+ name,
49
+ content: newDependenciesContent,
50
+ language,
51
+ workspace_id: workspace,
52
+ // Description is not supported in cli, it will use old description
53
+ description: undefined
54
+ }
55
+ });
56
+ // Update wmill-lock.yaml with new hash after successful push
57
+ await updateMetadataGlobalLock(path, contentHash);
58
+ const displayName = name ? `named dependencies "${name}"` : `workspace default dependencies`;
59
+ log.info(colors.green(`Successfully pushed ${displayName} for ${language}`));
60
+ }
61
+ catch (error) {
62
+ log.error(colors.red(`Failed to push workspace dependencies: ${error.message}`));
63
+ throw error;
64
+ }
65
+ }
66
+ export default command;
@@ -103,7 +103,7 @@ async function dev(opts) {
103
103
  ws.on("message", (message) => {
104
104
  let data;
105
105
  try {
106
- data = JSON.parse(message);
106
+ data = JSON.parse(message.toString());
107
107
  }
108
108
  catch (e) {
109
109
  console.log("Received invalid JSON: " + message + " " + e);
@@ -8,10 +8,10 @@ import { requireLogin } from "../../core/auth.js";
8
8
  import { resolveWorkspace, validatePath } from "../../core/context.js";
9
9
  import { resolve, track_job } from "../script/script.js";
10
10
  import { defaultFlowDefinition } from "../../../bootstrap/flow_bootstrap.js";
11
- import { generateFlowLockInternal } from "../../utils/metadata.js";
12
11
  import { mergeConfigWithConfigFile } from "../../core/conf.js";
13
12
  import { FSFSElement, elementsToMap, ignoreF } from "../sync/sync.js";
14
13
  import { replaceInlineScripts } from "../../../windmill-utils-internal/src/inline-scripts/replacer.js";
14
+ import { generateFlowLockInternal } from "./flow_metadata.js";
15
15
  const alreadySynced = [];
16
16
  export async function pushFlow(workspace, remotePath, localPath, message) {
17
17
  if (alreadySynced.includes(localPath)) {
@@ -150,13 +150,12 @@ async function run(opts, path) {
150
150
  log.info(JSON.stringify(jobInfo.result ?? {}, null, 2));
151
151
  }
152
152
  async function generateLocks(opts, folder) {
153
- const useRawReqs = opts.useRawRequirements || dntShim.Deno.env.get("USE_RAW_REQUIREMENTS") === "true";
154
153
  const workspace = await resolveWorkspace(opts);
155
154
  await requireLogin(opts);
156
155
  opts = await mergeConfigWithConfigFile(opts);
157
156
  if (folder) {
158
157
  // read script metadata file
159
- await generateFlowLockInternal(folder, false, workspace, opts, undefined, undefined, useRawReqs);
158
+ await generateFlowLockInternal(folder, false, workspace, opts);
160
159
  }
161
160
  else {
162
161
  const ignore = await ignoreF(opts);
@@ -168,7 +167,7 @@ async function generateLocks(opts, folder) {
168
167
  }, false, {})).map((x) => x.substring(0, x.lastIndexOf(SEP)));
169
168
  let hasAny = false;
170
169
  for (const folder of elems) {
171
- const candidate = await generateFlowLockInternal(folder, true, workspace, opts, undefined, undefined, useRawReqs);
170
+ const candidate = await generateFlowLockInternal(folder, true, workspace, opts);
172
171
  if (candidate) {
173
172
  hasAny = true;
174
173
  log.info(colors.yellow.bold(`~ ${candidate}`));
@@ -188,7 +187,7 @@ async function generateLocks(opts, folder) {
188
187
  return;
189
188
  }
190
189
  for (const folder of elems) {
191
- await generateFlowLockInternal(folder, false, workspace, opts, undefined, undefined, useRawReqs);
190
+ await generateFlowLockInternal(folder, false, workspace, opts);
192
191
  }
193
192
  }
194
193
  }
@@ -0,0 +1,140 @@
1
+ import * as dntShim from "../../../_dnt.shims.js";
2
+ import { SEP, colors, log, path, yamlParseFile, yamlStringify, } from "../../../deps.js";
3
+ import { readLockfile, checkifMetadataUptodate, blueColor, clearGlobalLock, updateMetadataGlobalLock, LockfileGenerationError, getRawWorkspaceDependencies, } from "../../utils/metadata.js";
4
+ import { extractInlineScripts as extractInlineScriptsForFlows } from "../../../windmill-utils-internal/src/inline-scripts/extractor.js";
5
+ import { generateHash, getHeaders, writeIfChanged } from "../../utils/utils.js";
6
+ import { exts, } from "../script/script.js";
7
+ import { FSFSElement } from "../sync/sync.js";
8
+ import { replaceInlineScripts } from "../../../windmill-utils-internal/src/inline-scripts/replacer.js";
9
+ import { workspaceDependenciesLanguages } from "../../utils/script_common.js";
10
+ const TOP_HASH = "__flow_hash";
11
+ async function generateFlowHash(rawWorkspaceDependencies, folder, defaultTs) {
12
+ const elems = await FSFSElement(path.join(dntShim.Deno.cwd(), folder), [], true);
13
+ const hashes = {};
14
+ for await (const f of elems.getChildren()) {
15
+ if (exts.some((e) => f.path.endsWith(e))) {
16
+ // Embed workspace dependencies into hash
17
+ hashes[f.path] = await generateHash((await f.getContentText()) + JSON.stringify(rawWorkspaceDependencies));
18
+ }
19
+ }
20
+ return { ...hashes, [TOP_HASH]: await generateHash(JSON.stringify(hashes)) };
21
+ }
22
+ export async function generateFlowLockInternal(folder, dryRun, workspace, opts, justUpdateMetadataLock, noStaleMessage) {
23
+ if (folder.endsWith(SEP)) {
24
+ folder = folder.substring(0, folder.length - 1);
25
+ }
26
+ const remote_path = folder
27
+ .replaceAll(SEP, "/")
28
+ .substring(0, folder.length - ".flow".length);
29
+ if (!justUpdateMetadataLock && !noStaleMessage) {
30
+ log.info(`Generating lock for flow ${folder} at ${remote_path}`);
31
+ }
32
+ // Always get out-of-sync workspace dependencies
33
+ const rawWorkspaceDependencies = await getRawWorkspaceDependencies();
34
+ let hashes = await generateFlowHash(rawWorkspaceDependencies, folder, opts.defaultTs);
35
+ const conf = await readLockfile();
36
+ if (await checkifMetadataUptodate(folder, hashes[TOP_HASH], conf, TOP_HASH)) {
37
+ if (!noStaleMessage) {
38
+ log.info(colors.green(`Flow ${remote_path} metadata is up-to-date, skipping`));
39
+ }
40
+ return;
41
+ }
42
+ else if (dryRun) {
43
+ return remote_path;
44
+ }
45
+ if (Object.keys(rawWorkspaceDependencies).length > 0) {
46
+ log.info((await blueColor())(`Found workspace dependencies (${workspaceDependenciesLanguages
47
+ .map((l) => l.filename)
48
+ .join("/")}) for ${folder}, using them`));
49
+ }
50
+ const flowValue = (await yamlParseFile(folder + SEP + "flow.yaml"));
51
+ if (!justUpdateMetadataLock) {
52
+ const changedScripts = [];
53
+ //find hashes that do not correspond to previous hashes
54
+ for (const [path, hash] of Object.entries(hashes)) {
55
+ if (path == TOP_HASH) {
56
+ continue;
57
+ }
58
+ if (!(await checkifMetadataUptodate(folder, hash, conf, path))) {
59
+ changedScripts.push(path);
60
+ }
61
+ }
62
+ log.info(`Recomputing locks of ${changedScripts.join(", ")} in ${folder}`);
63
+ await replaceInlineScripts(flowValue.value.modules, async (path) => await dntShim.Deno.readTextFile(folder + SEP + path), log, folder + SEP, SEP, changedScripts);
64
+ //removeChangedLocks
65
+ flowValue.value = await updateFlow(workspace, flowValue.value, remote_path, rawWorkspaceDependencies);
66
+ const inlineScripts = extractInlineScriptsForFlows(flowValue.value.modules, {}, SEP, opts.defaultTs);
67
+ inlineScripts.forEach((s) => {
68
+ writeIfChanged(dntShim.Deno.cwd() + SEP + folder + SEP + s.path, s.content);
69
+ });
70
+ // Overwrite `flow.yaml` with the new lockfile references
71
+ writeIfChanged(dntShim.Deno.cwd() + SEP + folder + SEP + "flow.yaml", yamlStringify(flowValue));
72
+ }
73
+ hashes = await generateFlowHash(rawWorkspaceDependencies, folder, opts.defaultTs);
74
+ await clearGlobalLock(folder);
75
+ for (const [path, hash] of Object.entries(hashes)) {
76
+ await updateMetadataGlobalLock(folder, hash, path);
77
+ }
78
+ log.info(colors.green(`Flow ${remote_path} lockfiles updated`));
79
+ }
80
+ export async function updateFlow(workspace, flow_value, remotePath, rawWorkspaceDependencies) {
81
+ let rawResponse;
82
+ if (Object.keys(rawWorkspaceDependencies).length > 0) {
83
+ log.info(colors.blue("Using raw workspace dependencies for flow dependencies"));
84
+ // generate the script lock running a dependency job in Windmill and update it inplace
85
+ const extraHeaders = getHeaders();
86
+ rawResponse = await fetch(`${workspace.remote}api/w/${workspace.workspaceId}/jobs/run/flow_dependencies`, {
87
+ method: "POST",
88
+ headers: {
89
+ Cookie: `token=${workspace.token}`,
90
+ "Content-Type": "application/json",
91
+ ...extraHeaders,
92
+ },
93
+ body: JSON.stringify({
94
+ flow_value,
95
+ path: remotePath,
96
+ use_local_lockfiles: true,
97
+ raw_workspace_dependencies: Object.keys(rawWorkspaceDependencies).length > 0
98
+ ? rawWorkspaceDependencies
99
+ : null,
100
+ }),
101
+ });
102
+ }
103
+ else {
104
+ // Standard dependency resolution on the server
105
+ const extraHeaders = getHeaders();
106
+ rawResponse = await fetch(`${workspace.remote}api/w/${workspace.workspaceId}/jobs/run/flow_dependencies`, {
107
+ method: "POST",
108
+ headers: {
109
+ Cookie: `token=${workspace.token}`,
110
+ "Content-Type": "application/json",
111
+ ...extraHeaders,
112
+ },
113
+ body: JSON.stringify({
114
+ flow_value,
115
+ path: remotePath,
116
+ }),
117
+ });
118
+ }
119
+ let responseText = "reading response failed";
120
+ try {
121
+ const res = (await rawResponse.json());
122
+ if (rawResponse.status != 200) {
123
+ const msg = res?.["error"]?.["message"];
124
+ if (msg) {
125
+ throw new LockfileGenerationError(`Failed to generate lockfile: ${msg}`);
126
+ }
127
+ throw new LockfileGenerationError(`Failed to generate lockfile: ${rawResponse.statusText}, ${responseText}`);
128
+ }
129
+ return res.updated_flow_value;
130
+ }
131
+ catch (e) {
132
+ try {
133
+ responseText = await rawResponse.text();
134
+ }
135
+ catch {
136
+ responseText = "";
137
+ }
138
+ throw new Error(`Failed to generate lockfile. Status was: ${rawResponse.statusText}, ${responseText}, ${e}`);
139
+ }
140
+ }