bdy 1.23.16-dev-target-commands → 1.23.16-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.
Files changed (42) hide show
  1. package/distTs/README.md +181 -0
  2. package/distTs/package.json +3 -3
  3. package/distTs/src/agent/agent.js +27 -2
  4. package/distTs/src/agent/linux.js +7 -5
  5. package/distTs/src/agent/manager.js +25 -0
  6. package/distTs/src/agent/osx.js +7 -9
  7. package/distTs/src/agent/socket/client.js +10 -0
  8. package/distTs/src/agent/system.js +16 -4
  9. package/distTs/src/agent/windows.js +1 -2
  10. package/distTs/src/api/client.js +5 -2
  11. package/distTs/src/command/agent/install.js +1 -1
  12. package/distTs/src/command/agent/run.js +16 -0
  13. package/distTs/src/command/project/get.js +18 -0
  14. package/distTs/src/command/project/set.js +31 -0
  15. package/distTs/src/command/sandbox/app/list.js +6 -1
  16. package/distTs/src/command/sandbox/create.js +2 -2
  17. package/distTs/src/command/sandbox/get/yaml.js +30 -0
  18. package/distTs/src/command/vt/scrape.js +193 -0
  19. package/distTs/src/input.js +16 -1
  20. package/distTs/src/logger.js +7 -1
  21. package/distTs/src/texts.js +28 -22
  22. package/distTs/src/tunnel/server/sftp.js +24 -5
  23. package/distTs/src/tunnel/ssh/client.js +35 -4
  24. package/distTs/src/types/tunnel.js +11 -0
  25. package/distTs/src/utils.js +2 -2
  26. package/package.json +3 -3
  27. package/distTs/detect-rules.json +0 -351
  28. package/distTs/src/command/pipeline/run/apply.js +0 -62
  29. package/distTs/src/command/yaml/actions/detect.js +0 -268
  30. package/distTs/src/command/yaml/actions/info.js +0 -56
  31. package/distTs/src/command/yaml/actions/list.js +0 -70
  32. package/distTs/src/command/yaml/actions/schema.js +0 -104
  33. package/distTs/src/command/yaml/actions.js +0 -13
  34. package/distTs/src/command/yaml/agents.js +0 -88
  35. package/distTs/src/command/yaml/cache.js +0 -98
  36. package/distTs/src/command/yaml/init.js +0 -110
  37. package/distTs/src/command/yaml/pipeline.js +0 -42
  38. package/distTs/src/command/yaml/render.js +0 -83
  39. package/distTs/src/command/yaml/schemaUtils.js +0 -139
  40. package/distTs/src/command/yaml/validate.js +0 -259
  41. package/distTs/src/command/yaml.js +0 -16
  42. package/distTs/src/diskCache.js +0 -82
@@ -139,10 +139,21 @@ var TUNNEL_AGENT_STATUS;
139
139
  TUNNEL_AGENT_STATUS["INITIALIZING"] = "initializing";
140
140
  TUNNEL_AGENT_STATUS["DISABLED"] = "disabled";
141
141
  })(TUNNEL_AGENT_STATUS || (exports.TUNNEL_AGENT_STATUS = TUNNEL_AGENT_STATUS = {}));
142
+ // Requests the front writes into the agent's `action` field. An agent too old to know a
143
+ // value leaves it alone rather than acking it (see makeAction), so the request would sit
144
+ // there unanswered - which is why the front gates these on the version the agent reports
145
+ // rather than relying on the agent to refuse them.
142
146
  var TUNNEL_AGENT_ACTION;
143
147
  (function (TUNNEL_AGENT_ACTION) {
144
148
  TUNNEL_AGENT_ACTION["DELETE"] = "DELETE";
145
149
  TUNNEL_AGENT_ACTION["UPDATE"] = "UPDATE";
150
+ // Set the agent's log level where it runs. Unlike the two above, these are idempotent:
151
+ // acting on the same value twice is a no-op, so a request that comes back after being
152
+ // acked costs nothing - which is also why there is no status to report. Nothing carries
153
+ // the level anywhere either, so the front sends whichever of the two was asked for
154
+ // rather than toggling a state it knows.
155
+ TUNNEL_AGENT_ACTION["DEBUG_ON"] = "DEBUG_ON";
156
+ TUNNEL_AGENT_ACTION["DEBUG_OFF"] = "DEBUG_OFF";
146
157
  })(TUNNEL_AGENT_ACTION || (exports.TUNNEL_AGENT_ACTION = TUNNEL_AGENT_ACTION = {}));
147
158
  // Written back into the same `action` field, which the backend stores as a plain string
148
159
  // and never interprets. Disjoint from TUNNEL_AGENT_ACTION on purpose: those two values
@@ -132,7 +132,7 @@ exports.AGENT_UPDATE_PROBATION_MS = 30 * 60 * 1000;
132
132
  // 15s; anything past it waits for the one at 60s, so a longer ttl here shows the outcome for
133
133
  // four times as long as it says.
134
134
  exports.AGENT_UPDATE_STATUS_TTL_MS = 10 * 1000;
135
- exports.SUGGESTED_BROWSER_VERSION = '130.0.6723.69';
135
+ exports.SUGGESTED_BROWSER_VERSION = '151.0.7922.77';
136
136
  exports.ARTIFACT_DEFAULT_VERSION = 'latest';
137
137
  exports.DEFAULT_SANDBOX_CP_USER = 'buddy';
138
138
  var REST_API_REGION;
@@ -759,7 +759,7 @@ const getBasicCommandSandboxEndpoint = (name, desc) => {
759
759
  command.option('--header <headers...>', texts_1.OPTION_HEADER);
760
760
  command.option('--response-header <headers...>', texts_1.OPTION_RESPONSE_HEADER);
761
761
  command.option('--useragent <useragent...>', texts_1.OPTION_HEADER_USER_AGENT);
762
- command.option('-s, --serve <directory>', texts_1.OPTION_SERVE);
762
+ command.option('-s, --serve <directory>', texts_1.OPTION_SERVE_SANDBOX);
763
763
  command.option('-a, --auth <user:pass>', texts_1.OPTION_HTTP_AUTH);
764
764
  command.option('-b, --buddy', texts_1.OPTION_HTTP_AUTH_BUDDY);
765
765
  command.option('-l, --log', texts_1.OPTION_HTTP_LOG);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.23.16-dev-target-commands",
4
+ "version": "1.23.16-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "homepage": "https://buddy.works/docs/cli",
@@ -53,7 +53,7 @@
53
53
  "@fastify/cors": "11.2.0",
54
54
  "@inquirer/prompts": "8.5.2",
55
55
  "@modelcontextprotocol/sdk": "1.30.0",
56
- "@puppeteer/browsers": "2.13.0",
56
+ "@puppeteer/browsers": "3.2.0",
57
57
  "@scalar/json-magic": "0.12.16",
58
58
  "@scalar/openapi-parser": "0.28.7",
59
59
  "@scalar/openapi-types": "0.9.1",
@@ -81,7 +81,7 @@
81
81
  "picomatch": "4.0.4",
82
82
  "pino": "10.3.1",
83
83
  "punycode": "2.3.1",
84
- "puppeteer-core": "23.11.1",
84
+ "puppeteer-core": "25.6.0",
85
85
  "range-parser": "1.2.1",
86
86
  "socket.io-client": "4.8.3",
87
87
  "ssh2": "1.17.0",
@@ -1,351 +0,0 @@
1
- {
2
- "BUILD": {
3
- "files": ["package.json", "requirements.txt", "pyproject.toml", "go.mod", "Gemfile", "pom.xml", "build.gradle", "build.gradle.kts", "Cargo.toml", "composer.json", "pubspec.yaml", "Makefile", "CMakeLists.txt"],
4
- "packages": ["eslint", "oxlint", "@oxlint/cli", "@biomejs/biome", "prettier", "stylelint", "xo", "standard", "typescript"]
5
- },
6
- "DOCKERFILE": {
7
- "files": ["Dockerfile", "Containerfile", "compose.yaml", "compose.yml", "docker-compose.yml", "docker-compose.yaml"]
8
- },
9
- "DOCKER_PUSH": {
10
- "files": ["Dockerfile", "Containerfile"]
11
- },
12
- "RUN_DOCKER_CONTAINER": {
13
- "files": ["Dockerfile", "Containerfile", "compose.yaml", "compose.yml", "docker-compose.yml"]
14
- },
15
- "DOCKERFILE_LINTER": {
16
- "files": ["Dockerfile", "Containerfile"]
17
- },
18
- "DOCKER": {
19
- "files": ["Dockerfile", "Containerfile", "compose.yaml", "compose.yml", "docker-compose.yml"]
20
- },
21
- "DOCKER_BUILD_MULTI_ARCH": {
22
- "files": ["Dockerfile", "Containerfile"]
23
- },
24
- "NATIVE_BUILD_DOCKER_CLI": {
25
- "files": ["Dockerfile", "Containerfile"]
26
- },
27
- "PROMOTE_IMAGE": {
28
- "files": ["Dockerfile", "Containerfile"]
29
- },
30
- "KUBERNETES_APPLY": {
31
- "files": ["k8s/", "kubernetes/", "kustomization.yaml", "kustomization.yml", "Kustomization"],
32
- "packages": ["@aws-sdk/client-eks", "@google-cloud/container", "@azure/arm-containerservice"]
33
- },
34
- "KUBERNETES_SET_IMAGE": {
35
- "files": ["k8s/", "kubernetes/"]
36
- },
37
- "KUBERNETES_RUN_POD": {
38
- "files": ["k8s/", "kubernetes/"]
39
- },
40
- "KUBERNETES_RUN_JOB": {
41
- "files": ["k8s/", "kubernetes/"]
42
- },
43
- "KUBERNETES_CLI": {
44
- "files": ["k8s/", "kubernetes/", "kustomization.yaml", "kustomization.yml", "Kustomization"],
45
- "packages": ["@kubernetes/client-node", "@aws-sdk/client-eks", "@google-cloud/container", "@azure/arm-containerservice"]
46
- },
47
- "HELM": {
48
- "files": ["Chart.yaml", "helm/", "charts/"]
49
- },
50
- "WAIT_FOR_APPLY": {
51
- "files": ["k8s/", "kubernetes/"]
52
- },
53
- "AMAZON_S3": {
54
- "packages": ["aws-sdk", "@aws-sdk/client-s3"]
55
- },
56
- "AWS_CLI": {
57
- "files": ["buildspec.yml"],
58
- "packages": ["aws-sdk", "@aws-sdk/*"]
59
- },
60
- "AWS_CLI_2": {
61
- "files": ["buildspec.yml"],
62
- "packages": ["aws-sdk", "@aws-sdk/*"]
63
- },
64
- "AWS_LAMBDA_DEPLOY": {
65
- "files": ["serverless.yml", "serverless.yaml", "samconfig.toml", "sam-template.yaml"],
66
- "packages": ["aws-sdk", "@aws-sdk/client-lambda"]
67
- },
68
- "LAMBDA": {
69
- "files": ["serverless.yml", "samconfig.toml"],
70
- "packages": ["@aws-sdk/client-lambda"]
71
- },
72
- "AWS_ECS": {
73
- "files": ["ecs-task-definition.json", "task-definition.json"],
74
- "packages": ["@aws-sdk/client-ecs"]
75
- },
76
- "CODE_DEPLOY": {
77
- "files": ["appspec.yml", "appspec.yaml"]
78
- },
79
- "ELASTIC_BEANSTALK": {
80
- "files": [".elasticbeanstalk/"]
81
- },
82
- "MONITOR": {
83
- "files": [".elasticbeanstalk/"]
84
- },
85
- "AWS_CLOUD_FORMATION": {
86
- "files": ["cloudformation/"]
87
- },
88
- "CLOUD_FRONT": {
89
- "packages": ["aws-sdk", "@aws-sdk/client-cloudfront"]
90
- },
91
- "CODE_PIPELINE": {
92
- "files": ["buildspec.yml"]
93
- },
94
- "AWS_APP_RUNNER_DEPLOY": {
95
- "packages": ["@aws-sdk/client-apprunner"]
96
- },
97
- "AWS_APP_RUNNER_MONITOR": {
98
- "packages": ["@aws-sdk/client-apprunner"]
99
- },
100
- "AWS_CDK_CLI": {
101
- "files": ["cdk.json"],
102
- "packages": ["aws-cdk-lib", "aws-cdk"]
103
- },
104
- "DOWNLOAD_S3": {
105
- "packages": ["aws-sdk", "@aws-sdk/client-s3"]
106
- },
107
- "GOOGLE_CLOUD_STORAGE": {
108
- "packages": ["@google-cloud/storage"]
109
- },
110
- "GOOGLE_CLOUD_CLI": {
111
- "packages": ["@google-cloud/*"]
112
- },
113
- "GOOGLE_APP_DEPLOY": {
114
- "files": ["app.yaml"]
115
- },
116
- "GOOGLE_FUNCTION_DEPLOY": {
117
- "files": ["firebase.json"],
118
- "packages": ["@google-cloud/functions-framework"]
119
- },
120
- "GOOGLE_FUNCTION_INVOKE": {
121
- "packages": ["@google-cloud/functions-framework"]
122
- },
123
- "GOOGLE_CLOUD_RUN_DEPLOY": {
124
- "files": ["Dockerfile", "Containerfile"]
125
- },
126
- "GOOGLE_CDN_INVALIDATE": {
127
- "packages": ["@google-cloud/compute"]
128
- },
129
- "FIREBASE": {
130
- "files": ["firebase.json", ".firebaserc"],
131
- "packages": ["firebase", "firebase-admin"]
132
- },
133
- "DOWNLOAD_GCS": {
134
- "packages": ["@google-cloud/storage"]
135
- },
136
- "AZURE": {
137
- "files": ["azure-pipelines.yml"]
138
- },
139
- "AZURE_CLI": {
140
- "files": ["azure-pipelines.yml"],
141
- "packages": ["@azure/*"]
142
- },
143
- "AZURE_STORAGE": {
144
- "packages": ["@azure/storage-blob"]
145
- },
146
- "HEROKU": {
147
- "files": ["Procfile"]
148
- },
149
- "HEROKU_CLI": {
150
- "files": ["Procfile"]
151
- },
152
- "NETLIFY": {
153
- "files": ["netlify.toml"]
154
- },
155
- "TERRAFORM": {
156
- "files": ["*.tf", "*.tofu", "terraform/", ".terraform/"]
157
- },
158
- "ANDROID_SIGN": {
159
- "files": ["android/", "app/src/main/AndroidManifest.xml"]
160
- },
161
- "ANDROID_SIGN_BUNDLE": {
162
- "files": ["android/", "app/src/main/AndroidManifest.xml"]
163
- },
164
- "ANDROID_PUBLISH_APK": {
165
- "files": ["android/", "app/src/main/AndroidManifest.xml"]
166
- },
167
- "ANDROID_PUBLISH_APP_BUNDLE": {
168
- "files": ["android/", "app/src/main/AndroidManifest.xml"]
169
- },
170
- "FASTLANE_ANDROID": {
171
- "files": ["fastlane/", "android/"]
172
- },
173
- "NATIVE_BUILD_MAC": {
174
- "files": ["*.xcodeproj", "*.xcworkspace"]
175
- },
176
- "NATIVE_BUILD_MAC_VM": {
177
- "files": ["*.xcodeproj", "*.xcworkspace"]
178
- },
179
- "NATIVE_BUILD_MAC_SIGN": {
180
- "files": ["*.xcodeproj", "*.xcworkspace"]
181
- },
182
- "NATIVE_BUILD_MAC_DEPLOY": {
183
- "files": ["*.xcodeproj", "*.xcworkspace"]
184
- },
185
- "NATIVE_BUILD_MAC_REACT": {
186
- "files": ["ios/"],
187
- "packages": ["react-native"]
188
- },
189
- "NATIVE_BUILD_MAC_CORDOVA": {
190
- "packages": ["cordova"]
191
- },
192
- "NATIVE_BUILD_MAC_FASTLANE": {
193
- "files": ["fastlane/Fastfile"]
194
- },
195
- "NATIVE_BUILD_MAC_FLUTTER": {
196
- "files": ["pubspec.yaml", "ios/"]
197
- },
198
- "PLAYWRIGHT": {
199
- "files": ["playwright.config.*"],
200
- "packages": ["@playwright/test", "playwright"]
201
- },
202
- "CYPRESS": {
203
- "files": ["cypress.config.*", "cypress/"],
204
- "packages": ["cypress"]
205
- },
206
- "STORYBOOK": {
207
- "files": [".storybook/"],
208
- "packages": ["storybook", "@storybook/react"]
209
- },
210
- "LIGHTHOUSE": {
211
- "packages": ["lighthouse"]
212
- },
213
- "JMETER_CLI": {
214
- "files": ["*.jmx"]
215
- },
216
- "SNYK_CLI": {
217
- "files": [".snyk"],
218
- "packages": ["snyk"]
219
- },
220
- "STACK_HAWK_CLI": {
221
- "files": ["stackhawk.yml"]
222
- },
223
- "BLACKFIRE_PHP": {
224
- "packages": ["blackfire/php-sdk"]
225
- },
226
- "BLACKFIRE_PYTHON": {
227
- "packages": ["blackfire"]
228
- },
229
- "BLACKFIRE_GO": {
230
- "packages": ["github.com/blackfireio/go-blackfire"]
231
- },
232
- "SENTRY": {
233
- "packages": ["@sentry/node", "@sentry/browser", "@sentry/react"]
234
- },
235
- "SENTRY_ENTERPRISE": {
236
- "packages": ["@sentry/node", "@sentry/browser"]
237
- },
238
- "NEW_RELIC": {
239
- "packages": ["newrelic"]
240
- },
241
- "NEW_RELIC_CLI": {
242
- "packages": ["newrelic"]
243
- },
244
- "DATADOG": {
245
- "packages": ["dd-trace", "datadog-metrics"]
246
- },
247
- "DATADOG_STATUS_CHECK": {
248
- "packages": ["dd-trace"]
249
- },
250
- "ROLLBAR": {
251
- "packages": ["rollbar"]
252
- },
253
- "HONEYBADGER": {
254
- "packages": ["@honeybadger-io/js"]
255
- },
256
- "BUGSNAG": {
257
- "packages": ["@bugsnag/js", "@bugsnag/node"]
258
- },
259
- "RAYGUN": {
260
- "packages": ["raygun"]
261
- },
262
- "LOGGLY": {
263
- "packages": ["node-loggly-bulk", "winston-loggly-bulk"]
264
- },
265
- "DO_SPACES": {
266
- "packages": ["aws-sdk", "@aws-sdk/client-s3"]
267
- },
268
- "GIT_HUB_RELEASE": {
269
- "files": [".github/workflows/"]
270
- },
271
- "GIT_HUB_CLI": {
272
- "files": [".github/workflows/"]
273
- },
274
- "GIT_LAB_CLI": {
275
- "files": [".gitlab-ci.yml"]
276
- },
277
- "SHOPIFY": {
278
- "files": ["shopify.app.toml"],
279
- "packages": ["@shopify/shopify-api"]
280
- },
281
- "SHOPIFY_CLI": {
282
- "files": ["shopify.app.toml"],
283
- "packages": ["@shopify/cli"]
284
- },
285
- "SHOPIFY_THEMEKIT_CLI": {
286
- "files": ["shopify.app.toml"]
287
- },
288
- "WP_CLI": {
289
- "files": ["wp-config.php", "wp-content/"]
290
- },
291
- "CONTENTFUL_CLI": {
292
- "packages": ["contentful", "contentful-management"]
293
- },
294
- "MYSQL_CLI": {
295
- "packages": ["mysql", "mysql2", "sequelize", "typeorm", "prisma", "drizzle-orm"]
296
- },
297
- "CLOUDFLARE": {
298
- "files": ["wrangler.toml", "wrangler.json", "wrangler.jsonc"],
299
- "packages": ["wrangler"]
300
- },
301
- "NATIVE_BUILD_WINDOWS": {
302
- "files": ["*.sln", "*.slnx", "*.csproj"]
303
- },
304
- "GIT_CRYPT_UNLOCK": {
305
- "files": [".git-crypt/"]
306
- },
307
- "GIT_CRYPT_LOCK": {
308
- "files": [".git-crypt/"]
309
- },
310
- "JIRA_BUILD": {
311
- "files": [".jira/"]
312
- },
313
- "JIRA_DEPLOYMENT": {
314
- "files": [".jira/"]
315
- },
316
- "NPM_PUBLISH": {
317
- "files": ["package.json"]
318
- },
319
- "DOCTL": {
320
- "files": [".do/"],
321
- "packages": ["digitalocean", "do-wrapper"]
322
- },
323
- "DIGITAL_OCEAN_CDN": {
324
- "files": [".do/"],
325
- "packages": ["digitalocean", "do-wrapper"]
326
- },
327
- "SLACK": {
328
- "packages": ["@slack/web-api", "@slack/bolt", "@slack/webhook"]
329
- },
330
- "DISCORD2": {
331
- "packages": ["discord.js", "discord-webhook-node"]
332
- },
333
- "MICROSOFT_TEAMS": {
334
- "packages": ["botbuilder", "@microsoft/teams-js"]
335
- },
336
- "TELEGRAM": {
337
- "packages": ["telegraf", "node-telegram-bot-api", "grammy"]
338
- },
339
- "EMAIL": {
340
- "packages": ["nodemailer", "@sendgrid/mail", "postmark", "mailgun-js"]
341
- },
342
- "POWERSHELL": {
343
- "files": ["*.ps1", "*.psm1"]
344
- },
345
- "GHOST_INSPECTOR_CLI": {
346
- "packages": ["ghost-inspector"]
347
- },
348
- "BACKBLAZE_B2": {
349
- "packages": ["backblaze-b2"]
350
- }
351
- }
@@ -1,62 +0,0 @@
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
- const utils_1 = require("../../../utils");
7
- const texts_1 = require("../../../texts");
8
- const input_1 = __importDefault(require("../../../input"));
9
- const output_1 = __importDefault(require("../../../output"));
10
- const pipeline_1 = require("../../../types/pipeline");
11
- const commandPipelineRunApply = (0, utils_1.newCommand)('apply', texts_1.DESC_COMMAND_PIPELINE_RUN_APPLY);
12
- commandPipelineRunApply.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
13
- commandPipelineRunApply.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
14
- commandPipelineRunApply.option('-n, --no-wait', texts_1.OPTION_PIPELINE_RUN_NO_WAIT);
15
- commandPipelineRunApply.argument('<identifier>', texts_1.OPTION_PIPELINE_RUN_ARGUMENT);
16
- commandPipelineRunApply.argument('<run-id>', texts_1.OPTION_PIPELINE_RUN_ID);
17
- commandPipelineRunApply.argument('<run-action-id>', texts_1.OPTION_PIPELINE_RUN_ACTION_ID);
18
- commandPipelineRunApply.option('-v,--variable <variables...>', texts_1.OPTION_PIPELINE_RUN_VAR);
19
- commandPipelineRunApply.addHelpText('after', texts_1.EXAMPLE_PIPELINE_RUN_APPLY);
20
- commandPipelineRunApply.action(async (identifier, runId, runActionId, options) => {
21
- const workspace = input_1.default.restApiWorkspace(options.workspace);
22
- const project = input_1.default.restApiProject(options.project);
23
- const rid = input_1.default.pipelineRunId(runId);
24
- const variables = input_1.default.pipelineRunVariable(options.variable || [], false);
25
- const client = input_1.default.restApiTokenClient();
26
- const data = await client.getPipelineByIdentifier(workspace, project, identifier);
27
- if (!data || !data.domain) {
28
- output_1.default.exitError(texts_1.ERR_WORKSPACE_NOT_FOUND);
29
- }
30
- if (!data.project_identifier) {
31
- output_1.default.exitError(texts_1.ERR_PROJECT_NOT_FOUND);
32
- }
33
- if (!data.pipeline_id) {
34
- output_1.default.exitError(texts_1.ERR_PIPELINE_NOT_FOUND);
35
- }
36
- const a = await client.getPipelineRunActionExecution(workspace, project, data.pipeline_id, rid, runActionId);
37
- let type;
38
- if (a.status === pipeline_1.PIPELINE_RUN_STATUS.WAITING_FOR_APPLY) {
39
- type = 'APPLY';
40
- }
41
- else if (a.status === pipeline_1.PIPELINE_RUN_STATUS.WAITING_FOR_VT_SESSION) {
42
- type = 'APPROVE_VT';
43
- }
44
- else if (a.status === pipeline_1.PIPELINE_RUN_STATUS.WAITING_FOR_VARIABLES) {
45
- type = 'APPLY_VARIABLES';
46
- }
47
- else if (a.status === pipeline_1.PIPELINE_RUN_STATUS.WAITING_FOR_SETTABLE_VARIABLES) {
48
- type = 'SET_VARIABLES';
49
- }
50
- else {
51
- output_1.default.exitError(texts_1.ERR_CANT_APPLY_ACTION_EXECUTION);
52
- }
53
- const body = {
54
- operation: type,
55
- approve_action_id: runActionId,
56
- variables,
57
- };
58
- await client.pipelineRunApply(workspace, project, data.pipeline_id, rid, body);
59
- const OutputPipeline = require('../../../output/pipeline').default;
60
- await OutputPipeline.runStatus(client, workspace, project, data.pipeline_id, rid, !options.wait);
61
- });
62
- exports.default = commandPipelineRunApply;