windmill-cli 1.518.1 → 1.518.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/deps/jsr.io/@std/fs/1.0.16/_create_walk_entry.js +34 -0
- package/esm/deps/jsr.io/@std/fs/1.0.16/_is_same_path.js +17 -0
- package/esm/deps/jsr.io/@std/fs/1.0.16/_is_subdir.js +25 -0
- package/esm/deps/jsr.io/@std/fs/1.0.16/_to_path_string.js +13 -0
- package/esm/deps/jsr.io/@std/fs/1.0.16/copy.js +314 -0
- package/esm/deps/jsr.io/@std/fs/1.0.16/empty_dir.js +87 -0
- package/esm/deps/jsr.io/@std/fs/1.0.16/ensure_file.js +90 -0
- package/esm/deps/jsr.io/@std/fs/1.0.16/ensure_link.js +61 -0
- package/esm/deps/jsr.io/@std/fs/1.0.16/ensure_symlink.js +157 -0
- package/esm/deps/jsr.io/@std/fs/1.0.16/expand_glob.js +416 -0
- package/esm/deps/jsr.io/@std/fs/1.0.16/walk.js +846 -0
- package/esm/deps/jsr.io/@std/io/0.225.2/read_all.js +1 -1
- package/esm/deps/jsr.io/@std/log/0.224.14/console_handler.js +1 -1
- package/esm/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.js +1 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/assert_path.js +7 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/basename.js +40 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/common.js +23 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/constants.js +46 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/dirname.js +8 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/format.js +19 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/from_file_url.js +9 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/glob_to_reg_exp.js +234 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize.js +8 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.js +77 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/relative.js +9 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.js +19 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.js +15 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_os.js +9 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/basename.js +36 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/common.js +33 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/constants.js +17 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/dirname.js +29 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/extname.js +29 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/format.js +27 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/from_file_url.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/glob_to_regexp.js +83 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/is_absolute.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/is_glob.js +42 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/join.js +29 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/join_globs.js +34 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/mod.js +57 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/normalize.js +33 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/normalize_glob.js +35 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/parse.js +39 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/_util.js +8 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/basename.js +49 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/constants.js +14 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/dirname.js +62 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/extname.js +89 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/format.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/from_file_url.js +21 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/glob_to_regexp.js +82 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.js +23 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/join.js +42 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/join_globs.js +40 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize.js +57 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize_glob.js +32 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/parse.js +115 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/relative.js +106 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/resolve.js +59 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.js +27 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/to_namespaced_path.js +20 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/relative.js +30 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/resolve.js +30 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/to_file_url.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/to_namespaced_path.js +29 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/types.js +3 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/_util.js +15 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/basename.js +44 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/constants.js +14 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/dirname.js +112 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/extname.js +81 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/format.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/from_file_url.js +30 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/glob_to_regexp.js +82 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.js +38 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/join.js +74 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/join_globs.js +41 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize.js +134 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize_glob.js +32 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/parse.js +176 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/relative.js +131 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/resolve.js +154 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.js +34 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/to_namespaced_path.js +49 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_chars.js +48 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_dumper_state.js +707 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_loader_state.js +1409 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_schema.js +112 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_type/bool.js +32 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_type/float.js +96 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_type/int.js +159 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_type/map.js +14 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_type/merge.js +10 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_type/nil.js +22 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_type/omap.js +29 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_type/pairs.js +19 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_type/regexp.js +30 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_type/seq.js +10 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_type/set.js +14 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_type/str.js +9 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_type/timestamp.js +81 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_type/undefined.js +20 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_type.js +6 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/_utils.js +13 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/mod.js +52 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/parse.js +93 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.5/stringify.js +33 -0
- package/esm/deps.js +5 -5
- package/esm/gen/core/OpenAPI.js +1 -1
- package/esm/gen/services.gen.js +66 -0
- package/esm/src/commands/app/apps.js +124 -0
- package/esm/src/commands/dev/dev.js +145 -0
- package/esm/src/commands/flow/flow.js +236 -0
- package/esm/src/commands/folder/folder.js +101 -0
- package/esm/src/commands/gitsync-settings/converter.js +134 -0
- package/esm/src/commands/gitsync-settings/gitsync-settings.js +2 -0
- package/esm/src/commands/gitsync-settings/index.js +28 -0
- package/esm/src/commands/gitsync-settings/legacySettings.js +119 -0
- package/esm/src/commands/gitsync-settings/pull.js +372 -0
- package/esm/src/commands/gitsync-settings/push.js +263 -0
- package/esm/src/commands/gitsync-settings/types.js +37 -0
- package/esm/src/commands/gitsync-settings/utils.js +129 -0
- package/esm/src/commands/hub/hub.js +65 -0
- package/esm/src/commands/init/init.js +214 -0
- package/esm/src/commands/instance/instance.js +569 -0
- package/esm/src/commands/queues/queues.js +117 -0
- package/esm/src/commands/resource/resource.js +93 -0
- package/esm/src/commands/resource-type/resource-type.js +85 -0
- package/esm/src/commands/schedule/schedule.js +101 -0
- package/esm/src/commands/script/script.js +753 -0
- package/esm/src/commands/sync/pull.js +37 -0
- package/esm/src/commands/sync/sync.js +1563 -0
- package/esm/src/commands/trigger/trigger.js +182 -0
- package/esm/src/commands/user/user.js +428 -0
- package/esm/src/commands/variable/variable.js +121 -0
- package/esm/src/commands/worker-groups/worker_groups.js +96 -0
- package/esm/src/commands/workers/workers.js +79 -0
- package/esm/src/commands/workspace/workspace.js +348 -0
- package/esm/src/core/auth.js +40 -0
- package/esm/src/core/branch-profiles.js +46 -0
- package/esm/src/core/conf.js +162 -0
- package/esm/src/core/context.js +263 -0
- package/esm/src/core/login.js +100 -0
- package/esm/src/core/settings.js +432 -0
- package/esm/src/core/store.js +19 -0
- package/esm/src/main.js +174 -0
- package/esm/src/types.js +223 -0
- package/esm/src/utils/codebase.js +24 -0
- package/esm/src/utils/git.js +29 -0
- package/esm/src/utils/metadata.js +623 -0
- package/esm/src/utils/upgrade.js +48 -0
- package/esm/src/utils/utils.js +176 -0
- package/esm/windmill-utils-internal/src/config/config.js +190 -0
- package/esm/windmill-utils-internal/src/inline-scripts/extractor.js +13 -9
- package/esm/windmill-utils-internal/src/path-utils/path-assigner.js +25 -9
- package/package.json +6 -6
- package/types/deps/jsr.io/@std/bytes/1.0.5/_types.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/bytes/1.0.5/concat.d.ts +21 -0
- package/types/deps/jsr.io/@std/bytes/1.0.5/concat.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fmt/1.0.6/colors.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.16/_create_walk_entry.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.16/_get_file_info_type.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.16/_is_same_path.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.16/_is_subdir.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.16/_to_path_string.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.16/copy.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.16/empty_dir.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.16/ensure_dir.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.16/ensure_file.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.16/ensure_link.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.16/ensure_symlink.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.16/eol.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.16/exists.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.16/expand_glob.d.ts +267 -0
- package/types/deps/jsr.io/@std/fs/1.0.16/expand_glob.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.16/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.16/move.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.16/walk.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/assert_path.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/basename.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/common.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/constants.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/dirname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/format.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/from_file_url.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/glob_to_reg_exp.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/normalize.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/relative.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_os.d.ts +2 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_os.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/basename.d.ts +28 -0
- package/types/deps/jsr.io/@std/path/1.0.8/basename.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/common.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/constants.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/dirname.d.ts +23 -0
- package/types/deps/jsr.io/@std/path/1.0.8/dirname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/extname.d.ts +23 -0
- package/types/deps/jsr.io/@std/path/1.0.8/extname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/format.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/from_file_url.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/glob_to_regexp.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/is_absolute.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/is_glob.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/join.d.ts +23 -0
- package/types/deps/jsr.io/@std/path/1.0.8/join.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/join_globs.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/mod.d.ts +54 -0
- package/types/deps/jsr.io/@std/path/1.0.8/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/normalize.d.ts +27 -0
- package/types/deps/jsr.io/@std/path/1.0.8/normalize.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/normalize_glob.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/parse.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/_util.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/basename.d.ts +40 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/basename.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/constants.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/dirname.d.ts +32 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/dirname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/extname.d.ts +37 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/extname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/format.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/from_file_url.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/glob_to_regexp.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/join.d.ts +33 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/join.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/join_globs.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/normalize.d.ts +40 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/normalize.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/normalize_glob.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/parse.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/relative.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/resolve.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/to_namespaced_path.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/relative.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/resolve.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/to_file_url.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/to_namespaced_path.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/types.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/_util.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/basename.d.ts +23 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/basename.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/constants.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/dirname.d.ts +20 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/dirname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/extname.d.ts +20 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/extname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/format.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/from_file_url.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/glob_to_regexp.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts +20 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/join_globs.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/normalize.d.ts +22 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/normalize.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/normalize_glob.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/parse.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/relative.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/resolve.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/to_namespaced_path.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_chars.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_dumper_state.d.ts +99 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_dumper_state.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_loader_state.d.ts +60 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_loader_state.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_schema.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_type/binary.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_type/bool.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_type/float.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_type/int.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_type/map.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_type/merge.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_type/nil.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_type/omap.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_type/pairs.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_type/regexp.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_type/seq.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_type/set.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_type/str.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_type/timestamp.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_type/undefined.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_type.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/_utils.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/parse.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/1.0.5/stringify.d.ts.map +1 -0
- package/types/deps.d.ts +5 -5
- package/types/gen/services.gen.d.ts +34 -1
- package/types/gen/services.gen.d.ts.map +1 -1
- package/types/gen/types.gen.d.ts +43 -3
- package/types/gen/types.gen.d.ts.map +1 -1
- package/types/src/commands/app/apps.d.ts +17 -0
- package/types/src/commands/app/apps.d.ts.map +1 -0
- package/types/src/commands/dev/dev.d.ts +12 -0
- package/types/src/commands/dev/dev.d.ts.map +1 -0
- package/types/src/commands/flow/flow.d.ts +28 -0
- package/types/src/commands/flow/flow.d.ts.map +1 -0
- package/types/src/commands/folder/folder.d.ts +19 -0
- package/types/src/commands/folder/folder.d.ts.map +1 -0
- package/types/src/commands/gitsync-settings/converter.d.ts +10 -0
- package/types/src/commands/gitsync-settings/converter.d.ts.map +1 -0
- package/types/src/commands/gitsync-settings/gitsync-settings.d.ts +3 -0
- package/types/src/commands/gitsync-settings/gitsync-settings.d.ts.map +1 -0
- package/types/src/commands/gitsync-settings/index.d.ts +25 -0
- package/types/src/commands/gitsync-settings/index.d.ts.map +1 -0
- package/types/src/commands/gitsync-settings/legacySettings.d.ts +4 -0
- package/types/src/commands/gitsync-settings/legacySettings.d.ts.map +1 -0
- package/types/src/commands/gitsync-settings/pull.d.ts +14 -0
- package/types/src/commands/gitsync-settings/pull.d.ts.map +1 -0
- package/types/src/commands/gitsync-settings/push.d.ts +10 -0
- package/types/src/commands/gitsync-settings/push.d.ts.map +1 -0
- package/types/src/commands/gitsync-settings/types.d.ts +35 -0
- package/types/src/commands/gitsync-settings/types.d.ts.map +1 -0
- package/types/src/commands/gitsync-settings/utils.d.ts +36 -0
- package/types/src/commands/gitsync-settings/utils.d.ts.map +1 -0
- package/types/src/commands/hub/hub.d.ts +12 -0
- package/types/src/commands/hub/hub.d.ts.map +1 -0
- package/types/src/commands/init/init.d.ts +34 -0
- package/types/src/commands/init/init.d.ts.map +1 -0
- package/types/src/commands/instance/instance.d.ts +46 -0
- package/types/src/commands/instance/instance.d.ts.map +1 -0
- package/types/src/commands/queues/queues.d.ts +14 -0
- package/types/src/commands/queues/queues.d.ts.map +1 -0
- package/types/src/commands/resource/resource.d.ts +18 -0
- package/types/src/commands/resource/resource.d.ts.map +1 -0
- package/types/src/commands/resource-type/resource-type.d.ts +16 -0
- package/types/src/commands/resource-type/resource-type.d.ts.map +1 -0
- package/types/src/commands/schedule/schedule.d.ts +21 -0
- package/types/src/commands/schedule/schedule.d.ts.map +1 -0
- package/types/src/commands/script/script.d.ts +51 -0
- package/types/src/commands/script/script.d.ts.map +1 -0
- package/types/src/commands/sync/pull.d.ts +12 -0
- package/types/src/commands/sync/pull.d.ts.map +1 -0
- package/types/src/commands/sync/sync.d.ts +128 -0
- package/types/src/commands/sync/sync.d.ts.map +1 -0
- package/types/src/commands/trigger/trigger.d.ts +24 -0
- package/types/src/commands/trigger/trigger.d.ts.map +1 -0
- package/types/src/commands/user/user.d.ts +34 -0
- package/types/src/commands/user/user.d.ts.map +1 -0
- package/types/src/commands/variable/variable.d.ts +23 -0
- package/types/src/commands/variable/variable.d.ts.map +1 -0
- package/types/src/commands/worker-groups/worker_groups.d.ts +23 -0
- package/types/src/commands/worker-groups/worker_groups.d.ts.map +1 -0
- package/types/src/commands/workers/workers.d.ts +14 -0
- package/types/src/commands/workers/workers.d.ts.map +1 -0
- package/types/src/commands/workspace/workspace.d.ts +30 -0
- package/types/src/commands/workspace/workspace.d.ts.map +1 -0
- package/types/src/core/auth.d.ts +8 -0
- package/types/src/core/auth.d.ts.map +1 -0
- package/types/src/core/branch-profiles.d.ts +12 -0
- package/types/src/core/branch-profiles.d.ts.map +1 -0
- package/types/src/core/conf.d.ts +64 -0
- package/types/src/core/conf.d.ts.map +1 -0
- package/types/src/core/context.d.ts +13 -0
- package/types/src/core/context.d.ts.map +1 -0
- package/types/src/core/login.d.ts +5 -0
- package/types/src/core/login.d.ts.map +1 -0
- package/types/src/core/settings.d.ts +30 -0
- package/types/src/core/settings.d.ts.map +1 -0
- package/types/src/core/store.d.ts +2 -0
- package/types/src/core/store.d.ts.map +1 -0
- package/types/src/guidance/flow_guidance.d.ts.map +1 -0
- package/types/src/guidance/script_guidance.d.ts.map +1 -0
- package/types/src/main.d.ts +74 -0
- package/types/src/main.d.ts.map +1 -0
- package/types/src/types.d.ts.map +1 -0
- package/types/src/utils/codebase.d.ts +6 -0
- package/types/src/utils/codebase.d.ts.map +1 -0
- package/types/src/utils/git.d.ts +3 -0
- package/types/src/utils/git.d.ts.map +1 -0
- package/types/src/utils/local_encryption.d.ts.map +1 -0
- package/types/src/utils/metadata.d.ts +52 -0
- package/types/src/utils/metadata.d.ts.map +1 -0
- package/types/src/utils/script_common.d.ts.map +1 -0
- package/types/src/utils/upgrade.d.ts +21 -0
- package/types/src/utils/upgrade.d.ts.map +1 -0
- package/types/src/utils/utils.d.ts +20 -0
- package/types/src/utils/utils.d.ts.map +1 -0
- package/types/windmill-utils-internal/src/config/config.d.ts +12 -0
- package/types/windmill-utils-internal/src/config/config.d.ts.map +1 -0
- package/types/windmill-utils-internal/src/gen/types.gen.d.ts +43 -3
- package/types/windmill-utils-internal/src/gen/types.gen.d.ts.map +1 -1
- package/types/windmill-utils-internal/src/inline-scripts/extractor.d.ts +1 -4
- package/types/windmill-utils-internal/src/inline-scripts/extractor.d.ts.map +1 -1
- package/types/windmill-utils-internal/src/path-utils/path-assigner.d.ts +6 -6
- package/types/windmill-utils-internal/src/path-utils/path-assigner.d.ts.map +1 -1
- package/esm/apps.js +0 -124
- package/esm/auth.js +0 -40
- package/esm/codebase.js +0 -24
- package/esm/conf.js +0 -78
- package/esm/context.js +0 -121
- package/esm/deps/jsr.io/@std/fs/1.0.19/_create_walk_entry.js +0 -34
- package/esm/deps/jsr.io/@std/fs/1.0.19/_is_same_path.js +0 -17
- package/esm/deps/jsr.io/@std/fs/1.0.19/_is_subdir.js +0 -25
- package/esm/deps/jsr.io/@std/fs/1.0.19/_to_path_string.js +0 -13
- package/esm/deps/jsr.io/@std/fs/1.0.19/copy.js +0 -313
- package/esm/deps/jsr.io/@std/fs/1.0.19/empty_dir.js +0 -87
- package/esm/deps/jsr.io/@std/fs/1.0.19/ensure_file.js +0 -90
- package/esm/deps/jsr.io/@std/fs/1.0.19/ensure_link.js +0 -61
- package/esm/deps/jsr.io/@std/fs/1.0.19/ensure_symlink.js +0 -156
- package/esm/deps/jsr.io/@std/fs/1.0.19/expand_glob.js +0 -415
- package/esm/deps/jsr.io/@std/fs/1.0.19/walk.js +0 -846
- package/esm/deps/jsr.io/@std/internal/1.0.10/_os.js +0 -12
- package/esm/deps/jsr.io/@std/internal/1.0.10/os.js +0 -5
- package/esm/deps/jsr.io/@std/path/1.1.1/_common/assert_path.js +0 -7
- package/esm/deps/jsr.io/@std/path/1.1.1/_common/basename.js +0 -40
- package/esm/deps/jsr.io/@std/path/1.1.1/_common/common.js +0 -23
- package/esm/deps/jsr.io/@std/path/1.1.1/_common/constants.js +0 -46
- package/esm/deps/jsr.io/@std/path/1.1.1/_common/dirname.js +0 -8
- package/esm/deps/jsr.io/@std/path/1.1.1/_common/format.js +0 -19
- package/esm/deps/jsr.io/@std/path/1.1.1/_common/from_file_url.js +0 -9
- package/esm/deps/jsr.io/@std/path/1.1.1/_common/glob_to_reg_exp.js +0 -234
- package/esm/deps/jsr.io/@std/path/1.1.1/_common/normalize.js +0 -8
- package/esm/deps/jsr.io/@std/path/1.1.1/_common/normalize_string.js +0 -77
- package/esm/deps/jsr.io/@std/path/1.1.1/_common/relative.js +0 -9
- package/esm/deps/jsr.io/@std/path/1.1.1/_common/strip_trailing_separators.js +0 -19
- package/esm/deps/jsr.io/@std/path/1.1.1/_common/to_file_url.js +0 -15
- package/esm/deps/jsr.io/@std/path/1.1.1/basename.js +0 -35
- package/esm/deps/jsr.io/@std/path/1.1.1/common.js +0 -33
- package/esm/deps/jsr.io/@std/path/1.1.1/constants.js +0 -17
- package/esm/deps/jsr.io/@std/path/1.1.1/dirname.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.1.1/extname.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.1.1/format.js +0 -27
- package/esm/deps/jsr.io/@std/path/1.1.1/from_file_url.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.1.1/glob_to_regexp.js +0 -83
- package/esm/deps/jsr.io/@std/path/1.1.1/is_absolute.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.1.1/is_glob.js +0 -42
- package/esm/deps/jsr.io/@std/path/1.1.1/join.js +0 -29
- package/esm/deps/jsr.io/@std/path/1.1.1/join_globs.js +0 -34
- package/esm/deps/jsr.io/@std/path/1.1.1/mod.js +0 -216
- package/esm/deps/jsr.io/@std/path/1.1.1/normalize.js +0 -32
- package/esm/deps/jsr.io/@std/path/1.1.1/normalize_glob.js +0 -35
- package/esm/deps/jsr.io/@std/path/1.1.1/parse.js +0 -39
- package/esm/deps/jsr.io/@std/path/1.1.1/posix/_util.js +0 -8
- package/esm/deps/jsr.io/@std/path/1.1.1/posix/basename.js +0 -52
- package/esm/deps/jsr.io/@std/path/1.1.1/posix/constants.js +0 -14
- package/esm/deps/jsr.io/@std/path/1.1.1/posix/dirname.js +0 -64
- package/esm/deps/jsr.io/@std/path/1.1.1/posix/extname.js +0 -93
- package/esm/deps/jsr.io/@std/path/1.1.1/posix/format.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.1.1/posix/from_file_url.js +0 -21
- package/esm/deps/jsr.io/@std/path/1.1.1/posix/glob_to_regexp.js +0 -82
- package/esm/deps/jsr.io/@std/path/1.1.1/posix/is_absolute.js +0 -23
- package/esm/deps/jsr.io/@std/path/1.1.1/posix/join.js +0 -45
- package/esm/deps/jsr.io/@std/path/1.1.1/posix/join_globs.js +0 -40
- package/esm/deps/jsr.io/@std/path/1.1.1/posix/normalize.js +0 -58
- package/esm/deps/jsr.io/@std/path/1.1.1/posix/normalize_glob.js +0 -32
- package/esm/deps/jsr.io/@std/path/1.1.1/posix/parse.js +0 -115
- package/esm/deps/jsr.io/@std/path/1.1.1/posix/relative.js +0 -106
- package/esm/deps/jsr.io/@std/path/1.1.1/posix/resolve.js +0 -59
- package/esm/deps/jsr.io/@std/path/1.1.1/posix/to_file_url.js +0 -27
- package/esm/deps/jsr.io/@std/path/1.1.1/posix/to_namespaced_path.js +0 -20
- package/esm/deps/jsr.io/@std/path/1.1.1/relative.js +0 -30
- package/esm/deps/jsr.io/@std/path/1.1.1/resolve.js +0 -30
- package/esm/deps/jsr.io/@std/path/1.1.1/to_file_url.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.1.1/to_namespaced_path.js +0 -29
- package/esm/deps/jsr.io/@std/path/1.1.1/types.js +0 -3
- package/esm/deps/jsr.io/@std/path/1.1.1/windows/_util.js +0 -15
- package/esm/deps/jsr.io/@std/path/1.1.1/windows/basename.js +0 -47
- package/esm/deps/jsr.io/@std/path/1.1.1/windows/constants.js +0 -14
- package/esm/deps/jsr.io/@std/path/1.1.1/windows/dirname.js +0 -113
- package/esm/deps/jsr.io/@std/path/1.1.1/windows/extname.js +0 -82
- package/esm/deps/jsr.io/@std/path/1.1.1/windows/format.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.1.1/windows/from_file_url.js +0 -30
- package/esm/deps/jsr.io/@std/path/1.1.1/windows/glob_to_regexp.js +0 -82
- package/esm/deps/jsr.io/@std/path/1.1.1/windows/is_absolute.js +0 -38
- package/esm/deps/jsr.io/@std/path/1.1.1/windows/join.js +0 -77
- package/esm/deps/jsr.io/@std/path/1.1.1/windows/join_globs.js +0 -41
- package/esm/deps/jsr.io/@std/path/1.1.1/windows/normalize.js +0 -135
- package/esm/deps/jsr.io/@std/path/1.1.1/windows/normalize_glob.js +0 -32
- package/esm/deps/jsr.io/@std/path/1.1.1/windows/parse.js +0 -176
- package/esm/deps/jsr.io/@std/path/1.1.1/windows/relative.js +0 -131
- package/esm/deps/jsr.io/@std/path/1.1.1/windows/resolve.js +0 -154
- package/esm/deps/jsr.io/@std/path/1.1.1/windows/to_file_url.js +0 -34
- package/esm/deps/jsr.io/@std/path/1.1.1/windows/to_namespaced_path.js +0 -49
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_chars.js +0 -48
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_dumper_state.js +0 -716
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_loader_state.js +0 -1427
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_schema.js +0 -107
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_type/bool.js +0 -32
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_type/float.js +0 -96
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_type/int.js +0 -159
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_type/map.js +0 -14
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_type/merge.js +0 -10
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_type/nil.js +0 -22
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_type/omap.js +0 -29
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_type/pairs.js +0 -19
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_type/regexp.js +0 -30
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_type/seq.js +0 -10
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_type/set.js +0 -14
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_type/str.js +0 -9
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_type/timestamp.js +0 -81
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_type/undefined.js +0 -20
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_type.js +0 -6
- package/esm/deps/jsr.io/@std/yaml/1.0.9/_utils.js +0 -13
- package/esm/deps/jsr.io/@std/yaml/1.0.9/mod.js +0 -52
- package/esm/deps/jsr.io/@std/yaml/1.0.9/parse.js +0 -93
- package/esm/deps/jsr.io/@std/yaml/1.0.9/stringify.js +0 -33
- package/esm/dev.js +0 -145
- package/esm/flow.js +0 -236
- package/esm/folder.js +0 -101
- package/esm/gitsync-settings.js +0 -984
- package/esm/hub.js +0 -65
- package/esm/instance.js +0 -569
- package/esm/login.js +0 -100
- package/esm/main.js +0 -337
- package/esm/metadata.js +0 -623
- package/esm/pull.js +0 -37
- package/esm/queues.js +0 -117
- package/esm/resource-type.js +0 -85
- package/esm/resource.js +0 -93
- package/esm/schedule.js +0 -101
- package/esm/script.js +0 -753
- package/esm/settings.js +0 -432
- package/esm/store.js +0 -76
- package/esm/sync.js +0 -1662
- package/esm/trigger.js +0 -182
- package/esm/types.js +0 -223
- package/esm/upgrade.js +0 -48
- package/esm/user.js +0 -428
- package/esm/utils.js +0 -168
- package/esm/variable.js +0 -121
- package/esm/worker_groups.js +0 -96
- package/esm/workers.js +0 -79
- package/esm/workspace.js +0 -314
- package/types/apps.d.ts +0 -17
- package/types/apps.d.ts.map +0 -1
- package/types/auth.d.ts +0 -8
- package/types/auth.d.ts.map +0 -1
- package/types/codebase.d.ts +0 -6
- package/types/codebase.d.ts.map +0 -1
- package/types/conf.d.ts +0 -55
- package/types/conf.d.ts.map +0 -1
- package/types/context.d.ts +0 -13
- package/types/context.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/bytes/1.0.6/_types.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/bytes/1.0.6/concat.d.ts +0 -21
- package/types/deps/jsr.io/@std/bytes/1.0.6/concat.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fmt/1.0.8/colors.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fs/1.0.19/_create_walk_entry.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fs/1.0.19/_get_file_info_type.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fs/1.0.19/_is_same_path.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fs/1.0.19/_is_subdir.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fs/1.0.19/_to_path_string.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fs/1.0.19/copy.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fs/1.0.19/empty_dir.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fs/1.0.19/ensure_dir.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fs/1.0.19/ensure_file.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fs/1.0.19/ensure_link.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fs/1.0.19/ensure_symlink.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fs/1.0.19/eol.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fs/1.0.19/exists.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fs/1.0.19/expand_glob.d.ts +0 -267
- package/types/deps/jsr.io/@std/fs/1.0.19/expand_glob.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fs/1.0.19/mod.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fs/1.0.19/move.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fs/1.0.19/walk.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/internal/1.0.10/_os.d.ts +0 -2
- package/types/deps/jsr.io/@std/internal/1.0.10/_os.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/internal/1.0.10/os.d.ts +0 -3
- package/types/deps/jsr.io/@std/internal/1.0.10/os.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/_common/assert_path.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/_common/basename.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/_common/common.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/_common/constants.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/_common/dirname.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/_common/format.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/_common/from_file_url.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/_common/glob_to_reg_exp.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/_common/normalize.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/_common/normalize_string.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/_common/relative.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/_common/strip_trailing_separators.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/_common/to_file_url.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/basename.d.ts +0 -27
- package/types/deps/jsr.io/@std/path/1.1.1/basename.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/common.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/constants.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/dirname.d.ts +0 -22
- package/types/deps/jsr.io/@std/path/1.1.1/dirname.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/extname.d.ts +0 -22
- package/types/deps/jsr.io/@std/path/1.1.1/extname.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/format.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/from_file_url.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/glob_to_regexp.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/is_absolute.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/is_glob.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/join.d.ts +0 -23
- package/types/deps/jsr.io/@std/path/1.1.1/join.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/join_globs.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/mod.d.ts +0 -213
- package/types/deps/jsr.io/@std/path/1.1.1/mod.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/normalize.d.ts +0 -26
- package/types/deps/jsr.io/@std/path/1.1.1/normalize.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/normalize_glob.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/parse.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/posix/_util.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/posix/basename.d.ts +0 -39
- package/types/deps/jsr.io/@std/path/1.1.1/posix/basename.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/posix/constants.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/posix/dirname.d.ts +0 -30
- package/types/deps/jsr.io/@std/path/1.1.1/posix/dirname.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/posix/extname.d.ts +0 -37
- package/types/deps/jsr.io/@std/path/1.1.1/posix/extname.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/posix/format.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/posix/from_file_url.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/posix/glob_to_regexp.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/posix/is_absolute.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/posix/join.d.ts +0 -31
- package/types/deps/jsr.io/@std/path/1.1.1/posix/join.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/posix/join_globs.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/posix/normalize.d.ts +0 -37
- package/types/deps/jsr.io/@std/path/1.1.1/posix/normalize.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/posix/normalize_glob.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/posix/parse.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/posix/relative.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/posix/resolve.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/posix/to_file_url.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/posix/to_namespaced_path.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/relative.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/resolve.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/to_file_url.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/to_namespaced_path.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/types.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/windows/_util.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/windows/basename.d.ts +0 -22
- package/types/deps/jsr.io/@std/path/1.1.1/windows/basename.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/windows/constants.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/windows/dirname.d.ts +0 -17
- package/types/deps/jsr.io/@std/path/1.1.1/windows/dirname.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/windows/extname.d.ts +0 -17
- package/types/deps/jsr.io/@std/path/1.1.1/windows/extname.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/windows/format.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/windows/from_file_url.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/windows/glob_to_regexp.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/windows/is_absolute.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/windows/join.d.ts +0 -18
- package/types/deps/jsr.io/@std/path/1.1.1/windows/join.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/windows/join_globs.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/windows/normalize.d.ts +0 -19
- package/types/deps/jsr.io/@std/path/1.1.1/windows/normalize.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/windows/normalize_glob.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/windows/parse.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/windows/relative.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/windows/resolve.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/windows/to_file_url.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.1/windows/to_namespaced_path.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_chars.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_dumper_state.d.ts +0 -106
- package/types/deps/jsr.io/@std/yaml/1.0.9/_dumper_state.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_loader_state.d.ts +0 -66
- package/types/deps/jsr.io/@std/yaml/1.0.9/_loader_state.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_schema.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_type/binary.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_type/bool.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_type/float.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_type/int.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_type/map.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_type/merge.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_type/nil.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_type/omap.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_type/pairs.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_type/regexp.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_type/seq.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_type/set.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_type/str.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_type/timestamp.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_type/undefined.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_type.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/_utils.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/mod.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/parse.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/1.0.9/stringify.d.ts.map +0 -1
- package/types/dev.d.ts +0 -12
- package/types/dev.d.ts.map +0 -1
- package/types/flow.d.ts +0 -28
- package/types/flow.d.ts.map +0 -1
- package/types/flow_guidance.d.ts.map +0 -1
- package/types/folder.d.ts +0 -19
- package/types/folder.d.ts.map +0 -1
- package/types/gitsync-settings.d.ts +0 -40
- package/types/gitsync-settings.d.ts.map +0 -1
- package/types/hub.d.ts +0 -12
- package/types/hub.d.ts.map +0 -1
- package/types/instance.d.ts +0 -46
- package/types/instance.d.ts.map +0 -1
- package/types/local_encryption.d.ts.map +0 -1
- package/types/login.d.ts +0 -5
- package/types/login.d.ts.map +0 -1
- package/types/main.d.ts +0 -70
- package/types/main.d.ts.map +0 -1
- package/types/metadata.d.ts +0 -52
- package/types/metadata.d.ts.map +0 -1
- package/types/pull.d.ts +0 -12
- package/types/pull.d.ts.map +0 -1
- package/types/queues.d.ts +0 -14
- package/types/queues.d.ts.map +0 -1
- package/types/resource-type.d.ts +0 -16
- package/types/resource-type.d.ts.map +0 -1
- package/types/resource.d.ts +0 -18
- package/types/resource.d.ts.map +0 -1
- package/types/schedule.d.ts +0 -21
- package/types/schedule.d.ts.map +0 -1
- package/types/script.d.ts +0 -51
- package/types/script.d.ts.map +0 -1
- package/types/script_common.d.ts.map +0 -1
- package/types/script_guidance.d.ts.map +0 -1
- package/types/settings.d.ts +0 -30
- package/types/settings.d.ts.map +0 -1
- package/types/store.d.ts +0 -3
- package/types/store.d.ts.map +0 -1
- package/types/sync.d.ts +0 -130
- package/types/sync.d.ts.map +0 -1
- package/types/trigger.d.ts +0 -24
- package/types/trigger.d.ts.map +0 -1
- package/types/types.d.ts.map +0 -1
- package/types/upgrade.d.ts +0 -21
- package/types/upgrade.d.ts.map +0 -1
- package/types/user.d.ts +0 -34
- package/types/user.d.ts.map +0 -1
- package/types/utils.d.ts +0 -19
- package/types/utils.d.ts.map +0 -1
- package/types/variable.d.ts +0 -23
- package/types/variable.d.ts.map +0 -1
- package/types/worker_groups.d.ts +0 -24
- package/types/worker_groups.d.ts.map +0 -1
- package/types/workers.d.ts +0 -14
- package/types/workers.d.ts.map +0 -1
- package/types/workspace.d.ts +0 -28
- package/types/workspace.d.ts.map +0 -1
- /package/esm/deps/jsr.io/@std/bytes/{1.0.6 → 1.0.5}/_types.js +0 -0
- /package/esm/deps/jsr.io/@std/bytes/{1.0.6 → 1.0.5}/concat.js +0 -0
- /package/esm/deps/jsr.io/@std/fmt/{1.0.8 → 1.0.6}/colors.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/_get_file_info_type.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/ensure_dir.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/eol.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/exists.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/mod.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/move.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_type/binary.js +0 -0
- /package/esm/{flow_guidance.js → src/guidance/flow_guidance.js} +0 -0
- /package/esm/{script_guidance.js → src/guidance/script_guidance.js} +0 -0
- /package/esm/{local_encryption.js → src/utils/local_encryption.js} +0 -0
- /package/esm/{script_common.js → src/utils/script_common.js} +0 -0
- /package/types/deps/jsr.io/@std/bytes/{1.0.6 → 1.0.5}/_types.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fmt/{1.0.8 → 1.0.6}/colors.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/_create_walk_entry.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/_get_file_info_type.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/_is_same_path.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/_is_subdir.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/_to_path_string.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/copy.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/empty_dir.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/ensure_dir.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/ensure_file.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/ensure_link.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/ensure_symlink.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/eol.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/exists.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/mod.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/move.d.ts +0 -0
- /package/types/deps/jsr.io/@std/fs/{1.0.19 → 1.0.16}/walk.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/_common/assert_path.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/_common/basename.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/_common/common.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/_common/constants.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/_common/dirname.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/_common/format.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/_common/from_file_url.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/_common/glob_to_reg_exp.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/_common/normalize.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/_common/normalize_string.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/_common/relative.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/_common/strip_trailing_separators.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/_common/to_file_url.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/common.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/constants.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/format.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/from_file_url.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/glob_to_regexp.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/is_absolute.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/is_glob.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/join_globs.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/normalize_glob.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/parse.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/posix/_util.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/posix/constants.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/posix/format.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/posix/from_file_url.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/posix/glob_to_regexp.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/posix/is_absolute.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/posix/join_globs.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/posix/normalize_glob.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/posix/parse.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/posix/relative.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/posix/resolve.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/posix/to_file_url.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/posix/to_namespaced_path.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/relative.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/resolve.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/to_file_url.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/to_namespaced_path.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/types.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/windows/_util.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/windows/constants.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/windows/format.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/windows/from_file_url.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/windows/glob_to_regexp.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/windows/is_absolute.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/windows/join_globs.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/windows/normalize_glob.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/windows/parse.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/windows/relative.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/windows/resolve.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/windows/to_file_url.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.1 → 1.0.8}/windows/to_namespaced_path.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_chars.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_schema.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_type/binary.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_type/bool.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_type/float.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_type/int.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_type/map.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_type/merge.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_type/nil.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_type/omap.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_type/pairs.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_type/regexp.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_type/seq.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_type/set.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_type/str.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_type/timestamp.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_type/undefined.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_type.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/_utils.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/mod.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/parse.d.ts +0 -0
- /package/types/deps/jsr.io/@std/yaml/{1.0.9 → 1.0.5}/stringify.d.ts +0 -0
- /package/types/{flow_guidance.d.ts → src/guidance/flow_guidance.d.ts} +0 -0
- /package/types/{script_guidance.d.ts → src/guidance/script_guidance.d.ts} +0 -0
- /package/types/{types.d.ts → src/types.d.ts} +0 -0
- /package/types/{local_encryption.d.ts → src/utils/local_encryption.d.ts} +0 -0
- /package/types/{script_common.d.ts → src/utils/script_common.d.ts} +0 -0
package/esm/sync.js
DELETED
|
@@ -1,1662 +0,0 @@
|
|
|
1
|
-
import * as dntShim from "./_dnt.shims.js";
|
|
2
|
-
import { requireLogin } from "./auth.js";
|
|
3
|
-
import { fetchVersion, resolveWorkspace } from "./context.js";
|
|
4
|
-
import { colors, Command, Confirm, Select, ensureDir, minimatch, path, log, yamlStringify, yamlParseContent, SEP, } from "./deps.js";
|
|
5
|
-
import * as wmill from "./gen/services.gen.js";
|
|
6
|
-
import { getTypeStrFromPath, parseFromPath, pushObj, showConflict, showDiff, } from "./types.js";
|
|
7
|
-
import { downloadZip } from "./pull.js";
|
|
8
|
-
import { exts, findContentFile, findGlobalDeps, findResourceFile, handleScriptMetadata, removeExtensionToPath, } from "./script.js";
|
|
9
|
-
import { handleFile } from "./script.js";
|
|
10
|
-
import { deepEqual, isFileResource } from "./utils.js";
|
|
11
|
-
import { readConfigFile, getEffectiveSettings } from "./conf.js";
|
|
12
|
-
import { removePathPrefix } from "./types.js";
|
|
13
|
-
import { listSyncCodebases } from "./codebase.js";
|
|
14
|
-
import { generateFlowLockInternal, generateScriptMetadataInternal, readLockfile, } from "./metadata.js";
|
|
15
|
-
import { pushResource } from "./resource.js";
|
|
16
|
-
import { extractInlineScripts as extractInlineScriptsForFlows } from "./windmill-utils-internal/src/inline-scripts/extractor.js";
|
|
17
|
-
// Merge CLI options with effective settings, preserving CLI flags as overrides
|
|
18
|
-
function mergeCliWithEffectiveOptions(cliOpts, effectiveOpts) {
|
|
19
|
-
// overlay CLI options on top (undefined cliOpts won't override effectiveOpts)
|
|
20
|
-
return Object.assign({}, effectiveOpts, cliOpts);
|
|
21
|
-
}
|
|
22
|
-
// Resolve effective sync options with smart repository detection
|
|
23
|
-
async function resolveEffectiveSyncOptions(workspace, repositoryPath) {
|
|
24
|
-
const localConfig = await readConfigFile();
|
|
25
|
-
// If repository path is already specified, use it directly
|
|
26
|
-
if (repositoryPath) {
|
|
27
|
-
return getEffectiveSettings(localConfig, workspace.remote, workspace.workspaceId, repositoryPath);
|
|
28
|
-
}
|
|
29
|
-
// Auto-detect repository from overrides if not specified
|
|
30
|
-
if (localConfig.overrides) {
|
|
31
|
-
const prefix = `${workspace.remote}:${workspace.workspaceId}:`;
|
|
32
|
-
const applicableRepos = [];
|
|
33
|
-
// Find all repository-specific overrides for this workspace
|
|
34
|
-
for (const key of Object.keys(localConfig.overrides)) {
|
|
35
|
-
if (key.startsWith(prefix) && !key.endsWith(":*")) {
|
|
36
|
-
const repo = key.substring(prefix.length);
|
|
37
|
-
if (repo) {
|
|
38
|
-
applicableRepos.push(repo);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
if (applicableRepos.length === 1) {
|
|
43
|
-
// Single repository found - auto-select it
|
|
44
|
-
log.info(`Auto-selected repository: ${applicableRepos[0]}`);
|
|
45
|
-
return getEffectiveSettings(localConfig, workspace.remote, workspace.workspaceId, applicableRepos[0]);
|
|
46
|
-
}
|
|
47
|
-
else if (applicableRepos.length > 1) {
|
|
48
|
-
// Multiple repositories found - prompt for selection
|
|
49
|
-
const isInteractive = dntShim.Deno.stdin.isTerminal() && dntShim.Deno.stdout.isTerminal();
|
|
50
|
-
if (isInteractive) {
|
|
51
|
-
const choices = [
|
|
52
|
-
{
|
|
53
|
-
name: "Use top-level settings (no repository-specific override)",
|
|
54
|
-
value: "",
|
|
55
|
-
},
|
|
56
|
-
...applicableRepos.map((repo) => ({ name: repo, value: repo })),
|
|
57
|
-
];
|
|
58
|
-
const selectedRepo = await Select.prompt({
|
|
59
|
-
message: "Multiple repository overrides found. Select which to use:",
|
|
60
|
-
options: choices,
|
|
61
|
-
});
|
|
62
|
-
if (selectedRepo) {
|
|
63
|
-
log.info(`Selected repository: ${selectedRepo}`);
|
|
64
|
-
}
|
|
65
|
-
return getEffectiveSettings(localConfig, workspace.remote, workspace.workspaceId, selectedRepo);
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
// Non-interactive mode - list options and use top-level
|
|
69
|
-
log.warn(`Multiple repository overrides found: ${applicableRepos.join(", ")}`);
|
|
70
|
-
log.warn(`Running in non-interactive mode. Use --repository flag to specify which one to use.`);
|
|
71
|
-
log.info(`Falling back to top-level settings (no repository-specific overrides applied)`);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
// No repository overrides found or selected - use top-level settings
|
|
76
|
-
log.info(`No repository overrides found, using top-level settings`);
|
|
77
|
-
return getEffectiveSettings(localConfig, workspace.remote, workspace.workspaceId, "");
|
|
78
|
-
}
|
|
79
|
-
export function findCodebase(path, codebases) {
|
|
80
|
-
if (!path.endsWith(".ts")) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
for (const c of codebases) {
|
|
84
|
-
let included = false;
|
|
85
|
-
let excluded = false;
|
|
86
|
-
if (c.includes == undefined || c.includes == null) {
|
|
87
|
-
included = true;
|
|
88
|
-
}
|
|
89
|
-
if (typeof c.includes == "string") {
|
|
90
|
-
c.includes = [c.includes];
|
|
91
|
-
}
|
|
92
|
-
for (const r of c.includes ?? []) {
|
|
93
|
-
if (included) {
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
if (minimatch(path, r)) {
|
|
97
|
-
included = true;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
if (typeof c.excludes == "string") {
|
|
101
|
-
c.excludes = [c.excludes];
|
|
102
|
-
}
|
|
103
|
-
for (const r of c.excludes ?? []) {
|
|
104
|
-
if (minimatch(path, r)) {
|
|
105
|
-
excluded = true;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
if (included && !excluded) {
|
|
109
|
-
return c;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
async function addCodebaseDigestIfRelevant(path, content, codebases, ignoreCodebaseChanges) {
|
|
114
|
-
const isScript = path.endsWith(".script.yaml");
|
|
115
|
-
if (!isScript) {
|
|
116
|
-
return content;
|
|
117
|
-
}
|
|
118
|
-
let isTs = true;
|
|
119
|
-
const replacedPath = path.replace(".script.yaml", ".ts");
|
|
120
|
-
try {
|
|
121
|
-
await dntShim.Deno.stat(replacedPath);
|
|
122
|
-
}
|
|
123
|
-
catch {
|
|
124
|
-
isTs = false;
|
|
125
|
-
}
|
|
126
|
-
if (!isTs) {
|
|
127
|
-
return content;
|
|
128
|
-
}
|
|
129
|
-
if (isTs) {
|
|
130
|
-
const c = findCodebase(replacedPath, codebases);
|
|
131
|
-
if (c) {
|
|
132
|
-
const parsed = yamlParseContent(path, content);
|
|
133
|
-
if (parsed && typeof parsed == "object") {
|
|
134
|
-
if (ignoreCodebaseChanges) {
|
|
135
|
-
parsed["codebase"] = undefined;
|
|
136
|
-
}
|
|
137
|
-
else {
|
|
138
|
-
parsed["codebase"] = await c.getDigest();
|
|
139
|
-
}
|
|
140
|
-
parsed["lock"] = "";
|
|
141
|
-
return yamlStringify(parsed, yamlOptions);
|
|
142
|
-
}
|
|
143
|
-
else {
|
|
144
|
-
throw Error(`Expected local yaml ${path} to be an object, found: ${content} instead`);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return content;
|
|
149
|
-
}
|
|
150
|
-
export async function FSFSElement(p, codebases, ignoreCodebaseChanges) {
|
|
151
|
-
function _internal_element(localP, isDir, codebases) {
|
|
152
|
-
return {
|
|
153
|
-
isDirectory: isDir,
|
|
154
|
-
path: localP.substring(p.length + 1),
|
|
155
|
-
async *getChildren() {
|
|
156
|
-
if (!isDir)
|
|
157
|
-
return [];
|
|
158
|
-
try {
|
|
159
|
-
for await (const e of dntShim.Deno.readDir(localP)) {
|
|
160
|
-
yield _internal_element(path.join(localP, e.name), e.isDirectory, codebases);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
catch (e) {
|
|
164
|
-
log.warn(`Error reading dir: ${localP}, ${e}`);
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
// async getContentBytes(): Promise<Uint8Array> {
|
|
168
|
-
// return await Deno.readFile(localP);
|
|
169
|
-
// },
|
|
170
|
-
async getContentText() {
|
|
171
|
-
const content = await dntShim.Deno.readTextFile(localP);
|
|
172
|
-
const itemPath = localP.substring(p.length + 1);
|
|
173
|
-
const r = await addCodebaseDigestIfRelevant(itemPath, content, codebases, ignoreCodebaseChanges);
|
|
174
|
-
return r;
|
|
175
|
-
},
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
return _internal_element(p, (await dntShim.Deno.stat(p)).isDirectory, codebases);
|
|
179
|
-
}
|
|
180
|
-
function prioritizeName(name) {
|
|
181
|
-
if (name == "version")
|
|
182
|
-
return "aaa";
|
|
183
|
-
if (name == "id")
|
|
184
|
-
return "aa";
|
|
185
|
-
if (name == "type")
|
|
186
|
-
return "ab";
|
|
187
|
-
if (name == "summary")
|
|
188
|
-
return "ad";
|
|
189
|
-
if (name == "name")
|
|
190
|
-
return "ae";
|
|
191
|
-
if (name == "display_name")
|
|
192
|
-
return "af";
|
|
193
|
-
if (name == "description")
|
|
194
|
-
return "ag";
|
|
195
|
-
if (name == "value")
|
|
196
|
-
return "ah";
|
|
197
|
-
if (name == "content")
|
|
198
|
-
return "ai";
|
|
199
|
-
if (name == "modules")
|
|
200
|
-
return "aj";
|
|
201
|
-
if (name == "failure_module")
|
|
202
|
-
return "ak";
|
|
203
|
-
if (name == "input_transforms")
|
|
204
|
-
return "al";
|
|
205
|
-
if (name == "lock")
|
|
206
|
-
return "az";
|
|
207
|
-
if (name == "locks")
|
|
208
|
-
return "azz";
|
|
209
|
-
return name;
|
|
210
|
-
}
|
|
211
|
-
export const yamlOptions = {
|
|
212
|
-
sortKeys: (a, b) => {
|
|
213
|
-
return prioritizeName(a).localeCompare(prioritizeName(b));
|
|
214
|
-
},
|
|
215
|
-
noCompatMode: true,
|
|
216
|
-
noRefs: true,
|
|
217
|
-
skipInvalid: true,
|
|
218
|
-
};
|
|
219
|
-
export function extractInlineScriptsForApps(rec, pathAssigner) {
|
|
220
|
-
if (!rec) {
|
|
221
|
-
return [];
|
|
222
|
-
}
|
|
223
|
-
if (typeof rec == "object") {
|
|
224
|
-
return Object.entries(rec).flatMap(([k, v]) => {
|
|
225
|
-
if (k == "inlineScript" && typeof v == "object") {
|
|
226
|
-
const o = v;
|
|
227
|
-
const name = rec["name"];
|
|
228
|
-
const [basePath, ext] = pathAssigner.assignPath(name, o["language"]);
|
|
229
|
-
const r = [];
|
|
230
|
-
if (o["content"]) {
|
|
231
|
-
const content = o["content"];
|
|
232
|
-
o["content"] = "!inline " + basePath.replaceAll(SEP, "/") + ext;
|
|
233
|
-
r.push({
|
|
234
|
-
path: basePath + ext,
|
|
235
|
-
content: content,
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
if (o["lock"] && o["lock"] != "") {
|
|
239
|
-
const lock = o["lock"];
|
|
240
|
-
o["lock"] = "!inline " + basePath.replaceAll(SEP, "/") + "lock";
|
|
241
|
-
r.push({
|
|
242
|
-
path: basePath + "lock",
|
|
243
|
-
content: lock,
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
return r;
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
return extractInlineScriptsForApps(v, pathAssigner);
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
return [];
|
|
254
|
-
}
|
|
255
|
-
function ZipFSElement(zip, useYaml, defaultTs, resourceTypeToFormatExtension, ignoreCodebaseChanges) {
|
|
256
|
-
async function _internal_file(p, f) {
|
|
257
|
-
const kind = p.endsWith("flow.json")
|
|
258
|
-
? "flow"
|
|
259
|
-
: p.endsWith("app.json")
|
|
260
|
-
? "app"
|
|
261
|
-
: p.endsWith("script.json")
|
|
262
|
-
? "script"
|
|
263
|
-
: p.endsWith("resource.json")
|
|
264
|
-
? "resource"
|
|
265
|
-
: "other";
|
|
266
|
-
const isJson = p.endsWith(".json");
|
|
267
|
-
function transformPath() {
|
|
268
|
-
if (kind == "flow") {
|
|
269
|
-
return p.replace("flow.json", "flow");
|
|
270
|
-
}
|
|
271
|
-
else if (kind == "app") {
|
|
272
|
-
return p.replace("app.json", "app");
|
|
273
|
-
}
|
|
274
|
-
else {
|
|
275
|
-
return useYaml && isJson ? p.replaceAll(".json", ".yaml") : p;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
const finalPath = transformPath();
|
|
279
|
-
const r = [
|
|
280
|
-
{
|
|
281
|
-
isDirectory: kind == "flow" || kind == "app",
|
|
282
|
-
path: finalPath,
|
|
283
|
-
async *getChildren() {
|
|
284
|
-
if (kind == "flow") {
|
|
285
|
-
const flow = JSON.parse(await f.async("text"));
|
|
286
|
-
const inlineScripts = extractInlineScriptsForFlows(flow.value.modules, {}, SEP, defaultTs, newPathAssigner(defaultTs));
|
|
287
|
-
for (const s of inlineScripts) {
|
|
288
|
-
yield {
|
|
289
|
-
isDirectory: false,
|
|
290
|
-
path: path.join(finalPath, s.path),
|
|
291
|
-
async *getChildren() { },
|
|
292
|
-
// deno-lint-ignore require-await
|
|
293
|
-
async getContentText() {
|
|
294
|
-
return s.content;
|
|
295
|
-
},
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
|
-
yield {
|
|
299
|
-
isDirectory: false,
|
|
300
|
-
path: path.join(finalPath, "flow.yaml"),
|
|
301
|
-
async *getChildren() { },
|
|
302
|
-
// deno-lint-ignore require-await
|
|
303
|
-
async getContentText() {
|
|
304
|
-
return yamlStringify(flow, yamlOptions);
|
|
305
|
-
},
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
else if (kind == "app") {
|
|
309
|
-
const app = JSON.parse(await f.async("text"));
|
|
310
|
-
const inlineScripts = extractInlineScriptsForApps(app?.["value"], newPathAssigner(defaultTs));
|
|
311
|
-
for (const s of inlineScripts) {
|
|
312
|
-
yield {
|
|
313
|
-
isDirectory: false,
|
|
314
|
-
path: path.join(finalPath, s.path),
|
|
315
|
-
async *getChildren() { },
|
|
316
|
-
// deno-lint-ignore require-await
|
|
317
|
-
async getContentText() {
|
|
318
|
-
return s.content;
|
|
319
|
-
},
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
yield {
|
|
323
|
-
isDirectory: false,
|
|
324
|
-
path: path.join(finalPath, "app.yaml"),
|
|
325
|
-
async *getChildren() { },
|
|
326
|
-
// deno-lint-ignore require-await
|
|
327
|
-
async getContentText() {
|
|
328
|
-
return yamlStringify(app, yamlOptions);
|
|
329
|
-
},
|
|
330
|
-
};
|
|
331
|
-
}
|
|
332
|
-
},
|
|
333
|
-
async getContentText() {
|
|
334
|
-
const content = await f.async("text");
|
|
335
|
-
if (kind == "script") {
|
|
336
|
-
const parsed = JSON.parse(content);
|
|
337
|
-
if (parsed["lock"] &&
|
|
338
|
-
parsed["lock"] != "" &&
|
|
339
|
-
parsed["codebase"] == undefined) {
|
|
340
|
-
parsed["lock"] =
|
|
341
|
-
"!inline " +
|
|
342
|
-
removeSuffix(p.replaceAll(SEP, "/"), ".json") +
|
|
343
|
-
".lock";
|
|
344
|
-
}
|
|
345
|
-
else if (parsed["lock"] == "") {
|
|
346
|
-
parsed["lock"] = "";
|
|
347
|
-
}
|
|
348
|
-
else {
|
|
349
|
-
parsed["lock"] = undefined;
|
|
350
|
-
}
|
|
351
|
-
if (ignoreCodebaseChanges && parsed["codebase"]) {
|
|
352
|
-
parsed["codebase"] = undefined;
|
|
353
|
-
}
|
|
354
|
-
return useYaml
|
|
355
|
-
? yamlStringify(parsed, yamlOptions)
|
|
356
|
-
: JSON.stringify(parsed, null, 2);
|
|
357
|
-
}
|
|
358
|
-
if (kind == "resource") {
|
|
359
|
-
const content = await f.async("text");
|
|
360
|
-
const parsed = JSON.parse(content);
|
|
361
|
-
const formatExtension = resourceTypeToFormatExtension[parsed["resource_type"]];
|
|
362
|
-
if (formatExtension) {
|
|
363
|
-
parsed["value"]["content"] =
|
|
364
|
-
"!inline " +
|
|
365
|
-
removeSuffix(p.replaceAll(SEP, "/"), ".resource.json") +
|
|
366
|
-
".resource.file." +
|
|
367
|
-
formatExtension;
|
|
368
|
-
}
|
|
369
|
-
return useYaml
|
|
370
|
-
? yamlStringify(parsed, yamlOptions)
|
|
371
|
-
: JSON.stringify(parsed, null, 2);
|
|
372
|
-
}
|
|
373
|
-
return useYaml && isJson
|
|
374
|
-
? yamlStringify(JSON.parse(content), yamlOptions)
|
|
375
|
-
: content;
|
|
376
|
-
},
|
|
377
|
-
},
|
|
378
|
-
];
|
|
379
|
-
if (kind == "script") {
|
|
380
|
-
const content = await f.async("text");
|
|
381
|
-
const parsed = JSON.parse(content);
|
|
382
|
-
const lock = parsed["lock"];
|
|
383
|
-
if (lock && lock != "") {
|
|
384
|
-
r.push({
|
|
385
|
-
isDirectory: false,
|
|
386
|
-
path: removeSuffix(finalPath, ".json") + ".lock",
|
|
387
|
-
async *getChildren() { },
|
|
388
|
-
// deno-lint-ignore require-await
|
|
389
|
-
async getContentText() {
|
|
390
|
-
return lock;
|
|
391
|
-
},
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
if (kind == "resource") {
|
|
396
|
-
const content = await f.async("text");
|
|
397
|
-
const parsed = JSON.parse(content);
|
|
398
|
-
const formatExtension = resourceTypeToFormatExtension[parsed["resource_type"]];
|
|
399
|
-
if (formatExtension) {
|
|
400
|
-
const fileContent = parsed["value"]["content"];
|
|
401
|
-
if (typeof fileContent === "string") {
|
|
402
|
-
r.push({
|
|
403
|
-
isDirectory: false,
|
|
404
|
-
path: removeSuffix(finalPath, ".resource.json") +
|
|
405
|
-
".resource.file." +
|
|
406
|
-
formatExtension,
|
|
407
|
-
async *getChildren() { },
|
|
408
|
-
// deno-lint-ignore require-await
|
|
409
|
-
async getContentText() {
|
|
410
|
-
return fileContent;
|
|
411
|
-
},
|
|
412
|
-
});
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
return r;
|
|
417
|
-
}
|
|
418
|
-
function _internal_folder(p, zip) {
|
|
419
|
-
return {
|
|
420
|
-
isDirectory: true,
|
|
421
|
-
path: p,
|
|
422
|
-
async *getChildren() {
|
|
423
|
-
for (const filename in zip.files) {
|
|
424
|
-
const file = zip.files[filename];
|
|
425
|
-
const totalPath = path.join(p, filename);
|
|
426
|
-
if (file.dir) {
|
|
427
|
-
const e = zip.folder(file.name);
|
|
428
|
-
yield _internal_folder(totalPath, e);
|
|
429
|
-
}
|
|
430
|
-
else {
|
|
431
|
-
const fs = await _internal_file(totalPath, file);
|
|
432
|
-
for (const f of fs) {
|
|
433
|
-
yield f;
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
},
|
|
438
|
-
// // deno-lint-ignore require-await
|
|
439
|
-
// async getContentBytes(): Promise<Uint8Array> {
|
|
440
|
-
// throw new Error("Cannot get content of folder");
|
|
441
|
-
// },
|
|
442
|
-
// deno-lint-ignore require-await
|
|
443
|
-
async getContentText() {
|
|
444
|
-
throw new Error("Cannot get content of folder");
|
|
445
|
-
},
|
|
446
|
-
};
|
|
447
|
-
}
|
|
448
|
-
return _internal_folder("." + SEP, zip);
|
|
449
|
-
}
|
|
450
|
-
export async function* readDirRecursiveWithIgnore(ignore, root) {
|
|
451
|
-
const stack = [
|
|
452
|
-
{
|
|
453
|
-
path: root.path,
|
|
454
|
-
ignored: ignore(root.path, root.isDirectory),
|
|
455
|
-
isDirectory: root.isDirectory,
|
|
456
|
-
c: root.getChildren,
|
|
457
|
-
// getContentBytes(): Promise<Uint8Array> {
|
|
458
|
-
// throw undefined;
|
|
459
|
-
// },
|
|
460
|
-
getContentText() {
|
|
461
|
-
throw undefined;
|
|
462
|
-
},
|
|
463
|
-
},
|
|
464
|
-
];
|
|
465
|
-
while (stack.length > 0) {
|
|
466
|
-
const e = stack.pop();
|
|
467
|
-
// console.log(e.path);
|
|
468
|
-
yield e;
|
|
469
|
-
for await (const e2 of e.c()) {
|
|
470
|
-
if (e2.isDirectory) {
|
|
471
|
-
const dirName = e2.path.split(SEP).pop();
|
|
472
|
-
if (dirName == "node_modules" || dirName?.startsWith(".")) {
|
|
473
|
-
continue;
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
// console.log(e2.path);
|
|
477
|
-
stack.push({
|
|
478
|
-
path: e2.path,
|
|
479
|
-
ignored: e.ignored || ignore(e2.path, e2.isDirectory),
|
|
480
|
-
isDirectory: e2.isDirectory,
|
|
481
|
-
// getContentBytes: e2.getContentBytes,
|
|
482
|
-
getContentText: e2.getContentText,
|
|
483
|
-
c: e2.getChildren,
|
|
484
|
-
});
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
export async function elementsToMap(els, ignore, json, skips) {
|
|
489
|
-
const map = {};
|
|
490
|
-
for await (const entry of readDirRecursiveWithIgnore(ignore, els)) {
|
|
491
|
-
if (entry.isDirectory || entry.ignored)
|
|
492
|
-
continue;
|
|
493
|
-
const path = entry.path;
|
|
494
|
-
if (json && path.endsWith(".yaml") && !isFileResource(path))
|
|
495
|
-
continue;
|
|
496
|
-
if (!json && path.endsWith(".json") && !isFileResource(path))
|
|
497
|
-
continue;
|
|
498
|
-
const ext = json ? ".json" : ".yaml";
|
|
499
|
-
if (!skips.includeSchedules && path.endsWith(".schedule" + ext))
|
|
500
|
-
continue;
|
|
501
|
-
if (!skips.includeTriggers &&
|
|
502
|
-
(path.endsWith(".http_trigger" + ext) ||
|
|
503
|
-
path.endsWith(".websocket_trigger" + ext) ||
|
|
504
|
-
path.endsWith(".kafka_trigger" + ext) ||
|
|
505
|
-
path.endsWith(".nats_trigger" + ext) ||
|
|
506
|
-
path.endsWith(".postgres_trigger" + ext) ||
|
|
507
|
-
path.endsWith(".mqtt_trigger" + ext) ||
|
|
508
|
-
path.endsWith(".sqs_trigger" + ext) ||
|
|
509
|
-
path.endsWith(".gcp_trigger" + ext)))
|
|
510
|
-
continue;
|
|
511
|
-
if (!skips.includeUsers && path.endsWith(".user" + ext))
|
|
512
|
-
continue;
|
|
513
|
-
if (!skips.includeGroups && path.endsWith(".group" + ext))
|
|
514
|
-
continue;
|
|
515
|
-
if (!skips.includeSettings && path === "settings" + ext)
|
|
516
|
-
continue;
|
|
517
|
-
if (!skips.includeKey && path === "encryption_key")
|
|
518
|
-
continue;
|
|
519
|
-
if (skips.skipResources && path.endsWith(".resource" + ext))
|
|
520
|
-
continue;
|
|
521
|
-
if (skips.skipResourceTypes && path.endsWith(".resource-type" + ext))
|
|
522
|
-
continue;
|
|
523
|
-
// Use getTypeStrFromPath for consistent type detection
|
|
524
|
-
try {
|
|
525
|
-
const fileType = getTypeStrFromPath(path);
|
|
526
|
-
if (skips.skipVariables && fileType === "variable")
|
|
527
|
-
continue;
|
|
528
|
-
if (skips.skipScripts && fileType === "script")
|
|
529
|
-
continue;
|
|
530
|
-
if (skips.skipFlows && fileType === "flow")
|
|
531
|
-
continue;
|
|
532
|
-
if (skips.skipApps && fileType === "app")
|
|
533
|
-
continue;
|
|
534
|
-
if (skips.skipFolders && fileType === "folder")
|
|
535
|
-
continue;
|
|
536
|
-
}
|
|
537
|
-
catch {
|
|
538
|
-
// If getTypeStrFromPath can't determine the type, continue processing the file
|
|
539
|
-
}
|
|
540
|
-
if (skips.skipResources && isFileResource(path))
|
|
541
|
-
continue;
|
|
542
|
-
if (![
|
|
543
|
-
"json",
|
|
544
|
-
"yaml",
|
|
545
|
-
"go",
|
|
546
|
-
"sh",
|
|
547
|
-
"ts",
|
|
548
|
-
"py",
|
|
549
|
-
"sql",
|
|
550
|
-
"gql",
|
|
551
|
-
"ps1",
|
|
552
|
-
"php",
|
|
553
|
-
"js",
|
|
554
|
-
"lock",
|
|
555
|
-
"rs",
|
|
556
|
-
"cs",
|
|
557
|
-
"yml",
|
|
558
|
-
"nu",
|
|
559
|
-
"java",
|
|
560
|
-
// for related places search: ADD_NEW_LANG
|
|
561
|
-
].includes(path.split(".").pop() ?? "") &&
|
|
562
|
-
!isFileResource(path))
|
|
563
|
-
continue;
|
|
564
|
-
const content = await entry.getContentText();
|
|
565
|
-
if (skips.skipSecrets && path.endsWith(".variable" + ext)) {
|
|
566
|
-
try {
|
|
567
|
-
let o;
|
|
568
|
-
if (json) {
|
|
569
|
-
o = JSON.parse(content);
|
|
570
|
-
}
|
|
571
|
-
else {
|
|
572
|
-
o = yamlParseContent(path, content);
|
|
573
|
-
}
|
|
574
|
-
if (o["is_secret"]) {
|
|
575
|
-
continue;
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
catch (e) {
|
|
579
|
-
log.warn(`Error reading variable ${path} to check for secrets`);
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
map[entry.path] = content;
|
|
583
|
-
}
|
|
584
|
-
return map;
|
|
585
|
-
}
|
|
586
|
-
async function compareDynFSElement(els1, els2, ignore, json, skips, ignoreMetadataDeletion, codebases, ignoreCodebaseChanges) {
|
|
587
|
-
const [m1, m2] = els2
|
|
588
|
-
? await Promise.all([
|
|
589
|
-
elementsToMap(els1, ignore, json, skips),
|
|
590
|
-
elementsToMap(els2, ignore, json, skips),
|
|
591
|
-
])
|
|
592
|
-
: [await elementsToMap(els1, ignore, json, skips), {}];
|
|
593
|
-
const changes = [];
|
|
594
|
-
function parseYaml(k, v) {
|
|
595
|
-
if (k.endsWith(".script.yaml")) {
|
|
596
|
-
const o = yamlParseContent(k, v);
|
|
597
|
-
if (typeof o == "object") {
|
|
598
|
-
if (Array.isArray(o?.["lock"])) {
|
|
599
|
-
o["lock"] = o["lock"].join("\n");
|
|
600
|
-
}
|
|
601
|
-
if (o["is_template"] != undefined) {
|
|
602
|
-
delete o["is_template"];
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
return o;
|
|
606
|
-
}
|
|
607
|
-
else if (k.endsWith(".app.yaml")) {
|
|
608
|
-
const o = yamlParseContent(k, v);
|
|
609
|
-
const o2 = o["policy"];
|
|
610
|
-
if (typeof o2 == "object") {
|
|
611
|
-
if (o2["on_behalf_of"] != undefined) {
|
|
612
|
-
delete o2["on_behalf_of"];
|
|
613
|
-
}
|
|
614
|
-
if (o2["on_behalf_of_email"] != undefined) {
|
|
615
|
-
delete o2["on_behalf_of_email"];
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
return o;
|
|
619
|
-
}
|
|
620
|
-
else {
|
|
621
|
-
return yamlParseContent(k, v);
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
const codebaseChanges = {};
|
|
625
|
-
for (let [k, v] of Object.entries(m1)) {
|
|
626
|
-
const isScriptMetadata = k.endsWith(".script.yaml") || k.endsWith(".script.json");
|
|
627
|
-
const skipMetadata = skips.skipScriptsMetadata && isScriptMetadata;
|
|
628
|
-
if (m2[k] === undefined) {
|
|
629
|
-
if (skipMetadata) {
|
|
630
|
-
continue;
|
|
631
|
-
}
|
|
632
|
-
changes.push({ name: "added", path: k, content: v });
|
|
633
|
-
}
|
|
634
|
-
else {
|
|
635
|
-
if (m2[k] == v) {
|
|
636
|
-
continue;
|
|
637
|
-
}
|
|
638
|
-
else if (k.endsWith(".json")) {
|
|
639
|
-
if (deepEqual(JSON.parse(v), JSON.parse(m2[k]))) {
|
|
640
|
-
continue;
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
else if (k.endsWith(".yaml")) {
|
|
644
|
-
const before = parseYaml(k, m2[k]);
|
|
645
|
-
const after = parseYaml(k, v);
|
|
646
|
-
if (deepEqual(before, after)) {
|
|
647
|
-
continue;
|
|
648
|
-
}
|
|
649
|
-
if (!ignoreCodebaseChanges) {
|
|
650
|
-
if (before.codebase != undefined) {
|
|
651
|
-
delete before.codebase;
|
|
652
|
-
m2[k] = yamlStringify(before, yamlOptions);
|
|
653
|
-
}
|
|
654
|
-
if (after.codebase != undefined) {
|
|
655
|
-
if (before.codebase != after.codebase) {
|
|
656
|
-
codebaseChanges[k] = after.codebase;
|
|
657
|
-
}
|
|
658
|
-
delete after.codebase;
|
|
659
|
-
v = yamlStringify(after, yamlOptions);
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
if (skipMetadata) {
|
|
663
|
-
continue;
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
changes.push({
|
|
667
|
-
name: "edited",
|
|
668
|
-
path: k,
|
|
669
|
-
after: v,
|
|
670
|
-
before: m2[k],
|
|
671
|
-
codebase: codebaseChanges[k],
|
|
672
|
-
});
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
const remoteCodebase = {};
|
|
676
|
-
for (const [k] of Object.entries(m2)) {
|
|
677
|
-
if (m1[k] === undefined) {
|
|
678
|
-
if (!ignoreMetadataDeletion ||
|
|
679
|
-
(!k?.endsWith(".script.yaml") && !k?.endsWith(".script.json"))) {
|
|
680
|
-
changes.push({ name: "deleted", path: k });
|
|
681
|
-
}
|
|
682
|
-
else if (k?.endsWith(".script.yaml")) {
|
|
683
|
-
let o = parseYaml(k, m2[k]);
|
|
684
|
-
if (o.codebase != undefined) {
|
|
685
|
-
remoteCodebase[k] = o.codebase;
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
if (!ignoreCodebaseChanges) {
|
|
691
|
-
for (const [k, v] of Object.entries(remoteCodebase)) {
|
|
692
|
-
const tsFile = k.replace(".script.yaml", ".ts");
|
|
693
|
-
if (changes.find((c) => c.path == tsFile && (c.name == "edited" || c.name == "deleted"))) {
|
|
694
|
-
continue;
|
|
695
|
-
}
|
|
696
|
-
const c = findCodebase(tsFile, codebases);
|
|
697
|
-
if ((await c?.getDigest()) != v) {
|
|
698
|
-
changes.push({
|
|
699
|
-
name: "edited",
|
|
700
|
-
path: tsFile,
|
|
701
|
-
codebase: v,
|
|
702
|
-
before: m1[tsFile],
|
|
703
|
-
after: m2[tsFile],
|
|
704
|
-
});
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
if (!ignoreCodebaseChanges) {
|
|
709
|
-
for (const change of changes) {
|
|
710
|
-
const codebase = codebaseChanges[change.path];
|
|
711
|
-
if (!codebase)
|
|
712
|
-
continue;
|
|
713
|
-
const tsFile = change.path.replace(".script.yaml", ".ts");
|
|
714
|
-
if (change.name == "edited" && change.path == tsFile) {
|
|
715
|
-
change.codebase = codebase;
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
changes.sort((a, b) => getOrderFromPath(a.path) == getOrderFromPath(b.path)
|
|
720
|
-
? a.path.localeCompare(b.path)
|
|
721
|
-
: getOrderFromPath(a.path) - getOrderFromPath(b.path));
|
|
722
|
-
return changes;
|
|
723
|
-
}
|
|
724
|
-
function getOrderFromPath(p) {
|
|
725
|
-
const typ = getTypeStrFromPath(p);
|
|
726
|
-
if (typ == "settings") {
|
|
727
|
-
return 0;
|
|
728
|
-
}
|
|
729
|
-
else if (typ == "folder") {
|
|
730
|
-
return 1;
|
|
731
|
-
}
|
|
732
|
-
else if (typ == "resource-type") {
|
|
733
|
-
return 2;
|
|
734
|
-
}
|
|
735
|
-
else if (typ == "resource") {
|
|
736
|
-
return 3;
|
|
737
|
-
}
|
|
738
|
-
else if (typ == "script") {
|
|
739
|
-
return 4;
|
|
740
|
-
}
|
|
741
|
-
else if (typ == "flow") {
|
|
742
|
-
return 5;
|
|
743
|
-
}
|
|
744
|
-
else if (typ == "app") {
|
|
745
|
-
return 6;
|
|
746
|
-
}
|
|
747
|
-
else if (typ == "schedule") {
|
|
748
|
-
return 7;
|
|
749
|
-
}
|
|
750
|
-
else if (typ == "http_trigger" ||
|
|
751
|
-
typ == "websocket_trigger" ||
|
|
752
|
-
typ == "kafka_trigger" ||
|
|
753
|
-
typ == "nats_trigger" ||
|
|
754
|
-
typ == "postgres_trigger" ||
|
|
755
|
-
typ == "mqtt_trigger" ||
|
|
756
|
-
typ == "sqs_trigger" ||
|
|
757
|
-
typ == "gcp_trigger") {
|
|
758
|
-
return 8;
|
|
759
|
-
}
|
|
760
|
-
else if (typ == "variable") {
|
|
761
|
-
return 9;
|
|
762
|
-
}
|
|
763
|
-
else if (typ == "user") {
|
|
764
|
-
return 10;
|
|
765
|
-
}
|
|
766
|
-
else if (typ == "group") {
|
|
767
|
-
return 11;
|
|
768
|
-
}
|
|
769
|
-
else if (typ == "encryption_key") {
|
|
770
|
-
return 12;
|
|
771
|
-
}
|
|
772
|
-
else {
|
|
773
|
-
return 13;
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
const isNotWmillFile = (p, isDirectory) => {
|
|
777
|
-
if (p.endsWith(SEP)) {
|
|
778
|
-
return false;
|
|
779
|
-
}
|
|
780
|
-
if (isDirectory) {
|
|
781
|
-
return (!p.startsWith("u" + SEP) &&
|
|
782
|
-
!p.startsWith("f" + SEP) &&
|
|
783
|
-
!p.startsWith("g" + SEP) &&
|
|
784
|
-
!p.startsWith("users" + SEP) &&
|
|
785
|
-
!p.startsWith("groups" + SEP));
|
|
786
|
-
}
|
|
787
|
-
try {
|
|
788
|
-
const typ = getTypeStrFromPath(p);
|
|
789
|
-
if (typ == "resource-type" ||
|
|
790
|
-
typ == "settings" ||
|
|
791
|
-
typ == "encryption_key") {
|
|
792
|
-
return p.includes(SEP);
|
|
793
|
-
}
|
|
794
|
-
else {
|
|
795
|
-
return (!p.startsWith("u" + SEP) &&
|
|
796
|
-
!p.startsWith("f" + SEP) &&
|
|
797
|
-
!p.startsWith("g" + SEP) &&
|
|
798
|
-
!p.startsWith("users" + SEP) &&
|
|
799
|
-
!p.startsWith("groups" + SEP));
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
catch {
|
|
803
|
-
return true;
|
|
804
|
-
}
|
|
805
|
-
};
|
|
806
|
-
export const isWhitelisted = (p) => {
|
|
807
|
-
return (p == "." + SEP ||
|
|
808
|
-
p == "" ||
|
|
809
|
-
p == "u" ||
|
|
810
|
-
p == "f" ||
|
|
811
|
-
p == "g" ||
|
|
812
|
-
p == "users" ||
|
|
813
|
-
p == "groups");
|
|
814
|
-
};
|
|
815
|
-
export async function ignoreF(wmillconf) {
|
|
816
|
-
let whitelist = undefined;
|
|
817
|
-
if ((Array.isArray(wmillconf?.includes) && wmillconf?.includes?.length > 0) ||
|
|
818
|
-
(Array.isArray(wmillconf?.excludes) && wmillconf?.excludes?.length > 0)) {
|
|
819
|
-
whitelist = {
|
|
820
|
-
approve(file) {
|
|
821
|
-
return ((!wmillconf.includes ||
|
|
822
|
-
wmillconf.includes?.some((i) => minimatch(file, i))) &&
|
|
823
|
-
(!wmillconf?.excludes ||
|
|
824
|
-
wmillconf.excludes.every((i) => !minimatch(file, i))) &&
|
|
825
|
-
(!wmillconf.extraIncludes ||
|
|
826
|
-
wmillconf.extraIncludes.length === 0 ||
|
|
827
|
-
wmillconf.extraIncludes.some((i) => minimatch(file, i))));
|
|
828
|
-
},
|
|
829
|
-
};
|
|
830
|
-
}
|
|
831
|
-
try {
|
|
832
|
-
await dntShim.Deno.stat(".wmillignore");
|
|
833
|
-
throw Error(".wmillignore is not supported anymore, switch to wmill.yaml");
|
|
834
|
-
}
|
|
835
|
-
catch {
|
|
836
|
-
//expected
|
|
837
|
-
}
|
|
838
|
-
// new Gitignore.default({ initialRules: ignoreContent.split("\n")}).ignoreContent).compile();
|
|
839
|
-
return (p, isDirectory) => {
|
|
840
|
-
const ext = wmillconf.json ? ".json" : ".yaml";
|
|
841
|
-
if (!isDirectory && p.endsWith(".resource-type" + ext)) {
|
|
842
|
-
return wmillconf.skipResourceTypes ?? false;
|
|
843
|
-
}
|
|
844
|
-
// Special files should bypass path-based filtering when their include flags are set
|
|
845
|
-
if (!isDirectory) {
|
|
846
|
-
try {
|
|
847
|
-
const fileType = getTypeStrFromPath(p);
|
|
848
|
-
if (wmillconf.includeUsers && fileType === "user") {
|
|
849
|
-
return false; // Don't ignore, always include
|
|
850
|
-
}
|
|
851
|
-
if (wmillconf.includeGroups && fileType === "group") {
|
|
852
|
-
return false; // Don't ignore, always include
|
|
853
|
-
}
|
|
854
|
-
if (wmillconf.includeSettings && fileType === "settings") {
|
|
855
|
-
return false; // Don't ignore, always include
|
|
856
|
-
}
|
|
857
|
-
if (wmillconf.includeKey && fileType === "encryption_key") {
|
|
858
|
-
return false; // Don't ignore, always include
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
catch {
|
|
862
|
-
// If getTypeStrFromPath can't determine the type, fall through to normal logic
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
return (!isWhitelisted(p) &&
|
|
866
|
-
(isNotWmillFile(p, isDirectory) ||
|
|
867
|
-
(!isDirectory && whitelist != undefined && !whitelist.approve(p))));
|
|
868
|
-
};
|
|
869
|
-
}
|
|
870
|
-
// deno-lint-ignore no-inner-declarations
|
|
871
|
-
async function addToChangedIfNotExists(p, tracker) {
|
|
872
|
-
const isScript = exts.some((e) => p.endsWith(e));
|
|
873
|
-
if (isScript) {
|
|
874
|
-
if (p.includes(".flow" + SEP)) {
|
|
875
|
-
const folder = p.substring(0, p.indexOf(".flow" + SEP)) + ".flow" + SEP;
|
|
876
|
-
if (!tracker.flows.includes(folder)) {
|
|
877
|
-
tracker.flows.push(folder);
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
else if (p.includes(".app" + SEP)) {
|
|
881
|
-
const folder = p.substring(0, p.indexOf(".app" + SEP)) + ".app" + SEP;
|
|
882
|
-
if (!tracker.apps.includes(folder)) {
|
|
883
|
-
tracker.apps.push(folder);
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
else {
|
|
887
|
-
if (!tracker.scripts.includes(p)) {
|
|
888
|
-
tracker.scripts.push(p);
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
else if (p.endsWith(".script.yaml") || p.endsWith(".script.json")) {
|
|
893
|
-
try {
|
|
894
|
-
const contentPath = await findContentFile(p);
|
|
895
|
-
if (!contentPath)
|
|
896
|
-
return;
|
|
897
|
-
if (tracker.scripts.includes(contentPath))
|
|
898
|
-
return;
|
|
899
|
-
tracker.scripts.push(contentPath);
|
|
900
|
-
}
|
|
901
|
-
catch {
|
|
902
|
-
// ignore
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
async function buildTracker(changes) {
|
|
907
|
-
const tracker = {
|
|
908
|
-
scripts: [],
|
|
909
|
-
flows: [],
|
|
910
|
-
apps: [],
|
|
911
|
-
};
|
|
912
|
-
for (const change of changes) {
|
|
913
|
-
if (change.name == "added" || change.name == "edited") {
|
|
914
|
-
await addToChangedIfNotExists(change.path, tracker);
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
return tracker;
|
|
918
|
-
}
|
|
919
|
-
export async function pull(opts) {
|
|
920
|
-
if (opts.stateful) {
|
|
921
|
-
await ensureDir(path.join(dntShim.Deno.cwd(), ".wmill"));
|
|
922
|
-
}
|
|
923
|
-
const workspace = await resolveWorkspace(opts);
|
|
924
|
-
await requireLogin(opts);
|
|
925
|
-
// Resolve effective sync options with repository awareness
|
|
926
|
-
const effectiveOpts = await resolveEffectiveSyncOptions(workspace, opts.repository);
|
|
927
|
-
// Merge CLI flags with resolved settings (CLI flags take precedence only for explicit overrides)
|
|
928
|
-
opts = mergeCliWithEffectiveOptions(opts, effectiveOpts);
|
|
929
|
-
const codebases = await listSyncCodebases(opts);
|
|
930
|
-
log.info(colors.gray("Computing the files to update locally to match remote (taking wmill.yaml into account)"));
|
|
931
|
-
let resourceTypeToFormatExtension = {};
|
|
932
|
-
try {
|
|
933
|
-
resourceTypeToFormatExtension = (await wmill.fileResourceTypeToFileExtMap({
|
|
934
|
-
workspace: workspace.workspaceId,
|
|
935
|
-
}));
|
|
936
|
-
}
|
|
937
|
-
catch {
|
|
938
|
-
// ignore
|
|
939
|
-
}
|
|
940
|
-
const remote = ZipFSElement((await downloadZip(workspace, opts.plainSecrets, opts.skipVariables, opts.skipResources, opts.skipResourceTypes, opts.skipSecrets, opts.includeSchedules, opts.includeTriggers, opts.includeUsers, opts.includeGroups, opts.includeSettings, opts.includeKey, opts.defaultTs)), !opts.json, opts.defaultTs ?? "bun", resourceTypeToFormatExtension, true);
|
|
941
|
-
const local = !opts.stateful
|
|
942
|
-
? await FSFSElement(dntShim.Deno.cwd(), codebases, true)
|
|
943
|
-
: await FSFSElement(path.join(dntShim.Deno.cwd(), ".wmill"), [], true);
|
|
944
|
-
const changes = await compareDynFSElement(remote, local, await ignoreF(opts), opts.json ?? false, opts, false, codebases, true);
|
|
945
|
-
log.info(`remote (${workspace.name}) -> local: ${changes.length} changes to apply`);
|
|
946
|
-
// Handle JSON output for dry-run
|
|
947
|
-
if (opts.dryRun && opts.jsonOutput) {
|
|
948
|
-
const result = {
|
|
949
|
-
success: true,
|
|
950
|
-
changes: changes.map((change) => ({
|
|
951
|
-
type: change.name,
|
|
952
|
-
path: change.path,
|
|
953
|
-
...(change.name === "edited" && change.codebase
|
|
954
|
-
? { codebase_changed: true }
|
|
955
|
-
: {}),
|
|
956
|
-
})),
|
|
957
|
-
total: changes.length,
|
|
958
|
-
};
|
|
959
|
-
console.log(JSON.stringify(result, null, 2));
|
|
960
|
-
return;
|
|
961
|
-
}
|
|
962
|
-
if (changes.length > 0) {
|
|
963
|
-
if (!opts.jsonOutput) {
|
|
964
|
-
prettyChanges(changes);
|
|
965
|
-
}
|
|
966
|
-
if (opts.dryRun) {
|
|
967
|
-
log.info(colors.gray(`Dry run complete.`));
|
|
968
|
-
return;
|
|
969
|
-
}
|
|
970
|
-
if (!opts.yes &&
|
|
971
|
-
!(await Confirm.prompt({
|
|
972
|
-
message: `Do you want to apply these ${changes.length} changes to your local files?`,
|
|
973
|
-
default: true,
|
|
974
|
-
}))) {
|
|
975
|
-
return;
|
|
976
|
-
}
|
|
977
|
-
const conflicts = [];
|
|
978
|
-
log.info(colors.gray(`Applying changes to files ...`));
|
|
979
|
-
for await (const change of changes) {
|
|
980
|
-
const target = path.join(dntShim.Deno.cwd(), change.path);
|
|
981
|
-
const stateTarget = path.join(dntShim.Deno.cwd(), ".wmill", change.path);
|
|
982
|
-
if (change.name === "edited") {
|
|
983
|
-
if (opts.stateful) {
|
|
984
|
-
try {
|
|
985
|
-
const currentLocal = await dntShim.Deno.readTextFile(target);
|
|
986
|
-
if (currentLocal !== change.before &&
|
|
987
|
-
currentLocal !== change.after) {
|
|
988
|
-
log.info(colors.red(`Conflict detected on ${change.path}\nBoth local and remote have been modified.`));
|
|
989
|
-
if (opts.failConflicts) {
|
|
990
|
-
conflicts.push({
|
|
991
|
-
local: currentLocal,
|
|
992
|
-
change,
|
|
993
|
-
path: change.path,
|
|
994
|
-
});
|
|
995
|
-
continue;
|
|
996
|
-
}
|
|
997
|
-
else if (opts.yes) {
|
|
998
|
-
log.info(colors.red(`Override local version with remote since --yes was passed and no --fail-conflicts.`));
|
|
999
|
-
}
|
|
1000
|
-
else {
|
|
1001
|
-
showConflict(change.path, currentLocal, change.after);
|
|
1002
|
-
if (await Confirm.prompt("Preserve local (push to change remote and avoid seeing this again)?")) {
|
|
1003
|
-
continue;
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
|
-
catch {
|
|
1009
|
-
// ignore
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
if (exts.some((e) => change.path.endsWith(e))) {
|
|
1013
|
-
log.info(`Editing script content of ${change.path}`);
|
|
1014
|
-
}
|
|
1015
|
-
else if (change.path.endsWith(".yaml") ||
|
|
1016
|
-
change.path.endsWith(".json")) {
|
|
1017
|
-
log.info(`Editing ${getTypeStrFromPath(change.path)} ${change.path}`);
|
|
1018
|
-
}
|
|
1019
|
-
await dntShim.Deno.writeTextFile(target, change.after);
|
|
1020
|
-
if (opts.stateful) {
|
|
1021
|
-
await ensureDir(path.dirname(stateTarget));
|
|
1022
|
-
await dntShim.Deno.copyFile(target, stateTarget);
|
|
1023
|
-
}
|
|
1024
|
-
}
|
|
1025
|
-
else if (change.name === "added") {
|
|
1026
|
-
await ensureDir(path.dirname(target));
|
|
1027
|
-
if (opts.stateful) {
|
|
1028
|
-
await ensureDir(path.dirname(stateTarget));
|
|
1029
|
-
log.info(`Adding ${getTypeStrFromPath(change.path)} ${change.path}`);
|
|
1030
|
-
}
|
|
1031
|
-
await dntShim.Deno.writeTextFile(target, change.content);
|
|
1032
|
-
log.info(`Writing ${getTypeStrFromPath(change.path)} ${change.path}`);
|
|
1033
|
-
if (opts.stateful) {
|
|
1034
|
-
await dntShim.Deno.copyFile(target, stateTarget);
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
|
-
else if (change.name === "deleted") {
|
|
1038
|
-
try {
|
|
1039
|
-
log.info(`Deleting ${getTypeStrFromPath(change.path)} ${change.path}`);
|
|
1040
|
-
await dntShim.Deno.remove(target);
|
|
1041
|
-
if (opts.stateful) {
|
|
1042
|
-
await dntShim.Deno.remove(stateTarget);
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
catch {
|
|
1046
|
-
if (opts.stateful) {
|
|
1047
|
-
await dntShim.Deno.remove(stateTarget);
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
}
|
|
1052
|
-
if (opts.failConflicts) {
|
|
1053
|
-
if (conflicts.length > 0) {
|
|
1054
|
-
console.error(colors.red(`Conflicts were found`));
|
|
1055
|
-
log.info("Conflicts:");
|
|
1056
|
-
for (const conflict of conflicts) {
|
|
1057
|
-
showConflict(conflict.path, conflict.local, conflict.change.after);
|
|
1058
|
-
}
|
|
1059
|
-
log.info(colors.red(`Please resolve these conflicts manually by either:
|
|
1060
|
-
- reverting the content back to its remote (\`wmill pull\` and refuse to preserve local when prompted)
|
|
1061
|
-
- pushing the changes with \`wmill push --skip-pull\` to override wmill with all your local changes
|
|
1062
|
-
`));
|
|
1063
|
-
dntShim.Deno.exit(1);
|
|
1064
|
-
}
|
|
1065
|
-
}
|
|
1066
|
-
log.info("All local changes pulled, now updating wmill-lock.yaml");
|
|
1067
|
-
await readLockfile(); // ensure wmill-lock.yaml exists
|
|
1068
|
-
const globalDeps = await findGlobalDeps();
|
|
1069
|
-
const tracker = await buildTracker(changes);
|
|
1070
|
-
for (const change of tracker.scripts) {
|
|
1071
|
-
await generateScriptMetadataInternal(change, workspace, opts, false, true, globalDeps, codebases, true);
|
|
1072
|
-
}
|
|
1073
|
-
for (const change of tracker.flows) {
|
|
1074
|
-
log.info(`Updating lock for flow ${change}`);
|
|
1075
|
-
await generateFlowLockInternal(change, false, workspace, opts, true);
|
|
1076
|
-
}
|
|
1077
|
-
if (tracker.apps.length > 0) {
|
|
1078
|
-
log.info(`Apps ${tracker.apps.join(", ")} scripts were changed but ignoring for now`);
|
|
1079
|
-
}
|
|
1080
|
-
if (opts.jsonOutput) {
|
|
1081
|
-
const result = {
|
|
1082
|
-
success: true,
|
|
1083
|
-
message: `All ${changes.length} changes applied locally and wmill-lock.yaml updated`,
|
|
1084
|
-
changes: changes.map((change) => ({
|
|
1085
|
-
type: change.name,
|
|
1086
|
-
path: change.path,
|
|
1087
|
-
...(change.name === "edited" && change.codebase
|
|
1088
|
-
? { codebase_changed: true }
|
|
1089
|
-
: {}),
|
|
1090
|
-
})),
|
|
1091
|
-
total: changes.length,
|
|
1092
|
-
};
|
|
1093
|
-
console.log(JSON.stringify(result, null, 2));
|
|
1094
|
-
}
|
|
1095
|
-
else {
|
|
1096
|
-
log.info(colors.bold.green.underline(`\nDone! All ${changes.length} changes applied locally and wmill-lock.yaml updated.`));
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
else if (opts.jsonOutput) {
|
|
1100
|
-
console.log(JSON.stringify({ success: true, message: "No changes to apply", total: 0 }, null, 2));
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
|
-
function prettyChanges(changes) {
|
|
1104
|
-
for (const change of changes) {
|
|
1105
|
-
if (change.name === "added") {
|
|
1106
|
-
log.info(colors.green(`+ ${getTypeStrFromPath(change.path)} ` + change.path));
|
|
1107
|
-
}
|
|
1108
|
-
else if (change.name === "deleted") {
|
|
1109
|
-
log.info(colors.red(`- ${getTypeStrFromPath(change.path)} ` + change.path));
|
|
1110
|
-
}
|
|
1111
|
-
else if (change.name === "edited") {
|
|
1112
|
-
log.info(colors.yellow(`~ ${getTypeStrFromPath(change.path)} ` +
|
|
1113
|
-
change.path +
|
|
1114
|
-
(change.codebase ? ` (codebase changed)` : "")));
|
|
1115
|
-
if (change.before != change.after) {
|
|
1116
|
-
showDiff(change.before, change.after);
|
|
1117
|
-
}
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1121
|
-
// function prettyDiff(diffs: Difference[]) {
|
|
1122
|
-
// for (const diff of diffs) {
|
|
1123
|
-
// let pathString = "";
|
|
1124
|
-
// for (const pathSegment of diff.path) {
|
|
1125
|
-
// if (typeof pathSegment === "string") {
|
|
1126
|
-
// pathString += ".";
|
|
1127
|
-
// pathString += pathSegment;
|
|
1128
|
-
// } else {
|
|
1129
|
-
// pathString += "[";
|
|
1130
|
-
// pathString += pathSegment;
|
|
1131
|
-
// pathString += "]";
|
|
1132
|
-
// }
|
|
1133
|
-
// }
|
|
1134
|
-
// if (diff.type === "REMOVE" || diff.type === "CHANGE") {
|
|
1135
|
-
// log.info(colors.red("- " + pathString + " = " + diff.oldValue));
|
|
1136
|
-
// }
|
|
1137
|
-
// if (diff.type === "CREATE" || diff.type === "CHANGE") {
|
|
1138
|
-
// log.info(colors.green("+ " + pathString + " = " + diff.value));
|
|
1139
|
-
// }
|
|
1140
|
-
// }
|
|
1141
|
-
// }
|
|
1142
|
-
function removeSuffix(str, suffix) {
|
|
1143
|
-
return str.slice(0, str.length - suffix.length);
|
|
1144
|
-
}
|
|
1145
|
-
export async function push(opts) {
|
|
1146
|
-
const workspace = await resolveWorkspace(opts);
|
|
1147
|
-
await requireLogin(opts);
|
|
1148
|
-
// Resolve effective sync options with repository awareness
|
|
1149
|
-
const effectiveOpts = await resolveEffectiveSyncOptions(workspace, opts.repository);
|
|
1150
|
-
// Merge CLI flags with resolved settings (CLI flags take precedence only for explicit overrides)
|
|
1151
|
-
opts = mergeCliWithEffectiveOptions(opts, effectiveOpts);
|
|
1152
|
-
const codebases = await listSyncCodebases(opts);
|
|
1153
|
-
if (opts.raw) {
|
|
1154
|
-
log.info("--raw is now the default, you can remove it as a flag");
|
|
1155
|
-
}
|
|
1156
|
-
if (opts.stateful) {
|
|
1157
|
-
if (!opts.skipPull) {
|
|
1158
|
-
log.info(colors.gray("You need to be up-to-date before pushing, pulling first."));
|
|
1159
|
-
await pull(opts);
|
|
1160
|
-
log.info(colors.green("Pull done, now pushing."));
|
|
1161
|
-
log.info("\n");
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
|
-
log.info(colors.gray("Computing the files to update on the remote to match local (taking wmill.yaml includes/excludes into account)"));
|
|
1165
|
-
let resourceTypeToFormatExtension = {};
|
|
1166
|
-
try {
|
|
1167
|
-
resourceTypeToFormatExtension = (await wmill.fileResourceTypeToFileExtMap({
|
|
1168
|
-
workspace: workspace.workspaceId,
|
|
1169
|
-
}));
|
|
1170
|
-
}
|
|
1171
|
-
catch {
|
|
1172
|
-
// ignore
|
|
1173
|
-
}
|
|
1174
|
-
const remote = ZipFSElement((await downloadZip(workspace, opts.plainSecrets, opts.skipVariables, opts.skipResources, opts.skipResourceTypes, opts.skipSecrets, opts.includeSchedules, opts.includeTriggers, opts.includeUsers, opts.includeGroups, opts.includeSettings, opts.includeKey, opts.defaultTs)), !opts.json, opts.defaultTs ?? "bun", resourceTypeToFormatExtension, false);
|
|
1175
|
-
const local = await FSFSElement(path.join(dntShim.Deno.cwd(), ""), codebases, false);
|
|
1176
|
-
const changes = await compareDynFSElement(local, remote, await ignoreF(opts), opts.json ?? false, opts, true, codebases, false);
|
|
1177
|
-
const globalDeps = await findGlobalDeps();
|
|
1178
|
-
const tracker = await buildTracker(changes);
|
|
1179
|
-
const staleScripts = [];
|
|
1180
|
-
const staleFlows = [];
|
|
1181
|
-
for (const change of tracker.scripts) {
|
|
1182
|
-
const stale = await generateScriptMetadataInternal(change, workspace, opts, true, true, globalDeps, codebases, false);
|
|
1183
|
-
if (stale) {
|
|
1184
|
-
staleScripts.push(stale);
|
|
1185
|
-
}
|
|
1186
|
-
}
|
|
1187
|
-
if (staleScripts.length > 0) {
|
|
1188
|
-
log.info("");
|
|
1189
|
-
log.warn("Stale scripts metadata found, you may want to update them using 'wmill script generate-metadata' before pushing:");
|
|
1190
|
-
for (const stale of staleScripts) {
|
|
1191
|
-
log.warn(stale);
|
|
1192
|
-
}
|
|
1193
|
-
log.info("");
|
|
1194
|
-
}
|
|
1195
|
-
for (const change of tracker.flows) {
|
|
1196
|
-
const stale = await generateFlowLockInternal(change, true, workspace, opts, false, true);
|
|
1197
|
-
if (stale) {
|
|
1198
|
-
staleFlows.push(stale);
|
|
1199
|
-
}
|
|
1200
|
-
}
|
|
1201
|
-
if (staleFlows.length > 0) {
|
|
1202
|
-
log.warn("Stale flows locks found, you may want to update them using 'wmill flow generate-locks' before pushing:");
|
|
1203
|
-
for (const stale of staleFlows) {
|
|
1204
|
-
log.warn(stale);
|
|
1205
|
-
}
|
|
1206
|
-
log.info("");
|
|
1207
|
-
}
|
|
1208
|
-
const version = await fetchVersion(workspace.remote);
|
|
1209
|
-
log.info(colors.gray("Remote version: " + version));
|
|
1210
|
-
log.info(`remote (${workspace.name}) <- local: ${changes.length} changes to apply`);
|
|
1211
|
-
// Handle JSON output for dry-run
|
|
1212
|
-
if (opts.dryRun && opts.jsonOutput) {
|
|
1213
|
-
const result = {
|
|
1214
|
-
success: true,
|
|
1215
|
-
changes: changes.map((change) => ({
|
|
1216
|
-
type: change.name,
|
|
1217
|
-
path: change.path,
|
|
1218
|
-
...(change.name === "edited" && change.codebase
|
|
1219
|
-
? { codebase_changed: true }
|
|
1220
|
-
: {}),
|
|
1221
|
-
})),
|
|
1222
|
-
total: changes.length,
|
|
1223
|
-
};
|
|
1224
|
-
console.log(JSON.stringify(result, null, 2));
|
|
1225
|
-
return;
|
|
1226
|
-
}
|
|
1227
|
-
if (changes.length > 0) {
|
|
1228
|
-
if (!opts.jsonOutput) {
|
|
1229
|
-
prettyChanges(changes);
|
|
1230
|
-
}
|
|
1231
|
-
if (opts.dryRun) {
|
|
1232
|
-
log.info(colors.gray(`Dry run complete.`));
|
|
1233
|
-
return;
|
|
1234
|
-
}
|
|
1235
|
-
if (!opts.yes &&
|
|
1236
|
-
!(await Confirm.prompt({
|
|
1237
|
-
message: `Do you want to apply these ${changes.length} changes to the remote?`,
|
|
1238
|
-
default: true,
|
|
1239
|
-
}))) {
|
|
1240
|
-
return;
|
|
1241
|
-
}
|
|
1242
|
-
const start = performance.now();
|
|
1243
|
-
log.info(colors.gray(`Applying changes to files ...`));
|
|
1244
|
-
let stateful = opts.stateful;
|
|
1245
|
-
if (stateful) {
|
|
1246
|
-
try {
|
|
1247
|
-
await dntShim.Deno.stat(path.join(dntShim.Deno.cwd(), ".wmill"));
|
|
1248
|
-
}
|
|
1249
|
-
catch {
|
|
1250
|
-
stateful = false;
|
|
1251
|
-
}
|
|
1252
|
-
}
|
|
1253
|
-
// Group changes by base path (before first dot)
|
|
1254
|
-
const groupedChanges = new Map();
|
|
1255
|
-
for (const change of changes) {
|
|
1256
|
-
const basePath = change.path.split(".")[0];
|
|
1257
|
-
if (!groupedChanges.has(basePath)) {
|
|
1258
|
-
groupedChanges.set(basePath, []);
|
|
1259
|
-
}
|
|
1260
|
-
groupedChanges.get(basePath).push(change);
|
|
1261
|
-
}
|
|
1262
|
-
let parallelizationFactor = opts.parallel ?? 1;
|
|
1263
|
-
if (parallelizationFactor <= 0) {
|
|
1264
|
-
parallelizationFactor = 1;
|
|
1265
|
-
}
|
|
1266
|
-
const groupedChangesArray = Array.from(groupedChanges.entries());
|
|
1267
|
-
log.info(`found changes for ${groupedChangesArray.length} items with a total of ${groupedChangesArray.reduce((acc, [_, changes]) => acc + changes.length, 0)} files to process`);
|
|
1268
|
-
if (parallelizationFactor > 1) {
|
|
1269
|
-
log.info(`Parallelizing ${parallelizationFactor} changes at a time`);
|
|
1270
|
-
}
|
|
1271
|
-
// Create a pool of workers that processes items as they become available
|
|
1272
|
-
const pool = new Set();
|
|
1273
|
-
const queue = [...groupedChangesArray];
|
|
1274
|
-
while (queue.length > 0 || pool.size > 0) {
|
|
1275
|
-
// Fill the pool until we reach parallelizationFactor
|
|
1276
|
-
while (pool.size < parallelizationFactor && queue.length > 0) {
|
|
1277
|
-
const [_basePath, changes] = queue.shift();
|
|
1278
|
-
const promise = (async () => {
|
|
1279
|
-
const alreadySynced = [];
|
|
1280
|
-
for await (const change of changes) {
|
|
1281
|
-
let stateTarget = undefined;
|
|
1282
|
-
if (stateful) {
|
|
1283
|
-
try {
|
|
1284
|
-
stateTarget = path.join(dntShim.Deno.cwd(), ".wmill", change.path);
|
|
1285
|
-
await dntShim.Deno.stat(stateTarget);
|
|
1286
|
-
}
|
|
1287
|
-
catch {
|
|
1288
|
-
stateTarget = undefined;
|
|
1289
|
-
}
|
|
1290
|
-
}
|
|
1291
|
-
if (change.name === "edited") {
|
|
1292
|
-
if (await handleScriptMetadata(change.path, workspace, alreadySynced, opts.message, globalDeps, codebases, opts)) {
|
|
1293
|
-
if (stateTarget) {
|
|
1294
|
-
await dntShim.Deno.writeTextFile(stateTarget, change.after);
|
|
1295
|
-
}
|
|
1296
|
-
continue;
|
|
1297
|
-
}
|
|
1298
|
-
else if (await handleFile(change.path, workspace, alreadySynced, opts.message, opts, globalDeps, codebases)) {
|
|
1299
|
-
if (stateTarget) {
|
|
1300
|
-
await dntShim.Deno.writeTextFile(stateTarget, change.after);
|
|
1301
|
-
}
|
|
1302
|
-
continue;
|
|
1303
|
-
}
|
|
1304
|
-
if (stateTarget) {
|
|
1305
|
-
await ensureDir(path.dirname(stateTarget));
|
|
1306
|
-
log.info(`Editing ${getTypeStrFromPath(change.path)} ${change.path}`);
|
|
1307
|
-
}
|
|
1308
|
-
if (isFileResource(change.path)) {
|
|
1309
|
-
const resourceFilePath = await findResourceFile(change.path);
|
|
1310
|
-
if (!alreadySynced.includes(resourceFilePath)) {
|
|
1311
|
-
alreadySynced.push(resourceFilePath);
|
|
1312
|
-
const newObj = parseFromPath(resourceFilePath, await dntShim.Deno.readTextFile(resourceFilePath));
|
|
1313
|
-
await pushResource(workspace.workspaceId, resourceFilePath, undefined, newObj);
|
|
1314
|
-
if (stateTarget) {
|
|
1315
|
-
await dntShim.Deno.writeTextFile(stateTarget, change.after);
|
|
1316
|
-
}
|
|
1317
|
-
continue;
|
|
1318
|
-
}
|
|
1319
|
-
}
|
|
1320
|
-
const oldObj = parseFromPath(change.path, change.before);
|
|
1321
|
-
const newObj = parseFromPath(change.path, change.after);
|
|
1322
|
-
await pushObj(workspace.workspaceId, change.path, oldObj, newObj, opts.plainSecrets ?? false, alreadySynced, opts.message);
|
|
1323
|
-
if (stateTarget) {
|
|
1324
|
-
await dntShim.Deno.writeTextFile(stateTarget, change.after);
|
|
1325
|
-
}
|
|
1326
|
-
}
|
|
1327
|
-
else if (change.name === "added") {
|
|
1328
|
-
if (change.path.endsWith(".script.json") ||
|
|
1329
|
-
change.path.endsWith(".script.yaml") ||
|
|
1330
|
-
change.path.endsWith(".lock") ||
|
|
1331
|
-
isFileResource(change.path)) {
|
|
1332
|
-
continue;
|
|
1333
|
-
}
|
|
1334
|
-
else if (await handleFile(change.path, workspace, alreadySynced, opts.message, opts, globalDeps, codebases)) {
|
|
1335
|
-
continue;
|
|
1336
|
-
}
|
|
1337
|
-
if (stateTarget) {
|
|
1338
|
-
await ensureDir(path.dirname(stateTarget));
|
|
1339
|
-
log.info(`Adding ${getTypeStrFromPath(change.path)} ${change.path}`);
|
|
1340
|
-
}
|
|
1341
|
-
const obj = parseFromPath(change.path, change.content);
|
|
1342
|
-
await pushObj(workspace.workspaceId, change.path, undefined, obj, opts.plainSecrets ?? false, [], opts.message);
|
|
1343
|
-
if (stateTarget) {
|
|
1344
|
-
await dntShim.Deno.writeTextFile(stateTarget, change.content);
|
|
1345
|
-
}
|
|
1346
|
-
}
|
|
1347
|
-
else if (change.name === "deleted") {
|
|
1348
|
-
if (change.path.endsWith(".lock")) {
|
|
1349
|
-
continue;
|
|
1350
|
-
}
|
|
1351
|
-
const typ = getTypeStrFromPath(change.path);
|
|
1352
|
-
if (typ == "script") {
|
|
1353
|
-
log.info(`Archiving ${typ} ${change.path}`);
|
|
1354
|
-
}
|
|
1355
|
-
else {
|
|
1356
|
-
log.info(`Deleting ${typ} ${change.path}`);
|
|
1357
|
-
}
|
|
1358
|
-
const workspaceId = workspace.workspaceId;
|
|
1359
|
-
const target = change.path.replaceAll(SEP, "/");
|
|
1360
|
-
switch (typ) {
|
|
1361
|
-
case "script": {
|
|
1362
|
-
const script = await wmill.getScriptByPath({
|
|
1363
|
-
workspace: workspaceId,
|
|
1364
|
-
path: removeExtensionToPath(target),
|
|
1365
|
-
});
|
|
1366
|
-
await wmill.archiveScriptByHash({
|
|
1367
|
-
workspace: workspaceId,
|
|
1368
|
-
hash: script.hash,
|
|
1369
|
-
});
|
|
1370
|
-
break;
|
|
1371
|
-
}
|
|
1372
|
-
case "folder":
|
|
1373
|
-
await wmill.deleteFolder({
|
|
1374
|
-
workspace: workspaceId,
|
|
1375
|
-
name: change.path.split(SEP)[1],
|
|
1376
|
-
});
|
|
1377
|
-
break;
|
|
1378
|
-
case "resource":
|
|
1379
|
-
await wmill.deleteResource({
|
|
1380
|
-
workspace: workspaceId,
|
|
1381
|
-
path: removeSuffix(target, ".resource.json"),
|
|
1382
|
-
});
|
|
1383
|
-
break;
|
|
1384
|
-
case "resource-type":
|
|
1385
|
-
await wmill.deleteResourceType({
|
|
1386
|
-
workspace: workspaceId,
|
|
1387
|
-
path: removeSuffix(target, ".resource-type.json"),
|
|
1388
|
-
});
|
|
1389
|
-
break;
|
|
1390
|
-
case "flow":
|
|
1391
|
-
await wmill.deleteFlowByPath({
|
|
1392
|
-
workspace: workspaceId,
|
|
1393
|
-
path: removeSuffix(target, ".flow/flow.json"),
|
|
1394
|
-
});
|
|
1395
|
-
break;
|
|
1396
|
-
case "app":
|
|
1397
|
-
await wmill.deleteApp({
|
|
1398
|
-
workspace: workspaceId,
|
|
1399
|
-
path: removeSuffix(target, ".app/app.json"),
|
|
1400
|
-
});
|
|
1401
|
-
break;
|
|
1402
|
-
case "schedule":
|
|
1403
|
-
await wmill.deleteSchedule({
|
|
1404
|
-
workspace: workspaceId,
|
|
1405
|
-
path: removeSuffix(target, ".schedule.json"),
|
|
1406
|
-
});
|
|
1407
|
-
break;
|
|
1408
|
-
case "http_trigger":
|
|
1409
|
-
await wmill.deleteHttpTrigger({
|
|
1410
|
-
workspace: workspaceId,
|
|
1411
|
-
path: removeSuffix(target, ".http_trigger.json"),
|
|
1412
|
-
});
|
|
1413
|
-
break;
|
|
1414
|
-
case "websocket_trigger":
|
|
1415
|
-
await wmill.deleteWebsocketTrigger({
|
|
1416
|
-
workspace: workspaceId,
|
|
1417
|
-
path: removeSuffix(target, ".websocket_trigger.json"),
|
|
1418
|
-
});
|
|
1419
|
-
break;
|
|
1420
|
-
case "kafka_trigger":
|
|
1421
|
-
await wmill.deleteKafkaTrigger({
|
|
1422
|
-
workspace: workspaceId,
|
|
1423
|
-
path: removeSuffix(target, ".kafka_trigger.json"),
|
|
1424
|
-
});
|
|
1425
|
-
break;
|
|
1426
|
-
case "nats_trigger":
|
|
1427
|
-
await wmill.deleteNatsTrigger({
|
|
1428
|
-
workspace: workspaceId,
|
|
1429
|
-
path: removeSuffix(target, ".nats_trigger.json"),
|
|
1430
|
-
});
|
|
1431
|
-
break;
|
|
1432
|
-
case "postgres_trigger":
|
|
1433
|
-
await wmill.deletePostgresTrigger({
|
|
1434
|
-
workspace: workspaceId,
|
|
1435
|
-
path: removeSuffix(target, ".postgres_trigger.json"),
|
|
1436
|
-
});
|
|
1437
|
-
break;
|
|
1438
|
-
case "mqtt_trigger":
|
|
1439
|
-
await wmill.deleteMqttTrigger({
|
|
1440
|
-
workspace: workspaceId,
|
|
1441
|
-
path: removeSuffix(target, ".mqtt_trigger.json"),
|
|
1442
|
-
});
|
|
1443
|
-
break;
|
|
1444
|
-
case "sqs_trigger":
|
|
1445
|
-
await wmill.deleteSqsTrigger({
|
|
1446
|
-
workspace: workspaceId,
|
|
1447
|
-
path: removeSuffix(target, ".sqs_trigger.json"),
|
|
1448
|
-
});
|
|
1449
|
-
break;
|
|
1450
|
-
case "gcp_trigger":
|
|
1451
|
-
await wmill.deleteGcpTrigger({
|
|
1452
|
-
workspace: workspaceId,
|
|
1453
|
-
path: removeSuffix(target, ".gcp_trigger.json"),
|
|
1454
|
-
});
|
|
1455
|
-
break;
|
|
1456
|
-
case "variable":
|
|
1457
|
-
await wmill.deleteVariable({
|
|
1458
|
-
workspace: workspaceId,
|
|
1459
|
-
path: removeSuffix(target, ".variable.json"),
|
|
1460
|
-
});
|
|
1461
|
-
break;
|
|
1462
|
-
case "user": {
|
|
1463
|
-
const users = await wmill.listUsers({
|
|
1464
|
-
workspace: workspaceId,
|
|
1465
|
-
});
|
|
1466
|
-
const email = removeSuffix(removePathPrefix(change.path, "users"), ".user.json");
|
|
1467
|
-
const user = users.find((u) => u.email === email);
|
|
1468
|
-
if (!user) {
|
|
1469
|
-
throw new Error(`User ${email} not found`);
|
|
1470
|
-
}
|
|
1471
|
-
await wmill.deleteUser({
|
|
1472
|
-
workspace: workspaceId,
|
|
1473
|
-
username: user.username,
|
|
1474
|
-
});
|
|
1475
|
-
break;
|
|
1476
|
-
}
|
|
1477
|
-
case "group":
|
|
1478
|
-
await wmill.deleteGroup({
|
|
1479
|
-
workspace: workspaceId,
|
|
1480
|
-
name: removeSuffix(removePathPrefix(change.path, "groups"), ".group.json"),
|
|
1481
|
-
});
|
|
1482
|
-
break;
|
|
1483
|
-
default:
|
|
1484
|
-
break;
|
|
1485
|
-
}
|
|
1486
|
-
if (stateTarget) {
|
|
1487
|
-
try {
|
|
1488
|
-
await dntShim.Deno.remove(stateTarget);
|
|
1489
|
-
}
|
|
1490
|
-
catch {
|
|
1491
|
-
// state target may not exist already
|
|
1492
|
-
}
|
|
1493
|
-
}
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
})();
|
|
1497
|
-
pool.add(promise);
|
|
1498
|
-
// Remove from pool when complete
|
|
1499
|
-
promise.then(() => pool.delete(promise));
|
|
1500
|
-
}
|
|
1501
|
-
// Wait for at least one task to complete before continuing
|
|
1502
|
-
if (pool.size > 0) {
|
|
1503
|
-
await Promise.race(pool);
|
|
1504
|
-
}
|
|
1505
|
-
}
|
|
1506
|
-
if (opts.jsonOutput) {
|
|
1507
|
-
const result = {
|
|
1508
|
-
success: true,
|
|
1509
|
-
message: `All ${changes.length} changes pushed to the remote workspace ${workspace.workspaceId} named ${workspace.name}`,
|
|
1510
|
-
changes: changes.map((change) => ({
|
|
1511
|
-
type: change.name,
|
|
1512
|
-
path: change.path,
|
|
1513
|
-
...(change.name === "edited" && change.codebase
|
|
1514
|
-
? { codebase_changed: true }
|
|
1515
|
-
: {}),
|
|
1516
|
-
})),
|
|
1517
|
-
total: changes.length,
|
|
1518
|
-
duration_ms: Math.round(performance.now() - start),
|
|
1519
|
-
};
|
|
1520
|
-
console.log(JSON.stringify(result, null, 2));
|
|
1521
|
-
}
|
|
1522
|
-
else {
|
|
1523
|
-
log.info(colors.bold.green.underline(`\nDone! All ${changes.length} changes pushed to the remote workspace ${workspace.workspaceId} named ${workspace.name} (${(performance.now() - start).toFixed(0)}ms)`));
|
|
1524
|
-
}
|
|
1525
|
-
}
|
|
1526
|
-
else if (opts.jsonOutput) {
|
|
1527
|
-
console.log(JSON.stringify({ success: true, message: "No changes to push", total: 0 }, null, 2));
|
|
1528
|
-
}
|
|
1529
|
-
}
|
|
1530
|
-
const command = new Command()
|
|
1531
|
-
.description("sync local with a remote workspaces or the opposite (push or pull)")
|
|
1532
|
-
.action(() => log.info("2 actions available, pull and push. Use -h to display help."))
|
|
1533
|
-
.command("pull")
|
|
1534
|
-
.description("Pull any remote changes and apply them locally.")
|
|
1535
|
-
.option("--yes", "Pull without needing confirmation")
|
|
1536
|
-
.option("--dry-run", "Show changes that would be pulled without actually pushing")
|
|
1537
|
-
.option("--plain-secrets", "Pull secrets as plain text")
|
|
1538
|
-
.option("--json", "Use JSON instead of YAML")
|
|
1539
|
-
.option("--skip-variables", "Skip syncing variables (including secrets)")
|
|
1540
|
-
.option("--skip-secrets", "Skip syncing only secrets variables")
|
|
1541
|
-
.option("--skip-resources", "Skip syncing resources")
|
|
1542
|
-
.option("--skip-resource-types", "Skip syncing resource types")
|
|
1543
|
-
.option("--skip-scripts", "Skip syncing scripts")
|
|
1544
|
-
.option("--skip-flows", "Skip syncing flows")
|
|
1545
|
-
.option("--skip-apps", "Skip syncing apps")
|
|
1546
|
-
.option("--skip-folders", "Skip syncing folders")
|
|
1547
|
-
// .option("--skip-scripts-metadata", "Skip syncing scripts metadata, focus solely on logic")
|
|
1548
|
-
.option("--include-schedules", "Include syncing schedules")
|
|
1549
|
-
.option("--include-triggers", "Include syncing triggers")
|
|
1550
|
-
.option("--include-users", "Include syncing users")
|
|
1551
|
-
.option("--include-groups", "Include syncing groups")
|
|
1552
|
-
.option("--include-settings", "Include syncing workspace settings")
|
|
1553
|
-
.option("--include-key", "Include workspace encryption key")
|
|
1554
|
-
.option("--json-output", "Output results in JSON format")
|
|
1555
|
-
.option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Overrides wmill.yaml includes")
|
|
1556
|
-
.option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which file to NOT take into account. Overrides wmill.yaml excludes")
|
|
1557
|
-
.option("--extra-includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Useful to still take wmill.yaml into account and act as a second pattern to satisfy")
|
|
1558
|
-
.option("--repository <repo:string>", "Specify repository path (e.g., u/user/repo) when multiple repositories exist")
|
|
1559
|
-
// deno-lint-ignore no-explicit-any
|
|
1560
|
-
.action(pull)
|
|
1561
|
-
.command("push")
|
|
1562
|
-
.description("Push any local changes and apply them remotely.")
|
|
1563
|
-
.option("--yes", "Push without needing confirmation")
|
|
1564
|
-
.option("--dry-run", "Show changes that would be pushed without actually pushing")
|
|
1565
|
-
.option("--plain-secrets", "Push secrets as plain text")
|
|
1566
|
-
.option("--json", "Use JSON instead of YAML")
|
|
1567
|
-
.option("--skip-variables", "Skip syncing variables (including secrets)")
|
|
1568
|
-
.option("--skip-secrets", "Skip syncing only secrets variables")
|
|
1569
|
-
.option("--skip-resources", "Skip syncing resources")
|
|
1570
|
-
.option("--skip-resource-types", "Skip syncing resource types")
|
|
1571
|
-
.option("--skip-scripts", "Skip syncing scripts")
|
|
1572
|
-
.option("--skip-flows", "Skip syncing flows")
|
|
1573
|
-
.option("--skip-apps", "Skip syncing apps")
|
|
1574
|
-
.option("--skip-folders", "Skip syncing folders")
|
|
1575
|
-
// .option("--skip-scripts-metadata", "Skip syncing scripts metadata, focus solely on logic")
|
|
1576
|
-
.option("--include-schedules", "Include syncing schedules")
|
|
1577
|
-
.option("--include-triggers", "Include syncing triggers")
|
|
1578
|
-
.option("--include-users", "Include syncing users")
|
|
1579
|
-
.option("--include-groups", "Include syncing groups")
|
|
1580
|
-
.option("--include-settings", "Include syncing workspace settings")
|
|
1581
|
-
.option("--include-key", "Include workspace encryption key")
|
|
1582
|
-
.option("--json-output", "Output results in JSON format")
|
|
1583
|
-
.option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string)")
|
|
1584
|
-
.option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which file to NOT take into account.")
|
|
1585
|
-
.option("--extra-includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Useful to still take wmill.yaml into account and act as a second pattern to satisfy")
|
|
1586
|
-
.option("--message <message:string>", "Include a message that will be added to all scripts/flows/apps updated during this push")
|
|
1587
|
-
.option("--parallel <number>", "Number of changes to process in parallel")
|
|
1588
|
-
.option("--repository <repo:string>", "Specify repository path (e.g., u/user/repo) when multiple repositories exist")
|
|
1589
|
-
// deno-lint-ignore no-explicit-any
|
|
1590
|
-
.action(push);
|
|
1591
|
-
const INLINE_SCRIPT = "inline_script";
|
|
1592
|
-
export function newPathAssigner(defaultTs) {
|
|
1593
|
-
let counter = 0;
|
|
1594
|
-
const seen_names = new Set();
|
|
1595
|
-
function assignPath(summary, language) {
|
|
1596
|
-
let name;
|
|
1597
|
-
name = summary?.toLowerCase()?.replaceAll(" ", "_") ?? "";
|
|
1598
|
-
let original_name = name;
|
|
1599
|
-
if (name == "") {
|
|
1600
|
-
original_name = INLINE_SCRIPT;
|
|
1601
|
-
name = `${INLINE_SCRIPT}_0`;
|
|
1602
|
-
}
|
|
1603
|
-
while (seen_names.has(name)) {
|
|
1604
|
-
counter++;
|
|
1605
|
-
name = `${original_name}_${counter}`;
|
|
1606
|
-
}
|
|
1607
|
-
seen_names.add(name);
|
|
1608
|
-
let ext;
|
|
1609
|
-
if (language == "python3")
|
|
1610
|
-
ext = "py";
|
|
1611
|
-
else if (language == defaultTs || language == "bunnative")
|
|
1612
|
-
ext = "ts";
|
|
1613
|
-
else if (language == "bun")
|
|
1614
|
-
ext = "bun.ts";
|
|
1615
|
-
else if (language == "deno")
|
|
1616
|
-
ext = "deno.ts";
|
|
1617
|
-
else if (language == "go")
|
|
1618
|
-
ext = "go";
|
|
1619
|
-
else if (language == "bash")
|
|
1620
|
-
ext = "sh";
|
|
1621
|
-
else if (language == "powershell")
|
|
1622
|
-
ext = "ps1";
|
|
1623
|
-
else if (language == "postgresql")
|
|
1624
|
-
ext = "pg.sql";
|
|
1625
|
-
else if (language == "mysql")
|
|
1626
|
-
ext = "my.sql";
|
|
1627
|
-
else if (language == "bigquery")
|
|
1628
|
-
ext = "bq.sql";
|
|
1629
|
-
else if (language == "oracledb")
|
|
1630
|
-
ext = "odb.sql";
|
|
1631
|
-
else if (language == "snowflake")
|
|
1632
|
-
ext = "sf.sql";
|
|
1633
|
-
else if (language == "mssql")
|
|
1634
|
-
ext = "ms.sql";
|
|
1635
|
-
else if (language == "graphql")
|
|
1636
|
-
ext = "gql";
|
|
1637
|
-
else if (language == "nativets")
|
|
1638
|
-
ext = "native.ts";
|
|
1639
|
-
else if (language == "frontend")
|
|
1640
|
-
ext = "frontend.js";
|
|
1641
|
-
else if (language == "php")
|
|
1642
|
-
ext = "php";
|
|
1643
|
-
else if (language == "rust")
|
|
1644
|
-
ext = "rs";
|
|
1645
|
-
else if (language == "csharp")
|
|
1646
|
-
ext = "cs";
|
|
1647
|
-
else if (language == "nu")
|
|
1648
|
-
ext = "nu";
|
|
1649
|
-
else if (language == "ansible")
|
|
1650
|
-
ext = "playbook.yml";
|
|
1651
|
-
else if (language == "java")
|
|
1652
|
-
ext = "java";
|
|
1653
|
-
else if (language == "duckdb")
|
|
1654
|
-
ext = "duckdb.sql";
|
|
1655
|
-
// for related places search: ADD_NEW_LANG
|
|
1656
|
-
else
|
|
1657
|
-
ext = "no_ext";
|
|
1658
|
-
return [`${name}.inline_script.`, ext];
|
|
1659
|
-
}
|
|
1660
|
-
return { assignPath };
|
|
1661
|
-
}
|
|
1662
|
-
export default command;
|