@salesforce/core 3.7.4 → 3.7.7
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 +219 -0
- package/README.md +4 -4
- package/lib/config/config.d.ts +5 -5
- package/lib/config/config.js +5 -5
- package/lib/config/configAggregator.d.ts +2 -2
- package/lib/config/configAggregator.js +2 -2
- package/lib/config/configFile.d.ts +2 -2
- package/lib/config/configFile.js +7 -7
- package/lib/config/configStore.js +7 -6
- package/lib/config/envVars.d.ts +20 -5
- package/lib/config/envVars.js +70 -5
- package/lib/crypto/keyChainImpl.js +2 -3
- package/lib/deviceOauthService.js +2 -2
- package/lib/exported.d.ts +6 -4
- package/lib/exported.js +13 -6
- package/lib/globalInfo/accessors/aliasAccessor.js +2 -2
- package/lib/lifecycleEvents.js +1 -1
- package/lib/logger.d.ts +3 -3
- package/lib/logger.js +9 -10
- package/lib/messages.d.ts +2 -2
- package/lib/messages.js +4 -4
- package/lib/org/authInfo.d.ts +1 -1
- package/lib/org/authInfo.js +6 -7
- package/lib/org/authRemover.d.ts +2 -2
- package/lib/org/authRemover.js +2 -2
- package/lib/org/connection.d.ts +7 -2
- package/lib/org/connection.js +17 -4
- package/lib/org/org.d.ts +16 -6
- package/lib/org/org.js +52 -49
- package/lib/org/permissionSetAssignment.js +2 -2
- package/lib/org/scratchOrgCreate.d.ts +43 -0
- package/lib/org/scratchOrgCreate.js +142 -0
- package/lib/org/scratchOrgErrorCodes.d.ts +4 -0
- package/lib/org/scratchOrgErrorCodes.js +62 -0
- package/lib/org/scratchOrgFeatureDeprecation.d.ts +26 -0
- package/lib/org/scratchOrgFeatureDeprecation.js +110 -0
- package/lib/org/scratchOrgInfoApi.d.ts +94 -0
- package/lib/org/scratchOrgInfoApi.js +350 -0
- package/lib/org/scratchOrgInfoGenerator.d.ts +63 -0
- package/lib/org/scratchOrgInfoGenerator.js +223 -0
- package/lib/org/scratchOrgSettingsGenerator.d.ts +56 -0
- package/lib/org/scratchOrgSettingsGenerator.js +210 -0
- package/lib/org/user.js +8 -7
- package/lib/schema/printer.js +2 -2
- package/lib/schema/validator.d.ts +4 -4
- package/lib/schema/validator.js +9 -9
- package/lib/{sfdxError.d.ts → sfError.d.ts} +14 -9
- package/lib/{sfdxError.js → sfError.js} +20 -14
- package/lib/{sfdxProject.d.ts → sfProject.d.ts} +37 -27
- package/lib/{sfdxProject.js → sfProject.js} +75 -63
- package/lib/status/pollingClient.d.ts +2 -2
- package/lib/status/pollingClient.js +10 -4
- package/lib/status/streamingClient.d.ts +1 -1
- package/lib/status/streamingClient.js +6 -6
- package/lib/testSetup.d.ts +4 -4
- package/lib/testSetup.js +8 -8
- package/lib/util/fs.js +7 -7
- package/lib/util/internal.d.ts +2 -2
- package/lib/util/internal.js +2 -2
- package/lib/util/jsonXmlTools.d.ts +14 -0
- package/lib/util/jsonXmlTools.js +41 -0
- package/lib/util/mapKeys.d.ts +14 -0
- package/lib/util/mapKeys.js +48 -0
- package/lib/util/sfdcUrl.d.ts +2 -2
- package/lib/util/sfdcUrl.js +2 -2
- package/lib/util/zipWriter.d.ts +14 -0
- package/lib/util/zipWriter.js +68 -0
- package/lib/webOAuthServer.js +11 -11
- package/messages/envVars.md +53 -13
- package/messages/org.md +4 -0
- package/messages/scratchOrgCreate.md +27 -0
- package/messages/scratchOrgErrorCodes.md +99 -0
- package/messages/scratchOrgFeatureDeprecation.md +11 -0
- package/messages/scratchOrgInfoApi.md +11 -0
- package/messages/scratchOrgInfoGenerator.md +19 -0
- package/messages/user.md +4 -0
- package/package.json +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,225 @@
|
|
|
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.7.7](https://github.com/forcedotcom/sfdx-core/compare/v3.7.6...v3.7.7) (2022-03-01)
|
|
6
|
+
|
|
7
|
+
### [3.7.6](https://github.com/forcedotcom/sfdx-core/compare/v4.0.0...v3.7.6) (2022-02-28)
|
|
8
|
+
|
|
9
|
+
## [4.0.0](https://github.com/forcedotcom/sfdx-core/compare/v2.35.2...v4.0.0) (2022-02-28)
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
- work through conflicts, UTs, pushing for comparison ([476c6fe](https://github.com/forcedotcom/sfdx-core/commit/476c6fe13514903ac97f7def2aba39b070ee2c33))
|
|
14
|
+
|
|
15
|
+
### [3.7.5](https://github.com/forcedotcom/sfdx-core/compare/v2.35.1...v3.7.5) (2022-02-14)
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
- add env vars from sfdx-cli init to envvars ([#520](https://github.com/forcedotcom/sfdx-core/issues/520)) ([8ef2785](https://github.com/forcedotcom/sfdx-core/commit/8ef27859d95bfffc5999b14f4792874d04f0504c))
|
|
20
|
+
|
|
21
|
+
### [3.7.4](https://github.com/forcedotcom/sfdx-core/compare/v2.35.0...v3.7.4) (2022-02-07)
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
- pin ts to 4.4.4 and bump other deps ([#509](https://github.com/forcedotcom/sfdx-core/issues/509)) ([1c0e15c](https://github.com/forcedotcom/sfdx-core/commit/1c0e15cd9a96f03e24476c13d73b62577a535fa3))
|
|
26
|
+
|
|
27
|
+
### [3.7.3](https://github.com/forcedotcom/sfdx-core/compare/v2.33.1...v3.7.3) (2021-12-16)
|
|
28
|
+
|
|
29
|
+
### [3.7.2](https://github.com/forcedotcom/sfdx-core/compare/v3.7.1...v3.7.2) (2021-10-28)
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
- make @types/sfdx-faye a dependendcy ([683680b](https://github.com/forcedotcom/sfdx-core/commit/683680b8133048f71d25ef4df7aa24d9700dc5e8))
|
|
34
|
+
|
|
35
|
+
### [3.7.1](https://github.com/forcedotcom/sfdx-core/compare/v2.28.2...v3.7.1) (2021-10-28)
|
|
36
|
+
|
|
37
|
+
## [3.7.0](https://github.com/forcedotcom/sfdx-core/compare/v3.6.6...v3.7.0) (2021-10-12)
|
|
38
|
+
|
|
39
|
+
### Features
|
|
40
|
+
|
|
41
|
+
- use jsforce v2 ([#457](https://github.com/forcedotcom/sfdx-core/issues/457)) ([4a9094e](https://github.com/forcedotcom/sfdx-core/commit/4a9094e958288cdcc6c69f5d87b10a70a437d8e9))
|
|
42
|
+
|
|
43
|
+
### [3.6.6](https://github.com/forcedotcom/sfdx-core/compare/v2.28.1...v3.6.6) (2021-10-08)
|
|
44
|
+
|
|
45
|
+
### [3.6.5](https://github.com/forcedotcom/sfdx-core/compare/v3.6.4...v3.6.5) (2021-09-29)
|
|
46
|
+
|
|
47
|
+
### Bug Fixes
|
|
48
|
+
|
|
49
|
+
- add getValue to AliasAccessor ([c4b69f5](https://github.com/forcedotcom/sfdx-core/commit/c4b69f5ff38547fad640c64833291fe0c6e06a79))
|
|
50
|
+
|
|
51
|
+
### [3.6.4](https://github.com/forcedotcom/sfdx-core/compare/v3.6.3...v3.6.4) (2021-09-23)
|
|
52
|
+
|
|
53
|
+
### Bug Fixes
|
|
54
|
+
|
|
55
|
+
- edit the env var blurbs ([#482](https://github.com/forcedotcom/sfdx-core/issues/482)) ([bbbdb6d](https://github.com/forcedotcom/sfdx-core/commit/bbbdb6d0800015e94ce0f0c551eec8ed73dd87c6))
|
|
56
|
+
|
|
57
|
+
### [3.6.3](https://github.com/forcedotcom/sfdx-core/compare/v3.6.2...v3.6.3) (2021-09-23)
|
|
58
|
+
|
|
59
|
+
### Bug Fixes
|
|
60
|
+
|
|
61
|
+
- edit the config var blurbs ([#480](https://github.com/forcedotcom/sfdx-core/issues/480)) ([f845512](https://github.com/forcedotcom/sfdx-core/commit/f8455121bfd96f27495bc124dc06570632dfce70))
|
|
62
|
+
|
|
63
|
+
### [3.6.2](https://github.com/forcedotcom/sfdx-core/compare/v2.28.0...v3.6.2) (2021-09-17)
|
|
64
|
+
|
|
65
|
+
### Bug Fixes
|
|
66
|
+
|
|
67
|
+
- improve time to build auths for many orgs @W-9914839@ ([#478](https://github.com/forcedotcom/sfdx-core/issues/478)) ([c788541](https://github.com/forcedotcom/sfdx-core/commit/c7885415d59994b28552227f0b84dcee5d3ec7cf))
|
|
68
|
+
|
|
69
|
+
### [3.6.1](https://github.com/forcedotcom/sfdx-core/compare/v3.6.0...v3.6.1) (2021-09-13)
|
|
70
|
+
|
|
71
|
+
### Bug Fixes
|
|
72
|
+
|
|
73
|
+
- remove tokens associated with org ([#477](https://github.com/forcedotcom/sfdx-core/issues/477)) ([5034fa2](https://github.com/forcedotcom/sfdx-core/commit/5034fa2d4c52d347c00499e137a71366e4feba7f))
|
|
74
|
+
|
|
75
|
+
## [3.6.0](https://github.com/forcedotcom/sfdx-core/compare/v3.5.0...v3.6.0) (2021-09-10)
|
|
76
|
+
|
|
77
|
+
### Features
|
|
78
|
+
|
|
79
|
+
- add help section helper ([#474](https://github.com/forcedotcom/sfdx-core/issues/474)) ([b34c2d7](https://github.com/forcedotcom/sfdx-core/commit/b34c2d7a442aed2cf091fd394a7c3656287d1dbf))
|
|
80
|
+
|
|
81
|
+
## [3.5.0](https://github.com/forcedotcom/sfdx-core/compare/v3.4.5...v3.5.0) (2021-09-09)
|
|
82
|
+
|
|
83
|
+
### Features
|
|
84
|
+
|
|
85
|
+
- expose well known env vars as part of core ([#473](https://github.com/forcedotcom/sfdx-core/issues/473)) ([11c3f53](https://github.com/forcedotcom/sfdx-core/commit/11c3f53f964459072826274e6ebb33d4a9ecb990))
|
|
86
|
+
|
|
87
|
+
### [3.4.5](https://github.com/forcedotcom/sfdx-core/compare/v3.4.4...v3.4.5) (2021-09-03)
|
|
88
|
+
|
|
89
|
+
### Bug Fixes
|
|
90
|
+
|
|
91
|
+
- provide the correct options to SfdxConfig ([fa2117e](https://github.com/forcedotcom/sfdx-core/commit/fa2117e12d7a903f26067bdcf35d7ec9c142101e))
|
|
92
|
+
|
|
93
|
+
### [3.4.4](https://github.com/forcedotcom/sfdx-core/compare/v3.4.3...v3.4.4) (2021-09-03)
|
|
94
|
+
|
|
95
|
+
### [3.4.3](https://github.com/forcedotcom/sfdx-core/compare/v3.4.2...v3.4.3) (2021-08-26)
|
|
96
|
+
|
|
97
|
+
### [3.4.2](https://github.com/forcedotcom/sfdx-core/compare/v3.4.1...v3.4.2) (2021-08-17)
|
|
98
|
+
|
|
99
|
+
### Bug Fixes
|
|
100
|
+
|
|
101
|
+
- improve interoperability when unsetting ([#467](https://github.com/forcedotcom/sfdx-core/issues/467)) ([ad781d5](https://github.com/forcedotcom/sfdx-core/commit/ad781d5378652dfd64ccb476c11f418e940b8669))
|
|
102
|
+
|
|
103
|
+
### [3.4.1](https://github.com/forcedotcom/sfdx-core/compare/v3.4.0...v3.4.1) (2021-08-11)
|
|
104
|
+
|
|
105
|
+
### Bug Fixes
|
|
106
|
+
|
|
107
|
+
- optionally throw error when reading deprecated config key ([#466](https://github.com/forcedotcom/sfdx-core/issues/466)) ([3118ad8](https://github.com/forcedotcom/sfdx-core/commit/3118ad836db384ac27c2b1db88c4753e6121e4db))
|
|
108
|
+
|
|
109
|
+
## [3.4.0](https://github.com/forcedotcom/sfdx-core/compare/v3.3.12...v3.4.0) (2021-08-11)
|
|
110
|
+
|
|
111
|
+
### Features
|
|
112
|
+
|
|
113
|
+
- config interoperability ([#461](https://github.com/forcedotcom/sfdx-core/issues/461)) ([11b60ad](https://github.com/forcedotcom/sfdx-core/commit/11b60adbe54acc8e16a90327c77abbe2613fbaab))
|
|
114
|
+
|
|
115
|
+
### [3.3.12](https://github.com/forcedotcom/sfdx-core/compare/v2.27.2...v3.3.12) (2021-08-10)
|
|
116
|
+
|
|
117
|
+
### Bug Fixes
|
|
118
|
+
|
|
119
|
+
- add predicate function to list all auths ([ccdb02c](https://github.com/forcedotcom/sfdx-core/commit/ccdb02c268fae7532b23e0c791bcdd831f77cf98))
|
|
120
|
+
|
|
121
|
+
### [3.3.11](https://github.com/forcedotcom/sfdx-core/compare/v3.3.10...v3.3.11) (2021-08-04)
|
|
122
|
+
|
|
123
|
+
### Bug Fixes
|
|
124
|
+
|
|
125
|
+
- allows for message keys of error and errors ([#455](https://github.com/forcedotcom/sfdx-core/issues/455)) ([3bfac58](https://github.com/forcedotcom/sfdx-core/commit/3bfac587c6cf1734af6f2b517439d278591ddd50))
|
|
126
|
+
|
|
127
|
+
### [3.3.10](https://github.com/forcedotcom/sfdx-core/compare/v3.3.9...v3.3.10) (2021-08-04)
|
|
128
|
+
|
|
129
|
+
### [3.3.9](https://github.com/forcedotcom/sfdx-core/compare/v3.3.8...v3.3.9) (2021-08-04)
|
|
130
|
+
|
|
131
|
+
### Bug Fixes
|
|
132
|
+
|
|
133
|
+
- merge main(v2) into v3 ([#452](https://github.com/forcedotcom/sfdx-core/issues/452)) ([3a003b9](https://github.com/forcedotcom/sfdx-core/commit/3a003b9c17962f77344e4a23314bb608e1ae50db))
|
|
134
|
+
|
|
135
|
+
### [3.3.8](https://github.com/forcedotcom/sfdx-core/compare/v3.3.7...v3.3.8) (2021-08-02)
|
|
136
|
+
|
|
137
|
+
### Bug Fixes
|
|
138
|
+
|
|
139
|
+
- return all info from AuthInfo.listAllAuthorizations ([#449](https://github.com/forcedotcom/sfdx-core/issues/449)) ([17e60ea](https://github.com/forcedotcom/sfdx-core/commit/17e60eabe87c73a83c26344967076f365ddea81c))
|
|
140
|
+
|
|
141
|
+
### [3.3.7](https://github.com/forcedotcom/sfdx-core/compare/v2.27.0...v3.3.7) (2021-07-30)
|
|
142
|
+
|
|
143
|
+
### [3.3.6](https://github.com/forcedotcom/sfdx-core/compare/v3.3.5...v3.3.6) (2021-07-28)
|
|
144
|
+
|
|
145
|
+
### Bug Fixes
|
|
146
|
+
|
|
147
|
+
- use correct method to get username ([#446](https://github.com/forcedotcom/sfdx-core/issues/446)) ([79a6b2f](https://github.com/forcedotcom/sfdx-core/commit/79a6b2f069f95b0c50a6c03ecbac07cf0d1832b1))
|
|
148
|
+
|
|
149
|
+
### [3.3.5](https://github.com/forcedotcom/sfdx-core/compare/v3.3.4...v3.3.5) (2021-07-28)
|
|
150
|
+
|
|
151
|
+
### [3.3.4](https://github.com/forcedotcom/sfdx-core/compare/v3.3.3...v3.3.4) (2021-07-26)
|
|
152
|
+
|
|
153
|
+
### Bug Fixes
|
|
154
|
+
|
|
155
|
+
- remove bad validator function ([1b97dc6](https://github.com/forcedotcom/sfdx-core/commit/1b97dc6f4d657a5b86489d33c4843ebfd54b3715))
|
|
156
|
+
|
|
157
|
+
### [3.3.3](https://github.com/forcedotcom/sfdx-core/compare/v3.3.2...v3.3.3) (2021-07-22)
|
|
158
|
+
|
|
159
|
+
### Bug Fixes
|
|
160
|
+
|
|
161
|
+
- write sf.json contents on init ([c47f649](https://github.com/forcedotcom/sfdx-core/commit/c47f64954118d0d2f7f4a8e992d3450516239084))
|
|
162
|
+
|
|
163
|
+
### [3.3.2](https://github.com/forcedotcom/sfdx-core/compare/v2.26.1...v3.3.2) (2021-07-21)
|
|
164
|
+
|
|
165
|
+
### Bug Fixes
|
|
166
|
+
|
|
167
|
+
- correct jsdoc ([a362e94](https://github.com/forcedotcom/sfdx-core/commit/a362e94c4ae7538cbbcd7dae8fcd3244629d845c))
|
|
168
|
+
|
|
169
|
+
### [3.3.1](https://github.com/forcedotcom/sfdx-core/compare/v3.3.0...v3.3.1) (2021-07-15)
|
|
170
|
+
|
|
171
|
+
### Bug Fixes
|
|
172
|
+
|
|
173
|
+
- temporarily point Alias back to .sfdx ([#438](https://github.com/forcedotcom/sfdx-core/issues/438)) ([4bffcd8](https://github.com/forcedotcom/sfdx-core/commit/4bffcd84362d5b3049ef428e90dc1b538a435f81))
|
|
174
|
+
|
|
175
|
+
## [3.3.0](https://github.com/forcedotcom/sfdx-core/compare/v3.2.0-v3.0...v3.3.0) (2021-07-14)
|
|
176
|
+
|
|
177
|
+
### Features
|
|
178
|
+
|
|
179
|
+
- V3 merge ([#436](https://github.com/forcedotcom/sfdx-core/issues/436)) ([1193449](https://github.com/forcedotcom/sfdx-core/commit/119344969147679088e30bae4c4fc5e941661078)), closes [#413](https://github.com/forcedotcom/sfdx-core/issues/413) [#415](https://github.com/forcedotcom/sfdx-core/issues/415) [#428](https://github.com/forcedotcom/sfdx-core/issues/428) [#429](https://github.com/forcedotcom/sfdx-core/issues/429) [#427](https://github.com/forcedotcom/sfdx-core/issues/427) [#432](https://github.com/forcedotcom/sfdx-core/issues/432)
|
|
180
|
+
|
|
181
|
+
## [3.2.0-v3.0](https://github.com/forcedotcom/sfdx-core/compare/v2.26.0...v3.2.0-v3.0) (2021-07-14)
|
|
182
|
+
|
|
183
|
+
### Features
|
|
184
|
+
|
|
185
|
+
- use .sf/config.json @W-9546117@ ([#433](https://github.com/forcedotcom/sfdx-core/issues/433)) ([6c41653](https://github.com/forcedotcom/sfdx-core/commit/6c416531a9bae10e855ded3efc289a99196bc26b))
|
|
186
|
+
|
|
187
|
+
### [3.1.1-v3.2](https://github.com/forcedotcom/sfdx-core/compare/v2.24.2...v3.1.1-v3.2) (2021-06-29)
|
|
188
|
+
|
|
189
|
+
### Bug Fixes
|
|
190
|
+
|
|
191
|
+
- do not use function prop ([#426](https://github.com/forcedotcom/sfdx-core/issues/426)) ([39efe0c](https://github.com/forcedotcom/sfdx-core/commit/39efe0ccc84b05bc891e54b24bfcddc62790ae0e))
|
|
192
|
+
|
|
193
|
+
### [3.1.1-v3.1](https://github.com/forcedotcom/sfdx-core/compare/v2.24.0...v3.1.1-v3.1) (2021-06-14)
|
|
194
|
+
|
|
195
|
+
### Bug Fixes
|
|
196
|
+
|
|
197
|
+
- keep track of auth changes ([210be6c](https://github.com/forcedotcom/sfdx-core/commit/210be6cb408bd9ecc861989570df0e14f6a3a566))
|
|
198
|
+
|
|
199
|
+
### [3.1.1-v3.0](https://github.com/forcedotcom/sfdx-core/compare/v2.23.3...v3.1.1-v3.0) (2021-06-03)
|
|
200
|
+
|
|
201
|
+
### ⚠ BREAKING CHANGES
|
|
202
|
+
|
|
203
|
+
- default to reading files from cache
|
|
204
|
+
|
|
205
|
+
### Features
|
|
206
|
+
|
|
207
|
+
- add GlobalInfo config file ([#397](https://github.com/forcedotcom/sfdx-core/issues/397)) ([889425c](https://github.com/forcedotcom/sfdx-core/commit/889425c06e8ed6a364d9a2bc3dd5ef0a38a66046))
|
|
208
|
+
- add message support for markdown files ([0f235a2](https://github.com/forcedotcom/sfdx-core/commit/0f235a23d5dddbd7b3f07544d8c7e380875c6c55))
|
|
209
|
+
- default to reading files from cache ([558319d](https://github.com/forcedotcom/sfdx-core/commit/558319dfdc81e2bae549d58be75a701162801994))
|
|
210
|
+
- move crypto to config file @W-9225317@ ([#406](https://github.com/forcedotcom/sfdx-core/issues/406)) ([bac83c3](https://github.com/forcedotcom/sfdx-core/commit/bac83c3a52b15c9b462dfb68be9d080e710493cd))
|
|
211
|
+
|
|
212
|
+
### Bug Fixes
|
|
213
|
+
|
|
214
|
+
- compilation errors ([33a9876](https://github.com/forcedotcom/sfdx-core/commit/33a9876575eff7944bb287d428f52413831725d9))
|
|
215
|
+
- unit test failures ([4507575](https://github.com/forcedotcom/sfdx-core/commit/45075754175d411b6cb71eb809096e6eb3e23d95))
|
|
216
|
+
- unsetAuthorization ([#399](https://github.com/forcedotcom/sfdx-core/issues/399)) ([dd57438](https://github.com/forcedotcom/sfdx-core/commit/dd57438a95b49515f560d3b915cdf916a4b8643b))
|
|
217
|
+
|
|
218
|
+
### [3.7.5](https://github.com/forcedotcom/sfdx-core/compare/v3.7.4...v3.7.5) (2022-02-14)
|
|
219
|
+
|
|
220
|
+
### Bug Fixes
|
|
221
|
+
|
|
222
|
+
- add env vars from sfdx-cli init to envvars ([#520](https://github.com/forcedotcom/sfdx-core/issues/520)) ([8ef2785](https://github.com/forcedotcom/sfdx-core/commit/8ef27859d95bfffc5999b14f4792874d04f0504c))
|
|
223
|
+
|
|
5
224
|
### [3.7.4](https://github.com/forcedotcom/sfdx-core/compare/v3.7.3...v3.7.4) (2022-02-07)
|
|
6
225
|
|
|
7
226
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ describe('Mocking Auth data', () => {
|
|
|
52
52
|
After having a valid AuthInfo object you can then create fake connections to a Salesforce.com scratch org. This allows for writing tests that can validate result responses for SOQL queries and REST endpoints.
|
|
53
53
|
|
|
54
54
|
```typescript
|
|
55
|
-
import { AuthInfo, Connection,
|
|
55
|
+
import { AuthInfo, Connection, SfError } from '@salesforce/core';
|
|
56
56
|
import { MockTestOrgData, testSetup } from '@salesforce/core/lib/testSetup';
|
|
57
57
|
import { AnyJson, ensureJsonMap, JsonMap } from '@salesforce/ts-types';
|
|
58
58
|
import { ensureString } from '@salesforce/ts-types';
|
|
@@ -77,7 +77,7 @@ describe('Mocking a force server call', () => {
|
|
|
77
77
|
if (request && ensureString(_request.url).includes('Account')) {
|
|
78
78
|
return Promise.resolve(records);
|
|
79
79
|
} else {
|
|
80
|
-
return Promise.reject(new
|
|
80
|
+
return Promise.reject(new SfError(`Unexpected request: ${_request.url}`));
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
83
|
const connection: Connection = await Connection.create({
|
|
@@ -117,13 +117,13 @@ describe('Using the built in Sinon sandbox.', () => {
|
|
|
117
117
|
It's important to have negative tests that ensure proper error handling. With `shouldThrow` it's easy to test for expected async rejections.
|
|
118
118
|
|
|
119
119
|
```typescript
|
|
120
|
-
import {
|
|
120
|
+
import { SfError } from '@salesforce/core';
|
|
121
121
|
import { shouldThrow } from '@salesforce/core/lib/testSetup';
|
|
122
122
|
import { strictEqual } from 'assert';
|
|
123
123
|
|
|
124
124
|
class TestObject {
|
|
125
125
|
public static async method() {
|
|
126
|
-
throw new
|
|
126
|
+
throw new SfError('Error', 'ExpectedError');
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
|
package/lib/config/config.d.ts
CHANGED
|
@@ -202,7 +202,7 @@ export declare class Config extends ConfigFile<ConfigFile.Options, ConfigPropert
|
|
|
202
202
|
* DO NOT CALL - The config file needs to encrypt values which can only be done asynchronously.
|
|
203
203
|
* Call {@link SfdxConfig.write} instead.
|
|
204
204
|
*
|
|
205
|
-
* **Throws** *{@link
|
|
205
|
+
* **Throws** *{@link SfError}{ name: 'InvalidWriteError' }* Always.
|
|
206
206
|
*
|
|
207
207
|
* @param newContents Contents to write
|
|
208
208
|
*/
|
|
@@ -210,8 +210,8 @@ export declare class Config extends ConfigFile<ConfigFile.Options, ConfigPropert
|
|
|
210
210
|
/**
|
|
211
211
|
* Sets a value for a property.
|
|
212
212
|
*
|
|
213
|
-
* **Throws** *{@link
|
|
214
|
-
* **Throws** *{@link
|
|
213
|
+
* **Throws** *{@link SfError}{ name: 'UnknownConfigKeyError' }* An attempt to get a property that's not supported.
|
|
214
|
+
* **Throws** *{@link SfError}{ name: 'InvalidConfigValueError' }* If the input validator fails.
|
|
215
215
|
*
|
|
216
216
|
* @param key The property to set.
|
|
217
217
|
* @param value The value of the property.
|
|
@@ -220,7 +220,7 @@ export declare class Config extends ConfigFile<ConfigFile.Options, ConfigPropert
|
|
|
220
220
|
/**
|
|
221
221
|
* Unsets a value for a property.
|
|
222
222
|
*
|
|
223
|
-
* **Throws** *{@link
|
|
223
|
+
* **Throws** *{@link SfError}{ name: 'UnknownConfigKeyError' }* If the input validator fails.
|
|
224
224
|
*
|
|
225
225
|
* @param key The property to unset.
|
|
226
226
|
*/
|
|
@@ -228,7 +228,7 @@ export declare class Config extends ConfigFile<ConfigFile.Options, ConfigPropert
|
|
|
228
228
|
/**
|
|
229
229
|
* Get an individual property config.
|
|
230
230
|
*
|
|
231
|
-
* **Throws** *{@link
|
|
231
|
+
* **Throws** *{@link SfError}{ name: 'UnknownConfigKeyError' }* An attempt to get a property that's not supported.
|
|
232
232
|
*
|
|
233
233
|
* @param propertyName The name of the property.
|
|
234
234
|
*/
|
package/lib/config/config.js
CHANGED
|
@@ -308,7 +308,7 @@ class Config extends configFile_1.ConfigFile {
|
|
|
308
308
|
* DO NOT CALL - The config file needs to encrypt values which can only be done asynchronously.
|
|
309
309
|
* Call {@link SfdxConfig.write} instead.
|
|
310
310
|
*
|
|
311
|
-
* **Throws** *{@link
|
|
311
|
+
* **Throws** *{@link SfError}{ name: 'InvalidWriteError' }* Always.
|
|
312
312
|
*
|
|
313
313
|
* @param newContents Contents to write
|
|
314
314
|
*/
|
|
@@ -319,8 +319,8 @@ class Config extends configFile_1.ConfigFile {
|
|
|
319
319
|
/**
|
|
320
320
|
* Sets a value for a property.
|
|
321
321
|
*
|
|
322
|
-
* **Throws** *{@link
|
|
323
|
-
* **Throws** *{@link
|
|
322
|
+
* **Throws** *{@link SfError}{ name: 'UnknownConfigKeyError' }* An attempt to get a property that's not supported.
|
|
323
|
+
* **Throws** *{@link SfError}{ name: 'InvalidConfigValueError' }* If the input validator fails.
|
|
324
324
|
*
|
|
325
325
|
* @param key The property to set.
|
|
326
326
|
* @param value The value of the property.
|
|
@@ -355,7 +355,7 @@ class Config extends configFile_1.ConfigFile {
|
|
|
355
355
|
/**
|
|
356
356
|
* Unsets a value for a property.
|
|
357
357
|
*
|
|
358
|
-
* **Throws** *{@link
|
|
358
|
+
* **Throws** *{@link SfError}{ name: 'UnknownConfigKeyError' }* If the input validator fails.
|
|
359
359
|
*
|
|
360
360
|
* @param key The property to unset.
|
|
361
361
|
*/
|
|
@@ -372,7 +372,7 @@ class Config extends configFile_1.ConfigFile {
|
|
|
372
372
|
/**
|
|
373
373
|
* Get an individual property config.
|
|
374
374
|
*
|
|
375
|
-
* **Throws** *{@link
|
|
375
|
+
* **Throws** *{@link SfError}{ name: 'UnknownConfigKeyError' }* An attempt to get a property that's not supported.
|
|
376
376
|
*
|
|
377
377
|
* @param propertyName The name of the property.
|
|
378
378
|
*/
|
|
@@ -88,7 +88,7 @@ export declare class ConfigAggregator extends AsyncOptionalCreatable<JsonMap> {
|
|
|
88
88
|
/**
|
|
89
89
|
* Get a resolved config property.
|
|
90
90
|
*
|
|
91
|
-
* **Throws** *{@link
|
|
91
|
+
* **Throws** *{@link SfError}{ name: 'UnknownConfigKeyError' }* An attempt to get a property that's not supported.
|
|
92
92
|
*
|
|
93
93
|
* @param key The key of the property.
|
|
94
94
|
*/
|
|
@@ -96,7 +96,7 @@ export declare class ConfigAggregator extends AsyncOptionalCreatable<JsonMap> {
|
|
|
96
96
|
/**
|
|
97
97
|
* Get a resolved config property meta.
|
|
98
98
|
*
|
|
99
|
-
* **Throws** *{@link
|
|
99
|
+
* **Throws** *{@link SfError}{ name: 'UnknownConfigKeyError' }* An attempt to get a property that's not supported.
|
|
100
100
|
*
|
|
101
101
|
* @param key The key of the property.
|
|
102
102
|
*/
|
|
@@ -100,7 +100,7 @@ class ConfigAggregator extends kit_1.AsyncOptionalCreatable {
|
|
|
100
100
|
/**
|
|
101
101
|
* Get a resolved config property.
|
|
102
102
|
*
|
|
103
|
-
* **Throws** *{@link
|
|
103
|
+
* **Throws** *{@link SfError}{ name: 'UnknownConfigKeyError' }* An attempt to get a property that's not supported.
|
|
104
104
|
*
|
|
105
105
|
* @param key The key of the property.
|
|
106
106
|
*/
|
|
@@ -115,7 +115,7 @@ class ConfigAggregator extends kit_1.AsyncOptionalCreatable {
|
|
|
115
115
|
/**
|
|
116
116
|
* Get a resolved config property meta.
|
|
117
117
|
*
|
|
118
|
-
* **Throws** *{@link
|
|
118
|
+
* **Throws** *{@link SfError}{ name: 'UnknownConfigKeyError' }* An attempt to get a property that's not supported.
|
|
119
119
|
*
|
|
120
120
|
* @param key The key of the property.
|
|
121
121
|
*/
|
|
@@ -78,7 +78,7 @@ export declare class ConfigFile<T extends ConfigFile.Options = ConfigFile.Option
|
|
|
78
78
|
* Read the config file and set the config contents. Returns the config contents of the config file. As an
|
|
79
79
|
* optimization, files are only read once per process and updated in memory and via `write()`. To force
|
|
80
80
|
* a read from the filesystem pass `force=true`.
|
|
81
|
-
* **Throws** *{@link
|
|
81
|
+
* **Throws** *{@link SfError}{ name: 'UnexpectedJsonFileFormat' }* There was a problem reading or parsing the file.
|
|
82
82
|
*
|
|
83
83
|
* @param [throwOnNotFound = false] Optionally indicate if a throw should occur on file read.
|
|
84
84
|
* @param [force = false] Optionally force the file to be read from disk even when already read within the process.
|
|
@@ -88,7 +88,7 @@ export declare class ConfigFile<T extends ConfigFile.Options = ConfigFile.Option
|
|
|
88
88
|
* Read the config file and set the config contents. Returns the config contents of the config file. As an
|
|
89
89
|
* optimization, files are only read once per process and updated in memory and via `write()`. To force
|
|
90
90
|
* a read from the filesystem pass `force=true`.
|
|
91
|
-
* **Throws** *{@link
|
|
91
|
+
* **Throws** *{@link SfError}{ name: 'UnexpectedJsonFileFormat' }* There was a problem reading or parsing the file.
|
|
92
92
|
*
|
|
93
93
|
* @param [throwOnNotFound = false] Optionally indicate if a throw should occur on file read.
|
|
94
94
|
* @param [force = false] Optionally force the file to be read from disk even when already read within the process.
|
package/lib/config/configFile.js
CHANGED
|
@@ -13,7 +13,7 @@ const path_1 = require("path");
|
|
|
13
13
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
14
14
|
const global_1 = require("../global");
|
|
15
15
|
const logger_1 = require("../logger");
|
|
16
|
-
const
|
|
16
|
+
const sfError_1 = require("../sfError");
|
|
17
17
|
const fs_2 = require("../util/fs");
|
|
18
18
|
const internal_1 = require("../util/internal");
|
|
19
19
|
const configStore_1 = require("./configStore");
|
|
@@ -65,7 +65,7 @@ class ConfigFile extends configStore_1.BaseConfigStore {
|
|
|
65
65
|
*/
|
|
66
66
|
static getFileName() {
|
|
67
67
|
// Can not have abstract static methods, so throw a runtime error.
|
|
68
|
-
throw new
|
|
68
|
+
throw new sfError_1.SfError('Unknown filename for config file.');
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
71
71
|
* Returns the default options for the config file.
|
|
@@ -135,7 +135,7 @@ class ConfigFile extends configStore_1.BaseConfigStore {
|
|
|
135
135
|
* Read the config file and set the config contents. Returns the config contents of the config file. As an
|
|
136
136
|
* optimization, files are only read once per process and updated in memory and via `write()`. To force
|
|
137
137
|
* a read from the filesystem pass `force=true`.
|
|
138
|
-
* **Throws** *{@link
|
|
138
|
+
* **Throws** *{@link SfError}{ name: 'UnexpectedJsonFileFormat' }* There was a problem reading or parsing the file.
|
|
139
139
|
*
|
|
140
140
|
* @param [throwOnNotFound = false] Optionally indicate if a throw should occur on file read.
|
|
141
141
|
* @param [force = false] Optionally force the file to be read from disk even when already read within the process.
|
|
@@ -170,7 +170,7 @@ class ConfigFile extends configStore_1.BaseConfigStore {
|
|
|
170
170
|
* Read the config file and set the config contents. Returns the config contents of the config file. As an
|
|
171
171
|
* optimization, files are only read once per process and updated in memory and via `write()`. To force
|
|
172
172
|
* a read from the filesystem pass `force=true`.
|
|
173
|
-
* **Throws** *{@link
|
|
173
|
+
* **Throws** *{@link SfError}{ name: 'UnexpectedJsonFileFormat' }* There was a problem reading or parsing the file.
|
|
174
174
|
*
|
|
175
175
|
* @param [throwOnNotFound = false] Optionally indicate if a throw should occur on file read.
|
|
176
176
|
* @param [force = false] Optionally force the file to be read from disk even when already read within the process.
|
|
@@ -270,7 +270,7 @@ class ConfigFile extends configStore_1.BaseConfigStore {
|
|
|
270
270
|
if (exists) {
|
|
271
271
|
return await fs_2.fs.unlink(this.getPath());
|
|
272
272
|
}
|
|
273
|
-
throw new
|
|
273
|
+
throw new sfError_1.SfError(`Target file doesn't exist. path: ${this.getPath()}`, 'TargetFileNotFound');
|
|
274
274
|
}
|
|
275
275
|
/**
|
|
276
276
|
* Delete the config file if it exists.
|
|
@@ -283,7 +283,7 @@ class ConfigFile extends configStore_1.BaseConfigStore {
|
|
|
283
283
|
if (exists) {
|
|
284
284
|
return fs_2.fs.unlinkSync(this.getPath());
|
|
285
285
|
}
|
|
286
|
-
throw new
|
|
286
|
+
throw new sfError_1.SfError(`Target file doesn't exist. path: ${this.getPath()}`, 'TargetFileNotFound');
|
|
287
287
|
}
|
|
288
288
|
/**
|
|
289
289
|
* Returns the absolute path to the config file.
|
|
@@ -295,7 +295,7 @@ class ConfigFile extends configStore_1.BaseConfigStore {
|
|
|
295
295
|
getPath() {
|
|
296
296
|
if (!this.path) {
|
|
297
297
|
if (!this.options.filename) {
|
|
298
|
-
throw new
|
|
298
|
+
throw new sfError_1.SfError('The ConfigOptions filename parameter is invalid.', 'InvalidParameter');
|
|
299
299
|
}
|
|
300
300
|
const _isGlobal = (0, ts_types_1.isBoolean)(this.options.isGlobal) && this.options.isGlobal;
|
|
301
301
|
const _isState = (0, ts_types_1.isBoolean)(this.options.isState) && this.options.isState;
|
|
@@ -11,7 +11,7 @@ const kit_1 = require("@salesforce/kit");
|
|
|
11
11
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
12
12
|
const ts_types_2 = require("@salesforce/ts-types");
|
|
13
13
|
const crypto_1 = require("../crypto/crypto");
|
|
14
|
-
const
|
|
14
|
+
const sfError_1 = require("../sfError");
|
|
15
15
|
/**
|
|
16
16
|
* An abstract class that implements all the config management functions but
|
|
17
17
|
* none of the storage functions.
|
|
@@ -206,7 +206,8 @@ class BaseConfigStore extends kit_1.AsyncOptionalCreatable {
|
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
208
|
getEncryptedKeys() {
|
|
209
|
-
|
|
209
|
+
var _a, _b;
|
|
210
|
+
return [...(((_a = this.options) === null || _a === void 0 ? void 0 : _a.encryptedKeys) || []), ...(((_b = this.statics) === null || _b === void 0 ? void 0 : _b.encryptedKeys) || [])];
|
|
210
211
|
}
|
|
211
212
|
/**
|
|
212
213
|
* This config file has encrypted keys and it should attempt to encrypt them.
|
|
@@ -286,18 +287,18 @@ class BaseConfigStore extends kit_1.AsyncOptionalCreatable {
|
|
|
286
287
|
if (!value)
|
|
287
288
|
return;
|
|
288
289
|
if (!this.crypto)
|
|
289
|
-
throw new
|
|
290
|
+
throw new sfError_1.SfError('crypto is not initialized', 'CryptoNotInitializedError');
|
|
290
291
|
if (!(0, ts_types_2.isString)(value))
|
|
291
|
-
throw new
|
|
292
|
+
throw new sfError_1.SfError(`can only encrypt strings but found: ${typeof value} : ${value}`, 'InvalidCryptoValueError');
|
|
292
293
|
return this.crypto.isEncrypted(value) ? value : this.crypto.encrypt(value);
|
|
293
294
|
}
|
|
294
295
|
decrypt(value) {
|
|
295
296
|
if (!value)
|
|
296
297
|
return;
|
|
297
298
|
if (!this.crypto)
|
|
298
|
-
throw new
|
|
299
|
+
throw new sfError_1.SfError('crypto is not initialized', 'CryptoNotInitializedError');
|
|
299
300
|
if (!(0, ts_types_2.isString)(value))
|
|
300
|
-
throw new
|
|
301
|
+
throw new sfError_1.SfError(`can only encrypt strings but found: ${typeof value} : ${value}`, 'InvalidCryptoValueError');
|
|
301
302
|
return this.crypto.isEncrypted(value) ? this.crypto.decrypt(value) : value;
|
|
302
303
|
}
|
|
303
304
|
/**
|
package/lib/config/envVars.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import { Dictionary, Nullable } from '@salesforce/ts-types';
|
|
2
3
|
import { Env } from '@salesforce/kit';
|
|
3
4
|
export declare enum EnvironmentVariable {
|
|
@@ -35,6 +36,11 @@ export declare enum EnvironmentVariable {
|
|
|
35
36
|
'SFDX_SOURCE_MEMBER_POLLING_TIMEOUT' = "SFDX_SOURCE_MEMBER_POLLING_TIMEOUT",
|
|
36
37
|
'SFDX_USE_GENERIC_UNIX_KEYCHAIN' = "SFDX_USE_GENERIC_UNIX_KEYCHAIN",
|
|
37
38
|
'SFDX_USE_PROGRESS_BAR' = "SFDX_USE_PROGRESS_BAR",
|
|
39
|
+
'SFDX_LAZY_LOAD_MODULES' = "SFDX_LAZY_LOAD_MODULES",
|
|
40
|
+
'SFDX_S3_HOST' = "SFDX_S3_HOST",
|
|
41
|
+
'SFDX_UPDATE_INSTRUCTIONS' = "SFDX_UPDATE_INSTRUCTIONS",
|
|
42
|
+
'SFDX_INSTALLER' = "SFDX_INSTALLER",
|
|
43
|
+
'SFDX_ENV' = "SFDX_ENV",
|
|
38
44
|
'SF_TARGET_ORG' = "SF_TARGET_ORG",
|
|
39
45
|
'SF_TARGET_DEV_HUB' = "SF_TARGET_DEV_HUB",
|
|
40
46
|
'SF_ACCESS_TOKEN' = "SF_ACCESS_TOKEN",
|
|
@@ -60,7 +66,12 @@ export declare enum EnvironmentVariable {
|
|
|
60
66
|
'SF_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_VERSION_CREATE' = "SF_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_VERSION_CREATE",
|
|
61
67
|
'SF_SOURCE_MEMBER_POLLING_TIMEOUT' = "SF_SOURCE_MEMBER_POLLING_TIMEOUT",
|
|
62
68
|
'SF_USE_GENERIC_UNIX_KEYCHAIN' = "SF_USE_GENERIC_UNIX_KEYCHAIN",
|
|
63
|
-
'SF_USE_PROGRESS_BAR' = "SF_USE_PROGRESS_BAR"
|
|
69
|
+
'SF_USE_PROGRESS_BAR' = "SF_USE_PROGRESS_BAR",
|
|
70
|
+
'SF_LAZY_LOAD_MODULES' = "SF_LAZY_LOAD_MODULES",
|
|
71
|
+
'SF_S3_HOST' = "SF_S3_HOST",
|
|
72
|
+
'SF_UPDATE_INSTRUCTIONS' = "SF_UPDATE_INSTRUCTIONS",
|
|
73
|
+
'SF_INSTALLER' = "SF_INSTALLER",
|
|
74
|
+
'SF_ENV' = "SF_ENV"
|
|
64
75
|
}
|
|
65
76
|
declare type EnvMetaData = {
|
|
66
77
|
description: string;
|
|
@@ -71,11 +82,15 @@ declare type EnvType = {
|
|
|
71
82
|
};
|
|
72
83
|
export declare const SUPPORTED_ENV_VARS: EnvType;
|
|
73
84
|
export declare class EnvVars extends Env {
|
|
74
|
-
constructor();
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
85
|
+
constructor(env?: NodeJS.ProcessEnv);
|
|
86
|
+
private static defaultPrefix;
|
|
87
|
+
propertyToEnvName(property: string, prefix?: string | undefined): string;
|
|
88
|
+
setPropertyFromEnv(property: string, prefix?: string | undefined): void;
|
|
89
|
+
getPropertyFromEnv<T>(property: string, prefix?: string | undefined): T | undefined;
|
|
90
|
+
asDictionary(): Dictionary<unknown>;
|
|
78
91
|
asMap(): Map<string, string>;
|
|
79
92
|
private resolve;
|
|
93
|
+
private get;
|
|
80
94
|
}
|
|
95
|
+
export declare const envVars: EnvVars;
|
|
81
96
|
export {};
|