@simplysf/simply-cicd 0.16.0 → 0.18.0

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.
@@ -277,13 +277,12 @@
277
277
  "validate:deploy:cicd:simply"
278
278
  ]
279
279
  },
280
- "simply:cicd:notify:build": {
280
+ "simply:cicd:build:check-permission-sets": {
281
281
  "aliases": [],
282
282
  "args": {},
283
- "description": "Run in every build job's `after_script`. Which card it posts depends on `--ci-job-status`:\n\n- `failed`: a failure card with the job, stage, branch, and pipeline, whichever build job failed.\n- `success`: a package version card, but only when the job created a package version. The card shows the new version tag, its `04t` ID, and the issue references in the commits since the previous version tag. Every other successful job sends nothing.\n- Anything else (e.g. `canceled`): nothing.\n\nThe `04t` ID comes from `--subscriber-package-version-id`, or else from the `subscriberPackageVersionId.env` file that `build create-package-version` writes to the working directory. The new version's tag is the tag at `HEAD` annotated with that ID. The previous version's tag is the nearest earlier tag in the project's version tag format (`plugins.simply.versionTagFormat` or `SIMPLY_CICD_VERSION_TAG_FORMAT`). The command fetches tags, and the full history when the clone is shallow. If a tag or the history can't be found, the card shows `N/A` instead of failing the job.",
283
+ "description": "Finds every permission sets file in the repo, meaning every file whose name ends in `.psbuild.json` (the JSON format `sf simply permissions build --file` reads), and checks each permission set it declares, the same way `sf simply permissions build --file <file> --check` does. Nothing is written. Files are found by walking the directory tree from the current directory, skipping `node_modules`, `.git`, `.sf`, and `.sfdx`, so `find . -name '*.psbuild.json'` lists what will be checked. Relative paths in a permission sets file resolve against the current directory, so run this from the repo root.\n\nEvery file is checked before the command fails, so one run lists every permission set that has drifted or is missing, along with the command that regenerates each file. A `.psbuild.json` file that fails validation fails the command immediately. A repo with no `.psbuild.json` files is skipped with exit code 0, so the job is safe to include in a shared pipeline template. Formatting differences, such as indentation, line endings, or comments, don't count as drift.",
284
284
  "examples": [
285
- "Post a card from a build job's after_script; it only sends one when the job failed or created a package version:\n<%= config.bin %> <%= command.id %> --ci-job-name push-scratch --ci-job-status \"$CI_JOB_STATUS\" --teams-webhook-url https://outlook.office.com/webhook/... --enabled",
286
- "Announce a package version with linked Jira stories:\n<%= config.bin %> <%= command.id %> --ci-job-status success --alm-base-url https://jira.example.com/browse --teams-webhook-url https://outlook.office.com/webhook/... --enabled"
285
+ "<%= config.bin %> <%= command.id %>"
287
286
  ],
288
287
  "flags": {
289
288
  "json": {
@@ -301,109 +300,94 @@
301
300
  "multiple": false,
302
301
  "type": "option"
303
302
  },
304
- "ci-commit-ref-name": {
305
- "env": "SIMPLY_CICD_CI_COMMIT_REF_NAME",
306
- "name": "ci-commit-ref-name",
307
- "summary": "The git branch or tag ref for this pipeline run.",
308
- "hasDynamicHelp": false,
309
- "multiple": false,
310
- "type": "option"
311
- },
312
- "ci-job-name": {
313
- "env": "SIMPLY_CICD_CI_JOB_NAME",
314
- "name": "ci-job-name",
315
- "summary": "The name of the current CI job.",
316
- "hasDynamicHelp": false,
317
- "multiple": false,
318
- "type": "option"
319
- },
320
- "ci-job-stage": {
321
- "env": "SIMPLY_CICD_CI_JOB_STAGE",
322
- "name": "ci-job-stage",
323
- "summary": "The stage of the current CI job.",
324
- "hasDynamicHelp": false,
325
- "multiple": false,
326
- "type": "option"
327
- },
328
- "ci-job-status": {
329
- "env": "SIMPLY_CICD_CI_JOB_STATUS",
330
- "name": "ci-job-status",
331
- "summary": "The status of the current CI job (e.g. success, failed, canceled).",
332
- "hasDynamicHelp": false,
333
- "multiple": false,
334
- "type": "option"
335
- },
336
- "ci-pipeline-id": {
337
- "env": "SIMPLY_CICD_CI_PIPELINE_ID",
338
- "name": "ci-pipeline-id",
339
- "summary": "The ID of the current CI pipeline.",
340
- "hasDynamicHelp": false,
341
- "multiple": false,
342
- "type": "option"
343
- },
344
- "ci-pipeline-url": {
345
- "env": "SIMPLY_CICD_CI_PIPELINE_URL",
346
- "name": "ci-pipeline-url",
347
- "summary": "The URL of the current CI pipeline.",
348
- "hasDynamicHelp": false,
349
- "multiple": false,
350
- "type": "option"
351
- },
352
- "ci-project-title": {
353
- "env": "SIMPLY_CICD_CI_PROJECT_TITLE",
354
- "name": "ci-project-title",
355
- "summary": "The project title shown in the notification card's heading.",
356
- "hasDynamicHelp": false,
357
- "multiple": false,
358
- "type": "option"
359
- },
360
- "subscriber-package-version-id": {
361
- "env": "SIMPLY_CICD_SUBSCRIBER_PACKAGE_VERSION_ID",
362
- "name": "subscriber-package-version-id",
363
- "summary": "The subscriber package version ID (04t...) created by this job. Defaults to the one in subscriberPackageVersionId.env, written by build create-package-version.",
364
- "hasDynamicHelp": false,
365
- "multiple": false,
366
- "type": "option"
367
- },
368
- "enabled": {
369
- "env": "SIMPLY_CICD_ENABLED",
370
- "name": "enabled",
371
- "summary": "Whether the notification is actually sent. Defaults to false so pipelines can gate this behind their own condition.",
303
+ "debug": {
304
+ "env": "SIMPLY_CICD_DEBUG",
305
+ "name": "debug",
306
+ "summary": "Enable verbose debug logging.",
372
307
  "allowNo": false,
373
308
  "type": "boolean"
374
309
  },
375
- "alm-base-url": {
376
- "env": "SIMPLY_CICD_ALM_BASE_URL",
377
- "name": "alm-base-url",
378
- "summary": "Base URL that an issue reference is appended to, e.g. https://jira.example.com/browse for Jira or https://gitlab.com/group/project/-/issues for GitLab Issues. References are shown without links if not provided.",
379
- "hasDynamicHelp": false,
380
- "multiple": false,
381
- "type": "option"
382
- },
383
- "alm-project-key": {
384
- "env": "SIMPLY_CICD_ALM_PROJECT_KEY",
385
- "name": "alm-project-key",
386
- "summary": "Fallback project key(s) used to search commit messages for issue references, if none are configured in .sfdevrc.json. Only used by prefix-keyed trackers such as Jira.",
387
- "hasDynamicHelp": false,
388
- "multiple": false,
389
- "type": "option"
310
+ "disabled": {
311
+ "env": "SIMPLY_CICD_DISABLED",
312
+ "name": "disabled",
313
+ "summary": "Skip this job entirely, logging a warning instead of running it.",
314
+ "allowNo": false,
315
+ "type": "boolean"
316
+ }
317
+ },
318
+ "hasDynamicHelp": false,
319
+ "hiddenAliases": [],
320
+ "id": "simply:cicd:build:check-permission-sets",
321
+ "pluginAlias": "@simplysf/simply-cicd",
322
+ "pluginName": "@simplysf/simply-cicd",
323
+ "pluginType": "core",
324
+ "strict": true,
325
+ "summary": "Fail the pipeline when any generated permission set in the repo has drifted from its source metadata.",
326
+ "enableJsonFlag": true,
327
+ "isESM": true,
328
+ "relativePath": [
329
+ "lib",
330
+ "commands",
331
+ "simply",
332
+ "cicd",
333
+ "build",
334
+ "check-permission-sets.js"
335
+ ],
336
+ "aliasPermutations": [],
337
+ "permutations": [
338
+ "simply:cicd:build:check-permission-sets",
339
+ "cicd:simply:build:check-permission-sets",
340
+ "cicd:build:simply:check-permission-sets",
341
+ "cicd:build:check-permission-sets:simply",
342
+ "simply:build:cicd:check-permission-sets",
343
+ "build:simply:cicd:check-permission-sets",
344
+ "build:cicd:simply:check-permission-sets",
345
+ "build:cicd:check-permission-sets:simply",
346
+ "simply:build:check-permission-sets:cicd",
347
+ "build:simply:check-permission-sets:cicd",
348
+ "build:check-permission-sets:simply:cicd",
349
+ "build:check-permission-sets:cicd:simply",
350
+ "simply:cicd:check-permission-sets:build",
351
+ "cicd:simply:check-permission-sets:build",
352
+ "cicd:check-permission-sets:simply:build",
353
+ "cicd:check-permission-sets:build:simply",
354
+ "simply:check-permission-sets:cicd:build",
355
+ "check-permission-sets:simply:cicd:build",
356
+ "check-permission-sets:cicd:simply:build",
357
+ "check-permission-sets:cicd:build:simply",
358
+ "simply:check-permission-sets:build:cicd",
359
+ "check-permission-sets:simply:build:cicd",
360
+ "check-permission-sets:build:simply:cicd",
361
+ "check-permission-sets:build:cicd:simply"
362
+ ]
363
+ },
364
+ "simply:cicd:build:cleanup-scratch-orgs": {
365
+ "aliases": [],
366
+ "args": {},
367
+ "description": "For each Dev Hub, queries `ActiveScratchOrg` records created more than 3 hours ago and bulk-deletes them. Useful for keeping a shared Dev Hub's scratch org allotment from being exhausted by abandoned CI runs. Every `--dev-hub` alias must already be authenticated.",
368
+ "examples": [
369
+ "<%= config.bin %> <%= command.id %> --dev-hub my-devhub"
370
+ ],
371
+ "flags": {
372
+ "json": {
373
+ "description": "Format output as json.",
374
+ "helpGroup": "GLOBAL",
375
+ "name": "json",
376
+ "allowNo": false,
377
+ "type": "boolean"
390
378
  },
391
- "alm-provider": {
392
- "env": "SIMPLY_CICD_ALM_PROVIDER",
393
- "name": "alm-provider",
394
- "summary": "The issue tracker whose reference format to look for in commit messages.",
395
- "default": "jira",
379
+ "flags-dir": {
380
+ "helpGroup": "GLOBAL",
381
+ "name": "flags-dir",
382
+ "summary": "Import flag values from a directory.",
396
383
  "hasDynamicHelp": false,
397
384
  "multiple": false,
398
- "options": [
399
- "gitlab-issues",
400
- "jira"
401
- ],
402
385
  "type": "option"
403
386
  },
404
- "teams-webhook-url": {
405
- "name": "teams-webhook-url",
406
- "summary": "One or more Teams webhook URLs to send the notification to.",
387
+ "dev-hub": {
388
+ "name": "dev-hub",
389
+ "required": true,
390
+ "summary": "Alias of a Dev Hub. Must already be authenticated. Repeat this flag for each Dev Hub to try, in order.",
407
391
  "hasDynamicHelp": false,
408
392
  "multiple": true,
409
393
  "type": "option"
@@ -414,16 +398,23 @@
414
398
  "summary": "Enable verbose debug logging.",
415
399
  "allowNo": false,
416
400
  "type": "boolean"
401
+ },
402
+ "disabled": {
403
+ "env": "SIMPLY_CICD_DISABLED",
404
+ "name": "disabled",
405
+ "summary": "Skip this job entirely, logging a warning instead of running it.",
406
+ "allowNo": false,
407
+ "type": "boolean"
417
408
  }
418
409
  },
419
410
  "hasDynamicHelp": false,
420
411
  "hiddenAliases": [],
421
- "id": "simply:cicd:notify:build",
412
+ "id": "simply:cicd:build:cleanup-scratch-orgs",
422
413
  "pluginAlias": "@simplysf/simply-cicd",
423
414
  "pluginName": "@simplysf/simply-cicd",
424
415
  "pluginType": "core",
425
416
  "strict": true,
426
- "summary": "Send a build job's failure, or the package version it created, to Microsoft Teams, with issue-tracker integration.",
417
+ "summary": "Delete scratch orgs older than 3 hours from every configured Dev Hub.",
427
418
  "enableJsonFlag": true,
428
419
  "isESM": true,
429
420
  "relativePath": [
@@ -431,44 +422,43 @@
431
422
  "commands",
432
423
  "simply",
433
424
  "cicd",
434
- "notify",
435
- "build.js"
425
+ "build",
426
+ "cleanup-scratch-orgs.js"
436
427
  ],
437
428
  "aliasPermutations": [],
438
429
  "permutations": [
439
- "simply:cicd:notify:build",
440
- "cicd:simply:notify:build",
441
- "cicd:notify:simply:build",
442
- "cicd:notify:build:simply",
443
- "simply:notify:cicd:build",
444
- "notify:simply:cicd:build",
445
- "notify:cicd:simply:build",
446
- "notify:cicd:build:simply",
447
- "simply:notify:build:cicd",
448
- "notify:simply:build:cicd",
449
- "notify:build:simply:cicd",
450
- "notify:build:cicd:simply",
451
- "simply:cicd:build:notify",
452
- "cicd:simply:build:notify",
453
- "cicd:build:simply:notify",
454
- "cicd:build:notify:simply",
455
- "simply:build:cicd:notify",
456
- "build:simply:cicd:notify",
457
- "build:cicd:simply:notify",
458
- "build:cicd:notify:simply",
459
- "simply:build:notify:cicd",
460
- "build:simply:notify:cicd",
461
- "build:notify:simply:cicd",
462
- "build:notify:cicd:simply"
430
+ "simply:cicd:build:cleanup-scratch-orgs",
431
+ "cicd:simply:build:cleanup-scratch-orgs",
432
+ "cicd:build:simply:cleanup-scratch-orgs",
433
+ "cicd:build:cleanup-scratch-orgs:simply",
434
+ "simply:build:cicd:cleanup-scratch-orgs",
435
+ "build:simply:cicd:cleanup-scratch-orgs",
436
+ "build:cicd:simply:cleanup-scratch-orgs",
437
+ "build:cicd:cleanup-scratch-orgs:simply",
438
+ "simply:build:cleanup-scratch-orgs:cicd",
439
+ "build:simply:cleanup-scratch-orgs:cicd",
440
+ "build:cleanup-scratch-orgs:simply:cicd",
441
+ "build:cleanup-scratch-orgs:cicd:simply",
442
+ "simply:cicd:cleanup-scratch-orgs:build",
443
+ "cicd:simply:cleanup-scratch-orgs:build",
444
+ "cicd:cleanup-scratch-orgs:simply:build",
445
+ "cicd:cleanup-scratch-orgs:build:simply",
446
+ "simply:cleanup-scratch-orgs:cicd:build",
447
+ "cleanup-scratch-orgs:simply:cicd:build",
448
+ "cleanup-scratch-orgs:cicd:simply:build",
449
+ "cleanup-scratch-orgs:cicd:build:simply",
450
+ "simply:cleanup-scratch-orgs:build:cicd",
451
+ "cleanup-scratch-orgs:simply:build:cicd",
452
+ "cleanup-scratch-orgs:build:simply:cicd",
453
+ "cleanup-scratch-orgs:build:cicd:simply"
463
454
  ]
464
455
  },
465
- "simply:cicd:notify:happy-soup": {
456
+ "simply:cicd:build:create-fallback-tag": {
466
457
  "aliases": [],
467
458
  "args": {},
468
- "description": "Run with `--before-script` at the start of a stage to post a \"starting\" card, and with `--after-script` at the end to post a success or failure card. With `--notify-on-completion`, intermediate stage notifications are suppressed and only the final job (`--is-final-job` combined with `--after-script`) posts a card.\n\nOn a successful `--after-script`, reads the packages upgraded by `deploy happy-soup install-packaged` from the deploy progress file, looks up the commit history between each package's previous and target version in its own origin repository, and includes any matched issue references per package in the notification.",
459
+ "description": "Resolves the last tag to increment (either `--last-tag`, or the closest reachable tag matching the project's version prefix), extracts its annotated `04t` package version ID, and creates/pushes a new tag with an incremented numeric suffix (e.g. `v1.2.3.4` -> `v1.2.3.4-1` -> `v1.2.3.4-2`) annotated with that same package ID. Tags are matched and parsed in `SIMPLY_CICD_VERSION_TAG_FORMAT` or the project's `plugins.simply.versionTagFormat`, so only a counter after the formatted version is incremented — with `v{MAJOR}.{MINOR}.{PATCH}-{BUILD}`, `v1.2.3-4` becomes `v1.2.3-4-1`, never `v1.2.3-5`. Soft no-ops (does not error) when no last tag, or no valid package ID within it, can be found — a build with nothing to fall back to just has nothing to do here.\n\nAlso soft no-ops when HEAD already carries a tag matching the version prefix, e.g. because `build create-package-version` just created and tagged a real package version earlier in the same job. This also keeps a retried job from adding a second fallback tag to the same commit.\n\nSkipped automatically when `PACKAGE_CHANGED=TRUE` is set in the environment (see `build determine-package-changes`) — a real package version will be created instead.",
469
460
  "examples": [
470
- "<%= config.bin %> <%= command.id %> --before-script --ci-job-stage pre-destructive --teams-webhook-url https://outlook.office.com/webhook/... --enabled",
471
- "<%= config.bin %> <%= command.id %> --after-script --is-final-job --notify-on-completion --ci-job-status success --teams-webhook-url https://outlook.office.com/webhook/... --enabled"
461
+ "<%= config.bin %> <%= command.id %> --ci-commit-ref-name main --ci-project-path group/project --project-access-token glpat-... --ci-pipeline-id 123"
472
462
  ],
473
463
  "flags": {
474
464
  "json": {
@@ -486,170 +476,101 @@
486
476
  "multiple": false,
487
477
  "type": "option"
488
478
  },
489
- "after-script": {
490
- "name": "after-script",
491
- "summary": "Run the after-stage notification logic.",
492
- "allowNo": false,
493
- "type": "boolean"
494
- },
495
- "before-script": {
496
- "name": "before-script",
497
- "summary": "Run the before-stage (starting) notification logic.",
498
- "allowNo": false,
499
- "type": "boolean"
500
- },
501
479
  "ci-commit-ref-name": {
502
480
  "env": "SIMPLY_CICD_CI_COMMIT_REF_NAME",
503
481
  "name": "ci-commit-ref-name",
504
- "summary": "The git branch or tag ref for this pipeline run.",
482
+ "required": true,
483
+ "summary": "Git branch or ref name being built.",
505
484
  "hasDynamicHelp": false,
506
485
  "multiple": false,
507
486
  "type": "option"
508
487
  },
509
- "ci-environment-name": {
510
- "env": "SIMPLY_CICD_CI_ENVIRONMENT_NAME",
511
- "name": "ci-environment-name",
512
- "summary": "The name of the target CI environment.",
488
+ "ci-pipeline-id": {
489
+ "env": "SIMPLY_CICD_CI_PIPELINE_ID",
490
+ "name": "ci-pipeline-id",
491
+ "required": true,
492
+ "summary": "CI pipeline ID, used to name the temporary authenticated git remote.",
513
493
  "hasDynamicHelp": false,
514
494
  "multiple": false,
515
495
  "type": "option"
516
496
  },
517
- "ci-job-name": {
518
- "env": "SIMPLY_CICD_CI_JOB_NAME",
519
- "name": "ci-job-name",
520
- "summary": "The name of the current CI job.",
497
+ "ci-project-path": {
498
+ "env": "SIMPLY_CICD_CI_PROJECT_PATH",
499
+ "name": "ci-project-path",
500
+ "required": true,
501
+ "summary": "CI project's git path (e.g. group/project), used to build the authenticated git remote URL.",
521
502
  "hasDynamicHelp": false,
522
503
  "multiple": false,
523
504
  "type": "option"
524
505
  },
525
- "ci-job-stage": {
526
- "env": "SIMPLY_CICD_CI_JOB_STAGE",
527
- "name": "ci-job-stage",
528
- "summary": "The stage of the current CI job.",
529
- "hasDynamicHelp": false,
530
- "multiple": false,
531
- "type": "option"
532
- },
533
- "ci-job-status": {
534
- "env": "SIMPLY_CICD_CI_JOB_STATUS",
535
- "name": "ci-job-status",
536
- "summary": "The status of the current CI job (e.g. success, failed).",
537
- "hasDynamicHelp": false,
538
- "multiple": false,
539
- "type": "option"
540
- },
541
- "ci-job-token": {
542
- "env": "SIMPLY_CICD_CI_JOB_TOKEN",
543
- "name": "ci-job-token",
544
- "summary": "The CI job token to try first when looking up an upgraded package's origin commit history. Falls back to --project-access-token if the job token can't read that repository.",
545
- "hasDynamicHelp": false,
546
- "multiple": false,
547
- "type": "option"
548
- },
549
- "ci-pipeline-id": {
550
- "env": "SIMPLY_CICD_CI_PIPELINE_ID",
551
- "name": "ci-pipeline-id",
552
- "summary": "The ID of the current CI pipeline.",
506
+ "project-access-token": {
507
+ "env": "SIMPLY_CICD_PROJECT_ACCESS_TOKEN",
508
+ "name": "project-access-token",
509
+ "required": true,
510
+ "summary": "Access token used to authenticate git remote operations (tagging, pushing).",
553
511
  "hasDynamicHelp": false,
554
512
  "multiple": false,
555
513
  "type": "option"
556
514
  },
557
- "ci-pipeline-url": {
558
- "env": "SIMPLY_CICD_CI_PIPELINE_URL",
559
- "name": "ci-pipeline-url",
560
- "summary": "The URL of the current CI pipeline.",
515
+ "vcs-host": {
516
+ "env": "SIMPLY_CICD_VCS_HOST",
517
+ "name": "vcs-host",
518
+ "summary": "Hostname of the VCS instance hosting this project.",
561
519
  "hasDynamicHelp": false,
562
520
  "multiple": false,
563
521
  "type": "option"
564
522
  },
565
- "deploy-progress-file": {
566
- "env": "SIMPLY_CICD_DEPLOY_PROGRESS_FILE",
567
- "name": "deploy-progress-file",
568
- "summary": "Path to the deployment progress file to read upgraded package information from.",
569
- "default": "DEPLOY_PROGRESS.json",
523
+ "vcs-provider": {
524
+ "env": "SIMPLY_CICD_VCS_PROVIDER",
525
+ "name": "vcs-provider",
526
+ "summary": "The VCS platform hosting this project.",
527
+ "default": "gitlab",
570
528
  "hasDynamicHelp": false,
571
529
  "multiple": false,
530
+ "options": [
531
+ "github",
532
+ "gitlab"
533
+ ],
572
534
  "type": "option"
573
535
  },
574
- "enabled": {
575
- "env": "SIMPLY_CICD_ENABLED",
576
- "name": "enabled",
577
- "summary": "Whether the notification is actually sent. Defaults to false so pipelines can gate this behind their own condition.",
536
+ "debug": {
537
+ "env": "SIMPLY_CICD_DEBUG",
538
+ "name": "debug",
539
+ "summary": "Enable verbose debug logging.",
578
540
  "allowNo": false,
579
541
  "type": "boolean"
580
542
  },
581
- "alm-base-url": {
582
- "env": "SIMPLY_CICD_ALM_BASE_URL",
583
- "name": "alm-base-url",
584
- "summary": "Base URL that an issue reference is appended to, e.g. https://jira.example.com/browse for Jira or https://gitlab.com/group/project/-/issues for GitLab Issues. References are shown without links if not provided.",
585
- "hasDynamicHelp": false,
586
- "multiple": false,
587
- "type": "option"
588
- },
589
- "alm-project-key": {
590
- "env": "SIMPLY_CICD_ALM_PROJECT_KEY",
591
- "name": "alm-project-key",
592
- "summary": "Fallback project key(s) used to search commit messages for issue references, if none are configured in .sfdevrc.json. Only used by prefix-keyed trackers such as Jira.",
593
- "hasDynamicHelp": false,
594
- "multiple": false,
595
- "type": "option"
543
+ "disabled": {
544
+ "env": "SIMPLY_CICD_DISABLED",
545
+ "name": "disabled",
546
+ "summary": "Skip this job entirely, logging a warning instead of running it.",
547
+ "allowNo": false,
548
+ "type": "boolean"
596
549
  },
597
- "alm-provider": {
598
- "env": "SIMPLY_CICD_ALM_PROVIDER",
599
- "name": "alm-provider",
600
- "summary": "The issue tracker whose reference format to look for in commit messages.",
601
- "default": "jira",
550
+ "last-tag": {
551
+ "name": "last-tag",
552
+ "summary": "Manually specify the last tag to increment, instead of resolving it from git.",
602
553
  "hasDynamicHelp": false,
603
554
  "multiple": false,
604
- "options": [
605
- "gitlab-issues",
606
- "jira"
607
- ],
608
555
  "type": "option"
609
556
  },
610
- "project-access-token": {
611
- "env": "SIMPLY_CICD_PROJECT_ACCESS_TOKEN",
612
- "name": "project-access-token",
613
- "summary": "A personal or project access token, used to look up an upgraded package's origin commit history when --ci-job-token isn't provided or can't read that repository.",
557
+ "out": {
558
+ "name": "out",
559
+ "summary": "Output dotenv file path.",
560
+ "default": "subscriberPackageVersionId.env",
614
561
  "hasDynamicHelp": false,
615
562
  "multiple": false,
616
563
  "type": "option"
617
- },
618
- "teams-webhook-url": {
619
- "name": "teams-webhook-url",
620
- "summary": "One or more Teams webhook URLs to send the notification to.",
621
- "hasDynamicHelp": false,
622
- "multiple": true,
623
- "type": "option"
624
- },
625
- "notify-on-completion": {
626
- "name": "notify-on-completion",
627
- "summary": "Only send a notification on the final job of the pipeline, suppressing per-stage notifications.",
628
- "allowNo": false,
629
- "type": "boolean"
630
- },
631
- "is-final-job": {
632
- "name": "is-final-job",
633
- "summary": "Marks this job as the final job in the pipeline. Combined with --after-script and --notify-on-completion, this is what actually triggers the final notification.",
634
- "allowNo": false,
635
- "type": "boolean"
636
- },
637
- "debug": {
638
- "env": "SIMPLY_CICD_DEBUG",
639
- "name": "debug",
640
- "summary": "Enable verbose debug logging.",
641
- "allowNo": false,
642
- "type": "boolean"
643
564
  }
644
565
  },
645
566
  "hasDynamicHelp": false,
646
567
  "hiddenAliases": [],
647
- "id": "simply:cicd:notify:happy-soup",
568
+ "id": "simply:cicd:build:create-fallback-tag",
648
569
  "pluginAlias": "@simplysf/simply-cicd",
649
570
  "pluginName": "@simplysf/simply-cicd",
650
571
  "pluginType": "core",
651
572
  "strict": true,
652
- "summary": "Send a happy-soup deployment stage notification to Microsoft Teams, with ALM story integration for upgraded packages.",
573
+ "summary": "Create a fallback git tag carrying forward the previous package version's ID, for builds that didn't produce a new package version.",
653
574
  "enableJsonFlag": true,
654
575
  "isESM": true,
655
576
  "relativePath": [
@@ -657,44 +578,43 @@
657
578
  "commands",
658
579
  "simply",
659
580
  "cicd",
660
- "notify",
661
- "happy-soup.js"
581
+ "build",
582
+ "create-fallback-tag.js"
662
583
  ],
663
584
  "aliasPermutations": [],
664
585
  "permutations": [
665
- "simply:cicd:notify:happy-soup",
666
- "cicd:simply:notify:happy-soup",
667
- "cicd:notify:simply:happy-soup",
668
- "cicd:notify:happy-soup:simply",
669
- "simply:notify:cicd:happy-soup",
670
- "notify:simply:cicd:happy-soup",
671
- "notify:cicd:simply:happy-soup",
672
- "notify:cicd:happy-soup:simply",
673
- "simply:notify:happy-soup:cicd",
674
- "notify:simply:happy-soup:cicd",
675
- "notify:happy-soup:simply:cicd",
676
- "notify:happy-soup:cicd:simply",
677
- "simply:cicd:happy-soup:notify",
678
- "cicd:simply:happy-soup:notify",
679
- "cicd:happy-soup:simply:notify",
680
- "cicd:happy-soup:notify:simply",
681
- "simply:happy-soup:cicd:notify",
682
- "happy-soup:simply:cicd:notify",
683
- "happy-soup:cicd:simply:notify",
684
- "happy-soup:cicd:notify:simply",
685
- "simply:happy-soup:notify:cicd",
686
- "happy-soup:simply:notify:cicd",
687
- "happy-soup:notify:simply:cicd",
688
- "happy-soup:notify:cicd:simply"
586
+ "simply:cicd:build:create-fallback-tag",
587
+ "cicd:simply:build:create-fallback-tag",
588
+ "cicd:build:simply:create-fallback-tag",
589
+ "cicd:build:create-fallback-tag:simply",
590
+ "simply:build:cicd:create-fallback-tag",
591
+ "build:simply:cicd:create-fallback-tag",
592
+ "build:cicd:simply:create-fallback-tag",
593
+ "build:cicd:create-fallback-tag:simply",
594
+ "simply:build:create-fallback-tag:cicd",
595
+ "build:simply:create-fallback-tag:cicd",
596
+ "build:create-fallback-tag:simply:cicd",
597
+ "build:create-fallback-tag:cicd:simply",
598
+ "simply:cicd:create-fallback-tag:build",
599
+ "cicd:simply:create-fallback-tag:build",
600
+ "cicd:create-fallback-tag:simply:build",
601
+ "cicd:create-fallback-tag:build:simply",
602
+ "simply:create-fallback-tag:cicd:build",
603
+ "create-fallback-tag:simply:cicd:build",
604
+ "create-fallback-tag:cicd:simply:build",
605
+ "create-fallback-tag:cicd:build:simply",
606
+ "simply:create-fallback-tag:build:cicd",
607
+ "create-fallback-tag:simply:build:cicd",
608
+ "create-fallback-tag:build:simply:cicd",
609
+ "create-fallback-tag:build:cicd:simply"
689
610
  ]
690
611
  },
691
- "simply:cicd:notify:project": {
612
+ "simply:cicd:build:create-package-version": {
692
613
  "aliases": [],
693
614
  "args": {},
694
- "description": "Run once with `--before-script` at the start of a deployment pipeline (to record the previously installed and target package versions), and once with `--after-script` at the end (to post a success or failure card to Teams, including the tracked issues that shipped between those two versions).",
615
+ "description": "Skips entirely (without error) when the pipeline was triggered by a merge request, or when this isn't a release-branch build and `--always-create-package` wasn't passed. Otherwise, creates a new version of the default package directory's package, polls until creation finishes, verifies the resulting version's Apex code coverage meets `--code-coverage-minimum` (or the project's own `plugins.simply.coverageRequirement.minimumCoverageRequired`, if declared in `sfdx-project.json`), and creates/pushes a git tag annotated with the new package version's `04t` ID.\n\nThe tag is `v<major>.<minor>.<patch>.<build>` by default. A project can choose its own shape with a `plugins.simply.versionTagFormat` template in `sfdx-project.json`, or the `SIMPLY_CICD_VERSION_TAG_FORMAT` environment variable (which overrides it) — e.g. `{MAJOR}.{MINOR}.{PATCH}+{BUILD}` tags `1.2.3.4` as `1.2.3+4`. Each of `{MAJOR}`, `{MINOR}`, `{PATCH}`, and `{BUILD}` must appear exactly once, and the format is validated before any package version is created. Unless this is a release-branch build, the package directory's `branch` attribute or the CI ref is appended as `-<suffix>` after the formatted version.\n\nSkipped automatically when `PACKAGE_CHANGED=FALSE` is set in the environment (see `build determine-package-changes`).",
695
616
  "examples": [
696
- "<%= config.bin %> <%= command.id %> --before-script --ci-job-stage pre-destructive --alias my-org --enabled",
697
- "<%= config.bin %> <%= command.id %> --after-script --ci-job-stage post-destructive --ci-job-status success --teams-webhook-url https://outlook.office.com/webhook/... --enabled"
617
+ "<%= config.bin %> <%= command.id %> --ci-commit-ref-name main --ci-commit-sha a1b2c3d --ci-pipeline-id 123 --ci-pipeline-url https://gitlab.example.com/pipelines/123 --ci-project-path group/project --project-access-token glpat-... --packaging-devhub my-packaging-devhub"
698
618
  ],
699
619
  "flags": {
700
620
  "json": {
@@ -712,178 +632,142 @@
712
632
  "multiple": false,
713
633
  "type": "option"
714
634
  },
715
- "after-script": {
716
- "name": "after-script",
717
- "summary": "Run the after-deployment notification logic.",
718
- "allowNo": false,
719
- "type": "boolean"
720
- },
721
- "alias": {
722
- "env": "SIMPLY_CICD_ALIAS",
723
- "name": "alias",
724
- "summary": "Alias of the target Salesforce org to query for the previously installed package version. Must already be authenticated.",
725
- "hasDynamicHelp": false,
726
- "multiple": false,
727
- "type": "option"
728
- },
729
- "before-script": {
730
- "name": "before-script",
731
- "summary": "Run the before-deployment setup logic (resolves and records package versions).",
732
- "allowNo": false,
733
- "type": "boolean"
734
- },
735
635
  "ci-commit-ref-name": {
736
636
  "env": "SIMPLY_CICD_CI_COMMIT_REF_NAME",
737
637
  "name": "ci-commit-ref-name",
738
- "summary": "The git branch or tag ref for this pipeline run.",
638
+ "required": true,
639
+ "summary": "Git branch or ref name being built.",
739
640
  "hasDynamicHelp": false,
740
641
  "multiple": false,
741
642
  "type": "option"
742
643
  },
743
- "ci-environment-name": {
744
- "env": "SIMPLY_CICD_CI_ENVIRONMENT_NAME",
745
- "name": "ci-environment-name",
746
- "summary": "The name of the target CI environment.",
644
+ "ci-pipeline-id": {
645
+ "env": "SIMPLY_CICD_CI_PIPELINE_ID",
646
+ "name": "ci-pipeline-id",
647
+ "required": true,
648
+ "summary": "CI pipeline ID, used to name the temporary authenticated git remote.",
747
649
  "hasDynamicHelp": false,
748
650
  "multiple": false,
749
651
  "type": "option"
750
652
  },
751
- "ci-job-name": {
752
- "env": "SIMPLY_CICD_CI_JOB_NAME",
753
- "name": "ci-job-name",
754
- "summary": "The name of the current CI job.",
653
+ "ci-project-path": {
654
+ "env": "SIMPLY_CICD_CI_PROJECT_PATH",
655
+ "name": "ci-project-path",
656
+ "required": true,
657
+ "summary": "CI project's git path (e.g. group/project), used to build the authenticated git remote URL.",
755
658
  "hasDynamicHelp": false,
756
659
  "multiple": false,
757
660
  "type": "option"
758
661
  },
759
- "ci-job-stage": {
760
- "env": "SIMPLY_CICD_CI_JOB_STAGE",
761
- "name": "ci-job-stage",
762
- "summary": "The stage of the current CI job (e.g. pre-destructive, post-destructive).",
662
+ "project-access-token": {
663
+ "env": "SIMPLY_CICD_PROJECT_ACCESS_TOKEN",
664
+ "name": "project-access-token",
665
+ "required": true,
666
+ "summary": "Access token used to authenticate git remote operations (tagging, pushing).",
763
667
  "hasDynamicHelp": false,
764
668
  "multiple": false,
765
669
  "type": "option"
766
670
  },
767
- "ci-job-status": {
768
- "env": "SIMPLY_CICD_CI_JOB_STATUS",
769
- "name": "ci-job-status",
770
- "summary": "The status of the current CI job (e.g. success, failed, canceled).",
671
+ "vcs-host": {
672
+ "env": "SIMPLY_CICD_VCS_HOST",
673
+ "name": "vcs-host",
674
+ "summary": "Hostname of the VCS instance hosting this project.",
771
675
  "hasDynamicHelp": false,
772
676
  "multiple": false,
773
677
  "type": "option"
774
678
  },
775
- "ci-pipeline-id": {
776
- "env": "SIMPLY_CICD_CI_PIPELINE_ID",
777
- "name": "ci-pipeline-id",
778
- "summary": "The ID of the current CI pipeline.",
779
- "hasDynamicHelp": false,
780
- "multiple": false,
781
- "type": "option"
782
- },
783
- "ci-pipeline-url": {
784
- "env": "SIMPLY_CICD_CI_PIPELINE_URL",
785
- "name": "ci-pipeline-url",
786
- "summary": "The URL of the current CI pipeline.",
787
- "hasDynamicHelp": false,
788
- "multiple": false,
789
- "type": "option"
790
- },
791
- "ci-project-title": {
792
- "env": "SIMPLY_CICD_CI_PROJECT_TITLE",
793
- "name": "ci-project-title",
794
- "summary": "The project title shown in the notification card's heading.",
679
+ "vcs-provider": {
680
+ "env": "SIMPLY_CICD_VCS_PROVIDER",
681
+ "name": "vcs-provider",
682
+ "summary": "The VCS platform hosting this project.",
683
+ "default": "gitlab",
795
684
  "hasDynamicHelp": false,
796
685
  "multiple": false,
686
+ "options": [
687
+ "github",
688
+ "gitlab"
689
+ ],
797
690
  "type": "option"
798
691
  },
799
- "packaging-devhub": {
800
- "env": "SIMPLY_CICD_PACKAGING_DEVHUB",
801
- "name": "packaging-devhub",
802
- "summary": "Alias of the Dev Hub used to look up target package version information. Must already be authenticated.",
803
- "hasDynamicHelp": false,
804
- "multiple": false,
805
- "type": "option"
692
+ "debug": {
693
+ "env": "SIMPLY_CICD_DEBUG",
694
+ "name": "debug",
695
+ "summary": "Enable verbose debug logging.",
696
+ "allowNo": false,
697
+ "type": "boolean"
806
698
  },
807
- "enabled": {
808
- "env": "SIMPLY_CICD_ENABLED",
809
- "name": "enabled",
810
- "summary": "Whether the notification is actually sent. Defaults to false so pipelines can gate this behind their own condition.",
699
+ "disabled": {
700
+ "env": "SIMPLY_CICD_DISABLED",
701
+ "name": "disabled",
702
+ "summary": "Skip this job entirely, logging a warning instead of running it.",
811
703
  "allowNo": false,
812
704
  "type": "boolean"
813
705
  },
814
- "alm-base-url": {
815
- "env": "SIMPLY_CICD_ALM_BASE_URL",
816
- "name": "alm-base-url",
817
- "summary": "Base URL that an issue reference is appended to, e.g. https://jira.example.com/browse for Jira or https://gitlab.com/group/project/-/issues for GitLab Issues. References are shown without links if not provided.",
706
+ "ci-commit-sha": {
707
+ "env": "SIMPLY_CICD_CI_COMMIT_SHA",
708
+ "name": "ci-commit-sha",
709
+ "required": true,
710
+ "summary": "Commit SHA to tag as the package version's source.",
818
711
  "hasDynamicHelp": false,
819
712
  "multiple": false,
820
713
  "type": "option"
821
714
  },
822
- "alm-project-key": {
823
- "env": "SIMPLY_CICD_ALM_PROJECT_KEY",
824
- "name": "alm-project-key",
825
- "summary": "Fallback project key(s) used to search commit messages for issue references, if none are configured in .sfdevrc.json. Only used by prefix-keyed trackers such as Jira.",
715
+ "ci-pipeline-source": {
716
+ "env": "SIMPLY_CICD_CI_PIPELINE_SOURCE",
717
+ "name": "ci-pipeline-source",
718
+ "summary": "Source trigger of the CI pipeline (e.g. merge_request_event). When set to merge_request_event, package creation is skipped.",
826
719
  "hasDynamicHelp": false,
827
720
  "multiple": false,
828
721
  "type": "option"
829
722
  },
830
- "alm-provider": {
831
- "env": "SIMPLY_CICD_ALM_PROVIDER",
832
- "name": "alm-provider",
833
- "summary": "The issue tracker whose reference format to look for in commit messages.",
834
- "default": "jira",
723
+ "ci-pipeline-url": {
724
+ "env": "SIMPLY_CICD_CI_PIPELINE_URL",
725
+ "name": "ci-pipeline-url",
726
+ "required": true,
727
+ "summary": "URL of the CI pipeline, used as the package version's description.",
835
728
  "hasDynamicHelp": false,
836
729
  "multiple": false,
837
- "options": [
838
- "gitlab-issues",
839
- "jira"
840
- ],
841
730
  "type": "option"
842
731
  },
843
- "prev-installed-package-version": {
844
- "name": "prev-installed-package-version",
845
- "summary": "The previously installed package version. Only needed if re-running --after-script without having run --before-script first in the same job.",
732
+ "packaging-devhub": {
733
+ "env": "SIMPLY_CICD_PACKAGING_DEVHUB",
734
+ "name": "packaging-devhub",
735
+ "required": true,
736
+ "summary": "Alias of the Dev Hub used for packaging operations like package version creation. Must already be authenticated.",
846
737
  "hasDynamicHelp": false,
847
738
  "multiple": false,
848
739
  "type": "option"
849
740
  },
850
- "subscriber-package-version-id": {
851
- "name": "subscriber-package-version-id",
852
- "summary": "The subscriber package version ID (04t...) being deployed, used to resolve the target package version from the packaging DevHub.",
853
- "hasDynamicHelp": false,
854
- "multiple": false,
855
- "type": "option"
741
+ "always-create-package": {
742
+ "name": "always-create-package",
743
+ "summary": "Create a package version even when this isn't a release-branch build.",
744
+ "allowNo": false,
745
+ "type": "boolean"
856
746
  },
857
- "target-package-version": {
858
- "name": "target-package-version",
859
- "summary": "The target package version. Only needed if re-running --after-script without having run --before-script first in the same job.",
747
+ "code-coverage-minimum": {
748
+ "name": "code-coverage-minimum",
749
+ "summary": "Minimum Apex code coverage percentage required for the new package version.",
750
+ "default": "75",
860
751
  "hasDynamicHelp": false,
861
752
  "multiple": false,
862
753
  "type": "option"
863
754
  },
864
- "teams-webhook-url": {
865
- "name": "teams-webhook-url",
866
- "summary": "One or more Teams webhook URLs to send the notification to.",
755
+ "package-release-branch-prefix": {
756
+ "name": "package-release-branch-prefix",
757
+ "summary": "Prefix identifying release branches. Determines whether this build creates a package version and how the resulting git tag is named.",
867
758
  "hasDynamicHelp": false,
868
- "multiple": true,
759
+ "multiple": false,
869
760
  "type": "option"
870
- },
871
- "debug": {
872
- "env": "SIMPLY_CICD_DEBUG",
873
- "name": "debug",
874
- "summary": "Enable verbose debug logging.",
875
- "allowNo": false,
876
- "type": "boolean"
877
761
  }
878
762
  },
879
763
  "hasDynamicHelp": false,
880
764
  "hiddenAliases": [],
881
- "id": "simply:cicd:notify:project",
765
+ "id": "simply:cicd:build:create-package-version",
882
766
  "pluginAlias": "@simplysf/simply-cicd",
883
767
  "pluginName": "@simplysf/simply-cicd",
884
768
  "pluginType": "core",
885
769
  "strict": true,
886
- "summary": "Send a project deployment notification to Microsoft Teams, with issue-tracker integration.",
770
+ "summary": "Create a new package version, verify minimum code coverage, and create/push a version-tracking git tag.",
887
771
  "enableJsonFlag": true,
888
772
  "isESM": true,
889
773
  "relativePath": [
@@ -891,43 +775,43 @@
891
775
  "commands",
892
776
  "simply",
893
777
  "cicd",
894
- "notify",
895
- "project.js"
778
+ "build",
779
+ "create-package-version.js"
896
780
  ],
897
781
  "aliasPermutations": [],
898
782
  "permutations": [
899
- "simply:cicd:notify:project",
900
- "cicd:simply:notify:project",
901
- "cicd:notify:simply:project",
902
- "cicd:notify:project:simply",
903
- "simply:notify:cicd:project",
904
- "notify:simply:cicd:project",
905
- "notify:cicd:simply:project",
906
- "notify:cicd:project:simply",
907
- "simply:notify:project:cicd",
908
- "notify:simply:project:cicd",
909
- "notify:project:simply:cicd",
910
- "notify:project:cicd:simply",
911
- "simply:cicd:project:notify",
912
- "cicd:simply:project:notify",
913
- "cicd:project:simply:notify",
914
- "cicd:project:notify:simply",
915
- "simply:project:cicd:notify",
916
- "project:simply:cicd:notify",
917
- "project:cicd:simply:notify",
918
- "project:cicd:notify:simply",
919
- "simply:project:notify:cicd",
920
- "project:simply:notify:cicd",
921
- "project:notify:simply:cicd",
922
- "project:notify:cicd:simply"
783
+ "simply:cicd:build:create-package-version",
784
+ "cicd:simply:build:create-package-version",
785
+ "cicd:build:simply:create-package-version",
786
+ "cicd:build:create-package-version:simply",
787
+ "simply:build:cicd:create-package-version",
788
+ "build:simply:cicd:create-package-version",
789
+ "build:cicd:simply:create-package-version",
790
+ "build:cicd:create-package-version:simply",
791
+ "simply:build:create-package-version:cicd",
792
+ "build:simply:create-package-version:cicd",
793
+ "build:create-package-version:simply:cicd",
794
+ "build:create-package-version:cicd:simply",
795
+ "simply:cicd:create-package-version:build",
796
+ "cicd:simply:create-package-version:build",
797
+ "cicd:create-package-version:simply:build",
798
+ "cicd:create-package-version:build:simply",
799
+ "simply:create-package-version:cicd:build",
800
+ "create-package-version:simply:cicd:build",
801
+ "create-package-version:cicd:simply:build",
802
+ "create-package-version:cicd:build:simply",
803
+ "simply:create-package-version:build:cicd",
804
+ "create-package-version:simply:build:cicd",
805
+ "create-package-version:build:simply:cicd",
806
+ "create-package-version:build:cicd:simply"
923
807
  ]
924
808
  },
925
- "simply:cicd:notify:teams": {
809
+ "simply:cicd:build:create-scratch": {
926
810
  "aliases": [],
927
811
  "args": {},
928
- "description": "Posts a payload as-is to one or more Microsoft Teams incoming webhook URLs. Use this for custom notifications that don't fit the built-in `notify project`, `notify happy-soup`, or `notify build` card templates.",
812
+ "description": "Reads the default package directory's `definitionFile` from `sfdx-project.json` (falling back to `--scratch-definition-file`), and attempts creation against each `--dev-hub` alias in order (each must already be authenticated). A Dev Hub that has hit its daily scratch org limit is skipped in favor of the next one. Writes the resulting org's auth fields to `SCRATCH_ORG_INFO.json` for later build steps, best-effort sets a default `CountryCode`, and assigns any permission sets/licenses declared under the default package directory's `packageMetadataAccess`.\n\nSkipped automatically when `PACKAGE_CHANGED=FALSE` is set in the environment (see `build determine-package-changes`).",
929
813
  "examples": [
930
- "<%= config.bin %> <%= command.id %> --payload '{\"text\":\"Deployment complete\"}' --webhook-url https://outlook.office.com/webhook/... --enabled"
814
+ "<%= config.bin %> <%= command.id %> --dev-hub my-devhub"
931
815
  ],
932
816
  "flags": {
933
817
  "json": {
@@ -945,46 +829,52 @@
945
829
  "multiple": false,
946
830
  "type": "option"
947
831
  },
948
- "payload": {
949
- "name": "payload",
950
- "required": true,
951
- "summary": "The JSON payload to send to Teams, as a serialized string.",
952
- "hasDynamicHelp": false,
953
- "multiple": false,
954
- "type": "option"
955
- },
956
- "webhook-url": {
957
- "env": "SIMPLY_CICD_WEBHOOK_URL",
958
- "name": "webhook-url",
832
+ "dev-hub": {
833
+ "name": "dev-hub",
959
834
  "required": true,
960
- "summary": "The Teams webhook URL to send the payload to.",
835
+ "summary": "Alias of a Dev Hub. Must already be authenticated. Repeat this flag for each Dev Hub to try, in order.",
961
836
  "hasDynamicHelp": false,
962
- "multiple": false,
837
+ "multiple": true,
963
838
  "type": "option"
964
839
  },
965
- "enabled": {
966
- "env": "SIMPLY_CICD_ENABLED",
967
- "name": "enabled",
968
- "summary": "Whether the notification is actually sent. Defaults to false so pipelines can gate this behind their own condition.",
969
- "allowNo": false,
970
- "type": "boolean"
971
- },
972
840
  "debug": {
973
841
  "env": "SIMPLY_CICD_DEBUG",
974
842
  "name": "debug",
975
843
  "summary": "Enable verbose debug logging.",
976
844
  "allowNo": false,
977
845
  "type": "boolean"
846
+ },
847
+ "disabled": {
848
+ "env": "SIMPLY_CICD_DISABLED",
849
+ "name": "disabled",
850
+ "summary": "Skip this job entirely, logging a warning instead of running it.",
851
+ "allowNo": false,
852
+ "type": "boolean"
853
+ },
854
+ "scratch-definition-file": {
855
+ "name": "scratch-definition-file",
856
+ "summary": "Definition file used to create the scratch org, if not specified in sfdx-project.json.",
857
+ "hasDynamicHelp": false,
858
+ "multiple": false,
859
+ "type": "option"
860
+ },
861
+ "scratch-duration-days": {
862
+ "name": "scratch-duration-days",
863
+ "summary": "Duration of the scratch org in days.",
864
+ "default": "1",
865
+ "hasDynamicHelp": false,
866
+ "multiple": false,
867
+ "type": "option"
978
868
  }
979
869
  },
980
870
  "hasDynamicHelp": false,
981
871
  "hiddenAliases": [],
982
- "id": "simply:cicd:notify:teams",
872
+ "id": "simply:cicd:build:create-scratch",
983
873
  "pluginAlias": "@simplysf/simply-cicd",
984
874
  "pluginName": "@simplysf/simply-cicd",
985
875
  "pluginType": "core",
986
876
  "strict": true,
987
- "summary": "Send a serialized JSON payload to a Microsoft Teams webhook.",
877
+ "summary": "Create a scratch org, trying each configured Dev Hub in order.",
988
878
  "enableJsonFlag": true,
989
879
  "isESM": true,
990
880
  "relativePath": [
@@ -992,41 +882,41 @@
992
882
  "commands",
993
883
  "simply",
994
884
  "cicd",
995
- "notify",
996
- "teams.js"
885
+ "build",
886
+ "create-scratch.js"
997
887
  ],
998
888
  "aliasPermutations": [],
999
889
  "permutations": [
1000
- "simply:cicd:notify:teams",
1001
- "cicd:simply:notify:teams",
1002
- "cicd:notify:simply:teams",
1003
- "cicd:notify:teams:simply",
1004
- "simply:notify:cicd:teams",
1005
- "notify:simply:cicd:teams",
1006
- "notify:cicd:simply:teams",
1007
- "notify:cicd:teams:simply",
1008
- "simply:notify:teams:cicd",
1009
- "notify:simply:teams:cicd",
1010
- "notify:teams:simply:cicd",
1011
- "notify:teams:cicd:simply",
1012
- "simply:cicd:teams:notify",
1013
- "cicd:simply:teams:notify",
1014
- "cicd:teams:simply:notify",
1015
- "cicd:teams:notify:simply",
1016
- "simply:teams:cicd:notify",
1017
- "teams:simply:cicd:notify",
1018
- "teams:cicd:simply:notify",
1019
- "teams:cicd:notify:simply",
1020
- "simply:teams:notify:cicd",
1021
- "teams:simply:notify:cicd",
1022
- "teams:notify:simply:cicd",
1023
- "teams:notify:cicd:simply"
890
+ "simply:cicd:build:create-scratch",
891
+ "cicd:simply:build:create-scratch",
892
+ "cicd:build:simply:create-scratch",
893
+ "cicd:build:create-scratch:simply",
894
+ "simply:build:cicd:create-scratch",
895
+ "build:simply:cicd:create-scratch",
896
+ "build:cicd:simply:create-scratch",
897
+ "build:cicd:create-scratch:simply",
898
+ "simply:build:create-scratch:cicd",
899
+ "build:simply:create-scratch:cicd",
900
+ "build:create-scratch:simply:cicd",
901
+ "build:create-scratch:cicd:simply",
902
+ "simply:cicd:create-scratch:build",
903
+ "cicd:simply:create-scratch:build",
904
+ "cicd:create-scratch:simply:build",
905
+ "cicd:create-scratch:build:simply",
906
+ "simply:create-scratch:cicd:build",
907
+ "create-scratch:simply:cicd:build",
908
+ "create-scratch:cicd:simply:build",
909
+ "create-scratch:cicd:build:simply",
910
+ "simply:create-scratch:build:cicd",
911
+ "create-scratch:simply:build:cicd",
912
+ "create-scratch:build:simply:cicd",
913
+ "create-scratch:build:cicd:simply"
1024
914
  ]
1025
915
  },
1026
- "simply:cicd:build:cleanup-scratch-orgs": {
916
+ "simply:cicd:build:delete-scratch": {
1027
917
  "aliases": [],
1028
918
  "args": {},
1029
- "description": "For each Dev Hub, queries `ActiveScratchOrg` records created more than 3 hours ago and bulk-deletes them. Useful for keeping a shared Dev Hub's scratch org allotment from being exhausted by abandoned CI runs. Every `--dev-hub` alias must already be authenticated.",
919
+ "description": "Reads `SCRATCH_ORG_INFO.json` (written by `build create-scratch`) to confirm `--dev-hub` is the Dev Hub that owns the scratch org, re-authenticates to it and the scratch org as needed, and deletes it. Deletion failures are logged rather than thrown, since a scratch org left behind after a failed deletion just needs manual cleanup and shouldn't fail an otherwise-successful pipeline run.\n\nSkipped automatically when `PACKAGE_CHANGED=FALSE` is set in the environment (see `build determine-package-changes`).",
1030
920
  "examples": [
1031
921
  "<%= config.bin %> <%= command.id %> --dev-hub my-devhub"
1032
922
  ],
@@ -1051,7 +941,15 @@
1051
941
  "required": true,
1052
942
  "summary": "Alias of a Dev Hub. Must already be authenticated. Repeat this flag for each Dev Hub to try, in order.",
1053
943
  "hasDynamicHelp": false,
1054
- "multiple": true,
944
+ "multiple": false,
945
+ "type": "option"
946
+ },
947
+ "jwt-key-file": {
948
+ "env": "SIMPLY_CICD_JWT_KEY_FILE",
949
+ "name": "jwt-key-file",
950
+ "summary": "Path to the JWT private key file used to re-authenticate the scratch org (or its Dev Hub) when it was JWT-authenticated. Not needed when the Dev Hub was authenticated via web login or an SFDX auth URL — the scratch org's own refresh token is used instead.",
951
+ "hasDynamicHelp": false,
952
+ "multiple": false,
1055
953
  "type": "option"
1056
954
  },
1057
955
  "debug": {
@@ -1071,12 +969,12 @@
1071
969
  },
1072
970
  "hasDynamicHelp": false,
1073
971
  "hiddenAliases": [],
1074
- "id": "simply:cicd:build:cleanup-scratch-orgs",
972
+ "id": "simply:cicd:build:delete-scratch",
1075
973
  "pluginAlias": "@simplysf/simply-cicd",
1076
974
  "pluginName": "@simplysf/simply-cicd",
1077
975
  "pluginType": "core",
1078
976
  "strict": true,
1079
- "summary": "Delete scratch orgs older than 3 hours from every configured Dev Hub.",
977
+ "summary": "Delete the scratch org created by `build create-scratch`.",
1080
978
  "enableJsonFlag": true,
1081
979
  "isESM": true,
1082
980
  "relativePath": [
@@ -1085,42 +983,42 @@
1085
983
  "simply",
1086
984
  "cicd",
1087
985
  "build",
1088
- "cleanup-scratch-orgs.js"
986
+ "delete-scratch.js"
1089
987
  ],
1090
988
  "aliasPermutations": [],
1091
989
  "permutations": [
1092
- "simply:cicd:build:cleanup-scratch-orgs",
1093
- "cicd:simply:build:cleanup-scratch-orgs",
1094
- "cicd:build:simply:cleanup-scratch-orgs",
1095
- "cicd:build:cleanup-scratch-orgs:simply",
1096
- "simply:build:cicd:cleanup-scratch-orgs",
1097
- "build:simply:cicd:cleanup-scratch-orgs",
1098
- "build:cicd:simply:cleanup-scratch-orgs",
1099
- "build:cicd:cleanup-scratch-orgs:simply",
1100
- "simply:build:cleanup-scratch-orgs:cicd",
1101
- "build:simply:cleanup-scratch-orgs:cicd",
1102
- "build:cleanup-scratch-orgs:simply:cicd",
1103
- "build:cleanup-scratch-orgs:cicd:simply",
1104
- "simply:cicd:cleanup-scratch-orgs:build",
1105
- "cicd:simply:cleanup-scratch-orgs:build",
1106
- "cicd:cleanup-scratch-orgs:simply:build",
1107
- "cicd:cleanup-scratch-orgs:build:simply",
1108
- "simply:cleanup-scratch-orgs:cicd:build",
1109
- "cleanup-scratch-orgs:simply:cicd:build",
1110
- "cleanup-scratch-orgs:cicd:simply:build",
1111
- "cleanup-scratch-orgs:cicd:build:simply",
1112
- "simply:cleanup-scratch-orgs:build:cicd",
1113
- "cleanup-scratch-orgs:simply:build:cicd",
1114
- "cleanup-scratch-orgs:build:simply:cicd",
1115
- "cleanup-scratch-orgs:build:cicd:simply"
990
+ "simply:cicd:build:delete-scratch",
991
+ "cicd:simply:build:delete-scratch",
992
+ "cicd:build:simply:delete-scratch",
993
+ "cicd:build:delete-scratch:simply",
994
+ "simply:build:cicd:delete-scratch",
995
+ "build:simply:cicd:delete-scratch",
996
+ "build:cicd:simply:delete-scratch",
997
+ "build:cicd:delete-scratch:simply",
998
+ "simply:build:delete-scratch:cicd",
999
+ "build:simply:delete-scratch:cicd",
1000
+ "build:delete-scratch:simply:cicd",
1001
+ "build:delete-scratch:cicd:simply",
1002
+ "simply:cicd:delete-scratch:build",
1003
+ "cicd:simply:delete-scratch:build",
1004
+ "cicd:delete-scratch:simply:build",
1005
+ "cicd:delete-scratch:build:simply",
1006
+ "simply:delete-scratch:cicd:build",
1007
+ "delete-scratch:simply:cicd:build",
1008
+ "delete-scratch:cicd:simply:build",
1009
+ "delete-scratch:cicd:build:simply",
1010
+ "simply:delete-scratch:build:cicd",
1011
+ "delete-scratch:simply:build:cicd",
1012
+ "delete-scratch:build:simply:cicd",
1013
+ "delete-scratch:build:cicd:simply"
1116
1014
  ]
1117
1015
  },
1118
- "simply:cicd:build:create-fallback-tag": {
1016
+ "simply:cicd:build:determine-package-changes": {
1119
1017
  "aliases": [],
1120
1018
  "args": {},
1121
- "description": "Resolves the last tag to increment (either `--last-tag`, or the closest reachable tag matching the project's version prefix), extracts its annotated `04t` package version ID, and creates/pushes a new tag with an incremented numeric suffix (e.g. `v1.2.3.4` -> `v1.2.3.4-1` -> `v1.2.3.4-2`) annotated with that same package ID. Tags are matched and parsed in `SIMPLY_CICD_VERSION_TAG_FORMAT` or the project's `plugins.simply.versionTagFormat`, so only a counter after the formatted version is incremented — with `v{MAJOR}.{MINOR}.{PATCH}-{BUILD}`, `v1.2.3-4` becomes `v1.2.3-4-1`, never `v1.2.3-5`. Soft no-ops (does not error) when no last tag, or no valid package ID within it, can be found — a build with nothing to fall back to just has nothing to do here.\n\nAlso soft no-ops when HEAD already carries a tag matching the version prefix, e.g. because `build create-package-version` just created and tagged a real package version earlier in the same job. This also keeps a retried job from adding a second fallback tag to the same commit.\n\nSkipped automatically when `PACKAGE_CHANGED=TRUE` is set in the environment (see `build determine-package-changes`) — a real package version will be created instead.",
1019
+ "description": "Reads the default package directory from `sfdx-project.json`, finds the closest reachable git tag for its `major.minor.patch` (in `SIMPLY_CICD_VERSION_TAG_FORMAT` or the project's `plugins.simply.versionTagFormat`, `v<major>.<minor>.<patch>.*` by default), and diffs that tag against `HEAD` for the package directory and `sfdx-project.json` itself. Writes `PACKAGE_CHANGED=TRUE|FALSE` and `LAST_TAG=<tag>` to the output file. Any failure during detection (missing/invalid sfdx-project.json, git errors) defaults to `PACKAGE_CHANGED=TRUE`, so a build never silently skips work it should have done.",
1122
1020
  "examples": [
1123
- "<%= config.bin %> <%= command.id %> --ci-commit-ref-name main --ci-project-path group/project --project-access-token glpat-... --ci-pipeline-id 123"
1021
+ "<%= config.bin %> <%= command.id %> --out changes.env"
1124
1022
  ],
1125
1023
  "flags": {
1126
1024
  "json": {
@@ -1138,63 +1036,6 @@
1138
1036
  "multiple": false,
1139
1037
  "type": "option"
1140
1038
  },
1141
- "ci-commit-ref-name": {
1142
- "env": "SIMPLY_CICD_CI_COMMIT_REF_NAME",
1143
- "name": "ci-commit-ref-name",
1144
- "required": true,
1145
- "summary": "Git branch or ref name being built.",
1146
- "hasDynamicHelp": false,
1147
- "multiple": false,
1148
- "type": "option"
1149
- },
1150
- "ci-pipeline-id": {
1151
- "env": "SIMPLY_CICD_CI_PIPELINE_ID",
1152
- "name": "ci-pipeline-id",
1153
- "required": true,
1154
- "summary": "CI pipeline ID, used to name the temporary authenticated git remote.",
1155
- "hasDynamicHelp": false,
1156
- "multiple": false,
1157
- "type": "option"
1158
- },
1159
- "ci-project-path": {
1160
- "env": "SIMPLY_CICD_CI_PROJECT_PATH",
1161
- "name": "ci-project-path",
1162
- "required": true,
1163
- "summary": "CI project's git path (e.g. group/project), used to build the authenticated git remote URL.",
1164
- "hasDynamicHelp": false,
1165
- "multiple": false,
1166
- "type": "option"
1167
- },
1168
- "project-access-token": {
1169
- "env": "SIMPLY_CICD_PROJECT_ACCESS_TOKEN",
1170
- "name": "project-access-token",
1171
- "required": true,
1172
- "summary": "Access token used to authenticate git remote operations (tagging, pushing).",
1173
- "hasDynamicHelp": false,
1174
- "multiple": false,
1175
- "type": "option"
1176
- },
1177
- "vcs-host": {
1178
- "env": "SIMPLY_CICD_VCS_HOST",
1179
- "name": "vcs-host",
1180
- "summary": "Hostname of the VCS instance hosting this project.",
1181
- "hasDynamicHelp": false,
1182
- "multiple": false,
1183
- "type": "option"
1184
- },
1185
- "vcs-provider": {
1186
- "env": "SIMPLY_CICD_VCS_PROVIDER",
1187
- "name": "vcs-provider",
1188
- "summary": "The VCS platform hosting this project.",
1189
- "default": "gitlab",
1190
- "hasDynamicHelp": false,
1191
- "multiple": false,
1192
- "options": [
1193
- "github",
1194
- "gitlab"
1195
- ],
1196
- "type": "option"
1197
- },
1198
1039
  "debug": {
1199
1040
  "env": "SIMPLY_CICD_DEBUG",
1200
1041
  "name": "debug",
@@ -1209,17 +1050,10 @@
1209
1050
  "allowNo": false,
1210
1051
  "type": "boolean"
1211
1052
  },
1212
- "last-tag": {
1213
- "name": "last-tag",
1214
- "summary": "Manually specify the last tag to increment, instead of resolving it from git.",
1215
- "hasDynamicHelp": false,
1216
- "multiple": false,
1217
- "type": "option"
1218
- },
1219
1053
  "out": {
1220
1054
  "name": "out",
1221
1055
  "summary": "Output dotenv file path.",
1222
- "default": "subscriberPackageVersionId.env",
1056
+ "default": "changes.env",
1223
1057
  "hasDynamicHelp": false,
1224
1058
  "multiple": false,
1225
1059
  "type": "option"
@@ -1227,12 +1061,12 @@
1227
1061
  },
1228
1062
  "hasDynamicHelp": false,
1229
1063
  "hiddenAliases": [],
1230
- "id": "simply:cicd:build:create-fallback-tag",
1064
+ "id": "simply:cicd:build:determine-package-changes",
1231
1065
  "pluginAlias": "@simplysf/simply-cicd",
1232
1066
  "pluginName": "@simplysf/simply-cicd",
1233
1067
  "pluginType": "core",
1234
1068
  "strict": true,
1235
- "summary": "Create a fallback git tag carrying forward the previous package version's ID, for builds that didn't produce a new package version.",
1069
+ "summary": "Determine if any package-relevant files have changed since the last release tag.",
1236
1070
  "enableJsonFlag": true,
1237
1071
  "isESM": true,
1238
1072
  "relativePath": [
@@ -1241,42 +1075,43 @@
1241
1075
  "simply",
1242
1076
  "cicd",
1243
1077
  "build",
1244
- "create-fallback-tag.js"
1078
+ "determine-package-changes.js"
1245
1079
  ],
1246
1080
  "aliasPermutations": [],
1247
1081
  "permutations": [
1248
- "simply:cicd:build:create-fallback-tag",
1249
- "cicd:simply:build:create-fallback-tag",
1250
- "cicd:build:simply:create-fallback-tag",
1251
- "cicd:build:create-fallback-tag:simply",
1252
- "simply:build:cicd:create-fallback-tag",
1253
- "build:simply:cicd:create-fallback-tag",
1254
- "build:cicd:simply:create-fallback-tag",
1255
- "build:cicd:create-fallback-tag:simply",
1256
- "simply:build:create-fallback-tag:cicd",
1257
- "build:simply:create-fallback-tag:cicd",
1258
- "build:create-fallback-tag:simply:cicd",
1259
- "build:create-fallback-tag:cicd:simply",
1260
- "simply:cicd:create-fallback-tag:build",
1261
- "cicd:simply:create-fallback-tag:build",
1262
- "cicd:create-fallback-tag:simply:build",
1263
- "cicd:create-fallback-tag:build:simply",
1264
- "simply:create-fallback-tag:cicd:build",
1265
- "create-fallback-tag:simply:cicd:build",
1266
- "create-fallback-tag:cicd:simply:build",
1267
- "create-fallback-tag:cicd:build:simply",
1268
- "simply:create-fallback-tag:build:cicd",
1269
- "create-fallback-tag:simply:build:cicd",
1270
- "create-fallback-tag:build:simply:cicd",
1271
- "create-fallback-tag:build:cicd:simply"
1082
+ "simply:cicd:build:determine-package-changes",
1083
+ "cicd:simply:build:determine-package-changes",
1084
+ "cicd:build:simply:determine-package-changes",
1085
+ "cicd:build:determine-package-changes:simply",
1086
+ "simply:build:cicd:determine-package-changes",
1087
+ "build:simply:cicd:determine-package-changes",
1088
+ "build:cicd:simply:determine-package-changes",
1089
+ "build:cicd:determine-package-changes:simply",
1090
+ "simply:build:determine-package-changes:cicd",
1091
+ "build:simply:determine-package-changes:cicd",
1092
+ "build:determine-package-changes:simply:cicd",
1093
+ "build:determine-package-changes:cicd:simply",
1094
+ "simply:cicd:determine-package-changes:build",
1095
+ "cicd:simply:determine-package-changes:build",
1096
+ "cicd:determine-package-changes:simply:build",
1097
+ "cicd:determine-package-changes:build:simply",
1098
+ "simply:determine-package-changes:cicd:build",
1099
+ "determine-package-changes:simply:cicd:build",
1100
+ "determine-package-changes:cicd:simply:build",
1101
+ "determine-package-changes:cicd:build:simply",
1102
+ "simply:determine-package-changes:build:cicd",
1103
+ "determine-package-changes:simply:build:cicd",
1104
+ "determine-package-changes:build:simply:cicd",
1105
+ "determine-package-changes:build:cicd:simply"
1272
1106
  ]
1273
1107
  },
1274
- "simply:cicd:build:create-package-version": {
1108
+ "simply:cicd:build:generate-flexipage-diff": {
1275
1109
  "aliases": [],
1276
1110
  "args": {},
1277
- "description": "Skips entirely (without error) when the pipeline was triggered by a merge request, or when this isn't a release-branch build and `--always-create-package` wasn't passed. Otherwise, creates a new version of the default package directory's package, polls until creation finishes, verifies the resulting version's Apex code coverage meets `--code-coverage-minimum` (or the project's own `plugins.simply.coverageRequirement.minimumCoverageRequired`, if declared in `sfdx-project.json`), and creates/pushes a git tag annotated with the new package version's `04t` ID.\n\nThe tag is `v<major>.<minor>.<patch>.<build>` by default. A project can choose its own shape with a `plugins.simply.versionTagFormat` template in `sfdx-project.json`, or the `SIMPLY_CICD_VERSION_TAG_FORMAT` environment variable (which overrides it) — e.g. `{MAJOR}.{MINOR}.{PATCH}+{BUILD}` tags `1.2.3.4` as `1.2.3+4`. Each of `{MAJOR}`, `{MINOR}`, `{PATCH}`, and `{BUILD}` must appear exactly once, and the format is validated before any package version is created. Unless this is a release-branch build, the package directory's `branch` attribute or the CI ref is appended as `-<suffix>` after the formatted version.\n\nSkipped automatically when `PACKAGE_CHANGED=FALSE` is set in the environment (see `build determine-package-changes`).",
1111
+ "description": "Runs the upstream `flexipage-delta` binary to diff `**/*.flexipage-meta.xml` files between `--from` and `--to`, then the reporter binary for the platform `--vcs-provider` selects — `flexipage-delta-gitlab` or `flexipage-delta-github` — to post the results back to the merge or pull request. Failures are logged, not thrown — a diff-posting step shouldn't fail the build.",
1278
1112
  "examples": [
1279
- "<%= config.bin %> <%= command.id %> --ci-commit-ref-name main --ci-commit-sha a1b2c3d --ci-pipeline-id 123 --ci-pipeline-url https://gitlab.example.com/pipelines/123 --ci-project-path group/project --project-access-token glpat-... --packaging-devhub my-packaging-devhub"
1113
+ "<%= config.bin %> <%= command.id %> --ci-project-id 123 --ci-merge-request-iid 45 --from abc123 --to def456 --project-access-token glpat-...",
1114
+ "<%= config.bin %> <%= command.id %> --vcs-provider github --ci-repository my-org/my-repo --ci-pull-request-number 45 --ci-run-id 987 --from abc123 --to def456 --project-access-token ghp-..."
1280
1115
  ],
1281
1116
  "flags": {
1282
1117
  "json": {
@@ -1294,142 +1129,138 @@
1294
1129
  "multiple": false,
1295
1130
  "type": "option"
1296
1131
  },
1297
- "ci-commit-ref-name": {
1298
- "env": "SIMPLY_CICD_CI_COMMIT_REF_NAME",
1299
- "name": "ci-commit-ref-name",
1300
- "required": true,
1301
- "summary": "Git branch or ref name being built.",
1132
+ "vcs-host": {
1133
+ "env": "SIMPLY_CICD_VCS_HOST",
1134
+ "name": "vcs-host",
1135
+ "summary": "Hostname of the VCS instance hosting this project.",
1302
1136
  "hasDynamicHelp": false,
1303
1137
  "multiple": false,
1304
1138
  "type": "option"
1305
1139
  },
1306
- "ci-pipeline-id": {
1307
- "env": "SIMPLY_CICD_CI_PIPELINE_ID",
1308
- "name": "ci-pipeline-id",
1309
- "required": true,
1310
- "summary": "CI pipeline ID, used to name the temporary authenticated git remote.",
1140
+ "vcs-provider": {
1141
+ "env": "SIMPLY_CICD_VCS_PROVIDER",
1142
+ "name": "vcs-provider",
1143
+ "summary": "The VCS platform hosting this project.",
1144
+ "default": "gitlab",
1311
1145
  "hasDynamicHelp": false,
1312
1146
  "multiple": false,
1147
+ "options": [
1148
+ "github",
1149
+ "gitlab"
1150
+ ],
1313
1151
  "type": "option"
1314
1152
  },
1315
- "ci-project-path": {
1316
- "env": "SIMPLY_CICD_CI_PROJECT_PATH",
1317
- "name": "ci-project-path",
1318
- "required": true,
1319
- "summary": "CI project's git path (e.g. group/project), used to build the authenticated git remote URL.",
1320
- "hasDynamicHelp": false,
1321
- "multiple": false,
1153
+ "ci-project-id": {
1154
+ "env": "SIMPLY_CICD_CI_PROJECT_ID",
1155
+ "name": "ci-project-id",
1156
+ "summary": "GitLab only: numeric CI project ID of the project to post the diff to.",
1157
+ "hasDynamicHelp": false,
1158
+ "multiple": false,
1322
1159
  "type": "option"
1323
1160
  },
1324
- "project-access-token": {
1325
- "env": "SIMPLY_CICD_PROJECT_ACCESS_TOKEN",
1326
- "name": "project-access-token",
1327
- "required": true,
1328
- "summary": "Access token used to authenticate git remote operations (tagging, pushing).",
1161
+ "ci-merge-request-iid": {
1162
+ "env": "SIMPLY_CICD_CI_MERGE_REQUEST_IID",
1163
+ "name": "ci-merge-request-iid",
1164
+ "summary": "GitLab only: internal ID of the merge request to post the diff to.",
1329
1165
  "hasDynamicHelp": false,
1330
1166
  "multiple": false,
1331
1167
  "type": "option"
1332
1168
  },
1333
- "vcs-host": {
1334
- "env": "SIMPLY_CICD_VCS_HOST",
1335
- "name": "vcs-host",
1336
- "summary": "Hostname of the VCS instance hosting this project.",
1169
+ "ci-repository": {
1170
+ "env": "SIMPLY_CICD_CI_REPOSITORY",
1171
+ "name": "ci-repository",
1172
+ "summary": "GitHub only: repository to post the diff to, as owner/repo.",
1337
1173
  "hasDynamicHelp": false,
1338
1174
  "multiple": false,
1339
1175
  "type": "option"
1340
1176
  },
1341
- "vcs-provider": {
1342
- "env": "SIMPLY_CICD_VCS_PROVIDER",
1343
- "name": "vcs-provider",
1344
- "summary": "The VCS platform hosting this project.",
1345
- "default": "gitlab",
1177
+ "ci-pull-request-number": {
1178
+ "env": "SIMPLY_CICD_CI_PULL_REQUEST_NUMBER",
1179
+ "name": "ci-pull-request-number",
1180
+ "summary": "GitHub only: number of the pull request to post the diff to.",
1346
1181
  "hasDynamicHelp": false,
1347
1182
  "multiple": false,
1348
- "options": [
1349
- "github",
1350
- "gitlab"
1351
- ],
1352
1183
  "type": "option"
1353
1184
  },
1354
- "debug": {
1355
- "env": "SIMPLY_CICD_DEBUG",
1356
- "name": "debug",
1357
- "summary": "Enable verbose debug logging.",
1358
- "allowNo": false,
1359
- "type": "boolean"
1185
+ "ci-run-id": {
1186
+ "env": "SIMPLY_CICD_CI_RUN_ID",
1187
+ "name": "ci-run-id",
1188
+ "summary": "GitHub only: Actions run ID, used to build links back to the run's artifacts.",
1189
+ "hasDynamicHelp": false,
1190
+ "multiple": false,
1191
+ "type": "option"
1360
1192
  },
1361
- "disabled": {
1362
- "env": "SIMPLY_CICD_DISABLED",
1363
- "name": "disabled",
1364
- "summary": "Skip this job entirely, logging a warning instead of running it.",
1365
- "allowNo": false,
1366
- "type": "boolean"
1193
+ "ci-server-url": {
1194
+ "env": "SIMPLY_CICD_CI_SERVER_URL",
1195
+ "name": "ci-server-url",
1196
+ "summary": "GitHub only: server URL, for instances other than github.com.",
1197
+ "hasDynamicHelp": false,
1198
+ "multiple": false,
1199
+ "type": "option"
1367
1200
  },
1368
1201
  "ci-commit-sha": {
1369
1202
  "env": "SIMPLY_CICD_CI_COMMIT_SHA",
1370
1203
  "name": "ci-commit-sha",
1371
- "required": true,
1372
- "summary": "Commit SHA to tag as the package version's source.",
1204
+ "summary": "Commit SHA to attribute the posted diff to.",
1373
1205
  "hasDynamicHelp": false,
1374
1206
  "multiple": false,
1375
1207
  "type": "option"
1376
1208
  },
1377
- "ci-pipeline-source": {
1378
- "env": "SIMPLY_CICD_CI_PIPELINE_SOURCE",
1379
- "name": "ci-pipeline-source",
1380
- "summary": "Source trigger of the CI pipeline (e.g. merge_request_event). When set to merge_request_event, package creation is skipped.",
1209
+ "from": {
1210
+ "name": "from",
1211
+ "required": true,
1212
+ "summary": "Base commit SHA to diff from.",
1381
1213
  "hasDynamicHelp": false,
1382
1214
  "multiple": false,
1383
1215
  "type": "option"
1384
1216
  },
1385
- "ci-pipeline-url": {
1386
- "env": "SIMPLY_CICD_CI_PIPELINE_URL",
1387
- "name": "ci-pipeline-url",
1217
+ "to": {
1218
+ "name": "to",
1388
1219
  "required": true,
1389
- "summary": "URL of the CI pipeline, used as the package version's description.",
1220
+ "summary": "Head commit SHA to diff to.",
1390
1221
  "hasDynamicHelp": false,
1391
1222
  "multiple": false,
1392
1223
  "type": "option"
1393
1224
  },
1394
- "packaging-devhub": {
1395
- "env": "SIMPLY_CICD_PACKAGING_DEVHUB",
1396
- "name": "packaging-devhub",
1225
+ "project-access-token": {
1226
+ "env": "SIMPLY_CICD_PROJECT_ACCESS_TOKEN",
1227
+ "name": "project-access-token",
1397
1228
  "required": true,
1398
- "summary": "Alias of the Dev Hub used for packaging operations like package version creation. Must already be authenticated.",
1229
+ "summary": "Project access token used to post the diff results back to the merge request.",
1399
1230
  "hasDynamicHelp": false,
1400
1231
  "multiple": false,
1401
1232
  "type": "option"
1402
1233
  },
1403
- "always-create-package": {
1404
- "name": "always-create-package",
1405
- "summary": "Create a package version even when this isn't a release-branch build.",
1406
- "allowNo": false,
1407
- "type": "boolean"
1408
- },
1409
- "code-coverage-minimum": {
1410
- "name": "code-coverage-minimum",
1411
- "summary": "Minimum Apex code coverage percentage required for the new package version.",
1412
- "default": "75",
1234
+ "out": {
1235
+ "name": "out",
1236
+ "summary": "Output directory or file path for the delta results.",
1413
1237
  "hasDynamicHelp": false,
1414
1238
  "multiple": false,
1415
1239
  "type": "option"
1416
1240
  },
1417
- "package-release-branch-prefix": {
1418
- "name": "package-release-branch-prefix",
1419
- "summary": "Prefix identifying release branches. Determines whether this build creates a package version and how the resulting git tag is named.",
1420
- "hasDynamicHelp": false,
1421
- "multiple": false,
1422
- "type": "option"
1241
+ "debug": {
1242
+ "env": "SIMPLY_CICD_DEBUG",
1243
+ "name": "debug",
1244
+ "summary": "Enable verbose debug logging.",
1245
+ "allowNo": false,
1246
+ "type": "boolean"
1247
+ },
1248
+ "disabled": {
1249
+ "env": "SIMPLY_CICD_DISABLED",
1250
+ "name": "disabled",
1251
+ "summary": "Skip this job entirely, logging a warning instead of running it.",
1252
+ "allowNo": false,
1253
+ "type": "boolean"
1423
1254
  }
1424
1255
  },
1425
1256
  "hasDynamicHelp": false,
1426
1257
  "hiddenAliases": [],
1427
- "id": "simply:cicd:build:create-package-version",
1258
+ "id": "simply:cicd:build:generate-flexipage-diff",
1428
1259
  "pluginAlias": "@simplysf/simply-cicd",
1429
1260
  "pluginName": "@simplysf/simply-cicd",
1430
1261
  "pluginType": "core",
1431
1262
  "strict": true,
1432
- "summary": "Create a new package version, verify minimum code coverage, and create/push a version-tracking git tag.",
1263
+ "summary": "Generate a Flexipage delta between two commits and post the results to the change request.",
1433
1264
  "enableJsonFlag": true,
1434
1265
  "isESM": true,
1435
1266
  "relativePath": [
@@ -1438,42 +1269,43 @@
1438
1269
  "simply",
1439
1270
  "cicd",
1440
1271
  "build",
1441
- "create-package-version.js"
1272
+ "generate-flexipage-diff.js"
1442
1273
  ],
1443
1274
  "aliasPermutations": [],
1444
1275
  "permutations": [
1445
- "simply:cicd:build:create-package-version",
1446
- "cicd:simply:build:create-package-version",
1447
- "cicd:build:simply:create-package-version",
1448
- "cicd:build:create-package-version:simply",
1449
- "simply:build:cicd:create-package-version",
1450
- "build:simply:cicd:create-package-version",
1451
- "build:cicd:simply:create-package-version",
1452
- "build:cicd:create-package-version:simply",
1453
- "simply:build:create-package-version:cicd",
1454
- "build:simply:create-package-version:cicd",
1455
- "build:create-package-version:simply:cicd",
1456
- "build:create-package-version:cicd:simply",
1457
- "simply:cicd:create-package-version:build",
1458
- "cicd:simply:create-package-version:build",
1459
- "cicd:create-package-version:simply:build",
1460
- "cicd:create-package-version:build:simply",
1461
- "simply:create-package-version:cicd:build",
1462
- "create-package-version:simply:cicd:build",
1463
- "create-package-version:cicd:simply:build",
1464
- "create-package-version:cicd:build:simply",
1465
- "simply:create-package-version:build:cicd",
1466
- "create-package-version:simply:build:cicd",
1467
- "create-package-version:build:simply:cicd",
1468
- "create-package-version:build:cicd:simply"
1276
+ "simply:cicd:build:generate-flexipage-diff",
1277
+ "cicd:simply:build:generate-flexipage-diff",
1278
+ "cicd:build:simply:generate-flexipage-diff",
1279
+ "cicd:build:generate-flexipage-diff:simply",
1280
+ "simply:build:cicd:generate-flexipage-diff",
1281
+ "build:simply:cicd:generate-flexipage-diff",
1282
+ "build:cicd:simply:generate-flexipage-diff",
1283
+ "build:cicd:generate-flexipage-diff:simply",
1284
+ "simply:build:generate-flexipage-diff:cicd",
1285
+ "build:simply:generate-flexipage-diff:cicd",
1286
+ "build:generate-flexipage-diff:simply:cicd",
1287
+ "build:generate-flexipage-diff:cicd:simply",
1288
+ "simply:cicd:generate-flexipage-diff:build",
1289
+ "cicd:simply:generate-flexipage-diff:build",
1290
+ "cicd:generate-flexipage-diff:simply:build",
1291
+ "cicd:generate-flexipage-diff:build:simply",
1292
+ "simply:generate-flexipage-diff:cicd:build",
1293
+ "generate-flexipage-diff:simply:cicd:build",
1294
+ "generate-flexipage-diff:cicd:simply:build",
1295
+ "generate-flexipage-diff:cicd:build:simply",
1296
+ "simply:generate-flexipage-diff:build:cicd",
1297
+ "generate-flexipage-diff:simply:build:cicd",
1298
+ "generate-flexipage-diff:build:simply:cicd",
1299
+ "generate-flexipage-diff:build:cicd:simply"
1469
1300
  ]
1470
1301
  },
1471
- "simply:cicd:build:create-scratch": {
1302
+ "simply:cicd:build:generate-flow-diff": {
1472
1303
  "aliases": [],
1473
1304
  "args": {},
1474
- "description": "Reads the default package directory's `definitionFile` from `sfdx-project.json` (falling back to `--scratch-definition-file`), and attempts creation against each `--dev-hub` alias in order (each must already be authenticated). A Dev Hub that has hit its daily scratch org limit is skipped in favor of the next one. Writes the resulting org's auth fields to `SCRATCH_ORG_INFO.json` for later build steps, best-effort sets a default `CountryCode`, and assigns any permission sets/licenses declared under the default package directory's `packageMetadataAccess`.\n\nSkipped automatically when `PACKAGE_CHANGED=FALSE` is set in the environment (see `build determine-package-changes`).",
1305
+ "description": "Runs the upstream `flow-delta` binary to diff `**/*.flow-meta.xml` files between `--from` and `--to`, then the reporter binary for the platform `--vcs-provider` selects — `flow-delta-gitlab` or `flow-delta-github` — to post the results back to the merge or pull request. Failures are logged, not thrown — a diff-posting step shouldn't fail the build.",
1475
1306
  "examples": [
1476
- "<%= config.bin %> <%= command.id %> --dev-hub my-devhub"
1307
+ "<%= config.bin %> <%= command.id %> --ci-project-id 123 --ci-merge-request-iid 45 --from abc123 --to def456 --project-access-token glpat-...",
1308
+ "<%= config.bin %> <%= command.id %> --vcs-provider github --ci-repository my-org/my-repo --ci-pull-request-number 45 --ci-run-id 987 --from abc123 --to def456 --project-access-token ghp-..."
1477
1309
  ],
1478
1310
  "flags": {
1479
1311
  "json": {
@@ -1491,96 +1323,182 @@
1491
1323
  "multiple": false,
1492
1324
  "type": "option"
1493
1325
  },
1494
- "dev-hub": {
1495
- "name": "dev-hub",
1496
- "required": true,
1497
- "summary": "Alias of a Dev Hub. Must already be authenticated. Repeat this flag for each Dev Hub to try, in order.",
1326
+ "vcs-host": {
1327
+ "env": "SIMPLY_CICD_VCS_HOST",
1328
+ "name": "vcs-host",
1329
+ "summary": "Hostname of the VCS instance hosting this project.",
1498
1330
  "hasDynamicHelp": false,
1499
- "multiple": true,
1331
+ "multiple": false,
1500
1332
  "type": "option"
1501
1333
  },
1502
- "debug": {
1503
- "env": "SIMPLY_CICD_DEBUG",
1504
- "name": "debug",
1505
- "summary": "Enable verbose debug logging.",
1506
- "allowNo": false,
1507
- "type": "boolean"
1334
+ "vcs-provider": {
1335
+ "env": "SIMPLY_CICD_VCS_PROVIDER",
1336
+ "name": "vcs-provider",
1337
+ "summary": "The VCS platform hosting this project.",
1338
+ "default": "gitlab",
1339
+ "hasDynamicHelp": false,
1340
+ "multiple": false,
1341
+ "options": [
1342
+ "github",
1343
+ "gitlab"
1344
+ ],
1345
+ "type": "option"
1508
1346
  },
1509
- "disabled": {
1510
- "env": "SIMPLY_CICD_DISABLED",
1511
- "name": "disabled",
1512
- "summary": "Skip this job entirely, logging a warning instead of running it.",
1513
- "allowNo": false,
1514
- "type": "boolean"
1347
+ "ci-project-id": {
1348
+ "env": "SIMPLY_CICD_CI_PROJECT_ID",
1349
+ "name": "ci-project-id",
1350
+ "summary": "GitLab only: numeric CI project ID of the project to post the diff to.",
1351
+ "hasDynamicHelp": false,
1352
+ "multiple": false,
1353
+ "type": "option"
1515
1354
  },
1516
- "scratch-definition-file": {
1517
- "name": "scratch-definition-file",
1518
- "summary": "Definition file used to create the scratch org, if not specified in sfdx-project.json.",
1355
+ "ci-merge-request-iid": {
1356
+ "env": "SIMPLY_CICD_CI_MERGE_REQUEST_IID",
1357
+ "name": "ci-merge-request-iid",
1358
+ "summary": "GitLab only: internal ID of the merge request to post the diff to.",
1519
1359
  "hasDynamicHelp": false,
1520
1360
  "multiple": false,
1521
1361
  "type": "option"
1522
1362
  },
1523
- "scratch-duration-days": {
1524
- "name": "scratch-duration-days",
1525
- "summary": "Duration of the scratch org in days.",
1526
- "default": "1",
1363
+ "ci-repository": {
1364
+ "env": "SIMPLY_CICD_CI_REPOSITORY",
1365
+ "name": "ci-repository",
1366
+ "summary": "GitHub only: repository to post the diff to, as owner/repo.",
1527
1367
  "hasDynamicHelp": false,
1528
1368
  "multiple": false,
1529
1369
  "type": "option"
1530
- }
1531
- },
1532
- "hasDynamicHelp": false,
1533
- "hiddenAliases": [],
1534
- "id": "simply:cicd:build:create-scratch",
1535
- "pluginAlias": "@simplysf/simply-cicd",
1536
- "pluginName": "@simplysf/simply-cicd",
1537
- "pluginType": "core",
1538
- "strict": true,
1539
- "summary": "Create a scratch org, trying each configured Dev Hub in order.",
1540
- "enableJsonFlag": true,
1541
- "isESM": true,
1542
- "relativePath": [
1543
- "lib",
1544
- "commands",
1545
- "simply",
1546
- "cicd",
1547
- "build",
1548
- "create-scratch.js"
1370
+ },
1371
+ "ci-pull-request-number": {
1372
+ "env": "SIMPLY_CICD_CI_PULL_REQUEST_NUMBER",
1373
+ "name": "ci-pull-request-number",
1374
+ "summary": "GitHub only: number of the pull request to post the diff to.",
1375
+ "hasDynamicHelp": false,
1376
+ "multiple": false,
1377
+ "type": "option"
1378
+ },
1379
+ "ci-run-id": {
1380
+ "env": "SIMPLY_CICD_CI_RUN_ID",
1381
+ "name": "ci-run-id",
1382
+ "summary": "GitHub only: Actions run ID, used to build links back to the run's artifacts.",
1383
+ "hasDynamicHelp": false,
1384
+ "multiple": false,
1385
+ "type": "option"
1386
+ },
1387
+ "ci-server-url": {
1388
+ "env": "SIMPLY_CICD_CI_SERVER_URL",
1389
+ "name": "ci-server-url",
1390
+ "summary": "GitHub only: server URL, for instances other than github.com.",
1391
+ "hasDynamicHelp": false,
1392
+ "multiple": false,
1393
+ "type": "option"
1394
+ },
1395
+ "ci-commit-sha": {
1396
+ "env": "SIMPLY_CICD_CI_COMMIT_SHA",
1397
+ "name": "ci-commit-sha",
1398
+ "summary": "Commit SHA to attribute the posted diff to.",
1399
+ "hasDynamicHelp": false,
1400
+ "multiple": false,
1401
+ "type": "option"
1402
+ },
1403
+ "from": {
1404
+ "name": "from",
1405
+ "required": true,
1406
+ "summary": "Base commit SHA to diff from.",
1407
+ "hasDynamicHelp": false,
1408
+ "multiple": false,
1409
+ "type": "option"
1410
+ },
1411
+ "to": {
1412
+ "name": "to",
1413
+ "required": true,
1414
+ "summary": "Head commit SHA to diff to.",
1415
+ "hasDynamicHelp": false,
1416
+ "multiple": false,
1417
+ "type": "option"
1418
+ },
1419
+ "project-access-token": {
1420
+ "env": "SIMPLY_CICD_PROJECT_ACCESS_TOKEN",
1421
+ "name": "project-access-token",
1422
+ "required": true,
1423
+ "summary": "Project access token used to post the diff results back to the merge request.",
1424
+ "hasDynamicHelp": false,
1425
+ "multiple": false,
1426
+ "type": "option"
1427
+ },
1428
+ "out": {
1429
+ "name": "out",
1430
+ "summary": "Output directory or file path for the delta results.",
1431
+ "hasDynamicHelp": false,
1432
+ "multiple": false,
1433
+ "type": "option"
1434
+ },
1435
+ "debug": {
1436
+ "env": "SIMPLY_CICD_DEBUG",
1437
+ "name": "debug",
1438
+ "summary": "Enable verbose debug logging.",
1439
+ "allowNo": false,
1440
+ "type": "boolean"
1441
+ },
1442
+ "disabled": {
1443
+ "env": "SIMPLY_CICD_DISABLED",
1444
+ "name": "disabled",
1445
+ "summary": "Skip this job entirely, logging a warning instead of running it.",
1446
+ "allowNo": false,
1447
+ "type": "boolean"
1448
+ }
1449
+ },
1450
+ "hasDynamicHelp": false,
1451
+ "hiddenAliases": [],
1452
+ "id": "simply:cicd:build:generate-flow-diff",
1453
+ "pluginAlias": "@simplysf/simply-cicd",
1454
+ "pluginName": "@simplysf/simply-cicd",
1455
+ "pluginType": "core",
1456
+ "strict": true,
1457
+ "summary": "Generate a Flow delta between two commits and post the results to the change request.",
1458
+ "enableJsonFlag": true,
1459
+ "isESM": true,
1460
+ "relativePath": [
1461
+ "lib",
1462
+ "commands",
1463
+ "simply",
1464
+ "cicd",
1465
+ "build",
1466
+ "generate-flow-diff.js"
1549
1467
  ],
1550
1468
  "aliasPermutations": [],
1551
1469
  "permutations": [
1552
- "simply:cicd:build:create-scratch",
1553
- "cicd:simply:build:create-scratch",
1554
- "cicd:build:simply:create-scratch",
1555
- "cicd:build:create-scratch:simply",
1556
- "simply:build:cicd:create-scratch",
1557
- "build:simply:cicd:create-scratch",
1558
- "build:cicd:simply:create-scratch",
1559
- "build:cicd:create-scratch:simply",
1560
- "simply:build:create-scratch:cicd",
1561
- "build:simply:create-scratch:cicd",
1562
- "build:create-scratch:simply:cicd",
1563
- "build:create-scratch:cicd:simply",
1564
- "simply:cicd:create-scratch:build",
1565
- "cicd:simply:create-scratch:build",
1566
- "cicd:create-scratch:simply:build",
1567
- "cicd:create-scratch:build:simply",
1568
- "simply:create-scratch:cicd:build",
1569
- "create-scratch:simply:cicd:build",
1570
- "create-scratch:cicd:simply:build",
1571
- "create-scratch:cicd:build:simply",
1572
- "simply:create-scratch:build:cicd",
1573
- "create-scratch:simply:build:cicd",
1574
- "create-scratch:build:simply:cicd",
1575
- "create-scratch:build:cicd:simply"
1470
+ "simply:cicd:build:generate-flow-diff",
1471
+ "cicd:simply:build:generate-flow-diff",
1472
+ "cicd:build:simply:generate-flow-diff",
1473
+ "cicd:build:generate-flow-diff:simply",
1474
+ "simply:build:cicd:generate-flow-diff",
1475
+ "build:simply:cicd:generate-flow-diff",
1476
+ "build:cicd:simply:generate-flow-diff",
1477
+ "build:cicd:generate-flow-diff:simply",
1478
+ "simply:build:generate-flow-diff:cicd",
1479
+ "build:simply:generate-flow-diff:cicd",
1480
+ "build:generate-flow-diff:simply:cicd",
1481
+ "build:generate-flow-diff:cicd:simply",
1482
+ "simply:cicd:generate-flow-diff:build",
1483
+ "cicd:simply:generate-flow-diff:build",
1484
+ "cicd:generate-flow-diff:simply:build",
1485
+ "cicd:generate-flow-diff:build:simply",
1486
+ "simply:generate-flow-diff:cicd:build",
1487
+ "generate-flow-diff:simply:cicd:build",
1488
+ "generate-flow-diff:cicd:simply:build",
1489
+ "generate-flow-diff:cicd:build:simply",
1490
+ "simply:generate-flow-diff:build:cicd",
1491
+ "generate-flow-diff:simply:build:cicd",
1492
+ "generate-flow-diff:build:simply:cicd",
1493
+ "generate-flow-diff:build:cicd:simply"
1576
1494
  ]
1577
1495
  },
1578
- "simply:cicd:build:delete-scratch": {
1496
+ "simply:cicd:build:install-dependencies": {
1579
1497
  "aliases": [],
1580
1498
  "args": {},
1581
- "description": "Reads `SCRATCH_ORG_INFO.json` (written by `build create-scratch`) to confirm `--dev-hub` is the Dev Hub that owns the scratch org, re-authenticates to it and the scratch org as needed, and deletes it. Deletion failures are logged rather than thrown, since a scratch org left behind after a failed deletion just needs manual cleanup and shouldn't fail an otherwise-successful pipeline run.\n\nSkipped automatically when `PACKAGE_CHANGED=FALSE` is set in the environment (see `build determine-package-changes`).",
1499
+ "description": "Reads `SCRATCH_ORG_INFO.json` (written by `build create-scratch`), authenticates as that scratch org, and installs its packaged dependencies.\n\nSkipped automatically when `PACKAGE_CHANGED=FALSE` is set in the environment (see `build determine-package-changes`).",
1582
1500
  "examples": [
1583
- "<%= config.bin %> <%= command.id %> --dev-hub my-devhub"
1501
+ "<%= config.bin %> <%= command.id %> --jwt-key-file ./server.key"
1584
1502
  ],
1585
1503
  "flags": {
1586
1504
  "json": {
@@ -1598,14 +1516,6 @@
1598
1516
  "multiple": false,
1599
1517
  "type": "option"
1600
1518
  },
1601
- "dev-hub": {
1602
- "name": "dev-hub",
1603
- "required": true,
1604
- "summary": "Alias of a Dev Hub. Must already be authenticated. Repeat this flag for each Dev Hub to try, in order.",
1605
- "hasDynamicHelp": false,
1606
- "multiple": false,
1607
- "type": "option"
1608
- },
1609
1519
  "jwt-key-file": {
1610
1520
  "env": "SIMPLY_CICD_JWT_KEY_FILE",
1611
1521
  "name": "jwt-key-file",
@@ -1627,16 +1537,43 @@
1627
1537
  "summary": "Skip this job entirely, logging a warning instead of running it.",
1628
1538
  "allowNo": false,
1629
1539
  "type": "boolean"
1540
+ },
1541
+ "install-type": {
1542
+ "name": "install-type",
1543
+ "summary": "The type of dependency installation to perform.",
1544
+ "default": "Upgrade",
1545
+ "hasDynamicHelp": false,
1546
+ "multiple": false,
1547
+ "options": [
1548
+ "All",
1549
+ "Delta",
1550
+ "Upgrade"
1551
+ ],
1552
+ "type": "option"
1553
+ },
1554
+ "upgrade-type": {
1555
+ "description": "For package upgrades, specifies whether to mark all removed components as deprecated (DeprecateOnly), to delete removed components that can be safely deleted and deprecate the others (Mixed), or to delete all removed components, except for custom objects and custom fields, that don't have dependencies (Delete). The default is Mixed. DeprecateOnly and Delete only apply to unlocked package upgrades. Delete is not confirmed first: like every other prompt in a pipeline, it is auto-approved.",
1556
+ "name": "upgrade-type",
1557
+ "summary": "Upgrade type for the dependency installs; available only for unlocked packages.",
1558
+ "default": "Mixed",
1559
+ "hasDynamicHelp": false,
1560
+ "multiple": false,
1561
+ "options": [
1562
+ "DeprecateOnly",
1563
+ "Mixed",
1564
+ "Delete"
1565
+ ],
1566
+ "type": "option"
1630
1567
  }
1631
1568
  },
1632
1569
  "hasDynamicHelp": false,
1633
1570
  "hiddenAliases": [],
1634
- "id": "simply:cicd:build:delete-scratch",
1571
+ "id": "simply:cicd:build:install-dependencies",
1635
1572
  "pluginAlias": "@simplysf/simply-cicd",
1636
1573
  "pluginName": "@simplysf/simply-cicd",
1637
1574
  "pluginType": "core",
1638
1575
  "strict": true,
1639
- "summary": "Delete the scratch org created by `build create-scratch`.",
1576
+ "summary": "Install packaged dependencies into the scratch org created by `build create-scratch`.",
1640
1577
  "enableJsonFlag": true,
1641
1578
  "isESM": true,
1642
1579
  "relativePath": [
@@ -1645,42 +1582,43 @@
1645
1582
  "simply",
1646
1583
  "cicd",
1647
1584
  "build",
1648
- "delete-scratch.js"
1585
+ "install-dependencies.js"
1649
1586
  ],
1650
1587
  "aliasPermutations": [],
1651
1588
  "permutations": [
1652
- "simply:cicd:build:delete-scratch",
1653
- "cicd:simply:build:delete-scratch",
1654
- "cicd:build:simply:delete-scratch",
1655
- "cicd:build:delete-scratch:simply",
1656
- "simply:build:cicd:delete-scratch",
1657
- "build:simply:cicd:delete-scratch",
1658
- "build:cicd:simply:delete-scratch",
1659
- "build:cicd:delete-scratch:simply",
1660
- "simply:build:delete-scratch:cicd",
1661
- "build:simply:delete-scratch:cicd",
1662
- "build:delete-scratch:simply:cicd",
1663
- "build:delete-scratch:cicd:simply",
1664
- "simply:cicd:delete-scratch:build",
1665
- "cicd:simply:delete-scratch:build",
1666
- "cicd:delete-scratch:simply:build",
1667
- "cicd:delete-scratch:build:simply",
1668
- "simply:delete-scratch:cicd:build",
1669
- "delete-scratch:simply:cicd:build",
1670
- "delete-scratch:cicd:simply:build",
1671
- "delete-scratch:cicd:build:simply",
1672
- "simply:delete-scratch:build:cicd",
1673
- "delete-scratch:simply:build:cicd",
1674
- "delete-scratch:build:simply:cicd",
1675
- "delete-scratch:build:cicd:simply"
1589
+ "simply:cicd:build:install-dependencies",
1590
+ "cicd:simply:build:install-dependencies",
1591
+ "cicd:build:simply:install-dependencies",
1592
+ "cicd:build:install-dependencies:simply",
1593
+ "simply:build:cicd:install-dependencies",
1594
+ "build:simply:cicd:install-dependencies",
1595
+ "build:cicd:simply:install-dependencies",
1596
+ "build:cicd:install-dependencies:simply",
1597
+ "simply:build:install-dependencies:cicd",
1598
+ "build:simply:install-dependencies:cicd",
1599
+ "build:install-dependencies:simply:cicd",
1600
+ "build:install-dependencies:cicd:simply",
1601
+ "simply:cicd:install-dependencies:build",
1602
+ "cicd:simply:install-dependencies:build",
1603
+ "cicd:install-dependencies:simply:build",
1604
+ "cicd:install-dependencies:build:simply",
1605
+ "simply:install-dependencies:cicd:build",
1606
+ "install-dependencies:simply:cicd:build",
1607
+ "install-dependencies:cicd:simply:build",
1608
+ "install-dependencies:cicd:build:simply",
1609
+ "simply:install-dependencies:build:cicd",
1610
+ "install-dependencies:simply:build:cicd",
1611
+ "install-dependencies:build:simply:cicd",
1612
+ "install-dependencies:build:cicd:simply"
1676
1613
  ]
1677
1614
  },
1678
- "simply:cicd:build:determine-package-changes": {
1615
+ "simply:cicd:build:lwc-jest": {
1679
1616
  "aliases": [],
1680
1617
  "args": {},
1681
- "description": "Reads the default package directory from `sfdx-project.json`, finds the closest reachable git tag for its `major.minor.patch` (in `SIMPLY_CICD_VERSION_TAG_FORMAT` or the project's `plugins.simply.versionTagFormat`, `v<major>.<minor>.<patch>.*` by default), and diffs that tag against `HEAD` for the package directory and `sfdx-project.json` itself. Writes `PACKAGE_CHANGED=TRUE|FALSE` and `LAST_TAG=<tag>` to the output file. Any failure during detection (missing/invalid sfdx-project.json, git errors) defaults to `PACKAGE_CHANGED=TRUE`, so a build never silently skips work it should have done.",
1618
+ "description": "Installs `@salesforce/sfdx-lwc-jest`, `@sa11y/jest`, and `jest-junit`, then runs `sfdx-lwc-jest --coverage -- --passWithNoTests` with the `jest-junit` reporter added to any reporters the project's own Jest config sets, writing a JUnit report to `./test-results/lwc/test-result.xml` for the pipeline to upload as an artifact. By default failures are logged, not thrown, so they don't fail the pipeline; pass `--lwc-jest-fail-on-test-failure` to make them exit non-zero.",
1682
1619
  "examples": [
1683
- "<%= config.bin %> <%= command.id %> --out changes.env"
1620
+ "<%= config.bin %> <%= command.id %>",
1621
+ "Fail the pipeline when a test fails:\n<%= config.bin %> <%= command.id %> --lwc-jest-fail-on-test-failure"
1684
1622
  ],
1685
1623
  "flags": {
1686
1624
  "json": {
@@ -1712,23 +1650,22 @@
1712
1650
  "allowNo": false,
1713
1651
  "type": "boolean"
1714
1652
  },
1715
- "out": {
1716
- "name": "out",
1717
- "summary": "Output dotenv file path.",
1718
- "default": "changes.env",
1719
- "hasDynamicHelp": false,
1720
- "multiple": false,
1721
- "type": "option"
1653
+ "lwc-jest-fail-on-test-failure": {
1654
+ "env": "SIMPLY_CICD_LWC_JEST_FAIL_ON_TEST_FAILURE",
1655
+ "name": "lwc-jest-fail-on-test-failure",
1656
+ "summary": "Exit non-zero when the LWC Jest tests (or their install) fail, failing the pipeline. By default failures are only logged.",
1657
+ "allowNo": false,
1658
+ "type": "boolean"
1722
1659
  }
1723
1660
  },
1724
1661
  "hasDynamicHelp": false,
1725
1662
  "hiddenAliases": [],
1726
- "id": "simply:cicd:build:determine-package-changes",
1663
+ "id": "simply:cicd:build:lwc-jest",
1727
1664
  "pluginAlias": "@simplysf/simply-cicd",
1728
1665
  "pluginName": "@simplysf/simply-cicd",
1729
1666
  "pluginType": "core",
1730
1667
  "strict": true,
1731
- "summary": "Determine if any package-relevant files have changed since the last release tag.",
1668
+ "summary": "Install the LWC Jest test libraries and run the project's LWC Jest tests with coverage.",
1732
1669
  "enableJsonFlag": true,
1733
1670
  "isESM": true,
1734
1671
  "relativePath": [
@@ -1737,43 +1674,44 @@
1737
1674
  "simply",
1738
1675
  "cicd",
1739
1676
  "build",
1740
- "determine-package-changes.js"
1677
+ "lwc-jest.js"
1741
1678
  ],
1742
1679
  "aliasPermutations": [],
1743
1680
  "permutations": [
1744
- "simply:cicd:build:determine-package-changes",
1745
- "cicd:simply:build:determine-package-changes",
1746
- "cicd:build:simply:determine-package-changes",
1747
- "cicd:build:determine-package-changes:simply",
1748
- "simply:build:cicd:determine-package-changes",
1749
- "build:simply:cicd:determine-package-changes",
1750
- "build:cicd:simply:determine-package-changes",
1751
- "build:cicd:determine-package-changes:simply",
1752
- "simply:build:determine-package-changes:cicd",
1753
- "build:simply:determine-package-changes:cicd",
1754
- "build:determine-package-changes:simply:cicd",
1755
- "build:determine-package-changes:cicd:simply",
1756
- "simply:cicd:determine-package-changes:build",
1757
- "cicd:simply:determine-package-changes:build",
1758
- "cicd:determine-package-changes:simply:build",
1759
- "cicd:determine-package-changes:build:simply",
1760
- "simply:determine-package-changes:cicd:build",
1761
- "determine-package-changes:simply:cicd:build",
1762
- "determine-package-changes:cicd:simply:build",
1763
- "determine-package-changes:cicd:build:simply",
1764
- "simply:determine-package-changes:build:cicd",
1765
- "determine-package-changes:simply:build:cicd",
1766
- "determine-package-changes:build:simply:cicd",
1767
- "determine-package-changes:build:cicd:simply"
1681
+ "simply:cicd:build:lwc-jest",
1682
+ "cicd:simply:build:lwc-jest",
1683
+ "cicd:build:simply:lwc-jest",
1684
+ "cicd:build:lwc-jest:simply",
1685
+ "simply:build:cicd:lwc-jest",
1686
+ "build:simply:cicd:lwc-jest",
1687
+ "build:cicd:simply:lwc-jest",
1688
+ "build:cicd:lwc-jest:simply",
1689
+ "simply:build:lwc-jest:cicd",
1690
+ "build:simply:lwc-jest:cicd",
1691
+ "build:lwc-jest:simply:cicd",
1692
+ "build:lwc-jest:cicd:simply",
1693
+ "simply:cicd:lwc-jest:build",
1694
+ "cicd:simply:lwc-jest:build",
1695
+ "cicd:lwc-jest:simply:build",
1696
+ "cicd:lwc-jest:build:simply",
1697
+ "simply:lwc-jest:cicd:build",
1698
+ "lwc-jest:simply:cicd:build",
1699
+ "lwc-jest:cicd:simply:build",
1700
+ "lwc-jest:cicd:build:simply",
1701
+ "simply:lwc-jest:build:cicd",
1702
+ "lwc-jest:simply:build:cicd",
1703
+ "lwc-jest:build:simply:cicd",
1704
+ "lwc-jest:build:cicd:simply"
1768
1705
  ]
1769
1706
  },
1770
- "simply:cicd:build:generate-flexipage-diff": {
1707
+ "simply:cicd:build:publish-utam-page-objects": {
1771
1708
  "aliases": [],
1772
1709
  "args": {},
1773
- "description": "Runs the upstream `flexipage-delta` binary to diff `**/*.flexipage-meta.xml` files between `--from` and `--to`, then the reporter binary for the platform `--vcs-provider` selects — `flexipage-delta-gitlab` or `flexipage-delta-github` — to post the results back to the merge or pull request. Failures are logged, not thrown — a diff-posting step shouldn't fail the build.",
1710
+ "description": "Gives every Salesforce Unlocked Package version a matching npm package of compiled UTAM page objects, so a UI-test suite can install exactly the page objects that describe the package version it is testing against.\n\nRuns after `build create-package-version`, whose `04t` it takes as input — from `--subscriber-package-version-id`, from `SUBSCRIBER_PACKAGE_VERSION_ID` in the environment (how a separate job receives that command's dotenv report), or from the dotenv file itself (how a later step in the same job sees it). It compiles every `**/__utam__/**/*.utam.json` under the default package directory with the UTAM compiler, in a staging directory outside the repo, and publishes the result.\n\nThe npm version is derived from the Salesforce version number the same way `sfdx-project.json` writes a dependency pin: `1.2.3.4` becomes `1.2.3-4`, with the git tag's suffix carried as a second prerelease identifier and as the dist-tag, so `1.2.3.4` built from a `beta` package branch is `1.2.3-4.beta` at `beta`, and a release build is `1.2.3-4` at `latest`.\n\nThe compiler is installed at run time rather than shipped with this plugin, so nothing is downloaded unless the command actually runs.\n\nSkips (without failing) when `PACKAGE_CHANGED=FALSE` is set in the environment (see `build determine-package-changes`), when `--disabled` is passed, when no package version ID can be found, when the project authors no page objects, or when this exact version is already on the registry — which is what makes retrying a job that died after publishing succeed rather than fail on a version conflict. Any other failure fails the job: a missing page-object package would silently break every UI test pinned to that version.\n\nOn success, appends `UTAM_PAGE_OBJECTS_PACKAGE` and `UTAM_PAGE_OBJECTS_VERSION` to `--out`, so a downstream job can install the package without knowing the mapping rule.\n\nConfigure the package name, the compiler's type aliases, extra peer dependencies, and a project-owned compiler config under `plugins.simply.utam` in `sfdx-project.json`.",
1774
1711
  "examples": [
1775
- "<%= config.bin %> <%= command.id %> --ci-project-id 123 --ci-merge-request-iid 45 --from abc123 --to def456 --project-access-token glpat-...",
1776
- "<%= config.bin %> <%= command.id %> --vcs-provider github --ci-repository my-org/my-repo --ci-pull-request-number 45 --ci-run-id 987 --from abc123 --to def456 --project-access-token ghp-..."
1712
+ "Publish page objects for the version this pipeline just created, reading its ID from the dotenv file:\n<%= config.bin %> <%= command.id %> --packaging-devhub my-packaging-devhub",
1713
+ "Publish to a GitLab project registry on a release-branch build:\n<%= config.bin %> <%= command.id %> --packaging-devhub my-packaging-devhub --ci-commit-ref-name release/1.2 --package-release-branch-prefix release/ --npm-registry https://gitlab.example.com/api/v4/projects/42/packages/npm/ --npm-token $CI_JOB_TOKEN",
1714
+ "Compile and pack without publishing, to inspect what would be produced:\n<%= config.bin %> <%= command.id %> --packaging-devhub my-packaging-devhub --subscriber-package-version-id 04tXXXXXXXXXXXXXXX --dry-run"
1777
1715
  ],
1778
1716
  "flags": {
1779
1717
  "json": {
@@ -1791,138 +1729,134 @@
1791
1729
  "multiple": false,
1792
1730
  "type": "option"
1793
1731
  },
1794
- "vcs-host": {
1795
- "env": "SIMPLY_CICD_VCS_HOST",
1796
- "name": "vcs-host",
1797
- "summary": "Hostname of the VCS instance hosting this project.",
1798
- "hasDynamicHelp": false,
1799
- "multiple": false,
1800
- "type": "option"
1732
+ "debug": {
1733
+ "env": "SIMPLY_CICD_DEBUG",
1734
+ "name": "debug",
1735
+ "summary": "Enable verbose debug logging.",
1736
+ "allowNo": false,
1737
+ "type": "boolean"
1801
1738
  },
1802
- "vcs-provider": {
1803
- "env": "SIMPLY_CICD_VCS_PROVIDER",
1804
- "name": "vcs-provider",
1805
- "summary": "The VCS platform hosting this project.",
1806
- "default": "gitlab",
1807
- "hasDynamicHelp": false,
1808
- "multiple": false,
1809
- "options": [
1810
- "github",
1811
- "gitlab"
1812
- ],
1813
- "type": "option"
1739
+ "disabled": {
1740
+ "env": "SIMPLY_CICD_DISABLED",
1741
+ "name": "disabled",
1742
+ "summary": "Skip this job entirely, logging a warning instead of running it.",
1743
+ "allowNo": false,
1744
+ "type": "boolean"
1814
1745
  },
1815
- "ci-project-id": {
1816
- "env": "SIMPLY_CICD_CI_PROJECT_ID",
1817
- "name": "ci-project-id",
1818
- "summary": "GitLab only: numeric CI project ID of the project to post the diff to.",
1746
+ "packaging-devhub": {
1747
+ "env": "SIMPLY_CICD_PACKAGING_DEVHUB",
1748
+ "name": "packaging-devhub",
1749
+ "required": true,
1750
+ "summary": "Alias of the Dev Hub that owns the package version. Must already be authenticated.",
1819
1751
  "hasDynamicHelp": false,
1820
1752
  "multiple": false,
1821
1753
  "type": "option"
1822
1754
  },
1823
- "ci-merge-request-iid": {
1824
- "env": "SIMPLY_CICD_CI_MERGE_REQUEST_IID",
1825
- "name": "ci-merge-request-iid",
1826
- "summary": "GitLab only: internal ID of the merge request to post the diff to.",
1755
+ "subscriber-package-version-id": {
1756
+ "name": "subscriber-package-version-id",
1757
+ "summary": "Subscriber package version ID (04t) to publish page objects for. Falls back to SUBSCRIBER_PACKAGE_VERSION_ID in the environment, then to the same key in --env-file.",
1827
1758
  "hasDynamicHelp": false,
1828
1759
  "multiple": false,
1829
1760
  "type": "option"
1830
1761
  },
1831
- "ci-repository": {
1832
- "env": "SIMPLY_CICD_CI_REPOSITORY",
1833
- "name": "ci-repository",
1834
- "summary": "GitHub only: repository to post the diff to, as owner/repo.",
1762
+ "npm-package-name": {
1763
+ "env": "SIMPLY_CICD_NPM_PACKAGE_NAME",
1764
+ "name": "npm-package-name",
1765
+ "summary": "npm package name to publish the page objects under. Required unless `plugins.simply.utam.packageName` is set in sfdx-project.json; the flag wins when both are present.",
1835
1766
  "hasDynamicHelp": false,
1836
1767
  "multiple": false,
1837
1768
  "type": "option"
1838
1769
  },
1839
- "ci-pull-request-number": {
1840
- "env": "SIMPLY_CICD_CI_PULL_REQUEST_NUMBER",
1841
- "name": "ci-pull-request-number",
1842
- "summary": "GitHub only: number of the pull request to post the diff to.",
1770
+ "npm-registry": {
1771
+ "env": "SIMPLY_CICD_NPM_REGISTRY",
1772
+ "name": "npm-registry",
1773
+ "summary": "Registry to publish to. Defaults to whatever npm itself is configured to use.",
1843
1774
  "hasDynamicHelp": false,
1844
1775
  "multiple": false,
1845
1776
  "type": "option"
1846
1777
  },
1847
- "ci-run-id": {
1848
- "env": "SIMPLY_CICD_CI_RUN_ID",
1849
- "name": "ci-run-id",
1850
- "summary": "GitHub only: Actions run ID, used to build links back to the run's artifacts.",
1778
+ "npm-token": {
1779
+ "env": "SIMPLY_CICD_NPM_TOKEN",
1780
+ "name": "npm-token",
1781
+ "summary": "Auth token for the registry. Written to an .npmrc inside the staging directory only — the repo's own .npmrc is never touched.",
1851
1782
  "hasDynamicHelp": false,
1852
1783
  "multiple": false,
1853
1784
  "type": "option"
1854
1785
  },
1855
- "ci-server-url": {
1856
- "env": "SIMPLY_CICD_CI_SERVER_URL",
1857
- "name": "ci-server-url",
1858
- "summary": "GitHub only: server URL, for instances other than github.com.",
1786
+ "npm-access": {
1787
+ "env": "SIMPLY_CICD_NPM_ACCESS",
1788
+ "name": "npm-access",
1789
+ "summary": "Passed through to npm publish --access. Needed on npmjs.com to publish a scoped package publicly.",
1859
1790
  "hasDynamicHelp": false,
1860
1791
  "multiple": false,
1792
+ "options": [
1793
+ "public",
1794
+ "restricted"
1795
+ ],
1861
1796
  "type": "option"
1862
1797
  },
1863
- "ci-commit-sha": {
1864
- "env": "SIMPLY_CICD_CI_COMMIT_SHA",
1865
- "name": "ci-commit-sha",
1866
- "summary": "Commit SHA to attribute the posted diff to.",
1798
+ "npm-dist-tag": {
1799
+ "name": "npm-dist-tag",
1800
+ "summary": "Dist-tag to publish under, overriding the one derived from the git tag's suffix.",
1867
1801
  "hasDynamicHelp": false,
1868
1802
  "multiple": false,
1869
1803
  "type": "option"
1870
1804
  },
1871
- "from": {
1872
- "name": "from",
1873
- "required": true,
1874
- "summary": "Base commit SHA to diff from.",
1805
+ "ci-commit-ref-name": {
1806
+ "env": "SIMPLY_CICD_CI_COMMIT_REF_NAME",
1807
+ "name": "ci-commit-ref-name",
1808
+ "summary": "Git branch or ref name being built. With --package-release-branch-prefix, reproduces the suffix `create-package-version` put on the git tag, so the npm version mirrors it.",
1875
1809
  "hasDynamicHelp": false,
1876
1810
  "multiple": false,
1877
1811
  "type": "option"
1878
1812
  },
1879
- "to": {
1880
- "name": "to",
1881
- "required": true,
1882
- "summary": "Head commit SHA to diff to.",
1813
+ "package-release-branch-prefix": {
1814
+ "name": "package-release-branch-prefix",
1815
+ "summary": "Prefix identifying release branches. Determines whether the npm version and dist-tag carry a branch suffix.",
1883
1816
  "hasDynamicHelp": false,
1884
1817
  "multiple": false,
1885
1818
  "type": "option"
1886
1819
  },
1887
- "project-access-token": {
1888
- "env": "SIMPLY_CICD_PROJECT_ACCESS_TOKEN",
1889
- "name": "project-access-token",
1890
- "required": true,
1891
- "summary": "Project access token used to post the diff results back to the merge request.",
1820
+ "utam-version": {
1821
+ "env": "SIMPLY_CICD_UTAM_VERSION",
1822
+ "name": "utam-version",
1823
+ "summary": "npm version spec of the UTAM compiler to install and compile with.",
1824
+ "default": "^3",
1892
1825
  "hasDynamicHelp": false,
1893
1826
  "multiple": false,
1894
1827
  "type": "option"
1895
1828
  },
1829
+ "dry-run": {
1830
+ "name": "dry-run",
1831
+ "summary": "Compile and pack the package without publishing it, copying the tarball into the project directory.",
1832
+ "allowNo": false,
1833
+ "type": "boolean"
1834
+ },
1896
1835
  "out": {
1897
1836
  "name": "out",
1898
- "summary": "Output directory or file path for the delta results.",
1837
+ "summary": "Dotenv file to append the published package name and version to.",
1838
+ "default": "subscriberPackageVersionId.env",
1899
1839
  "hasDynamicHelp": false,
1900
1840
  "multiple": false,
1901
1841
  "type": "option"
1902
1842
  },
1903
- "debug": {
1904
- "env": "SIMPLY_CICD_DEBUG",
1905
- "name": "debug",
1906
- "summary": "Enable verbose debug logging.",
1907
- "allowNo": false,
1908
- "type": "boolean"
1909
- },
1910
- "disabled": {
1911
- "env": "SIMPLY_CICD_DISABLED",
1912
- "name": "disabled",
1913
- "summary": "Skip this job entirely, logging a warning instead of running it.",
1914
- "allowNo": false,
1915
- "type": "boolean"
1843
+ "env-file": {
1844
+ "name": "env-file",
1845
+ "summary": "Dotenv file to read SUBSCRIBER_PACKAGE_VERSION_ID from when it isn't passed as a flag or set in the environment.",
1846
+ "default": "subscriberPackageVersionId.env",
1847
+ "hasDynamicHelp": false,
1848
+ "multiple": false,
1849
+ "type": "option"
1916
1850
  }
1917
1851
  },
1918
1852
  "hasDynamicHelp": false,
1919
1853
  "hiddenAliases": [],
1920
- "id": "simply:cicd:build:generate-flexipage-diff",
1854
+ "id": "simply:cicd:build:publish-utam-page-objects",
1921
1855
  "pluginAlias": "@simplysf/simply-cicd",
1922
1856
  "pluginName": "@simplysf/simply-cicd",
1923
1857
  "pluginType": "core",
1924
1858
  "strict": true,
1925
- "summary": "Generate a Flexipage delta between two commits and post the results to the change request.",
1859
+ "summary": "Compile the project's UTAM page objects for a package version and publish them to an npm registry.",
1926
1860
  "enableJsonFlag": true,
1927
1861
  "isESM": true,
1928
1862
  "relativePath": [
@@ -1931,165 +1865,63 @@
1931
1865
  "simply",
1932
1866
  "cicd",
1933
1867
  "build",
1934
- "generate-flexipage-diff.js"
1868
+ "publish-utam-page-objects.js"
1935
1869
  ],
1936
1870
  "aliasPermutations": [],
1937
1871
  "permutations": [
1938
- "simply:cicd:build:generate-flexipage-diff",
1939
- "cicd:simply:build:generate-flexipage-diff",
1940
- "cicd:build:simply:generate-flexipage-diff",
1941
- "cicd:build:generate-flexipage-diff:simply",
1942
- "simply:build:cicd:generate-flexipage-diff",
1943
- "build:simply:cicd:generate-flexipage-diff",
1944
- "build:cicd:simply:generate-flexipage-diff",
1945
- "build:cicd:generate-flexipage-diff:simply",
1946
- "simply:build:generate-flexipage-diff:cicd",
1947
- "build:simply:generate-flexipage-diff:cicd",
1948
- "build:generate-flexipage-diff:simply:cicd",
1949
- "build:generate-flexipage-diff:cicd:simply",
1950
- "simply:cicd:generate-flexipage-diff:build",
1951
- "cicd:simply:generate-flexipage-diff:build",
1952
- "cicd:generate-flexipage-diff:simply:build",
1953
- "cicd:generate-flexipage-diff:build:simply",
1954
- "simply:generate-flexipage-diff:cicd:build",
1955
- "generate-flexipage-diff:simply:cicd:build",
1956
- "generate-flexipage-diff:cicd:simply:build",
1957
- "generate-flexipage-diff:cicd:build:simply",
1958
- "simply:generate-flexipage-diff:build:cicd",
1959
- "generate-flexipage-diff:simply:build:cicd",
1960
- "generate-flexipage-diff:build:simply:cicd",
1961
- "generate-flexipage-diff:build:cicd:simply"
1962
- ]
1963
- },
1964
- "simply:cicd:build:generate-flow-diff": {
1965
- "aliases": [],
1966
- "args": {},
1967
- "description": "Runs the upstream `flow-delta` binary to diff `**/*.flow-meta.xml` files between `--from` and `--to`, then the reporter binary for the platform `--vcs-provider` selects — `flow-delta-gitlab` or `flow-delta-github` — to post the results back to the merge or pull request. Failures are logged, not thrown — a diff-posting step shouldn't fail the build.",
1968
- "examples": [
1969
- "<%= config.bin %> <%= command.id %> --ci-project-id 123 --ci-merge-request-iid 45 --from abc123 --to def456 --project-access-token glpat-...",
1970
- "<%= config.bin %> <%= command.id %> --vcs-provider github --ci-repository my-org/my-repo --ci-pull-request-number 45 --ci-run-id 987 --from abc123 --to def456 --project-access-token ghp-..."
1971
- ],
1972
- "flags": {
1973
- "json": {
1974
- "description": "Format output as json.",
1975
- "helpGroup": "GLOBAL",
1976
- "name": "json",
1977
- "allowNo": false,
1978
- "type": "boolean"
1979
- },
1980
- "flags-dir": {
1981
- "helpGroup": "GLOBAL",
1982
- "name": "flags-dir",
1983
- "summary": "Import flag values from a directory.",
1984
- "hasDynamicHelp": false,
1985
- "multiple": false,
1986
- "type": "option"
1987
- },
1988
- "vcs-host": {
1989
- "env": "SIMPLY_CICD_VCS_HOST",
1990
- "name": "vcs-host",
1991
- "summary": "Hostname of the VCS instance hosting this project.",
1992
- "hasDynamicHelp": false,
1993
- "multiple": false,
1994
- "type": "option"
1995
- },
1996
- "vcs-provider": {
1997
- "env": "SIMPLY_CICD_VCS_PROVIDER",
1998
- "name": "vcs-provider",
1999
- "summary": "The VCS platform hosting this project.",
2000
- "default": "gitlab",
2001
- "hasDynamicHelp": false,
2002
- "multiple": false,
2003
- "options": [
2004
- "github",
2005
- "gitlab"
2006
- ],
2007
- "type": "option"
2008
- },
2009
- "ci-project-id": {
2010
- "env": "SIMPLY_CICD_CI_PROJECT_ID",
2011
- "name": "ci-project-id",
2012
- "summary": "GitLab only: numeric CI project ID of the project to post the diff to.",
2013
- "hasDynamicHelp": false,
2014
- "multiple": false,
2015
- "type": "option"
2016
- },
2017
- "ci-merge-request-iid": {
2018
- "env": "SIMPLY_CICD_CI_MERGE_REQUEST_IID",
2019
- "name": "ci-merge-request-iid",
2020
- "summary": "GitLab only: internal ID of the merge request to post the diff to.",
2021
- "hasDynamicHelp": false,
2022
- "multiple": false,
2023
- "type": "option"
2024
- },
2025
- "ci-repository": {
2026
- "env": "SIMPLY_CICD_CI_REPOSITORY",
2027
- "name": "ci-repository",
2028
- "summary": "GitHub only: repository to post the diff to, as owner/repo.",
2029
- "hasDynamicHelp": false,
2030
- "multiple": false,
2031
- "type": "option"
2032
- },
2033
- "ci-pull-request-number": {
2034
- "env": "SIMPLY_CICD_CI_PULL_REQUEST_NUMBER",
2035
- "name": "ci-pull-request-number",
2036
- "summary": "GitHub only: number of the pull request to post the diff to.",
2037
- "hasDynamicHelp": false,
2038
- "multiple": false,
2039
- "type": "option"
2040
- },
2041
- "ci-run-id": {
2042
- "env": "SIMPLY_CICD_CI_RUN_ID",
2043
- "name": "ci-run-id",
2044
- "summary": "GitHub only: Actions run ID, used to build links back to the run's artifacts.",
2045
- "hasDynamicHelp": false,
2046
- "multiple": false,
2047
- "type": "option"
2048
- },
2049
- "ci-server-url": {
2050
- "env": "SIMPLY_CICD_CI_SERVER_URL",
2051
- "name": "ci-server-url",
2052
- "summary": "GitHub only: server URL, for instances other than github.com.",
2053
- "hasDynamicHelp": false,
2054
- "multiple": false,
2055
- "type": "option"
2056
- },
2057
- "ci-commit-sha": {
2058
- "env": "SIMPLY_CICD_CI_COMMIT_SHA",
2059
- "name": "ci-commit-sha",
2060
- "summary": "Commit SHA to attribute the posted diff to.",
2061
- "hasDynamicHelp": false,
2062
- "multiple": false,
2063
- "type": "option"
2064
- },
2065
- "from": {
2066
- "name": "from",
2067
- "required": true,
2068
- "summary": "Base commit SHA to diff from.",
2069
- "hasDynamicHelp": false,
2070
- "multiple": false,
2071
- "type": "option"
2072
- },
2073
- "to": {
2074
- "name": "to",
2075
- "required": true,
2076
- "summary": "Head commit SHA to diff to.",
2077
- "hasDynamicHelp": false,
2078
- "multiple": false,
2079
- "type": "option"
1872
+ "simply:cicd:build:publish-utam-page-objects",
1873
+ "cicd:simply:build:publish-utam-page-objects",
1874
+ "cicd:build:simply:publish-utam-page-objects",
1875
+ "cicd:build:publish-utam-page-objects:simply",
1876
+ "simply:build:cicd:publish-utam-page-objects",
1877
+ "build:simply:cicd:publish-utam-page-objects",
1878
+ "build:cicd:simply:publish-utam-page-objects",
1879
+ "build:cicd:publish-utam-page-objects:simply",
1880
+ "simply:build:publish-utam-page-objects:cicd",
1881
+ "build:simply:publish-utam-page-objects:cicd",
1882
+ "build:publish-utam-page-objects:simply:cicd",
1883
+ "build:publish-utam-page-objects:cicd:simply",
1884
+ "simply:cicd:publish-utam-page-objects:build",
1885
+ "cicd:simply:publish-utam-page-objects:build",
1886
+ "cicd:publish-utam-page-objects:simply:build",
1887
+ "cicd:publish-utam-page-objects:build:simply",
1888
+ "simply:publish-utam-page-objects:cicd:build",
1889
+ "publish-utam-page-objects:simply:cicd:build",
1890
+ "publish-utam-page-objects:cicd:simply:build",
1891
+ "publish-utam-page-objects:cicd:build:simply",
1892
+ "simply:publish-utam-page-objects:build:cicd",
1893
+ "publish-utam-page-objects:simply:build:cicd",
1894
+ "publish-utam-page-objects:build:simply:cicd",
1895
+ "publish-utam-page-objects:build:cicd:simply"
1896
+ ]
1897
+ },
1898
+ "simply:cicd:build:push-scratch": {
1899
+ "aliases": [],
1900
+ "args": {},
1901
+ "description": "Reads `SCRATCH_ORG_INFO.json` (written by `build create-scratch`), authenticates as that scratch org, strips metadata types the scratch org push doesn't support (Einstein Conversation Agent file types), and runs `sf project deploy start`. When `--scratch-org-source-dir` is given, also deploys the default package directory's `seedMetadata.path`, if declared in `sfdx-project.json`.\n\nSkipped automatically when `PACKAGE_CHANGED=FALSE` is set in the environment (see `build determine-package-changes`).",
1902
+ "examples": [
1903
+ "<%= config.bin %> <%= command.id %> --jwt-key-file ./server.key"
1904
+ ],
1905
+ "flags": {
1906
+ "json": {
1907
+ "description": "Format output as json.",
1908
+ "helpGroup": "GLOBAL",
1909
+ "name": "json",
1910
+ "allowNo": false,
1911
+ "type": "boolean"
2080
1912
  },
2081
- "project-access-token": {
2082
- "env": "SIMPLY_CICD_PROJECT_ACCESS_TOKEN",
2083
- "name": "project-access-token",
2084
- "required": true,
2085
- "summary": "Project access token used to post the diff results back to the merge request.",
1913
+ "flags-dir": {
1914
+ "helpGroup": "GLOBAL",
1915
+ "name": "flags-dir",
1916
+ "summary": "Import flag values from a directory.",
2086
1917
  "hasDynamicHelp": false,
2087
1918
  "multiple": false,
2088
1919
  "type": "option"
2089
1920
  },
2090
- "out": {
2091
- "name": "out",
2092
- "summary": "Output directory or file path for the delta results.",
1921
+ "jwt-key-file": {
1922
+ "env": "SIMPLY_CICD_JWT_KEY_FILE",
1923
+ "name": "jwt-key-file",
1924
+ "summary": "Path to the JWT private key file used to re-authenticate the scratch org (or its Dev Hub) when it was JWT-authenticated. Not needed when the Dev Hub was authenticated via web login or an SFDX auth URL — the scratch org's own refresh token is used instead.",
2093
1925
  "hasDynamicHelp": false,
2094
1926
  "multiple": false,
2095
1927
  "type": "option"
@@ -2107,16 +1939,29 @@
2107
1939
  "summary": "Skip this job entirely, logging a warning instead of running it.",
2108
1940
  "allowNo": false,
2109
1941
  "type": "boolean"
1942
+ },
1943
+ "ignore-warnings": {
1944
+ "name": "ignore-warnings",
1945
+ "summary": "Append --ignore-warnings to the underlying sf project deploy start call.",
1946
+ "allowNo": false,
1947
+ "type": "boolean"
1948
+ },
1949
+ "scratch-org-source-dir": {
1950
+ "name": "scratch-org-source-dir",
1951
+ "summary": "Source directory to push to the scratch org, in addition to the default package directory.",
1952
+ "hasDynamicHelp": false,
1953
+ "multiple": false,
1954
+ "type": "option"
2110
1955
  }
2111
1956
  },
2112
1957
  "hasDynamicHelp": false,
2113
1958
  "hiddenAliases": [],
2114
- "id": "simply:cicd:build:generate-flow-diff",
1959
+ "id": "simply:cicd:build:push-scratch",
2115
1960
  "pluginAlias": "@simplysf/simply-cicd",
2116
1961
  "pluginName": "@simplysf/simply-cicd",
2117
1962
  "pluginType": "core",
2118
1963
  "strict": true,
2119
- "summary": "Generate a Flow delta between two commits and post the results to the change request.",
1964
+ "summary": "Push source to the scratch org created by `build create-scratch`.",
2120
1965
  "enableJsonFlag": true,
2121
1966
  "isESM": true,
2122
1967
  "relativePath": [
@@ -2125,40 +1970,40 @@
2125
1970
  "simply",
2126
1971
  "cicd",
2127
1972
  "build",
2128
- "generate-flow-diff.js"
1973
+ "push-scratch.js"
2129
1974
  ],
2130
1975
  "aliasPermutations": [],
2131
1976
  "permutations": [
2132
- "simply:cicd:build:generate-flow-diff",
2133
- "cicd:simply:build:generate-flow-diff",
2134
- "cicd:build:simply:generate-flow-diff",
2135
- "cicd:build:generate-flow-diff:simply",
2136
- "simply:build:cicd:generate-flow-diff",
2137
- "build:simply:cicd:generate-flow-diff",
2138
- "build:cicd:simply:generate-flow-diff",
2139
- "build:cicd:generate-flow-diff:simply",
2140
- "simply:build:generate-flow-diff:cicd",
2141
- "build:simply:generate-flow-diff:cicd",
2142
- "build:generate-flow-diff:simply:cicd",
2143
- "build:generate-flow-diff:cicd:simply",
2144
- "simply:cicd:generate-flow-diff:build",
2145
- "cicd:simply:generate-flow-diff:build",
2146
- "cicd:generate-flow-diff:simply:build",
2147
- "cicd:generate-flow-diff:build:simply",
2148
- "simply:generate-flow-diff:cicd:build",
2149
- "generate-flow-diff:simply:cicd:build",
2150
- "generate-flow-diff:cicd:simply:build",
2151
- "generate-flow-diff:cicd:build:simply",
2152
- "simply:generate-flow-diff:build:cicd",
2153
- "generate-flow-diff:simply:build:cicd",
2154
- "generate-flow-diff:build:simply:cicd",
2155
- "generate-flow-diff:build:cicd:simply"
1977
+ "simply:cicd:build:push-scratch",
1978
+ "cicd:simply:build:push-scratch",
1979
+ "cicd:build:simply:push-scratch",
1980
+ "cicd:build:push-scratch:simply",
1981
+ "simply:build:cicd:push-scratch",
1982
+ "build:simply:cicd:push-scratch",
1983
+ "build:cicd:simply:push-scratch",
1984
+ "build:cicd:push-scratch:simply",
1985
+ "simply:build:push-scratch:cicd",
1986
+ "build:simply:push-scratch:cicd",
1987
+ "build:push-scratch:simply:cicd",
1988
+ "build:push-scratch:cicd:simply",
1989
+ "simply:cicd:push-scratch:build",
1990
+ "cicd:simply:push-scratch:build",
1991
+ "cicd:push-scratch:simply:build",
1992
+ "cicd:push-scratch:build:simply",
1993
+ "simply:push-scratch:cicd:build",
1994
+ "push-scratch:simply:cicd:build",
1995
+ "push-scratch:cicd:simply:build",
1996
+ "push-scratch:cicd:build:simply",
1997
+ "simply:push-scratch:build:cicd",
1998
+ "push-scratch:simply:build:cicd",
1999
+ "push-scratch:build:simply:cicd",
2000
+ "push-scratch:build:cicd:simply"
2156
2001
  ]
2157
2002
  },
2158
- "simply:cicd:build:install-dependencies": {
2003
+ "simply:cicd:build:test-scratch": {
2159
2004
  "aliases": [],
2160
2005
  "args": {},
2161
- "description": "Reads `SCRATCH_ORG_INFO.json` (written by `build create-scratch`), authenticates as that scratch org, and installs its packaged dependencies.\n\nSkipped automatically when `PACKAGE_CHANGED=FALSE` is set in the environment (see `build determine-package-changes`).",
2006
+ "description": "Reads `SCRATCH_ORG_INFO.json` (written by `build create-scratch`), authenticates as that scratch org, and runs its Apex tests with `RunLocalTests`.\n\nSkipped automatically when `PACKAGE_CHANGED=FALSE` is set in the environment (see `build determine-package-changes`).",
2162
2007
  "examples": [
2163
2008
  "<%= config.bin %> <%= command.id %> --jwt-key-file ./server.key"
2164
2009
  ],
@@ -2200,42 +2045,21 @@
2200
2045
  "allowNo": false,
2201
2046
  "type": "boolean"
2202
2047
  },
2203
- "install-type": {
2204
- "name": "install-type",
2205
- "summary": "The type of dependency installation to perform.",
2206
- "default": "Upgrade",
2207
- "hasDynamicHelp": false,
2208
- "multiple": false,
2209
- "options": [
2210
- "All",
2211
- "Delta",
2212
- "Upgrade"
2213
- ],
2214
- "type": "option"
2215
- },
2216
- "upgrade-type": {
2217
- "description": "For package upgrades, specifies whether to mark all removed components as deprecated (DeprecateOnly), to delete removed components that can be safely deleted and deprecate the others (Mixed), or to delete all removed components, except for custom objects and custom fields, that don't have dependencies (Delete). The default is Mixed. DeprecateOnly and Delete only apply to unlocked package upgrades. Delete is not confirmed first: like every other prompt in a pipeline, it is auto-approved.",
2218
- "name": "upgrade-type",
2219
- "summary": "Upgrade type for the dependency installs; available only for unlocked packages.",
2220
- "default": "Mixed",
2221
- "hasDynamicHelp": false,
2222
- "multiple": false,
2223
- "options": [
2224
- "DeprecateOnly",
2225
- "Mixed",
2226
- "Delete"
2227
- ],
2228
- "type": "option"
2048
+ "disable-apex-tests": {
2049
+ "name": "disable-apex-tests",
2050
+ "summary": "Skip running Apex tests, without skipping the rest of the job.",
2051
+ "allowNo": false,
2052
+ "type": "boolean"
2229
2053
  }
2230
2054
  },
2231
2055
  "hasDynamicHelp": false,
2232
2056
  "hiddenAliases": [],
2233
- "id": "simply:cicd:build:install-dependencies",
2057
+ "id": "simply:cicd:build:test-scratch",
2234
2058
  "pluginAlias": "@simplysf/simply-cicd",
2235
2059
  "pluginName": "@simplysf/simply-cicd",
2236
2060
  "pluginType": "core",
2237
2061
  "strict": true,
2238
- "summary": "Install packaged dependencies into the scratch org created by `build create-scratch`.",
2062
+ "summary": "Run Apex tests against the scratch org created by `build create-scratch`.",
2239
2063
  "enableJsonFlag": true,
2240
2064
  "isESM": true,
2241
2065
  "relativePath": [
@@ -2244,42 +2068,43 @@
2244
2068
  "simply",
2245
2069
  "cicd",
2246
2070
  "build",
2247
- "install-dependencies.js"
2071
+ "test-scratch.js"
2248
2072
  ],
2249
2073
  "aliasPermutations": [],
2250
2074
  "permutations": [
2251
- "simply:cicd:build:install-dependencies",
2252
- "cicd:simply:build:install-dependencies",
2253
- "cicd:build:simply:install-dependencies",
2254
- "cicd:build:install-dependencies:simply",
2255
- "simply:build:cicd:install-dependencies",
2256
- "build:simply:cicd:install-dependencies",
2257
- "build:cicd:simply:install-dependencies",
2258
- "build:cicd:install-dependencies:simply",
2259
- "simply:build:install-dependencies:cicd",
2260
- "build:simply:install-dependencies:cicd",
2261
- "build:install-dependencies:simply:cicd",
2262
- "build:install-dependencies:cicd:simply",
2263
- "simply:cicd:install-dependencies:build",
2264
- "cicd:simply:install-dependencies:build",
2265
- "cicd:install-dependencies:simply:build",
2266
- "cicd:install-dependencies:build:simply",
2267
- "simply:install-dependencies:cicd:build",
2268
- "install-dependencies:simply:cicd:build",
2269
- "install-dependencies:cicd:simply:build",
2270
- "install-dependencies:cicd:build:simply",
2271
- "simply:install-dependencies:build:cicd",
2272
- "install-dependencies:simply:build:cicd",
2273
- "install-dependencies:build:simply:cicd",
2274
- "install-dependencies:build:cicd:simply"
2075
+ "simply:cicd:build:test-scratch",
2076
+ "cicd:simply:build:test-scratch",
2077
+ "cicd:build:simply:test-scratch",
2078
+ "cicd:build:test-scratch:simply",
2079
+ "simply:build:cicd:test-scratch",
2080
+ "build:simply:cicd:test-scratch",
2081
+ "build:cicd:simply:test-scratch",
2082
+ "build:cicd:test-scratch:simply",
2083
+ "simply:build:test-scratch:cicd",
2084
+ "build:simply:test-scratch:cicd",
2085
+ "build:test-scratch:simply:cicd",
2086
+ "build:test-scratch:cicd:simply",
2087
+ "simply:cicd:test-scratch:build",
2088
+ "cicd:simply:test-scratch:build",
2089
+ "cicd:test-scratch:simply:build",
2090
+ "cicd:test-scratch:build:simply",
2091
+ "simply:test-scratch:cicd:build",
2092
+ "test-scratch:simply:cicd:build",
2093
+ "test-scratch:cicd:simply:build",
2094
+ "test-scratch:cicd:build:simply",
2095
+ "simply:test-scratch:build:cicd",
2096
+ "test-scratch:simply:build:cicd",
2097
+ "test-scratch:build:simply:cicd",
2098
+ "test-scratch:build:cicd:simply"
2275
2099
  ]
2276
2100
  },
2277
- "simply:cicd:build:lwc-jest": {
2101
+ "simply:cicd:notify:build": {
2278
2102
  "aliases": [],
2279
2103
  "args": {},
2280
- "description": "Installs `@salesforce/sfdx-lwc-jest` and `@sa11y/jest`, then runs `sfdx-lwc-jest --coverage -- --passWithNoTests`. Failures are logged, not thrown.",
2104
+ "description": "Run in every build job's `after_script`. Which card it posts depends on `--ci-job-status`:\n\n- `failed`: a failure card with the job, stage, branch, and pipeline, whichever build job failed.\n- `success`: a package version card, but only when the job created a package version. The card shows the new version tag, its `04t` ID, and the issue references in the commits since the previous version tag. Every other successful job sends nothing.\n- Anything else (e.g. `canceled`): nothing.\n\nThe `04t` ID comes from `--subscriber-package-version-id`, or else from the `subscriberPackageVersionId.env` file that `build create-package-version` writes to the working directory. The new version's tag is the tag at `HEAD` annotated with that ID. The previous version's tag is the nearest earlier tag in the project's version tag format (`plugins.simply.versionTagFormat` or `SIMPLY_CICD_VERSION_TAG_FORMAT`). The command fetches tags, and the full history when the clone is shallow. If a tag or the history can't be found, the card shows `N/A` instead of failing the job.",
2281
2105
  "examples": [
2282
- "<%= config.bin %> <%= command.id %>"
2106
+ "Post a card from a build job's after_script; it only sends one when the job failed or created a package version:\n<%= config.bin %> <%= command.id %> --ci-job-name push-scratch --ci-job-status \"$CI_JOB_STATUS\" --teams-webhook-url https://outlook.office.com/webhook/... --enabled",
2107
+ "Announce a package version with linked Jira stories:\n<%= config.bin %> <%= command.id %> --ci-job-status success --alm-base-url https://jira.example.com/browse --teams-webhook-url https://outlook.office.com/webhook/... --enabled"
2283
2108
  ],
2284
2109
  "flags": {
2285
2110
  "json": {
@@ -2297,29 +2122,129 @@
2297
2122
  "multiple": false,
2298
2123
  "type": "option"
2299
2124
  },
2125
+ "ci-commit-ref-name": {
2126
+ "env": "SIMPLY_CICD_CI_COMMIT_REF_NAME",
2127
+ "name": "ci-commit-ref-name",
2128
+ "summary": "The git branch or tag ref for this pipeline run.",
2129
+ "hasDynamicHelp": false,
2130
+ "multiple": false,
2131
+ "type": "option"
2132
+ },
2133
+ "ci-job-name": {
2134
+ "env": "SIMPLY_CICD_CI_JOB_NAME",
2135
+ "name": "ci-job-name",
2136
+ "summary": "The name of the current CI job.",
2137
+ "hasDynamicHelp": false,
2138
+ "multiple": false,
2139
+ "type": "option"
2140
+ },
2141
+ "ci-job-stage": {
2142
+ "env": "SIMPLY_CICD_CI_JOB_STAGE",
2143
+ "name": "ci-job-stage",
2144
+ "summary": "The stage of the current CI job.",
2145
+ "hasDynamicHelp": false,
2146
+ "multiple": false,
2147
+ "type": "option"
2148
+ },
2149
+ "ci-job-status": {
2150
+ "env": "SIMPLY_CICD_CI_JOB_STATUS",
2151
+ "name": "ci-job-status",
2152
+ "summary": "The status of the current CI job (e.g. success, failed, canceled).",
2153
+ "hasDynamicHelp": false,
2154
+ "multiple": false,
2155
+ "type": "option"
2156
+ },
2157
+ "ci-pipeline-id": {
2158
+ "env": "SIMPLY_CICD_CI_PIPELINE_ID",
2159
+ "name": "ci-pipeline-id",
2160
+ "summary": "The ID of the current CI pipeline.",
2161
+ "hasDynamicHelp": false,
2162
+ "multiple": false,
2163
+ "type": "option"
2164
+ },
2165
+ "ci-pipeline-url": {
2166
+ "env": "SIMPLY_CICD_CI_PIPELINE_URL",
2167
+ "name": "ci-pipeline-url",
2168
+ "summary": "The URL of the current CI pipeline.",
2169
+ "hasDynamicHelp": false,
2170
+ "multiple": false,
2171
+ "type": "option"
2172
+ },
2173
+ "ci-project-title": {
2174
+ "env": "SIMPLY_CICD_CI_PROJECT_TITLE",
2175
+ "name": "ci-project-title",
2176
+ "summary": "The project title shown in the notification card's heading.",
2177
+ "hasDynamicHelp": false,
2178
+ "multiple": false,
2179
+ "type": "option"
2180
+ },
2181
+ "subscriber-package-version-id": {
2182
+ "env": "SIMPLY_CICD_SUBSCRIBER_PACKAGE_VERSION_ID",
2183
+ "name": "subscriber-package-version-id",
2184
+ "summary": "The subscriber package version ID (04t...) created by this job. Defaults to the one in subscriberPackageVersionId.env, written by build create-package-version.",
2185
+ "hasDynamicHelp": false,
2186
+ "multiple": false,
2187
+ "type": "option"
2188
+ },
2189
+ "enabled": {
2190
+ "env": "SIMPLY_CICD_ENABLED",
2191
+ "name": "enabled",
2192
+ "summary": "Whether the notification is actually sent. Defaults to false so pipelines can gate this behind their own condition.",
2193
+ "allowNo": false,
2194
+ "type": "boolean"
2195
+ },
2196
+ "alm-base-url": {
2197
+ "env": "SIMPLY_CICD_ALM_BASE_URL",
2198
+ "name": "alm-base-url",
2199
+ "summary": "Base URL that an issue reference is appended to, e.g. https://jira.example.com/browse for Jira or https://gitlab.com/group/project/-/issues for GitLab Issues. References are shown without links if not provided.",
2200
+ "hasDynamicHelp": false,
2201
+ "multiple": false,
2202
+ "type": "option"
2203
+ },
2204
+ "alm-project-key": {
2205
+ "env": "SIMPLY_CICD_ALM_PROJECT_KEY",
2206
+ "name": "alm-project-key",
2207
+ "summary": "Fallback project key(s) used to search commit messages for issue references, if none are configured in .sfdevrc.json. Only used by prefix-keyed trackers such as Jira.",
2208
+ "hasDynamicHelp": false,
2209
+ "multiple": false,
2210
+ "type": "option"
2211
+ },
2212
+ "alm-provider": {
2213
+ "env": "SIMPLY_CICD_ALM_PROVIDER",
2214
+ "name": "alm-provider",
2215
+ "summary": "The issue tracker whose reference format to look for in commit messages.",
2216
+ "default": "jira",
2217
+ "hasDynamicHelp": false,
2218
+ "multiple": false,
2219
+ "options": [
2220
+ "gitlab-issues",
2221
+ "jira"
2222
+ ],
2223
+ "type": "option"
2224
+ },
2225
+ "teams-webhook-url": {
2226
+ "name": "teams-webhook-url",
2227
+ "summary": "One or more Teams webhook URLs to send the notification to.",
2228
+ "hasDynamicHelp": false,
2229
+ "multiple": true,
2230
+ "type": "option"
2231
+ },
2300
2232
  "debug": {
2301
2233
  "env": "SIMPLY_CICD_DEBUG",
2302
2234
  "name": "debug",
2303
2235
  "summary": "Enable verbose debug logging.",
2304
2236
  "allowNo": false,
2305
2237
  "type": "boolean"
2306
- },
2307
- "disabled": {
2308
- "env": "SIMPLY_CICD_DISABLED",
2309
- "name": "disabled",
2310
- "summary": "Skip this job entirely, logging a warning instead of running it.",
2311
- "allowNo": false,
2312
- "type": "boolean"
2313
2238
  }
2314
2239
  },
2315
2240
  "hasDynamicHelp": false,
2316
2241
  "hiddenAliases": [],
2317
- "id": "simply:cicd:build:lwc-jest",
2242
+ "id": "simply:cicd:notify:build",
2318
2243
  "pluginAlias": "@simplysf/simply-cicd",
2319
2244
  "pluginName": "@simplysf/simply-cicd",
2320
2245
  "pluginType": "core",
2321
2246
  "strict": true,
2322
- "summary": "Install the LWC Jest test libraries and run the project's LWC Jest tests with coverage.",
2247
+ "summary": "Send a build job's failure, or the package version it created, to Microsoft Teams, with issue-tracker integration.",
2323
2248
  "enableJsonFlag": true,
2324
2249
  "isESM": true,
2325
2250
  "relativePath": [
@@ -2327,45 +2252,44 @@
2327
2252
  "commands",
2328
2253
  "simply",
2329
2254
  "cicd",
2330
- "build",
2331
- "lwc-jest.js"
2255
+ "notify",
2256
+ "build.js"
2332
2257
  ],
2333
2258
  "aliasPermutations": [],
2334
2259
  "permutations": [
2335
- "simply:cicd:build:lwc-jest",
2336
- "cicd:simply:build:lwc-jest",
2337
- "cicd:build:simply:lwc-jest",
2338
- "cicd:build:lwc-jest:simply",
2339
- "simply:build:cicd:lwc-jest",
2340
- "build:simply:cicd:lwc-jest",
2341
- "build:cicd:simply:lwc-jest",
2342
- "build:cicd:lwc-jest:simply",
2343
- "simply:build:lwc-jest:cicd",
2344
- "build:simply:lwc-jest:cicd",
2345
- "build:lwc-jest:simply:cicd",
2346
- "build:lwc-jest:cicd:simply",
2347
- "simply:cicd:lwc-jest:build",
2348
- "cicd:simply:lwc-jest:build",
2349
- "cicd:lwc-jest:simply:build",
2350
- "cicd:lwc-jest:build:simply",
2351
- "simply:lwc-jest:cicd:build",
2352
- "lwc-jest:simply:cicd:build",
2353
- "lwc-jest:cicd:simply:build",
2354
- "lwc-jest:cicd:build:simply",
2355
- "simply:lwc-jest:build:cicd",
2356
- "lwc-jest:simply:build:cicd",
2357
- "lwc-jest:build:simply:cicd",
2358
- "lwc-jest:build:cicd:simply"
2260
+ "simply:cicd:notify:build",
2261
+ "cicd:simply:notify:build",
2262
+ "cicd:notify:simply:build",
2263
+ "cicd:notify:build:simply",
2264
+ "simply:notify:cicd:build",
2265
+ "notify:simply:cicd:build",
2266
+ "notify:cicd:simply:build",
2267
+ "notify:cicd:build:simply",
2268
+ "simply:notify:build:cicd",
2269
+ "notify:simply:build:cicd",
2270
+ "notify:build:simply:cicd",
2271
+ "notify:build:cicd:simply",
2272
+ "simply:cicd:build:notify",
2273
+ "cicd:simply:build:notify",
2274
+ "cicd:build:simply:notify",
2275
+ "cicd:build:notify:simply",
2276
+ "simply:build:cicd:notify",
2277
+ "build:simply:cicd:notify",
2278
+ "build:cicd:simply:notify",
2279
+ "build:cicd:notify:simply",
2280
+ "simply:build:notify:cicd",
2281
+ "build:simply:notify:cicd",
2282
+ "build:notify:simply:cicd",
2283
+ "build:notify:cicd:simply"
2359
2284
  ]
2360
2285
  },
2361
- "simply:cicd:build:publish-utam-page-objects": {
2286
+ "simply:cicd:notify:happy-soup": {
2362
2287
  "aliases": [],
2363
2288
  "args": {},
2364
- "description": "Gives every Salesforce Unlocked Package version a matching npm package of compiled UTAM page objects, so a UI-test suite can install exactly the page objects that describe the package version it is testing against.\n\nRuns after `build create-package-version`, whose `04t` it takes as input — from `--subscriber-package-version-id`, from `SUBSCRIBER_PACKAGE_VERSION_ID` in the environment (how a separate job receives that command's dotenv report), or from the dotenv file itself (how a later step in the same job sees it). It compiles every `**/__utam__/**/*.utam.json` under the default package directory with the UTAM compiler, in a staging directory outside the repo, and publishes the result.\n\nThe npm version is derived from the Salesforce version number the same way `sfdx-project.json` writes a dependency pin: `1.2.3.4` becomes `1.2.3-4`, with the git tag's suffix carried as a second prerelease identifier and as the dist-tag, so `1.2.3.4` built from a `beta` package branch is `1.2.3-4.beta` at `beta`, and a release build is `1.2.3-4` at `latest`.\n\nThe compiler is installed at run time rather than shipped with this plugin, so nothing is downloaded unless the command actually runs.\n\nSkips (without failing) when `PACKAGE_CHANGED=FALSE` is set in the environment (see `build determine-package-changes`), when `--disabled` is passed, when no package version ID can be found, when the project authors no page objects, or when this exact version is already on the registry — which is what makes retrying a job that died after publishing succeed rather than fail on a version conflict. Any other failure fails the job: a missing page-object package would silently break every UI test pinned to that version.\n\nOn success, appends `UTAM_PAGE_OBJECTS_PACKAGE` and `UTAM_PAGE_OBJECTS_VERSION` to `--out`, so a downstream job can install the package without knowing the mapping rule.\n\nConfigure the package name, the compiler's type aliases, extra peer dependencies, and a project-owned compiler config under `plugins.simply.utam` in `sfdx-project.json`.",
2289
+ "description": "Run with `--before-script` at the start of a stage to post a \"starting\" card, and with `--after-script` at the end to post a success or failure card. With `--notify-on-completion`, intermediate stage notifications are suppressed and only the final job (`--is-final-job` combined with `--after-script`) posts a card.\n\nOn a successful `--after-script`, reads the packages upgraded by `deploy happy-soup install-packaged` from the deploy progress file, looks up the commit history between each package's previous and target version in its own origin repository, and includes any matched issue references per package in the notification.",
2365
2290
  "examples": [
2366
- "Publish page objects for the version this pipeline just created, reading its ID from the dotenv file:\n<%= config.bin %> <%= command.id %> --packaging-devhub my-packaging-devhub",
2367
- "Publish to a GitLab project registry on a release-branch build:\n<%= config.bin %> <%= command.id %> --packaging-devhub my-packaging-devhub --ci-commit-ref-name release/1.2 --package-release-branch-prefix release/ --npm-registry https://gitlab.example.com/api/v4/projects/42/packages/npm/ --npm-token $CI_JOB_TOKEN",
2368
- "Compile and pack without publishing, to inspect what would be produced:\n<%= config.bin %> <%= command.id %> --packaging-devhub my-packaging-devhub --subscriber-package-version-id 04tXXXXXXXXXXXXXXX --dry-run"
2291
+ "<%= config.bin %> <%= command.id %> --before-script --ci-job-stage pre-destructive --teams-webhook-url https://outlook.office.com/webhook/... --enabled",
2292
+ "<%= config.bin %> <%= command.id %> --after-script --is-final-job --notify-on-completion --ci-job-status success --teams-webhook-url https://outlook.office.com/webhook/... --enabled"
2369
2293
  ],
2370
2294
  "flags": {
2371
2295
  "json": {
@@ -2383,134 +2307,170 @@
2383
2307
  "multiple": false,
2384
2308
  "type": "option"
2385
2309
  },
2386
- "debug": {
2387
- "env": "SIMPLY_CICD_DEBUG",
2388
- "name": "debug",
2389
- "summary": "Enable verbose debug logging.",
2310
+ "after-script": {
2311
+ "name": "after-script",
2312
+ "summary": "Run the after-stage notification logic.",
2390
2313
  "allowNo": false,
2391
2314
  "type": "boolean"
2392
2315
  },
2393
- "disabled": {
2394
- "env": "SIMPLY_CICD_DISABLED",
2395
- "name": "disabled",
2396
- "summary": "Skip this job entirely, logging a warning instead of running it.",
2316
+ "before-script": {
2317
+ "name": "before-script",
2318
+ "summary": "Run the before-stage (starting) notification logic.",
2397
2319
  "allowNo": false,
2398
2320
  "type": "boolean"
2399
2321
  },
2400
- "packaging-devhub": {
2401
- "env": "SIMPLY_CICD_PACKAGING_DEVHUB",
2402
- "name": "packaging-devhub",
2403
- "required": true,
2404
- "summary": "Alias of the Dev Hub that owns the package version. Must already be authenticated.",
2322
+ "ci-commit-ref-name": {
2323
+ "env": "SIMPLY_CICD_CI_COMMIT_REF_NAME",
2324
+ "name": "ci-commit-ref-name",
2325
+ "summary": "The git branch or tag ref for this pipeline run.",
2405
2326
  "hasDynamicHelp": false,
2406
2327
  "multiple": false,
2407
2328
  "type": "option"
2408
2329
  },
2409
- "subscriber-package-version-id": {
2410
- "name": "subscriber-package-version-id",
2411
- "summary": "Subscriber package version ID (04t) to publish page objects for. Falls back to SUBSCRIBER_PACKAGE_VERSION_ID in the environment, then to the same key in --env-file.",
2330
+ "ci-environment-name": {
2331
+ "env": "SIMPLY_CICD_CI_ENVIRONMENT_NAME",
2332
+ "name": "ci-environment-name",
2333
+ "summary": "The name of the target CI environment.",
2412
2334
  "hasDynamicHelp": false,
2413
2335
  "multiple": false,
2414
2336
  "type": "option"
2415
2337
  },
2416
- "npm-package-name": {
2417
- "env": "SIMPLY_CICD_NPM_PACKAGE_NAME",
2418
- "name": "npm-package-name",
2419
- "summary": "npm package name to publish the page objects under. Required unless `plugins.simply.utam.packageName` is set in sfdx-project.json; the flag wins when both are present.",
2338
+ "ci-job-name": {
2339
+ "env": "SIMPLY_CICD_CI_JOB_NAME",
2340
+ "name": "ci-job-name",
2341
+ "summary": "The name of the current CI job.",
2420
2342
  "hasDynamicHelp": false,
2421
2343
  "multiple": false,
2422
2344
  "type": "option"
2423
2345
  },
2424
- "npm-registry": {
2425
- "env": "SIMPLY_CICD_NPM_REGISTRY",
2426
- "name": "npm-registry",
2427
- "summary": "Registry to publish to. Defaults to whatever npm itself is configured to use.",
2346
+ "ci-job-stage": {
2347
+ "env": "SIMPLY_CICD_CI_JOB_STAGE",
2348
+ "name": "ci-job-stage",
2349
+ "summary": "The stage of the current CI job.",
2428
2350
  "hasDynamicHelp": false,
2429
2351
  "multiple": false,
2430
2352
  "type": "option"
2431
2353
  },
2432
- "npm-token": {
2433
- "env": "SIMPLY_CICD_NPM_TOKEN",
2434
- "name": "npm-token",
2435
- "summary": "Auth token for the registry. Written to an .npmrc inside the staging directory only — the repo's own .npmrc is never touched.",
2354
+ "ci-job-status": {
2355
+ "env": "SIMPLY_CICD_CI_JOB_STATUS",
2356
+ "name": "ci-job-status",
2357
+ "summary": "The status of the current CI job (e.g. success, failed).",
2436
2358
  "hasDynamicHelp": false,
2437
2359
  "multiple": false,
2438
2360
  "type": "option"
2439
2361
  },
2440
- "npm-access": {
2441
- "env": "SIMPLY_CICD_NPM_ACCESS",
2442
- "name": "npm-access",
2443
- "summary": "Passed through to npm publish --access. Needed on npmjs.com to publish a scoped package publicly.",
2362
+ "ci-job-token": {
2363
+ "env": "SIMPLY_CICD_CI_JOB_TOKEN",
2364
+ "name": "ci-job-token",
2365
+ "summary": "The CI job token to try first when looking up an upgraded package's origin commit history. Falls back to --project-access-token if the job token can't read that repository.",
2444
2366
  "hasDynamicHelp": false,
2445
2367
  "multiple": false,
2446
- "options": [
2447
- "public",
2448
- "restricted"
2449
- ],
2450
2368
  "type": "option"
2451
2369
  },
2452
- "npm-dist-tag": {
2453
- "name": "npm-dist-tag",
2454
- "summary": "Dist-tag to publish under, overriding the one derived from the git tag's suffix.",
2370
+ "ci-pipeline-id": {
2371
+ "env": "SIMPLY_CICD_CI_PIPELINE_ID",
2372
+ "name": "ci-pipeline-id",
2373
+ "summary": "The ID of the current CI pipeline.",
2455
2374
  "hasDynamicHelp": false,
2456
2375
  "multiple": false,
2457
2376
  "type": "option"
2458
2377
  },
2459
- "ci-commit-ref-name": {
2460
- "env": "SIMPLY_CICD_CI_COMMIT_REF_NAME",
2461
- "name": "ci-commit-ref-name",
2462
- "summary": "Git branch or ref name being built. With --package-release-branch-prefix, reproduces the suffix `create-package-version` put on the git tag, so the npm version mirrors it.",
2378
+ "ci-pipeline-url": {
2379
+ "env": "SIMPLY_CICD_CI_PIPELINE_URL",
2380
+ "name": "ci-pipeline-url",
2381
+ "summary": "The URL of the current CI pipeline.",
2463
2382
  "hasDynamicHelp": false,
2464
2383
  "multiple": false,
2465
2384
  "type": "option"
2466
2385
  },
2467
- "package-release-branch-prefix": {
2468
- "name": "package-release-branch-prefix",
2469
- "summary": "Prefix identifying release branches. Determines whether the npm version and dist-tag carry a branch suffix.",
2386
+ "deploy-progress-file": {
2387
+ "env": "SIMPLY_CICD_DEPLOY_PROGRESS_FILE",
2388
+ "name": "deploy-progress-file",
2389
+ "summary": "Path to the deployment progress file to read upgraded package information from.",
2390
+ "default": "DEPLOY_PROGRESS.json",
2470
2391
  "hasDynamicHelp": false,
2471
2392
  "multiple": false,
2472
2393
  "type": "option"
2473
2394
  },
2474
- "utam-version": {
2475
- "env": "SIMPLY_CICD_UTAM_VERSION",
2476
- "name": "utam-version",
2477
- "summary": "npm version spec of the UTAM compiler to install and compile with.",
2478
- "default": "^3",
2395
+ "enabled": {
2396
+ "env": "SIMPLY_CICD_ENABLED",
2397
+ "name": "enabled",
2398
+ "summary": "Whether the notification is actually sent. Defaults to false so pipelines can gate this behind their own condition.",
2399
+ "allowNo": false,
2400
+ "type": "boolean"
2401
+ },
2402
+ "alm-base-url": {
2403
+ "env": "SIMPLY_CICD_ALM_BASE_URL",
2404
+ "name": "alm-base-url",
2405
+ "summary": "Base URL that an issue reference is appended to, e.g. https://jira.example.com/browse for Jira or https://gitlab.com/group/project/-/issues for GitLab Issues. References are shown without links if not provided.",
2479
2406
  "hasDynamicHelp": false,
2480
2407
  "multiple": false,
2481
2408
  "type": "option"
2482
2409
  },
2483
- "dry-run": {
2484
- "name": "dry-run",
2485
- "summary": "Compile and pack the package without publishing it, copying the tarball into the project directory.",
2486
- "allowNo": false,
2487
- "type": "boolean"
2410
+ "alm-project-key": {
2411
+ "env": "SIMPLY_CICD_ALM_PROJECT_KEY",
2412
+ "name": "alm-project-key",
2413
+ "summary": "Fallback project key(s) used to search commit messages for issue references, if none are configured in .sfdevrc.json. Only used by prefix-keyed trackers such as Jira.",
2414
+ "hasDynamicHelp": false,
2415
+ "multiple": false,
2416
+ "type": "option"
2488
2417
  },
2489
- "out": {
2490
- "name": "out",
2491
- "summary": "Dotenv file to append the published package name and version to.",
2492
- "default": "subscriberPackageVersionId.env",
2418
+ "alm-provider": {
2419
+ "env": "SIMPLY_CICD_ALM_PROVIDER",
2420
+ "name": "alm-provider",
2421
+ "summary": "The issue tracker whose reference format to look for in commit messages.",
2422
+ "default": "jira",
2493
2423
  "hasDynamicHelp": false,
2494
2424
  "multiple": false,
2425
+ "options": [
2426
+ "gitlab-issues",
2427
+ "jira"
2428
+ ],
2495
2429
  "type": "option"
2496
2430
  },
2497
- "env-file": {
2498
- "name": "env-file",
2499
- "summary": "Dotenv file to read SUBSCRIBER_PACKAGE_VERSION_ID from when it isn't passed as a flag or set in the environment.",
2500
- "default": "subscriberPackageVersionId.env",
2431
+ "project-access-token": {
2432
+ "env": "SIMPLY_CICD_PROJECT_ACCESS_TOKEN",
2433
+ "name": "project-access-token",
2434
+ "summary": "A personal or project access token, used to look up an upgraded package's origin commit history when --ci-job-token isn't provided or can't read that repository.",
2501
2435
  "hasDynamicHelp": false,
2502
2436
  "multiple": false,
2503
2437
  "type": "option"
2438
+ },
2439
+ "teams-webhook-url": {
2440
+ "name": "teams-webhook-url",
2441
+ "summary": "One or more Teams webhook URLs to send the notification to.",
2442
+ "hasDynamicHelp": false,
2443
+ "multiple": true,
2444
+ "type": "option"
2445
+ },
2446
+ "notify-on-completion": {
2447
+ "name": "notify-on-completion",
2448
+ "summary": "Only send a notification on the final job of the pipeline, suppressing per-stage notifications.",
2449
+ "allowNo": false,
2450
+ "type": "boolean"
2451
+ },
2452
+ "is-final-job": {
2453
+ "name": "is-final-job",
2454
+ "summary": "Marks this job as the final job in the pipeline. Combined with --after-script and --notify-on-completion, this is what actually triggers the final notification.",
2455
+ "allowNo": false,
2456
+ "type": "boolean"
2457
+ },
2458
+ "debug": {
2459
+ "env": "SIMPLY_CICD_DEBUG",
2460
+ "name": "debug",
2461
+ "summary": "Enable verbose debug logging.",
2462
+ "allowNo": false,
2463
+ "type": "boolean"
2504
2464
  }
2505
2465
  },
2506
2466
  "hasDynamicHelp": false,
2507
2467
  "hiddenAliases": [],
2508
- "id": "simply:cicd:build:publish-utam-page-objects",
2468
+ "id": "simply:cicd:notify:happy-soup",
2509
2469
  "pluginAlias": "@simplysf/simply-cicd",
2510
2470
  "pluginName": "@simplysf/simply-cicd",
2511
2471
  "pluginType": "core",
2512
2472
  "strict": true,
2513
- "summary": "Compile the project's UTAM page objects for a package version and publish them to an npm registry.",
2473
+ "summary": "Send a happy-soup deployment stage notification to Microsoft Teams, with ALM story integration for upgraded packages.",
2514
2474
  "enableJsonFlag": true,
2515
2475
  "isESM": true,
2516
2476
  "relativePath": [
@@ -2518,43 +2478,44 @@
2518
2478
  "commands",
2519
2479
  "simply",
2520
2480
  "cicd",
2521
- "build",
2522
- "publish-utam-page-objects.js"
2481
+ "notify",
2482
+ "happy-soup.js"
2523
2483
  ],
2524
2484
  "aliasPermutations": [],
2525
2485
  "permutations": [
2526
- "simply:cicd:build:publish-utam-page-objects",
2527
- "cicd:simply:build:publish-utam-page-objects",
2528
- "cicd:build:simply:publish-utam-page-objects",
2529
- "cicd:build:publish-utam-page-objects:simply",
2530
- "simply:build:cicd:publish-utam-page-objects",
2531
- "build:simply:cicd:publish-utam-page-objects",
2532
- "build:cicd:simply:publish-utam-page-objects",
2533
- "build:cicd:publish-utam-page-objects:simply",
2534
- "simply:build:publish-utam-page-objects:cicd",
2535
- "build:simply:publish-utam-page-objects:cicd",
2536
- "build:publish-utam-page-objects:simply:cicd",
2537
- "build:publish-utam-page-objects:cicd:simply",
2538
- "simply:cicd:publish-utam-page-objects:build",
2539
- "cicd:simply:publish-utam-page-objects:build",
2540
- "cicd:publish-utam-page-objects:simply:build",
2541
- "cicd:publish-utam-page-objects:build:simply",
2542
- "simply:publish-utam-page-objects:cicd:build",
2543
- "publish-utam-page-objects:simply:cicd:build",
2544
- "publish-utam-page-objects:cicd:simply:build",
2545
- "publish-utam-page-objects:cicd:build:simply",
2546
- "simply:publish-utam-page-objects:build:cicd",
2547
- "publish-utam-page-objects:simply:build:cicd",
2548
- "publish-utam-page-objects:build:simply:cicd",
2549
- "publish-utam-page-objects:build:cicd:simply"
2486
+ "simply:cicd:notify:happy-soup",
2487
+ "cicd:simply:notify:happy-soup",
2488
+ "cicd:notify:simply:happy-soup",
2489
+ "cicd:notify:happy-soup:simply",
2490
+ "simply:notify:cicd:happy-soup",
2491
+ "notify:simply:cicd:happy-soup",
2492
+ "notify:cicd:simply:happy-soup",
2493
+ "notify:cicd:happy-soup:simply",
2494
+ "simply:notify:happy-soup:cicd",
2495
+ "notify:simply:happy-soup:cicd",
2496
+ "notify:happy-soup:simply:cicd",
2497
+ "notify:happy-soup:cicd:simply",
2498
+ "simply:cicd:happy-soup:notify",
2499
+ "cicd:simply:happy-soup:notify",
2500
+ "cicd:happy-soup:simply:notify",
2501
+ "cicd:happy-soup:notify:simply",
2502
+ "simply:happy-soup:cicd:notify",
2503
+ "happy-soup:simply:cicd:notify",
2504
+ "happy-soup:cicd:simply:notify",
2505
+ "happy-soup:cicd:notify:simply",
2506
+ "simply:happy-soup:notify:cicd",
2507
+ "happy-soup:simply:notify:cicd",
2508
+ "happy-soup:notify:simply:cicd",
2509
+ "happy-soup:notify:cicd:simply"
2550
2510
  ]
2551
2511
  },
2552
- "simply:cicd:build:push-scratch": {
2512
+ "simply:cicd:notify:project": {
2553
2513
  "aliases": [],
2554
2514
  "args": {},
2555
- "description": "Reads `SCRATCH_ORG_INFO.json` (written by `build create-scratch`), authenticates as that scratch org, strips metadata types the scratch org push doesn't support (Einstein Conversation Agent file types), and runs `sf project deploy start`. When `--scratch-org-source-dir` is given, also deploys the default package directory's `seedMetadata.path`, if declared in `sfdx-project.json`.\n\nSkipped automatically when `PACKAGE_CHANGED=FALSE` is set in the environment (see `build determine-package-changes`).",
2515
+ "description": "Run once with `--before-script` at the start of a deployment pipeline (to record the previously installed and target package versions), and once with `--after-script` at the end (to post a success or failure card to Teams, including the tracked issues that shipped between those two versions).",
2556
2516
  "examples": [
2557
- "<%= config.bin %> <%= command.id %> --jwt-key-file ./server.key"
2517
+ "<%= config.bin %> <%= command.id %> --before-script --ci-job-stage pre-destructive --alias my-org --enabled",
2518
+ "<%= config.bin %> <%= command.id %> --after-script --ci-job-stage post-destructive --ci-job-status success --teams-webhook-url https://outlook.office.com/webhook/... --enabled"
2558
2519
  ],
2559
2520
  "flags": {
2560
2521
  "json": {
@@ -2572,50 +2533,178 @@
2572
2533
  "multiple": false,
2573
2534
  "type": "option"
2574
2535
  },
2575
- "jwt-key-file": {
2576
- "env": "SIMPLY_CICD_JWT_KEY_FILE",
2577
- "name": "jwt-key-file",
2578
- "summary": "Path to the JWT private key file used to re-authenticate the scratch org (or its Dev Hub) when it was JWT-authenticated. Not needed when the Dev Hub was authenticated via web login or an SFDX auth URL — the scratch org's own refresh token is used instead.",
2536
+ "after-script": {
2537
+ "name": "after-script",
2538
+ "summary": "Run the after-deployment notification logic.",
2539
+ "allowNo": false,
2540
+ "type": "boolean"
2541
+ },
2542
+ "alias": {
2543
+ "env": "SIMPLY_CICD_ALIAS",
2544
+ "name": "alias",
2545
+ "summary": "Alias of the target Salesforce org to query for the previously installed package version. Must already be authenticated.",
2579
2546
  "hasDynamicHelp": false,
2580
2547
  "multiple": false,
2581
2548
  "type": "option"
2582
2549
  },
2583
- "debug": {
2584
- "env": "SIMPLY_CICD_DEBUG",
2585
- "name": "debug",
2586
- "summary": "Enable verbose debug logging.",
2587
- "allowNo": false,
2588
- "type": "boolean"
2589
- },
2590
- "disabled": {
2591
- "env": "SIMPLY_CICD_DISABLED",
2592
- "name": "disabled",
2593
- "summary": "Skip this job entirely, logging a warning instead of running it.",
2550
+ "before-script": {
2551
+ "name": "before-script",
2552
+ "summary": "Run the before-deployment setup logic (resolves and records package versions).",
2594
2553
  "allowNo": false,
2595
2554
  "type": "boolean"
2596
2555
  },
2597
- "ignore-warnings": {
2598
- "name": "ignore-warnings",
2599
- "summary": "Append --ignore-warnings to the underlying sf project deploy start call.",
2600
- "allowNo": false,
2601
- "type": "boolean"
2556
+ "ci-commit-ref-name": {
2557
+ "env": "SIMPLY_CICD_CI_COMMIT_REF_NAME",
2558
+ "name": "ci-commit-ref-name",
2559
+ "summary": "The git branch or tag ref for this pipeline run.",
2560
+ "hasDynamicHelp": false,
2561
+ "multiple": false,
2562
+ "type": "option"
2602
2563
  },
2603
- "scratch-org-source-dir": {
2604
- "name": "scratch-org-source-dir",
2605
- "summary": "Source directory to push to the scratch org, in addition to the default package directory.",
2564
+ "ci-environment-name": {
2565
+ "env": "SIMPLY_CICD_CI_ENVIRONMENT_NAME",
2566
+ "name": "ci-environment-name",
2567
+ "summary": "The name of the target CI environment.",
2606
2568
  "hasDynamicHelp": false,
2607
2569
  "multiple": false,
2608
2570
  "type": "option"
2571
+ },
2572
+ "ci-job-name": {
2573
+ "env": "SIMPLY_CICD_CI_JOB_NAME",
2574
+ "name": "ci-job-name",
2575
+ "summary": "The name of the current CI job.",
2576
+ "hasDynamicHelp": false,
2577
+ "multiple": false,
2578
+ "type": "option"
2579
+ },
2580
+ "ci-job-stage": {
2581
+ "env": "SIMPLY_CICD_CI_JOB_STAGE",
2582
+ "name": "ci-job-stage",
2583
+ "summary": "The stage of the current CI job (e.g. pre-destructive, post-destructive).",
2584
+ "hasDynamicHelp": false,
2585
+ "multiple": false,
2586
+ "type": "option"
2587
+ },
2588
+ "ci-job-status": {
2589
+ "env": "SIMPLY_CICD_CI_JOB_STATUS",
2590
+ "name": "ci-job-status",
2591
+ "summary": "The status of the current CI job (e.g. success, failed, canceled).",
2592
+ "hasDynamicHelp": false,
2593
+ "multiple": false,
2594
+ "type": "option"
2595
+ },
2596
+ "ci-pipeline-id": {
2597
+ "env": "SIMPLY_CICD_CI_PIPELINE_ID",
2598
+ "name": "ci-pipeline-id",
2599
+ "summary": "The ID of the current CI pipeline.",
2600
+ "hasDynamicHelp": false,
2601
+ "multiple": false,
2602
+ "type": "option"
2603
+ },
2604
+ "ci-pipeline-url": {
2605
+ "env": "SIMPLY_CICD_CI_PIPELINE_URL",
2606
+ "name": "ci-pipeline-url",
2607
+ "summary": "The URL of the current CI pipeline.",
2608
+ "hasDynamicHelp": false,
2609
+ "multiple": false,
2610
+ "type": "option"
2611
+ },
2612
+ "ci-project-title": {
2613
+ "env": "SIMPLY_CICD_CI_PROJECT_TITLE",
2614
+ "name": "ci-project-title",
2615
+ "summary": "The project title shown in the notification card's heading.",
2616
+ "hasDynamicHelp": false,
2617
+ "multiple": false,
2618
+ "type": "option"
2619
+ },
2620
+ "packaging-devhub": {
2621
+ "env": "SIMPLY_CICD_PACKAGING_DEVHUB",
2622
+ "name": "packaging-devhub",
2623
+ "summary": "Alias of the Dev Hub used to look up target package version information. Must already be authenticated.",
2624
+ "hasDynamicHelp": false,
2625
+ "multiple": false,
2626
+ "type": "option"
2627
+ },
2628
+ "enabled": {
2629
+ "env": "SIMPLY_CICD_ENABLED",
2630
+ "name": "enabled",
2631
+ "summary": "Whether the notification is actually sent. Defaults to false so pipelines can gate this behind their own condition.",
2632
+ "allowNo": false,
2633
+ "type": "boolean"
2634
+ },
2635
+ "alm-base-url": {
2636
+ "env": "SIMPLY_CICD_ALM_BASE_URL",
2637
+ "name": "alm-base-url",
2638
+ "summary": "Base URL that an issue reference is appended to, e.g. https://jira.example.com/browse for Jira or https://gitlab.com/group/project/-/issues for GitLab Issues. References are shown without links if not provided.",
2639
+ "hasDynamicHelp": false,
2640
+ "multiple": false,
2641
+ "type": "option"
2642
+ },
2643
+ "alm-project-key": {
2644
+ "env": "SIMPLY_CICD_ALM_PROJECT_KEY",
2645
+ "name": "alm-project-key",
2646
+ "summary": "Fallback project key(s) used to search commit messages for issue references, if none are configured in .sfdevrc.json. Only used by prefix-keyed trackers such as Jira.",
2647
+ "hasDynamicHelp": false,
2648
+ "multiple": false,
2649
+ "type": "option"
2650
+ },
2651
+ "alm-provider": {
2652
+ "env": "SIMPLY_CICD_ALM_PROVIDER",
2653
+ "name": "alm-provider",
2654
+ "summary": "The issue tracker whose reference format to look for in commit messages.",
2655
+ "default": "jira",
2656
+ "hasDynamicHelp": false,
2657
+ "multiple": false,
2658
+ "options": [
2659
+ "gitlab-issues",
2660
+ "jira"
2661
+ ],
2662
+ "type": "option"
2663
+ },
2664
+ "prev-installed-package-version": {
2665
+ "name": "prev-installed-package-version",
2666
+ "summary": "The previously installed package version. Only needed if re-running --after-script without having run --before-script first in the same job.",
2667
+ "hasDynamicHelp": false,
2668
+ "multiple": false,
2669
+ "type": "option"
2670
+ },
2671
+ "subscriber-package-version-id": {
2672
+ "name": "subscriber-package-version-id",
2673
+ "summary": "The subscriber package version ID (04t...) being deployed, used to resolve the target package version from the packaging DevHub.",
2674
+ "hasDynamicHelp": false,
2675
+ "multiple": false,
2676
+ "type": "option"
2677
+ },
2678
+ "target-package-version": {
2679
+ "name": "target-package-version",
2680
+ "summary": "The target package version. Only needed if re-running --after-script without having run --before-script first in the same job.",
2681
+ "hasDynamicHelp": false,
2682
+ "multiple": false,
2683
+ "type": "option"
2684
+ },
2685
+ "teams-webhook-url": {
2686
+ "name": "teams-webhook-url",
2687
+ "summary": "One or more Teams webhook URLs to send the notification to.",
2688
+ "hasDynamicHelp": false,
2689
+ "multiple": true,
2690
+ "type": "option"
2691
+ },
2692
+ "debug": {
2693
+ "env": "SIMPLY_CICD_DEBUG",
2694
+ "name": "debug",
2695
+ "summary": "Enable verbose debug logging.",
2696
+ "allowNo": false,
2697
+ "type": "boolean"
2609
2698
  }
2610
2699
  },
2611
2700
  "hasDynamicHelp": false,
2612
2701
  "hiddenAliases": [],
2613
- "id": "simply:cicd:build:push-scratch",
2702
+ "id": "simply:cicd:notify:project",
2614
2703
  "pluginAlias": "@simplysf/simply-cicd",
2615
2704
  "pluginName": "@simplysf/simply-cicd",
2616
2705
  "pluginType": "core",
2617
2706
  "strict": true,
2618
- "summary": "Push source to the scratch org created by `build create-scratch`.",
2707
+ "summary": "Send a project deployment notification to Microsoft Teams, with issue-tracker integration.",
2619
2708
  "enableJsonFlag": true,
2620
2709
  "isESM": true,
2621
2710
  "relativePath": [
@@ -2623,43 +2712,43 @@
2623
2712
  "commands",
2624
2713
  "simply",
2625
2714
  "cicd",
2626
- "build",
2627
- "push-scratch.js"
2715
+ "notify",
2716
+ "project.js"
2628
2717
  ],
2629
2718
  "aliasPermutations": [],
2630
2719
  "permutations": [
2631
- "simply:cicd:build:push-scratch",
2632
- "cicd:simply:build:push-scratch",
2633
- "cicd:build:simply:push-scratch",
2634
- "cicd:build:push-scratch:simply",
2635
- "simply:build:cicd:push-scratch",
2636
- "build:simply:cicd:push-scratch",
2637
- "build:cicd:simply:push-scratch",
2638
- "build:cicd:push-scratch:simply",
2639
- "simply:build:push-scratch:cicd",
2640
- "build:simply:push-scratch:cicd",
2641
- "build:push-scratch:simply:cicd",
2642
- "build:push-scratch:cicd:simply",
2643
- "simply:cicd:push-scratch:build",
2644
- "cicd:simply:push-scratch:build",
2645
- "cicd:push-scratch:simply:build",
2646
- "cicd:push-scratch:build:simply",
2647
- "simply:push-scratch:cicd:build",
2648
- "push-scratch:simply:cicd:build",
2649
- "push-scratch:cicd:simply:build",
2650
- "push-scratch:cicd:build:simply",
2651
- "simply:push-scratch:build:cicd",
2652
- "push-scratch:simply:build:cicd",
2653
- "push-scratch:build:simply:cicd",
2654
- "push-scratch:build:cicd:simply"
2720
+ "simply:cicd:notify:project",
2721
+ "cicd:simply:notify:project",
2722
+ "cicd:notify:simply:project",
2723
+ "cicd:notify:project:simply",
2724
+ "simply:notify:cicd:project",
2725
+ "notify:simply:cicd:project",
2726
+ "notify:cicd:simply:project",
2727
+ "notify:cicd:project:simply",
2728
+ "simply:notify:project:cicd",
2729
+ "notify:simply:project:cicd",
2730
+ "notify:project:simply:cicd",
2731
+ "notify:project:cicd:simply",
2732
+ "simply:cicd:project:notify",
2733
+ "cicd:simply:project:notify",
2734
+ "cicd:project:simply:notify",
2735
+ "cicd:project:notify:simply",
2736
+ "simply:project:cicd:notify",
2737
+ "project:simply:cicd:notify",
2738
+ "project:cicd:simply:notify",
2739
+ "project:cicd:notify:simply",
2740
+ "simply:project:notify:cicd",
2741
+ "project:simply:notify:cicd",
2742
+ "project:notify:simply:cicd",
2743
+ "project:notify:cicd:simply"
2655
2744
  ]
2656
2745
  },
2657
- "simply:cicd:build:test-scratch": {
2746
+ "simply:cicd:notify:teams": {
2658
2747
  "aliases": [],
2659
2748
  "args": {},
2660
- "description": "Reads `SCRATCH_ORG_INFO.json` (written by `build create-scratch`), authenticates as that scratch org, and runs its Apex tests with `RunLocalTests`.\n\nSkipped automatically when `PACKAGE_CHANGED=FALSE` is set in the environment (see `build determine-package-changes`).",
2749
+ "description": "Posts a payload as-is to one or more Microsoft Teams incoming webhook URLs. Use this for custom notifications that don't fit the built-in `notify project`, `notify happy-soup`, or `notify build` card templates.",
2661
2750
  "examples": [
2662
- "<%= config.bin %> <%= command.id %> --jwt-key-file ./server.key"
2751
+ "<%= config.bin %> <%= command.id %> --payload '{\"text\":\"Deployment complete\"}' --webhook-url https://outlook.office.com/webhook/... --enabled"
2663
2752
  ],
2664
2753
  "flags": {
2665
2754
  "json": {
@@ -2677,43 +2766,46 @@
2677
2766
  "multiple": false,
2678
2767
  "type": "option"
2679
2768
  },
2680
- "jwt-key-file": {
2681
- "env": "SIMPLY_CICD_JWT_KEY_FILE",
2682
- "name": "jwt-key-file",
2683
- "summary": "Path to the JWT private key file used to re-authenticate the scratch org (or its Dev Hub) when it was JWT-authenticated. Not needed when the Dev Hub was authenticated via web login or an SFDX auth URL — the scratch org's own refresh token is used instead.",
2769
+ "payload": {
2770
+ "name": "payload",
2771
+ "required": true,
2772
+ "summary": "The JSON payload to send to Teams, as a serialized string.",
2684
2773
  "hasDynamicHelp": false,
2685
2774
  "multiple": false,
2686
2775
  "type": "option"
2687
2776
  },
2688
- "debug": {
2689
- "env": "SIMPLY_CICD_DEBUG",
2690
- "name": "debug",
2691
- "summary": "Enable verbose debug logging.",
2692
- "allowNo": false,
2693
- "type": "boolean"
2777
+ "webhook-url": {
2778
+ "env": "SIMPLY_CICD_WEBHOOK_URL",
2779
+ "name": "webhook-url",
2780
+ "required": true,
2781
+ "summary": "The Teams webhook URL to send the payload to.",
2782
+ "hasDynamicHelp": false,
2783
+ "multiple": false,
2784
+ "type": "option"
2694
2785
  },
2695
- "disabled": {
2696
- "env": "SIMPLY_CICD_DISABLED",
2697
- "name": "disabled",
2698
- "summary": "Skip this job entirely, logging a warning instead of running it.",
2786
+ "enabled": {
2787
+ "env": "SIMPLY_CICD_ENABLED",
2788
+ "name": "enabled",
2789
+ "summary": "Whether the notification is actually sent. Defaults to false so pipelines can gate this behind their own condition.",
2699
2790
  "allowNo": false,
2700
2791
  "type": "boolean"
2701
2792
  },
2702
- "disable-apex-tests": {
2703
- "name": "disable-apex-tests",
2704
- "summary": "Skip running Apex tests, without skipping the rest of the job.",
2793
+ "debug": {
2794
+ "env": "SIMPLY_CICD_DEBUG",
2795
+ "name": "debug",
2796
+ "summary": "Enable verbose debug logging.",
2705
2797
  "allowNo": false,
2706
2798
  "type": "boolean"
2707
2799
  }
2708
2800
  },
2709
2801
  "hasDynamicHelp": false,
2710
2802
  "hiddenAliases": [],
2711
- "id": "simply:cicd:build:test-scratch",
2803
+ "id": "simply:cicd:notify:teams",
2712
2804
  "pluginAlias": "@simplysf/simply-cicd",
2713
2805
  "pluginName": "@simplysf/simply-cicd",
2714
2806
  "pluginType": "core",
2715
2807
  "strict": true,
2716
- "summary": "Run Apex tests against the scratch org created by `build create-scratch`.",
2808
+ "summary": "Send a serialized JSON payload to a Microsoft Teams webhook.",
2717
2809
  "enableJsonFlag": true,
2718
2810
  "isESM": true,
2719
2811
  "relativePath": [
@@ -2721,35 +2813,35 @@
2721
2813
  "commands",
2722
2814
  "simply",
2723
2815
  "cicd",
2724
- "build",
2725
- "test-scratch.js"
2816
+ "notify",
2817
+ "teams.js"
2726
2818
  ],
2727
2819
  "aliasPermutations": [],
2728
2820
  "permutations": [
2729
- "simply:cicd:build:test-scratch",
2730
- "cicd:simply:build:test-scratch",
2731
- "cicd:build:simply:test-scratch",
2732
- "cicd:build:test-scratch:simply",
2733
- "simply:build:cicd:test-scratch",
2734
- "build:simply:cicd:test-scratch",
2735
- "build:cicd:simply:test-scratch",
2736
- "build:cicd:test-scratch:simply",
2737
- "simply:build:test-scratch:cicd",
2738
- "build:simply:test-scratch:cicd",
2739
- "build:test-scratch:simply:cicd",
2740
- "build:test-scratch:cicd:simply",
2741
- "simply:cicd:test-scratch:build",
2742
- "cicd:simply:test-scratch:build",
2743
- "cicd:test-scratch:simply:build",
2744
- "cicd:test-scratch:build:simply",
2745
- "simply:test-scratch:cicd:build",
2746
- "test-scratch:simply:cicd:build",
2747
- "test-scratch:cicd:simply:build",
2748
- "test-scratch:cicd:build:simply",
2749
- "simply:test-scratch:build:cicd",
2750
- "test-scratch:simply:build:cicd",
2751
- "test-scratch:build:simply:cicd",
2752
- "test-scratch:build:cicd:simply"
2821
+ "simply:cicd:notify:teams",
2822
+ "cicd:simply:notify:teams",
2823
+ "cicd:notify:simply:teams",
2824
+ "cicd:notify:teams:simply",
2825
+ "simply:notify:cicd:teams",
2826
+ "notify:simply:cicd:teams",
2827
+ "notify:cicd:simply:teams",
2828
+ "notify:cicd:teams:simply",
2829
+ "simply:notify:teams:cicd",
2830
+ "notify:simply:teams:cicd",
2831
+ "notify:teams:simply:cicd",
2832
+ "notify:teams:cicd:simply",
2833
+ "simply:cicd:teams:notify",
2834
+ "cicd:simply:teams:notify",
2835
+ "cicd:teams:simply:notify",
2836
+ "cicd:teams:notify:simply",
2837
+ "simply:teams:cicd:notify",
2838
+ "teams:simply:cicd:notify",
2839
+ "teams:cicd:simply:notify",
2840
+ "teams:cicd:notify:simply",
2841
+ "simply:teams:notify:cicd",
2842
+ "teams:simply:notify:cicd",
2843
+ "teams:notify:simply:cicd",
2844
+ "teams:notify:cicd:simply"
2753
2845
  ]
2754
2846
  },
2755
2847
  "simply:cicd:deploy:happy-soup:deploy-unpackaged": {
@@ -6704,5 +6796,5 @@
6704
6796
  ]
6705
6797
  }
6706
6798
  },
6707
- "version": "0.16.0"
6799
+ "version": "0.18.0"
6708
6800
  }