@salesforce/plugin-devops-center 1.4.1 → 2.0.1

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 (51) hide show
  1. package/README.md +150 -31
  2. package/lib/commands/devops/pipeline/stage/update.d.ts +19 -0
  3. package/lib/commands/devops/pipeline/stage/update.js +66 -0
  4. package/lib/commands/devops/pipeline/stage/update.js.map +1 -0
  5. package/lib/commands/devops/promote.d.ts +5 -0
  6. package/lib/commands/devops/promote.js +49 -3
  7. package/lib/commands/devops/promote.js.map +1 -1
  8. package/lib/commands/devops/promotion/complete.d.ts +1 -1
  9. package/lib/commands/devops/promotion/complete.js +1 -1
  10. package/lib/commands/devops/promotion/complete.js.map +1 -1
  11. package/lib/commands/devops/promotion/validate.d.ts +21 -0
  12. package/lib/commands/devops/promotion/validate.js +137 -0
  13. package/lib/commands/devops/promotion/validate.js.map +1 -0
  14. package/lib/commands/devops/stage/branch/delete.d.ts +15 -0
  15. package/lib/commands/devops/stage/branch/delete.js +107 -0
  16. package/lib/commands/devops/stage/branch/delete.js.map +1 -0
  17. package/lib/commands/devops/work-item/prepare.js +0 -3
  18. package/lib/commands/devops/work-item/prepare.js.map +1 -1
  19. package/lib/utils/addPipelineStage.js +1 -0
  20. package/lib/utils/addPipelineStage.js.map +1 -1
  21. package/lib/utils/createPipeline.js +24 -12
  22. package/lib/utils/createPipeline.js.map +1 -1
  23. package/lib/utils/deleteStageBranch.d.ts +22 -0
  24. package/lib/utils/deleteStageBranch.js +44 -0
  25. package/lib/utils/deleteStageBranch.js.map +1 -0
  26. package/lib/utils/pipelineUtils.d.ts +9 -0
  27. package/lib/utils/pipelineUtils.js +32 -0
  28. package/lib/utils/pipelineUtils.js.map +1 -1
  29. package/lib/utils/prepareWorkItem.d.ts +1 -1
  30. package/lib/utils/prepareWorkItem.js +4 -5
  31. package/lib/utils/prepareWorkItem.js.map +1 -1
  32. package/lib/utils/{deployStage.d.ts → promotionUtils.d.ts} +24 -0
  33. package/lib/utils/{deployStage.js → promotionUtils.js} +65 -1
  34. package/lib/utils/promotionUtils.js.map +1 -0
  35. package/lib/utils/soqlUtils.d.ts +5 -0
  36. package/lib/utils/soqlUtils.js +7 -0
  37. package/lib/utils/soqlUtils.js.map +1 -1
  38. package/messages/devops.pipeline.stage.update.md +25 -0
  39. package/messages/devops.promote.md +16 -0
  40. package/messages/devops.promotion.complete.md +3 -3
  41. package/messages/devops.promotion.validate.md +64 -0
  42. package/messages/devops.stage.branch.delete.md +37 -0
  43. package/npm-shrinkwrap.json +263 -108
  44. package/oclif.lock +80 -23
  45. package/oclif.manifest.json +398 -160
  46. package/package.json +7 -7
  47. package/schemas/devops-pipeline-stage-update.json +22 -0
  48. package/schemas/devops-promote.json +38 -0
  49. package/schemas/devops-promotion-validate.json +66 -0
  50. package/schemas/devops-stage-branch-delete.json +47 -0
  51. package/lib/utils/deployStage.js.map +0 -1
@@ -107,6 +107,12 @@
107
107
  "hasDynamicHelp": false,
108
108
  "multiple": true,
109
109
  "type": "option"
110
+ },
111
+ "skip-validation": {
112
+ "name": "skip-validation",
113
+ "summary": "Skip pre-promote validation. By default, promotion is validated before proceeding to prevent promoting work items without an associated PR. Use this flag to bypass validation.",
114
+ "allowNo": false,
115
+ "type": "boolean"
110
116
  }
111
117
  },
112
118
  "hasDynamicHelp": true,
@@ -126,13 +132,15 @@
126
132
  "promote.js"
127
133
  ]
128
134
  },
129
- "devops:project:create": {
135
+ "devops:pipeline:create": {
130
136
  "aliases": [],
131
137
  "args": {},
132
- "description": "Creates a new DevOps Center project with the specified name and optional description.",
138
+ "description": "Provide the URL of an existing repository, or use `--create-repo` with a repository name to create one. After you create the pipeline, add stages, and activate the pipeline.",
133
139
  "examples": [
134
- "Create a new DevOps Center project in the specified org.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"MyApp Release\"",
135
- "Create a project with a name and description.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Platform Update\" --description \"Platform services update\""
140
+ "Create a pipeline and associate it with an existing GitHub repository.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo https://github.com/myorg/myrepo",
141
+ "Create a pipeline and associate it with a new GitHub repository.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo my-new-repo --repo-type github --repo-owner myorg --create-repo",
142
+ "Create a pipeline and create a new Bitbucket repository.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo my-new-repo --repo-type bitbucket --bitbucket-workspace myworkspace --bitbucket-project-key PROJ --create-repo",
143
+ "Create a pipeline with a description and associate it with an existing Bitbucket repository.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo https://bitbucket.org/myworkspace/myrepo --description \"Main CI/CD pipeline for production releases\""
136
144
  ],
137
145
  "flags": {
138
146
  "json": {
@@ -171,7 +179,54 @@
171
179
  "char": "n",
172
180
  "name": "name",
173
181
  "required": true,
174
- "summary": "Name of the new DevOps Center project.",
182
+ "summary": "Name of the pipeline.",
183
+ "hasDynamicHelp": false,
184
+ "multiple": false,
185
+ "type": "option"
186
+ },
187
+ "repo": {
188
+ "char": "r",
189
+ "name": "repo",
190
+ "required": true,
191
+ "summary": "URL of an existing repository or the name of a repository to create.",
192
+ "hasDynamicHelp": false,
193
+ "multiple": false,
194
+ "type": "option"
195
+ },
196
+ "repo-type": {
197
+ "name": "repo-type",
198
+ "summary": "Type of the source code repository. Required when creating a repository using '--create-repo'.",
199
+ "hasDynamicHelp": false,
200
+ "multiple": false,
201
+ "options": [
202
+ "github",
203
+ "bitbucket"
204
+ ],
205
+ "type": "option"
206
+ },
207
+ "create-repo": {
208
+ "name": "create-repo",
209
+ "summary": "Create a repository if it doesn't exist.",
210
+ "allowNo": false,
211
+ "type": "boolean"
212
+ },
213
+ "repo-owner": {
214
+ "name": "repo-owner",
215
+ "summary": "Owner (organization or user) of the GitHub repository. Required when creating a GitHub repository using '--create-repo'.",
216
+ "hasDynamicHelp": false,
217
+ "multiple": false,
218
+ "type": "option"
219
+ },
220
+ "bitbucket-workspace": {
221
+ "name": "bitbucket-workspace",
222
+ "summary": "Bitbucket workspace that will own the repository. Required when creating a Bitbucket repository using '--create-repo'.",
223
+ "hasDynamicHelp": false,
224
+ "multiple": false,
225
+ "type": "option"
226
+ },
227
+ "bitbucket-project-key": {
228
+ "name": "bitbucket-project-key",
229
+ "summary": "Bitbucket project key to associate with the repository. Optional when creating a Bitbucket repository using '--create-repo'.",
175
230
  "hasDynamicHelp": false,
176
231
  "multiple": false,
177
232
  "type": "option"
@@ -179,7 +234,7 @@
179
234
  "description": {
180
235
  "char": "d",
181
236
  "name": "description",
182
- "summary": "Description of the new project; if not specified, the description is blank.",
237
+ "summary": "Description of the pipeline.",
183
238
  "hasDynamicHelp": false,
184
239
  "multiple": false,
185
240
  "type": "option"
@@ -187,29 +242,28 @@
187
242
  },
188
243
  "hasDynamicHelp": true,
189
244
  "hiddenAliases": [],
190
- "id": "devops:project:create",
245
+ "id": "devops:pipeline:create",
191
246
  "pluginAlias": "@salesforce/plugin-devops-center",
192
247
  "pluginName": "@salesforce/plugin-devops-center",
193
248
  "pluginType": "core",
194
249
  "strict": true,
195
- "summary": "Create a DevOps Center project in a DevOps Center org.",
250
+ "summary": "Create a DevOps Center pipeline.",
196
251
  "enableJsonFlag": true,
197
252
  "isESM": true,
198
253
  "relativePath": [
199
254
  "lib",
200
255
  "commands",
201
256
  "devops",
202
- "project",
257
+ "pipeline",
203
258
  "create.js"
204
259
  ]
205
260
  },
206
- "devops:project:list": {
261
+ "devops:pipeline:get": {
207
262
  "aliases": [],
208
263
  "args": {},
209
- "description": "This command queries the DevopsProject standard object and returns the project Id, Name, and Description for each project found.",
264
+ "description": "Returns full details for a single DevOps Center pipeline: its stages in order, the source code repository and branch associated with each stage, and any connected projects.",
210
265
  "examples": [
211
- "List all DevOps Center projects in an org with alias \"my-devops-org\":\n<%= config.bin %> <%= command.id %> --target-org my-devops-org",
212
- "List projects using an org's username:\n<%= config.bin %> <%= command.id %> --target-org devops-center@example.com"
266
+ "Get details for a specific pipeline:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0Do000000000001"
213
267
  ],
214
268
  "flags": {
215
269
  "json": {
@@ -243,35 +297,41 @@
243
297
  "hasDynamicHelp": false,
244
298
  "multiple": false,
245
299
  "type": "option"
300
+ },
301
+ "pipeline-id": {
302
+ "char": "i",
303
+ "name": "pipeline-id",
304
+ "required": true,
305
+ "summary": "ID of the DevOps Center pipeline.",
306
+ "hasDynamicHelp": false,
307
+ "multiple": false,
308
+ "type": "option"
246
309
  }
247
310
  },
248
311
  "hasDynamicHelp": true,
249
312
  "hiddenAliases": [],
250
- "id": "devops:project:list",
313
+ "id": "devops:pipeline:get",
251
314
  "pluginAlias": "@salesforce/plugin-devops-center",
252
315
  "pluginName": "@salesforce/plugin-devops-center",
253
316
  "pluginType": "core",
254
317
  "strict": true,
255
- "summary": "List all DevOps Center projects in a Salesforce org.",
318
+ "summary": "Get details of a DevOps Center pipeline including its stages, repositories, and connected projects.",
256
319
  "enableJsonFlag": true,
257
320
  "isESM": true,
258
321
  "relativePath": [
259
322
  "lib",
260
323
  "commands",
261
324
  "devops",
262
- "project",
263
- "list.js"
325
+ "pipeline",
326
+ "get.js"
264
327
  ]
265
328
  },
266
- "devops:project:update": {
329
+ "devops:pipeline:list": {
267
330
  "aliases": [],
268
331
  "args": {},
269
- "description": "Update the name, description, or active status of a DevOps Center project. At least one of --name, --description, or --is-active must be provided.",
332
+ "description": "Returns all DevOps Center pipelines in the org, including each pipeline's stages (in order), source code repository information per stage, and any connected projects.",
270
333
  "examples": [
271
- "Rename a project:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001 --name \"MyApp Release v2\"",
272
- "Update the description of a project:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001 --description \"Updated release description\"",
273
- "Deactivate a project:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001 --no-is-active",
274
- "Update all fields at once:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001 --name \"Archived App\" --description \"Archived\" --no-is-active"
334
+ "List all pipelines in the org:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org"
275
335
  ],
276
336
  "flags": {
277
337
  "json": {
@@ -305,66 +365,33 @@
305
365
  "hasDynamicHelp": false,
306
366
  "multiple": false,
307
367
  "type": "option"
308
- },
309
- "project-id": {
310
- "char": "i",
311
- "name": "project-id",
312
- "required": true,
313
- "summary": "ID of the DevOps Center project to update.",
314
- "hasDynamicHelp": false,
315
- "multiple": false,
316
- "type": "option"
317
- },
318
- "name": {
319
- "char": "n",
320
- "name": "name",
321
- "summary": "New name for the project.",
322
- "hasDynamicHelp": false,
323
- "multiple": false,
324
- "type": "option"
325
- },
326
- "description": {
327
- "char": "d",
328
- "name": "description",
329
- "summary": "New description for the project.",
330
- "hasDynamicHelp": false,
331
- "multiple": false,
332
- "type": "option"
333
- },
334
- "is-active": {
335
- "name": "is-active",
336
- "summary": "Set the project active status. Use --is-active to activate or --no-is-active to deactivate.",
337
- "allowNo": true,
338
- "type": "boolean"
339
368
  }
340
369
  },
341
370
  "hasDynamicHelp": true,
342
371
  "hiddenAliases": [],
343
- "id": "devops:project:update",
372
+ "id": "devops:pipeline:list",
344
373
  "pluginAlias": "@salesforce/plugin-devops-center",
345
374
  "pluginName": "@salesforce/plugin-devops-center",
346
375
  "pluginType": "core",
347
376
  "strict": true,
348
- "summary": "Update a DevOps Center project.",
377
+ "summary": "List DevOps Center pipelines with their stages, repositories, and connected projects.",
349
378
  "enableJsonFlag": true,
350
379
  "isESM": true,
351
380
  "relativePath": [
352
381
  "lib",
353
382
  "commands",
354
383
  "devops",
355
- "project",
356
- "update.js"
384
+ "pipeline",
385
+ "list.js"
357
386
  ]
358
387
  },
359
- "devops:pipeline:create": {
388
+ "devops:pipeline:update": {
360
389
  "aliases": [],
361
390
  "args": {},
362
- "description": "Provide the URL of an existing repository, or use `--create-repo` with a repository name to create one. After you create the pipeline, add stages, and activate the pipeline.",
391
+ "description": "Activate, deactivate, or rename a DevOps Center pipeline. Use --active to activate, --no-active to deactivate, and --name to rename. You can combine --no-active and --name in one command.\n\nA pipeline must have at least one stage before you can activate it. You can't modify the pipeline stages after you activate and promote changes through it.",
363
392
  "examples": [
364
- "Create a pipeline and associate it with an existing GitHub repository.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo https://github.com/myorg/myrepo",
365
- "Create a pipeline and associate it with a new GitHub repository.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo my-new-repo --repo-type github --repo-owner myorg --create-repo",
366
- "Create a pipeline and create a new Bitbucket repository.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo my-new-repo --repo-type bitbucket --bitbucket-workspace myworkspace --bitbucket-project-key PROJ --create-repo",
367
- "Create a pipeline with a description and associate it with an existing Bitbucket repository.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo https://bitbucket.org/myworkspace/myrepo --description \"Main CI/CD pipeline for production releases\""
393
+ "Activate a pipeline:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --active",
394
+ "Deactivate and rename in one step.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --no-active --name \"My Pipeline\""
368
395
  ],
369
396
  "flags": {
370
397
  "json": {
@@ -399,66 +426,26 @@
399
426
  "multiple": false,
400
427
  "type": "option"
401
428
  },
402
- "name": {
403
- "char": "n",
404
- "name": "name",
405
- "required": true,
406
- "summary": "Name of the pipeline.",
407
- "hasDynamicHelp": false,
408
- "multiple": false,
409
- "type": "option"
410
- },
411
- "repo": {
412
- "char": "r",
413
- "name": "repo",
429
+ "pipeline-id": {
430
+ "name": "pipeline-id",
414
431
  "required": true,
415
- "summary": "URL of an existing repository or the name of a repository to create.",
416
- "hasDynamicHelp": false,
417
- "multiple": false,
418
- "type": "option"
419
- },
420
- "repo-type": {
421
- "name": "repo-type",
422
- "summary": "Type of the source code repository. Required when creating a repository using '--create-repo'.",
432
+ "summary": "ID of the pipeline.",
423
433
  "hasDynamicHelp": false,
424
434
  "multiple": false,
425
- "options": [
426
- "github",
427
- "bitbucket"
428
- ],
429
435
  "type": "option"
430
436
  },
431
- "create-repo": {
432
- "name": "create-repo",
433
- "summary": "Create a repository if it doesn't exist.",
434
- "allowNo": false,
437
+ "active": {
438
+ "name": "active",
439
+ "required": false,
440
+ "summary": "Activate the pipeline. Use --no-active to deactivate.",
441
+ "allowNo": true,
435
442
  "type": "boolean"
436
443
  },
437
- "repo-owner": {
438
- "name": "repo-owner",
439
- "summary": "Owner (organization or user) of the GitHub repository. Required when creating a GitHub repository using '--create-repo'.",
440
- "hasDynamicHelp": false,
441
- "multiple": false,
442
- "type": "option"
443
- },
444
- "bitbucket-workspace": {
445
- "name": "bitbucket-workspace",
446
- "summary": "Bitbucket workspace that will own the repository. Required when creating a Bitbucket repository using '--create-repo'.",
447
- "hasDynamicHelp": false,
448
- "multiple": false,
449
- "type": "option"
450
- },
451
- "bitbucket-project-key": {
452
- "name": "bitbucket-project-key",
453
- "summary": "Bitbucket project key to associate with the repository. Optional when creating a Bitbucket repository using '--create-repo'.",
454
- "hasDynamicHelp": false,
455
- "multiple": false,
456
- "type": "option"
457
- },
458
- "description": {
459
- "char": "d",
460
- "name": "description",
461
- "summary": "Description of the pipeline.",
444
+ "name": {
445
+ "char": "n",
446
+ "name": "name",
447
+ "required": false,
448
+ "summary": "New name for the pipeline.",
462
449
  "hasDynamicHelp": false,
463
450
  "multiple": false,
464
451
  "type": "option"
@@ -466,12 +453,12 @@
466
453
  },
467
454
  "hasDynamicHelp": true,
468
455
  "hiddenAliases": [],
469
- "id": "devops:pipeline:create",
456
+ "id": "devops:pipeline:update",
470
457
  "pluginAlias": "@salesforce/plugin-devops-center",
471
458
  "pluginName": "@salesforce/plugin-devops-center",
472
459
  "pluginType": "core",
473
460
  "strict": true,
474
- "summary": "Create a DevOps Center pipeline.",
461
+ "summary": "Update a DevOps Center pipeline.",
475
462
  "enableJsonFlag": true,
476
463
  "isESM": true,
477
464
  "relativePath": [
@@ -479,15 +466,16 @@
479
466
  "commands",
480
467
  "devops",
481
468
  "pipeline",
482
- "create.js"
469
+ "update.js"
483
470
  ]
484
471
  },
485
- "devops:pipeline:get": {
472
+ "devops:project:create": {
486
473
  "aliases": [],
487
474
  "args": {},
488
- "description": "Returns full details for a single DevOps Center pipeline: its stages in order, the source code repository and branch associated with each stage, and any connected projects.",
475
+ "description": "Creates a new DevOps Center project with the specified name and optional description.",
489
476
  "examples": [
490
- "Get details for a specific pipeline:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0Do000000000001"
477
+ "Create a new DevOps Center project in the specified org.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"MyApp Release\"",
478
+ "Create a project with a name and description.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Platform Update\" --description \"Platform services update\""
491
479
  ],
492
480
  "flags": {
493
481
  "json": {
@@ -522,11 +510,19 @@
522
510
  "multiple": false,
523
511
  "type": "option"
524
512
  },
525
- "pipeline-id": {
526
- "char": "i",
527
- "name": "pipeline-id",
513
+ "name": {
514
+ "char": "n",
515
+ "name": "name",
528
516
  "required": true,
529
- "summary": "ID of the DevOps Center pipeline.",
517
+ "summary": "Name of the new DevOps Center project.",
518
+ "hasDynamicHelp": false,
519
+ "multiple": false,
520
+ "type": "option"
521
+ },
522
+ "description": {
523
+ "char": "d",
524
+ "name": "description",
525
+ "summary": "Description of the new project; if not specified, the description is blank.",
530
526
  "hasDynamicHelp": false,
531
527
  "multiple": false,
532
528
  "type": "option"
@@ -534,28 +530,29 @@
534
530
  },
535
531
  "hasDynamicHelp": true,
536
532
  "hiddenAliases": [],
537
- "id": "devops:pipeline:get",
533
+ "id": "devops:project:create",
538
534
  "pluginAlias": "@salesforce/plugin-devops-center",
539
535
  "pluginName": "@salesforce/plugin-devops-center",
540
536
  "pluginType": "core",
541
537
  "strict": true,
542
- "summary": "Get details of a DevOps Center pipeline including its stages, repositories, and connected projects.",
538
+ "summary": "Create a DevOps Center project in a DevOps Center org.",
543
539
  "enableJsonFlag": true,
544
540
  "isESM": true,
545
541
  "relativePath": [
546
542
  "lib",
547
543
  "commands",
548
544
  "devops",
549
- "pipeline",
550
- "get.js"
545
+ "project",
546
+ "create.js"
551
547
  ]
552
548
  },
553
- "devops:pipeline:list": {
549
+ "devops:project:list": {
554
550
  "aliases": [],
555
551
  "args": {},
556
- "description": "Returns all DevOps Center pipelines in the org, including each pipeline's stages (in order), source code repository information per stage, and any connected projects.",
552
+ "description": "This command queries the DevopsProject standard object and returns the project Id, Name, and Description for each project found.",
557
553
  "examples": [
558
- "List all pipelines in the org:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org"
554
+ "List all DevOps Center projects in an org with alias \"my-devops-org\":\n<%= config.bin %> <%= command.id %> --target-org my-devops-org",
555
+ "List projects using an org's username:\n<%= config.bin %> <%= command.id %> --target-org devops-center@example.com"
559
556
  ],
560
557
  "flags": {
561
558
  "json": {
@@ -593,29 +590,31 @@
593
590
  },
594
591
  "hasDynamicHelp": true,
595
592
  "hiddenAliases": [],
596
- "id": "devops:pipeline:list",
593
+ "id": "devops:project:list",
597
594
  "pluginAlias": "@salesforce/plugin-devops-center",
598
595
  "pluginName": "@salesforce/plugin-devops-center",
599
596
  "pluginType": "core",
600
597
  "strict": true,
601
- "summary": "List DevOps Center pipelines with their stages, repositories, and connected projects.",
598
+ "summary": "List all DevOps Center projects in a Salesforce org.",
602
599
  "enableJsonFlag": true,
603
600
  "isESM": true,
604
601
  "relativePath": [
605
602
  "lib",
606
603
  "commands",
607
604
  "devops",
608
- "pipeline",
605
+ "project",
609
606
  "list.js"
610
607
  ]
611
608
  },
612
- "devops:pipeline:update": {
609
+ "devops:project:update": {
613
610
  "aliases": [],
614
611
  "args": {},
615
- "description": "Activate, deactivate, or rename a DevOps Center pipeline. Use --active to activate, --no-active to deactivate, and --name to rename. You can combine --no-active and --name in one command.\n\nA pipeline must have at least one stage before you can activate it. You can't modify the pipeline stages after you activate and promote changes through it.",
612
+ "description": "Update the name, description, or active status of a DevOps Center project. At least one of --name, --description, or --is-active must be provided.",
616
613
  "examples": [
617
- "Activate a pipeline:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --active",
618
- "Deactivate and rename in one step.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --no-active --name \"My Pipeline\""
614
+ "Rename a project:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001 --name \"MyApp Release v2\"",
615
+ "Update the description of a project:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001 --description \"Updated release description\"",
616
+ "Deactivate a project:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001 --no-is-active",
617
+ "Update all fields at once:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001 --name \"Archived App\" --description \"Archived\" --no-is-active"
619
618
  ],
620
619
  "flags": {
621
620
  "json": {
@@ -650,46 +649,53 @@
650
649
  "multiple": false,
651
650
  "type": "option"
652
651
  },
653
- "pipeline-id": {
654
- "name": "pipeline-id",
652
+ "project-id": {
653
+ "char": "i",
654
+ "name": "project-id",
655
655
  "required": true,
656
- "summary": "ID of the pipeline.",
656
+ "summary": "ID of the DevOps Center project to update.",
657
657
  "hasDynamicHelp": false,
658
658
  "multiple": false,
659
659
  "type": "option"
660
660
  },
661
- "active": {
662
- "name": "active",
663
- "required": false,
664
- "summary": "Activate the pipeline. Use --no-active to deactivate.",
665
- "allowNo": true,
666
- "type": "boolean"
667
- },
668
661
  "name": {
669
662
  "char": "n",
670
663
  "name": "name",
671
- "required": false,
672
- "summary": "New name for the pipeline.",
664
+ "summary": "New name for the project.",
665
+ "hasDynamicHelp": false,
666
+ "multiple": false,
667
+ "type": "option"
668
+ },
669
+ "description": {
670
+ "char": "d",
671
+ "name": "description",
672
+ "summary": "New description for the project.",
673
673
  "hasDynamicHelp": false,
674
674
  "multiple": false,
675
675
  "type": "option"
676
+ },
677
+ "is-active": {
678
+ "name": "is-active",
679
+ "summary": "Set the project active status. Use --is-active to activate or --no-is-active to deactivate.",
680
+ "allowNo": true,
681
+ "type": "boolean"
676
682
  }
677
683
  },
678
684
  "hasDynamicHelp": true,
679
685
  "hiddenAliases": [],
680
- "id": "devops:pipeline:update",
686
+ "id": "devops:project:update",
681
687
  "pluginAlias": "@salesforce/plugin-devops-center",
682
688
  "pluginName": "@salesforce/plugin-devops-center",
683
689
  "pluginType": "core",
684
690
  "strict": true,
685
- "summary": "Update a DevOps Center pipeline.",
691
+ "summary": "Update a DevOps Center project.",
686
692
  "enableJsonFlag": true,
687
693
  "isESM": true,
688
694
  "relativePath": [
689
695
  "lib",
690
696
  "commands",
691
697
  "devops",
692
- "pipeline",
698
+ "project",
693
699
  "update.js"
694
700
  ]
695
701
  },
@@ -698,9 +704,9 @@
698
704
  "args": {},
699
705
  "description": "Deploys work items that were merged into the pipeline branch outside of DevOps Center (externally merged) into the target stage org and updates DevOps Center records. Equivalent to the \"Complete Promotion\" action in the DevOps Center UI when a stage is out of sync.\n\nIf no undeployed work items are found for the stage, the command exits successfully with no action taken.",
700
706
  "examples": [
701
- "Complete a promotion for an out-of-sync pipeline stage.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001",
702
- "Complete a promotion for a specific work item (e.g. first stage of a pipeline).\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001 --work-item-id 1fk000000000001",
703
- "Complete a promotion with full deploy and a specific test level.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001 --deploy-all --test-level RunLocalTests"
707
+ "Complete a promotion for an out-of-sync pipeline stage:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001",
708
+ "Complete a promotion for a specific work item (e.g. first stage of a pipeline):\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001 --work-item-id 1fk000000000001",
709
+ "Complete a promotion with full deploy and a specific test level:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001 --deploy-all --test-level RunLocalTests"
704
710
  ],
705
711
  "flags": {
706
712
  "json": {
@@ -803,6 +809,84 @@
803
809
  "complete.js"
804
810
  ]
805
811
  },
812
+ "devops:promotion:validate": {
813
+ "aliases": [],
814
+ "args": {},
815
+ "description": "Validates whether the specified work items can be promoted to the target pipeline stage. Checks for VCS and object permission errors before a promotion is attempted.",
816
+ "examples": [
817
+ "Validate promotion of a work item to a target stage:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001 --work-item-id 1fk000000000001",
818
+ "Validate promotion of multiple work items:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001 --work-item-id 1fk000000000001 --work-item-id 1fk000000000002"
819
+ ],
820
+ "flags": {
821
+ "json": {
822
+ "description": "Format output as json.",
823
+ "helpGroup": "GLOBAL",
824
+ "name": "json",
825
+ "allowNo": false,
826
+ "type": "boolean"
827
+ },
828
+ "flags-dir": {
829
+ "helpGroup": "GLOBAL",
830
+ "name": "flags-dir",
831
+ "summary": "Import flag values from a directory.",
832
+ "hasDynamicHelp": false,
833
+ "multiple": false,
834
+ "type": "option"
835
+ },
836
+ "target-org": {
837
+ "char": "o",
838
+ "name": "target-org",
839
+ "noCacheDefault": true,
840
+ "required": true,
841
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
842
+ "hasDynamicHelp": true,
843
+ "multiple": false,
844
+ "type": "option"
845
+ },
846
+ "api-version": {
847
+ "description": "Override the api version used for api requests made by this command",
848
+ "name": "api-version",
849
+ "hasDynamicHelp": false,
850
+ "multiple": false,
851
+ "type": "option"
852
+ },
853
+ "target-stage-id": {
854
+ "char": "t",
855
+ "name": "target-stage-id",
856
+ "required": true,
857
+ "summary": "ID of the target pipeline stage to validate promotion to.",
858
+ "hasDynamicHelp": false,
859
+ "multiple": false,
860
+ "type": "option"
861
+ },
862
+ "work-item-id": {
863
+ "char": "i",
864
+ "name": "work-item-id",
865
+ "required": true,
866
+ "summary": "ID of a work item to validate for promotion. Specify multiple times for multiple work items.",
867
+ "hasDynamicHelp": false,
868
+ "multiple": true,
869
+ "type": "option"
870
+ }
871
+ },
872
+ "hasDynamicHelp": true,
873
+ "hiddenAliases": [],
874
+ "id": "devops:promotion:validate",
875
+ "pluginAlias": "@salesforce/plugin-devops-center",
876
+ "pluginName": "@salesforce/plugin-devops-center",
877
+ "pluginType": "core",
878
+ "strict": true,
879
+ "summary": "Validate work item promotion for a pipeline stage.",
880
+ "enableJsonFlag": true,
881
+ "isESM": true,
882
+ "relativePath": [
883
+ "lib",
884
+ "commands",
885
+ "devops",
886
+ "promotion",
887
+ "validate.js"
888
+ ]
889
+ },
806
890
  "devops:request:status": {
807
891
  "aliases": [],
808
892
  "args": {},
@@ -1682,6 +1766,84 @@
1682
1766
  "delete.js"
1683
1767
  ]
1684
1768
  },
1769
+ "devops:pipeline:stage:update": {
1770
+ "aliases": [],
1771
+ "args": {},
1772
+ "description": "Updates the name of a pipeline stage.",
1773
+ "examples": [
1774
+ "Rename a pipeline stage.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --stage-id 1QV000000000001 --name \"Integration\""
1775
+ ],
1776
+ "flags": {
1777
+ "json": {
1778
+ "description": "Format output as json.",
1779
+ "helpGroup": "GLOBAL",
1780
+ "name": "json",
1781
+ "allowNo": false,
1782
+ "type": "boolean"
1783
+ },
1784
+ "flags-dir": {
1785
+ "helpGroup": "GLOBAL",
1786
+ "name": "flags-dir",
1787
+ "summary": "Import flag values from a directory.",
1788
+ "hasDynamicHelp": false,
1789
+ "multiple": false,
1790
+ "type": "option"
1791
+ },
1792
+ "target-org": {
1793
+ "char": "o",
1794
+ "name": "target-org",
1795
+ "noCacheDefault": true,
1796
+ "required": true,
1797
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1798
+ "hasDynamicHelp": true,
1799
+ "multiple": false,
1800
+ "type": "option"
1801
+ },
1802
+ "api-version": {
1803
+ "description": "Override the api version used for api requests made by this command",
1804
+ "name": "api-version",
1805
+ "hasDynamicHelp": false,
1806
+ "multiple": false,
1807
+ "type": "option"
1808
+ },
1809
+ "stage-id": {
1810
+ "char": "s",
1811
+ "name": "stage-id",
1812
+ "required": true,
1813
+ "summary": "ID of the pipeline stage to update.",
1814
+ "hasDynamicHelp": false,
1815
+ "multiple": false,
1816
+ "type": "option"
1817
+ },
1818
+ "name": {
1819
+ "char": "n",
1820
+ "name": "name",
1821
+ "required": true,
1822
+ "summary": "New name for the pipeline stage.",
1823
+ "hasDynamicHelp": false,
1824
+ "multiple": false,
1825
+ "type": "option"
1826
+ }
1827
+ },
1828
+ "hasDynamicHelp": true,
1829
+ "hiddenAliases": [],
1830
+ "id": "devops:pipeline:stage:update",
1831
+ "pluginAlias": "@salesforce/plugin-devops-center",
1832
+ "pluginName": "@salesforce/plugin-devops-center",
1833
+ "pluginType": "core",
1834
+ "strict": true,
1835
+ "summary": "Update a DevOps Center pipeline stage.",
1836
+ "enableJsonFlag": true,
1837
+ "isESM": true,
1838
+ "relativePath": [
1839
+ "lib",
1840
+ "commands",
1841
+ "devops",
1842
+ "pipeline",
1843
+ "stage",
1844
+ "update.js"
1845
+ ]
1846
+ },
1685
1847
  "devops:stage:branch:add": {
1686
1848
  "aliases": [],
1687
1849
  "args": {},
@@ -1774,6 +1936,82 @@
1774
1936
  "add.js"
1775
1937
  ]
1776
1938
  },
1939
+ "devops:stage:branch:delete": {
1940
+ "aliases": [],
1941
+ "args": {},
1942
+ "description": "Removes the branch linked to the specified pipeline stage. Because branches are configured from right to left (a stage can have a branch only after the stage to its right does), removing a branch also removes the branches from all upstream stages (to the left) in the pipeline, keeping it in a valid state. The branch records in the repository are not deleted; only their association with the stages is removed. The stage must belong to an inactive pipeline.",
1943
+ "examples": [
1944
+ "Delete the branch associated with a pipeline stage:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0Xo000000000001 --stage-id 0Xp000000000001"
1945
+ ],
1946
+ "flags": {
1947
+ "json": {
1948
+ "description": "Format output as json.",
1949
+ "helpGroup": "GLOBAL",
1950
+ "name": "json",
1951
+ "allowNo": false,
1952
+ "type": "boolean"
1953
+ },
1954
+ "flags-dir": {
1955
+ "helpGroup": "GLOBAL",
1956
+ "name": "flags-dir",
1957
+ "summary": "Import flag values from a directory.",
1958
+ "hasDynamicHelp": false,
1959
+ "multiple": false,
1960
+ "type": "option"
1961
+ },
1962
+ "target-org": {
1963
+ "char": "o",
1964
+ "name": "target-org",
1965
+ "noCacheDefault": true,
1966
+ "required": true,
1967
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
1968
+ "hasDynamicHelp": true,
1969
+ "multiple": false,
1970
+ "type": "option"
1971
+ },
1972
+ "api-version": {
1973
+ "description": "Override the api version used for api requests made by this command",
1974
+ "name": "api-version",
1975
+ "hasDynamicHelp": false,
1976
+ "multiple": false,
1977
+ "type": "option"
1978
+ },
1979
+ "pipeline-id": {
1980
+ "name": "pipeline-id",
1981
+ "required": true,
1982
+ "summary": "ID of the pipeline that contains the stage. Used to verify the pipeline is inactive before deleting.",
1983
+ "hasDynamicHelp": false,
1984
+ "multiple": false,
1985
+ "type": "option"
1986
+ },
1987
+ "stage-id": {
1988
+ "name": "stage-id",
1989
+ "required": true,
1990
+ "summary": "ID of the pipeline stage whose branch you want to delete.",
1991
+ "hasDynamicHelp": false,
1992
+ "multiple": false,
1993
+ "type": "option"
1994
+ }
1995
+ },
1996
+ "hasDynamicHelp": true,
1997
+ "hiddenAliases": [],
1998
+ "id": "devops:stage:branch:delete",
1999
+ "pluginAlias": "@salesforce/plugin-devops-center",
2000
+ "pluginName": "@salesforce/plugin-devops-center",
2001
+ "pluginType": "core",
2002
+ "strict": true,
2003
+ "summary": "Delete the source code repository branch associated with a pipeline stage.",
2004
+ "enableJsonFlag": true,
2005
+ "isESM": true,
2006
+ "relativePath": [
2007
+ "lib",
2008
+ "commands",
2009
+ "devops",
2010
+ "stage",
2011
+ "branch",
2012
+ "delete.js"
2013
+ ]
2014
+ },
1777
2015
  "devops:stage:environment:add": {
1778
2016
  "aliases": [],
1779
2017
  "args": {},
@@ -2531,5 +2769,5 @@
2531
2769
  ]
2532
2770
  }
2533
2771
  },
2534
- "version": "1.4.1"
2772
+ "version": "2.0.1"
2535
2773
  }