@codiac.io/codiac-cli 1.3.82 → 1.3.84
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 +1 -1
- package/dist/apis/api-plus-local/api-client-plus-local.d.ts +4 -3
- package/dist/apis/api-plus-local/api-client-plus-local.js +3 -3
- package/dist/apis/api-plus-local/api-client-plus-local.js.map +1 -1
- package/dist/apis/auth-client/common/token-utils.d.ts +11 -0
- package/dist/apis/auth-client/common/token-utils.js +84 -0
- package/dist/apis/auth-client/common/token-utils.js.map +1 -0
- package/dist/apis/auth-client/i-auth-client.d.ts +83 -0
- package/dist/apis/auth-client/i-auth-client.js +3 -0
- package/dist/apis/auth-client/i-auth-client.js.map +1 -0
- package/dist/apis/codiac-api/common/api-client-base.d.ts +11 -0
- package/dist/apis/codiac-api/common/api-client-base.js +45 -12
- package/dist/apis/codiac-api/common/api-client-base.js.map +1 -1
- package/dist/apis/codiac-api/common/api-crud-client-base.js +2 -2
- package/dist/apis/codiac-api/common/api-crud-client-base.js.map +1 -1
- package/dist/apis/codiac-api/common/token-utils.d.ts +11 -0
- package/dist/apis/codiac-api/common/token-utils.js +84 -0
- package/dist/apis/codiac-api/common/token-utils.js.map +1 -0
- package/dist/apis/codiac-api/gen/client-config.d.ts +2 -2
- package/dist/apis/codiac-api/gen/client-config.js +9 -9
- package/dist/apis/codiac-api/gen/client-config.js.map +1 -1
- package/dist/apis/codiac-api/gen/client.d.ts +17 -12
- package/dist/apis/codiac-api/gen/client.js +36 -85
- package/dist/apis/codiac-api/gen/client.js.map +1 -1
- package/dist/apis/codiac-api/gen/contracts/index.d.ts +1 -0
- package/dist/apis/codiac-api/gen/contracts/index.js +6 -0
- package/dist/apis/codiac-api/gen/contracts/index.js.map +1 -0
- package/dist/apis/codiac-api/gen/contracts/transformers.gen.d.ts +765 -0
- package/dist/apis/codiac-api/gen/contracts/transformers.gen.js +7179 -0
- package/dist/apis/codiac-api/gen/contracts/transformers.gen.js.map +1 -0
- package/dist/apis/codiac-api/gen/contracts/types.gen.d.ts +18382 -0
- package/dist/apis/codiac-api/gen/contracts/types.gen.js +350 -0
- package/dist/apis/codiac-api/gen/contracts/types.gen.js.map +1 -0
- package/dist/apis/codiac-api/i-client.d.ts +2436 -0
- package/dist/apis/codiac-api/i-client.js +3 -0
- package/dist/apis/codiac-api/i-client.js.map +1 -0
- package/dist/apis/codiac-api-nats/common/creds.d.ts +8 -0
- package/dist/apis/codiac-api-nats/common/creds.js +19 -0
- package/dist/apis/codiac-api-nats/common/creds.js.map +1 -0
- package/dist/apis/codiac-api-nats/common/token-utils.d.ts +11 -0
- package/dist/apis/codiac-api-nats/common/token-utils.js +84 -0
- package/dist/apis/codiac-api-nats/common/token-utils.js.map +1 -0
- package/dist/apis/codiac-api-nats/common/token.d.ts +4 -0
- package/dist/apis/codiac-api-nats/common/token.js +16 -0
- package/dist/apis/codiac-api-nats/common/token.js.map +1 -0
- package/dist/apis/codiac-api-nats/common/types.d.ts +8 -0
- package/dist/apis/codiac-api-nats/common/types.js +3 -0
- package/dist/apis/codiac-api-nats/common/types.js.map +1 -0
- package/dist/apis/codiac-api-nats/common/utils.d.ts +56 -0
- package/dist/apis/codiac-api-nats/common/utils.js +323 -0
- package/dist/apis/codiac-api-nats/common/utils.js.map +1 -0
- package/dist/apis/codiac-api-nats/gen/client.d.ts +2571 -0
- package/dist/apis/codiac-api-nats/gen/client.js +15794 -0
- package/dist/apis/codiac-api-nats/gen/client.js.map +1 -0
- package/dist/apis/codiac-api-nats/gen/config.d.ts +17 -0
- package/dist/apis/codiac-api-nats/gen/config.js +17 -0
- package/dist/apis/codiac-api-nats/gen/config.js.map +1 -0
- package/dist/apis/codiac-api-nats/gen/contracts/index.d.ts +1 -0
- package/dist/apis/codiac-api-nats/gen/contracts/index.js +6 -0
- package/dist/apis/codiac-api-nats/gen/contracts/index.js.map +1 -0
- package/dist/apis/codiac-api-nats/gen/contracts/transformers.gen.d.ts +765 -0
- package/dist/apis/codiac-api-nats/gen/contracts/transformers.gen.js +7179 -0
- package/dist/apis/codiac-api-nats/gen/contracts/transformers.gen.js.map +1 -0
- package/dist/apis/codiac-api-nats/gen/contracts/types.gen.d.ts +18388 -0
- package/dist/apis/codiac-api-nats/gen/contracts/types.gen.js +350 -0
- package/dist/apis/codiac-api-nats/gen/contracts/types.gen.js.map +1 -0
- package/dist/apis/{codiac-api/gen/contracts.d.ts → codiac-api-nats/gen/contracts.ng.d.ts} +247 -245
- package/dist/apis/{codiac-api/gen/contracts.js → codiac-api-nats/gen/contracts.ng.js} +27 -57
- package/dist/apis/codiac-api-nats/gen/contracts.ng.js.map +1 -0
- package/dist/apis/codiac-api-nats/index.d.ts +3 -0
- package/dist/apis/codiac-api-nats/index.js +7 -0
- package/dist/apis/codiac-api-nats/index.js.map +1 -0
- package/dist/apis/codiac-relay/common/api-client-base.js +23 -13
- package/dist/apis/codiac-relay/common/api-client-base.js.map +1 -1
- package/dist/apis/codiac-relay/common/api-crud-client-base.js +2 -2
- package/dist/apis/codiac-relay/common/api-crud-client-base.js.map +1 -1
- package/dist/apis/codiac-relay/common/api-user-creds.d.ts +2 -2
- package/dist/apis/codiac-relay/common/api-user-creds.js +1 -2
- package/dist/apis/codiac-relay/common/api-user-creds.js.map +1 -1
- package/dist/apis/codiac-relay/common/token-utils.d.ts +11 -0
- package/dist/apis/codiac-relay/common/token-utils.js +84 -0
- package/dist/apis/codiac-relay/common/token-utils.js.map +1 -0
- package/dist/apis/codiac-relay/gen/client.d.ts +22 -9
- package/dist/apis/codiac-relay/gen/client.js +37 -9
- package/dist/apis/codiac-relay/gen/client.js.map +1 -1
- package/dist/apis/codiac-relay/gen/contracts/index.d.ts +1 -0
- package/dist/apis/codiac-relay/gen/contracts/index.js +6 -0
- package/dist/apis/codiac-relay/gen/contracts/index.js.map +1 -0
- package/dist/apis/codiac-relay/gen/contracts/transformers.gen.d.ts +307 -0
- package/dist/apis/codiac-relay/gen/contracts/transformers.gen.js +3612 -0
- package/dist/apis/codiac-relay/gen/contracts/transformers.gen.js.map +1 -0
- package/dist/apis/codiac-relay/gen/contracts/types.gen.d.ts +15725 -0
- package/dist/apis/codiac-relay/gen/contracts/types.gen.js +396 -0
- package/dist/apis/codiac-relay/gen/contracts/types.gen.js.map +1 -0
- package/dist/apis/codiac-relay/gen/contracts-legacy.js +4696 -0
- package/dist/apis/codiac-relay/gen/contracts-legacy.js.map +1 -0
- package/dist/apis/codiac-relay/i-client.d.ts +883 -0
- package/dist/apis/codiac-relay/i-client.js +3 -0
- package/dist/apis/codiac-relay/i-client.js.map +1 -0
- package/dist/bootstrapper-for-auth-dmz-commands.d.ts +7 -0
- package/dist/bootstrapper-for-auth-dmz-commands.js +30 -0
- package/dist/bootstrapper-for-auth-dmz-commands.js.map +1 -0
- package/dist/bootstrapper-for-codiac-cli.d.ts +8 -0
- package/dist/bootstrapper-for-codiac-cli.js +101 -0
- package/dist/bootstrapper-for-codiac-cli.js.map +1 -0
- package/dist/bootstrapper-for-enterprise-commands.d.ts +7 -0
- package/dist/bootstrapper-for-enterprise-commands.js +119 -0
- package/dist/bootstrapper-for-enterprise-commands.js.map +1 -0
- package/dist/bootstrapper-for-tenantless-commands.d.ts +7 -0
- package/dist/bootstrapper-for-tenantless-commands.js +51 -0
- package/dist/bootstrapper-for-tenantless-commands.js.map +1 -0
- package/dist/cli-common/command-base.d.ts +10 -9
- package/dist/cli-common/command-base.js +0 -70
- package/dist/cli-common/command-base.js.map +1 -1
- package/dist/cli-common/test/tenant-contextualizer.spec.js +4 -4
- package/dist/cli-common/test/tenant-contextualizer.spec.js.map +1 -1
- package/dist/codiac-entities/asset-request.d.ts +6 -0
- package/dist/codiac-entities/asset-request.js +3 -0
- package/dist/codiac-entities/asset-request.js.map +1 -0
- package/dist/codiac-entities/csp-feature-enum.d.ts +9 -0
- package/dist/codiac-entities/csp-feature-enum.js +11 -0
- package/dist/codiac-entities/csp-feature-enum.js.map +1 -0
- package/dist/codiac-entities/csp-support-map.d.ts +22 -0
- package/dist/codiac-entities/csp-support-map.js +7 -0
- package/dist/codiac-entities/csp-support-map.js.map +1 -0
- package/dist/codiac-entities/ingress-exposure-enum.d.ts +14 -0
- package/dist/codiac-entities/ingress-exposure-enum.js +19 -0
- package/dist/codiac-entities/ingress-exposure-enum.js.map +1 -0
- package/dist/command-base-enterprise.d.ts +19 -5
- package/dist/command-base-enterprise.js +59 -94
- package/dist/command-base-enterprise.js.map +1 -1
- package/dist/command-base-exec-tenant.js +8 -2
- package/dist/command-base-exec-tenant.js.map +1 -1
- package/dist/command-base-exec.js +8 -2
- package/dist/command-base-exec.js.map +1 -1
- package/dist/command-base-tenantless.d.ts +0 -3
- package/dist/command-base-tenantless.js +2 -53
- package/dist/command-base-tenantless.js.map +1 -1
- package/dist/commands/asset/create.js +2 -2
- package/dist/commands/asset/create.js.map +1 -1
- package/dist/commands/asset/deploy.d.ts +2 -1
- package/dist/commands/asset/deploy.js +4 -2
- package/dist/commands/asset/deploy.js.map +1 -1
- package/dist/commands/asset/list.js +4 -1
- package/dist/commands/asset/list.js.map +1 -1
- package/dist/commands/asset/probe/create.js +8 -1
- package/dist/commands/asset/probe/create.js.map +1 -1
- package/dist/commands/asset/probe/delete.js +2 -1
- package/dist/commands/asset/probe/delete.js.map +1 -1
- package/dist/commands/asset/probe/list.js +3 -2
- package/dist/commands/asset/probe/list.js.map +1 -1
- package/dist/commands/asset/recycle.js +3 -0
- package/dist/commands/asset/recycle.js.map +1 -1
- package/dist/commands/asset/undeploy.js +7 -0
- package/dist/commands/asset/undeploy.js.map +1 -1
- package/dist/commands/asset/view.js +13 -6
- package/dist/commands/asset/view.js.map +1 -1
- package/dist/commands/asset/volume/create.js +107 -98
- package/dist/commands/asset/volume/create.js.map +1 -1
- package/dist/commands/asset/volume/delete.js +50 -41
- package/dist/commands/asset/volume/delete.js.map +1 -1
- package/dist/commands/asset/volume/list.js +24 -14
- package/dist/commands/asset/volume/list.js.map +1 -1
- package/dist/commands/asset/where.d.ts +2 -1
- package/dist/commands/asset/where.js.map +1 -1
- package/dist/commands/auth/cabinet/allow.js +4 -3
- package/dist/commands/auth/cabinet/allow.js.map +1 -1
- package/dist/commands/auth/cabinet/allowed.js +8 -7
- package/dist/commands/auth/cabinet/allowed.js.map +1 -1
- package/dist/commands/auth/enterprise/allow/onEnvironments.js +4 -3
- package/dist/commands/auth/enterprise/allow/onEnvironments.js.map +1 -1
- package/dist/commands/auth/enterprise/allow.js +4 -3
- package/dist/commands/auth/enterprise/allow.js.map +1 -1
- package/dist/commands/auth/enterprise/allowed.js +8 -7
- package/dist/commands/auth/enterprise/allowed.js.map +1 -1
- package/dist/commands/auth/environment/allow/onCabinets.js +4 -3
- package/dist/commands/auth/environment/allow/onCabinets.js.map +1 -1
- package/dist/commands/auth/environment/allow.js +4 -3
- package/dist/commands/auth/environment/allow.js.map +1 -1
- package/dist/commands/auth/environment/allowed.js +8 -7
- package/dist/commands/auth/environment/allowed.js.map +1 -1
- package/dist/commands/auth/register.d.ts +3 -6
- package/dist/commands/auth/register.js +11 -38
- package/dist/commands/auth/register.js.map +1 -1
- package/dist/commands/auth/role/list.js +2 -1
- package/dist/commands/auth/role/list.js.map +1 -1
- package/dist/commands/auth/user/list.js +2 -1
- package/dist/commands/auth/user/list.js.map +1 -1
- package/dist/commands/build.js +2 -1
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/cabinet/list.js +6 -3
- package/dist/commands/cabinet/list.js.map +1 -1
- package/dist/commands/cabinet/obliterate.js +1 -1
- package/dist/commands/cabinet/obliterate.js.map +1 -1
- package/dist/commands/cli.d.ts +1 -0
- package/dist/commands/cli.js +1 -0
- package/dist/commands/cli.js.map +1 -1
- package/dist/commands/cluster/scaling/update.js +4 -3
- package/dist/commands/cluster/scaling/update.js.map +1 -1
- package/dist/commands/config/add.js +9 -3
- package/dist/commands/config/add.js.map +1 -1
- package/dist/commands/config/delete.js +6 -1
- package/dist/commands/config/delete.js.map +1 -1
- package/dist/commands/config/deploy.js +4 -0
- package/dist/commands/config/deploy.js.map +1 -1
- package/dist/commands/config/import.js +108 -98
- package/dist/commands/config/import.js.map +1 -1
- package/dist/commands/config/settings/get.js +9 -2
- package/dist/commands/config/settings/get.js.map +1 -1
- package/dist/commands/config/view.js +73 -59
- package/dist/commands/config/view.js.map +1 -1
- package/dist/commands/csp/login.js +13 -2
- package/dist/commands/csp/login.js.map +1 -1
- package/dist/commands/csp/logout.js +9 -2
- package/dist/commands/csp/logout.js.map +1 -1
- package/dist/commands/deploy.js +3 -0
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/enterprise/create.js +1 -1
- package/dist/commands/enterprise/create.js.map +1 -1
- package/dist/commands/enterprise/list.js +7 -2
- package/dist/commands/enterprise/list.js.map +1 -1
- package/dist/commands/env/add.js +107 -97
- package/dist/commands/env/add.js.map +1 -1
- package/dist/commands/environment/cluster/attach.js.map +1 -1
- package/dist/commands/environment/cluster/detach.js.map +1 -1
- package/dist/commands/environment/list.js +6 -3
- package/dist/commands/environment/list.js.map +1 -1
- package/dist/commands/filestore/capture.d.ts +4 -3
- package/dist/commands/filestore/capture.js +13 -9
- package/dist/commands/filestore/capture.js.map +1 -1
- package/dist/commands/filestore/list.js +9 -8
- package/dist/commands/filestore/list.js.map +1 -1
- package/dist/commands/host/delete.d.ts +1 -0
- package/dist/commands/host/delete.js +17 -11
- package/dist/commands/host/delete.js.map +1 -1
- package/dist/commands/host/list.js +2 -1
- package/dist/commands/host/list.js.map +1 -1
- package/dist/commands/host/map.d.ts +4 -0
- package/dist/commands/host/map.js +150 -80
- package/dist/commands/host/map.js.map +1 -1
- package/dist/commands/host/view.js +2 -1
- package/dist/commands/host/view.js.map +1 -1
- package/dist/commands/imageRegistry/capture.js +6 -5
- package/dist/commands/imageRegistry/capture.js.map +1 -1
- package/dist/commands/imageRegistry/forget.js +5 -4
- package/dist/commands/imageRegistry/forget.js.map +1 -1
- package/dist/commands/imageRegistry/pullSecret/set.js +10 -9
- package/dist/commands/imageRegistry/pullSecret/set.js.map +1 -1
- package/dist/commands/imageRegistry/pullSecret/unset.js +5 -4
- package/dist/commands/imageRegistry/pullSecret/unset.js.map +1 -1
- package/dist/commands/images/add.js +37 -28
- package/dist/commands/images/add.js.map +1 -1
- package/dist/commands/kit/create.js +3 -2
- package/dist/commands/kit/create.js.map +1 -1
- package/dist/commands/login.d.ts +0 -2
- package/dist/commands/login.js +4 -6
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logout.js +3 -0
- package/dist/commands/logout.js.map +1 -1
- package/dist/commands/noc/cluster/capture.js +1 -1
- package/dist/commands/noc/cluster/capture.js.map +1 -1
- package/dist/commands/noc/cluster/create.js +9 -8
- package/dist/commands/noc/cluster/create.js.map +1 -1
- package/dist/commands/noc/cluster/deinit.js +13 -6
- package/dist/commands/noc/cluster/deinit.js.map +1 -1
- package/dist/commands/noc/cluster/destroy.js +3 -2
- package/dist/commands/noc/cluster/destroy.js.map +1 -1
- package/dist/commands/noc/cluster/forget.js +1 -1
- package/dist/commands/noc/cluster/forget.js.map +1 -1
- package/dist/commands/noc/cluster/grant.js +61 -49
- package/dist/commands/noc/cluster/grant.js.map +1 -1
- package/dist/commands/noc/cluster/init.js +13 -6
- package/dist/commands/noc/cluster/init.js.map +1 -1
- package/dist/commands/noc/cluster/journal.js +2 -1
- package/dist/commands/noc/cluster/journal.js.map +1 -1
- package/dist/commands/noc/cluster/list.js +8 -3
- package/dist/commands/noc/cluster/list.js.map +1 -1
- package/dist/commands/noc/cluster/recreate.js +26 -16
- package/dist/commands/noc/cluster/recreate.js.map +1 -1
- package/dist/commands/portal.js +3 -0
- package/dist/commands/portal.js.map +1 -1
- package/dist/commands/secretStore/capture.js +36 -36
- package/dist/commands/secretStore/capture.js.map +1 -1
- package/dist/commands/secretStore/forget.js +32 -33
- package/dist/commands/secretStore/forget.js.map +1 -1
- package/dist/commands/secretStore/list.js +6 -4
- package/dist/commands/secretStore/list.js.map +1 -1
- package/dist/commands/tenant/create.js +34 -32
- package/dist/commands/tenant/create.js.map +1 -1
- package/dist/commands/tenant/switch.js +30 -34
- package/dist/commands/tenant/switch.js.map +1 -1
- package/dist/commands/whereami.js +3 -0
- package/dist/commands/whereami.js.map +1 -1
- package/dist/message-contracts/index.d.ts +2 -0
- package/dist/message-contracts/index.js +6 -0
- package/dist/message-contracts/index.js.map +1 -0
- package/dist/message-contracts/workunit-contracts.d.ts +72 -0
- package/dist/message-contracts/workunit-contracts.js +26 -0
- package/dist/message-contracts/workunit-contracts.js.map +1 -0
- package/dist/ops/entities/cli-config.d.ts +10 -0
- package/dist/ops/entities/cli-config.js +6 -1
- package/dist/ops/entities/cli-config.js.map +1 -1
- package/dist/relay/contracts/contracts.d.ts +4 -4
- package/dist/relay/contracts/contracts.js +4 -4
- package/dist/relay/contracts/index.d.ts +1 -0
- package/dist/relay/contracts/index.js +1 -0
- package/dist/relay/contracts/index.js.map +1 -1
- package/dist/relay/contracts/manual-supplement.d.ts +105 -0
- package/dist/relay/contracts/manual-supplement.js +27 -0
- package/dist/relay/contracts/manual-supplement.js.map +1 -0
- package/dist/relay/relay-container.js +1 -1
- package/dist/relay/relay-container.js.map +1 -1
- package/dist/sdk/codiac-sdk-for-cli.d.ts +2 -0
- package/dist/sdk/codiac-sdk-for-cli.js +19 -0
- package/dist/sdk/codiac-sdk-for-cli.js.map +1 -1
- package/dist/sdk/i-file-store-configurator.d.ts +1 -1
- package/dist/sdk/i-login-configurator.d.ts +2 -2
- package/dist/sdk-adapters/artifact-hub/helm-resource-configurator.d.ts +4 -4
- package/dist/sdk-adapters/artifact-hub/helm-resource-configurator.js.map +1 -1
- package/dist/sdk-adapters/aws/aws-resource-configurator.d.ts +5 -4
- package/dist/sdk-adapters/aws/aws-resource-configurator.js +8 -7
- package/dist/sdk-adapters/aws/aws-resource-configurator.js.map +1 -1
- package/dist/sdk-adapters/azure/az-interactive-login-configurator.d.ts +2 -2
- package/dist/sdk-adapters/azure/az-interactive-login-configurator.js.map +1 -1
- package/dist/sdk-adapters/azure/azure-resource-configurator.d.ts +3 -3
- package/dist/sdk-adapters/azure/azure-resource-configurator.js +9 -8
- package/dist/sdk-adapters/azure/azure-resource-configurator.js.map +1 -1
- package/dist/sdk-adapters/azure/entities/azure-filestore-def.d.ts +27 -0
- package/dist/sdk-adapters/azure/entities/azure-filestore-def.js +3 -0
- package/dist/sdk-adapters/azure/entities/azure-filestore-def.js.map +1 -0
- package/dist/sdk-adapters/docker-hub/docker-hub-resource-configurator.d.ts +4 -4
- package/dist/sdk-adapters/docker-hub/docker-hub-resource-configurator.js +12 -3
- package/dist/sdk-adapters/docker-hub/docker-hub-resource-configurator.js.map +1 -1
- package/dist/sdk-adapters/local-machine/local-machine-login-configurator.d.ts +2 -2
- package/dist/sdk-adapters/local-machine/local-machine-login-configurator.js.map +1 -1
- package/dist/sdk-adapters/local-machine/local-machine-resource-configurator.js +4 -4
- package/dist/sdk-adapters/local-machine/local-machine-resource-configurator.js.map +1 -1
- package/dist/uilogic/cloud-provider-contextualizer.d.ts +2 -2
- package/dist/uilogic/cloud-provider-contextualizer.js +2 -2
- package/dist/uilogic/cloud-provider-contextualizer.js.map +1 -1
- package/dist/uilogic/cloud-resource-configurator-factory.d.ts +9 -2
- package/dist/uilogic/cloud-resource-configurator-factory.js +24 -6
- package/dist/uilogic/cloud-resource-configurator-factory.js.map +1 -1
- package/dist/uilogic/cloud-resource-configurators/unsupported-resource-configurator.d.ts +4 -4
- package/dist/uilogic/cloud-resource-configurators/unsupported-resource-configurator.js +3 -5
- package/dist/uilogic/cloud-resource-configurators/unsupported-resource-configurator.js.map +1 -1
- package/dist/uilogic/config-ui-utils.d.ts +2 -2
- package/dist/uilogic/config-ui-utils.js +13 -13
- package/dist/uilogic/config-ui-utils.js.map +1 -1
- package/dist/uilogic/enterprise-contextualizer.d.ts +2 -2
- package/dist/uilogic/enterprise-contextualizer.js +1 -4
- package/dist/uilogic/enterprise-contextualizer.js.map +1 -1
- package/dist/uilogic/environment-contextualizer.d.ts +2 -2
- package/dist/uilogic/environment-contextualizer.js.map +1 -1
- package/dist/uilogic/image-configurator.d.ts +4 -5
- package/dist/uilogic/image-configurator.js.map +1 -1
- package/dist/uilogic/image-contextualizer.js.map +1 -1
- package/dist/uilogic/image-registry-contextualizer.d.ts +3 -3
- package/dist/uilogic/image-registry-contextualizer.js +2 -6
- package/dist/uilogic/image-registry-contextualizer.js.map +1 -1
- package/dist/uilogic/lrp-watcher-predef.js +2 -2
- package/dist/uilogic/lrp-watcher-predef.js.map +1 -1
- package/dist/uilogic/lrp-watcher-utils.d.ts +1 -1
- package/dist/uilogic/lrp-watcher-utils.js +4 -4
- package/dist/uilogic/lrp-watcher-utils.js.map +1 -1
- package/dist/uilogic/lrp-watcher.d.ts +1 -1
- package/dist/uilogic/lrp-watcher.js +4 -3
- package/dist/uilogic/lrp-watcher.js.map +1 -1
- package/dist/uilogic/rootmap-ui-utils.d.ts +2 -5
- package/dist/uilogic/rootmap-ui-utils.js.map +1 -1
- package/dist/uilogic/tenant-contextualizer.d.ts +2 -2
- package/dist/uilogic/tenant-contextualizer.js +41 -29
- package/dist/uilogic/tenant-contextualizer.js.map +1 -1
- package/dist/uilogic/type-safety-utils.d.ts +12 -1
- package/dist/uilogic/type-safety-utils.js +19 -1
- package/dist/uilogic/type-safety-utils.js.map +1 -1
- package/dist/user-context-loader.d.ts +2 -2
- package/dist/user-context-loader.js +5 -4
- package/dist/user-context-loader.js.map +1 -1
- package/oclif.manifest.json +21 -21
- package/package.json +16 -12
- package/dist/apis/codiac-api/gen/contracts.js.map +0 -1
- package/dist/apis/codiac-relay/gen/contracts.d.ts +0 -4792
- package/dist/apis/codiac-relay/gen/contracts.js +0 -635
- package/dist/apis/codiac-relay/gen/contracts.js.map +0 -1
- package/dist/cli-common/ImagesList.js +0 -67
- package/dist/cli-common/ImagesList.js.map +0 -1
- /package/dist/{cli-common/ImagesList.d.ts → apis/codiac-relay/gen/contracts-legacy.d.ts} +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TokenUtils = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const codiac_common_1 = require("@codiac.io/codiac-common");
|
|
6
|
+
const contracts_1 = require("@codiac.io/codiac-common/contracts");
|
|
7
|
+
const jwt_lib_1 = require("@codiac.io/jwt-lib");
|
|
8
|
+
const inversify_1 = require("inversify");
|
|
9
|
+
let TokenUtils = class TokenUtils {
|
|
10
|
+
constructor(logger) {
|
|
11
|
+
this.logger = logger;
|
|
12
|
+
}
|
|
13
|
+
/** Determines whether the given token is expired.
|
|
14
|
+
* @param throwOnError throws any encountered errors, including token parsing errors.
|
|
15
|
+
*/
|
|
16
|
+
isExpired(token, throwOnError = false) {
|
|
17
|
+
try {
|
|
18
|
+
const exp = this.extractTokenExpiration(token);
|
|
19
|
+
return (exp == undefined) || !(0, codiac_common_1.isFuture)(exp);
|
|
20
|
+
}
|
|
21
|
+
catch (err) {
|
|
22
|
+
let newErr = new contracts_1.CodiacError(`Error determining expiry status: ${err.message || ""}`, err);
|
|
23
|
+
this.logger.detail(newErr.message);
|
|
24
|
+
if (throwOnError) {
|
|
25
|
+
throw newErr;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
extractTokenExpiration(token) {
|
|
33
|
+
let exp;
|
|
34
|
+
try {
|
|
35
|
+
const encoder = new jwt_lib_1.JwtEncoder();
|
|
36
|
+
const tokenObj = encoder.tryDecode(token);
|
|
37
|
+
const CLAIM_KEY_FOR_EXPIRATION = "exp"; // this is just a standard claim so it ought to come from the jwt lib
|
|
38
|
+
const rawExp = tokenObj === null || tokenObj === void 0 ? void 0 : tokenObj.payload[CLAIM_KEY_FOR_EXPIRATION];
|
|
39
|
+
if (rawExp) {
|
|
40
|
+
try {
|
|
41
|
+
exp = new Date(rawExp);
|
|
42
|
+
this.logger.trace(`Exracted token expiration (utc): ${(exp === null || exp === void 0 ? void 0 : exp.toUTCString()) || "undefined"}`);
|
|
43
|
+
}
|
|
44
|
+
catch (_a) {
|
|
45
|
+
this.logger.trace(`Invalid date format in token expiration: [${rawExp}]`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return exp;
|
|
49
|
+
}
|
|
50
|
+
catch (err) {
|
|
51
|
+
throw new Error(`Error parsing expiration from token: ${err.message}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
extractRoles(token) {
|
|
55
|
+
var _a;
|
|
56
|
+
let roles;
|
|
57
|
+
try {
|
|
58
|
+
const encoder = new jwt_lib_1.JwtEncoder();
|
|
59
|
+
const tokenObj = encoder.tryDecode(token);
|
|
60
|
+
const CLAIM_KEY_FOR_ROLES = "roles"; // this is just a standard claim so it ought to come from the jwt lib
|
|
61
|
+
const rawValue = tokenObj === null || tokenObj === void 0 ? void 0 : tokenObj.payload[CLAIM_KEY_FOR_ROLES];
|
|
62
|
+
if (rawValue) {
|
|
63
|
+
try {
|
|
64
|
+
roles = rawValue.split(",");
|
|
65
|
+
this.logger.trace(`Extracted roles: ${rawValue || "undefined"}`);
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
this.logger.trace(`Error parsing roles from claim: [${(_a = err.message) !== null && _a !== void 0 ? _a : "no details available"}]`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return roles;
|
|
72
|
+
}
|
|
73
|
+
catch (err) {
|
|
74
|
+
throw new Error(`Error parsing expiration from token: ${err.message}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
TokenUtils = tslib_1.__decorate([
|
|
79
|
+
(0, inversify_1.injectable)(),
|
|
80
|
+
tslib_1.__param(0, (0, inversify_1.inject)(codiac_common_1.INTERFACES.IBetterLogger)),
|
|
81
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
82
|
+
], TokenUtils);
|
|
83
|
+
exports.TokenUtils = TokenUtils;
|
|
84
|
+
//# sourceMappingURL=token-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-utils.js","sourceRoot":"","sources":["../../../../src/apis/codiac-api/common/token-utils.ts"],"names":[],"mappings":";;;;AAAA,4DAA+E;AAC/E,kEAAiE;AACjE,gDAAgD;AAChD,yCAA+C;AAGxC,IAAM,UAAU,GAAhB,MAAM,UAAU;IAErB,YAAsD,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAE3E,CAAC;IAID;;OAEG;IACI,SAAS,CAAC,KAAa,EAAE,eAAwB,KAAK;QAC3D,IAAI;YACF,MAAM,GAAG,GAAG,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;YAC/C,OAAO,CAAC,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,IAAA,wBAAQ,EAAC,GAAG,CAAC,CAAC;SAC7C;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,MAAM,GAAG,IAAI,uBAAW,CAAC,oCAAoC,GAAG,CAAC,OAAO,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,CAAA;YAC1F,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACnC,IAAI,YAAY,EAAE;gBAChB,MAAM,MAAM,CAAC;aACd;iBAAM;gBACL,OAAO,IAAI,CAAC;aACb;SACF;IACH,CAAC;IAGM,sBAAsB,CAAC,KAAa;QACzC,IAAI,GAAqB,CAAC;QAC1B,IAAI;YACF,MAAM,OAAO,GAAG,IAAI,oBAAU,EAAE,CAAC;YACjC,MAAM,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YAC1C,MAAM,wBAAwB,GAAG,KAAK,CAAC,CAAE,qEAAqE;YAC9G,MAAM,MAAM,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAO,CAAC,wBAAwB,CAAC,CAAC;YAC3D,IAAI,MAAM,EAAE;gBACV,IAAI;oBACF,GAAG,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;oBACvB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,oCAAoC,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,WAAW,EAAE,KAAI,WAAW,EAAE,CAAC,CAAC;iBAC5F;gBAAC,WAAM;oBACN,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,6CAA6C,MAAM,GAAG,CAAC,CAAC;iBAC3E;aACF;YACD,OAAO,GAAG,CAAC;SACZ;QAAC,OAAO,GAAG,EAAE;YACZ,MAAM,IAAI,KAAK,CAAC,wCAAwC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;SACxE;IACH,CAAC;IAGM,YAAY,CAAC,KAAa;;QAC/B,IAAI,KAA2B,CAAC;QAChC,IAAI;YACF,MAAM,OAAO,GAAG,IAAI,oBAAU,EAAE,CAAC;YACjC,MAAM,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YAC1C,MAAM,mBAAmB,GAAG,OAAO,CAAC,CAAE,qEAAqE;YAC3G,MAAM,QAAQ,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;YACxD,IAAI,QAAQ,EAAE;gBACZ,IAAI;oBACF,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBAC5B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,QAAQ,IAAI,WAAW,EAAE,CAAC,CAAC;iBAClE;gBAAC,OAAO,GAAG,EAAE;oBACZ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,oCAAoC,MAAA,GAAG,CAAC,OAAO,mCAAI,sBAAsB,GAAG,CAAC,CAAC;iBACjG;aACF;YACD,OAAO,KAAK,CAAC;SACd;QAAC,OAAO,GAAG,EAAE;YACZ,MAAM,IAAI,KAAK,CAAC,wCAAwC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;SACxE;IACH,CAAC;CAEF,CAAA;AAtEY,UAAU;IADtB,IAAA,sBAAU,GAAE;IAGE,mBAAA,IAAA,kBAAM,EAAC,0BAAU,CAAC,aAAa,CAAC,CAAA;;GAFlC,UAAU,CAsEtB;AAtEY,gCAAU"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** The in-memory representation of the api client config file.
|
|
2
2
|
*/
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class CodiacRestClientConfig {
|
|
4
4
|
static readonly CONFIG_PATH: string;
|
|
5
5
|
static readonly CONFIG_FILENAME = "config.json";
|
|
6
6
|
private static loader;
|
|
7
|
-
static load():
|
|
7
|
+
static load(): CodiacRestClientConfig | undefined;
|
|
8
8
|
constructor();
|
|
9
9
|
apiBaseUrl: string | undefined;
|
|
10
10
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
2
|
+
var CodiacRestClientConfig_1;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.CodiacRestClientConfig = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
const os = require("os");
|
|
7
7
|
const path = require("path");
|
|
@@ -9,7 +9,7 @@ const inversify_1 = require("inversify");
|
|
|
9
9
|
const config_loader_1 = require("../common/config-loader");
|
|
10
10
|
/** The in-memory representation of the api client config file.
|
|
11
11
|
*/
|
|
12
|
-
let
|
|
12
|
+
let CodiacRestClientConfig = CodiacRestClientConfig_1 = class CodiacRestClientConfig {
|
|
13
13
|
static load() {
|
|
14
14
|
const os = require('os');
|
|
15
15
|
let cfg = this.loader.load(); // yeah this is real helpful - maybe we should just accept the .loader.load() syntax and expose the loader itself?
|
|
@@ -18,12 +18,12 @@ let CodiacClientConfig = CodiacClientConfig_1 = class CodiacClientConfig {
|
|
|
18
18
|
constructor() {
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
CodiacRestClientConfig.CONFIG_PATH = path.posix.join(os.homedir(), `.config`, `codiac-api-client`);
|
|
22
|
+
CodiacRestClientConfig.CONFIG_FILENAME = "config.json";
|
|
23
|
+
CodiacRestClientConfig.loader = new config_loader_1.ConfigLoader(CodiacRestClientConfig_1.CONFIG_PATH, CodiacRestClientConfig_1.CONFIG_FILENAME);
|
|
24
|
+
CodiacRestClientConfig = CodiacRestClientConfig_1 = tslib_1.__decorate([
|
|
25
25
|
(0, inversify_1.injectable)(),
|
|
26
26
|
tslib_1.__metadata("design:paramtypes", [])
|
|
27
|
-
],
|
|
28
|
-
exports.
|
|
27
|
+
], CodiacRestClientConfig);
|
|
28
|
+
exports.CodiacRestClientConfig = CodiacRestClientConfig;
|
|
29
29
|
//# sourceMappingURL=client-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-config.js","sourceRoot":"","sources":["../../../../src/apis/codiac-api/gen/client-config.ts"],"names":[],"mappings":";;;;;AAAA,yBAAyB;AACzB,6BAA6B;AAC7B,yCAAuC;AACvC,2DAAuD;AAGvD;GACG;AAEI,IAAM,
|
|
1
|
+
{"version":3,"file":"client-config.js","sourceRoot":"","sources":["../../../../src/apis/codiac-api/gen/client-config.ts"],"names":[],"mappings":";;;;;AAAA,yBAAyB;AACzB,6BAA6B;AAC7B,yCAAuC;AACvC,2DAAuD;AAGvD;GACG;AAEI,IAAM,sBAAsB,8BAA5B,MAAM,sBAAsB;IAKjC,MAAM,CAAC,IAAI;QACT,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAEzB,IAAI,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAE,kHAAkH;QACjJ,OAAO,GAAG,CAAC;IACb,CAAC;IAED;IAEA,CAAC;;AAbsB,kCAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,mBAAmB,CAAC,CAAC;AAC5E,sCAAe,GAAG,aAAa,CAAC;AACxC,6BAAM,GAAG,IAAI,4BAAY,CAAyB,wBAAsB,CAAC,WAAW,EAAE,wBAAsB,CAAC,eAAe,CAAC,CAAA;AAHjI,sBAAsB;IADlC,IAAA,sBAAU,GAAE;;GACA,sBAAsB,CAgBlC;AAhBY,wDAAsB"}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import { interfaces } from "inversify";
|
|
1
4
|
import { IRepoOptions, IBetterLogger } from "@codiac.io/codiac-common";
|
|
2
|
-
import {
|
|
5
|
+
import { ListResult, BatchResult, SingleResult, PatchSpecForOne, PatchSpecForMany, UpdatePartialWhereRequest, IdSpecFor } from "@codiac.io/codiac-common/contracts";
|
|
3
6
|
import { ApiClientBase } from "../common/api-client-base";
|
|
4
7
|
import { ApiCrudClientBase } from "../common/api-crud-client-base";
|
|
5
8
|
import { ApiUserCreds } from "../common/api-user-creds";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
9
|
+
import { CodiacRestClientConfig } from "./client-config";
|
|
10
|
+
import { ICodiacClient } from "../i-client";
|
|
8
11
|
export interface IThrowingRepoOptions extends IRepoOptions {
|
|
9
12
|
throwNotFound?: boolean;
|
|
10
13
|
}
|
|
11
|
-
export declare class
|
|
12
|
-
static bootstrap(logger?: IBetterLogger): void;
|
|
14
|
+
export declare class CodiacRestClient extends ApiCrudClientBase implements ICodiacClient {
|
|
15
|
+
static bootstrap(ioc: interfaces.Container, logger?: IBetterLogger): void;
|
|
13
16
|
/** Version of the remote api from which this client was generated */
|
|
14
17
|
static apiVersion: string;
|
|
15
18
|
static DEFAULT_API_URL: string;
|
|
@@ -17,14 +20,13 @@ export declare class CodiacClient extends ApiCrudClientBase {
|
|
|
17
20
|
* TODO: Get this from a config that is copied from the server proiject to the client project on build.
|
|
18
21
|
*/
|
|
19
22
|
/** This factory method is just for convenience and hasty backward compatibility with consumers not using ioc. */
|
|
20
|
-
static create(logger: IBetterLogger, apiRootUrl?: string, authToken?: string):
|
|
23
|
+
static create(logger: IBetterLogger, apiRootUrl?: string, authToken?: string): CodiacRestClient;
|
|
21
24
|
/** Local interface for the remote api.
|
|
22
25
|
* @param settings (optional) configuration (ie: apiRootUrl) to use for the client. If not provided settings will be loaded from the config file on the local machine.
|
|
23
26
|
*
|
|
24
27
|
*/
|
|
25
|
-
constructor(logger: IBetterLogger, settings?:
|
|
28
|
+
constructor(logger: IBetterLogger, settings?: CodiacRestClientConfig, credentials?: ApiUserCreds);
|
|
26
29
|
protected GetDefaultRootUrl(): string;
|
|
27
|
-
AuthLegacy: ApiAuthMethodsLegacy;
|
|
28
30
|
Auth: AuthOperations;
|
|
29
31
|
Call: OtherOperations;
|
|
30
32
|
ActivityBase: ActivityBaseCruds;
|
|
@@ -145,13 +147,12 @@ declare class AuthOperations {
|
|
|
145
147
|
SwitchTenant(request: SwitchTenantRequest, options?: IRepoOptions): Promise<SingleResult<TenantUser>>;
|
|
146
148
|
TenantRegistration(request: TenantRegistrationRequest, options?: IRepoOptions): Promise<SingleResult<AuthTenant>>;
|
|
147
149
|
TokenRefresh(request: RefreshTokenRequest, options?: IRepoOptions): Promise<SingleResult<TenantUser>>;
|
|
148
|
-
WhoAmI(request: WhoAmIRequest, options?: IRepoOptions): Promise<
|
|
150
|
+
WhoAmI(request: WhoAmIRequest, options?: IRepoOptions): Promise<SingleResult<TenantUser>>;
|
|
149
151
|
/** Determines whether the given token is expired.
|
|
150
152
|
* @param throwOnError throws any encountered errors, including token parsing errors.
|
|
151
153
|
*/
|
|
152
154
|
isExpired(token: string, throwOnError?: boolean): boolean;
|
|
153
155
|
extractTokenExpiration(token: string): Date | undefined;
|
|
154
|
-
extractRoles(token: string): string[] | undefined;
|
|
155
156
|
}
|
|
156
157
|
import { ActivityBase, ActivityCriteriaBase } from "../contracts";
|
|
157
158
|
declare class ActivityBaseCruds {
|
|
@@ -2560,7 +2561,7 @@ declare class ZombiePeriodCruds {
|
|
|
2560
2561
|
tryUpsertMany(request: Array<ZombiePeriod>, options?: IRepoOptions): Promise<BatchResult<ZombiePeriod>>;
|
|
2561
2562
|
upsertMany(request: Array<ZombiePeriod>, options?: IThrowingRepoOptions): Promise<ZombiePeriod[]>;
|
|
2562
2563
|
}
|
|
2563
|
-
import { ApiReadyState,
|
|
2564
|
+
import { ApiReadyState, AssetWhereRequest, CabinetAssetVersion, CabinetConfigState, CabinetConfigStateRequest, CabinetHostNameConfig, CabinetHostNameConfigCriteria, CabinetScopesCriteria, ClusterAttachRequest, ClusterDetachRequest, ConfigDef, ConfigDefCriteria, ConfigDoc, ConfigDocSpecForOne, EnterpriseScope, EnterpriseState, EnterpriseStateRequest, FileRequest, HeartbeatRecord, ReadyStateRequest, RootMap, RootMapCriteria, ScopedConfig, ScopedConfigCriteria, VersionGetsertRequest } from "../contracts";
|
|
2564
2565
|
declare class OtherOperations {
|
|
2565
2566
|
private core;
|
|
2566
2567
|
constructor(core: ApiCrudClientBase);
|
|
@@ -2571,7 +2572,7 @@ declare class OtherOperations {
|
|
|
2571
2572
|
/** Assembles (via smashMerge) the host naming strategy configuration for each applicable cabinet. Allows deeper filtering on domain names and types of host name strategies. */
|
|
2572
2573
|
GetCabinetHostNameConfig(request: CabinetHostNameConfigCriteria, options?: IRepoOptions): Promise<ListResult<CabinetHostNameConfig>>;
|
|
2573
2574
|
/** Shows the cabinets to which the given asset is currently deployed and which version is where. */
|
|
2574
|
-
assetWhere(request:
|
|
2575
|
+
assetWhere(request: AssetWhereRequest, options?: IRepoOptions): Promise<ListResult<CabinetAssetVersion>>;
|
|
2575
2576
|
/** Retrieves the enterprise configuration currently in play in a single given cabinet,
|
|
2576
2577
|
in terms of versions of the enterprise and its assets.
|
|
2577
2578
|
This is a composite/hybrid object made up of a Cabinet, EnterpriseVersionConfig and an EnterpriseRunState.
|
|
@@ -2593,6 +2594,10 @@ declare class OtherOperations {
|
|
|
2593
2594
|
getSwaggerUiPath(request: FileRequest, options?: IRepoOptions): Promise<Buffer>;
|
|
2594
2595
|
/** Assembles an enterprise version configuration by overlaying the given assets onto an optional existing enterprise version, and either creates a new version record for it or retrieves one if that configuration already exists. Assets are automatically placed within their respective products if applicable. */
|
|
2595
2596
|
getsertVersion(request: VersionGetsertRequest, options?: IRepoOptions): Promise<SingleResult<EnterpriseVersionConfig>>;
|
|
2597
|
+
/** Lightweight endpoint returning the last heartbeat as a UTC standard format date string (retrieves from ENV variable: HEARTBEAT_LAST). */
|
|
2598
|
+
heartbeat(request: Object, options?: IRepoOptions): Promise<void>;
|
|
2599
|
+
/** Lightweight endpoint returning the last heartbeat object as a JSON string (retrieves from ENV variable: HEARTBEAT_JSON). */
|
|
2600
|
+
heartbeatJson(request: Object, options?: IRepoOptions): Promise<HeartbeatRecord>;
|
|
2596
2601
|
readyState(request: ReadyStateRequest, options?: IRepoOptions): Promise<ApiReadyState>;
|
|
2597
2602
|
/** File serve for the relay service. */
|
|
2598
2603
|
relayResources(request: FileRequest, options?: IRepoOptions): Promise<Buffer>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
2
|
+
var CodiacRestClient_1;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.CodiacRestClient = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
const inversify_1 = require("inversify");
|
|
7
7
|
const codiac_common_1 = require("@codiac.io/codiac-common");
|
|
@@ -9,7 +9,6 @@ const contracts_1 = require("@codiac.io/codiac-common/contracts");
|
|
|
9
9
|
const api_crud_client_base_1 = require("../common/api-crud-client-base");
|
|
10
10
|
const api_user_creds_1 = require("../common/api-user-creds");
|
|
11
11
|
const client_config_1 = require("./client-config");
|
|
12
|
-
const api_auth_methods_legacy_1 = require("../common/security/api-auth-methods-legacy");
|
|
13
12
|
function headersFrom(options, existingHeaders) {
|
|
14
13
|
let output;
|
|
15
14
|
// FROM the api base...
|
|
@@ -24,25 +23,32 @@ function headersFrom(options, existingHeaders) {
|
|
|
24
23
|
}
|
|
25
24
|
return output;
|
|
26
25
|
}
|
|
27
|
-
let
|
|
28
|
-
static bootstrap(logger) {
|
|
26
|
+
let CodiacRestClient = CodiacRestClient_1 = class CodiacRestClient extends api_crud_client_base_1.ApiCrudClientBase {
|
|
27
|
+
static bootstrap(ioc, logger) {
|
|
29
28
|
super.bootstrap_base([], logger);
|
|
29
|
+
// // Unfortunately, we cant set this binding in the cli,
|
|
30
|
+
// // because the dependencies need to be drawn from
|
|
31
|
+
// // lazy-loaded properties on the command object
|
|
32
|
+
// // (or we will end up with multiple instances of them).
|
|
33
|
+
// // TODO: Consider binding all as singletons in the cli (or adding an "asSingleton" flag to all the bootstrap methods). eg: logger, ApiClient, NatsClient, UserContext, TenantContextualizer...
|
|
34
|
+
// ioc.bind(CodiacRestClient).toSelf();
|
|
30
35
|
}
|
|
31
36
|
/** Hardcoded to match the current setting on the server.
|
|
32
37
|
* TODO: Get this from a config that is copied from the server proiject to the client project on build.
|
|
33
38
|
*/
|
|
34
39
|
/** This factory method is just for convenience and hasty backward compatibility with consumers not using ioc. */
|
|
35
40
|
static create(logger, apiRootUrl, authToken) {
|
|
36
|
-
|
|
41
|
+
const creds = (authToken) ? { apiToken: authToken } : undefined;
|
|
42
|
+
return new CodiacRestClient_1(logger, { apiBaseUrl: apiRootUrl }, creds);
|
|
37
43
|
}
|
|
38
44
|
/** Local interface for the remote api.
|
|
39
45
|
* @param settings (optional) configuration (ie: apiRootUrl) to use for the client. If not provided settings will be loaded from the config file on the local machine.
|
|
40
46
|
*
|
|
41
47
|
*/
|
|
42
48
|
constructor(logger, settings, credentials) {
|
|
43
|
-
let ultimateSettings = settings !== null && settings !== void 0 ? settings : client_config_1.
|
|
49
|
+
let ultimateSettings = settings !== null && settings !== void 0 ? settings : client_config_1.CodiacRestClientConfig.load(); // load up default settings if not specified
|
|
44
50
|
super(logger, ultimateSettings === null || ultimateSettings === void 0 ? void 0 : ultimateSettings.apiBaseUrl, credentials === null || credentials === void 0 ? void 0 : credentials.apiToken);
|
|
45
|
-
|
|
51
|
+
// public AuthLegacy = new ApiAuthMethodsLegacy(this, this.logger);
|
|
46
52
|
this.Auth = new AuthOperations(this, this.logger);
|
|
47
53
|
this.Call = new OtherOperations(this);
|
|
48
54
|
// ====================================================================================================
|
|
@@ -99,31 +105,21 @@ let CodiacClient = CodiacClient_1 = class CodiacClient extends api_crud_client_b
|
|
|
99
105
|
this.ZombiePeriod = new ZombiePeriodCruds(this);
|
|
100
106
|
}
|
|
101
107
|
GetDefaultRootUrl() {
|
|
102
|
-
return
|
|
108
|
+
return CodiacRestClient_1.DEFAULT_API_URL;
|
|
103
109
|
}
|
|
104
|
-
}; // end class
|
|
110
|
+
}; // end class CodiacRestClient
|
|
105
111
|
/** Version of the remote api from which this client was generated */
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
112
|
+
CodiacRestClient.apiVersion = "version";
|
|
113
|
+
CodiacRestClient.DEFAULT_API_URL = "https://api.codiac.io";
|
|
114
|
+
CodiacRestClient = CodiacRestClient_1 = tslib_1.__decorate([
|
|
109
115
|
(0, inversify_1.injectable)(),
|
|
110
116
|
tslib_1.__param(0, (0, inversify_1.inject)(codiac_common_1.INTERFACES.IBetterLogger)),
|
|
111
|
-
tslib_1.__param(1, (0, inversify_1.inject)(client_config_1.
|
|
117
|
+
tslib_1.__param(1, (0, inversify_1.inject)(client_config_1.CodiacRestClientConfig)),
|
|
112
118
|
tslib_1.__param(2, (0, inversify_1.inject)(api_user_creds_1.ApiUserCreds)),
|
|
113
|
-
tslib_1.__metadata("design:paramtypes", [Object, client_config_1.
|
|
119
|
+
tslib_1.__metadata("design:paramtypes", [Object, client_config_1.CodiacRestClientConfig,
|
|
114
120
|
api_user_creds_1.ApiUserCreds])
|
|
115
|
-
],
|
|
116
|
-
exports.
|
|
117
|
-
// // EXAMPLE
|
|
118
|
-
// let client = new CodiacClient(new BetterConsoleLogger());
|
|
119
|
-
// let wf: WorkFlowStrategy = {
|
|
120
|
-
// name: "setup",
|
|
121
|
-
// created: new Date(),
|
|
122
|
-
// createdBy: "",
|
|
123
|
-
// modified: new Date(),
|
|
124
|
-
// modifiedBy: ""
|
|
125
|
-
// };
|
|
126
|
-
// let res = await client.WorkFlowStrategy.trycreate(wf);
|
|
121
|
+
], CodiacRestClient);
|
|
122
|
+
exports.CodiacRestClient = CodiacRestClient;
|
|
127
123
|
// ====================================================================================================
|
|
128
124
|
// AUTH ENDPOINT CLASS
|
|
129
125
|
// ====================================================================================================
|
|
@@ -1007,29 +1003,6 @@ class AuthOperations {
|
|
|
1007
1003
|
throw new Error(`Error parsing expiration from token: ${err.message}`);
|
|
1008
1004
|
}
|
|
1009
1005
|
}
|
|
1010
|
-
extractRoles(token) {
|
|
1011
|
-
var _a;
|
|
1012
|
-
let roles;
|
|
1013
|
-
try {
|
|
1014
|
-
const encoder = new jwt_lib_1.JwtEncoder();
|
|
1015
|
-
const tokenObj = encoder.tryDecode(token);
|
|
1016
|
-
const CLAIM_KEY_FOR_ROLES = "roles"; // this is just a standard claim so it ought to come from the jwt lib
|
|
1017
|
-
const rawValue = tokenObj === null || tokenObj === void 0 ? void 0 : tokenObj.payload[CLAIM_KEY_FOR_ROLES];
|
|
1018
|
-
if (rawValue) {
|
|
1019
|
-
try {
|
|
1020
|
-
roles = rawValue.split(",");
|
|
1021
|
-
this.logger.trace(`Extracted roles: ${rawValue || "undefined"}`);
|
|
1022
|
-
}
|
|
1023
|
-
catch (err) {
|
|
1024
|
-
this.logger.trace(`Error parsing roles from claim: [${(_a = err.message) !== null && _a !== void 0 ? _a : "no details available"}]`);
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
return roles;
|
|
1028
|
-
}
|
|
1029
|
-
catch (err) {
|
|
1030
|
-
throw new Error(`Error parsing expiration from token: ${err.message}`);
|
|
1031
|
-
}
|
|
1032
|
-
}
|
|
1033
1006
|
}
|
|
1034
1007
|
class ActivityBaseCruds {
|
|
1035
1008
|
constructor(core) {
|
|
@@ -16092,7 +16065,7 @@ class OtherOperations {
|
|
|
16092
16065
|
/** Retrieves all available enterprises, environments, cabinets, and clusters for the given tenant. */
|
|
16093
16066
|
getCabinetScopes(request, options) {
|
|
16094
16067
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
16095
|
-
return yield this.core.makeAnyRestCall({ entityTypeName: "", isMany: false, op: "getCabinetScopes", route: "/scopes", verb: codiac_common_1.httpRestVerb.GET }, request, options);
|
|
16068
|
+
return yield this.core.makeAnyRestCall({ entityTypeName: "", isMany: false, op: "getCabinetScopes", route: "/scopes(/)", verb: codiac_common_1.httpRestVerb.GET }, request, options);
|
|
16096
16069
|
});
|
|
16097
16070
|
}
|
|
16098
16071
|
/** Retrieves the list of currently declared config files for the given enterprise asset. */
|
|
@@ -16136,6 +16109,18 @@ class OtherOperations {
|
|
|
16136
16109
|
return yield this.core.makeAnyRestCall({ entityTypeName: "", isMany: false, op: "getsertVersion", route: "/version-factory", verb: codiac_common_1.httpRestVerb.POST }, request, options);
|
|
16137
16110
|
});
|
|
16138
16111
|
}
|
|
16112
|
+
/** Lightweight endpoint returning the last heartbeat as a UTC standard format date string (retrieves from ENV variable: HEARTBEAT_LAST). */
|
|
16113
|
+
heartbeat(request, options) {
|
|
16114
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
16115
|
+
return yield this.core.makeAnyRestCall({ entityTypeName: "", isMany: false, op: "heartbeat", route: "/heartbeat", verb: codiac_common_1.httpRestVerb.GET }, request, options);
|
|
16116
|
+
});
|
|
16117
|
+
}
|
|
16118
|
+
/** Lightweight endpoint returning the last heartbeat object as a JSON string (retrieves from ENV variable: HEARTBEAT_JSON). */
|
|
16119
|
+
heartbeatJson(request, options) {
|
|
16120
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
16121
|
+
return yield this.core.makeAnyRestCall({ entityTypeName: "", isMany: false, op: "heartbeatJson", route: "/heartbeat-json", verb: codiac_common_1.httpRestVerb.GET }, request, options);
|
|
16122
|
+
});
|
|
16123
|
+
}
|
|
16139
16124
|
readyState(request, options) {
|
|
16140
16125
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
16141
16126
|
return yield this.core.makeAnyRestCall({ entityTypeName: "", isMany: false, op: "readyState", route: "/ready-state", verb: codiac_common_1.httpRestVerb.GET }, request, options);
|
|
@@ -16148,38 +16133,4 @@ class OtherOperations {
|
|
|
16148
16133
|
});
|
|
16149
16134
|
}
|
|
16150
16135
|
}
|
|
16151
|
-
// // ===================================================================================
|
|
16152
|
-
// // THROWING REPO
|
|
16153
|
-
// // ===================================================================================
|
|
16154
|
-
//
|
|
16155
|
-
//
|
|
16156
|
-
// import { IRepoOptions, IDomainEntity, classDef } from "@codiac.io/codiac-common";
|
|
16157
|
-
// import * as contracts from "@codiac.io/codiac-common/contracts";
|
|
16158
|
-
//
|
|
16159
|
-
//
|
|
16160
|
-
// export interface IThrowingRepoOptions extends IRepoOptions {
|
|
16161
|
-
// throwNotFound?: boolean;
|
|
16162
|
-
// }
|
|
16163
|
-
//
|
|
16164
|
-
//
|
|
16165
|
-
// /** HACK: This class exists ONLY because the client does not implement IRepo, so we cannot use ThrowingRepoWrapper.
|
|
16166
|
-
// * because the client needs criteriaType argument on tryReadMany, tryPatchWhere, and tryDeleteWhere.
|
|
16167
|
-
// *
|
|
16168
|
-
// * Wraps repo methods to throw on error or when unsuccessful.
|
|
16169
|
-
// * EXCEPT read, which can return undefined when none found
|
|
16170
|
-
// * and readMany which can return an empty array when none found.
|
|
16171
|
-
// */
|
|
16172
|
-
// @injectable()
|
|
16173
|
-
// export class ThrowingCodiacClient /* implements IThrowingRepo */ {
|
|
16174
|
-
// constructor(@inject(CodiacClient) public repo: CodiacClient) {
|
|
16175
|
-
// }
|
|
16176
|
-
//
|
|
16177
|
-
// // startTransaction(): Promise<void> { return this.repo.startTransaction(); }
|
|
16178
|
-
// // commit(): Promise<void> { return this.repo.commit(); }
|
|
16179
|
-
// // rollback(): Promise<void> { return this.repo.rollback(); }
|
|
16180
|
-
//
|
|
16181
|
-
//
|
|
16182
|
-
//
|
|
16183
|
-
//
|
|
16184
|
-
// }
|
|
16185
16136
|
//# sourceMappingURL=client.js.map
|