@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
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.RESERVED_CONNECTION_NAMES = void 0;
|
|
7
|
+
exports.packageNameFromDirectory = packageNameFromDirectory;
|
|
8
|
+
exports.localEnvironmentName = localEnvironmentName;
|
|
9
|
+
exports.connectionUriFor = connectionUriFor;
|
|
10
|
+
exports.buildPublisherConfig = buildPublisherConfig;
|
|
11
|
+
exports.readLocalRetrieval = readLocalRetrieval;
|
|
12
|
+
exports.stampAccessToken = stampAccessToken;
|
|
13
|
+
const path_1 = __importDefault(require("path"));
|
|
14
|
+
const host_1 = require("./host");
|
|
15
|
+
const localpublisherconfig_1 = require("./localpublisherconfig");
|
|
16
|
+
/**
|
|
17
|
+
* Generating `publisher.config.json` — the file that tells a local Publisher
|
|
18
|
+
* which directory to serve and how to reach the warehouse.
|
|
19
|
+
*
|
|
20
|
+
* ## The shape trap
|
|
21
|
+
*
|
|
22
|
+
* The VS Code extension already builds "publisher connections", so its
|
|
23
|
+
* `convertToPublisherConnection` looks like the thing to reuse. It is not: it
|
|
24
|
+
* writes the *Malloy VS Code extension's* flat shape,
|
|
25
|
+
*
|
|
26
|
+
* { "is": "publisher", "connectionUri": "...", "accessToken": "...", "readOnly": true }
|
|
27
|
+
*
|
|
28
|
+
* into `malloy-config.json`, while the Publisher *server* requires its own
|
|
29
|
+
* nested shape,
|
|
30
|
+
*
|
|
31
|
+
* { "name": "...", "type": "publisher", "publisherConnection": { "connectionUri": "...", "accessToken": "..." } }
|
|
32
|
+
*
|
|
33
|
+
* (see the server's `connection_config.ts`, which rejects a missing
|
|
34
|
+
* `connectionUri` at config-load with exactly that Fix line). Two files, two
|
|
35
|
+
* consumers, two schemas for one concept. Port the logic, never the literal.
|
|
36
|
+
*
|
|
37
|
+
* ## Why no token is written here
|
|
38
|
+
*
|
|
39
|
+
* A `publisher` connection's `accessToken` is a short-lived JWT and the server
|
|
40
|
+
* has no refresh hook yet, so a token written at setup time is stale by the time
|
|
41
|
+
* anyone uses it. The supervisor stamps it at spawn, every spawn. Setup writing
|
|
42
|
+
* one would also mean a credential sitting in a file that setup tells the user
|
|
43
|
+
* to commit.
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* Connection names a local Publisher will not accept at environment level.
|
|
47
|
+
*
|
|
48
|
+
* `duckdb` is reserved for the per-package sandbox each package gets. Using it
|
|
49
|
+
* makes the server skip the entire environment — while still binding both ports
|
|
50
|
+
* and printing both listening lines, so nothing about the startup output says
|
|
51
|
+
* anything is wrong.
|
|
52
|
+
*/
|
|
53
|
+
exports.RESERVED_CONNECTION_NAMES = new Set(["duckdb"]);
|
|
54
|
+
/**
|
|
55
|
+
* The character rule Publisher enforces on package names (its `path_safety.ts`):
|
|
56
|
+
* letters, digits, `.`, `_`, `-`; not `.` or `..`; not starting with `.`.
|
|
57
|
+
*
|
|
58
|
+
* Kept identical to the server's so a name we generate is a name it will load.
|
|
59
|
+
* The name is derived from a directory basename, which is user-controlled and
|
|
60
|
+
* routinely contains spaces or starts with a dot, so it cannot be used raw.
|
|
61
|
+
*/
|
|
62
|
+
const SAFE_PACKAGE_NAME = /^(?!\.\.?$)(?!\.)[A-Za-z0-9._-]+$/;
|
|
63
|
+
/** Publisher's limit, less room for the `<name>.malloy` a package may also hold. */
|
|
64
|
+
const MAX_PACKAGE_NAME = 255 - ".malloy".length;
|
|
65
|
+
/**
|
|
66
|
+
* Turn a directory name into something Publisher will accept as a package name.
|
|
67
|
+
*
|
|
68
|
+
* Substitution rather than rejection: the user did not choose this string as a
|
|
69
|
+
* package name — we derived it from where they happened to be standing — so
|
|
70
|
+
* failing setup over a space in a folder name would be punishing them for our
|
|
71
|
+
* choice of default.
|
|
72
|
+
*/
|
|
73
|
+
function packageNameFromDirectory(directoryName) {
|
|
74
|
+
return safeName(directoryName, "models");
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The environment the local publisher serves the package under: the Credible
|
|
78
|
+
* environment's name with `-local`, so the agent and the user see which remote
|
|
79
|
+
* environment it proxies to, and cannot mistake one name for the other. A
|
|
80
|
+
* Credible name may hold spaces; the publisher's names may not, so it is
|
|
81
|
+
* cleaned by the same rule as a package name.
|
|
82
|
+
*/
|
|
83
|
+
function localEnvironmentName(credibleEnvironment) {
|
|
84
|
+
return safeName(`${credibleEnvironment}-local`, "local");
|
|
85
|
+
}
|
|
86
|
+
function safeName(raw, fallback) {
|
|
87
|
+
const cleaned = raw
|
|
88
|
+
.replace(/[^A-Za-z0-9._-]/g, "-")
|
|
89
|
+
.replace(/^[.\-_]+/, "")
|
|
90
|
+
.slice(0, MAX_PACKAGE_NAME);
|
|
91
|
+
// Two ways a derived name is not worth using: nothing survives (a directory
|
|
92
|
+
// named ".."), or only separators do (a directory named "@@@" becomes
|
|
93
|
+
// "---", which the server would happily accept and no human can read).
|
|
94
|
+
// Requiring one alphanumeric covers both.
|
|
95
|
+
const usable = /[A-Za-z0-9]/.test(cleaned) && SAFE_PACKAGE_NAME.test(cleaned);
|
|
96
|
+
return usable ? cleaned : fallback;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Data-plane base URL per deployment env.
|
|
100
|
+
*
|
|
101
|
+
* Keyed off {@link Environment} so the compiler fails the build if a deployment
|
|
102
|
+
* env is added without a data-plane host here — the omission that previously
|
|
103
|
+
* left `videoamp` pointing at the production host.
|
|
104
|
+
*/
|
|
105
|
+
const DATA_PLANE_BASE_URLS = {
|
|
106
|
+
production: (org) => `https://${org}.data.credibledata.com`,
|
|
107
|
+
videoamp: (org) => `https://${org}.data.videoamp-aws-us-east-1.credibledata.com`,
|
|
108
|
+
staging: (org) => `https://${org}.staging-data.credibledata.com`,
|
|
109
|
+
dev: (org) => `https://${org}.dev-data.credibledata.com`,
|
|
110
|
+
localhost: (org) => `http://${org}.data.credibledata.localhost:8000`,
|
|
111
|
+
// Org as a subdomain, like every cell; the Auth0 origins list the wildcard
|
|
112
|
+
// `*.aws-dev-data.credibledata.com`.
|
|
113
|
+
"aws-dev": (org) => `https://${org}.aws-dev-data.credibledata.com`,
|
|
114
|
+
"aws-dev-2": (org) => `https://${org}.aws-dev-2-data.credibledata.com`,
|
|
115
|
+
"aws-affinity": (org) => `https://${org}.aws-affinity-data.credibledata.com`,
|
|
116
|
+
"e2e-test": (org) => `http://${org}.data.credibledata.localhost:8000`,
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* The URL a local Publisher proxies SQL to.
|
|
120
|
+
*
|
|
121
|
+
* Note the form: `@malloydata/db-publisher` parses this positionally and issues
|
|
122
|
+
* its own requests against the legacy `/api/v0/projects/{env}/…` facade, while
|
|
123
|
+
* publisher-server's introspection appends paths verbatim to this
|
|
124
|
+
* `/environments/…` form. The router serves both, which is why a locally-spawned
|
|
125
|
+
* Publisher daisy-chaining to Credible needs no server-side change — but it
|
|
126
|
+
* means this string is load-bearing for two different request generations.
|
|
127
|
+
*/
|
|
128
|
+
function connectionUriFor(deployment, organization, credibleEnvironment, connectionName) {
|
|
129
|
+
const base = DATA_PLANE_BASE_URLS[deployment](organization);
|
|
130
|
+
return `${base}/api/v0/environments/${credibleEnvironment}/connections/${connectionName}`;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Build the config, or explain exactly why the inputs cannot produce one.
|
|
134
|
+
*
|
|
135
|
+
* Validation happens here rather than being left to the server because a config
|
|
136
|
+
* the server rejects at boot fails *after* setup has claimed success, and the
|
|
137
|
+
* server's error lands in a log the user is not reading yet.
|
|
138
|
+
*/
|
|
139
|
+
function buildPublisherConfig(options) {
|
|
140
|
+
var _a, _b;
|
|
141
|
+
const environmentName = (_a = options.environmentName) !== null && _a !== void 0 ? _a : "default";
|
|
142
|
+
const packageLocation = options.packageLocation;
|
|
143
|
+
const packageName = (_b = options.packageName) !== null && _b !== void 0 ? _b : options.credibleEnvironment;
|
|
144
|
+
// `path.isAbsolute`, not a leading-slash test: a Windows absolute path is
|
|
145
|
+
// `C:\models`, so the string check refused every `cred init` there — while
|
|
146
|
+
// `supervisor.ts` and `inquirerHost.ts` both carry win32 branches, i.e. the
|
|
147
|
+
// platform is supported everywhere else in this flow.
|
|
148
|
+
if (!path_1.default.isAbsolute(packageLocation)) {
|
|
149
|
+
throw new host_1.SetupError(`Package location '${packageLocation}' is not absolute.`, "this is a bug — the server refuses a relative location and skips the environment without failing the boot.");
|
|
150
|
+
}
|
|
151
|
+
if (!options.organization) {
|
|
152
|
+
throw new host_1.SetupError("Cannot build publisher.config.json without an organization.", "run `cred login` and pick an organization.");
|
|
153
|
+
}
|
|
154
|
+
if (!options.credibleEnvironment) {
|
|
155
|
+
throw new host_1.SetupError("Cannot build publisher.config.json without a Credible environment.", "run `cred set environment` and pick one.");
|
|
156
|
+
}
|
|
157
|
+
const connections = [];
|
|
158
|
+
for (const connection of options.connections) {
|
|
159
|
+
if (!connection.name) {
|
|
160
|
+
// A nameless connection cannot be addressed in Malloy, and the server
|
|
161
|
+
// rejects the entry, so skipping it beats failing the whole setup.
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
if (exports.RESERVED_CONNECTION_NAMES.has(connection.name)) {
|
|
165
|
+
// Not skippable, and not renameable either.
|
|
166
|
+
//
|
|
167
|
+
// Skipping would leave models that say `duckdb` resolving to the
|
|
168
|
+
// per-package sandbox instead of this warehouse — the same query
|
|
169
|
+
// returning different data, with nothing to indicate why. Renaming
|
|
170
|
+
// would break every model that already refers to it.
|
|
171
|
+
//
|
|
172
|
+
// So this is a genuine collision only the user can resolve, and the one
|
|
173
|
+
// useful thing setup can do is say exactly that.
|
|
174
|
+
throw new host_1.SetupError(`The Credible environment '${options.credibleEnvironment}' has a connection named '${connection.name}', which a local Publisher reserves for its per-package sandboxes.`, `rename the connection in Credible (\`cred update connection\`), then re-run setup. Leaving it would make models that reference '${connection.name}' silently read the local sandbox instead of your warehouse.`);
|
|
175
|
+
}
|
|
176
|
+
const connectionUri = connectionUriFor(options.deployment, options.organization, options.credibleEnvironment, connection.name);
|
|
177
|
+
// The server validates this at config-load and refuses a non-absolute or
|
|
178
|
+
// non-http(s) URI. Catch it here, where we can say which input was wrong.
|
|
179
|
+
let parsed;
|
|
180
|
+
try {
|
|
181
|
+
parsed = new URL(connectionUri);
|
|
182
|
+
}
|
|
183
|
+
catch (_c) {
|
|
184
|
+
throw new host_1.SetupError(`Built an invalid connectionUri for connection '${connection.name}'.`, `check the organization name '${options.organization}' and environment '${options.credibleEnvironment}' for stray characters.`);
|
|
185
|
+
}
|
|
186
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
187
|
+
throw new host_1.SetupError(`connectionUri for '${connection.name}' is not http or https (got '${parsed.protocol}').`, "this is a bug in the deployment's data-plane URL table.");
|
|
188
|
+
}
|
|
189
|
+
connections.push({
|
|
190
|
+
name: connection.name,
|
|
191
|
+
type: "publisher",
|
|
192
|
+
publisherConnection: { connectionUri },
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
// NO environment-level `duckdb` connection.
|
|
196
|
+
//
|
|
197
|
+
// The VS Code extension always injects one into `malloy-config.json`, and
|
|
198
|
+
// copying that here is wrong twice over. The server *reserves* the name
|
|
199
|
+
// ("Connection name 'duckdb' is reserved for per-package sandboxes") and its
|
|
200
|
+
// reaction is brutal: the whole environment is skipped, so the server boots,
|
|
201
|
+
// binds both ports, prints both listening lines — and serves zero packages.
|
|
202
|
+
// Setup would report success over an empty server.
|
|
203
|
+
//
|
|
204
|
+
// It is also unnecessary: each package gets its own DuckDB sandbox. The
|
|
205
|
+
// extension needs the entry because `malloy-config.json` feeds a different
|
|
206
|
+
// consumer (the bundled Malloy extension's in-editor previews), which has no
|
|
207
|
+
// per-package sandbox to fall back on. Same word, different rules.
|
|
208
|
+
//
|
|
209
|
+
// An environment-level DuckDB, if one is ever needed, must use another name
|
|
210
|
+
// (upstream suggests `shared_duckdb`).
|
|
211
|
+
return Object.assign({ frozenConfig: false, environments: [
|
|
212
|
+
{
|
|
213
|
+
name: environmentName,
|
|
214
|
+
packages: [{ name: packageName, location: packageLocation }],
|
|
215
|
+
connections,
|
|
216
|
+
},
|
|
217
|
+
] }, (options.retrieval ? { retrieval: options.retrieval } : {}));
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* The `retrieval` block of the user's own `publisher.config.json` in this
|
|
221
|
+
* directory, if it has one.
|
|
222
|
+
*
|
|
223
|
+
* The config the server runs on is ours, rebuilt at every start (see
|
|
224
|
+
* `sessionConfigPath`), so a setting written there is lost. The retrieval block
|
|
225
|
+
* is the part of a Publisher operator's config that still means something under
|
|
226
|
+
* `cred dev`: it picks the LLM and embedding models `get_context` ranks with.
|
|
227
|
+
* So it is read from the file a Publisher user already keeps it in, and copied
|
|
228
|
+
* unchanged. Its contents are the server's to validate: an unknown key or a bad
|
|
229
|
+
* value fails its startup (`PUBLISHER_INIT_FAILED`, naming the key and the
|
|
230
|
+
* valid ones), and `cred dev` exits with that message. That beats a second
|
|
231
|
+
* schema here that drifts from the server's. The API keys are environment
|
|
232
|
+
* variables (`LLM_API_KEY`, `EMBEDDING_API_KEY`), which the server inherits from
|
|
233
|
+
* the shell that ran `cred dev`.
|
|
234
|
+
*
|
|
235
|
+
* No file, an unreadable one, no `retrieval` key, or `"retrieval": null`:
|
|
236
|
+
* nothing to carry, and not an error. A `retrieval` that is not an object is reported and left out rather
|
|
237
|
+
* than handed to the server.
|
|
238
|
+
*/
|
|
239
|
+
function readLocalRetrieval(directory) {
|
|
240
|
+
const configPath = path_1.default.join(directory, "publisher.config.json");
|
|
241
|
+
const parsed = (0, localpublisherconfig_1.readLocalPublisherConfig)(directory);
|
|
242
|
+
if (!parsed || typeof parsed !== "object" || !("retrieval" in parsed)) {
|
|
243
|
+
return undefined;
|
|
244
|
+
}
|
|
245
|
+
const retrieval = parsed.retrieval;
|
|
246
|
+
// `null` is how a user turns the block off without deleting the key, so it
|
|
247
|
+
// reads as absent.
|
|
248
|
+
if (retrieval === null)
|
|
249
|
+
return undefined;
|
|
250
|
+
if (typeof retrieval !== "object" || Array.isArray(retrieval)) {
|
|
251
|
+
return {
|
|
252
|
+
problem: `Invalid retrieval in ${configPath}: expected an object, got ${JSON.stringify(retrieval)}. The local publisher starts without it. Fix: { "retrieval": { "llm": { "provider": "anthropic", "model": "<model>" } } }.`,
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
return { settings: retrieval };
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Return a copy of `config` with `accessToken` set on every `publisher`
|
|
259
|
+
* connection. Called by the supervisor at spawn and on every refresh.
|
|
260
|
+
*
|
|
261
|
+
* A copy rather than a mutation so the token-free config is what stays on disk
|
|
262
|
+
* between runs, and so a caller cannot accidentally serialize the stamped one.
|
|
263
|
+
*/
|
|
264
|
+
function stampAccessToken(config, accessToken) {
|
|
265
|
+
return Object.assign(Object.assign({}, config), { environments: config.environments.map((environment) => (Object.assign(Object.assign({}, environment), { connections: environment.connections.map((connection) => connection.type === "publisher" && connection.publisherConnection
|
|
266
|
+
? Object.assign(Object.assign({}, connection), { publisherConnection: Object.assign(Object.assign({}, connection.publisherConnection), { accessToken }) }) : connection) }))) });
|
|
267
|
+
}
|
|
268
|
+
//# sourceMappingURL=publisherconfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publisherconfig.js","sourceRoot":"","sources":["../../src/setup-core/publisherconfig.ts"],"names":[],"mappings":";;;;;;AAiEA,4DAEC;AASD,oDAEC;AAqFD,4CAQC;AAiCD,oDA+GC;AAsBD,gDAkBC;AASD,4CAqBC;AAjYD,gDAAwB;AAExB,iCAAoC;AACpC,iEAAkE;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;;;;GAOG;AACU,QAAA,yBAAyB,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;AAE7D;;;;;;;GAOG;AACH,MAAM,iBAAiB,GAAG,mCAAmC,CAAC;AAC9D,oFAAoF;AACpF,MAAM,gBAAgB,GAAG,GAAG,GAAG,SAAS,CAAC,MAAM,CAAC;AAEhD;;;;;;;GAOG;AACH,SAAgB,wBAAwB,CAAC,aAAqB;IAC3D,OAAO,QAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;AAC5C,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAAC,mBAA2B;IAC7D,OAAO,QAAQ,CAAC,GAAG,mBAAmB,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC5D,CAAC;AAED,SAAS,QAAQ,CAAC,GAAW,EAAE,QAAgB;IAC5C,MAAM,OAAO,GAAG,GAAG;SACf,OAAO,CAAC,kBAAkB,EAAE,GAAG,CAAC;SAChC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,KAAK,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC;IAC/B,4EAA4E;IAC5E,sEAAsE;IACtE,uEAAuE;IACvE,0CAA0C;IAC1C,MAAM,MAAM,GACT,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAClE,OAAO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CAAC"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The oracle test: does a real Publisher server accept what we generate?
|
|
4
|
+
*
|
|
5
|
+
* Correctness of `publisher.config.json` is defined by the server's config
|
|
6
|
+
* loader, not by our idea of it, and the two have already diverged twice in ways
|
|
7
|
+
* no unit test could see:
|
|
8
|
+
*
|
|
9
|
+
* - the server needs the NESTED `publisherConnection` shape, while the VS Code
|
|
10
|
+
* extension writes a flat one for a different consumer;
|
|
11
|
+
* - the server RESERVES the connection name `duckdb`, which the extension
|
|
12
|
+
* always injects.
|
|
13
|
+
*
|
|
14
|
+
* The second one is why this file exists. A reserved name makes the server skip
|
|
15
|
+
* the whole environment, and it says so only in a log line — it still binds both
|
|
16
|
+
* ports and prints both "listening at" lines. A hand-written schema checker
|
|
17
|
+
* would have passed the broken config, because the shape was valid; only the
|
|
18
|
+
* real loader knew the rule.
|
|
19
|
+
*
|
|
20
|
+
* ## Not part of `npm test`
|
|
21
|
+
*
|
|
22
|
+
* This spawns `npx @malloy-publisher/server`, which downloads a large package
|
|
23
|
+
* and takes tens of seconds. Keeping it out of the unit suite keeps that suite
|
|
24
|
+
* in the two-second range. Run it with `npm run test:oracle` — before changing
|
|
25
|
+
* anything in `publisherconfig.ts`, and when bumping `publisher_version` in
|
|
26
|
+
* `infrastructure/malloy-versions.json`, since that is when the rules can move
|
|
27
|
+
* under us.
|
|
28
|
+
*
|
|
29
|
+
* It is a plain script rather than a mocha spec so it cannot be picked up by
|
|
30
|
+
* `src/**\/*.spec.ts` and silently make the unit suite slow.
|
|
31
|
+
*/
|
|
32
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
33
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
34
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
35
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
36
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
37
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
38
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
42
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
const child_process_1 = require("child_process");
|
|
46
|
+
const fs_1 = __importDefault(require("fs"));
|
|
47
|
+
const os_1 = __importDefault(require("os"));
|
|
48
|
+
const path_1 = __importDefault(require("path"));
|
|
49
|
+
const publisherconfig_1 = require("./publisherconfig");
|
|
50
|
+
const publisherversion_1 = require("./publisherversion");
|
|
51
|
+
const readylines_1 = require("./readylines");
|
|
52
|
+
const BOOT_TIMEOUT_MS = 180000;
|
|
53
|
+
function log(message) {
|
|
54
|
+
process.stdout.write(`${message}\n`);
|
|
55
|
+
}
|
|
56
|
+
function main() {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
const workDir = fs_1.default.mkdtempSync(path_1.default.join(os_1.default.tmpdir(), "publisher-oracle-"));
|
|
59
|
+
const packageDir = path_1.default.join(workDir, "pkg");
|
|
60
|
+
fs_1.default.mkdirSync(packageDir, { recursive: true });
|
|
61
|
+
fs_1.default.writeFileSync(path_1.default.join(packageDir, "publisher.json"), `${JSON.stringify({ name: "pkg" }, null, 2)}\n`);
|
|
62
|
+
// A `publisher`-proxy connection is the shape under test. It is never dialed
|
|
63
|
+
// during boot — the server validates the config, it does not connect — so
|
|
64
|
+
// this needs no network and no credentials.
|
|
65
|
+
const config = (0, publisherconfig_1.buildPublisherConfig)({
|
|
66
|
+
deployment: "production",
|
|
67
|
+
organization: "acme",
|
|
68
|
+
credibleEnvironment: "prod-bars",
|
|
69
|
+
connections: [{ name: "warehouse" }],
|
|
70
|
+
// Absolute, because that is what the real flow passes and what
|
|
71
|
+
// `buildPublisherConfig` requires. A relative location here made this
|
|
72
|
+
// harness throw before it ever spawned a server — so the suite whose
|
|
73
|
+
// entire purpose is to ask the real loader a question was answering it
|
|
74
|
+
// from our own validator instead.
|
|
75
|
+
packageLocation: packageDir,
|
|
76
|
+
packageName: "pkg",
|
|
77
|
+
});
|
|
78
|
+
fs_1.default.writeFileSync(path_1.default.join(workDir, "publisher.config.json"), `${JSON.stringify(config, null, 3)}\n`);
|
|
79
|
+
log(`Generated config in ${workDir}`);
|
|
80
|
+
// Port 0 is fine HERE, unlike in a real session: nothing reads a .mcp.json
|
|
81
|
+
// afterwards, and it guarantees we do not collide with a developer's own
|
|
82
|
+
// running publisher.
|
|
83
|
+
const child = (0, child_process_1.spawn)("npx", [
|
|
84
|
+
"-y",
|
|
85
|
+
`@malloy-publisher/server@${publisherversion_1.PUBLISHER_VERSION}`,
|
|
86
|
+
"--server_root",
|
|
87
|
+
".",
|
|
88
|
+
"--config",
|
|
89
|
+
"./publisher.config.json",
|
|
90
|
+
"--host",
|
|
91
|
+
"127.0.0.1",
|
|
92
|
+
"--port",
|
|
93
|
+
"0",
|
|
94
|
+
"--mcp_port",
|
|
95
|
+
"0",
|
|
96
|
+
"--watch-env",
|
|
97
|
+
"default",
|
|
98
|
+
], {
|
|
99
|
+
cwd: workDir,
|
|
100
|
+
env: Object.assign(Object.assign({}, process.env), { PUBLISHER_ALLOW_PROXY_CONNECTIONS: "true" }),
|
|
101
|
+
});
|
|
102
|
+
const outcome = yield new Promise((resolve) => {
|
|
103
|
+
let buffer = "";
|
|
104
|
+
const timer = setTimeout(() => resolve({
|
|
105
|
+
ok: false,
|
|
106
|
+
detail: `no readiness line within ${BOOT_TIMEOUT_MS}ms`,
|
|
107
|
+
}), BOOT_TIMEOUT_MS);
|
|
108
|
+
const consume = (chunk) => {
|
|
109
|
+
var _a;
|
|
110
|
+
buffer += chunk.toString();
|
|
111
|
+
const lines = buffer.split("\n");
|
|
112
|
+
// Keep the last, possibly-partial line for the next chunk: a
|
|
113
|
+
// readiness line split across chunks must not be read as truncated.
|
|
114
|
+
buffer = (_a = lines.pop()) !== null && _a !== void 0 ? _a : "";
|
|
115
|
+
for (const line of lines) {
|
|
116
|
+
const failure = (0, readylines_1.parseInitFailedLine)(line);
|
|
117
|
+
if (failure) {
|
|
118
|
+
clearTimeout(timer);
|
|
119
|
+
resolve({ ok: false, detail: `init failed: ${failure}` });
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const readiness = (0, readylines_1.parseReadinessLine)(line);
|
|
123
|
+
if (readiness) {
|
|
124
|
+
clearTimeout(timer);
|
|
125
|
+
// Stricter than a session is, deliberately. `cred dev` keeps a
|
|
126
|
+
// server whose model failed to compile, because that is a
|
|
127
|
+
// state a user works in. Here the package holds no models at
|
|
128
|
+
// all, so anything short of serving means the CONFIG was
|
|
129
|
+
// rejected — which is the only thing this asks about.
|
|
130
|
+
const verdict = (0, readylines_1.readinessVerdict)(readiness);
|
|
131
|
+
resolve(verdict.kind === "serving"
|
|
132
|
+
? {
|
|
133
|
+
ok: true,
|
|
134
|
+
detail: `environments=${readiness.environments} packages=${readiness.packages} load_errors=${readiness.loadErrors}`,
|
|
135
|
+
}
|
|
136
|
+
: { ok: false, detail: verdict.reason });
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
child.stdout.on("data", consume);
|
|
142
|
+
child.stderr.on("data", consume);
|
|
143
|
+
child.on("error", (error) => {
|
|
144
|
+
clearTimeout(timer);
|
|
145
|
+
resolve({ ok: false, detail: `could not spawn: ${error.message}` });
|
|
146
|
+
});
|
|
147
|
+
child.on("exit", (code) => {
|
|
148
|
+
clearTimeout(timer);
|
|
149
|
+
resolve({
|
|
150
|
+
ok: false,
|
|
151
|
+
detail: `server exited with code ${code} before reporting readiness`,
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
child.kill("SIGTERM");
|
|
156
|
+
fs_1.default.rmSync(workDir, { recursive: true, force: true });
|
|
157
|
+
if (!outcome.ok) {
|
|
158
|
+
log(`FAIL: the real server rejected our config — ${outcome.detail}`);
|
|
159
|
+
process.exitCode = 1;
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
log(`PASS: real server loaded our config (${outcome.detail})`);
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
void main();
|
|
166
|
+
//# sourceMappingURL=publisherconfig.oracle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publisherconfig.oracle.js","sourceRoot":"","sources":["../../src/setup-core/publisherconfig.oracle.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;;;;;;;;;;;;;;AAEH,iDAAsC;AACtC,4CAAoB;AACpB,4CAAoB;AACpB,gDAAwB;AACxB,uDAAyD;AACzD,yDAAuD;AACvD,6CAIsB;AAEtB,MAAM,eAAe,GAAG,MAAO,CAAC;AAEhC,SAAS,GAAG,CAAC,OAAe;IACzB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;AACxC,CAAC;AAED,SAAe,IAAI;;QAChB,MAAM,OAAO,GAAG,YAAE,CAAC,WAAW,CAAC,cAAI,CAAC,IAAI,CAAC,YAAE,CAAC,MAAM,EAAE,EAAE,mBAAmB,CAAC,CAAC,CAAC;QAC5E,MAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC7C,YAAE,CAAC,SAAS,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9C,YAAE,CAAC,aAAa,CACb,cAAI,CAAC,IAAI,CAAC,UAAU,EAAE,gBAAgB,CAAC,EACvC,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,KAAK,EAA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