@simplysf/simply-cicd 0.3.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.
- package/README.md +1621 -0
- package/lib/commands/simply/cicd/build/cleanup-scratch-orgs.d.ts +21 -0
- package/lib/commands/simply/cicd/build/cleanup-scratch-orgs.js +47 -0
- package/lib/commands/simply/cicd/build/cleanup-scratch-orgs.js.map +1 -0
- package/lib/commands/simply/cicd/build/create-fallback-tag.d.ts +25 -0
- package/lib/commands/simply/cicd/build/create-fallback-tag.js +63 -0
- package/lib/commands/simply/cicd/build/create-fallback-tag.js.map +1 -0
- package/lib/commands/simply/cicd/build/create-package-version.d.ts +32 -0
- package/lib/commands/simply/cicd/build/create-package-version.js +110 -0
- package/lib/commands/simply/cicd/build/create-package-version.js.map +1 -0
- package/lib/commands/simply/cicd/build/create-scratch.d.ts +25 -0
- package/lib/commands/simply/cicd/build/create-scratch.js +63 -0
- package/lib/commands/simply/cicd/build/create-scratch.js.map +1 -0
- package/lib/commands/simply/cicd/build/delete-scratch.d.ts +21 -0
- package/lib/commands/simply/cicd/build/delete-scratch.js +53 -0
- package/lib/commands/simply/cicd/build/delete-scratch.js.map +1 -0
- package/lib/commands/simply/cicd/build/determine-package-changes.d.ts +17 -0
- package/lib/commands/simply/cicd/build/determine-package-changes.js +44 -0
- package/lib/commands/simply/cicd/build/determine-package-changes.js.map +1 -0
- package/lib/commands/simply/cicd/build/generate-flexipage-diff.d.ts +20 -0
- package/lib/commands/simply/cicd/build/generate-flexipage-diff.js +47 -0
- package/lib/commands/simply/cicd/build/generate-flexipage-diff.js.map +1 -0
- package/lib/commands/simply/cicd/build/generate-flow-diff.d.ts +20 -0
- package/lib/commands/simply/cicd/build/generate-flow-diff.js +47 -0
- package/lib/commands/simply/cicd/build/generate-flow-diff.js.map +1 -0
- package/lib/commands/simply/cicd/build/install-dependencies.d.ts +18 -0
- package/lib/commands/simply/cicd/build/install-dependencies.js +58 -0
- package/lib/commands/simply/cicd/build/install-dependencies.js.map +1 -0
- package/lib/commands/simply/cicd/build/lwc-jest.d.ts +14 -0
- package/lib/commands/simply/cicd/build/lwc-jest.js +37 -0
- package/lib/commands/simply/cicd/build/lwc-jest.js.map +1 -0
- package/lib/commands/simply/cicd/build/push-scratch.d.ts +19 -0
- package/lib/commands/simply/cicd/build/push-scratch.js +57 -0
- package/lib/commands/simply/cicd/build/push-scratch.js.map +1 -0
- package/lib/commands/simply/cicd/build/test-scratch.d.ts +18 -0
- package/lib/commands/simply/cicd/build/test-scratch.js +58 -0
- package/lib/commands/simply/cicd/build/test-scratch.js.map +1 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/deploy-unpackaged.d.ts +29 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/deploy-unpackaged.js +36 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/deploy-unpackaged.js.map +1 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/deployment-close-out.d.ts +23 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/deployment-close-out.js +82 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/deployment-close-out.js.map +1 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/install-packaged.d.ts +21 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/install-packaged.js +57 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/install-packaged.js.map +1 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/post-deploy.d.ts +29 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/post-deploy.js +36 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/post-deploy.js.map +1 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/post-destructive.d.ts +29 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/post-destructive.js +36 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/post-destructive.js.map +1 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/pre-destructive.d.ts +29 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/pre-destructive.js +36 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/pre-destructive.js.map +1 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/tag-deployment.d.ts +28 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/tag-deployment.js +89 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/tag-deployment.js.map +1 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/validate.d.ts +15 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/validate.js +49 -0
- package/lib/commands/simply/cicd/deploy/happy-soup/validate.js.map +1 -0
- package/lib/commands/simply/cicd/deploy/project/deploy-unpackaged.d.ts +28 -0
- package/lib/commands/simply/cicd/deploy/project/deploy-unpackaged.js +36 -0
- package/lib/commands/simply/cicd/deploy/project/deploy-unpackaged.js.map +1 -0
- package/lib/commands/simply/cicd/deploy/project/install-packaged.d.ts +24 -0
- package/lib/commands/simply/cicd/deploy/project/install-packaged.js +69 -0
- package/lib/commands/simply/cicd/deploy/project/install-packaged.js.map +1 -0
- package/lib/commands/simply/cicd/deploy/project/post-deploy.d.ts +28 -0
- package/lib/commands/simply/cicd/deploy/project/post-deploy.js +36 -0
- package/lib/commands/simply/cicd/deploy/project/post-deploy.js.map +1 -0
- package/lib/commands/simply/cicd/deploy/project/post-destructive.d.ts +28 -0
- package/lib/commands/simply/cicd/deploy/project/post-destructive.js +36 -0
- package/lib/commands/simply/cicd/deploy/project/post-destructive.js.map +1 -0
- package/lib/commands/simply/cicd/deploy/project/pre-destructive.d.ts +28 -0
- package/lib/commands/simply/cicd/deploy/project/pre-destructive.js +36 -0
- package/lib/commands/simply/cicd/deploy/project/pre-destructive.js.map +1 -0
- package/lib/commands/simply/cicd/deploy/project/run-apex-tests.d.ts +26 -0
- package/lib/commands/simply/cicd/deploy/project/run-apex-tests.js +66 -0
- package/lib/commands/simply/cicd/deploy/project/run-apex-tests.js.map +1 -0
- package/lib/commands/simply/cicd/deploy/project/validate.d.ts +14 -0
- package/lib/commands/simply/cicd/deploy/project/validate.js +51 -0
- package/lib/commands/simply/cicd/deploy/project/validate.js.map +1 -0
- package/lib/commands/simply/cicd/deploy/validate.d.ts +14 -0
- package/lib/commands/simply/cicd/deploy/validate.js +50 -0
- package/lib/commands/simply/cicd/deploy/validate.js.map +1 -0
- package/lib/commands/simply/cicd/notify/happy-soup.d.ts +32 -0
- package/lib/commands/simply/cicd/notify/happy-soup.js +193 -0
- package/lib/commands/simply/cicd/notify/happy-soup.js.map +1 -0
- package/lib/commands/simply/cicd/notify/project.d.ts +51 -0
- package/lib/commands/simply/cicd/notify/project.js +376 -0
- package/lib/commands/simply/cicd/notify/project.js.map +1 -0
- package/lib/commands/simply/cicd/notify/teams.d.ts +18 -0
- package/lib/commands/simply/cicd/notify/teams.js +77 -0
- package/lib/commands/simply/cicd/notify/teams.js.map +1 -0
- package/lib/commands/simply/cicd/sfdx-dependabot.d.ts +84 -0
- package/lib/commands/simply/cicd/sfdx-dependabot.js +469 -0
- package/lib/commands/simply/cicd/sfdx-dependabot.js.map +1 -0
- package/lib/common/build/cleanupScratchOrgs.d.ts +7 -0
- package/lib/common/build/cleanupScratchOrgs.js +91 -0
- package/lib/common/build/cleanupScratchOrgs.js.map +1 -0
- package/lib/common/build/createFallbackTag.d.ts +24 -0
- package/lib/common/build/createFallbackTag.js +96 -0
- package/lib/common/build/createFallbackTag.js.map +1 -0
- package/lib/common/build/createPackageVersion.d.ts +27 -0
- package/lib/common/build/createPackageVersion.js +164 -0
- package/lib/common/build/createPackageVersion.js.map +1 -0
- package/lib/common/build/createScratchOrg.d.ts +14 -0
- package/lib/common/build/createScratchOrg.js +191 -0
- package/lib/common/build/createScratchOrg.js.map +1 -0
- package/lib/common/build/deleteScratchOrg.d.ts +12 -0
- package/lib/common/build/deleteScratchOrg.js +58 -0
- package/lib/common/build/deleteScratchOrg.js.map +1 -0
- package/lib/common/build/determinePackageChanges.d.ts +13 -0
- package/lib/common/build/determinePackageChanges.js +98 -0
- package/lib/common/build/determinePackageChanges.js.map +1 -0
- package/lib/common/build/devHubs.d.ts +8 -0
- package/lib/common/build/devHubs.js +30 -0
- package/lib/common/build/devHubs.js.map +1 -0
- package/lib/common/build/flags.d.ts +36 -0
- package/lib/common/build/flags.js +120 -0
- package/lib/common/build/flags.js.map +1 -0
- package/lib/common/build/flexipageDelta.d.ts +31 -0
- package/lib/common/build/flexipageDelta.js +92 -0
- package/lib/common/build/flexipageDelta.js.map +1 -0
- package/lib/common/build/flowDelta.d.ts +30 -0
- package/lib/common/build/flowDelta.js +91 -0
- package/lib/common/build/flowDelta.js.map +1 -0
- package/lib/common/build/installDependencies.d.ts +7 -0
- package/lib/common/build/installDependencies.js +36 -0
- package/lib/common/build/installDependencies.js.map +1 -0
- package/lib/common/build/lwcJest.d.ts +9 -0
- package/lib/common/build/lwcJest.js +36 -0
- package/lib/common/build/lwcJest.js.map +1 -0
- package/lib/common/build/pushScratch.d.ts +8 -0
- package/lib/common/build/pushScratch.js +63 -0
- package/lib/common/build/pushScratch.js.map +1 -0
- package/lib/common/build/scratchOrgInfo.d.ts +10 -0
- package/lib/common/build/scratchOrgInfo.js +21 -0
- package/lib/common/build/scratchOrgInfo.js.map +1 -0
- package/lib/common/build/skipGuard.d.ts +8 -0
- package/lib/common/build/skipGuard.js +41 -0
- package/lib/common/build/skipGuard.js.map +1 -0
- package/lib/common/build/testScratch.d.ts +14 -0
- package/lib/common/build/testScratch.js +45 -0
- package/lib/common/build/testScratch.js.map +1 -0
- package/lib/common/deploy/deployCommon.d.ts +101 -0
- package/lib/common/deploy/deployCommon.js +361 -0
- package/lib/common/deploy/deployCommon.js.map +1 -0
- package/lib/common/deploy/deployHappySoup.d.ts +54 -0
- package/lib/common/deploy/deployHappySoup.js +143 -0
- package/lib/common/deploy/deployHappySoup.js.map +1 -0
- package/lib/common/deploy/deployProject.d.ts +24 -0
- package/lib/common/deploy/deployProject.js +114 -0
- package/lib/common/deploy/deployProject.js.map +1 -0
- package/lib/common/deploy/flags.d.ts +34 -0
- package/lib/common/deploy/flags.js +91 -0
- package/lib/common/deploy/flags.js.map +1 -0
- package/lib/common/deploy/runDeployStage.d.ts +16 -0
- package/lib/common/deploy/runDeployStage.js +65 -0
- package/lib/common/deploy/runDeployStage.js.map +1 -0
- package/lib/common/deploy/stageCommand.d.ts +106 -0
- package/lib/common/deploy/stageCommand.js +131 -0
- package/lib/common/deploy/stageCommand.js.map +1 -0
- package/lib/common/deploy/validate.d.ts +11 -0
- package/lib/common/deploy/validate.js +54 -0
- package/lib/common/deploy/validate.js.map +1 -0
- package/lib/common/env.d.ts +9 -0
- package/lib/common/env.js +47 -0
- package/lib/common/env.js.map +1 -0
- package/lib/common/exec/sfCli.d.ts +27 -0
- package/lib/common/exec/sfCli.js +50 -0
- package/lib/common/exec/sfCli.js.map +1 -0
- package/lib/common/flags/env.d.ts +44 -0
- package/lib/common/flags/env.js +81 -0
- package/lib/common/flags/env.js.map +1 -0
- package/lib/common/git.d.ts +19 -0
- package/lib/common/git.js +79 -0
- package/lib/common/git.js.map +1 -0
- package/lib/common/logger.d.ts +10 -0
- package/lib/common/logger.js +33 -0
- package/lib/common/logger.js.map +1 -0
- package/lib/common/notify/getCommitStories.d.ts +16 -0
- package/lib/common/notify/getCommitStories.js +69 -0
- package/lib/common/notify/getCommitStories.js.map +1 -0
- package/lib/common/notify/renderTemplate.d.ts +3 -0
- package/lib/common/notify/renderTemplate.js +24 -0
- package/lib/common/notify/renderTemplate.js.map +1 -0
- package/lib/common/notify/sendNotification.d.ts +2 -0
- package/lib/common/notify/sendNotification.js +50 -0
- package/lib/common/notify/sendNotification.js.map +1 -0
- package/lib/common/notify/templates.d.ts +11 -0
- package/lib/common/notify/templates.js +85 -0
- package/lib/common/notify/templates.js.map +1 -0
- package/lib/common/schemas/deployConfig.d.ts +25 -0
- package/lib/common/schemas/deployConfig.js +55 -0
- package/lib/common/schemas/deployConfig.js.map +1 -0
- package/lib/common/schemas/deployProgress.d.ts +10 -0
- package/lib/common/schemas/deployProgress.js +27 -0
- package/lib/common/schemas/deployProgress.js.map +1 -0
- package/lib/common/schemas/deployRules.d.ts +34 -0
- package/lib/common/schemas/deployRules.js +40 -0
- package/lib/common/schemas/deployRules.js.map +1 -0
- package/lib/common/sfApex.d.ts +22 -0
- package/lib/common/sfApex.js +158 -0
- package/lib/common/sfApex.js.map +1 -0
- package/lib/common/sfAuth.d.ts +30 -0
- package/lib/common/sfAuth.js +99 -0
- package/lib/common/sfAuth.js.map +1 -0
- package/lib/common/sfConfig.d.ts +6 -0
- package/lib/common/sfConfig.js +45 -0
- package/lib/common/sfConfig.js.map +1 -0
- package/lib/common/sfPackages.d.ts +12 -0
- package/lib/common/sfPackages.js +53 -0
- package/lib/common/sfPackages.js.map +1 -0
- package/lib/common/sfPlugins.d.ts +11 -0
- package/lib/common/sfPlugins.js +134 -0
- package/lib/common/sfPlugins.js.map +1 -0
- package/lib/common/sfdxDependabot/updater.d.ts +14 -0
- package/lib/common/sfdxDependabot/updater.js +94 -0
- package/lib/common/sfdxDependabot/updater.js.map +1 -0
- package/lib/common/vcs/gitlab.d.ts +21 -0
- package/lib/common/vcs/gitlab.js +208 -0
- package/lib/common/vcs/gitlab.js.map +1 -0
- package/lib/common/vcs/index.d.ts +4 -0
- package/lib/common/vcs/index.js +26 -0
- package/lib/common/vcs/index.js.map +1 -0
- package/lib/common/vcs/types.d.ts +69 -0
- package/lib/common/vcs/types.js +17 -0
- package/lib/common/vcs/types.js.map +1 -0
- package/lib/config/defaultDeploymentPlugins.d.ts +2 -0
- package/lib/config/defaultDeploymentPlugins.js +18 -0
- package/lib/config/defaultDeploymentPlugins.js.map +1 -0
- package/lib/config/trustedPlugins.d.ts +2 -0
- package/lib/config/trustedPlugins.js +18 -0
- package/lib/config/trustedPlugins.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +17 -0
- package/lib/index.js.map +1 -0
- package/messages/simply.cicd.build.cleanup-scratch-orgs.md +11 -0
- package/messages/simply.cicd.build.create-fallback-tag.md +21 -0
- package/messages/simply.cicd.build.create-package-version.md +49 -0
- package/messages/simply.cicd.build.create-scratch.md +21 -0
- package/messages/simply.cicd.build.delete-scratch.md +13 -0
- package/messages/simply.cicd.build.determine-package-changes.md +15 -0
- package/messages/simply.cicd.build.generate-flexipage-diff.md +11 -0
- package/messages/simply.cicd.build.generate-flow-diff.md +11 -0
- package/messages/simply.cicd.build.install-dependencies.md +17 -0
- package/messages/simply.cicd.build.lwc-jest.md +11 -0
- package/messages/simply.cicd.build.md +75 -0
- package/messages/simply.cicd.build.push-scratch.md +21 -0
- package/messages/simply.cicd.build.test-scratch.md +17 -0
- package/messages/simply.cicd.deploy.happy-soup.deploy-unpackaged.md +11 -0
- package/messages/simply.cicd.deploy.happy-soup.deployment-close-out.md +39 -0
- package/messages/simply.cicd.deploy.happy-soup.install-packaged.md +15 -0
- package/messages/simply.cicd.deploy.happy-soup.post-deploy.md +11 -0
- package/messages/simply.cicd.deploy.happy-soup.post-destructive.md +11 -0
- package/messages/simply.cicd.deploy.happy-soup.pre-destructive.md +11 -0
- package/messages/simply.cicd.deploy.happy-soup.tag-deployment.md +35 -0
- package/messages/simply.cicd.deploy.happy-soup.validate.md +25 -0
- package/messages/simply.cicd.deploy.md +75 -0
- package/messages/simply.cicd.deploy.project.deploy-unpackaged.md +11 -0
- package/messages/simply.cicd.deploy.project.install-packaged.md +23 -0
- package/messages/simply.cicd.deploy.project.post-deploy.md +11 -0
- package/messages/simply.cicd.deploy.project.post-destructive.md +11 -0
- package/messages/simply.cicd.deploy.project.pre-destructive.md +11 -0
- package/messages/simply.cicd.deploy.project.run-apex-tests.md +15 -0
- package/messages/simply.cicd.deploy.project.validate.md +25 -0
- package/messages/simply.cicd.deploy.validate.md +25 -0
- package/messages/simply.cicd.md +3 -0
- package/messages/simply.cicd.notify.happy-soup.md +73 -0
- package/messages/simply.cicd.notify.project.md +125 -0
- package/messages/simply.cicd.notify.teams.md +27 -0
- package/messages/simply.cicd.sfdx-dependabot.md +91 -0
- package/package.json +214 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
export type BuildCleanupScratchOrgsResult = {
|
|
3
|
+
skipped: boolean;
|
|
4
|
+
};
|
|
5
|
+
/** Deletes scratch orgs older than 3 hours from every configured Dev Hub. */
|
|
6
|
+
export default class BuildCleanupScratchOrgs extends SfCommand<BuildCleanupScratchOrgsResult> {
|
|
7
|
+
static readonly summary: string;
|
|
8
|
+
static readonly description: string;
|
|
9
|
+
static readonly examples: string[];
|
|
10
|
+
static readonly flags: {
|
|
11
|
+
disabled: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
debug: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
'jwt-key-file': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'dev-hub-name': import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'dev-hub-username': import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'dev-hub-client-id': import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'dev-hub-instance-url': import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
'flags-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
};
|
|
20
|
+
run(): Promise<BuildCleanupScratchOrgsResult>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, Clay Chipps; Copyright (c) 2026 Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Messages } from '@salesforce/core';
|
|
17
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
18
|
+
import { cleanupScratchOrgs } from '../../../../common/build/cleanupScratchOrgs.js';
|
|
19
|
+
import { parseDevHubs } from '../../../../common/build/devHubs.js';
|
|
20
|
+
import { debugFlag, devHubFlags, disabledFlag, jwtKeyFileFlag } from '../../../../common/build/flags.js';
|
|
21
|
+
import { logger } from '../../../../common/logger.js';
|
|
22
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
23
|
+
const messages = Messages.loadMessages('@simplysf/simply-cicd', 'simply.cicd.build.cleanup-scratch-orgs');
|
|
24
|
+
/** Deletes scratch orgs older than 3 hours from every configured Dev Hub. */
|
|
25
|
+
export default class BuildCleanupScratchOrgs extends SfCommand {
|
|
26
|
+
static summary = messages.getMessage('summary');
|
|
27
|
+
static description = messages.getMessage('description');
|
|
28
|
+
static examples = messages.getMessages('examples');
|
|
29
|
+
static flags = {
|
|
30
|
+
...SfCommand.baseFlags,
|
|
31
|
+
...devHubFlags,
|
|
32
|
+
...jwtKeyFileFlag,
|
|
33
|
+
...debugFlag,
|
|
34
|
+
...disabledFlag,
|
|
35
|
+
};
|
|
36
|
+
async run() {
|
|
37
|
+
const { flags } = await this.parse(BuildCleanupScratchOrgs);
|
|
38
|
+
if (flags.disabled) {
|
|
39
|
+
logger.warn('cleanup-scratch-orgs is disabled. Skipping.');
|
|
40
|
+
return { skipped: true };
|
|
41
|
+
}
|
|
42
|
+
const devHubs = parseDevHubs(flags['dev-hub-name'], flags['dev-hub-username'], flags['dev-hub-client-id'], flags['dev-hub-instance-url']);
|
|
43
|
+
await cleanupScratchOrgs({ jwtKeyFile: flags['jwt-key-file'], debug: flags.debug }, devHubs);
|
|
44
|
+
return { skipped: false };
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=cleanup-scratch-orgs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleanup-scratch-orgs.js","sourceRoot":"","sources":["../../../../../src/commands/simply/cicd/build/cleanup-scratch-orgs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACzG,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,uBAAuB,EAAE,wCAAwC,CAAC,CAAC;AAI1G,6EAA6E;AAC7E,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,SAAwC;IACpF,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAE5D,MAAM,CAAU,KAAK,GAAG;QAC7B,GAAG,SAAS,CAAC,SAAS;QACtB,GAAG,WAAW;QACd,GAAG,cAAc;QACjB,GAAG,SAAS;QACZ,GAAG,YAAY;KAChB,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAE5D,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YACnB,MAAM,CAAC,IAAI,CAAC,6CAA6C,CAAC,CAAC;YAC3D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QAED,MAAM,OAAO,GAAG,YAAY,CAC1B,KAAK,CAAC,cAAc,CAAC,EACrB,KAAK,CAAC,kBAAkB,CAAC,EACzB,KAAK,CAAC,mBAAmB,CAAC,EAC1B,KAAK,CAAC,sBAAsB,CAAC,CAC9B,CAAC;QAEF,MAAM,kBAAkB,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;QAE7F,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { type CreateFallbackTagResult } from '../../../../common/build/createFallbackTag.js';
|
|
3
|
+
export type BuildCreateFallbackTagResult = {
|
|
4
|
+
skipped: boolean;
|
|
5
|
+
} & Partial<CreateFallbackTagResult>;
|
|
6
|
+
/** Creates a fallback git tag carrying forward the previous package version's ID, for builds that didn't produce a new one. */
|
|
7
|
+
export default class BuildCreateFallbackTag extends SfCommand<BuildCreateFallbackTagResult> {
|
|
8
|
+
static readonly summary: string;
|
|
9
|
+
static readonly description: string;
|
|
10
|
+
static readonly examples: string[];
|
|
11
|
+
static readonly flags: {
|
|
12
|
+
'last-tag': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
out: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
disabled: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
debug: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
'vcs-host': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'vcs-provider': import("@oclif/core/interfaces").OptionFlag<"gitlab", import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
'ci-commit-ref-name': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'ci-pipeline-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
'ci-project-path': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
'project-access-token': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
'flags-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
};
|
|
24
|
+
run(): Promise<BuildCreateFallbackTagResult>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, Clay Chipps; Copyright (c) 2026 Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Messages } from '@salesforce/core';
|
|
17
|
+
import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
18
|
+
import { createFallbackTag } from '../../../../common/build/createFallbackTag.js';
|
|
19
|
+
import { getSkipReason } from '../../../../common/build/skipGuard.js';
|
|
20
|
+
import { debugFlag, disabledFlag, gitOpsFlags, vcsFlags } from '../../../../common/build/flags.js';
|
|
21
|
+
import { logger } from '../../../../common/logger.js';
|
|
22
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
23
|
+
const messages = Messages.loadMessages('@simplysf/simply-cicd', 'simply.cicd.build.create-fallback-tag');
|
|
24
|
+
/** Creates a fallback git tag carrying forward the previous package version's ID, for builds that didn't produce a new one. */
|
|
25
|
+
export default class BuildCreateFallbackTag extends SfCommand {
|
|
26
|
+
static summary = messages.getMessage('summary');
|
|
27
|
+
static description = messages.getMessage('description');
|
|
28
|
+
static examples = messages.getMessages('examples');
|
|
29
|
+
static flags = {
|
|
30
|
+
...SfCommand.baseFlags,
|
|
31
|
+
...gitOpsFlags,
|
|
32
|
+
...vcsFlags,
|
|
33
|
+
...debugFlag,
|
|
34
|
+
...disabledFlag,
|
|
35
|
+
'last-tag': Flags.string({ summary: messages.getMessage('flags.last-tag.summary') }),
|
|
36
|
+
out: Flags.string({ summary: messages.getMessage('flags.out.summary'), default: 'subscriberPackageVersionId.env' }),
|
|
37
|
+
};
|
|
38
|
+
async run() {
|
|
39
|
+
const { flags } = await this.parse(BuildCreateFallbackTag);
|
|
40
|
+
const skipReason = getSkipReason('create-fallback-tag');
|
|
41
|
+
if (skipReason) {
|
|
42
|
+
logger.warn(skipReason);
|
|
43
|
+
return { skipped: true };
|
|
44
|
+
}
|
|
45
|
+
if (flags.disabled) {
|
|
46
|
+
logger.warn('create-fallback-tag is disabled. Skipping.');
|
|
47
|
+
return { skipped: true };
|
|
48
|
+
}
|
|
49
|
+
const result = await createFallbackTag({
|
|
50
|
+
ciCommitRefName: flags['ci-commit-ref-name'],
|
|
51
|
+
ciProjectPath: flags['ci-project-path'],
|
|
52
|
+
projectAccessToken: flags['project-access-token'],
|
|
53
|
+
ciPipelineId: flags['ci-pipeline-id'],
|
|
54
|
+
lastTag: flags['last-tag'],
|
|
55
|
+
out: flags.out,
|
|
56
|
+
debug: flags.debug,
|
|
57
|
+
vcsHost: flags['vcs-host'],
|
|
58
|
+
vcsProvider: flags['vcs-provider'],
|
|
59
|
+
});
|
|
60
|
+
return { skipped: false, ...result };
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=create-fallback-tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-fallback-tag.js","sourceRoot":"","sources":["../../../../../src/commands/simply/cicd/build/create-fallback-tag.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAgC,MAAM,+CAA+C,CAAC;AAChH,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AACnG,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,uBAAuB,EAAE,uCAAuC,CAAC,CAAC;AAIzG,+HAA+H;AAC/H,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,SAAuC;IAClF,MAA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,sBAAsB,CAAC;YACjD,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC;YACrC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC;YAC1B,GAAG,EAAE,KAAK,CAAC,GAAG;YACd,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC;YAC1B,WAAW,EAAE,KAAK,CAAC,cAAc,CAAC;SACnC,CAAC,CAAC;QAEH,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,CAAC;IACvC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
export type BuildCreatePackageVersionResult = {
|
|
3
|
+
skipped: boolean;
|
|
4
|
+
};
|
|
5
|
+
/** Creates a new package version, verifies minimum code coverage, and creates/pushes a version-tracking git tag. */
|
|
6
|
+
export default class BuildCreatePackageVersion extends SfCommand<BuildCreatePackageVersionResult> {
|
|
7
|
+
static readonly summary: string;
|
|
8
|
+
static readonly description: string;
|
|
9
|
+
static readonly examples: string[];
|
|
10
|
+
static readonly flags: {
|
|
11
|
+
'ci-commit-sha': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'ci-pipeline-source': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'ci-pipeline-url': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'devhub-tooling-username': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'devhub-tooling-client-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'devhub-tooling-instance-url': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'always-create-package': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
'code-coverage-minimum': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'package-release-branch-prefix': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
disabled: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
21
|
+
debug: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
22
|
+
'jwt-key-file': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
'vcs-host': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
24
|
+
'vcs-provider': import("@oclif/core/interfaces").OptionFlag<"gitlab", import("@oclif/core/interfaces").CustomOptions>;
|
|
25
|
+
'ci-commit-ref-name': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
26
|
+
'ci-pipeline-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
27
|
+
'ci-project-path': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
28
|
+
'project-access-token': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
29
|
+
'flags-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
30
|
+
};
|
|
31
|
+
run(): Promise<BuildCreatePackageVersionResult>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, Clay Chipps; Copyright (c) 2026 Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Messages } from '@salesforce/core';
|
|
17
|
+
import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
18
|
+
import { createPackageVersion } from '../../../../common/build/createPackageVersion.js';
|
|
19
|
+
import { getSkipReason } from '../../../../common/build/skipGuard.js';
|
|
20
|
+
import { debugFlag, disabledFlag, gitOpsFlags, jwtKeyFileFlag, vcsFlags } from '../../../../common/build/flags.js';
|
|
21
|
+
import { logger } from '../../../../common/logger.js';
|
|
22
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
23
|
+
const messages = Messages.loadMessages('@simplysf/simply-cicd', 'simply.cicd.build.create-package-version');
|
|
24
|
+
/** Creates a new package version, verifies minimum code coverage, and creates/pushes a version-tracking git tag. */
|
|
25
|
+
export default class BuildCreatePackageVersion extends SfCommand {
|
|
26
|
+
static summary = messages.getMessage('summary');
|
|
27
|
+
static description = messages.getMessage('description');
|
|
28
|
+
static examples = messages.getMessages('examples');
|
|
29
|
+
static flags = {
|
|
30
|
+
...SfCommand.baseFlags,
|
|
31
|
+
...gitOpsFlags,
|
|
32
|
+
...vcsFlags,
|
|
33
|
+
...jwtKeyFileFlag,
|
|
34
|
+
...debugFlag,
|
|
35
|
+
...disabledFlag,
|
|
36
|
+
'ci-commit-sha': Flags.string({
|
|
37
|
+
summary: messages.getMessage('flags.ci-commit-sha.summary'),
|
|
38
|
+
required: true,
|
|
39
|
+
env: 'SIMPLY_CICD_CI_COMMIT_SHA',
|
|
40
|
+
}),
|
|
41
|
+
'ci-pipeline-source': Flags.string({
|
|
42
|
+
summary: messages.getMessage('flags.ci-pipeline-source.summary'),
|
|
43
|
+
env: 'SIMPLY_CICD_CI_PIPELINE_SOURCE',
|
|
44
|
+
}),
|
|
45
|
+
'ci-pipeline-url': Flags.string({
|
|
46
|
+
summary: messages.getMessage('flags.ci-pipeline-url.summary'),
|
|
47
|
+
required: true,
|
|
48
|
+
env: 'SIMPLY_CICD_CI_PIPELINE_URL',
|
|
49
|
+
}),
|
|
50
|
+
'devhub-tooling-username': Flags.string({
|
|
51
|
+
summary: messages.getMessage('flags.devhub-tooling-username.summary'),
|
|
52
|
+
required: true,
|
|
53
|
+
env: 'SIMPLY_CICD_DEVHUB_TOOLING_USERNAME',
|
|
54
|
+
}),
|
|
55
|
+
'devhub-tooling-client-id': Flags.string({
|
|
56
|
+
summary: messages.getMessage('flags.devhub-tooling-client-id.summary'),
|
|
57
|
+
required: true,
|
|
58
|
+
env: 'SIMPLY_CICD_DEVHUB_TOOLING_CLIENT_ID',
|
|
59
|
+
}),
|
|
60
|
+
'devhub-tooling-instance-url': Flags.string({
|
|
61
|
+
summary: messages.getMessage('flags.devhub-tooling-instance-url.summary'),
|
|
62
|
+
required: true,
|
|
63
|
+
env: 'SIMPLY_CICD_DEVHUB_TOOLING_INSTANCE_URL',
|
|
64
|
+
}),
|
|
65
|
+
'always-create-package': Flags.boolean({
|
|
66
|
+
summary: messages.getMessage('flags.always-create-package.summary'),
|
|
67
|
+
default: false,
|
|
68
|
+
}),
|
|
69
|
+
'code-coverage-minimum': Flags.string({
|
|
70
|
+
summary: messages.getMessage('flags.code-coverage-minimum.summary'),
|
|
71
|
+
default: '75',
|
|
72
|
+
}),
|
|
73
|
+
'package-release-branch-prefix': Flags.string({
|
|
74
|
+
summary: messages.getMessage('flags.package-release-branch-prefix.summary'),
|
|
75
|
+
}),
|
|
76
|
+
};
|
|
77
|
+
async run() {
|
|
78
|
+
const { flags } = await this.parse(BuildCreatePackageVersion);
|
|
79
|
+
const skipReason = getSkipReason('create-package-version');
|
|
80
|
+
if (skipReason) {
|
|
81
|
+
logger.warn(skipReason);
|
|
82
|
+
return { skipped: true };
|
|
83
|
+
}
|
|
84
|
+
if (flags.disabled) {
|
|
85
|
+
logger.warn('create-package-version is disabled. Skipping.');
|
|
86
|
+
return { skipped: true };
|
|
87
|
+
}
|
|
88
|
+
await createPackageVersion({
|
|
89
|
+
ciCommitRefName: flags['ci-commit-ref-name'],
|
|
90
|
+
ciCommitSha: flags['ci-commit-sha'],
|
|
91
|
+
ciPipelineId: flags['ci-pipeline-id'],
|
|
92
|
+
ciPipelineSource: flags['ci-pipeline-source'],
|
|
93
|
+
ciPipelineUrl: flags['ci-pipeline-url'],
|
|
94
|
+
ciProjectPath: flags['ci-project-path'],
|
|
95
|
+
projectAccessToken: flags['project-access-token'],
|
|
96
|
+
devhubToolingUsername: flags['devhub-tooling-username'],
|
|
97
|
+
devhubToolingClientId: flags['devhub-tooling-client-id'],
|
|
98
|
+
devhubToolingInstanceUrl: flags['devhub-tooling-instance-url'],
|
|
99
|
+
jwtKeyFile: flags['jwt-key-file'],
|
|
100
|
+
debug: flags.debug,
|
|
101
|
+
alwaysCreatePackage: flags['always-create-package'],
|
|
102
|
+
packageReleaseBranchPrefix: flags['package-release-branch-prefix'],
|
|
103
|
+
codeCoverageMinimum: flags['code-coverage-minimum'],
|
|
104
|
+
vcsHost: flags['vcs-host'],
|
|
105
|
+
vcsProvider: flags['vcs-provider'],
|
|
106
|
+
});
|
|
107
|
+
return { skipped: false };
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=create-package-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-package-version.js","sourceRoot":"","sources":["../../../../../src/commands/simply/cicd/build/create-package-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE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rg.js';
|
|
3
|
+
export type BuildCreateScratchResult = {
|
|
4
|
+
skipped: boolean;
|
|
5
|
+
scratchOrg?: ScratchOrgCreateResult;
|
|
6
|
+
};
|
|
7
|
+
/** Creates a scratch org, trying each configured Dev Hub in order until one has remaining daily capacity. */
|
|
8
|
+
export default class BuildCreateScratch extends SfCommand<BuildCreateScratchResult> {
|
|
9
|
+
static readonly summary: string;
|
|
10
|
+
static readonly description: string;
|
|
11
|
+
static readonly examples: string[];
|
|
12
|
+
static readonly flags: {
|
|
13
|
+
'scratch-definition-file': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'scratch-duration-days': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
disabled: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
debug: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
'jwt-key-file': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
'dev-hub-name': import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'dev-hub-username': import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
'dev-hub-client-id': import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
'dev-hub-instance-url': import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
'flags-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
};
|
|
24
|
+
run(): Promise<BuildCreateScratchResult>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, Clay Chipps; Copyright (c) 2026 Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Messages } from '@salesforce/core';
|
|
17
|
+
import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
18
|
+
import { createScratchOrg } from '../../../../common/build/createScratchOrg.js';
|
|
19
|
+
import { getSkipReason } from '../../../../common/build/skipGuard.js';
|
|
20
|
+
import { parseDevHubs } from '../../../../common/build/devHubs.js';
|
|
21
|
+
import { debugFlag, devHubFlags, disabledFlag, jwtKeyFileFlag } from '../../../../common/build/flags.js';
|
|
22
|
+
import { logger } from '../../../../common/logger.js';
|
|
23
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
24
|
+
const messages = Messages.loadMessages('@simplysf/simply-cicd', 'simply.cicd.build.create-scratch');
|
|
25
|
+
/** Creates a scratch org, trying each configured Dev Hub in order until one has remaining daily capacity. */
|
|
26
|
+
export default class BuildCreateScratch extends SfCommand {
|
|
27
|
+
static summary = messages.getMessage('summary');
|
|
28
|
+
static description = messages.getMessage('description');
|
|
29
|
+
static examples = messages.getMessages('examples');
|
|
30
|
+
static flags = {
|
|
31
|
+
...SfCommand.baseFlags,
|
|
32
|
+
...devHubFlags,
|
|
33
|
+
...jwtKeyFileFlag,
|
|
34
|
+
...debugFlag,
|
|
35
|
+
...disabledFlag,
|
|
36
|
+
'scratch-definition-file': Flags.string({ summary: messages.getMessage('flags.scratch-definition-file.summary') }),
|
|
37
|
+
'scratch-duration-days': Flags.string({
|
|
38
|
+
summary: messages.getMessage('flags.scratch-duration-days.summary'),
|
|
39
|
+
default: '1',
|
|
40
|
+
}),
|
|
41
|
+
};
|
|
42
|
+
async run() {
|
|
43
|
+
const { flags } = await this.parse(BuildCreateScratch);
|
|
44
|
+
const skipReason = getSkipReason('create-scratch');
|
|
45
|
+
if (skipReason) {
|
|
46
|
+
logger.warn(skipReason);
|
|
47
|
+
return { skipped: true };
|
|
48
|
+
}
|
|
49
|
+
if (flags.disabled) {
|
|
50
|
+
logger.warn('create-scratch is disabled. Skipping.');
|
|
51
|
+
return { skipped: true };
|
|
52
|
+
}
|
|
53
|
+
const devHubs = parseDevHubs(flags['dev-hub-name'], flags['dev-hub-username'], flags['dev-hub-client-id'], flags['dev-hub-instance-url']);
|
|
54
|
+
const scratchOrg = await createScratchOrg({
|
|
55
|
+
jwtKeyFile: flags['jwt-key-file'],
|
|
56
|
+
debug: flags.debug,
|
|
57
|
+
scratchDefinitionFile: flags['scratch-definition-file'],
|
|
58
|
+
scratchDurationDays: flags['scratch-duration-days'],
|
|
59
|
+
}, devHubs);
|
|
60
|
+
return { skipped: false, scratchOrg };
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=create-scratch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-scratch.js","sourceRoot":"","sources":["../../../../../src/commands/simply/cicd/build/create-scratch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAA+B,MAAM,8CAA8C,CAAC;AAC7G,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAA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C;YACxB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QAED,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YACnB,MAAM,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;YACrD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QAED,MAAM,OAAO,GAAG,YAAY,CAC1B,KAAK,CAAC,cAAc,CAAC,EACrB,KAAK,CAAC,kBAAkB,CAAC,EACzB,KAAK,CAAC,mBAAmB,CAAC,EAC1B,KAAK,CAAC,sBAAsB,CAAC,CAC9B,CAAC;QAEF,MAAM,UAAU,GAAG,MAAM,gBAAgB,CACvC;YACE,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC;YACjC,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,qBAAqB,EAAE,KAAK,CAAC,yBAAyB,CAAC;YACvD,mBAAmB,EAAE,KAAK,CAAC,uBAAuB,CAAC;SACpD,EACD,OAAO,CACR,CAAC;QAEF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;IACxC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
export type BuildDeleteScratchResult = {
|
|
3
|
+
skipped: boolean;
|
|
4
|
+
};
|
|
5
|
+
/** Authenticates to the Dev Hub that owns the scratch org created by `build create-scratch` and deletes it. */
|
|
6
|
+
export default class BuildDeleteScratch extends SfCommand<BuildDeleteScratchResult> {
|
|
7
|
+
static readonly summary: string;
|
|
8
|
+
static readonly description: string;
|
|
9
|
+
static readonly examples: string[];
|
|
10
|
+
static readonly flags: {
|
|
11
|
+
disabled: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
debug: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
'jwt-key-file': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'dev-hub-name': import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'dev-hub-username': import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'dev-hub-client-id': import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'dev-hub-instance-url': import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
'flags-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
};
|
|
20
|
+
run(): Promise<BuildDeleteScratchResult>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, Clay Chipps; Copyright (c) 2026 Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Messages } from '@salesforce/core';
|
|
17
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
18
|
+
import { deleteScratchOrg } from '../../../../common/build/deleteScratchOrg.js';
|
|
19
|
+
import { parseDevHubs } from '../../../../common/build/devHubs.js';
|
|
20
|
+
import { getSkipReason } from '../../../../common/build/skipGuard.js';
|
|
21
|
+
import { debugFlag, devHubFlags, disabledFlag, jwtKeyFileFlag } from '../../../../common/build/flags.js';
|
|
22
|
+
import { logger } from '../../../../common/logger.js';
|
|
23
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
24
|
+
const messages = Messages.loadMessages('@simplysf/simply-cicd', 'simply.cicd.build.delete-scratch');
|
|
25
|
+
/** Authenticates to the Dev Hub that owns the scratch org created by `build create-scratch` and deletes it. */
|
|
26
|
+
export default class BuildDeleteScratch extends SfCommand {
|
|
27
|
+
static summary = messages.getMessage('summary');
|
|
28
|
+
static description = messages.getMessage('description');
|
|
29
|
+
static examples = messages.getMessages('examples');
|
|
30
|
+
static flags = {
|
|
31
|
+
...SfCommand.baseFlags,
|
|
32
|
+
...devHubFlags,
|
|
33
|
+
...jwtKeyFileFlag,
|
|
34
|
+
...debugFlag,
|
|
35
|
+
...disabledFlag,
|
|
36
|
+
};
|
|
37
|
+
async run() {
|
|
38
|
+
const { flags } = await this.parse(BuildDeleteScratch);
|
|
39
|
+
const skipReason = getSkipReason('delete-scratch');
|
|
40
|
+
if (skipReason) {
|
|
41
|
+
logger.warn(skipReason);
|
|
42
|
+
return { skipped: true };
|
|
43
|
+
}
|
|
44
|
+
if (flags.disabled) {
|
|
45
|
+
logger.warn('delete-scratch is disabled. Skipping.');
|
|
46
|
+
return { skipped: true };
|
|
47
|
+
}
|
|
48
|
+
const devHubs = parseDevHubs(flags['dev-hub-name'], flags['dev-hub-username'], flags['dev-hub-client-id'], flags['dev-hub-instance-url']);
|
|
49
|
+
await deleteScratchOrg({ jwtKeyFile: flags['jwt-key-file'], debug: flags.debug }, devHubs);
|
|
50
|
+
return { skipped: false };
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=delete-scratch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-scratch.js","sourceRoot":"","sources":["../../../../../src/commands/simply/cicd/build/delete-scratch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG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AC,CAAC;YACxB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QAED,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YACnB,MAAM,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;YACrD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QAED,MAAM,OAAO,GAAG,YAAY,CAC1B,KAAK,CAAC,cAAc,CAAC,EACrB,KAAK,CAAC,kBAAkB,CAAC,EACzB,KAAK,CAAC,mBAAmB,CAAC,EAC1B,KAAK,CAAC,sBAAsB,CAAC,CAC9B,CAAC;QAEF,MAAM,gBAAgB,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;QAE3F,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
export type BuildDeterminePackageChangesResult = {
|
|
3
|
+
skipped: boolean;
|
|
4
|
+
};
|
|
5
|
+
/** Detects whether the default package directory has changed since the last release tag, and writes the result as a dotenv file. */
|
|
6
|
+
export default class BuildDeterminePackageChanges extends SfCommand<BuildDeterminePackageChangesResult> {
|
|
7
|
+
static readonly summary: string;
|
|
8
|
+
static readonly description: string;
|
|
9
|
+
static readonly examples: string[];
|
|
10
|
+
static readonly flags: {
|
|
11
|
+
out: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
disabled: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
debug: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
'flags-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
};
|
|
16
|
+
run(): Promise<BuildDeterminePackageChangesResult>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, Clay Chipps; Copyright (c) 2026 Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Messages } from '@salesforce/core';
|
|
17
|
+
import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
18
|
+
import { determinePackageChanges } from '../../../../common/build/determinePackageChanges.js';
|
|
19
|
+
import { debugFlag, disabledFlag } from '../../../../common/build/flags.js';
|
|
20
|
+
import { logger } from '../../../../common/logger.js';
|
|
21
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
22
|
+
const messages = Messages.loadMessages('@simplysf/simply-cicd', 'simply.cicd.build.determine-package-changes');
|
|
23
|
+
/** Detects whether the default package directory has changed since the last release tag, and writes the result as a dotenv file. */
|
|
24
|
+
export default class BuildDeterminePackageChanges extends SfCommand {
|
|
25
|
+
static summary = messages.getMessage('summary');
|
|
26
|
+
static description = messages.getMessage('description');
|
|
27
|
+
static examples = messages.getMessages('examples');
|
|
28
|
+
static flags = {
|
|
29
|
+
...SfCommand.baseFlags,
|
|
30
|
+
...debugFlag,
|
|
31
|
+
...disabledFlag,
|
|
32
|
+
out: Flags.string({ summary: messages.getMessage('flags.out.summary'), default: 'changes.env' }),
|
|
33
|
+
};
|
|
34
|
+
async run() {
|
|
35
|
+
const { flags } = await this.parse(BuildDeterminePackageChanges);
|
|
36
|
+
if (flags.disabled) {
|
|
37
|
+
logger.warn('determine-package-changes is disabled. Skipping.');
|
|
38
|
+
return { skipped: true };
|
|
39
|
+
}
|
|
40
|
+
await determinePackageChanges({ out: flags.out, debug: flags.debug });
|
|
41
|
+
return { skipped: false };
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=determine-package-changes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"determine-package-changes.js","sourceRoot":"","sources":["../../../../../src/commands/simply/cicd/build/determine-package-changes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,uBAAuB,EAAE,6CAA6C,CAAC,CAAC;AAI/G,oIAAoI;AACpI,MAAM,CAAC,OAAO,OAAO,4BAA6B,SAAQ,SAA6C;IAC9F,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAE5D,MAAM,CAAU,KAAK,GAAG;QAC7B,GAAG,SAAS,CAAC,SAAS;QACtB,GAAG,SAAS;QACZ,GAAG,YAAY;QACf,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC;KACjG,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAEjE,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YACnB,MAAM,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;YAChE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QAED,MAAM,uBAAuB,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;QAEtE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { type GenerateFlexipageDiffResult } from '../../../../common/build/flexipageDelta.js';
|
|
3
|
+
/** Generates a FlexiPage delta between two commits and posts the results to the merge request. */
|
|
4
|
+
export default class BuildGenerateFlexipageDiff extends SfCommand<GenerateFlexipageDiffResult> {
|
|
5
|
+
static readonly summary: string;
|
|
6
|
+
static readonly description: string;
|
|
7
|
+
static readonly examples: string[];
|
|
8
|
+
static readonly flags: {
|
|
9
|
+
disabled: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
debug: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
'ci-project-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'ci-merge-request-iid': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
from: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
to: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'project-access-token': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
out: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'flags-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
};
|
|
19
|
+
run(): Promise<GenerateFlexipageDiffResult>;
|
|
20
|
+
}
|