@salesforce/plugin-org 2.11.8 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/README.md +117 -115
  2. package/lib/commands/force/org/clone.d.ts +8 -8
  3. package/lib/commands/force/org/clone.js +65 -66
  4. package/lib/commands/force/org/clone.js.map +1 -1
  5. package/lib/commands/force/org/create.d.ts +18 -42
  6. package/lib/commands/force/org/create.js +104 -106
  7. package/lib/commands/force/org/create.js.map +1 -1
  8. package/lib/commands/force/org/delete.d.ts +5 -5
  9. package/lib/commands/force/org/delete.js +42 -44
  10. package/lib/commands/force/org/delete.js.map +1 -1
  11. package/lib/commands/force/org/status.d.ts +7 -7
  12. package/lib/commands/force/org/status.js +48 -50
  13. package/lib/commands/force/org/status.js.map +1 -1
  14. package/lib/commands/org/create/sandbox.d.ts +11 -11
  15. package/lib/commands/org/create/sandbox.js +106 -106
  16. package/lib/commands/org/create/sandbox.js.map +1 -1
  17. package/lib/commands/org/create/scratch.d.ts +20 -20
  18. package/lib/commands/org/create/scratch.js +140 -142
  19. package/lib/commands/org/create/scratch.js.map +1 -1
  20. package/lib/commands/org/delete/sandbox.d.ts +3 -3
  21. package/lib/commands/org/delete/sandbox.js +46 -31
  22. package/lib/commands/org/delete/sandbox.js.map +1 -1
  23. package/lib/commands/org/delete/scratch.d.ts +3 -3
  24. package/lib/commands/org/delete/scratch.js +27 -28
  25. package/lib/commands/org/delete/scratch.js.map +1 -1
  26. package/lib/commands/org/display.d.ts +5 -5
  27. package/lib/commands/org/display.js +33 -34
  28. package/lib/commands/org/display.js.map +1 -1
  29. package/lib/commands/org/list/metadata-types.d.ts +5 -5
  30. package/lib/commands/org/list/metadata-types.js +38 -40
  31. package/lib/commands/org/list/metadata-types.js.map +1 -1
  32. package/lib/commands/org/list/metadata.d.ts +6 -6
  33. package/lib/commands/org/list/metadata.js +39 -41
  34. package/lib/commands/org/list/metadata.js.map +1 -1
  35. package/lib/commands/org/list.d.ts +2 -2
  36. package/lib/commands/org/list.js +56 -57
  37. package/lib/commands/org/list.js.map +1 -1
  38. package/lib/commands/org/open.d.ts +7 -7
  39. package/lib/commands/org/open.js +61 -61
  40. package/lib/commands/org/open.js.map +1 -1
  41. package/lib/commands/org/resume/sandbox.d.ts +6 -6
  42. package/lib/commands/org/resume/sandbox.js +61 -61
  43. package/lib/commands/org/resume/sandbox.js.map +1 -1
  44. package/lib/commands/org/resume/scratch.d.ts +3 -3
  45. package/lib/commands/org/resume/scratch.js +35 -36
  46. package/lib/commands/org/resume/scratch.js.map +1 -1
  47. package/lib/index.d.ts +1 -1
  48. package/lib/index.js +1 -2
  49. package/lib/index.js.map +1 -1
  50. package/lib/shared/flags.d.ts +4 -1
  51. package/lib/shared/flags.js +10 -11
  52. package/lib/shared/flags.js.map +1 -1
  53. package/lib/shared/orgHighlighter.d.ts +1 -1
  54. package/lib/shared/orgHighlighter.js +4 -9
  55. package/lib/shared/orgHighlighter.js.map +1 -1
  56. package/lib/shared/orgHooks.js +1 -2
  57. package/lib/shared/orgHooks.js.map +1 -1
  58. package/lib/shared/orgListUtil.d.ts +1 -1
  59. package/lib/shared/orgListUtil.js +27 -31
  60. package/lib/shared/orgListUtil.js.map +1 -1
  61. package/lib/shared/orgTypes.js +2 -5
  62. package/lib/shared/orgTypes.js.map +1 -1
  63. package/lib/shared/sandboxCommandBase.d.ts +2 -2
  64. package/lib/shared/sandboxCommandBase.js +33 -28
  65. package/lib/shared/sandboxCommandBase.js.map +1 -1
  66. package/lib/shared/sandboxProgress.d.ts +1 -1
  67. package/lib/shared/sandboxProgress.js +11 -17
  68. package/lib/shared/sandboxProgress.js.map +1 -1
  69. package/lib/shared/sandboxReporter.d.ts +0 -1
  70. package/lib/shared/sandboxReporter.js +3 -16
  71. package/lib/shared/sandboxReporter.js.map +1 -1
  72. package/lib/shared/sandboxRequest.d.ts +5 -0
  73. package/lib/shared/sandboxRequest.js +21 -20
  74. package/lib/shared/sandboxRequest.js.map +1 -1
  75. package/lib/shared/scratchOrgOutput.js +20 -31
  76. package/lib/shared/scratchOrgOutput.js.map +1 -1
  77. package/lib/shared/scratchOrgRequest.d.ts +1 -1
  78. package/lib/shared/scratchOrgRequest.js +4 -8
  79. package/lib/shared/scratchOrgRequest.js.map +1 -1
  80. package/lib/shared/stagedProgress.d.ts +1 -1
  81. package/lib/shared/stagedProgress.js +19 -19
  82. package/lib/shared/stagedProgress.js.map +1 -1
  83. package/lib/shared/timeUtils.js +10 -16
  84. package/lib/shared/timeUtils.js.map +1 -1
  85. package/lib/shared/utils.d.ts +9 -2
  86. package/lib/shared/utils.js +13 -14
  87. package/lib/shared/utils.js.map +1 -1
  88. package/messages/delete_sandbox.md +9 -3
  89. package/oclif.lock +8460 -0
  90. package/oclif.manifest.json +1090 -688
  91. package/package.json +26 -23
@@ -1,58 +1,59 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createSandboxRequest = exports.generateSboxName = void 0;
4
1
  /*
5
2
  * Copyright (c) 2020, salesforce.com, inc.
6
3
  * All rights reserved.
7
4
  * Licensed under the BSD 3-Clause license.
8
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
6
  */
10
- const fs = require("node:fs");
11
- const core_1 = require("@salesforce/core");
12
- const utils_1 = require("./utils");
13
- const orgTypes_1 = require("./orgTypes");
14
- core_1.Messages.importMessagesDirectory(__dirname);
15
- const cloneMessages = core_1.Messages.loadMessages('@salesforce/plugin-org', 'clone');
16
- const generateSboxName = async () => {
7
+ import fs from 'node:fs';
8
+ import { dirname } from 'node:path';
9
+ import { fileURLToPath } from 'node:url';
10
+ import { Logger, Messages, SfError, Lifecycle } from '@salesforce/core';
11
+ import { lowerToUpper } from './utils.js';
12
+ import { SandboxLicenseType } from './orgTypes.js';
13
+ Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
14
+ const cloneMessages = Messages.loadMessages('@salesforce/plugin-org', 'clone');
15
+ export const generateSboxName = async () => {
17
16
  // sandbox names are 10 chars or less, a radix of 36 = [a-z][0-9]
18
17
  // technically without querying the production org, the generated name could already exist, but the chances of that are lower than the perf penalty of querying and verifying
19
18
  const generated = `sbx${Date.now().toString(36).slice(-7)}`;
20
- await core_1.Lifecycle.getInstance().emitWarning(`No SandboxName defined, generating new SandboxName: ${generated}`);
19
+ await Lifecycle.getInstance().emitWarning(`No SandboxName defined, generating new SandboxName: ${generated}`);
21
20
  return generated;
22
21
  };
23
- exports.generateSboxName = generateSboxName;
24
- async function createSandboxRequest(isClone = false, definitionFile, logger, properties) {
22
+ export async function createSandboxRequest(isClone = false, definitionFile, logger, properties) {
25
23
  if (!logger) {
26
- logger = await core_1.Logger.child('createSandboxRequest');
24
+ logger = await Logger.child('createSandboxRequest');
27
25
  }
28
26
  logger.debug('Varargs: %s ', properties);
29
27
  const sandboxDefFileContents = definitionFile
30
- ? (0, utils_1.lowerToUpper)(JSON.parse(fs.readFileSync(definitionFile, 'utf-8')))
28
+ ? lowerToUpper(JSON.parse(fs.readFileSync(definitionFile, 'utf-8')))
31
29
  : {};
32
- const capitalizedVarArgs = properties ? (0, utils_1.lowerToUpper)(properties) : {};
30
+ const capitalizedVarArgs = properties ? lowerToUpper(properties) : {};
33
31
  // varargs override file input
34
32
  const sandboxReqWithName = {
35
33
  ...sandboxDefFileContents,
36
34
  ...capitalizedVarArgs,
37
35
  SandboxName: capitalizedVarArgs.SandboxName ??
38
36
  sandboxDefFileContents.SandboxName ??
39
- (await (0, exports.generateSboxName)()),
37
+ (await generateSboxName()),
40
38
  };
41
39
  const { SourceSandboxName, ...sandboxReq } = sandboxReqWithName;
42
40
  logger.debug('SandboxRequest after merging DefFile and Varargs: %s ', sandboxReq);
43
41
  if (isClone) {
44
42
  if (!SourceSandboxName) {
45
43
  // error - we need SourceSandboxName to know which sandbox to clone from
46
- throw new core_1.SfError(cloneMessages.getMessage('missingSourceSandboxName', ['SourceSandboxName']), cloneMessages.getMessage('missingSourceSandboxNameAction', ['SourceSandboxName']));
44
+ throw new SfError(cloneMessages.getMessage('missingSourceSandboxName', ['SourceSandboxName']), cloneMessages.getMessage('missingSourceSandboxNameAction', ['SourceSandboxName']));
47
45
  }
48
46
  return { sandboxReq, srcSandboxName: SourceSandboxName };
49
47
  }
50
48
  else {
51
49
  if (!sandboxReq.LicenseType) {
52
- return { sandboxReq: { ...sandboxReq, LicenseType: orgTypes_1.SandboxLicenseType.developer } };
50
+ return { sandboxReq: { ...sandboxReq, LicenseType: SandboxLicenseType.developer } };
53
51
  }
54
52
  return { sandboxReq };
55
53
  }
56
54
  }
57
- exports.createSandboxRequest = createSandboxRequest;
55
+ export default {
56
+ createSandboxRequest,
57
+ generateSboxName,
58
+ };
58
59
  //# sourceMappingURL=sandboxRequest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sandboxRequest.js","sourceRoot":"","sources":["../../src/shared/sandboxRequest.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,8BAA8B;AAC9B,2CAAwF;AACxF,mCAAuC;AACvC,yCAAgD;AAEhD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,aAAa,GAAG,eAAQ,CAAC,YAAY,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;AAExE,MAAM,gBAAgB,GAAG,KAAK,IAAqB,EAAE;IAC1D,iEAAiE;IACjE,6KAA6K;IAC7K,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5D,MAAM,gBAAS,CAAC,WAAW,EAAE,CAAC,WAAW,CAAC,uDAAuD,SAAS,EAAE,CAAC,CAAC;IAC9G,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AANW,QAAA,gBAAgB,oBAM3B;AAcK,KAAK,UAAU,oBAAoB,CACxC,OAAO,GAAG,KAAK,EACf,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CAAC,SAAS,EAAE,EAAE,CAAC;SACrF;QACD,OAAO,EAAE,UAAU,EAAE,CAAC;KACvB;AACH,CAAC;AAED,eAAe;IACb,oBAAoB;IACpB,gBAAgB;CACjB,CAAC"}
@@ -1,47 +1,36 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatFutureStage = exports.formatCompletedStage = exports.formatCurrentStage = exports.formatOrgId = exports.formatUsername = exports.formatRequest = exports.formatStage = exports.buildStatus = void 0;
4
1
  /*
5
2
  * Copyright (c) 2020, salesforce.com, inc.
6
3
  * All rights reserved.
7
4
  * Licensed under the BSD 3-Clause license.
8
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
6
  */
10
- const core_1 = require("@salesforce/core");
11
- const chalk = require("chalk");
12
- const change_case_1 = require("change-case");
13
- const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
7
+ import { scratchOrgLifecycleStages } from '@salesforce/core';
8
+ import chalk from 'chalk';
9
+ import { capitalCase } from 'change-case';
10
+ import { StandardColors } from '@salesforce/sf-plugins-core';
14
11
  const boldBlue = (input) => chalk.rgb(81, 176, 235).bold(input);
15
12
  const boldPurple = (input) => chalk.rgb(157, 129, 221).bold(input);
16
- const buildStatus = (data, baseUrl) => `
17
- RequestId: ${(0, exports.formatRequest)(baseUrl, data.scratchOrgInfo?.Id)}
18
- OrgId: ${(0, exports.formatOrgId)(data.scratchOrgInfo?.ScratchOrg)}
19
- Username: ${(0, exports.formatUsername)(data.scratchOrgInfo?.SignupUsername)}
20
- ${(0, exports.formatStage)(data.stage)}`;
21
- exports.buildStatus = buildStatus;
22
- const formatStage = (currentStage) => core_1.scratchOrgLifecycleStages
13
+ export const buildStatus = (data, baseUrl) => `
14
+ RequestId: ${formatRequest(baseUrl, data.scratchOrgInfo?.Id)}
15
+ OrgId: ${formatOrgId(data.scratchOrgInfo?.ScratchOrg)}
16
+ Username: ${formatUsername(data.scratchOrgInfo?.SignupUsername)}
17
+ ${formatStage(data.stage)}`;
18
+ export const formatStage = (currentStage) => scratchOrgLifecycleStages
23
19
  .map((stage, stageIndex) => {
24
20
  // current stage
25
21
  if (currentStage === stage)
26
- return (0, exports.formatCurrentStage)(stage);
22
+ return formatCurrentStage(stage);
27
23
  // completed stages
28
- if (core_1.scratchOrgLifecycleStages.indexOf(currentStage) > stageIndex)
29
- return (0, exports.formatCompletedStage)(stage);
24
+ if (scratchOrgLifecycleStages.indexOf(currentStage) > stageIndex)
25
+ return formatCompletedStage(stage);
30
26
  // future stage
31
- return (0, exports.formatFutureStage)(stage);
27
+ return formatFutureStage(stage);
32
28
  })
33
29
  .join('\n');
34
- exports.formatStage = formatStage;
35
- const formatRequest = (baseUrl, id) => `${id ? `${chalk.bold(id)} (${baseUrl}/${id})` : ''}`;
36
- exports.formatRequest = formatRequest;
37
- const formatUsername = (username) => `${username ? `${boldBlue(username)} ` : ''}`;
38
- exports.formatUsername = formatUsername;
39
- const formatOrgId = (id) => `${id ? `${boldBlue(id)} ` : ''}`;
40
- exports.formatOrgId = formatOrgId;
41
- const formatCurrentStage = (stage) => boldPurple((0, change_case_1.capitalCase)(stage));
42
- exports.formatCurrentStage = formatCurrentStage;
43
- const formatCompletedStage = (stage) => sf_plugins_core_1.StandardColors.success.bold(`✓ ${(0, change_case_1.capitalCase)(stage)}`);
44
- exports.formatCompletedStage = formatCompletedStage;
45
- const formatFutureStage = (stage) => sf_plugins_core_1.StandardColors.info((0, change_case_1.capitalCase)(stage));
46
- exports.formatFutureStage = formatFutureStage;
30
+ export const formatRequest = (baseUrl, id) => `${id ? `${chalk.bold(id)} (${baseUrl}/${id})` : ''}`;
31
+ export const formatUsername = (username) => `${username ? `${boldBlue(username)} ` : ''}`;
32
+ export const formatOrgId = (id) => `${id ? `${boldBlue(id)} ` : ''}`;
33
+ export const formatCurrentStage = (stage) => boldPurple(capitalCase(stage));
34
+ export const formatCompletedStage = (stage) => StandardColors.success.bold(`✓ ${capitalCase(stage)}`);
35
+ export const formatFutureStage = (stage) => StandardColors.info(capitalCase(stage));
47
36
  //# sourceMappingURL=scratchOrgOutput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scratchOrgOutput.js","sourceRoot":"","sources":["../../src/shared/scratchOrgOutput.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2CAAuF;AACvF,+BAA+B;AAC/B,6CAA0C;AAC1C,iEAA6D;AAE7D,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAChF,MAAM,UAAU,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAE5E,MAAM,WAAW,GAAG,CAAC,IAA8B,EAAE,OAAe,EAAU,EAAE,CAAC;aAC3E,IAAA,qBAAa,EAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;SACnD,IAAA,mBAAW,EAAC,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC;YACzC,IAAA,sBAAc,EAAC,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC;EAC7D,IAAA,mBAAW,EAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAJf,QAAA,WAAW,eAII;AAErB,MAAM,WAAW,GAAG,CAAC,YAA+C,EAAU,EAAE,CACrF,gCAAyB;KACtB,GAAG,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE;IACzB,gBAAgB;IAChB,IAAI,YAAY,KAAK,KAAK;QAAE,OAAO,IAAA,0BAAkB,EAAC,KAAK,CAAC,CAAC;IAC7D,mBAAmB;IACnB,IAAI,gCAAyB,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,UAAU;QAAE,OAAO,IAAA,4BAAoB,E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Scratch from '../commands/org/create/scratch';
4
+ import EnvCreateScratch from '../commands/org/create/scratch.js';
5
5
  /**
6
6
  * Provide the parsed flags
7
7
  * Returns the objet necessary to create a scratch org
@@ -1,19 +1,16 @@
1
- "use strict";
2
1
  /*
3
2
  * Copyright (c) 2023, salesforce.com, inc.
4
3
  * All rights reserved.
5
4
  * Licensed under the BSD 3-Clause license.
6
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
6
  */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.buildScratchOrgRequest = void 0;
10
- const fs = require("node:fs");
11
- const kit_1 = require("@salesforce/kit");
7
+ import fs from 'node:fs';
8
+ import { Duration } from '@salesforce/kit';
12
9
  /**
13
10
  * Provide the parsed flags
14
11
  * Returns the objet necessary to create a scratch org
15
12
  */
16
- const buildScratchOrgRequest = async (flags, clientSecret) => {
13
+ export const buildScratchOrgRequest = async (flags, clientSecret) => {
17
14
  const orgConfig = {
18
15
  ...(flags['definition-file']
19
16
  ? JSON.parse(await fs.promises.readFile(flags['definition-file'], 'utf-8'))
@@ -33,7 +30,7 @@ const buildScratchOrgRequest = async (flags, clientSecret) => {
33
30
  durationDays: flags['duration-days'].days,
34
31
  nonamespace: flags['no-namespace'],
35
32
  noancestors: flags['no-ancestors'],
36
- wait: flags.async ? kit_1.Duration.minutes(0) : flags.wait,
33
+ wait: flags.async ? Duration.minutes(0) : flags.wait,
37
34
  apiversion: flags['api-version'],
38
35
  orgConfig,
39
36
  alias: flags.alias,
@@ -42,5 +39,4 @@ const buildScratchOrgRequest = async (flags, clientSecret) => {
42
39
  };
43
40
  return createCommandOptions;
44
41
  };
45
- exports.buildScratchOrgRequest = buildScratchOrgRequest;
46
42
  //# sourceMappingURL=scratchOrgRequest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scratchOrgRequest.js","sourceRoot":"","sources":["../../src/shared/scratchOrgRequest.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,8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AAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI;QACpD,UAAU,EAAE,KAAK,CAAC,aAAa,CAAC;QAChC,SAAS;QACT,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,UAAU,EAAE,KAAK,CAAC,aAAa,CAAC;QAChC,YAAY,EAAE,KAAK,CAAC,cAAc,CAAC;KACpC,CAAC;IAEF,OAAO,oBAAoB,CAAC;AAC9B,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import * as chalk from 'chalk';
1
+ import chalk from 'chalk';
2
2
  export declare const boldPurple: chalk.Chalk;
3
3
  export type State = 'inProgress' | 'completed' | 'failed' | 'unknown';
4
4
  export type StageAttributes = {
@@ -1,29 +1,30 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StagedProgress = exports.StateConstants = exports.boldPurple = void 0;
4
1
  /*
5
2
  * Copyright (c) 2020, salesforce.com, inc.
6
3
  * All rights reserved.
7
4
  * Licensed under the BSD 3-Clause license.
8
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
6
  */
10
- const os = require("node:os");
11
- const chalk = require("chalk");
12
- const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
13
- const core_1 = require("@salesforce/core");
7
+ import os from 'node:os';
8
+ import chalk from 'chalk';
9
+ import { StandardColors } from '@salesforce/sf-plugins-core';
10
+ import { SfError } from '@salesforce/core';
14
11
  const compareStages = ([, aValue], [, bValue]) => aValue.index - bValue.index;
15
- exports.boldPurple = chalk.rgb(157, 129, 221).bold;
16
- exports.StateConstants = {
17
- inProgress: { color: exports.boldPurple, char: '…', visited: false, state: 'inProgress' },
18
- completed: { color: sf_plugins_core_1.StandardColors.success, char: '✓', visited: false, state: 'completed' },
12
+ export const boldPurple = chalk.rgb(157, 129, 221).bold;
13
+ export const StateConstants = {
14
+ inProgress: { color: boldPurple, char: '…', visited: false, state: 'inProgress' },
15
+ completed: { color: StandardColors.success, char: '✓', visited: false, state: 'completed' },
19
16
  failed: { color: chalk.bold.red, char: '✖', visited: false, state: 'failed' },
20
17
  unknown: { color: chalk.dim, char: '…', visited: false, state: 'unknown' },
21
18
  };
22
- class StagedProgress {
19
+ export class StagedProgress {
20
+ dataForTheStatus;
21
+ theStages;
22
+ currentStage;
23
+ previousStage;
23
24
  constructor(stages) {
24
25
  this.theStages = stages
25
26
  .map((stage, index) => ({
26
- [stage]: { ...exports.StateConstants['unknown'], index: (index + 1) * 10 },
27
+ [stage]: { ...StateConstants['unknown'], index: (index + 1) * 10 },
27
28
  }))
28
29
  .reduce((m, b) => Object.assign(m, b), {});
29
30
  }
@@ -62,7 +63,7 @@ class StagedProgress {
62
63
  }
63
64
  updateCurrentStage(newState) {
64
65
  if (!this.currentStage) {
65
- throw new core_1.SfError('transitionStages must be called before updateCurrentStage');
66
+ throw new SfError('transitionStages must be called before updateCurrentStage');
66
67
  }
67
68
  this.updateStages(this.currentStage, newState);
68
69
  }
@@ -73,17 +74,17 @@ class StagedProgress {
73
74
  const visitedEntries = sortedEntries.filter(([, stageState]) => stageState.visited);
74
75
  const [, lastState] = visitedEntries.length
75
76
  ? visitedEntries[visitedEntries.length - 1]
76
- : ['', { state: exports.StateConstants.unknown.state, index: 0, visited: true }];
77
+ : ['', { state: StateConstants.unknown.state, index: 0, visited: true }];
77
78
  const newEntry = {
78
- [currentStage]: { state: exports.StateConstants.unknown.state, visited: true, index: lastState.index + 1 },
79
+ [currentStage]: { state: StateConstants.unknown.state, visited: true, index: lastState.index + 1 },
79
80
  };
80
81
  this.theStages = Object.assign(this.theStages, newEntry);
81
82
  }
82
83
  this.theStages[currentStage].visited = true;
83
84
  this.theStages[currentStage].state = newState ?? 'inProgress';
84
- this.theStages[currentStage].char = exports.StateConstants[this.theStages[currentStage].state].char;
85
+ this.theStages[currentStage].char = StateConstants[this.theStages[currentStage].state].char;
85
86
  if (newState) {
86
- this.theStages[currentStage].color = exports.StateConstants[newState.toString()].color;
87
+ this.theStages[currentStage].color = StateConstants[newState.toString()].color;
87
88
  }
88
89
  }
89
90
  getStages() {
@@ -94,5 +95,4 @@ class StagedProgress {
94
95
  return currentStage;
95
96
  }
96
97
  }
97
- exports.StagedProgress = StagedProgress;
98
98
  //# sourceMappingURL=stagedProgress.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stagedProgress.js","sourceRoot":"","sources":["../../src/shared/stagedProgress.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,8BAA8B;AAC9B,+BAA+B;AAC/B,iEAA6D;AAC7D,2CAA2C;AAE3C,MAAM,aAAa,GAAG,CAAC,CAAC,EAAE,MAAM,CAA4B,EAAE,CAAC,EAAE,MAAM,CAA4B,EAAU,EAAE,CAC7G,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;AAEjB,QAAA,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC;AAY3C,QAAA,cAAc,GAAwD;IACjF,UAAU,EAAE,EAAE,KAAK,EAAE,kBAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE;IACjF,SAAS,EAAE,EAAE,KAAK,EAAE,gCAAc,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE;IAC3F,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE;IAC7E,OAAO,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE;CAC3E,CAAC;AAMF,MAAsB,cAA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ockForSeconds = void 0;
4
1
  /*
5
2
  * Copyright (c) 2022, salesforce.com, inc.
6
3
  * All rights reserved.
7
4
  * Licensed under the BSD 3-Clause license.
8
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
6
  */
10
- const kit_1 = require("@salesforce/kit");
11
- const getClockForSeconds = (timeInSec) => {
12
- const tc = (0, exports.getTimeComponentsFromSeconds)(timeInSec);
7
+ import { Duration } from '@salesforce/kit';
8
+ export const getClockForSeconds = (timeInSec) => {
9
+ const tc = getTimeComponentsFromSeconds(timeInSec);
13
10
  const dDisplay = tc.days.days > 0 ? `${tc.days.days.toString()}:` : '';
14
11
  const hDisplay = tc.hours.hours.toString().padStart(2, '0');
15
12
  const mDisplay = tc.minutes.minutes.toString().padStart(2, '0');
16
13
  const sDisplay = tc.seconds.seconds.toString().padStart(2, '0');
17
14
  return `${dDisplay}${hDisplay}:${mDisplay}:${sDisplay}`;
18
15
  };
19
- exports.getClockForSeconds = getClockForSeconds;
20
- const getTimeComponentsFromSeconds = (timeInSec) => {
21
- const days = kit_1.Duration.days(Math.floor(timeInSec / 86400));
22
- const hours = kit_1.Duration.hours(Math.floor((timeInSec % 86400) / 3600));
23
- const minutes = kit_1.Duration.minutes(Math.floor((timeInSec % 3600) / 60));
24
- const seconds = kit_1.Duration.seconds(Math.floor(timeInSec % 60));
16
+ export const getTimeComponentsFromSeconds = (timeInSec) => {
17
+ const days = Duration.days(Math.floor(timeInSec / 86400));
18
+ const hours = Duration.hours(Math.floor((timeInSec % 86400) / 3600));
19
+ const minutes = Duration.minutes(Math.floor((timeInSec % 3600) / 60));
20
+ const seconds = Duration.seconds(Math.floor(timeInSec % 60));
25
21
  return { days, hours, minutes, seconds };
26
22
  };
27
- exports.getTimeComponentsFromSeconds = getTimeComponentsFromSeconds;
28
- const getSecondsToHuman = (timeInSec) => {
29
- const tc = (0, exports.getTimeComponentsFromSeconds)(timeInSec);
23
+ export const getSecondsToHuman = (timeInSec) => {
24
+ const tc = getTimeComponentsFromSeconds(timeInSec);
30
25
  const dDisplay = tc.days.days > 0 ? tc.days.toString() + ' ' : '';
31
26
  const hDisplay = tc.hours.hours > 0 ? tc.hours.toString() + ' ' : '';
32
27
  const mDisplay = tc.minutes.minutes > 0 ? tc.minutes.toString() + ' ' : '';
33
28
  const sDisplay = tc.seconds.seconds > 0 ? tc.seconds.toString() : '';
34
29
  return (dDisplay + hDisplay + mDisplay + sDisplay).trim();
35
30
  };
36
- exports.getSecondsToHuman = getSecondsToHuman;
37
31
  //# sourceMappingURL=timeUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"timeUtils.js","sourceRoot":"","sources":["../../src/shared/timeUtils.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yCAA2C;AASpC,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAU,EAAE;IAC9D,MAAM,EAAE,GAAG,IAAA,oCAA4B,EAAC,SAAS,CAAC,CAAC;IAEnD,MAAM,QAAQ,GAAW,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/E,MAAM,QAAQ,GAAW,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACpE,MAAM,QAAQ,GAAW,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACxE,MAAM,QAAQ,GAAW,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAExE,OAAO,GAAG,QAAQ,GAAG,QAAQ,IAAI,QAAQ,IAAI,QAAQ,EAAE,CAAC;AAC1D,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AAC,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IACnF,MAAM,QAAQ,GAAW,EAAE,CAAC,OAAO,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAE7E,OAAO,CAAC,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;AAC5D,CAAC,CAAC"}
@@ -1,5 +1,12 @@
1
+ /// <reference types="node" resolution-mode="require"/>
1
2
  import { ChildProcess } from 'node:child_process';
2
- import * as open from 'open';
3
+ import { Options } from 'open';
3
4
  export declare const getAliasByUsername: (username: string) => Promise<string | undefined>;
4
- export declare const openUrl: (url: string, options: open.Options) => Promise<ChildProcess>;
5
+ export declare const openUrl: (url: string, options: Options) => Promise<ChildProcess>;
5
6
  export declare const lowerToUpper: (object: Record<string, unknown>) => Record<string, unknown>;
7
+ declare const _default: {
8
+ getAliasByUsername: (username: string) => Promise<string | undefined>;
9
+ openUrl: (url: string, options: Options) => Promise<ChildProcess>;
10
+ lowerToUpper: (object: Record<string, unknown>) => Record<string, unknown>;
11
+ };
12
+ export default _default;
@@ -1,21 +1,20 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.lowerToUpper = exports.openUrl = exports.getAliasByUsername = void 0;
4
- const kit_1 = require("@salesforce/kit");
5
- const core_1 = require("@salesforce/core");
6
- const open = require("open");
7
- const getAliasByUsername = async (username) => {
8
- const stateAggregator = await core_1.StateAggregator.getInstance();
1
+ import { upperFirst } from '@salesforce/kit';
2
+ import { StateAggregator } from '@salesforce/core';
3
+ import open from 'open';
4
+ export const getAliasByUsername = async (username) => {
5
+ const stateAggregator = await StateAggregator.getInstance();
9
6
  const keys = stateAggregator.aliases.getAll(username);
10
7
  // use the most recently added alias for that username
11
8
  return keys?.length ? keys[keys.length - 1] : undefined;
12
9
  };
13
- exports.getAliasByUsername = getAliasByUsername;
14
- const openUrl = async (url, options) => open(url, options);
15
- exports.openUrl = openUrl;
16
- const lowerToUpper = (object) =>
10
+ export const openUrl = async (url, options) => open(url, options);
11
+ export const lowerToUpper = (object) =>
17
12
  // the API has keys defined in capital camel case, while the definition schema has them as lower camel case
18
13
  // we need to convert lower camel case to upper before merging options so they will override properly
19
- Object.fromEntries(Object.entries(object).map(([key, value]) => [(0, kit_1.upperFirst)(key), value]));
20
- exports.lowerToUpper = lowerToUpper;
14
+ Object.fromEntries(Object.entries(object).map(([key, value]) => [upperFirst(key), value]));
15
+ export default {
16
+ getAliasByUsername,
17
+ openUrl,
18
+ lowerToUpper,
19
+ };
21
20
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/shared/utils.ts"],"names":[],"mappings":";;;AAOA,yCAA6C;AAC7C,2CAAmD;AACnD,6BAA6B;AAEtB,MAAM,kBAAkB,GAAG,KAAK,EAAE,QAAgB,EAA+B,EAAE;IACxF,MAAM,eAAe,GAAG,MAAM,sBAAe,CAAC,WAAW,EAAE,CAAC;IAC5D,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACtD,sDAAsD;IACtD,OAAO,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1D,CAAC,CAAC;AALW,QAAA,kBAAkB,sBAK7B;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,GAAW,EAAE,OAAqB,EAAyB,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAAlG,QAAA,OAAO,WAA2F;AAExG,MAAM,YAAY,GAAG,CAAC,MAA+B,EAA2B,EAAE;AACvF,2GAA2G;AA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KAAK,CAAC,CAAC,CAAC,CAAC;AAE7F,eAAe;IACb,kBAAkB;IAClB,OAAO;IACP,YAAY;CACb,CAAC"}
@@ -6,6 +6,7 @@ Delete a sandbox.
6
6
 
7
7
  Salesforce CLI marks the org for deletion in the production org that contains the sandbox licenses and then deletes all local references to the org from your computer.
8
8
  Specify a sandbox with either the username you used when you logged into it, or the alias you gave the sandbox when you created it. Run "<%= config.bin %> org list" to view all your orgs, including sandboxes, and their aliases.
9
+ Both the sandbox and the associated production org must already be authenticated with the CLI to successfully delete the sandbox.
9
10
 
10
11
  # examples
11
12
 
@@ -17,7 +18,7 @@ Specify a sandbox with either the username you used when you logged into it, or
17
18
 
18
19
  <%= config.bin %> <%= command.id %> --target-org myusername@example.com.qa
19
20
 
20
- - Delete the sandbox without prompting to confirm :
21
+ - Delete the sandbox without prompting to confirm:
21
22
 
22
23
  <%= config.bin %> <%= command.id %> --target-org my-sandbox --no-prompt
23
24
 
@@ -41,6 +42,11 @@ Successfully marked sandbox %s for deletion.
41
42
 
42
43
  There is no sandbox with the username %s.
43
44
 
44
- # error.isNotSandbox
45
+ # error.unknownSandbox
45
46
 
46
- The target org, %s, is not a sandbox.
47
+ The org with username: %s is not known by the CLI to be a sandbox
48
+
49
+ # error.unknownSandbox.actions
50
+
51
+ Re-authenticate the sandbox with the CLI and try again.
52
+ Ensure the CLI has authenticated with the sandbox's production org.