@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
package/README.md
CHANGED
|
@@ -8,4 +8,109 @@ This directory contains a simple CLI to create, update, delete, and list project
|
|
|
8
8
|
|
|
9
9
|
For complete usage instructions and command reference, see the official documentation at [https://www.credibledata.com/docs/platform-admin/cli](https://www.credibledata.com/docs/platform-admin/cli).
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
### Driving `cred` from an agent
|
|
12
|
+
|
|
13
|
+
`cred` is built to be run by a coding agent (Claude Code, Codex, Cursor) as well
|
|
14
|
+
as by a person. The contract:
|
|
15
|
+
|
|
16
|
+
- **Every question has a flag.** A picker is the human way to answer it; the
|
|
17
|
+
flag is the other way — `cred login <organization>` answers the organization
|
|
18
|
+
picker, `cred publish --yes` answers the publish confirmation, and
|
|
19
|
+
`cred init -o <org> -e <env> [--create-environment]
|
|
20
|
+
[--connections all|none|a,b] [--skills replace|keep|none] [--package <dir>]
|
|
21
|
+
--no-start --no-open` runs the whole setup with no prompt.
|
|
22
|
+
- **Without a terminal, nothing prompts.** When stdin is not a TTY, `CI` or
|
|
23
|
+
`CRED_NON_INTERACTIVE` is set (to anything but `0` or `false`), or
|
|
24
|
+
`--non-interactive` is passed, a command that needs an answer exits **2**
|
|
25
|
+
and prints the flag and the options on stderr, e.g.
|
|
26
|
+
`Cannot ask "Which environment?" without a terminal. Pass --environment <name>. Options: prod-bars, staging.`
|
|
27
|
+
Exit 0 is success, 1 is failure, 2 is "needs input".
|
|
28
|
+
- **The update notice can be turned off.** When a newer `cred` is on npm, commands
|
|
29
|
+
print one line on stderr saying so. `CI`, `CRED_NO_UPDATE_CHECK`, or
|
|
30
|
+
`NO_UPDATE_NOTIFIER` set (to anything but `0` or `false`) silences it and stops
|
|
31
|
+
the once-a-day registry check.
|
|
32
|
+
- **Logs go to stderr; data goes to stdout.** `cred status --json` and
|
|
33
|
+
`cred ls ...` print one JSON document you can parse. `cred status --json`
|
|
34
|
+
reports `organization` and `environment` (what `cred publish` here would act
|
|
35
|
+
on: `--cell`'s cell, else the directory's pin, else `~/.cred`), `deployment`,
|
|
36
|
+
`controlPlane`, `deploymentFrom` (`flag` when `--cell` chose the deployment,
|
|
37
|
+
`folder` when this directory's pin did, else `global`), `ignoredPin` (the pin's
|
|
38
|
+
cell, only when `--cell` names another), `token` (`valid`, `kind`,
|
|
39
|
+
`expiresInSeconds`), and in a directory `cred init` wired, `directory` (the
|
|
40
|
+
pin, with its `deployment`) and `publisher`
|
|
41
|
+
(`running`, `ready`, `packages`, `uiUrl`, `mcpUrl`) — or `{ "error": ... }`
|
|
42
|
+
with exit 1 when it cannot read your setup.
|
|
43
|
+
- **Every command says where it acts, and acts where the directory is pinned.**
|
|
44
|
+
In a directory `cred init` set up, org- and environment-scoped commands
|
|
45
|
+
(`ls`, `get`, `add`, `update`, `rm`, `publish`) use the directory's
|
|
46
|
+
deployment, organization and environment; elsewhere, `~/.cred`'s. Each prints
|
|
47
|
+
`Using <org>/<env> on <cell>, pinned in .credible/config.json.` (or
|
|
48
|
+
`set by --cell`, or `from your global settings`) on stderr, and every
|
|
49
|
+
confirmation repeats it. The cell is always named.
|
|
50
|
+
An agent should check that line before anything that changes state.
|
|
51
|
+
`cred set environment` and `cred set cell <cell>` always change the global
|
|
52
|
+
settings; `cred --cell <cell> init` re-pins a directory. `--cell` naming another cell than the pin makes reads act
|
|
53
|
+
on that cell, and makes writes (`publish`, `add connection`) and `cred dev`
|
|
54
|
+
refuse; `cred --cell <cell> init` is the explicit re-pin.
|
|
55
|
+
- **`cred publish` can be previewed and read back.** `--dry-run` lists the
|
|
56
|
+
files it would upload (stdout) and the ones it leaves out (stderr), uploads
|
|
57
|
+
nothing and needs no login. `--json` prints one document: `organization`,
|
|
58
|
+
`environment`, `package`, `version`, `url` (the version in the app),
|
|
59
|
+
`latest` (`now`, `when-built` or `no`), `latestVersion`, `excluded` and
|
|
60
|
+
`response` (the server's reply as sent). With `--dry-run`, `--json` prints
|
|
61
|
+
`dryRun` (`true`), `package`, `version`, `included` and `excluded` instead.
|
|
62
|
+
A `.credignore` beside `publisher.json` leaves more files out,
|
|
63
|
+
one path or glob per line (`notes.md`, `tests/`, `/docs`), matched regardless
|
|
64
|
+
of case (`secrets/` also leaves out `Secrets/`). A nested `.credignore` is not
|
|
65
|
+
read, and every file or folder named `.credignore`, at any depth, is always
|
|
66
|
+
left out of the upload. It can never put back a file the fixed list leaves
|
|
67
|
+
out, and a publish stops if it leaves out `publisher.json`. Warnings the
|
|
68
|
+
server raises on the publish print on stderr after the link; with `--json`
|
|
69
|
+
they are only in `response.warnings`. `cred get version <package> <version>`
|
|
70
|
+
shows whether a version has built (`buildStatus`: `BUILDING`, then `READY`,
|
|
71
|
+
`FAILED` or `UNSUPPORTED`) and is waiting to become latest
|
|
72
|
+
(`promoteWhenReady`). Add `--wait` to read again every 10 seconds until it
|
|
73
|
+
reaches one of those three and print that; it exits 1 on `FAILED` or when
|
|
74
|
+
`--timeout <minutes>` (default 30; it needs `--wait`) runs out. `cred get package <package>`
|
|
75
|
+
shows the latest.
|
|
76
|
+
- **`cred token` prints a usable access token and nothing else**, renewing it
|
|
77
|
+
first when it is within two minutes of expiring. It exits 1 rather than print
|
|
78
|
+
a token that has already expired.
|
|
79
|
+
- **`cred login` needs the human once.** It prints a URL and a code; relay them
|
|
80
|
+
and wait — it polls until they sign in. Credentials are kept per cell, and
|
|
81
|
+
`--cell` is never saved: after `cred --cell staging login`, pass `--cell
|
|
82
|
+
staging` on every command or run `cred set cell staging` (the login says so
|
|
83
|
+
when your global cell differs). Already signed in to the cell, `cred login
|
|
84
|
+
<org>` only switches organization and says which cell and whether anything
|
|
85
|
+
changed; `cred login --force` signs in again, as someone else, without a
|
|
86
|
+
logout. `cred logout` signs out of one cell, the way `login` resolves it
|
|
87
|
+
(`--cell`, then the directory's pin, then the global cell), names it, and
|
|
88
|
+
leaves the other cells signed in; given a cell with nothing to clear it lists
|
|
89
|
+
the cells that hold credentials and the `cred --cell <cell> logout` to run.
|
|
90
|
+
- **`cred dev` is a foreground process.** Start it in the background with
|
|
91
|
+
`--no-open`, then poll `cred status --json` until `publisher.ready` is true
|
|
92
|
+
(`running` alone can be a server whose only package failed to compile).
|
|
93
|
+
- **Ports.** A directory keeps the pair it used last, else 4000/4040, else a
|
|
94
|
+
free pair derived from its path. In a directory with its own
|
|
95
|
+
`publisher.config.json`, another Publisher on 4000/4040 is refused rather
|
|
96
|
+
than stepped around, and the error names a free port. Re-run with
|
|
97
|
+
`--port <that port>` (on `init` or `dev`): MCP takes the port 40 above it,
|
|
98
|
+
the pair is remembered, and `.mcp.json` follows.
|
|
99
|
+
|
|
100
|
+
The three journeys, as commands:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# 1. I run a local Publisher against my own warehouse; move to Credible.
|
|
104
|
+
cred init -e my-env --create-environment --connections my_warehouse --no-start
|
|
105
|
+
cred dev --no-open & # then poll: cred status --json
|
|
106
|
+
cred publish -y # publisher.config.json is never uploaded
|
|
107
|
+
|
|
108
|
+
# 2. I run a local Publisher over CSV / DuckDB files; publish the package.
|
|
109
|
+
# (a create-malloy-package directory: setup serves the package it lists,
|
|
110
|
+
# and --skills says what to do with the scaffolder's skills)
|
|
111
|
+
cred init -e my-env --create-environment --connections none --skills replace --no-start
|
|
112
|
+
cd shop && cred publish -y # the data files travel inside the package
|
|
113
|
+
|
|
114
|
+
# 3. I use Credible and want to model locally with Claude Code.
|
|
115
|
+
cred init -e prod-bars --no-start # skills, .mcp.json, CLAUDE.md, publisher config
|
|
116
|
+
cred dev --no-open & # local publisher proxies to the real warehouse
|
|
@@ -0,0 +1,548 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const chai_1 = require("chai");
|
|
16
|
+
const child_process_1 = require("child_process");
|
|
17
|
+
const fs_1 = __importDefault(require("fs"));
|
|
18
|
+
const os_1 = __importDefault(require("os"));
|
|
19
|
+
const path_1 = __importDefault(require("path"));
|
|
20
|
+
const environments_1 = require("./setup-core/environments");
|
|
21
|
+
/**
|
|
22
|
+
* The agent contract, checked against the real CLI.
|
|
23
|
+
*
|
|
24
|
+
* Every other spec exercises the guard through stubs. This one spawns the CLI
|
|
25
|
+
* with a piped stdin — exactly what an agent's shell tool gives it — and asserts
|
|
26
|
+
* the three things an agent depends on: a question it cannot answer exits 2 and
|
|
27
|
+
* names the flag; stdout of a `--json` command is one JSON document and nothing
|
|
28
|
+
* else; and a plain failure is still exit 1. No network: the cases below stop
|
|
29
|
+
* before any request.
|
|
30
|
+
*/
|
|
31
|
+
function jwt(claims) {
|
|
32
|
+
const part = (value) => Buffer.from(JSON.stringify(value)).toString("base64url");
|
|
33
|
+
return `${part({ alg: "HS256" })}.${part(claims)}.sig`;
|
|
34
|
+
}
|
|
35
|
+
describe("the agent contract, against the real CLI", function () {
|
|
36
|
+
// ts-node compiles the CLI on each spawn.
|
|
37
|
+
this.timeout(90000);
|
|
38
|
+
let home;
|
|
39
|
+
let workDir;
|
|
40
|
+
beforeEach(() => {
|
|
41
|
+
home = fs_1.default.mkdtempSync(path_1.default.join(os_1.default.tmpdir(), "cred-home-"));
|
|
42
|
+
workDir = fs_1.default.mkdtempSync(path_1.default.join(os_1.default.tmpdir(), "cred-work-"));
|
|
43
|
+
fs_1.default.writeFileSync(path_1.default.join(home, ".cred"), JSON.stringify({
|
|
44
|
+
configPerEnvironment: {
|
|
45
|
+
production: {
|
|
46
|
+
organization: "acme",
|
|
47
|
+
project: "prod-bars",
|
|
48
|
+
jwtAccessToken: jwt({
|
|
49
|
+
aud: "https://ms2data.us.auth0.com/api/v2/",
|
|
50
|
+
exp: Math.floor(Date.now() / 1000) + 3600,
|
|
51
|
+
}),
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
activeEnvironment: "production",
|
|
55
|
+
}));
|
|
56
|
+
});
|
|
57
|
+
afterEach(() => {
|
|
58
|
+
fs_1.default.rmSync(home, { recursive: true, force: true });
|
|
59
|
+
fs_1.default.rmSync(workDir, { recursive: true, force: true });
|
|
60
|
+
});
|
|
61
|
+
function cred(args, env = {}) {
|
|
62
|
+
const result = (0, child_process_1.spawnSync)(process.execPath, [
|
|
63
|
+
path_1.default.join(__dirname, "..", "node_modules", "ts-node", "dist", "bin.js"),
|
|
64
|
+
"--transpile-only",
|
|
65
|
+
path_1.default.join(__dirname, "index.ts"),
|
|
66
|
+
...args,
|
|
67
|
+
], {
|
|
68
|
+
cwd: workDir,
|
|
69
|
+
// A pipe, not a TTY: the shape an agent's shell tool provides.
|
|
70
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
71
|
+
env: Object.assign(Object.assign(Object.assign({}, process.env), { HOME: home, CI: undefined, NO_COLOR: "1",
|
|
72
|
+
// No registry call from a test.
|
|
73
|
+
CRED_NO_UPDATE_CHECK: "1" }), env),
|
|
74
|
+
encoding: "utf-8",
|
|
75
|
+
// The failure this spec exists to catch is a prompt waiting on a
|
|
76
|
+
// pipe forever. Without a deadline that is a hung test run, not a
|
|
77
|
+
// red one.
|
|
78
|
+
timeout: 30000,
|
|
79
|
+
});
|
|
80
|
+
if (result.signal) {
|
|
81
|
+
throw new Error(`cred ${args.join(" ")} did not exit within 30s (killed with ${result.signal}) — a prompt is waiting on a pipe. stderr so far:\n${result.stderr}`);
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
status: result.status,
|
|
85
|
+
stdout: result.stdout,
|
|
86
|
+
stderr: result.stderr,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
it("status --json puts one JSON document on stdout and nothing else", () => {
|
|
90
|
+
const run = cred(["status", "--json"]);
|
|
91
|
+
(0, chai_1.expect)(run.status, run.stderr).to.equal(0);
|
|
92
|
+
const report = JSON.parse(run.stdout);
|
|
93
|
+
(0, chai_1.expect)(report.organization).to.equal("acme");
|
|
94
|
+
(0, chai_1.expect)(report.environment).to.equal("prod-bars");
|
|
95
|
+
(0, chai_1.expect)(report.token.valid).to.equal(true);
|
|
96
|
+
(0, chai_1.expect)(report.directory).to.equal(null);
|
|
97
|
+
(0, chai_1.expect)(report.publisher).to.equal(null);
|
|
98
|
+
});
|
|
99
|
+
describe("--cell", () => {
|
|
100
|
+
// Each cell has its own Auth0 audience, and the `sub` tells the tokens apart.
|
|
101
|
+
const token = (cell) => jwt({
|
|
102
|
+
aud: environments_1.auth0ConfigsByEnv[cell].audience,
|
|
103
|
+
sub: cell,
|
|
104
|
+
exp: Math.floor(Date.now() / 1000) + 3600,
|
|
105
|
+
});
|
|
106
|
+
beforeEach(() => {
|
|
107
|
+
const config = JSON.parse(fs_1.default.readFileSync(path_1.default.join(home, ".cred"), "utf-8"));
|
|
108
|
+
config.configPerEnvironment.staging = {
|
|
109
|
+
organization: "acme",
|
|
110
|
+
project: "stage-bars",
|
|
111
|
+
jwtAccessToken: token("staging"),
|
|
112
|
+
};
|
|
113
|
+
config.configPerEnvironment["aws-dev"] = {
|
|
114
|
+
organization: "acme",
|
|
115
|
+
project: "aws-bars",
|
|
116
|
+
jwtAccessToken: token("aws-dev"),
|
|
117
|
+
};
|
|
118
|
+
fs_1.default.writeFileSync(path_1.default.join(home, ".cred"), JSON.stringify(config));
|
|
119
|
+
});
|
|
120
|
+
const activeEnvironment = () => JSON.parse(fs_1.default.readFileSync(path_1.default.join(home, ".cred"), "utf-8"))
|
|
121
|
+
.activeEnvironment;
|
|
122
|
+
it("names the cell before or after the subcommand, and leaves activeEnvironment alone", () => {
|
|
123
|
+
for (const args of [
|
|
124
|
+
["--cell", "staging", "status", "--json"],
|
|
125
|
+
["status", "--json", "--cell=staging"],
|
|
126
|
+
]) {
|
|
127
|
+
const run = cred(args);
|
|
128
|
+
(0, chai_1.expect)(run.status, run.stderr).to.equal(0);
|
|
129
|
+
const report = JSON.parse(run.stdout);
|
|
130
|
+
(0, chai_1.expect)(report.deployment).to.equal("staging");
|
|
131
|
+
(0, chai_1.expect)(report.deploymentFrom).to.equal("flag");
|
|
132
|
+
(0, chai_1.expect)(report.environment).to.equal("stage-bars");
|
|
133
|
+
}
|
|
134
|
+
(0, chai_1.expect)(activeEnvironment()).to.equal("production");
|
|
135
|
+
});
|
|
136
|
+
it("prints the token of the cell it names", () => {
|
|
137
|
+
const run = cred(["--cell", "staging", "token"]);
|
|
138
|
+
(0, chai_1.expect)(run.status, run.stderr).to.equal(0);
|
|
139
|
+
const claims = JSON.parse(Buffer.from(run.stdout.trim().split(".")[1], "base64url").toString());
|
|
140
|
+
(0, chai_1.expect)(claims.sub).to.equal("staging");
|
|
141
|
+
(0, chai_1.expect)(activeEnvironment()).to.equal("production");
|
|
142
|
+
});
|
|
143
|
+
it("refuses a login that would land on another cell, and leaves activeEnvironment alone", () => {
|
|
144
|
+
const run = cred([
|
|
145
|
+
"--cell",
|
|
146
|
+
"staging",
|
|
147
|
+
"login",
|
|
148
|
+
"acme",
|
|
149
|
+
"-c",
|
|
150
|
+
"aws",
|
|
151
|
+
"--no-browser",
|
|
152
|
+
]);
|
|
153
|
+
(0, chai_1.expect)(run.status, run.stdout).to.equal(1);
|
|
154
|
+
(0, chai_1.expect)(run.stderr).to.not.contain(" at ");
|
|
155
|
+
(0, chai_1.expect)(activeEnvironment()).to.equal("production");
|
|
156
|
+
});
|
|
157
|
+
it("refuses a write in a directory pinned to another cell, naming init", () => {
|
|
158
|
+
fs_1.default.mkdirSync(path_1.default.join(workDir, ".credible"));
|
|
159
|
+
fs_1.default.writeFileSync(path_1.default.join(workDir, ".credible", "config.json"), JSON.stringify({ deployment: "staging", organization: "acme" }));
|
|
160
|
+
const run = cred(["--cell", "aws-dev", "publish"]);
|
|
161
|
+
(0, chai_1.expect)(run.status).to.equal(1);
|
|
162
|
+
(0, chai_1.expect)(run.stderr).to.contain("--cell aws-dev init");
|
|
163
|
+
(0, chai_1.expect)(run.stderr).to.not.contain(" at ");
|
|
164
|
+
});
|
|
165
|
+
it("refuses a write whose option value hides it from the argv heuristic", () => {
|
|
166
|
+
fs_1.default.mkdirSync(path_1.default.join(workDir, ".credible"));
|
|
167
|
+
fs_1.default.writeFileSync(path_1.default.join(workDir, ".credible", "config.json"), JSON.stringify({ deployment: "staging", organization: "acme" }));
|
|
168
|
+
const run = cred([
|
|
169
|
+
"--cell",
|
|
170
|
+
"aws-dev",
|
|
171
|
+
"publish",
|
|
172
|
+
"--replication",
|
|
173
|
+
"2",
|
|
174
|
+
"--yes",
|
|
175
|
+
]);
|
|
176
|
+
(0, chai_1.expect)(run.status).to.equal(1);
|
|
177
|
+
(0, chai_1.expect)(run.stderr).to.contain("--cell aws-dev init");
|
|
178
|
+
});
|
|
179
|
+
for (const flag of ["--help", "--dry-run"]) {
|
|
180
|
+
it(`does not refuse publish ${flag} in a directory pinned to another cell`, () => {
|
|
181
|
+
fs_1.default.mkdirSync(path_1.default.join(workDir, ".credible"));
|
|
182
|
+
fs_1.default.writeFileSync(path_1.default.join(workDir, ".credible", "config.json"), JSON.stringify({ deployment: "staging", organization: "acme" }));
|
|
183
|
+
const run = cred(["--cell", "aws-dev", "publish", flag]);
|
|
184
|
+
(0, chai_1.expect)(run.stderr).to.not.contain("--cell aws-dev init");
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
describe("logout", () => {
|
|
188
|
+
const signedIn = () => {
|
|
189
|
+
const config = JSON.parse(fs_1.default.readFileSync(path_1.default.join(home, ".cred"), "utf-8"));
|
|
190
|
+
return Object.entries(config.configPerEnvironment)
|
|
191
|
+
.filter(([, slot]) => slot.jwtAccessToken)
|
|
192
|
+
.map(([cell]) => cell);
|
|
193
|
+
};
|
|
194
|
+
it("signs out of the cell a directory pin names, and says so", () => {
|
|
195
|
+
fs_1.default.mkdirSync(path_1.default.join(workDir, ".credible"));
|
|
196
|
+
fs_1.default.writeFileSync(path_1.default.join(workDir, ".credible", "config.json"), JSON.stringify({ deployment: "aws-dev", organization: "acme" }));
|
|
197
|
+
const run = cred(["logout"]);
|
|
198
|
+
(0, chai_1.expect)(run.status, run.stderr).to.equal(0);
|
|
199
|
+
(0, chai_1.expect)(run.stderr).to.contain("Signed out of aws-dev (acme/aws-bars), pinned in .credible/config.json.");
|
|
200
|
+
(0, chai_1.expect)(signedIn()).to.have.members(["production", "staging"]);
|
|
201
|
+
(0, chai_1.expect)(activeEnvironment()).to.equal("production");
|
|
202
|
+
});
|
|
203
|
+
it("lets --cell win over the pin, and over the global cell", () => {
|
|
204
|
+
const run = cred(["--cell", "staging", "logout"]);
|
|
205
|
+
(0, chai_1.expect)(run.status, run.stderr).to.equal(0);
|
|
206
|
+
(0, chai_1.expect)(run.stderr).to.contain("Signed out of staging (acme/stage-bars), set by --cell.");
|
|
207
|
+
(0, chai_1.expect)(signedIn()).to.have.members(["production", "aws-dev"]);
|
|
208
|
+
});
|
|
209
|
+
it("lists the signed-in cells and the command when the resolved cell has nothing to clear", () => {
|
|
210
|
+
const run = cred(["--cell", "dev", "logout"]);
|
|
211
|
+
(0, chai_1.expect)(run.status, run.stderr).to.equal(0);
|
|
212
|
+
(0, chai_1.expect)(run.stderr).to.contain("Not signed in to dev");
|
|
213
|
+
(0, chai_1.expect)(run.stderr).to.contain("`cred --cell staging logout`");
|
|
214
|
+
(0, chai_1.expect)(signedIn()).to.have.members([
|
|
215
|
+
"production",
|
|
216
|
+
"staging",
|
|
217
|
+
"aws-dev",
|
|
218
|
+
]);
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
it("rejects an unknown cell without a stack trace, as JSON under status --json", () => {
|
|
222
|
+
const plain = cred(["--cell", "bogus", "status"]);
|
|
223
|
+
(0, chai_1.expect)(plain.status).to.equal(1);
|
|
224
|
+
(0, chai_1.expect)(plain.stderr)
|
|
225
|
+
.to.contain("Unknown cell")
|
|
226
|
+
.and.to.contain("aws-dev");
|
|
227
|
+
(0, chai_1.expect)(plain.stderr).to.not.contain(" at ");
|
|
228
|
+
// Before the command too: the bad value must not be read as it.
|
|
229
|
+
const before = cred(["--cell", "bogus", "status", "--json"]);
|
|
230
|
+
(0, chai_1.expect)(JSON.parse(before.stdout).error).to.contain("Unknown cell");
|
|
231
|
+
const json = cred(["status", "--json", "--cell", "bogus"]);
|
|
232
|
+
(0, chai_1.expect)(json.status).to.equal(1);
|
|
233
|
+
(0, chai_1.expect)(JSON.parse(json.stdout).error).to.contain("Unknown cell");
|
|
234
|
+
});
|
|
235
|
+
it("lets two concurrent processes each report their own cell", () => __awaiter(this, void 0, void 0, function* () {
|
|
236
|
+
const run = (cell) => new Promise((resolve, reject) => {
|
|
237
|
+
const child = (0, child_process_1.spawn)(process.execPath, [
|
|
238
|
+
path_1.default.join(__dirname, "..", "node_modules", "ts-node", "dist", "bin.js"),
|
|
239
|
+
"--transpile-only",
|
|
240
|
+
path_1.default.join(__dirname, "index.ts"),
|
|
241
|
+
"status",
|
|
242
|
+
"--json",
|
|
243
|
+
"--cell",
|
|
244
|
+
cell,
|
|
245
|
+
], {
|
|
246
|
+
cwd: workDir,
|
|
247
|
+
env: Object.assign(Object.assign({}, process.env), { HOME: home, CRED_NO_UPDATE_CHECK: "1" }),
|
|
248
|
+
});
|
|
249
|
+
let out = "";
|
|
250
|
+
child.stdout.on("data", (chunk) => (out += chunk));
|
|
251
|
+
child.on("error", reject);
|
|
252
|
+
child.on("close", () => resolve(JSON.parse(out).deployment));
|
|
253
|
+
});
|
|
254
|
+
(0, chai_1.expect)(yield Promise.all([run("staging"), run("aws-dev")])).to.eql([
|
|
255
|
+
"staging",
|
|
256
|
+
"aws-dev",
|
|
257
|
+
]);
|
|
258
|
+
(0, chai_1.expect)(activeEnvironment()).to.equal("production");
|
|
259
|
+
}));
|
|
260
|
+
});
|
|
261
|
+
it("names a newer cred on stderr, leaving --json stdout alone", () => {
|
|
262
|
+
// A fresh cache, so no ask is started; under ts-node there is no compiled
|
|
263
|
+
// worker to start one anyway.
|
|
264
|
+
fs_1.default.mkdirSync(path_1.default.join(home, ".credible"));
|
|
265
|
+
fs_1.default.writeFileSync(path_1.default.join(home, ".credible", "version-check.json"), JSON.stringify({ checkedAt: Date.now(), latest: "999.0.0" }));
|
|
266
|
+
const run = cred(["status", "--json"], {
|
|
267
|
+
CRED_NO_UPDATE_CHECK: undefined,
|
|
268
|
+
NO_UPDATE_NOTIFIER: undefined,
|
|
269
|
+
});
|
|
270
|
+
(0, chai_1.expect)(run.status, run.stderr).to.equal(0);
|
|
271
|
+
(0, chai_1.expect)(run.stderr).to.contain("999.0.0 is available. Update: npm i -g @credibledata/cred-cli@latest");
|
|
272
|
+
(0, chai_1.expect)(JSON.parse(run.stdout).organization).to.equal("acme");
|
|
273
|
+
});
|
|
274
|
+
// A corrupt ~/.cred is what a caller runs `status` to find out about. The
|
|
275
|
+
// file is read at startup, before Commander parses anything, so without the
|
|
276
|
+
// startup guard this was a stack trace and an empty stdout.
|
|
277
|
+
it("status --json answers a corrupt ~/.cred with a JSON error", () => {
|
|
278
|
+
fs_1.default.writeFileSync(path_1.default.join(home, ".cred"), "{ not json");
|
|
279
|
+
const run = cred(["status", "--json"]);
|
|
280
|
+
(0, chai_1.expect)(run.status, run.stderr).to.equal(1);
|
|
281
|
+
const report = JSON.parse(run.stdout);
|
|
282
|
+
(0, chai_1.expect)(report.error).to.contain("cred login");
|
|
283
|
+
(0, chai_1.expect)(run.stderr).to.not.contain(" at ");
|
|
284
|
+
});
|
|
285
|
+
// The confirmation is the cheapest real prompt to reach: `cred publish`
|
|
286
|
+
// refuses it before any network call, so this exercises the whole path — a
|
|
287
|
+
// real spawn, a real pipe, `NeedsInputError`, exit 2, the flag on stderr —
|
|
288
|
+
// without a control plane.
|
|
289
|
+
it("a question it cannot ask exits 2 and names the flag", () => {
|
|
290
|
+
fs_1.default.writeFileSync(path_1.default.join(workDir, "publisher.json"), JSON.stringify({ name: "bars", version: "0.0.1" }));
|
|
291
|
+
const run = cred(["publish"]);
|
|
292
|
+
(0, chai_1.expect)(run.status, run.stderr).to.equal(2);
|
|
293
|
+
(0, chai_1.expect)(run.stderr).to.contain("--yes");
|
|
294
|
+
(0, chai_1.expect)(run.stderr).to.contain("without a terminal");
|
|
295
|
+
(0, chai_1.expect)(run.stdout).to.equal("");
|
|
296
|
+
});
|
|
297
|
+
// The preHook skips the session refresh for a dry run. Without that skip it
|
|
298
|
+
// demanded a login before the preview, which needs none.
|
|
299
|
+
it("publish --dry-run and add version --dry-run work with no login", () => {
|
|
300
|
+
fs_1.default.rmSync(path_1.default.join(home, ".cred"));
|
|
301
|
+
fs_1.default.writeFileSync(path_1.default.join(workDir, "publisher.json"), JSON.stringify({ name: "bars", version: "0.0.1" }));
|
|
302
|
+
for (const command of [["publish"], ["add", "version"]]) {
|
|
303
|
+
const run = cred([...command, "--dry-run"]);
|
|
304
|
+
(0, chai_1.expect)(run.status, `${command.join(" ")}: ${run.stderr}`).to.equal(0);
|
|
305
|
+
(0, chai_1.expect)(run.stdout.trim(), command.join(" ")).to.equal("publisher.json");
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
it("a picker it cannot show exits 2 and names the flag and the options", () => {
|
|
309
|
+
fs_1.default.writeFileSync(path_1.default.join(workDir, "publisher.config.json"), JSON.stringify({
|
|
310
|
+
connections: [
|
|
311
|
+
{
|
|
312
|
+
name: "warehouse",
|
|
313
|
+
type: "postgres",
|
|
314
|
+
postgresConnection: { host: "db", password: "hunter2" },
|
|
315
|
+
},
|
|
316
|
+
{ name: "other", type: "postgres", postgresConnection: {} },
|
|
317
|
+
],
|
|
318
|
+
}));
|
|
319
|
+
const run = cred(["add", "connection", "--from-publisher-config"]);
|
|
320
|
+
(0, chai_1.expect)(run.status, run.stderr).to.equal(2);
|
|
321
|
+
// This command's own flag. `--connections` is `cred init`'s, and
|
|
322
|
+
// following it here was an unknown-option error.
|
|
323
|
+
(0, chai_1.expect)(run.stderr).to.contain("Pass --name <connection> (once per connection).");
|
|
324
|
+
(0, chai_1.expect)(run.stderr).to.contain("Options: warehouse, other.");
|
|
325
|
+
(0, chai_1.expect)(run.stderr, "a credential never reaches the terminal").to.not.contain("hunter2");
|
|
326
|
+
(0, chai_1.expect)(run.stdout).to.equal("");
|
|
327
|
+
});
|
|
328
|
+
it("a plain failure is still exit 1, with the fix on stderr", () => {
|
|
329
|
+
const run = cred(["dev", "--no-open"]);
|
|
330
|
+
(0, chai_1.expect)(run.status).to.equal(1);
|
|
331
|
+
(0, chai_1.expect)(run.stderr).to.contain("Run `cred init` here first");
|
|
332
|
+
});
|
|
333
|
+
// These guards printed their error and exited 0, so a script read
|
|
334
|
+
// `get version --wait` with no environment set as a version that was READY.
|
|
335
|
+
it("a command that needs an environment exits 1 when none is set, with nothing on stdout", () => {
|
|
336
|
+
const config = JSON.parse(fs_1.default.readFileSync(path_1.default.join(home, ".cred"), "utf-8"));
|
|
337
|
+
delete config.configPerEnvironment.production.project;
|
|
338
|
+
fs_1.default.writeFileSync(path_1.default.join(home, ".cred"), JSON.stringify(config));
|
|
339
|
+
for (const args of [
|
|
340
|
+
["get", "version", "bars", "0.0.1", "--wait"],
|
|
341
|
+
["get", "run", "bars", "run-1"],
|
|
342
|
+
["ls", "versions", "bars"],
|
|
343
|
+
["ls", "connections"],
|
|
344
|
+
]) {
|
|
345
|
+
const run = cred(args);
|
|
346
|
+
(0, chai_1.expect)(run.status, `cred ${args.join(" ")}: ${run.stderr}`).to.equal(1);
|
|
347
|
+
(0, chai_1.expect)(run.stderr).to.contain("Please, make sure to set an environment");
|
|
348
|
+
(0, chai_1.expect)(run.stdout).to.equal("");
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
// `debugRequested` reads argv directly, so a unit test cannot tell whether
|
|
352
|
+
// Commander accepts the flag the startup line tells the user to pass.
|
|
353
|
+
it("init and dev accept the --debug their startup line names", () => {
|
|
354
|
+
const dev = cred(["dev", "--no-open", "--debug"]);
|
|
355
|
+
(0, chai_1.expect)(dev.stderr).to.not.contain("unknown option");
|
|
356
|
+
(0, chai_1.expect)(dev.stderr).to.contain("Run `cred init` here first");
|
|
357
|
+
const init = cred(["init", "--no-start", "--no-open", "--debug"]);
|
|
358
|
+
(0, chai_1.expect)(init.stderr).to.not.contain("unknown option");
|
|
359
|
+
});
|
|
360
|
+
it("init refuses an unanswerable question before it writes anything", () => {
|
|
361
|
+
fs_1.default.writeFileSync(path_1.default.join(workDir, "publisher.config.json"), JSON.stringify({
|
|
362
|
+
connections: [
|
|
363
|
+
{ name: "warehouse", type: "postgres", postgresConnection: {} },
|
|
364
|
+
],
|
|
365
|
+
}));
|
|
366
|
+
const before = fs_1.default.readFileSync(path_1.default.join(home, ".cred"), "utf-8");
|
|
367
|
+
const run = cred(["init", "--no-start", "--no-open"]);
|
|
368
|
+
(0, chai_1.expect)(run.status, run.stderr).to.equal(2);
|
|
369
|
+
(0, chai_1.expect)(run.stderr).to.contain("Pass --connections <all|none|name,name>.");
|
|
370
|
+
(0, chai_1.expect)(fs_1.default.readdirSync(workDir)).to.eql(["publisher.config.json"]);
|
|
371
|
+
(0, chai_1.expect)(fs_1.default.readFileSync(path_1.default.join(home, ".cred"), "utf-8")).to.equal(before);
|
|
372
|
+
});
|
|
373
|
+
// A value the flag does not accept is a usage error, so it exits 2 like the
|
|
374
|
+
// prompts above, not 1 like a run that failed. The fix hint stays.
|
|
375
|
+
it("an invalid --skills or --timeout value exits 2 with the fix on stderr", () => {
|
|
376
|
+
const skills = cred([
|
|
377
|
+
"init",
|
|
378
|
+
"--no-start",
|
|
379
|
+
"--no-open",
|
|
380
|
+
"--skills",
|
|
381
|
+
"bogus",
|
|
382
|
+
]);
|
|
383
|
+
(0, chai_1.expect)(skills.status, skills.stderr).to.equal(2);
|
|
384
|
+
(0, chai_1.expect)(skills.stderr).to.contain("--skills <replace|keep|none> was given 'bogus'.");
|
|
385
|
+
(0, chai_1.expect)(skills.stderr).to.contain("Fix: pass replace, keep, or none.");
|
|
386
|
+
(0, chai_1.expect)(skills.stdout).to.equal("");
|
|
387
|
+
const timeout = cred([
|
|
388
|
+
"get",
|
|
389
|
+
"version",
|
|
390
|
+
"bars",
|
|
391
|
+
"0.0.1",
|
|
392
|
+
"--wait",
|
|
393
|
+
"--timeout",
|
|
394
|
+
"abc",
|
|
395
|
+
]);
|
|
396
|
+
(0, chai_1.expect)(timeout.status, timeout.stderr).to.equal(2);
|
|
397
|
+
(0, chai_1.expect)(timeout.stderr).to.contain("Invalid --timeout 'abc': expected a number of minutes above 0. Fix: --timeout 30");
|
|
398
|
+
// Without --wait, --timeout would be ignored, valid value or not.
|
|
399
|
+
const unwaited = cred([
|
|
400
|
+
"get",
|
|
401
|
+
"version",
|
|
402
|
+
"bars",
|
|
403
|
+
"0.0.1",
|
|
404
|
+
"--timeout",
|
|
405
|
+
"5",
|
|
406
|
+
]);
|
|
407
|
+
(0, chai_1.expect)(unwaited.status, unwaited.stderr).to.equal(2);
|
|
408
|
+
(0, chai_1.expect)(unwaited.stderr).to.contain("--timeout only applies with --wait. Fix: add --wait, or drop --timeout.");
|
|
409
|
+
(0, chai_1.expect)(unwaited.stdout).to.equal("");
|
|
410
|
+
});
|
|
411
|
+
// The refresh before a command has to renew the login the command will
|
|
412
|
+
// send. `add version` runs publish's action, and checking the global login
|
|
413
|
+
// for it failed with "not logged in" in a directory whose own was fine.
|
|
414
|
+
it("refreshes the pinned deployment's login for publish and add version", () => {
|
|
415
|
+
fs_1.default.writeFileSync(path_1.default.join(home, ".cred"), JSON.stringify({
|
|
416
|
+
configPerEnvironment: {
|
|
417
|
+
staging: {
|
|
418
|
+
organization: "acme",
|
|
419
|
+
project: "prod-bars",
|
|
420
|
+
jwtAccessToken: jwt({
|
|
421
|
+
aud: "https://dev-ohaafogw5p8uyx1m.us.auth0.com/api/v2/",
|
|
422
|
+
exp: Math.floor(Date.now() / 1000) + 3600,
|
|
423
|
+
}),
|
|
424
|
+
},
|
|
425
|
+
},
|
|
426
|
+
activeEnvironment: "production",
|
|
427
|
+
}));
|
|
428
|
+
fs_1.default.mkdirSync(path_1.default.join(workDir, ".credible"));
|
|
429
|
+
fs_1.default.writeFileSync(path_1.default.join(workDir, ".credible", "config.json"), JSON.stringify({
|
|
430
|
+
deployment: "staging",
|
|
431
|
+
organization: "acme",
|
|
432
|
+
environment: "prod-bars",
|
|
433
|
+
}));
|
|
434
|
+
for (const command of [["publish"], ["add", "version"]]) {
|
|
435
|
+
const run = cred([...command, "--yes"]);
|
|
436
|
+
(0, chai_1.expect)(run.stderr, command.join(" ")).to.not.contain("not logged in");
|
|
437
|
+
(0, chai_1.expect)(run.stderr, command.join(" ")).to.contain("Publishing to acme/prod-bars on staging");
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
// Every org- and environment-scoped command acts on the pin, as publish
|
|
441
|
+
// does. They read only ~/.cred, so in a directory pinned to acme a
|
|
442
|
+
// `cred rm connection` would have deleted from the global organization.
|
|
443
|
+
it("acts on the pinned organization for every scoped command, and names it in the question", () => {
|
|
444
|
+
fs_1.default.writeFileSync(path_1.default.join(home, ".cred"), JSON.stringify({
|
|
445
|
+
configPerEnvironment: {
|
|
446
|
+
production: {
|
|
447
|
+
organization: "global-org",
|
|
448
|
+
project: "global-env",
|
|
449
|
+
jwtAccessToken: jwt({
|
|
450
|
+
aud: "https://ms2data.us.auth0.com/api/v2/",
|
|
451
|
+
exp: Math.floor(Date.now() / 1000) + 3600,
|
|
452
|
+
}),
|
|
453
|
+
},
|
|
454
|
+
staging: {
|
|
455
|
+
organization: "acme",
|
|
456
|
+
project: "prod-bars",
|
|
457
|
+
jwtAccessToken: jwt({
|
|
458
|
+
aud: "https://dev-ohaafogw5p8uyx1m.us.auth0.com/api/v2/",
|
|
459
|
+
exp: Math.floor(Date.now() / 1000) + 3600,
|
|
460
|
+
}),
|
|
461
|
+
},
|
|
462
|
+
},
|
|
463
|
+
activeEnvironment: "production",
|
|
464
|
+
}));
|
|
465
|
+
fs_1.default.mkdirSync(path_1.default.join(workDir, ".credible"));
|
|
466
|
+
fs_1.default.writeFileSync(path_1.default.join(workDir, ".credible", "config.json"), JSON.stringify({
|
|
467
|
+
deployment: "staging",
|
|
468
|
+
organization: "acme",
|
|
469
|
+
environment: "analytics",
|
|
470
|
+
}));
|
|
471
|
+
// No --yes and no terminal: it stops at the question, before any request.
|
|
472
|
+
const run = cred(["rm", "connection", "bq_demo"]);
|
|
473
|
+
(0, chai_1.expect)(run.status, run.stderr).to.equal(2);
|
|
474
|
+
(0, chai_1.expect)(run.stderr).to.contain("Using acme/analytics on staging, pinned in .credible/config.json.");
|
|
475
|
+
(0, chai_1.expect)(run.stderr).to.contain("(acme/analytics on staging)");
|
|
476
|
+
(0, chai_1.expect)(run.stderr).to.not.contain("global-org");
|
|
477
|
+
});
|
|
478
|
+
// The pin keeps naming its own deployment, so a login to another one would
|
|
479
|
+
// store tokens nothing in this directory reads.
|
|
480
|
+
it("refuses a login to another deployment inside a pinned directory", () => {
|
|
481
|
+
fs_1.default.mkdirSync(path_1.default.join(workDir, ".credible"));
|
|
482
|
+
fs_1.default.writeFileSync(path_1.default.join(workDir, ".credible", "config.json"), JSON.stringify({
|
|
483
|
+
deployment: "staging",
|
|
484
|
+
organization: "acme",
|
|
485
|
+
environment: "prod-bars",
|
|
486
|
+
}));
|
|
487
|
+
const before = fs_1.default.readFileSync(path_1.default.join(home, ".cred"), "utf-8");
|
|
488
|
+
const run = cred(["login", "videoamp", "-c", "aws", "--no-browser"]);
|
|
489
|
+
(0, chai_1.expect)(run.status, run.stderr).to.equal(1);
|
|
490
|
+
(0, chai_1.expect)(run.stderr).to.contain("This directory is pinned to the staging deployment, so a login to videoamp here would not be used by anything in it.");
|
|
491
|
+
(0, chai_1.expect)(run.stderr).to.contain(`set "deployment": "videoamp" in ${fs_1.default.realpathSync(workDir)}/.credible/config.json`);
|
|
492
|
+
(0, chai_1.expect)(fs_1.default.readFileSync(path_1.default.join(home, ".cred"), "utf-8")).to.equal(before);
|
|
493
|
+
});
|
|
494
|
+
// Every command against a resource is `cred <verb> <resource>`. The old
|
|
495
|
+
// top-level verbs stay, listed, so nothing that uses them breaks.
|
|
496
|
+
describe("command shapes", () => {
|
|
497
|
+
it("names itself cred in help, not the file it runs from", () => {
|
|
498
|
+
(0, chai_1.expect)(cred(["--help"]).stdout).to.match(/^Usage: cred /);
|
|
499
|
+
});
|
|
500
|
+
// An agent learns a command from --help alone: the README does not ship
|
|
501
|
+
// with the CLI.
|
|
502
|
+
it("documents what publish uploads and prints, in publish --help and add version --help", () => {
|
|
503
|
+
for (const command of [["publish"], ["add", "version"]]) {
|
|
504
|
+
const help = cred([...command, "--help"]).stdout;
|
|
505
|
+
(0, chai_1.expect)(help, command.join(" ")).to.contain(".credignore");
|
|
506
|
+
// Rendered from PUBLISH_EXCLUDES, so a credential file is named.
|
|
507
|
+
(0, chai_1.expect)(help, command.join(" ")).to.contain("publisher.config.json, .env");
|
|
508
|
+
(0, chai_1.expect)(help, command.join(" ")).to.contain('latest ("now", "when-built" or "no")');
|
|
509
|
+
}
|
|
510
|
+
});
|
|
511
|
+
// An agent that ran a plain `cred init` sat on a foreground publisher,
|
|
512
|
+
// with no `malloy` tools until it was restarted.
|
|
513
|
+
it("tells an agent, before it runs init, that init needs a session restart", () => {
|
|
514
|
+
const help = cred(["init", "--help"]).stdout;
|
|
515
|
+
(0, chai_1.expect)(help).to.contain("cred init --no-start");
|
|
516
|
+
(0, chai_1.expect)(help).to.contain("Ask the user to restart you");
|
|
517
|
+
(0, chai_1.expect)(cred(["--help"]).stdout).to.contain("read `cred init --help`");
|
|
518
|
+
});
|
|
519
|
+
it("accepts list for ls", () => {
|
|
520
|
+
const run = cred(["list", "environments", "--help"]);
|
|
521
|
+
(0, chai_1.expect)(run.status, run.stderr).to.equal(0);
|
|
522
|
+
(0, chai_1.expect)(run.stdout).to.contain("List all environments.");
|
|
523
|
+
});
|
|
524
|
+
it("offers add version / add run / update version / update run, and keeps the old verbs listed", () => {
|
|
525
|
+
const top = cred(["--help"]).stdout;
|
|
526
|
+
for (const old of [
|
|
527
|
+
"publish",
|
|
528
|
+
"archive",
|
|
529
|
+
"unarchive",
|
|
530
|
+
"rerun",
|
|
531
|
+
"cancel-run",
|
|
532
|
+
]) {
|
|
533
|
+
(0, chai_1.expect)(top).to.match(new RegExp(`^ ${old}\\b`, "m"));
|
|
534
|
+
}
|
|
535
|
+
(0, chai_1.expect)(cred(["add", "--help"]).stdout).to.match(/version[\s\S]*run/);
|
|
536
|
+
(0, chai_1.expect)(cred(["update", "--help"]).stdout).to.match(/version[\s\S]*run/);
|
|
537
|
+
});
|
|
538
|
+
it("refuses an update that changes nothing, naming the flag", () => {
|
|
539
|
+
const version = cred(["update", "version", "orders", "1.0.0"]);
|
|
540
|
+
(0, chai_1.expect)(version.status).to.equal(1);
|
|
541
|
+
(0, chai_1.expect)(version.stderr).to.contain("Pass --archived");
|
|
542
|
+
const run = cred(["update", "run", "orders", "run-1"]);
|
|
543
|
+
(0, chai_1.expect)(run.status).to.equal(1);
|
|
544
|
+
(0, chai_1.expect)(run.stderr).to.contain("Pass --cancel");
|
|
545
|
+
});
|
|
546
|
+
});
|
|
547
|
+
});
|
|
548
|
+
//# sourceMappingURL=agent-contract.spec.js.map
|