@paradigma-inc/flywheel 0.1.53 → 0.1.72
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/README.md +149 -17
- package/package.json +4 -2
- package/skills/flywheel/SKILL.md +4 -3
- package/skills/flywheel/getting-started/flywheel-quickstart.md +4 -4
- package/skills/flywheel/references/flywheel-cli-tool-map.md +47 -35
- package/skills/flywheel/references/flywheel-mcp-tool-map.md +16 -5
- package/skills/flywheel/setting-up-flywheel/claude-code-cli-installation.md +3 -3
- package/skills/flywheel/setting-up-flywheel/codex-cli-installation.md +3 -3
- package/skills/flywheel/setting-up-flywheel/installation-overview.md +9 -8
- package/skills/flywheel/setting-up-flywheel/other-hosts-installation.md +1 -1
- package/skills/flywheel/setting-up-flywheel/updating-flywheel-mcp.md +4 -4
- package/skills/flywheel-auto/SKILL.md +4 -3
- package/skills/flywheel-auto/references/flywheel-cli-tool-map.md +37 -35
- package/skills/flywheel-auto/references/flywheel-mcp-tool-map.md +4 -4
- package/skills/flywheel-lookahead/SKILL.md +1 -1
- package/skills/flywheel-lookahead/references/flywheel-cli-tool-map.md +37 -35
- package/skills/flywheel-lookahead/references/flywheel-mcp-tool-map.md +4 -4
- package/skills/flywheel-prove/SKILL.md +1 -1
- package/skills/flywheel-reproduce/SKILL.md +4 -3
- package/skills/flywheel-reproduce/references/flywheel-cli-tool-map.md +37 -35
- package/skills/flywheel-reproduce/references/flywheel-mcp-tool-map.md +4 -4
- package/skills/flywheel-to-graph/SKILL.md +1 -1
- package/skills/flywheel-to-graph/references/flywheel-cli-tool-map.md +37 -35
- package/skills/flywheel-to-graph/references/flywheel-mcp-tool-map.md +4 -4
- package/skills/flywheel-tree/SKILL.md +1 -1
- package/src/agents.mjs +114 -48
- package/src/cli.mjs +373 -56
- package/src/mcp-writer.mjs +190 -17
- package/src/runtime/required-runtime-commands.json +19 -4
- package/src/runtime/vendor/flywheel-cli-dist/auth/login.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/login.js +3 -6
- package/src/runtime/vendor/flywheel-cli-dist/auth/login.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/auth/profiles.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/auth/profiles.js +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/auth/profiles.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/_admin-auth.d.ts +27 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_admin-auth.js +54 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_admin-auth.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_artifacts-upload-helpers.d.ts +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/_artifacts-upload-helpers.js +6 -5
- package/src/runtime/vendor/flywheel-cli-dist/commands/_artifacts-upload-helpers.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/_browser-handoff.d.ts +21 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_browser-handoff.js +51 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_browser-handoff.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_open-url.d.ts +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/_open-url.js +6 -3
- package/src/runtime/vendor/flywheel-cli-dist/commands/_open-url.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/_secret-param.d.ts +7 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_secret-param.js +18 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_secret-param.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_stream-file-out.d.ts +39 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_stream-file-out.js +72 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/_stream-file-out.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-detach.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-detach.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-add.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-add.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-remove.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-remove.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-set-primary.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-emails-set-primary.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-get.d.ts +2 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-get.js +6 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-get.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-preview.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-preview.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-proof.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge-proof.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/account-merge.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-compute-policy-get.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-compute-policy-get.js +11 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-compute-policy-get.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-compute-policy-set.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-compute-policy-set.js +60 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-compute-policy-set.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-export-stream.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-export-stream.js +115 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-export-stream.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-export.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-export.js +12 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-export.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-list.d.ts +4 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-list.js +39 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-graphs-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-nodes-audit-list.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-nodes-audit-list.js +15 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/admin-nodes-audit-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-list.d.ts +18 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-list.js +38 -5
- package/src/runtime/vendor/flywheel-cli-dist/commands/api-keys-list.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete.js +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/artifacts-delete.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-mode.d.ts +4 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-mode.js +42 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-mode.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-status.js +15 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/auth-status.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-list.js +8 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-list.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-request-approval.js +6 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-request-approval.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release-all.js +18 -7
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-release-all.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-billing-portal.js +8 -4
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-billing-portal.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-purchase.js +8 -4
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-purchase.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscribe.js +8 -4
- package/src/runtime/vendor/flywheel-cli-dist/commands/credits-subscribe.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/destructive-confirmation.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/destructive-confirmation.js +7 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/destructive-confirmation.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/enums.d.ts +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/enums.js +4 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/enums.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/env.d.ts +0 -4
- package/src/runtime/vendor/flywheel-cli-dist/commands/env.js +7 -12
- package/src/runtime/vendor/flywheel-cli-dist/commands/env.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-history.js +42 -30
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-history.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-subgraph.js +12 -4
- package/src/runtime/vendor/flywheel-cli-dist/commands/export-subgraph.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-link.js +9 -14
- package/src/runtime/vendor/flywheel-cli-dist/commands/github-link.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/help-format.d.ts +31 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/help-format.js +69 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/help-format.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/help.d.ts +6 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/help.js +226 -124
- package/src/runtime/vendor/flywheel-cli-dist/commands/help.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-create.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-create.js +25 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-create.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-delete.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-delete.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-delete.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-list.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-list.js +10 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-runs-list.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-runs-list.js +15 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-runs-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-create.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-create.js +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-create.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-delete.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-delete.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-delete.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-list.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-list.js +6 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-list.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-update.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-update.js +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-secrets-update.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-set-enabled.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-set-enabled.js +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-set-enabled.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-update.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-update.js +29 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/hooks-update.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/index.js +36 -6
- package/src/runtime/vendor/flywheel-cli-dist/commands/index.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-set.js +7 -3
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-huggingface-set.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-set.js +6 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/integrations-wandb-set.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-add-parent.js +6 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-add-parent.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete-bulk.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete-bulk.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete.js +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-delete.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-remove-parent.js +8 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-remove-parent.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-resolve-slug.js +55 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-resolve-slug.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-list.js +13 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-list.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-set.js +4 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-set.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-show.js +16 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/profile-show.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/account.js +8 -7
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/account.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/admin.d.ts +8 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/admin.js +131 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/admin.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/api-keys.js +8 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/api-keys.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/approval.js +29 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/approval.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/artifacts.js +13 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/artifacts.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/auth.js +2 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/auth.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/budgets.js +11 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/budgets.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/compute.js +2 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/compute.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/credits.js +8 -6
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/credits.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/env.js +7 -5
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/env.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/github.js +6 -14
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/github.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/hooks.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/hooks.js +312 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/hooks.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/integrations.js +22 -8
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/integrations.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/lifecycle.js +122 -25
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/lifecycle.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/profile.js +2 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/profile.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/resources.js +1 -31
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/resources.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/sharing.js +12 -4
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry/sharing.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry.d.ts +2 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry.js +46 -9
- package/src/runtime/vendor/flywheel-cli-dist/commands/registry.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/remote-artifacts-refresh.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/remote-artifacts-refresh.js +20 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/remote-artifacts-refresh.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/remote-artifacts-resolve.d.ts +2 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/remote-artifacts-resolve.js +23 -0
- package/src/runtime/vendor/flywheel-cli-dist/commands/remote-artifacts-resolve.js.map +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/errors.d.ts +15 -0
- package/src/runtime/vendor/flywheel-cli-dist/errors.js +16 -1
- package/src/runtime/vendor/flywheel-cli-dist/errors.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/http/client.d.ts +1 -0
- package/src/runtime/vendor/flywheel-cli-dist/http/client.js +75 -19
- package/src/runtime/vendor/flywheel-cli-dist/http/client.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/http/debug.d.ts +3 -0
- package/src/runtime/vendor/flywheel-cli-dist/http/debug.js +21 -2
- package/src/runtime/vendor/flywheel-cli-dist/http/debug.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/main.js +119 -10
- package/src/runtime/vendor/flywheel-cli-dist/main.js.map +1 -1
- package/src/runtime/vendor/flywheel-cli-dist/output/format.js +44 -6
- package/src/runtime/vendor/flywheel-cli-dist/output/format.js.map +1 -1
- package/src/runtime/vendor/manifest.json +82 -10
- package/src/setup/base-url.mjs +43 -0
- package/src/setup/command.mjs +2 -0
- package/src/setup/io/patchers/json.mjs +2 -0
- package/src/setup/io/patchers/toml.mjs +7 -1
- package/src/setup/io/patchers/yaml.mjs +2 -0
- package/src/setup/modes/cli.mjs +72 -24
- package/src/setup/modes/mcp-command.mjs +146 -38
- package/src/setup/modes/mcp.mjs +26 -1
- package/src/setup/resolved-selection-record.mjs +25 -0
- package/src/setup/shared/prior-mode-detect.mjs +133 -14
- package/src/setup-auth.mjs +3 -2
- package/src/skill-installer.mjs +179 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-get.d.ts +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-get.js +0 -6
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-get.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-set.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-set.js +0 -19
- package/src/runtime/vendor/flywheel-cli-dist/commands/compute-policy-set.js.map +0 -1
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-audit-list.d.ts +0 -2
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-audit-list.js +0 -7
- package/src/runtime/vendor/flywheel-cli-dist/commands/nodes-audit-list.js.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { adminAuthRequestOptions, requireAdminCredential } from './_admin-auth.js';
|
|
2
|
+
import { requiredString } from './utils.js';
|
|
3
|
+
export const adminGraphsExportCommand = async (context) => {
|
|
4
|
+
requireAdminCredential(context, 'admin:graphs:export');
|
|
5
|
+
const rootNodeId = requiredString(context.params, 'root-node-id');
|
|
6
|
+
const options = {
|
|
7
|
+
...adminAuthRequestOptions(context.apiKey),
|
|
8
|
+
};
|
|
9
|
+
const path = `/admin/graphs/${encodeURIComponent(rootNodeId)}/export`;
|
|
10
|
+
return context.requestJson('GET', path, options);
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=admin-graphs-export.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-graphs-export.js","sourceRoot":"","sources":["../../src/commands/admin-graphs-export.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAEnF,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,CAAC,MAAM,wBAAwB,GAAmB,KAAK,EAAE,OAAO,EAAE,EAAE;IACxE,sBAAsB,CAAC,OAAO,EAAE,qBAAqB,CAAC,CAAC;IACvD,MAAM,UAAU,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAClE,MAAM,OAAO,GAAmB;QAC9B,GAAG,uBAAuB,CAAC,OAAO,CAAC,MAAM,CAAC;KAC3C,CAAC;IACF,MAAM,IAAI,GAAG,iBAAiB,kBAAkB,CAAC,UAAU,CAAC,SAAS,CAAC;IACtE,OAAO,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AACnD,CAAC,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { adminAuthRequestOptions, requireAdminCredential } from './_admin-auth.js';
|
|
2
|
+
import { optionalInt, optionalString } from './utils.js';
|
|
3
|
+
// ``adminAuthRequestOptions`` now lives in ``./_admin-auth.ts`` so it
|
|
4
|
+
// can be shared by every admin CLI command (graphs + node-scoped
|
|
5
|
+
// compute-policy / audit) without cross-file coupling. Re-exporting
|
|
6
|
+
// here keeps already-landed imports working without forcing a churn
|
|
7
|
+
// pass.
|
|
8
|
+
export { adminAuthRequestOptions };
|
|
9
|
+
export const adminGraphsListCommand = async (context) => {
|
|
10
|
+
requireAdminCredential(context, 'admin:graphs:list');
|
|
11
|
+
const query = {};
|
|
12
|
+
const tagId = optionalString(context.params, 'tag-id');
|
|
13
|
+
if (tagId !== undefined)
|
|
14
|
+
query['tag_id'] = tagId;
|
|
15
|
+
const kind = optionalString(context.params, 'kind');
|
|
16
|
+
if (kind !== undefined)
|
|
17
|
+
query['kind'] = kind;
|
|
18
|
+
const ownerUserId = optionalString(context.params, 'owner-user-id');
|
|
19
|
+
if (ownerUserId !== undefined)
|
|
20
|
+
query['owner_user_id'] = ownerUserId;
|
|
21
|
+
const createdAfter = optionalString(context.params, 'created-after');
|
|
22
|
+
if (createdAfter !== undefined)
|
|
23
|
+
query['created_after'] = createdAfter;
|
|
24
|
+
const createdBefore = optionalString(context.params, 'created-before');
|
|
25
|
+
if (createdBefore !== undefined)
|
|
26
|
+
query['created_before'] = createdBefore;
|
|
27
|
+
const cursor = optionalString(context.params, 'cursor');
|
|
28
|
+
if (cursor !== undefined)
|
|
29
|
+
query['cursor'] = cursor;
|
|
30
|
+
const pageSize = optionalInt(context.params, 'page-size');
|
|
31
|
+
if (pageSize !== undefined)
|
|
32
|
+
query['page_size'] = pageSize;
|
|
33
|
+
const options = {
|
|
34
|
+
query,
|
|
35
|
+
...adminAuthRequestOptions(context.apiKey),
|
|
36
|
+
};
|
|
37
|
+
return context.requestJson('GET', '/admin/graphs', options);
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=admin-graphs-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-graphs-list.js","sourceRoot":"","sources":["../../src/commands/admin-graphs-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAEnF,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEzD,sEAAsE;AACtE,iEAAiE;AACjE,oEAAoE;AACpE,oEAAoE;AACpE,QAAQ;AACR,OAAO,EAAE,uBAAuB,EAAE,CAAC;AAEnC,MAAM,CAAC,MAAM,sBAAsB,GAAmB,KAAK,EAAE,OAAO,EAAE,EAAE;IACtE,sBAAsB,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;IACrD,MAAM,KAAK,GAA8C,EAAE,CAAC;IAC5D,MAAM,KAAK,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACvD,IAAI,KAAK,KAAK,SAAS;QAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC;IACjD,MAAM,IAAI,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpD,IAAI,IAAI,KAAK,SAAS;QAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAC7C,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACpE,IAAI,WAAW,KAAK,SAAS;QAAE,KAAK,CAAC,eAAe,CAAC,GAAG,WAAW,CAAC;IACpE,MAAM,YAAY,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACrE,IAAI,YAAY,KAAK,SAAS;QAAE,KAAK,CAAC,eAAe,CAAC,GAAG,YAAY,CAAC;IACtE,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACvE,IAAI,aAAa,KAAK,SAAS;QAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,aAAa,CAAC;IACzE,MAAM,MAAM,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACxD,IAAI,MAAM,KAAK,SAAS;QAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC;IACnD,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC1D,IAAI,QAAQ,KAAK,SAAS;QAAE,KAAK,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC;IAE1D,MAAM,OAAO,GAAmB;QAC9B,KAAK;QACL,GAAG,uBAAuB,CAAC,OAAO,CAAC,MAAM,CAAC;KAC3C,CAAC;IACF,OAAO,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { adminAuthRequestOptions, requireAdminCredential } from './_admin-auth.js';
|
|
2
|
+
import { optionalInt, requiredString } from './utils.js';
|
|
3
|
+
export const adminNodesAuditListCommand = async (context) => {
|
|
4
|
+
requireAdminCredential(context, 'admin:nodes:audit:list');
|
|
5
|
+
const nodeId = requiredString(context.params, 'node_id');
|
|
6
|
+
const limit = optionalInt(context.params, 'limit');
|
|
7
|
+
const options = {
|
|
8
|
+
...adminAuthRequestOptions(context.apiKey),
|
|
9
|
+
};
|
|
10
|
+
if (limit !== undefined) {
|
|
11
|
+
options.query = { limit };
|
|
12
|
+
}
|
|
13
|
+
return context.requestJson('GET', `/admin/nodes/${encodeURIComponent(nodeId)}/audit`, options);
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=admin-nodes-audit-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-nodes-audit-list.js","sourceRoot":"","sources":["../../src/commands/admin-nodes-audit-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAEnF,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEzD,MAAM,CAAC,MAAM,0BAA0B,GAAmB,KAAK,EAAE,OAAO,EAAE,EAAE;IAC1E,sBAAsB,CAAC,OAAO,EAAE,wBAAwB,CAAC,CAAC;IAC1D,MAAM,MAAM,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACzD,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnD,MAAM,OAAO,GAAmB;QAC9B,GAAG,uBAAuB,CAAC,OAAO,CAAC,MAAM,CAAC;KAC3C,CAAC;IACF,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;IACD,OAAO,OAAO,CAAC,WAAW,CACxB,KAAK,EACL,gBAAgB,kBAAkB,CAAC,MAAM,CAAC,QAAQ,EAClD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import type { CommandContext } from './types.js';
|
|
2
|
+
interface ApiKeySummary {
|
|
3
|
+
key_id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
key_prefix: string;
|
|
6
|
+
created_at?: string | null;
|
|
7
|
+
expires_at?: string | null;
|
|
8
|
+
last_used_at?: string | null;
|
|
9
|
+
revoked_at?: string | null;
|
|
10
|
+
}
|
|
11
|
+
interface ListApiKeysResponse {
|
|
12
|
+
keys: ApiKeySummary[];
|
|
13
|
+
limit: number;
|
|
14
|
+
offset: number;
|
|
15
|
+
has_more?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function apiKeysListCommand(context: CommandContext): Promise<ListApiKeysResponse | Array<Record<string, string>>>;
|
|
18
|
+
export {};
|
|
@@ -1,6 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { CliUsageError } from '../errors.js';
|
|
2
|
+
import { optionalInt } from './utils.js';
|
|
3
|
+
const DEFAULT_LIMIT = 50;
|
|
4
|
+
const MAX_LIMIT = 100;
|
|
5
|
+
function boundedPageInt(context, key, defaultValue) {
|
|
6
|
+
const parsed = optionalInt(context.params, key) ?? defaultValue;
|
|
7
|
+
if (key === 'limit' && (parsed < 1 || parsed > MAX_LIMIT)) {
|
|
8
|
+
throw new CliUsageError(`invalid ${key}=${parsed}; expected 1..${MAX_LIMIT}`);
|
|
9
|
+
}
|
|
10
|
+
if (key === 'offset' && parsed < 0) {
|
|
11
|
+
throw new CliUsageError(`invalid ${key}=${parsed}; expected >= 0`);
|
|
12
|
+
}
|
|
13
|
+
return parsed;
|
|
14
|
+
}
|
|
15
|
+
function compactRows(payload) {
|
|
16
|
+
return payload.keys.map((key) => ({
|
|
17
|
+
key_id: key.key_id,
|
|
18
|
+
name: key.name,
|
|
19
|
+
key_prefix: key.key_prefix,
|
|
20
|
+
created_at: key.created_at ?? '',
|
|
21
|
+
expires_at: key.expires_at ?? '',
|
|
22
|
+
last_used_at: key.last_used_at ?? '',
|
|
23
|
+
revoked_at: key.revoked_at ?? '',
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
export async function apiKeysListCommand(context) {
|
|
27
|
+
const limit = boundedPageInt(context, 'limit', DEFAULT_LIMIT);
|
|
28
|
+
const offset = boundedPageInt(context, 'offset', 0);
|
|
29
|
+
const payload = await context.requestJson('GET', '/auth/mcp-api-keys', { query: { limit, offset } });
|
|
30
|
+
if (context.globals?.format === 'json' && context.globals.formatExplicit) {
|
|
31
|
+
return payload;
|
|
32
|
+
}
|
|
33
|
+
if (payload.has_more === true) {
|
|
34
|
+
const nextOffset = payload.offset + payload.limit;
|
|
35
|
+
context.stderr?.(`More API keys are available; rerun with --offset ${nextOffset} --limit ${payload.limit}.\n`);
|
|
36
|
+
}
|
|
37
|
+
return compactRows(payload);
|
|
38
|
+
}
|
|
6
39
|
//# sourceMappingURL=api-keys-list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-keys-list.js","sourceRoot":"","sources":["../../src/commands/api-keys-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"api-keys-list.js","sourceRoot":"","sources":["../../src/commands/api-keys-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,SAAS,GAAG,GAAG,CAAC;AAmBtB,SAAS,cAAc,CACrB,OAAuB,EACvB,GAAuB,EACvB,YAAoB;IAEpB,MAAM,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,YAAY,CAAC;IAChE,IAAI,GAAG,KAAK,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC;QAC1D,MAAM,IAAI,aAAa,CAAC,WAAW,GAAG,IAAI,MAAM,iBAAiB,SAAS,EAAE,CAAC,CAAC;IAChF,CAAC;IACD,IAAI,GAAG,KAAK,QAAQ,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,aAAa,CAAC,WAAW,GAAG,IAAI,MAAM,iBAAiB,CAAC,CAAC;IACrE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,WAAW,CAAC,OAA4B;IAC/C,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAChC,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,UAAU,EAAE,GAAG,CAAC,UAAU;QAC1B,UAAU,EAAE,GAAG,CAAC,UAAU,IAAI,EAAE;QAChC,UAAU,EAAE,GAAG,CAAC,UAAU,IAAI,EAAE;QAChC,YAAY,EAAE,GAAG,CAAC,YAAY,IAAI,EAAE;QACpC,UAAU,EAAE,GAAG,CAAC,UAAU,IAAI,EAAE;KACjC,CAAC,CAAC,CAAC;AACN,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,OAAuB;IAEvB,MAAM,KAAK,GAAG,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;IAC9D,MAAM,MAAM,GAAG,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;IACpD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,WAAW,CACvC,KAAK,EACL,oBAAoB,EACpB,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAC7B,CAAC;IAEF,IAAI,OAAO,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;QACzE,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,IAAI,OAAO,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;QAC9B,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAClD,OAAO,CAAC,MAAM,EAAE,CACd,oDAAoD,UAAU,YAAY,OAAO,CAAC,KAAK,KAAK,CAC7F,CAAC;IACJ,CAAC;IACD,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -3,6 +3,6 @@ export const artifactsDeleteCommand = async (context) => {
|
|
|
3
3
|
const nodeId = requiredString(context.params, 'node_id');
|
|
4
4
|
const artifactId = requiredString(context.params, 'artifact_id');
|
|
5
5
|
const expectedRevision = requiredInt(context.params, 'expected_revision');
|
|
6
|
-
return context.requestJson('DELETE', `/nodes/${encodeURIComponent(nodeId)}/artifacts/${encodeURIComponent(artifactId)}`, {
|
|
6
|
+
return context.requestJson('DELETE', `/nodes/${encodeURIComponent(nodeId)}/artifacts/${encodeURIComponent(artifactId)}`, { body: { expected_revision: expectedRevision } });
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=artifacts-delete.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifacts-delete.js","sourceRoot":"","sources":["../../src/commands/artifacts-delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEzD,MAAM,CAAC,MAAM,sBAAsB,GAAmB,KAAK,EAAE,OAAO,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACzD,MAAM,UAAU,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACjE,MAAM,gBAAgB,GAAG,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC1E,OAAO,OAAO,CAAC,WAAW,CACxB,QAAQ,EACR,UAAU,kBAAkB,CAAC,MAAM,CAAC,cAAc,kBAAkB,CAAC,UAAU,CAAC,EAAE,EAClF,EAAE,
|
|
1
|
+
{"version":3,"file":"artifacts-delete.js","sourceRoot":"","sources":["../../src/commands/artifacts-delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEzD,MAAM,CAAC,MAAM,sBAAsB,GAAmB,KAAK,EAAE,OAAO,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACzD,MAAM,UAAU,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACjE,MAAM,gBAAgB,GAAG,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC1E,OAAO,OAAO,CAAC,WAAW,CACxB,QAAQ,EACR,UAAU,kBAAkB,CAAC,MAAM,CAAC,cAAc,kBAAkB,CAAC,UAAU,CAAC,EAAE,EAClF,EAAE,IAAI,EAAE,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,EAAE,CAClD,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CommandContext } from './types.js';
|
|
2
|
+
export declare function activeCredentialIsApiKey(apiKey: string | undefined): boolean;
|
|
3
|
+
export declare function webSettingsUrl(baseUrl: string, settings?: string): string;
|
|
4
|
+
export declare function rejectApiKeyAuthMode(context: CommandContext, commandName: string, supportedMode: 'session-auth-only' | 'legacy-session-only'): void;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CliAuthRequirementError } from '../errors.js';
|
|
2
|
+
export function activeCredentialIsApiKey(apiKey) {
|
|
3
|
+
return typeof apiKey === 'string' && apiKey.startsWith('fwk_');
|
|
4
|
+
}
|
|
5
|
+
function stripApiSurfaceSuffix(pathname) {
|
|
6
|
+
const segments = pathname.replace(/\/+$/u, '').split('/').filter(Boolean);
|
|
7
|
+
if (segments[segments.length - 1] === 'v1') {
|
|
8
|
+
segments.pop();
|
|
9
|
+
}
|
|
10
|
+
if (segments[segments.length - 1] === 'api') {
|
|
11
|
+
segments.pop();
|
|
12
|
+
}
|
|
13
|
+
return segments.length > 0 ? `/${segments.join('/')}` : '';
|
|
14
|
+
}
|
|
15
|
+
export function webSettingsUrl(baseUrl, settings = 'user') {
|
|
16
|
+
const fallback = `/app?settings=${encodeURIComponent(settings)}`;
|
|
17
|
+
try {
|
|
18
|
+
const url = new URL(baseUrl);
|
|
19
|
+
const appBasePath = stripApiSurfaceSuffix(url.pathname);
|
|
20
|
+
url.pathname = `${appBasePath}/app`.replace(/\/+/gu, '/');
|
|
21
|
+
url.search = `settings=${encodeURIComponent(settings)}`;
|
|
22
|
+
url.hash = '';
|
|
23
|
+
return url.toString();
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return fallback;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export function rejectApiKeyAuthMode(context, commandName, supportedMode) {
|
|
30
|
+
if (!activeCredentialIsApiKey(context.apiKey)) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const url = webSettingsUrl(context.baseUrl, 'user');
|
|
34
|
+
throw new CliAuthRequirementError(`${commandName} is ${supportedMode}; active auth mode is API key. ` +
|
|
35
|
+
'Use a browser session for this command.', {
|
|
36
|
+
code: 'session_auth_required',
|
|
37
|
+
commandName,
|
|
38
|
+
url,
|
|
39
|
+
nextAction: `Open ${url} and complete the account action in the browser.`,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=auth-mode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-mode.js","sourceRoot":"","sources":["../../src/commands/auth-mode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAGvD,MAAM,UAAU,wBAAwB,CAAC,MAA0B;IACjE,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,qBAAqB,CAAC,QAAgB;IAC7C,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC1E,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAC3C,QAAQ,CAAC,GAAG,EAAE,CAAC;IACjB,CAAC;IACD,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,KAAK,EAAE,CAAC;QAC5C,QAAQ,CAAC,GAAG,EAAE,CAAC;IACjB,CAAC;IACD,OAAO,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,OAAe,EAAE,QAAQ,GAAG,MAAM;IAC/D,MAAM,QAAQ,GAAG,iBAAiB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC;IACjE,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;QAC7B,MAAM,WAAW,GAAG,qBAAqB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACxD,GAAG,CAAC,QAAQ,GAAG,GAAG,WAAW,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC1D,GAAG,CAAC,MAAM,GAAG,YAAY,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxD,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC;QACd,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,QAAQ,CAAC;IAClB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,OAAuB,EACvB,WAAmB,EACnB,aAA0D;IAE1D,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,OAAO;IACT,CAAC;IACD,MAAM,GAAG,GAAG,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACpD,MAAM,IAAI,uBAAuB,CAC/B,GAAG,WAAW,OAAO,aAAa,iCAAiC;QACjE,yCAAyC,EAC3C;QACE,IAAI,EAAE,uBAAuB;QAC7B,WAAW;QACX,GAAG;QACH,UAAU,EAAE,QAAQ,GAAG,kDAAkD;KAC1E,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
+
function isObjectPayload(value) {
|
|
2
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
3
|
+
}
|
|
1
4
|
export const authStatusCommand = async (context) => {
|
|
2
|
-
|
|
5
|
+
const payload = await context.requestJson('GET', '/auth/status');
|
|
6
|
+
if (context.apiKey &&
|
|
7
|
+
isObjectPayload(payload) &&
|
|
8
|
+
payload.authenticated === true &&
|
|
9
|
+
(payload.email === null || payload.email === undefined)) {
|
|
10
|
+
return {
|
|
11
|
+
...payload,
|
|
12
|
+
auth_method: 'api_key',
|
|
13
|
+
email_unavailable_reason: 'api_key_auth_without_email',
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
return payload;
|
|
3
17
|
};
|
|
4
18
|
//# sourceMappingURL=auth-status.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-status.js","sourceRoot":"","sources":["../../src/commands/auth-status.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iBAAiB,GAAmB,KAAK,EAAE,OAAO,EAAE,EAAE;IACjE,OAAO,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"auth-status.js","sourceRoot":"","sources":["../../src/commands/auth-status.ts"],"names":[],"mappings":"AAEA,SAAS,eAAe,CAAC,KAAc;IACrC,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAmB,KAAK,EAAE,OAAO,EAAE,EAAE;IACjE,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;IACjE,IACE,OAAO,CAAC,MAAM;QACd,eAAe,CAAC,OAAO,CAAC;QACxB,OAAO,CAAC,aAAa,KAAK,IAAI;QAC9B,CAAC,OAAO,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,EACvD,CAAC;QACD,OAAO;YACL,GAAG,OAAO;YACV,WAAW,EAAE,SAAS;YACtB,wBAAwB,EAAE,4BAA4B;SACvD,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import { optionalEnum, optionalString } from './utils.js';
|
|
2
|
-
import { GRANT_BUDGET_SOURCES } from './enums.js';
|
|
1
|
+
import { optionalEnum, optionalInt, optionalString } from './utils.js';
|
|
2
|
+
import { COMPUTE_GRANT_STATUSES, GRANT_BUDGET_SOURCES } from './enums.js';
|
|
3
3
|
export const computeGrantsListCommand = async (context) => {
|
|
4
4
|
const budgetSource = optionalEnum(context.params, 'budget_source', GRANT_BUDGET_SOURCES);
|
|
5
|
+
const status = optionalEnum(context.params, 'status', COMPUTE_GRANT_STATUSES);
|
|
5
6
|
const approvalSessionId = optionalString(context.params, 'approval_session_id');
|
|
7
|
+
const limit = optionalInt(context.params, 'limit');
|
|
6
8
|
const query = {};
|
|
7
9
|
if (budgetSource)
|
|
8
10
|
query.budget_source = budgetSource;
|
|
11
|
+
if (status)
|
|
12
|
+
query.status = status;
|
|
9
13
|
if (approvalSessionId)
|
|
10
14
|
query.approval_session_id = approvalSessionId;
|
|
15
|
+
if (limit !== undefined)
|
|
16
|
+
query.limit = limit;
|
|
11
17
|
return context.requestJson('GET', '/compute/grants', Object.keys(query).length ? { query } : undefined);
|
|
12
18
|
};
|
|
13
19
|
//# sourceMappingURL=compute-grants-list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute-grants-list.js","sourceRoot":"","sources":["../../src/commands/compute-grants-list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"compute-grants-list.js","sourceRoot":"","sources":["../../src/commands/compute-grants-list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAE1E,MAAM,CAAC,MAAM,wBAAwB,GAAmB,KAAK,EAAE,OAAO,EAAE,EAAE;IACxE,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,eAAe,EAAE,oBAAoB,CAAC,CAAC;IACzF,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,sBAAsB,CAAC,CAAC;IAC9E,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IAChF,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnD,MAAM,KAAK,GAA8C,EAAE,CAAC;IAC5D,IAAI,YAAY;QAAE,KAAK,CAAC,aAAa,GAAG,YAAY,CAAC;IACrD,IAAI,MAAM;QAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IAClC,IAAI,iBAAiB;QAAE,KAAK,CAAC,mBAAmB,GAAG,iBAAiB,CAAC;IACrE,IAAI,KAAK,KAAK,SAAS;QAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;IAC7C,OAAO,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AAC1G,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GRANT_BUDGET_SOURCES } from './enums.js';
|
|
2
2
|
import { pollGrantsUntilActive } from './_wait-polling.js';
|
|
3
|
-
import { optionalString, requiredEnum, requiredString } from './utils.js';
|
|
3
|
+
import { optionalInt, optionalString, requiredEnum, requiredString } from './utils.js';
|
|
4
4
|
// uses pollUntilTerminal via _wait-polling.js
|
|
5
5
|
export const computeGrantsRequestApprovalCommand = async (context) => {
|
|
6
6
|
const purpose = requiredString(context.params, 'purpose');
|
|
@@ -25,11 +25,16 @@ export const computeGrantsRequestApprovalCommand = async (context) => {
|
|
|
25
25
|
'grant_action',
|
|
26
26
|
'compute_budget_id',
|
|
27
27
|
'target_compute_grant_id',
|
|
28
|
+
'provider',
|
|
28
29
|
]) {
|
|
29
30
|
const v = optionalString(context.params, opt);
|
|
30
31
|
if (v)
|
|
31
32
|
body[opt] = v;
|
|
32
33
|
}
|
|
34
|
+
const suggestedHardCapCents = optionalInt(context.params, 'suggested_hard_cap_cents');
|
|
35
|
+
if (suggestedHardCapCents !== undefined) {
|
|
36
|
+
body.suggested_hard_cap_cents = suggestedHardCapCents;
|
|
37
|
+
}
|
|
33
38
|
const response = await context.requestJson('POST', '/compute-grants/request-approval', { body, wrapperStep: 'request-approval' });
|
|
34
39
|
if (context.globals?.wait !== true) {
|
|
35
40
|
return response;
|
package/src/runtime/vendor/flywheel-cli-dist/commands/compute-grants-request-approval.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute-grants-request-approval.js","sourceRoot":"","sources":["../../src/commands/compute-grants-request-approval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"compute-grants-request-approval.js","sourceRoot":"","sources":["../../src/commands/compute-grants-request-approval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEvF,8CAA8C;AAE9C,MAAM,CAAC,MAAM,mCAAmC,GAAmB,KAAK,EAAE,OAAO,EAAE,EAAE;IACnF,MAAM,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC1D,MAAM,YAAY,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACrE,yEAAyE;IACzE,2EAA2E;IAC3E,0EAA0E;IAC1E,gEAAgE;IAChE,MAAM,MAAM,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACxD,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,eAAe,EAAE,oBAAoB,CAAC,CAAC;IAEzF,MAAM,IAAI,GAA4B;QACpC,OAAO;QACP,aAAa,EAAE,YAAY;QAC3B,aAAa,EAAE,YAAY;KAC5B,CAAC;IACF,IAAI,MAAM;QAAE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IAEjC,KAAK,MAAM,GAAG,IAAI;QAChB,iBAAiB;QACjB,qBAAqB;QACrB,qBAAqB;QACrB,cAAc;QACd,mBAAmB;QACnB,yBAAyB;QACzB,UAAU;KACX,EAAE,CAAC;QACF,MAAM,CAAC,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC9C,IAAI,CAAC;YAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC;IACD,MAAM,qBAAqB,GAAG,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;IACtF,IAAI,qBAAqB,KAAK,SAAS,EAAE,CAAC;QACxC,IAAI,CAAC,wBAAwB,GAAG,qBAAqB,CAAC;IACxD,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,WAAW,CACxC,MAAM,EACN,kCAAkC,EAClC,EAAE,IAAI,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAC1C,CAAC;IAEF,IAAI,OAAO,CAAC,OAAO,EAAE,IAAI,KAAK,IAAI,EAAE,CAAC;QACnC,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,MAAM,iBAAiB,GACrB,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,qBAAqB,CAAC;QACrD,CAAC,GAAG,EAAE;YACJ,MAAM,MAAM,GAAI,QAAwE;gBACtF,EAAE,gBAAgB,EAAE,UAAU,CAAC;YACjC,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,EAAE;gBAAE,OAAO,MAAM,CAAC;YAC/D,IAAI,OAAO,QAAQ,EAAE,mBAAmB,KAAK,QAAQ;gBAAE,OAAO,QAAQ,CAAC,mBAAmB,CAAC;YAC3F,OAAO,SAAS,CAAC;QACnB,CAAC,CAAC,EAAE,CAAC;IACP,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvB,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,MAAM,QAAQ,GAAG,MAAM,qBAAqB,CAC1C,OAAO,EACP,iBAAiB,EACjB,iCAAiC,CAClC,CAAC;IACF,OAAO,EAAE,GAAG,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;AAChD,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CliUsageError } from '../errors.js';
|
|
2
2
|
import { pollComputeStatusByToken } from './_wait-polling.js';
|
|
3
|
+
import { activeCredentialIsApiKey } from './auth-mode.js';
|
|
3
4
|
import { optionalString } from './utils.js';
|
|
4
5
|
// uses pollUntilTerminal via _wait-polling.js
|
|
5
6
|
// Wire values come from core.models.ComputeLeaseStatus; `released` is the
|
|
@@ -10,19 +11,29 @@ export const computeReleaseAllCommand = async (context) => {
|
|
|
10
11
|
const token = optionalString(context.params, 'lease_control_token');
|
|
11
12
|
const force = context.globals?.force === true;
|
|
12
13
|
const yes = context.globals?.yes === true;
|
|
14
|
+
let initial;
|
|
13
15
|
if (force) {
|
|
14
16
|
if (!yes) {
|
|
15
|
-
throw new CliUsageError('--force requires --yes
|
|
17
|
+
throw new CliUsageError('--force requires --yes and --lease_control_token.');
|
|
16
18
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
if (!token && activeCredentialIsApiKey(context.apiKey)) {
|
|
20
|
+
throw new CliUsageError('--force requires --lease_control_token for scoped/API-key release-all.');
|
|
21
|
+
}
|
|
22
|
+
if (!token) {
|
|
23
|
+
return await context.requestJson('POST', '/users/me/machines/release-all', {
|
|
24
|
+
body: { force: true },
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
initial = await context.requestJson('POST', '/users/me/machines/release-all', {
|
|
28
|
+
body: { lease_control_token: token, force: true },
|
|
20
29
|
});
|
|
21
30
|
}
|
|
22
|
-
if (!token) {
|
|
23
|
-
throw new CliUsageError('missing required parameter: lease_control_token
|
|
31
|
+
else if (!token) {
|
|
32
|
+
throw new CliUsageError('missing required parameter: lease_control_token');
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
initial = await context.requestJson('POST', '/users/me/machines/release-all', { body: { lease_control_token: token } });
|
|
24
36
|
}
|
|
25
|
-
const initial = await context.requestJson('POST', '/users/me/machines/release-all', { body: { scope: 'lease_control_token', lease_control_token: token } });
|
|
26
37
|
if (context.globals?.wait !== true)
|
|
27
38
|
return initial;
|
|
28
39
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute-release-all.js","sourceRoot":"","sources":["../../src/commands/compute-release-all.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"compute-release-all.js","sourceRoot":"","sources":["../../src/commands/compute-release-all.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,8CAA8C;AAE9C,0EAA0E;AAC1E,8EAA8E;AAC9E,0EAA0E;AAC1E,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;AAEhD,MAAM,CAAC,MAAM,wBAAwB,GAAmB,KAAK,EAAE,OAAO,EAAE,EAAE;IACxE,MAAM,KAAK,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IACpE,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,EAAE,KAAK,KAAK,IAAI,CAAC;IAC9C,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IAC1C,IAAI,OAAgB,CAAC;IAErB,IAAI,KAAK,EAAE,CAAC;QACV,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,MAAM,IAAI,aAAa,CACrB,mDAAmD,CACpD,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,KAAK,IAAI,wBAAwB,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YACvD,MAAM,IAAI,aAAa,CACrB,wEAAwE,CACzE,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,MAAM,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,gCAAgC,EAAE;gBACzE,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;aACtB,CAAC,CAAC;QACL,CAAC;QACD,OAAO,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,gCAAgC,EAAE;YAC5E,IAAI,EAAE,EAAE,mBAAmB,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE;SAClD,CAAC,CAAC;IACL,CAAC;SAAM,IAAI,CAAC,KAAK,EAAE,CAAC;QAClB,MAAM,IAAI,aAAa,CACrB,iDAAiD,CAClD,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,MAAM,OAAO,CAAC,WAAW,CACjC,MAAM,EACN,gCAAgC,EAChC,EAAE,IAAI,EAAE,EAAE,mBAAmB,EAAE,KAAK,EAAE,EAAE,CACzC,CAAC;IACJ,CAAC;IAED,IAAI,OAAO,CAAC,OAAO,EAAE,IAAI,KAAK,IAAI;QAAE,OAAO,OAAO,CAAC;IACnD,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,wBAAwB,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,qBAAqB,CAAC,CAAC;QACjG,OAAO,EAAE,GAAI,OAAkB,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;IAC3D,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,GAAI,GAA2B,CAAC,MAAM,CAAC;QACjD,IAAI,IAAI,KAAK,GAAG;YAAE,OAAO,EAAE,GAAI,OAAkB,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,CAAC;QACxF,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { buildBrowserHandoffResult, extractOpenUrl } from './_browser-handoff.js';
|
|
2
2
|
export const creditsBillingPortalCommand = async (context) => {
|
|
3
|
-
// --open dynamically does `await import('open')` via maybeOpenUrl
|
|
4
3
|
const payload = (await context.requestJson('POST', '/credits/billing-portal')) ?? {};
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
return buildBrowserHandoffResult({
|
|
5
|
+
command: 'credits:billing-portal',
|
|
6
|
+
url: extractOpenUrl(payload),
|
|
7
|
+
globals: context.globals,
|
|
8
|
+
stderr: context.stderr,
|
|
9
|
+
nextAction: 'Manage billing in the browser, then run flywheel credits:subscription, credits:balance, or credits:transactions.',
|
|
10
|
+
});
|
|
7
11
|
};
|
|
8
12
|
//# sourceMappingURL=credits-billing-portal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credits-billing-portal.js","sourceRoot":"","sources":["../../src/commands/credits-billing-portal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"credits-billing-portal.js","sourceRoot":"","sources":["../../src/commands/credits-billing-portal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGlF,MAAM,CAAC,MAAM,2BAA2B,GAAmB,KAAK,EAAE,OAAO,EAAE,EAAE;IAC3E,MAAM,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,WAAW,CACxC,MAAM,EACN,yBAAyB,CAC1B,CAAC,IAAI,EAAE,CAAC;IACT,OAAO,yBAAyB,CAAC;QAC/B,OAAO,EAAE,wBAAwB;QACjC,GAAG,EAAE,cAAc,CAAC,OAAO,CAAC;QAC5B,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,UAAU,EACR,kHAAkH;KACrH,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { buildBrowserHandoffResult, extractOpenUrl } from './_browser-handoff.js';
|
|
2
2
|
import { requiredInt } from './utils.js';
|
|
3
3
|
export const creditsPurchaseCommand = async (context) => {
|
|
4
|
-
// --open dynamically does `await import('open')` via maybeOpenUrl
|
|
5
4
|
const amountCents = requiredInt(context.params, 'amount_cents');
|
|
6
5
|
const payload = (await context.requestJson('POST', '/credits/purchase', { body: { amount_cents: amountCents } })) ?? {};
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
return buildBrowserHandoffResult({
|
|
7
|
+
command: 'credits:purchase',
|
|
8
|
+
url: extractOpenUrl(payload),
|
|
9
|
+
globals: context.globals,
|
|
10
|
+
stderr: context.stderr,
|
|
11
|
+
nextAction: 'Complete checkout in the browser, then run flywheel credits:balance, credits:transactions, or credits:subscription.',
|
|
12
|
+
});
|
|
9
13
|
};
|
|
10
14
|
//# sourceMappingURL=credits-purchase.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credits-purchase.js","sourceRoot":"","sources":["../../src/commands/credits-purchase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"credits-purchase.js","sourceRoot":"","sources":["../../src/commands/credits-purchase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,CAAC,MAAM,sBAAsB,GAAmB,KAAK,EAAE,OAAO,EAAE,EAAE;IACtE,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAChE,MAAM,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,WAAW,CACxC,MAAM,EACN,mBAAmB,EACnB,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,EAAE,CACxC,CAAC,IAAI,EAAE,CAAC;IACT,OAAO,yBAAyB,CAAC;QAC/B,OAAO,EAAE,kBAAkB;QAC3B,GAAG,EAAE,cAAc,CAAC,OAAO,CAAC;QAC5B,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,UAAU,EACR,qHAAqH;KACxH,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { BILLING_INTERVALS } from './enums.js';
|
|
2
|
-
import {
|
|
2
|
+
import { buildBrowserHandoffResult, extractOpenUrl } from './_browser-handoff.js';
|
|
3
3
|
import { optionalEnum } from './utils.js';
|
|
4
4
|
export const creditsSubscribeCommand = async (context) => {
|
|
5
|
-
// --open dynamically does `await import('open')` via maybeOpenUrl
|
|
6
5
|
const interval = optionalEnum(context.params, 'billing_interval', BILLING_INTERVALS);
|
|
7
6
|
const body = {};
|
|
8
7
|
if (interval)
|
|
9
8
|
body.billing_interval = interval;
|
|
10
9
|
const payload = (await context.requestJson('POST', '/credits/subscribe', Object.keys(body).length ? { body } : undefined)) ?? {};
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
return buildBrowserHandoffResult({
|
|
11
|
+
command: 'credits:subscribe',
|
|
12
|
+
url: extractOpenUrl(payload),
|
|
13
|
+
globals: context.globals,
|
|
14
|
+
stderr: context.stderr,
|
|
15
|
+
nextAction: 'Complete checkout in the browser, then run flywheel credits:subscription, credits:balance, or credits:transactions.',
|
|
16
|
+
});
|
|
13
17
|
};
|
|
14
18
|
//# sourceMappingURL=credits-subscribe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credits-subscribe.js","sourceRoot":"","sources":["../../src/commands/credits-subscribe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"credits-subscribe.js","sourceRoot":"","sources":["../../src/commands/credits-subscribe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAElF,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,CAAC,MAAM,uBAAuB,GAAmB,KAAK,EAAE,OAAO,EAAE,EAAE;IACvE,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,kBAAkB,EAAE,iBAAiB,CAAC,CAAC;IACrF,MAAM,IAAI,GAA4B,EAAE,CAAC;IACzC,IAAI,QAAQ;QAAE,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC;IAC/C,MAAM,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,WAAW,CACxC,MAAM,EACN,oBAAoB,EACpB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAChD,CAAC,IAAI,EAAE,CAAC;IACT,OAAO,yBAAyB,CAAC;QAC/B,OAAO,EAAE,mBAAmB;QAC5B,GAAG,EAAE,cAAc,CAAC,OAAO,CAAC;QAC5B,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,UAAU,EACR,qHAAqH;KACxH,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CliUsageError } from '../errors.js';
|
|
2
|
+
export function requireDestructiveConfirmation(context, commandName) {
|
|
3
|
+
if (context.globals?.yes === true)
|
|
4
|
+
return;
|
|
5
|
+
throw new CliUsageError(`${commandName} is destructive and requires --yes.`);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=destructive-confirmation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"destructive-confirmation.js","sourceRoot":"","sources":["../../src/commands/destructive-confirmation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,MAAM,UAAU,8BAA8B,CAC5C,OAAuB,EACvB,WAAmB;IAEnB,IAAI,OAAO,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI;QAAE,OAAO;IAC1C,MAAM,IAAI,aAAa,CAAC,GAAG,WAAW,qCAAqC,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
export declare const DELETE_MODES: readonly ["cascade", "detach_shared"];
|
|
2
2
|
export declare const SHARING_MODES: readonly ["private", "public", "unlisted"];
|
|
3
|
+
export declare const HOOK_TRIGGER_EVENTS: readonly ["artifact.finalized"];
|
|
4
|
+
export declare const HOOK_SCOPES: readonly ["self", "subtree", "graph"];
|
|
5
|
+
export declare const HOOK_RERUN_POLICIES: readonly ["if_inputs_changed"];
|
|
3
6
|
export declare const STATUS_FILTERS: readonly ["active", "archived", "deleted", "all"];
|
|
4
7
|
export declare const BUDGET_SOURCES: readonly ["prepaid", "postpaid", "promotional", "grant"];
|
|
5
8
|
export declare const GRANT_BUDGET_SOURCES: readonly ["user", "root"];
|
|
9
|
+
export declare const COMPUTE_GRANT_STATUSES: readonly ["active", "expired"];
|
|
6
10
|
export declare const BILLING_INTERVALS: readonly ["daily", "weekly", "monthly"];
|
|
7
11
|
export declare const PROJECTION_DETAIL: readonly ["compact", "full"];
|
|
8
12
|
export declare const NODE_PROJECTION: readonly ["core", "topology", "compact", "full"];
|
|
9
13
|
export declare const APPROVAL_STATUS: readonly ["active", "expired"];
|
|
10
14
|
export type DeleteMode = (typeof DELETE_MODES)[number];
|
|
11
15
|
export type SharingMode = (typeof SHARING_MODES)[number];
|
|
16
|
+
export type HookTriggerEvent = (typeof HOOK_TRIGGER_EVENTS)[number];
|
|
17
|
+
export type HookScope = (typeof HOOK_SCOPES)[number];
|
|
18
|
+
export type HookRerunPolicy = (typeof HOOK_RERUN_POLICIES)[number];
|
|
12
19
|
export type StatusFilter = (typeof STATUS_FILTERS)[number];
|
|
13
20
|
export type BudgetSource = (typeof BUDGET_SOURCES)[number];
|
|
14
21
|
export type GrantBudgetSource = (typeof GRANT_BUDGET_SOURCES)[number];
|
|
22
|
+
export type ComputeGrantStatus = (typeof COMPUTE_GRANT_STATUSES)[number];
|
|
15
23
|
export type BillingInterval = (typeof BILLING_INTERVALS)[number];
|
|
16
24
|
export type ProjectionDetail = (typeof PROJECTION_DETAIL)[number];
|
|
@@ -2,9 +2,13 @@ export const DELETE_MODES = ['cascade', 'detach_shared'];
|
|
|
2
2
|
// Mirrors the server's NodeSharingMode literal and parse_node_sharing_mode in
|
|
3
3
|
// server/node_sharing_service.py. The server rejects any other value with 422.
|
|
4
4
|
export const SHARING_MODES = ['private', 'public', 'unlisted'];
|
|
5
|
+
export const HOOK_TRIGGER_EVENTS = ['artifact.finalized'];
|
|
6
|
+
export const HOOK_SCOPES = ['self', 'subtree', 'graph'];
|
|
7
|
+
export const HOOK_RERUN_POLICIES = ['if_inputs_changed'];
|
|
5
8
|
export const STATUS_FILTERS = ['active', 'archived', 'deleted', 'all'];
|
|
6
9
|
export const BUDGET_SOURCES = ['prepaid', 'postpaid', 'promotional', 'grant'];
|
|
7
10
|
export const GRANT_BUDGET_SOURCES = ['user', 'root'];
|
|
11
|
+
export const COMPUTE_GRANT_STATUSES = ['active', 'expired'];
|
|
8
12
|
export const BILLING_INTERVALS = ['daily', 'weekly', 'monthly'];
|
|
9
13
|
export const PROJECTION_DETAIL = ['compact', 'full'];
|
|
10
14
|
export const NODE_PROJECTION = ['core', 'topology', 'compact', 'full'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/commands/enums.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,eAAe,CAAU,CAAC;AAClE,8EAA8E;AAC9E,+EAA+E;AAC/E,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,UAAU,CAAU,CAAC;AACxE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,CAAU,CAAC;AAChF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,CAAU,CAAC;AACvF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAU,CAAC;AAC9D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AACzE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,MAAM,CAAU,CAAC;AAC9D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,CAAU,CAAC;AAChF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/commands/enums.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,eAAe,CAAU,CAAC;AAClE,8EAA8E;AAC9E,+EAA+E;AAC/E,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,UAAU,CAAU,CAAC;AACxE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,oBAAoB,CAAU,CAAC;AACnE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAU,CAAC;AACjE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,mBAAmB,CAAU,CAAC;AAClE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,CAAU,CAAC;AAChF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,CAAU,CAAC;AACvF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAU,CAAC;AAC9D,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAU,CAAC;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AACzE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,MAAM,CAAU,CAAC;AAC9D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,CAAU,CAAC;AAChF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAU,CAAC"}
|
|
@@ -4,9 +4,5 @@ export interface EnvSwitchArgs {
|
|
|
4
4
|
name: string;
|
|
5
5
|
}
|
|
6
6
|
export declare function runEnvSwitch(args: EnvSwitchArgs): Promise<void>;
|
|
7
|
-
export interface EnvListArgs {
|
|
8
|
-
configPath: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function runEnvList(args: EnvListArgs): Promise<string>;
|
|
11
7
|
export declare const envSwitchCommand: CommandHandler;
|
|
12
8
|
export declare const envListCommand: CommandHandler;
|
|
@@ -3,6 +3,7 @@ import path from 'node:path';
|
|
|
3
3
|
import { CliUsageError } from '../errors.js';
|
|
4
4
|
import { EXIT_USAGE } from '../exit-codes.js';
|
|
5
5
|
import { BUILTIN_PROFILES, BUILTIN_PROFILE_NAMES, isBuiltinProfileName, } from '../auth/profiles.js';
|
|
6
|
+
import { isInternalMode } from './help.js';
|
|
6
7
|
async function readConfigFile(configPath) {
|
|
7
8
|
try {
|
|
8
9
|
const raw = await readFile(configPath, 'utf8');
|
|
@@ -19,7 +20,9 @@ async function writeConfigFile(configPath, config) {
|
|
|
19
20
|
}
|
|
20
21
|
export async function runEnvSwitch(args) {
|
|
21
22
|
if (!isBuiltinProfileName(args.name)) {
|
|
22
|
-
const
|
|
23
|
+
const internal = isInternalMode();
|
|
24
|
+
const visibleNames = BUILTIN_PROFILE_NAMES.filter((name) => internal || !BUILTIN_PROFILES[name].hidden);
|
|
25
|
+
const available = visibleNames.join(', ');
|
|
23
26
|
// Bad --name is an argument-validation error, not a transport failure.
|
|
24
27
|
// Scripts that retry on EXIT_TRANSPORT (2) must not retry this;
|
|
25
28
|
// EXIT_USAGE (1) is the right signal.
|
|
@@ -29,16 +32,6 @@ export async function runEnvSwitch(args) {
|
|
|
29
32
|
config.activeProfile = args.name;
|
|
30
33
|
await writeConfigFile(args.configPath, config);
|
|
31
34
|
}
|
|
32
|
-
export async function runEnvList(args) {
|
|
33
|
-
const config = await readConfigFile(args.configPath);
|
|
34
|
-
const active = typeof config.activeProfile === 'string' ? config.activeProfile : null;
|
|
35
|
-
const lines = BUILTIN_PROFILE_NAMES.map((name) => {
|
|
36
|
-
const baseUrl = BUILTIN_PROFILES[name].baseUrl;
|
|
37
|
-
const marker = name === active ? ' (active)' : '';
|
|
38
|
-
return ` ${name.padEnd(10)}${baseUrl}${marker}`;
|
|
39
|
-
});
|
|
40
|
-
return lines.join('\n') + '\n';
|
|
41
|
-
}
|
|
42
35
|
export const envSwitchCommand = async (context) => {
|
|
43
36
|
const rawName = context.params.name;
|
|
44
37
|
if (typeof rawName !== 'string' || !rawName.trim()) {
|
|
@@ -54,8 +47,10 @@ export const envListCommand = async (context) => {
|
|
|
54
47
|
// rendered payload and break scripts that parse `flywheel env:list`.
|
|
55
48
|
const config = await readConfigFile(context.configPath);
|
|
56
49
|
const active = typeof config.activeProfile === 'string' ? config.activeProfile : null;
|
|
50
|
+
const internal = isInternalMode();
|
|
51
|
+
const visibleNames = BUILTIN_PROFILE_NAMES.filter((name) => internal || !BUILTIN_PROFILES[name].hidden);
|
|
57
52
|
return {
|
|
58
|
-
profiles:
|
|
53
|
+
profiles: visibleNames.map((name) => ({
|
|
59
54
|
name,
|
|
60
55
|
baseUrl: BUILTIN_PROFILES[name].baseUrl,
|
|
61
56
|
active: name === active,
|