@salesforce/core 3.23.9 → 3.24.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/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [3.24.0](https://github.com/forcedotcom/sfdx-core/compare/v3.23.9...v3.24.0) (2022-07-14)
6
+
7
+ ### Features
8
+
9
+ - org.scratchOrgCreate uses all options except hub ([045a7aa](https://github.com/forcedotcom/sfdx-core/commit/045a7aa56c97323aa8b3191c4879cd1b43f0cfb1))
10
+
11
+ ### Bug Fixes
12
+
13
+ - align messages/files ([5a5f04d](https://github.com/forcedotcom/sfdx-core/commit/5a5f04d3ea8ffb30fdbbfe2c83824ec56a56ec34))
14
+ - load messages by name ([7c3a2d9](https://github.com/forcedotcom/sfdx-core/commit/7c3a2d9d84f9553bb9cf1bc369b49ca46100484e))
15
+ - use named messages always ([2bb25a9](https://github.com/forcedotcom/sfdx-core/commit/2bb25a9c24fcb7146e363783ea81bc3708060a18))
16
+
5
17
  ### [3.23.9](https://github.com/forcedotcom/sfdx-core/compare/v3.23.8...v3.23.9) (2022-07-14)
6
18
 
7
19
  ### [3.23.8](https://github.com/forcedotcom/sfdx-core/compare/v3.23.7...v3.23.8) (2022-07-13)
package/lib/org/org.d.ts CHANGED
@@ -68,7 +68,7 @@ export declare type ResumeSandboxRequest = {
68
68
  SandboxName?: string;
69
69
  SandboxProcessObjId?: string;
70
70
  };
71
- export declare type ScratchOrgRequest = Pick<ScratchOrgCreateOptions, 'connectedAppConsumerKey' | 'durationDays' | 'nonamespace' | 'noancestors' | 'wait' | 'retry' | 'apiversion' | 'definitionjson' | 'definitionfile' | 'orgConfig' | 'clientSecret'>;
71
+ export declare type ScratchOrgRequest = Omit<ScratchOrgCreateOptions, 'hubOrg'>;
72
72
  export declare type SandboxFields = {
73
73
  sandboxOrgId: string;
74
74
  prodOrgUsername: string;
@@ -47,7 +47,7 @@ export interface ScratchOrgCreateOptions {
47
47
  alias?: string;
48
48
  /** after complete, set the org as the default */
49
49
  setDefault?: boolean;
50
- /** do not use source tracking for this org */
50
+ /** if false, do not use source tracking for this scratch org */
51
51
  tracksSource?: boolean;
52
52
  }
53
53
  export declare const scratchOrgResume: (jobId: string) => Promise<ScratchOrgCreateResult>;
@@ -27,13 +27,8 @@ const messages = messages_1.Messages.load('@salesforce/core', 'scratchOrgCreate'
27
27
  'DurationDaysValidationMaxError',
28
28
  'DurationDaysValidationMinError',
29
29
  'RetryNotIntError',
30
- 'WaitValidationMaxError',
31
30
  'DurationDaysNotIntError',
32
- 'NoScratchOrgInfoError',
33
- 'ScratchOrgDeletedError',
34
- 'StillInProgressError',
35
31
  'CacheMissError',
36
- 'action.StillInProgress',
37
32
  ]);
38
33
  exports.DEFAULT_STREAM_TIMEOUT_MINUTES = 6;
39
34
  const validateDuration = (durationDays) => {
@@ -20,6 +20,10 @@ const namedMessages = messages_1.Messages.load('@salesforce/core', 'scratchOrgEr
20
20
  'SignupFailedUnknownError',
21
21
  'SignupFailedError',
22
22
  'SignupUnexpectedError',
23
+ 'StillInProgressError',
24
+ 'action.StillInProgress',
25
+ 'ScratchOrgDeletedError',
26
+ 'NoScratchOrgInfoError',
23
27
  ]);
24
28
  // getMessage will throw when the code isn't found
25
29
  // and we don't know whether a given code takes arguments or not
@@ -43,12 +47,12 @@ const validateScratchOrgInfoForResume = async ({ jobId, scratchOrgInfo, cache, h
43
47
  cache.unset(jobId);
44
48
  await cache.write();
45
49
  throw scratchOrgInfo.Status === 'Deleted'
46
- ? messages.createError('ScratchOrgDeletedError')
47
- : messages.createError('NoScratchOrgInfoError');
50
+ ? namedMessages.createError('ScratchOrgDeletedError')
51
+ : namedMessages.createError('NoScratchOrgInfoError');
48
52
  }
49
53
  if (['New', 'Creating'].includes(scratchOrgInfo.Status)) {
50
54
  // 2. scratchOrgInfo exists, still isn't finished. Stays in cache for future attempts
51
- throw messages.createError('StillInProgressError', [scratchOrgInfo.Status], ['action.StillInProgress']);
55
+ throw namedMessages.createError('StillInProgressError', [scratchOrgInfo.Status], ['action.StillInProgress']);
52
56
  }
53
57
  return (0, exports.checkScratchOrgInfoForErrors)(scratchOrgInfo, hubUsername);
54
58
  };
@@ -18,26 +18,6 @@ Expected 'durationDays' to be an integer number.
18
18
 
19
19
  Expected 'retry' to be an integer number.
20
20
 
21
- # WaitValidationMaxError
22
-
23
- Expected 'wait' greater than or equal to %s but received %s.
24
-
25
- # NoScratchOrgInfoError
26
-
27
- No ScratchOrgInfo object found in the Dev Hub you specified. Check that the ID and the Dev Hub are correct.
28
-
29
- # ScratchOrgDeletedError
30
-
31
- That scratch org has been deleted, so you can't connect to it anymore.
32
-
33
21
  # CacheMissError
34
22
 
35
23
  The ScratchOrgInfoId %s was not found in the cache.
36
-
37
- # StillInProgressError
38
-
39
- The scratch org is not ready yet (Status = %).
40
-
41
- # action.StillInProgress
42
-
43
- Wait for a few minutes, and then try the <%= config.bin %> <%= command.id %> command again
@@ -14,6 +14,22 @@ See https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_ob
14
14
 
15
15
  The request to create a scratch org returned an unexpected status
16
16
 
17
+ # StillInProgressError
18
+
19
+ The scratch org is not ready yet (Status = %).
20
+
21
+ # action.StillInProgress
22
+
23
+ Wait for a few minutes, and then try the <%= config.bin %> <%= command.id %> command again
24
+
25
+ # NoScratchOrgInfoError
26
+
27
+ No ScratchOrgInfo object found in the Dev Hub you specified. Check that the ID and the Dev Hub are correct.
28
+
29
+ # ScratchOrgDeletedError
30
+
31
+ That scratch org has been deleted, so you can't connect to it anymore.
32
+
17
33
  # INVALID_ID_FIELD
18
34
 
19
35
  Provide a valid template ID, in the format 0TTxxxxxxxxxxxx.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/core",
3
- "version": "3.23.9",
3
+ "version": "3.24.0",
4
4
  "description": "Core libraries to interact with SFDX projects, orgs, and APIs.",
5
5
  "main": "lib/exported",
6
6
  "types": "lib/exported.d.ts",