@credibledata/cred-cli 0.0.103 → 0.0.105
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 +106 -1
- package/dist/agent-contract.spec.js +548 -0
- package/dist/agent-contract.spec.js.map +1 -0
- package/dist/browser.js +72 -0
- package/dist/browser.js.map +1 -0
- package/dist/browser.spec.js +125 -0
- package/dist/browser.spec.js.map +1 -0
- package/dist/client/api.js +4137 -1159
- package/dist/client/api.js.map +1 -1
- package/dist/client-codeassist/api.js +476 -0
- package/dist/client-codeassist/api.js.map +1 -0
- package/dist/client-codeassist/base.js +69 -0
- package/dist/client-codeassist/base.js.map +1 -0
- package/dist/client-codeassist/common.js +162 -0
- package/dist/client-codeassist/common.js.map +1 -0
- package/dist/client-codeassist/configuration.js +44 -0
- package/dist/client-codeassist/configuration.js.map +1 -0
- package/dist/client-codeassist/index.js +32 -0
- package/dist/client-codeassist/index.js.map +1 -0
- package/dist/clientconfiguration.js +17 -289
- package/dist/clientconfiguration.js.map +1 -1
- package/dist/clientconfiguration.spec.js +35 -96
- package/dist/clientconfiguration.spec.js.map +1 -1
- package/dist/commands/add.js +103 -3
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/add.spec.js +113 -0
- package/dist/commands/add.spec.js.map +1 -0
- package/dist/commands/connection/createconnections.js +104 -7
- package/dist/commands/connection/createconnections.js.map +1 -1
- package/dist/commands/connection/createconnections.spec.js +35 -1
- package/dist/commands/connection/createconnections.spec.js.map +1 -1
- package/dist/commands/connection/deleteconnection.js +4 -2
- package/dist/commands/connection/deleteconnection.js.map +1 -1
- package/dist/commands/connection/deleteconnection.spec.js +6 -1
- package/dist/commands/connection/deleteconnection.spec.js.map +1 -1
- package/dist/commands/connection/listconnections.js +2 -0
- package/dist/commands/connection/listconnections.js.map +1 -1
- package/dist/commands/connection/updateconnection.js +365 -0
- package/dist/commands/connection/updateconnection.js.map +1 -0
- package/dist/commands/connection/updateconnection.spec.js +625 -0
- package/dist/commands/connection/updateconnection.spec.js.map +1 -0
- package/dist/commands/database/createdatabase.js +52 -0
- package/dist/commands/database/createdatabase.js.map +1 -0
- package/dist/commands/database/database.spec.js +267 -0
- package/dist/commands/database/database.spec.js.map +1 -0
- package/dist/commands/database/deletedatabase.js +91 -0
- package/dist/commands/database/deletedatabase.js.map +1 -0
- package/dist/commands/database/getdatabase.js +97 -0
- package/dist/commands/database/getdatabase.js.map +1 -0
- package/dist/commands/database/listdatabases.js +36 -0
- package/dist/commands/database/listdatabases.js.map +1 -0
- package/dist/commands/database/shared.js +125 -0
- package/dist/commands/database/shared.js.map +1 -0
- package/dist/commands/database/shared.spec.js +109 -0
- package/dist/commands/database/shared.spec.js.map +1 -0
- package/dist/commands/database/updatedatabase.js +39 -0
- package/dist/commands/database/updatedatabase.js.map +1 -0
- package/dist/commands/environment/createenvironment.js +59 -28
- package/dist/commands/environment/createenvironment.js.map +1 -1
- package/dist/commands/environment/createenvironment.spec.js +29 -0
- package/dist/commands/environment/createenvironment.spec.js.map +1 -1
- package/dist/commands/environment/deleteenvironment.js +3 -2
- package/dist/commands/environment/deleteenvironment.js.map +1 -1
- package/dist/commands/environment/deleteenvironment.spec.js +5 -1
- package/dist/commands/environment/deleteenvironment.spec.js.map +1 -1
- package/dist/commands/environment/getenvironment.js +1 -0
- package/dist/commands/environment/getenvironment.js.map +1 -1
- package/dist/commands/environment/listenvironments.js +40 -8
- package/dist/commands/environment/listenvironments.js.map +1 -1
- package/dist/commands/environment/listenvironments.spec.js +41 -2
- package/dist/commands/environment/listenvironments.spec.js.map +1 -1
- package/dist/commands/environment/setenvironment.js +145 -6
- package/dist/commands/environment/setenvironment.js.map +1 -1
- package/dist/commands/environment/setenvironment.spec.js +256 -8
- package/dist/commands/environment/setenvironment.spec.js.map +1 -1
- package/dist/commands/environment/updateenvironment.js +12 -8
- package/dist/commands/environment/updateenvironment.js.map +1 -1
- package/dist/commands/environment/updateenvironment.spec.js +36 -2
- package/dist/commands/environment/updateenvironment.spec.js.map +1 -1
- package/dist/commands/get.js +64 -1
- package/dist/commands/get.js.map +1 -1
- package/dist/commands/group/addmember.js +3 -1
- package/dist/commands/group/addmember.js.map +1 -1
- package/dist/commands/group/addmember.spec.js +7 -2
- package/dist/commands/group/addmember.spec.js.map +1 -1
- package/dist/commands/group/creategroup.js +2 -0
- package/dist/commands/group/creategroup.js.map +1 -1
- package/dist/commands/group/deletegroup.js +3 -1
- package/dist/commands/group/deletegroup.js.map +1 -1
- package/dist/commands/group/deletegroup.spec.js +7 -1
- package/dist/commands/group/deletegroup.spec.js.map +1 -1
- package/dist/commands/group/getgroup.js +2 -0
- package/dist/commands/group/getgroup.js.map +1 -1
- package/dist/commands/group/listgroups.js +2 -0
- package/dist/commands/group/listgroups.js.map +1 -1
- package/dist/commands/group/removemember.js +3 -1
- package/dist/commands/group/removemember.js.map +1 -1
- package/dist/commands/group/removemember.spec.js +7 -2
- package/dist/commands/group/removemember.spec.js.map +1 -1
- package/dist/commands/groupaccesstoken/deleteToken.js +2 -1
- package/dist/commands/groupaccesstoken/deleteToken.js.map +1 -1
- package/dist/commands/groupaccesstoken/groupContainer.js +2 -0
- package/dist/commands/groupaccesstoken/groupContainer.js.map +1 -1
- package/dist/commands/list.js +24 -4
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/materialization/cancelrun.js +3 -1
- package/dist/commands/materialization/cancelrun.js.map +1 -1
- package/dist/commands/materialization/getindex.js +2 -0
- package/dist/commands/materialization/getindex.js.map +1 -1
- package/dist/commands/materialization/getmaterialization.js +2 -0
- package/dist/commands/materialization/getmaterialization.js.map +1 -1
- package/dist/commands/materialization/getpreaggregate.js +2 -0
- package/dist/commands/materialization/getpreaggregate.js.map +1 -1
- package/dist/commands/materialization/getrun.js +2 -0
- package/dist/commands/materialization/getrun.js.map +1 -1
- package/dist/commands/materialization/listindexes.js +2 -0
- package/dist/commands/materialization/listindexes.js.map +1 -1
- package/dist/commands/materialization/listmaterializations.js +2 -0
- package/dist/commands/materialization/listmaterializations.js.map +1 -1
- package/dist/commands/materialization/listpreaggregates.js +2 -0
- package/dist/commands/materialization/listpreaggregates.js.map +1 -1
- package/dist/commands/materialization/listruns.js +3 -1
- package/dist/commands/materialization/listruns.js.map +1 -1
- package/dist/commands/materialization/rerun.js +3 -1
- package/dist/commands/materialization/rerun.js.map +1 -1
- package/dist/commands/misc/inquirerHost.js +87 -0
- package/dist/commands/misc/inquirerHost.js.map +1 -0
- package/dist/commands/misc/inquirerHost.spec.js +91 -0
- package/dist/commands/misc/inquirerHost.spec.js.map +1 -0
- package/dist/commands/misc/login.js +348 -58
- package/dist/commands/misc/login.js.map +1 -1
- package/dist/commands/misc/login.spec.js +525 -7
- package/dist/commands/misc/login.spec.js.map +1 -1
- package/dist/commands/misc/logout.js +26 -3
- package/dist/commands/misc/logout.js.map +1 -1
- package/dist/commands/misc/logout.spec.js +52 -12
- package/dist/commands/misc/logout.spec.js.map +1 -1
- package/dist/commands/misc/resolveLoginTarget.spec.js +90 -0
- package/dist/commands/misc/resolveLoginTarget.spec.js.map +1 -0
- package/dist/commands/misc/scope.spec.js +108 -0
- package/dist/commands/misc/scope.spec.js.map +1 -0
- package/dist/commands/misc/set-access-token.js +1 -1
- package/dist/commands/misc/set-access-token.js.map +1 -1
- package/dist/commands/misc/set-access-token.spec.js +13 -2
- package/dist/commands/misc/set-access-token.spec.js.map +1 -1
- package/dist/commands/misc/setup.js +819 -0
- package/dist/commands/misc/setup.js.map +1 -0
- package/dist/commands/misc/setup.spec.js +783 -0
- package/dist/commands/misc/setup.spec.js.map +1 -0
- package/dist/commands/misc/status.js +168 -0
- package/dist/commands/misc/status.js.map +1 -0
- package/dist/commands/misc/status.spec.js +301 -0
- package/dist/commands/misc/status.spec.js.map +1 -0
- package/dist/commands/misc/token.js +57 -0
- package/dist/commands/misc/token.js.map +1 -0
- package/dist/commands/misc/token.spec.js +92 -0
- package/dist/commands/misc/token.spec.js.map +1 -0
- package/dist/commands/package/deletepackage.js +4 -2
- package/dist/commands/package/deletepackage.js.map +1 -1
- package/dist/commands/package/deletepackage.spec.js +7 -1
- package/dist/commands/package/deletepackage.spec.js.map +1 -1
- package/dist/commands/package/getpackage.js +142 -0
- package/dist/commands/package/getpackage.js.map +1 -0
- package/dist/commands/package/getpackage.spec.js +246 -0
- package/dist/commands/package/getpackage.spec.js.map +1 -0
- package/dist/commands/package/listpackages.js +2 -0
- package/dist/commands/package/listpackages.js.map +1 -1
- package/dist/commands/package/publish.archive.spec.js +570 -0
- package/dist/commands/package/publish.archive.spec.js.map +1 -0
- package/dist/commands/package/publish.js +780 -49
- package/dist/commands/package/publish.js.map +1 -1
- package/dist/commands/package/publish.spec.js +451 -8
- package/dist/commands/package/publish.spec.js.map +1 -1
- package/dist/commands/package/updatepackage.js +22 -19
- package/dist/commands/package/updatepackage.js.map +1 -1
- package/dist/commands/package/updatepackage.spec.js +36 -1
- package/dist/commands/package/updatepackage.spec.js.map +1 -1
- package/dist/commands/permission/createpermission.js +3 -1
- package/dist/commands/permission/createpermission.js.map +1 -1
- package/dist/commands/permission/deletepermission.js +6 -3
- package/dist/commands/permission/deletepermission.js.map +1 -1
- package/dist/commands/permission/getpermission.js +2 -0
- package/dist/commands/permission/getpermission.js.map +1 -1
- package/dist/commands/permission/listpermissions.js +2 -0
- package/dist/commands/permission/listpermissions.js.map +1 -1
- package/dist/commands/rm.js +21 -0
- package/dist/commands/rm.js.map +1 -1
- package/dist/commands/set.js +40 -6
- package/dist/commands/set.js.map +1 -1
- package/dist/commands/set.spec.js +123 -0
- package/dist/commands/set.spec.js.map +1 -0
- package/dist/commands/table/addtable.js +155 -0
- package/dist/commands/table/addtable.js.map +1 -0
- package/dist/commands/table/deletetable.js +45 -0
- package/dist/commands/table/deletetable.js.map +1 -0
- package/dist/commands/table/gettable.js +32 -0
- package/dist/commands/table/gettable.js.map +1 -0
- package/dist/commands/table/listtables.js +36 -0
- package/dist/commands/table/listtables.js.map +1 -0
- package/dist/commands/table/table.spec.js +304 -0
- package/dist/commands/table/table.spec.js.map +1 -0
- package/dist/commands/table/tablefile.js +195 -0
- package/dist/commands/table/tablefile.js.map +1 -0
- package/dist/commands/table/tablefile.spec.js +158 -0
- package/dist/commands/table/tablefile.spec.js.map +1 -0
- package/dist/commands/update.js +21 -0
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/version/archive-unarchive-version.js +4 -2
- package/dist/commands/version/archive-unarchive-version.js.map +1 -1
- package/dist/commands/version/archive-unarchive-version.spec.js +6 -1
- package/dist/commands/version/archive-unarchive-version.spec.js.map +1 -1
- package/dist/commands/version/listversions.js +2 -0
- package/dist/commands/version/listversions.js.map +1 -1
- package/dist/common/UserGroupId.js +9 -4
- package/dist/common/UserGroupId.js.map +1 -1
- package/dist/common/UserGroupId.spec.js +5 -0
- package/dist/common/UserGroupId.spec.js.map +1 -1
- package/dist/constants.js +37 -143
- package/dist/constants.js.map +1 -1
- package/dist/index.js +487 -90
- package/dist/index.js.map +1 -1
- package/dist/logger.js +42 -9
- package/dist/logger.js.map +1 -1
- package/dist/session.js +56 -0
- package/dist/session.js.map +1 -0
- package/dist/session.spec.js +103 -0
- package/dist/session.spec.js.map +1 -0
- package/dist/setup-core/briefing.js +176 -0
- package/dist/setup-core/briefing.js.map +1 -0
- package/dist/setup-core/credstore.js +415 -0
- package/dist/setup-core/credstore.js.map +1 -0
- package/dist/setup-core/credstore.spec.js +238 -0
- package/dist/setup-core/credstore.spec.js.map +1 -0
- package/dist/setup-core/environments.js +267 -0
- package/dist/setup-core/environments.js.map +1 -0
- package/dist/setup-core/flow.e2e.js +165 -0
- package/dist/setup-core/flow.e2e.js.map +1 -0
- package/dist/setup-core/flow.js +765 -0
- package/dist/setup-core/flow.js.map +1 -0
- package/dist/setup-core/flow.spec.js +1348 -0
- package/dist/setup-core/flow.spec.js.map +1 -0
- package/dist/setup-core/folderconfig.js +283 -0
- package/dist/setup-core/folderconfig.js.map +1 -0
- package/dist/setup-core/git.js +97 -0
- package/dist/setup-core/git.js.map +1 -0
- package/dist/setup-core/host.js +77 -0
- package/dist/setup-core/host.js.map +1 -0
- package/dist/setup-core/importconnections.js +470 -0
- package/dist/setup-core/importconnections.js.map +1 -0
- package/dist/setup-core/importconnections.spec.js +594 -0
- package/dist/setup-core/importconnections.spec.js.map +1 -0
- package/dist/setup-core/liveness.js +94 -0
- package/dist/setup-core/liveness.js.map +1 -0
- package/dist/setup-core/liveness.spec.js +59 -0
- package/dist/setup-core/liveness.spec.js.map +1 -0
- package/dist/setup-core/localpublisherconfig.js +26 -0
- package/dist/setup-core/localpublisherconfig.js.map +1 -0
- package/dist/setup-core/localpublisherconfig.spec.js +29 -0
- package/dist/setup-core/localpublisherconfig.spec.js.map +1 -0
- package/dist/setup-core/mcpconfig.js +198 -0
- package/dist/setup-core/mcpconfig.js.map +1 -0
- package/dist/setup-core/mcpconfig.spec.js +205 -0
- package/dist/setup-core/mcpconfig.spec.js.map +1 -0
- package/dist/setup-core/packagemanifest.js +55 -0
- package/dist/setup-core/packagemanifest.js.map +1 -0
- package/dist/setup-core/ports.js +182 -0
- package/dist/setup-core/ports.js.map +1 -0
- package/dist/setup-core/ports.spec.js +173 -0
- package/dist/setup-core/ports.spec.js.map +1 -0
- package/dist/setup-core/publisherconfig.js +268 -0
- package/dist/setup-core/publisherconfig.js.map +1 -0
- package/dist/setup-core/publisherconfig.oracle.js +166 -0
- package/dist/setup-core/publisherconfig.oracle.js.map +1 -0
- package/dist/setup-core/publisherconfig.spec.js +277 -0
- package/dist/setup-core/publisherconfig.spec.js.map +1 -0
- package/dist/setup-core/publisherversion.js +26 -0
- package/dist/setup-core/publisherversion.js.map +1 -0
- package/dist/setup-core/readiness.spec.js +161 -0
- package/dist/setup-core/readiness.spec.js.map +1 -0
- package/dist/setup-core/readylines.js +169 -0
- package/dist/setup-core/readylines.js.map +1 -0
- package/dist/setup-core/readylines.spec.js +70 -0
- package/dist/setup-core/readylines.spec.js.map +1 -0
- package/dist/setup-core/refresh.js +348 -0
- package/dist/setup-core/refresh.js.map +1 -0
- package/dist/setup-core/refresh.spec.js +501 -0
- package/dist/setup-core/refresh.spec.js.map +1 -0
- package/dist/setup-core/skills.js +279 -0
- package/dist/setup-core/skills.js.map +1 -0
- package/dist/setup-core/skills.spec.js +334 -0
- package/dist/setup-core/skills.spec.js.map +1 -0
- package/dist/setup-core/supervisor.js +879 -0
- package/dist/setup-core/supervisor.js.map +1 -0
- package/dist/setup-core/supervisor.spec.js +833 -0
- package/dist/setup-core/supervisor.spec.js.map +1 -0
- package/dist/setup-core/writefile.js +61 -0
- package/dist/setup-core/writefile.js.map +1 -0
- package/dist/setup-core/writefile.spec.js +68 -0
- package/dist/setup-core/writefile.spec.js.map +1 -0
- package/dist/utils.js +409 -3
- package/dist/utils.js.map +1 -1
- package/dist/utils.spec.js +373 -2
- package/dist/utils.spec.js.map +1 -1
- package/dist/versioncheck-refresh.js +18 -0
- package/dist/versioncheck-refresh.js.map +1 -0
- package/dist/versioncheck.js +324 -0
- package/dist/versioncheck.js.map +1 -0
- package/dist/versioncheck.spec.js +587 -0
- package/dist/versioncheck.spec.js.map +1 -0
- package/node_modules/@credibledata/cli-auth/dist/index.d.ts +86 -0
- package/node_modules/@credibledata/cli-auth/dist/index.js +102 -0
- package/node_modules/@credibledata/cli-auth/package.json +19 -0
- package/package.json +18 -6
- package/.github/workflows/build.yml +0 -23
- package/.mocharc.json +0 -10
- package/.prettierignore +0 -2
- package/.prettierrc +0 -4
- package/README-DEV.md +0 -40
- package/coverage/coverage-summary.json +0 -40
- package/coverage/tmp/coverage-2152-1789496974457-0.json +0 -1
- package/coverage/tmp/coverage-2153-1789496954404-0.json +0 -1
- package/docker/Dockerfile.ci +0 -18
- package/docker-compose.yml +0 -18
- package/eslint.config.mjs +0 -45
- package/generate-client.sh +0 -27
- package/mocha.setup.ts +0 -4
- package/openapitools.json +0 -10
- package/src/client/.openapi-generator/FILES +0 -9
- package/src/client/.openapi-generator/VERSION +0 -1
- package/src/client/.openapi-generator-ignore +0 -23
- package/src/client/api.ts +0 -15999
- package/src/client/base.ts +0 -86
- package/src/client/common.ts +0 -150
- package/src/client/configuration.ts +0 -110
- package/src/client/git_push.sh +0 -57
- package/src/client/index.ts +0 -18
- package/src/clientconfiguration.spec.ts +0 -615
- package/src/clientconfiguration.ts +0 -364
- package/src/commands/add.ts +0 -191
- package/src/commands/connection/createconnections.spec.ts +0 -413
- package/src/commands/connection/createconnections.ts +0 -109
- package/src/commands/connection/deleteconnection.spec.ts +0 -189
- package/src/commands/connection/deleteconnection.ts +0 -57
- package/src/commands/connection/listconnections.spec.ts +0 -132
- package/src/commands/connection/listconnections.ts +0 -58
- package/src/commands/environment/createenvironment.spec.ts +0 -249
- package/src/commands/environment/createenvironment.ts +0 -73
- package/src/commands/environment/deleteenvironment.spec.ts +0 -152
- package/src/commands/environment/deleteenvironment.ts +0 -48
- package/src/commands/environment/getenvironment.spec.ts +0 -110
- package/src/commands/environment/getenvironment.ts +0 -43
- package/src/commands/environment/listenvironments.spec.ts +0 -123
- package/src/commands/environment/listenvironments.ts +0 -67
- package/src/commands/environment/setenvironment.spec.ts +0 -63
- package/src/commands/environment/setenvironment.ts +0 -14
- package/src/commands/environment/updateenvironment.spec.ts +0 -386
- package/src/commands/environment/updateenvironment.ts +0 -168
- package/src/commands/get.ts +0 -153
- package/src/commands/group/addmember.spec.ts +0 -257
- package/src/commands/group/addmember.ts +0 -85
- package/src/commands/group/creategroup.spec.ts +0 -146
- package/src/commands/group/creategroup.ts +0 -54
- package/src/commands/group/deletegroup.spec.ts +0 -120
- package/src/commands/group/deletegroup.ts +0 -45
- package/src/commands/group/getgroup.spec.ts +0 -129
- package/src/commands/group/getgroup.ts +0 -47
- package/src/commands/group/listgroups.spec.ts +0 -137
- package/src/commands/group/listgroups.ts +0 -45
- package/src/commands/group/removemember.spec.ts +0 -224
- package/src/commands/group/removemember.ts +0 -75
- package/src/commands/groupaccesstoken/createToken.spec.ts +0 -211
- package/src/commands/groupaccesstoken/createToken.ts +0 -72
- package/src/commands/groupaccesstoken/deleteToken.spec.ts +0 -147
- package/src/commands/groupaccesstoken/deleteToken.ts +0 -29
- package/src/commands/groupaccesstoken/groupContainer.ts +0 -83
- package/src/commands/groupaccesstoken/listTokens.spec.ts +0 -147
- package/src/commands/groupaccesstoken/listTokens.ts +0 -29
- package/src/commands/legacy.ts +0 -5
- package/src/commands/list.ts +0 -326
- package/src/commands/materialization/cancelrun.ts +0 -70
- package/src/commands/materialization/getindex.ts +0 -55
- package/src/commands/materialization/getmaterialization.ts +0 -57
- package/src/commands/materialization/getpreaggregate.ts +0 -58
- package/src/commands/materialization/getrun.ts +0 -55
- package/src/commands/materialization/listindexes.ts +0 -69
- package/src/commands/materialization/listmaterializations.ts +0 -53
- package/src/commands/materialization/listpreaggregates.ts +0 -74
- package/src/commands/materialization/listruns.ts +0 -77
- package/src/commands/materialization/rerun.ts +0 -123
- package/src/commands/misc/login.spec.ts +0 -371
- package/src/commands/misc/login.ts +0 -343
- package/src/commands/misc/logout.spec.ts +0 -32
- package/src/commands/misc/logout.ts +0 -9
- package/src/commands/misc/loopbackOAuth.ts +0 -127
- package/src/commands/misc/set-access-token.spec.ts +0 -95
- package/src/commands/misc/set-access-token.ts +0 -32
- package/src/commands/package/deletepackage.spec.ts +0 -164
- package/src/commands/package/deletepackage.ts +0 -58
- package/src/commands/package/listpackages.spec.ts +0 -163
- package/src/commands/package/listpackages.ts +0 -74
- package/src/commands/package/publish.spec.ts +0 -642
- package/src/commands/package/publish.ts +0 -236
- package/src/commands/package/updatepackage.spec.ts +0 -319
- package/src/commands/package/updatepackage.ts +0 -95
- package/src/commands/permission/createpermission.spec.ts +0 -507
- package/src/commands/permission/createpermission.ts +0 -181
- package/src/commands/permission/deletepermission.ts +0 -117
- package/src/commands/permission/getpermission.ts +0 -115
- package/src/commands/permission/listpermissions.ts +0 -101
- package/src/commands/permission/scope.ts +0 -180
- package/src/commands/rm.ts +0 -146
- package/src/commands/set.ts +0 -25
- package/src/commands/update.ts +0 -107
- package/src/commands/version/archive-unarchive-version.spec.ts +0 -456
- package/src/commands/version/archive-unarchive-version.ts +0 -108
- package/src/commands/version/listversions.spec.ts +0 -138
- package/src/commands/version/listversions.ts +0 -45
- package/src/common/UserGroupId.spec.ts +0 -115
- package/src/common/UserGroupId.ts +0 -137
- package/src/constants.spec.ts +0 -111
- package/src/constants.ts +0 -228
- package/src/index.ts +0 -378
- package/src/logger.spec.ts +0 -158
- package/src/logger.ts +0 -90
- package/src/polyfills/file.polyfill.ts +0 -6
- package/src/utils.spec.ts +0 -135
- package/src/utils.ts +0 -115
- package/src/validator.spec.ts +0 -51
- package/src/validator.ts +0 -44
- package/tsconfig.json +0 -17
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { logger } from "../../logger";
|
|
2
|
-
import { withGroupContext } from "./groupContainer";
|
|
3
|
-
|
|
4
|
-
export async function listGroupAccessTokens(
|
|
5
|
-
controlPlane: string,
|
|
6
|
-
groupName: string,
|
|
7
|
-
debug: boolean,
|
|
8
|
-
) {
|
|
9
|
-
return withGroupContext(
|
|
10
|
-
controlPlane,
|
|
11
|
-
async (context) => {
|
|
12
|
-
const { organizationName, groupsApi, options } = context;
|
|
13
|
-
|
|
14
|
-
logger.info(
|
|
15
|
-
`Listing access tokens for group ${groupName} in organization ${organizationName}`,
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
const response = await groupsApi.listGroupAccessTokens(
|
|
19
|
-
organizationName,
|
|
20
|
-
groupName,
|
|
21
|
-
options,
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
return response.data;
|
|
25
|
-
},
|
|
26
|
-
"Group access tokens listed successfully",
|
|
27
|
-
debug,
|
|
28
|
-
);
|
|
29
|
-
}
|
package/src/commands/legacy.ts
DELETED
package/src/commands/list.ts
DELETED
|
@@ -1,326 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import { Command } from "commander";
|
|
3
|
-
import { controlPlanesByEnv, Environment } from "../constants";
|
|
4
|
-
import { DEFAULT_PAGE_SIZE, DEFAULT_PAGE } from "../utils";
|
|
5
|
-
import { listConnections } from "./connection/listconnections";
|
|
6
|
-
import { printOutGroups } from "./group/listgroups";
|
|
7
|
-
import { listGroupAccessTokens } from "./groupaccesstoken/listTokens";
|
|
8
|
-
import { printOutPackages } from "./package/listpackages";
|
|
9
|
-
import { printOutEnvironments } from "./environment/listenvironments";
|
|
10
|
-
import { listVersions } from "./version/listversions";
|
|
11
|
-
import { listMaterializations } from "./materialization/listmaterializations";
|
|
12
|
-
import { listIndexes } from "./materialization/listindexes";
|
|
13
|
-
import { listPreaggregates } from "./materialization/listpreaggregates";
|
|
14
|
-
import { listRuns } from "./materialization/listruns";
|
|
15
|
-
import { warnProjectDeprecated } from "./legacy";
|
|
16
|
-
import { listPermissions } from "./permission/listpermissions";
|
|
17
|
-
|
|
18
|
-
export const registerListCommands = (
|
|
19
|
-
cli: Command,
|
|
20
|
-
environment: Environment,
|
|
21
|
-
) => {
|
|
22
|
-
const list = cli
|
|
23
|
-
.command("ls")
|
|
24
|
-
.description("List resources of a given type")
|
|
25
|
-
.argument("<resource>", "The resource to list");
|
|
26
|
-
|
|
27
|
-
const listEnvironmentsAction = (options: any) => {
|
|
28
|
-
printOutEnvironments(
|
|
29
|
-
controlPlanesByEnv[environment],
|
|
30
|
-
options.debug,
|
|
31
|
-
options.page,
|
|
32
|
-
options.pageSize,
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
list
|
|
37
|
-
.command("environment")
|
|
38
|
-
.alias("environments")
|
|
39
|
-
.description("List all environments.")
|
|
40
|
-
.option("--debug")
|
|
41
|
-
.option(
|
|
42
|
-
"--page <number>",
|
|
43
|
-
`Page number (starts at ${DEFAULT_PAGE})`,
|
|
44
|
-
String(DEFAULT_PAGE),
|
|
45
|
-
)
|
|
46
|
-
.option(
|
|
47
|
-
"--page-size <number>",
|
|
48
|
-
`Items per page (default: all records, max: 500)`,
|
|
49
|
-
String(DEFAULT_PAGE_SIZE),
|
|
50
|
-
)
|
|
51
|
-
.action(listEnvironmentsAction);
|
|
52
|
-
|
|
53
|
-
list
|
|
54
|
-
.command("project")
|
|
55
|
-
.alias("projects")
|
|
56
|
-
.description("[deprecated] Alias for 'ls environment'.")
|
|
57
|
-
.option("--debug")
|
|
58
|
-
.option(
|
|
59
|
-
"--page <number>",
|
|
60
|
-
`Page number (starts at ${DEFAULT_PAGE})`,
|
|
61
|
-
String(DEFAULT_PAGE),
|
|
62
|
-
)
|
|
63
|
-
.option(
|
|
64
|
-
"--page-size <number>",
|
|
65
|
-
`Items per page (default: all records, max: 500)`,
|
|
66
|
-
String(DEFAULT_PAGE_SIZE),
|
|
67
|
-
)
|
|
68
|
-
.action((options) => {
|
|
69
|
-
warnProjectDeprecated("ls environment");
|
|
70
|
-
listEnvironmentsAction(options);
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
list
|
|
74
|
-
.command("connection")
|
|
75
|
-
.alias("connections")
|
|
76
|
-
.description("List all connections.")
|
|
77
|
-
.option("--debug")
|
|
78
|
-
.option(
|
|
79
|
-
"--page <number>",
|
|
80
|
-
`Page number (starts at ${DEFAULT_PAGE})`,
|
|
81
|
-
String(DEFAULT_PAGE),
|
|
82
|
-
)
|
|
83
|
-
.option(
|
|
84
|
-
"--page-size <number>",
|
|
85
|
-
`Items per page (default: all records, max: 500)`,
|
|
86
|
-
String(DEFAULT_PAGE_SIZE),
|
|
87
|
-
)
|
|
88
|
-
.action((options) => {
|
|
89
|
-
listConnections(
|
|
90
|
-
controlPlanesByEnv[environment],
|
|
91
|
-
options.debug,
|
|
92
|
-
options.page,
|
|
93
|
-
options.pageSize,
|
|
94
|
-
);
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
list
|
|
98
|
-
.command("package")
|
|
99
|
-
.alias("packages")
|
|
100
|
-
.description("List the packages in the active environment.")
|
|
101
|
-
.option("--debug")
|
|
102
|
-
.option(
|
|
103
|
-
"--page <number>",
|
|
104
|
-
`Page number (starts at ${DEFAULT_PAGE})`,
|
|
105
|
-
String(DEFAULT_PAGE),
|
|
106
|
-
)
|
|
107
|
-
.option(
|
|
108
|
-
"--page-size <number>",
|
|
109
|
-
`Items per page (default: all records, max: 500)`,
|
|
110
|
-
String(DEFAULT_PAGE_SIZE),
|
|
111
|
-
)
|
|
112
|
-
.action((options) => {
|
|
113
|
-
printOutPackages(
|
|
114
|
-
controlPlanesByEnv[environment],
|
|
115
|
-
options.debug,
|
|
116
|
-
options.page,
|
|
117
|
-
options.pageSize,
|
|
118
|
-
);
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
list
|
|
122
|
-
.command("version")
|
|
123
|
-
.alias("versions")
|
|
124
|
-
.description("List the versions of a package.")
|
|
125
|
-
.argument(
|
|
126
|
-
"<packageName>",
|
|
127
|
-
"The name of the package to list the versions of.",
|
|
128
|
-
)
|
|
129
|
-
.option("--debug")
|
|
130
|
-
.action((packageName, options) => {
|
|
131
|
-
listVersions(
|
|
132
|
-
controlPlanesByEnv[environment],
|
|
133
|
-
packageName,
|
|
134
|
-
options.debug,
|
|
135
|
-
);
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
list
|
|
139
|
-
.command("materialization")
|
|
140
|
-
.alias("materializations")
|
|
141
|
-
.description(
|
|
142
|
-
"List the materializations of a package version (status + failure reason).",
|
|
143
|
-
)
|
|
144
|
-
.argument(
|
|
145
|
-
"<packageName>",
|
|
146
|
-
"The name of the package whose materializations to list.",
|
|
147
|
-
)
|
|
148
|
-
.argument(
|
|
149
|
-
"<versionId>",
|
|
150
|
-
"The version that binds the materializations (e.g. 0.1.21).",
|
|
151
|
-
)
|
|
152
|
-
.option("--debug")
|
|
153
|
-
.action((packageName, versionId, options) => {
|
|
154
|
-
listMaterializations(
|
|
155
|
-
controlPlanesByEnv[environment],
|
|
156
|
-
packageName,
|
|
157
|
-
versionId,
|
|
158
|
-
options.debug,
|
|
159
|
-
);
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
list
|
|
163
|
-
.command("index")
|
|
164
|
-
.alias("indexes")
|
|
165
|
-
.description(
|
|
166
|
-
"List the dimensional search indexes of a package version (status + failure reason + freshness).",
|
|
167
|
-
)
|
|
168
|
-
.argument(
|
|
169
|
-
"<packageName>",
|
|
170
|
-
"The name of the package whose indexes to list.",
|
|
171
|
-
)
|
|
172
|
-
.argument(
|
|
173
|
-
"<versionId>",
|
|
174
|
-
"The version that binds the indexes (e.g. 0.1.21).",
|
|
175
|
-
)
|
|
176
|
-
.option("--debug")
|
|
177
|
-
// No static defaults: a Commander default of "-1" for --page-size would make it
|
|
178
|
-
// always-set, so parsePaginationParams takes its "return all records" branch and
|
|
179
|
-
// silently ignores a lone --page N. Leaving both unset (undefined) preserves the
|
|
180
|
-
// all-records default (neither flag → branch 1) while letting --page N default the
|
|
181
|
-
// page size to a finite page (utils.parsePaginationParams).
|
|
182
|
-
.option("--page <number>", `Page number (starts at ${DEFAULT_PAGE})`)
|
|
183
|
-
.option(
|
|
184
|
-
"--page-size <number>",
|
|
185
|
-
`Items per page (default: all records, max: 500)`,
|
|
186
|
-
)
|
|
187
|
-
.action((packageName, versionId, options) => {
|
|
188
|
-
listIndexes(
|
|
189
|
-
controlPlanesByEnv[environment],
|
|
190
|
-
packageName,
|
|
191
|
-
versionId,
|
|
192
|
-
options.debug,
|
|
193
|
-
options.page,
|
|
194
|
-
options.pageSize,
|
|
195
|
-
);
|
|
196
|
-
});
|
|
197
|
-
|
|
198
|
-
list
|
|
199
|
-
.command("preaggregate")
|
|
200
|
-
.alias("preaggregates")
|
|
201
|
-
.alias("preaggs")
|
|
202
|
-
.description(
|
|
203
|
-
"List the pre-aggregated measures of a package version (status + failure reason + grain + freshness). One entry per measure, so several may share a rollup table.",
|
|
204
|
-
)
|
|
205
|
-
.argument(
|
|
206
|
-
"<packageName>",
|
|
207
|
-
"The name of the package whose pre-aggregations to list.",
|
|
208
|
-
)
|
|
209
|
-
.argument(
|
|
210
|
-
"<versionId>",
|
|
211
|
-
"The version that binds the pre-aggregations (e.g. 0.1.21).",
|
|
212
|
-
)
|
|
213
|
-
.option("--debug")
|
|
214
|
-
.option(
|
|
215
|
-
"--source <sourceName>",
|
|
216
|
-
"Only list the pre-aggregated measures of this authored source.",
|
|
217
|
-
)
|
|
218
|
-
// No static defaults — see the note on `ls index` above.
|
|
219
|
-
.option("--page <number>", `Page number (starts at ${DEFAULT_PAGE})`)
|
|
220
|
-
.option(
|
|
221
|
-
"--page-size <number>",
|
|
222
|
-
`Items per page (default: all records, max: 500)`,
|
|
223
|
-
)
|
|
224
|
-
.action((packageName, versionId, options) => {
|
|
225
|
-
listPreaggregates(
|
|
226
|
-
controlPlanesByEnv[environment],
|
|
227
|
-
packageName,
|
|
228
|
-
versionId,
|
|
229
|
-
options.source,
|
|
230
|
-
options.debug,
|
|
231
|
-
options.page,
|
|
232
|
-
options.pageSize,
|
|
233
|
-
);
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
list
|
|
237
|
-
.command("run")
|
|
238
|
-
.alias("runs")
|
|
239
|
-
.description(
|
|
240
|
-
"List the build/refresh runs of a package (most recent first). Runs are package-scoped and span all three families (materialized sources, dimensional indexes and pre-aggregations); pass a version to filter to the runs it initiated, or --source/--dimension/--measure to filter to a targeted unit.",
|
|
241
|
-
)
|
|
242
|
-
.argument("<packageName>", "The name of the package whose runs to list.")
|
|
243
|
-
.argument(
|
|
244
|
-
"[versionId]",
|
|
245
|
-
"Optional version to filter runs to (e.g. 0.1.21). Omit to list every run in the package.",
|
|
246
|
-
)
|
|
247
|
-
.option("--debug")
|
|
248
|
-
.option(
|
|
249
|
-
"--source <sourceName>",
|
|
250
|
-
"Only list runs targeting this persist source.",
|
|
251
|
-
)
|
|
252
|
-
.option(
|
|
253
|
-
"--dimension <dimension>",
|
|
254
|
-
"Only list runs targeting this indexed dimension.",
|
|
255
|
-
)
|
|
256
|
-
.option(
|
|
257
|
-
"--measure <measure>",
|
|
258
|
-
"Only list runs targeting this pre-aggregated measure.",
|
|
259
|
-
)
|
|
260
|
-
// No static defaults — see the note on `ls index` above: a "-1" --page-size default
|
|
261
|
-
// makes parsePaginationParams ignore a lone --page N. Undefined keeps the all-records
|
|
262
|
-
// default while honoring --page N.
|
|
263
|
-
.option("--page <number>", `Page number (starts at ${DEFAULT_PAGE})`)
|
|
264
|
-
.option(
|
|
265
|
-
"--page-size <number>",
|
|
266
|
-
`Items per page (default: all records, max: 500)`,
|
|
267
|
-
)
|
|
268
|
-
.action((packageName, versionId, options) => {
|
|
269
|
-
listRuns(
|
|
270
|
-
controlPlanesByEnv[environment],
|
|
271
|
-
packageName,
|
|
272
|
-
versionId,
|
|
273
|
-
options.debug,
|
|
274
|
-
options.source,
|
|
275
|
-
options.dimension,
|
|
276
|
-
options.measure,
|
|
277
|
-
options.page,
|
|
278
|
-
options.pageSize,
|
|
279
|
-
);
|
|
280
|
-
});
|
|
281
|
-
|
|
282
|
-
list
|
|
283
|
-
.command("permission")
|
|
284
|
-
.alias("permissions")
|
|
285
|
-
.description(
|
|
286
|
-
"List the permissions on the organization, an environment, or a package.",
|
|
287
|
-
)
|
|
288
|
-
.option(
|
|
289
|
-
"--environment <environmentName>",
|
|
290
|
-
"List this environment's permissions instead of the organization's.",
|
|
291
|
-
)
|
|
292
|
-
.option(
|
|
293
|
-
"--package <packageName>",
|
|
294
|
-
"List this package's permissions. Uses --environment, or the current environment.",
|
|
295
|
-
)
|
|
296
|
-
.option("--debug")
|
|
297
|
-
.action((options) => {
|
|
298
|
-
listPermissions(controlPlanesByEnv[environment], options.debug, {
|
|
299
|
-
environment: options.environment,
|
|
300
|
-
package: options.package,
|
|
301
|
-
});
|
|
302
|
-
});
|
|
303
|
-
|
|
304
|
-
list
|
|
305
|
-
.command("group")
|
|
306
|
-
.alias("groups")
|
|
307
|
-
.description("List all groups in the organization.")
|
|
308
|
-
.option("--debug")
|
|
309
|
-
.action((options) => {
|
|
310
|
-
printOutGroups(controlPlanesByEnv[environment], options.debug);
|
|
311
|
-
});
|
|
312
|
-
|
|
313
|
-
list
|
|
314
|
-
.command("group-access-token")
|
|
315
|
-
.alias("group-access-tokens")
|
|
316
|
-
.description("List all access tokens for a group.")
|
|
317
|
-
.argument("<groupName>", "The name of the group")
|
|
318
|
-
.option("--debug")
|
|
319
|
-
.action((groupName, options) => {
|
|
320
|
-
listGroupAccessTokens(
|
|
321
|
-
controlPlanesByEnv[environment],
|
|
322
|
-
groupName,
|
|
323
|
-
options.debug,
|
|
324
|
-
);
|
|
325
|
-
});
|
|
326
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { RunsApi, RunActionActionEnum } from "../../client/api";
|
|
2
|
-
import { Configuration } from "../../client/configuration";
|
|
3
|
-
import { ClientConfiguration } from "../../clientconfiguration";
|
|
4
|
-
import { logger } from "../../logger";
|
|
5
|
-
import { getConfirmation, prettifyJson, printOutError } from "../../utils";
|
|
6
|
-
|
|
7
|
-
const runsApi = new RunsApi(new Configuration());
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Cancel an in-flight (non-terminal) build/refresh run. No-op-safe: the control
|
|
11
|
-
* plane returns 409 if the run is already terminal. Prints the run's updated
|
|
12
|
-
* state.
|
|
13
|
-
*/
|
|
14
|
-
export async function cancelRun(
|
|
15
|
-
controlPlane: string,
|
|
16
|
-
packagePath: string,
|
|
17
|
-
runId: string,
|
|
18
|
-
debug: boolean,
|
|
19
|
-
autoConfirm: boolean,
|
|
20
|
-
) {
|
|
21
|
-
const clientConfig = new ClientConfiguration();
|
|
22
|
-
const organizationName = clientConfig.getOrganization();
|
|
23
|
-
const environmentName = clientConfig.getProject();
|
|
24
|
-
|
|
25
|
-
if (!clientConfig.doesConfigExists()) {
|
|
26
|
-
logger.error("Please, make sure that you are logged in");
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (!environmentName) {
|
|
31
|
-
logger.error("Please, make sure to set an environment");
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
if (!runId) {
|
|
36
|
-
logger.error("Please provide a run ID");
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const packageName = packagePath.replace("/", "");
|
|
41
|
-
|
|
42
|
-
if (!autoConfirm) {
|
|
43
|
-
const confirmation = await getConfirmation(
|
|
44
|
-
`Cancel run ${runId} in ${packageName}?`,
|
|
45
|
-
);
|
|
46
|
-
if (!confirmation) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
logger.info(`Cancelling run ${runId} in ${packageName}`);
|
|
52
|
-
try {
|
|
53
|
-
const response = await runsApi.runAction(
|
|
54
|
-
organizationName,
|
|
55
|
-
environmentName,
|
|
56
|
-
packageName,
|
|
57
|
-
runId,
|
|
58
|
-
RunActionActionEnum.Cancel,
|
|
59
|
-
{
|
|
60
|
-
baseURL: controlPlane,
|
|
61
|
-
headers: clientConfig.getHeaders(),
|
|
62
|
-
},
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
console.log(prettifyJson(response.data));
|
|
66
|
-
} catch (e) {
|
|
67
|
-
logger.error("Failed to cancel run");
|
|
68
|
-
printOutError(e, debug);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { IndexesApi } from "../../client/api";
|
|
2
|
-
import { Configuration } from "../../client/configuration";
|
|
3
|
-
import { ClientConfiguration } from "../../clientconfiguration";
|
|
4
|
-
import { logger } from "../../logger";
|
|
5
|
-
import { prettifyJson, printOutError } from "../../utils";
|
|
6
|
-
|
|
7
|
-
const indexesApi = new IndexesApi(new Configuration());
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Get a single dimensional search index anchor (binding) by id. Prints the full
|
|
11
|
-
* anchor state — `status`/`error`, the indexed `sourceName`/`dimension`, the
|
|
12
|
-
* serving `rowCount` (indexed values) and `lastIndexedAt`, scope, freshness
|
|
13
|
-
* policy, and the `stale`/`staleSince`/`staleReasons` triple.
|
|
14
|
-
*/
|
|
15
|
-
export async function getIndex(
|
|
16
|
-
controlPlane: string,
|
|
17
|
-
packagePath: string,
|
|
18
|
-
versionId: string,
|
|
19
|
-
indexId: string,
|
|
20
|
-
debug: boolean,
|
|
21
|
-
) {
|
|
22
|
-
const clientConfig = new ClientConfiguration();
|
|
23
|
-
const organizationName = clientConfig.getOrganization();
|
|
24
|
-
const environmentName = clientConfig.getProject();
|
|
25
|
-
|
|
26
|
-
if (!clientConfig.doesConfigExists()) {
|
|
27
|
-
logger.error("Please, make sure that you are logged in");
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (!environmentName) {
|
|
32
|
-
logger.error("Please, make sure to set an environment");
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
try {
|
|
37
|
-
const packageName = packagePath.replace("/", "");
|
|
38
|
-
const response = await indexesApi.getIndex(
|
|
39
|
-
organizationName,
|
|
40
|
-
environmentName,
|
|
41
|
-
packageName,
|
|
42
|
-
versionId,
|
|
43
|
-
indexId,
|
|
44
|
-
{
|
|
45
|
-
baseURL: controlPlane,
|
|
46
|
-
headers: clientConfig.getHeaders(),
|
|
47
|
-
},
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
console.log(prettifyJson(response.data));
|
|
51
|
-
} catch (e) {
|
|
52
|
-
logger.error("Failed to get index");
|
|
53
|
-
printOutError(e, debug);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { MaterializationsApi } from "../../client/api";
|
|
2
|
-
import { Configuration } from "../../client/configuration";
|
|
3
|
-
import { ClientConfiguration } from "../../clientconfiguration";
|
|
4
|
-
import { logger } from "../../logger";
|
|
5
|
-
import { prettifyJson, printOutError } from "../../utils";
|
|
6
|
-
|
|
7
|
-
const materializationsApi = new MaterializationsApi(new Configuration());
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Get a single Malloy Persistence materialization anchor by id. Prints the full
|
|
11
|
-
* anchor state — `status`/`error`, the physical `materializedTableName` and its
|
|
12
|
-
* `connectionName` (the underlying warehouse table currently serving the
|
|
13
|
-
* source), the serving run/build number, scope, freshness policy, and the
|
|
14
|
-
* `stale`/`staleSince`/`staleReasons` triple — so the state of the derived table
|
|
15
|
-
* is inspectable from the CLI without opening the app.
|
|
16
|
-
*/
|
|
17
|
-
export async function getMaterialization(
|
|
18
|
-
controlPlane: string,
|
|
19
|
-
packagePath: string,
|
|
20
|
-
versionId: string,
|
|
21
|
-
materializationId: string,
|
|
22
|
-
debug: boolean,
|
|
23
|
-
) {
|
|
24
|
-
const clientConfig = new ClientConfiguration();
|
|
25
|
-
const organizationName = clientConfig.getOrganization();
|
|
26
|
-
const environmentName = clientConfig.getProject();
|
|
27
|
-
|
|
28
|
-
if (!clientConfig.doesConfigExists()) {
|
|
29
|
-
logger.error("Please, make sure that you are logged in");
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (!environmentName) {
|
|
34
|
-
logger.error("Please, make sure to set an environment");
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
try {
|
|
39
|
-
const packageName = packagePath.replace("/", "");
|
|
40
|
-
const response = await materializationsApi.getMaterialization(
|
|
41
|
-
organizationName,
|
|
42
|
-
environmentName,
|
|
43
|
-
packageName,
|
|
44
|
-
versionId,
|
|
45
|
-
materializationId,
|
|
46
|
-
{
|
|
47
|
-
baseURL: controlPlane,
|
|
48
|
-
headers: clientConfig.getHeaders(),
|
|
49
|
-
},
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
console.log(prettifyJson(response.data));
|
|
53
|
-
} catch (e) {
|
|
54
|
-
logger.error("Failed to get materialization");
|
|
55
|
-
printOutError(e, debug);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { PreaggregatesApi } from "../../client/api";
|
|
2
|
-
import { Configuration } from "../../client/configuration";
|
|
3
|
-
import { ClientConfiguration } from "../../clientconfiguration";
|
|
4
|
-
import { logger } from "../../logger";
|
|
5
|
-
import { prettifyJson, printOutError } from "../../utils";
|
|
6
|
-
|
|
7
|
-
const preaggregatesApi = new PreaggregatesApi(new Configuration());
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Get a single pre-aggregated measure by id. Prints its full state — `status`/`error`,
|
|
11
|
-
* the authored `sourceName` and `measure`, the `grainDimensions` it is rolled up to, the
|
|
12
|
-
* serving table and its `rowCount`/`lastBuiltAt`, scope, freshness policy, and the
|
|
13
|
-
* `stale`/`staleSince`/`staleReasons` triple.
|
|
14
|
-
*
|
|
15
|
-
* <p>The id is opaque and comes from `cred ls preaggregate` — it addresses a measure
|
|
16
|
-
* within a rollup, not the rollup table, so do not construct one by hand.
|
|
17
|
-
*/
|
|
18
|
-
export async function getPreaggregate(
|
|
19
|
-
controlPlane: string,
|
|
20
|
-
packagePath: string,
|
|
21
|
-
versionId: string,
|
|
22
|
-
preaggregateId: string,
|
|
23
|
-
debug: boolean,
|
|
24
|
-
) {
|
|
25
|
-
const clientConfig = new ClientConfiguration();
|
|
26
|
-
const organizationName = clientConfig.getOrganization();
|
|
27
|
-
const environmentName = clientConfig.getProject();
|
|
28
|
-
|
|
29
|
-
if (!clientConfig.doesConfigExists()) {
|
|
30
|
-
logger.error("Please, make sure that you are logged in");
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (!environmentName) {
|
|
35
|
-
logger.error("Please, make sure to set an environment");
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
try {
|
|
40
|
-
const packageName = packagePath.replace("/", "");
|
|
41
|
-
const response = await preaggregatesApi.getPreaggregate(
|
|
42
|
-
organizationName,
|
|
43
|
-
environmentName,
|
|
44
|
-
packageName,
|
|
45
|
-
versionId,
|
|
46
|
-
preaggregateId,
|
|
47
|
-
{
|
|
48
|
-
baseURL: controlPlane,
|
|
49
|
-
headers: clientConfig.getHeaders(),
|
|
50
|
-
},
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
console.log(prettifyJson(response.data));
|
|
54
|
-
} catch (e) {
|
|
55
|
-
logger.error("Failed to get pre-aggregation");
|
|
56
|
-
printOutError(e, debug);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { RunsApi } from "../../client/api";
|
|
2
|
-
import { Configuration } from "../../client/configuration";
|
|
3
|
-
import { ClientConfiguration } from "../../clientconfiguration";
|
|
4
|
-
import { logger } from "../../logger";
|
|
5
|
-
import { prettifyJson, printOutError } from "../../utils";
|
|
6
|
-
|
|
7
|
-
const runsApi = new RunsApi(new Configuration());
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Get a single build/refresh run by id, including its stateful build plan. The
|
|
11
|
-
* `buildPlan.nodes` carry each produced unit's live state — per source node the
|
|
12
|
-
* physical `tableName` and `rowCount`, per index node the dimension and its
|
|
13
|
-
* status — and `buildPlan.edges` wire sources to the indexes that depend on
|
|
14
|
-
* them. This is the detailed view (`listRuns` omits the graph); use it to see
|
|
15
|
-
* exactly which physical tables a run produced and how the units relate.
|
|
16
|
-
*/
|
|
17
|
-
export async function getRun(
|
|
18
|
-
controlPlane: string,
|
|
19
|
-
packagePath: string,
|
|
20
|
-
runId: string,
|
|
21
|
-
debug: boolean,
|
|
22
|
-
) {
|
|
23
|
-
const clientConfig = new ClientConfiguration();
|
|
24
|
-
const organizationName = clientConfig.getOrganization();
|
|
25
|
-
const environmentName = clientConfig.getProject();
|
|
26
|
-
|
|
27
|
-
if (!clientConfig.doesConfigExists()) {
|
|
28
|
-
logger.error("Please, make sure that you are logged in");
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (!environmentName) {
|
|
33
|
-
logger.error("Please, make sure to set an environment");
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
try {
|
|
38
|
-
const packageName = packagePath.replace("/", "");
|
|
39
|
-
const response = await runsApi.getRun(
|
|
40
|
-
organizationName,
|
|
41
|
-
environmentName,
|
|
42
|
-
packageName,
|
|
43
|
-
runId,
|
|
44
|
-
{
|
|
45
|
-
baseURL: controlPlane,
|
|
46
|
-
headers: clientConfig.getHeaders(),
|
|
47
|
-
},
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
console.log(prettifyJson(response.data));
|
|
51
|
-
} catch (e) {
|
|
52
|
-
logger.error("Failed to get run");
|
|
53
|
-
printOutError(e, debug);
|
|
54
|
-
}
|
|
55
|
-
}
|