bdy 1.23.18-dev → 1.23.19-dev
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/distTs/package.json +1 -1
- package/distTs/src/command/login.js +23 -7
- package/distTs/src/texts.js +24 -24
- package/package.json +1 -1
package/distTs/package.json
CHANGED
|
@@ -15,25 +15,41 @@ const uuid_1 = require("uuid");
|
|
|
15
15
|
const OAUTH_TIMEOUT = 5 * 60 * 1000;
|
|
16
16
|
const OAUTH_CLIENT_APP_PORT = 7596;
|
|
17
17
|
const OAUTH_CLIENT_APP_HOST = 'localhost';
|
|
18
|
+
// Scopes the login token asks for, in the READ/WRITE/MANAGE taxonomy the API
|
|
19
|
+
// uses. `MANAGE` covers the whole family (WRITE, READ and the extras such as
|
|
20
|
+
// PIPELINE_RUN / TARGET_USE), so one entry per resource is enough; scopes from
|
|
21
|
+
// another family are rejected outright, which is why every service the CLI
|
|
22
|
+
// talks to has to be listed. Legacy names (WORKSPACE, EXECUTION_MANAGE,
|
|
23
|
+
// ZONE_MANAGE, USER_KEY, ...) are still translated on the API side, but they
|
|
24
|
+
// map to smaller sets than they read like - `WORKSPACE` alone never grants
|
|
25
|
+
// PROJECT_MANAGE, and nothing legacy grants CRAWL or VISUAL_TEST at all.
|
|
26
|
+
// `bdy api` passes arbitrary requests through the same token, so the list stays
|
|
27
|
+
// as broad as the workspace-level services the CLI exposes.
|
|
18
28
|
const OAUTH_CLIENT_APP_SCOPES = [
|
|
19
|
-
'
|
|
20
|
-
'
|
|
29
|
+
'WORKSPACE_MANAGE',
|
|
30
|
+
'PROJECT_WRITE',
|
|
31
|
+
'MEMBER_MANAGE',
|
|
32
|
+
'MEMBER_EMAIL_READ',
|
|
33
|
+
'GROUP_MANAGE',
|
|
34
|
+
'PERMISSION_MANAGE',
|
|
21
35
|
'REPOSITORY_WRITE',
|
|
22
|
-
'
|
|
36
|
+
'PIPELINE_MANAGE',
|
|
23
37
|
'ENVIRONMENT_MANAGE',
|
|
24
38
|
'TARGET_MANAGE',
|
|
25
|
-
'
|
|
39
|
+
'DOMAIN_MANAGE',
|
|
26
40
|
'WEBHOOK_MANAGE',
|
|
27
41
|
'VARIABLE_MANAGE',
|
|
28
|
-
'USER_EMAIL',
|
|
29
|
-
'USER_KEY',
|
|
30
|
-
'USER_INFO',
|
|
31
42
|
'INTEGRATION_MANAGE',
|
|
32
43
|
'SANDBOX_MANAGE',
|
|
33
44
|
'ARTIFACT_MANAGE',
|
|
34
45
|
'DISTRIBUTION_MANAGE',
|
|
35
46
|
'TUNNEL_MANAGE',
|
|
36
47
|
'UNIT_TEST_MANAGE',
|
|
48
|
+
'VISUAL_TEST_MANAGE',
|
|
49
|
+
'CRAWL_MANAGE',
|
|
50
|
+
'USER_WRITE',
|
|
51
|
+
'USER_EMAIL_READ',
|
|
52
|
+
'USER_SSH_KEY_MANAGE',
|
|
37
53
|
];
|
|
38
54
|
function getRedirectUrl(api) {
|
|
39
55
|
return `https://${api}/oauth2/cli`;
|
package/distTs/src/texts.js
CHANGED
|
@@ -320,23 +320,23 @@ const ERR_COMMAND_NOT_FOUND = (arg) => `Command not found: ${arg}`;
|
|
|
320
320
|
exports.ERR_COMMAND_NOT_FOUND = ERR_COMMAND_NOT_FOUND;
|
|
321
321
|
exports.DESC_COMMAND_PIPELINE = 'Commands to interact with the pipeline service';
|
|
322
322
|
exports.DESC_COMMAND_ARTIFACT = 'Commands to interact with the artifact service';
|
|
323
|
-
exports.DESC_COMMAND_ARTIFACT_VERSION_CREATE = 'Create new artifact version. Required scopes:
|
|
324
|
-
exports.DESC_COMMAND_ARTIFACT_PUBLISH = 'Publish file artifact. Required scopes:
|
|
323
|
+
exports.DESC_COMMAND_ARTIFACT_VERSION_CREATE = 'Create new artifact version. Required scopes: ARTIFACT_WRITE';
|
|
324
|
+
exports.DESC_COMMAND_ARTIFACT_PUBLISH = 'Publish file artifact. Required scopes: ARTIFACT_WRITE';
|
|
325
325
|
exports.DESC_COMMAND_ARTIFACT_DOWNLOAD = 'Download file artifact. Required scopes: ARTIFACT_READ';
|
|
326
326
|
exports.DESC_COMMAND_PIPELINE_RUN = 'Manage pipeline runs';
|
|
327
|
-
exports.DESC_COMMAND_PIPELINE_RUN_START = 'Run pipeline. Required scopes:
|
|
328
|
-
exports.DESC_COMMAND_PIPELINE_RUN_STATUS = 'Pipeline run status. Required scopes:
|
|
329
|
-
exports.DESC_COMMAND_PIPELINE_RUN_LOGS = 'Pipeline run logs. Required scopes:
|
|
330
|
-
exports.DESC_COMMAND_PIPELINE_RUN_CANCEL = 'Pipeline run cancel. Required scopes:
|
|
331
|
-
exports.DESC_COMMAND_PIPELINE_RUN_APPLY = 'Pipeline run approve. Required scopes:
|
|
332
|
-
exports.DESC_COMMAND_PIPELINE_RUN_LIST = 'Pipeline run list. Required scopes:
|
|
333
|
-
exports.DESC_COMMAND_PIPELINE_LIST = 'Pipeline list. Required scopes:
|
|
334
|
-
exports.DESC_COMMAND_PIPELINE_YAML = 'Pipeline yaml. Required scopes:
|
|
335
|
-
exports.DESC_COMMAND_PIPELINE_CREATE = 'Pipeline create. Required scopes:
|
|
336
|
-
exports.DESC_COMMAND_PIPELINE_DELETE = 'Pipeline delete. Required scopes:
|
|
337
|
-
exports.DESC_COMMAND_PIPELINE_UPDATE = 'Pipeline update. Required scopes:
|
|
338
|
-
exports.DESC_COMMAND_PIPELINE_GET = 'Pipeline info. Required scopes:
|
|
339
|
-
exports.DESC_COMMAND_PIPELINE_RUN_RETRY = 'Pipeline run retry. Required scopes:
|
|
327
|
+
exports.DESC_COMMAND_PIPELINE_RUN_START = 'Run pipeline. Required scopes: PIPELINE_RUN';
|
|
328
|
+
exports.DESC_COMMAND_PIPELINE_RUN_STATUS = 'Pipeline run status. Required scopes: PIPELINE_READ';
|
|
329
|
+
exports.DESC_COMMAND_PIPELINE_RUN_LOGS = 'Pipeline run logs. Required scopes: PIPELINE_READ';
|
|
330
|
+
exports.DESC_COMMAND_PIPELINE_RUN_CANCEL = 'Pipeline run cancel. Required scopes: PIPELINE_RUN';
|
|
331
|
+
exports.DESC_COMMAND_PIPELINE_RUN_APPLY = 'Pipeline run approve. Required scopes: PIPELINE_RUN';
|
|
332
|
+
exports.DESC_COMMAND_PIPELINE_RUN_LIST = 'Pipeline run list. Required scopes: PIPELINE_READ';
|
|
333
|
+
exports.DESC_COMMAND_PIPELINE_LIST = 'Pipeline list. Required scopes: PIPELINE_READ';
|
|
334
|
+
exports.DESC_COMMAND_PIPELINE_YAML = 'Pipeline yaml. Required scopes: PIPELINE_READ';
|
|
335
|
+
exports.DESC_COMMAND_PIPELINE_CREATE = 'Pipeline create. Required scopes: PIPELINE_WRITE';
|
|
336
|
+
exports.DESC_COMMAND_PIPELINE_DELETE = 'Pipeline delete. Required scopes: PIPELINE_MANAGE';
|
|
337
|
+
exports.DESC_COMMAND_PIPELINE_UPDATE = 'Pipeline update. Required scopes: PIPELINE_WRITE';
|
|
338
|
+
exports.DESC_COMMAND_PIPELINE_GET = 'Pipeline info. Required scopes: PIPELINE_READ';
|
|
339
|
+
exports.DESC_COMMAND_PIPELINE_RUN_RETRY = 'Pipeline run retry. Required scopes: PIPELINE_RUN';
|
|
340
340
|
exports.DESC_COMMAND_TESTS = 'Manage unit tests and visual regression (Storybook, URL captures, test runners)';
|
|
341
341
|
exports.DESC_COMMAND_UNIT = 'Manage unit testing (JUnit XML report uploads, suite linking)';
|
|
342
342
|
exports.DESC_COMMAND_VISUAL = 'Manage visual regression testing across Storybook, URL captures, and test runners';
|
|
@@ -1146,16 +1146,16 @@ const ERR_API_MESSAGE_REPLACER = (message, path, baseUrl, rateLimitTs) => {
|
|
|
1146
1146
|
exports.ERR_API_MESSAGE_REPLACER = ERR_API_MESSAGE_REPLACER;
|
|
1147
1147
|
// distro & route commands
|
|
1148
1148
|
exports.DESC_COMMAND_DISTRO = 'Manage distributions';
|
|
1149
|
-
exports.DESC_COMMAND_DISTRO_CREATE = 'Create distribution. Required scopes:
|
|
1150
|
-
exports.DESC_COMMAND_ROUTE_CREATE = 'Create route. Required scopes:
|
|
1149
|
+
exports.DESC_COMMAND_DISTRO_CREATE = 'Create distribution. Required scopes: DISTRIBUTION_WRITE';
|
|
1150
|
+
exports.DESC_COMMAND_ROUTE_CREATE = 'Create route. Required scopes: DISTRIBUTION_WRITE';
|
|
1151
1151
|
exports.DESC_COMMAND_DISTRO_DELETE = 'Delete distribution. Required scopes: DISTRIBUTION_MANAGE';
|
|
1152
|
-
exports.DESC_COMMAND_DISTRO_LIST = 'List distributions. Required scopes:
|
|
1153
|
-
exports.DESC_COMMAND_ROUTE_LIST = 'List routes. Required scopes:
|
|
1154
|
-
exports.DESC_COMMAND_DISTRO_GET = 'Get distribution details. Required scopes:
|
|
1155
|
-
exports.DESC_COMMAND_DISTRO_UPDATE = 'Update distribution. Required scopes:
|
|
1156
|
-
exports.DESC_COMMAND_ROUTE_GET = 'Get route details. Required scopes:
|
|
1152
|
+
exports.DESC_COMMAND_DISTRO_LIST = 'List distributions. Required scopes: DISTRIBUTION_READ';
|
|
1153
|
+
exports.DESC_COMMAND_ROUTE_LIST = 'List routes. Required scopes: DISTRIBUTION_READ';
|
|
1154
|
+
exports.DESC_COMMAND_DISTRO_GET = 'Get distribution details. Required scopes: DISTRIBUTION_READ';
|
|
1155
|
+
exports.DESC_COMMAND_DISTRO_UPDATE = 'Update distribution. Required scopes: DISTRIBUTION_WRITE';
|
|
1156
|
+
exports.DESC_COMMAND_ROUTE_GET = 'Get route details. Required scopes: DISTRIBUTION_READ';
|
|
1157
1157
|
exports.DESC_COMMAND_ROUTE_DELETE = 'Delete route. Required scopes: DISTRIBUTION_MANAGE';
|
|
1158
|
-
exports.DESC_COMMAND_ROUTE_UPDATE = 'Update route. Required scopes:
|
|
1158
|
+
exports.DESC_COMMAND_ROUTE_UPDATE = 'Update route. Required scopes: DISTRIBUTION_WRITE';
|
|
1159
1159
|
exports.DESC_COMMAND_ROUTE = 'Manage distribution routes';
|
|
1160
1160
|
exports.OPT_COMMAND_NOTE = 'Resource note';
|
|
1161
1161
|
exports.OPT_COMMAND_AGENT_NOTE = 'Note for AI agents operating on this resource';
|
|
@@ -1244,7 +1244,7 @@ exports.TXT_ARTIFACT_VERSION_DELETE_CONFIRM = TXT_ARTIFACT_VERSION_DELETE_CONFIR
|
|
|
1244
1244
|
exports.TXT_ARTIFACT_DOCKER_LOGIN_SUCCESS = 'Login succeeded';
|
|
1245
1245
|
exports.TXT_ARTIFACT_DOCKER_LOGIN_FAILED = 'Login failed. Check your token and try again later...';
|
|
1246
1246
|
exports.DESC_COMMAND_ARTIFACT_GET = 'Get artifact by identifier. Required scopes: ARTIFACT_READ';
|
|
1247
|
-
exports.DESC_COMMAND_ARTIFACT_COMPOSER_PUBLISH = 'Publish composer version. Required scopes:
|
|
1247
|
+
exports.DESC_COMMAND_ARTIFACT_COMPOSER_PUBLISH = 'Publish composer version. Required scopes: ARTIFACT_WRITE';
|
|
1248
1248
|
exports.DESC_COMMAND_ARTIFACT_CREATE = 'Create a new artifact. Required scopes: ARTIFACT_WRITE';
|
|
1249
1249
|
exports.OPT_COMMAND_ARTIFACT_TYPE = 'Artifact type: "BUCKET" or "CONTAINER"';
|
|
1250
1250
|
exports.OPT_COMMAND_ARTIFACT_NAME = 'Artifact name';
|