sfdx-git-delta 5.1.2 → 5.3.1

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,37 @@
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
+ ### [5.3.1](https://github.com/scolladon/sfdx-git-delta/compare/v5.3.0...v5.3.1) (2022-08-04)
6
+
7
+ ## [5.3.0](https://github.com/scolladon/sfdx-git-delta/compare/v5.2.0...v5.3.0) (2022-06-13)
8
+
9
+
10
+ ### Features
11
+
12
+ * add batchCalcJobDefinitions metadata ([#312](https://github.com/scolladon/sfdx-git-delta/issues/312)) ([e770955](https://github.com/scolladon/sfdx-git-delta/commit/e770955d70fcc627d7f6488000cf7f45de4c51cb))
13
+ * add restriction rules metadata ([#309](https://github.com/scolladon/sfdx-git-delta/issues/309)) ([24a818d](https://github.com/scolladon/sfdx-git-delta/commit/24a818d954b4ea4506f9b488b0793acfbaa62516))
14
+ * introduce incremental deployment concept ([#306](https://github.com/scolladon/sfdx-git-delta/issues/306)) ([9392add](https://github.com/scolladon/sfdx-git-delta/commit/9392add66cea76d8da9e947d2c077dcdfebe5824))
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * format issue in the tsconfig ([#307](https://github.com/scolladon/sfdx-git-delta/issues/307)) ([f2ae7d2](https://github.com/scolladon/sfdx-git-delta/commit/f2ae7d2fa7d3b39b7c052d719bcb0b363e32b2b3))
20
+
21
+ ## [5.2.0](https://github.com/scolladon/sfdx-git-delta/compare/v5.1.2...v5.2.0) (2022-04-21)
22
+
23
+
24
+ ### Features
25
+
26
+ * add github action linter ([#288](https://github.com/scolladon/sfdx-git-delta/issues/288)) ([9a038db](https://github.com/scolladon/sfdx-git-delta/commit/9a038db6fd7d22ab8b3ff6504018da75022272e6))
27
+ * prepare i18n ([#287](https://github.com/scolladon/sfdx-git-delta/issues/287)) ([001c07e](https://github.com/scolladon/sfdx-git-delta/commit/001c07e736584d34d75dc09005b3d701ddb33639))
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * fix typo ([#292](https://github.com/scolladon/sfdx-git-delta/issues/292)) ([0f35071](https://github.com/scolladon/sfdx-git-delta/commit/0f35071db77df9c3c6fa0390aaea69000b7e680a))
33
+ * link "Condition deployment" on TOC ([#291](https://github.com/scolladon/sfdx-git-delta/issues/291)) ([051c35a](https://github.com/scolladon/sfdx-git-delta/commit/051c35a927da3426cb51c0044b8497e229d7930a))
34
+ * wave meta file delta generation ([#293](https://github.com/scolladon/sfdx-git-delta/issues/293)) ([ceaff65](https://github.com/scolladon/sfdx-git-delta/commit/ceaff65033a7b77b8e7939f914e0d311533188e7))
35
+
5
36
  ### [5.1.2](https://github.com/scolladon/sfdx-git-delta/compare/v5.1.1...v5.1.2) (2022-04-04)
6
37
 
7
38
 
package/README.md CHANGED
@@ -12,7 +12,7 @@
12
12
  <h3 align="center">SFDX-Git-Delta </h3>
13
13
 
14
14
  <p align="center">
15
- Generate salesforce deployment content from two git commits!
15
+ SFDX plugin to generate Incremental Salesforce deployments manifests and artifacts
16
16
  <br />
17
17
  <a href="https://github.com/scolladon/sfdx-git-delta/issues/new?assignees=scolladon&labels=bug&template=issue.md">Report Bug</a>
18
18
  ·
@@ -44,6 +44,7 @@
44
44
  - [Explicitly including specific files for inclusion or destruction regardless of diff:](#explicitly-including-specific-files-for-inclusion-or-destruction-regardless-of-diff)
45
45
  - [Scoping delta generation to a specific folder](#scoping-delta-generation-to-a-specific-folder)
46
46
  - [Generate a comma-separated list of the added and modified Apex classes:](#generate-a-comma-separated-list-of-the-added-and-modified-apex-classes)
47
+ - [Condition deployment on package.xml and destructiveChange content](#condition-deployment-on-packagexml-and-destructivechange-content)
47
48
  - [Use the module in your own node application](#use-the-module-in-your-own-node-application)
48
49
  - [Changelog](#changelog)
49
50
  - [Built With](#built-with)
@@ -83,7 +84,7 @@ Have a look at this post on the Salesforce Developers Blog to dive into it: [Opt
83
84
 
84
85
  If you are not a Salesforce Architect or Developer, probably not, _sorry_.
85
86
 
86
- If you are a Technical Architect or Developer, then it’s a very useful tool for you, when meting 3 conditions below:
87
+ If you are a Technical Architect or Developer, then it’s a very useful tool for you, when meeting the 3 conditions below:
87
88
 
88
89
  1. Your Salesforce project uses a git repo as the source of truth.
89
90
  2. You use the Source (DX) format in the repo.
@@ -91,8 +92,8 @@ If you are a Technical Architect or Developer, then it’s a very useful tool fo
91
92
 
92
93
  SGD is designed to be part of a CI/CD pipeline (Jenkins, Bitbucket Pipelines, GitLab CI, GitHub Actions, Azure DevOps...) that handles the deployment of the sources to the Salesforce org(s).
93
94
 
94
- Pro tip: Make sure your pipeline works **before** implementing delta deployments. Otherwise it will just make it harder to debug your pipeline.
95
- It's also important to implement a way to switch back to full deployment in case the delta deployment does not behave as expected.
95
+ Pro tip: Make sure your pipeline works **before** implementing incremental deployments. Otherwise it will just make it harder to debug your pipeline.
96
+ It's also important to implement a way to switch back to full deployment in case the incremental deployment does not behave as expected.
96
97
 
97
98
  **DISCLAIMER:**
98
99
 
@@ -150,7 +151,7 @@ OPTIONS
150
151
  -W, --ignore-whitespace ignore git diff whitespace (space,
151
152
  tab, eol) changes
152
153
 
153
- -a, --api-version=api-version [default: 54] salesforce API version
154
+ -a, --api-version=api-version [default: 55] salesforce API version
154
155
 
155
156
  -d, --generate-delta generate delta files in [--output]
156
157
  folder
@@ -182,7 +183,7 @@ OPTIONS
182
183
  this command invocation
183
184
  ```
184
185
 
185
- _See code: [src/commands/sgd/source/delta.ts](https://github.com/scolladon/sfdx-git-delta/blob/v5.1.2/src/commands/sgd/source/delta.ts)_
186
+ _See code: [src/commands/sgd/source/delta.ts](https://github.com/scolladon/sfdx-git-delta/blob/v5.3.1/src/commands/sgd/source/delta.ts)_
186
187
  <!-- commandsstop -->
187
188
 
188
189
  ### Windows users
@@ -191,8 +192,8 @@ If you run SGD on a Windows system, use double quotes [to prevent the terminal t
191
192
 
192
193
  ### CI/CD specificity
193
194
 
194
- In CI/CD pipelines, branches are not checked out locally when the repository is cloned so you must specify the remote prefix.
195
- If you do not specify the remote in CI context, the git pointer check will raise an error as the branch is not created locally.
195
+ In CI/CD pipelines, branches are not checked out locally when the repository is cloned, so you must specify the remote prefix.
196
+ If you do not specify the remote in CI context, the git pointer check will raise an error (as the branch is not created locally).
196
197
  This applies to both `--from` and `--to` parameters as they both accept git pointers.
197
198
 
198
199
  Exemple comparing `HEAD` with a `development` branch when the CI clone the repository with `origin` set as reference to the remote:
@@ -278,11 +279,7 @@ Note: it is also possible to generate a **source** folder containing added/chang
278
279
 
279
280
  ### Deploy the delta metadata
280
281
 
281
- The simplest option to deploy the delta changes is to use `force:source:deploy` command with `-x` parameter:
282
-
283
- ```sh
284
- sfdx force:source:deploy -x package/package.xml --postdestructivechanges destructiveChanges/destructiveChanges.xml
285
- ```
282
+ The simplest option to deploy the incremental changes is to use `force:source:deploy` command with `-x` parameter:
286
283
 
287
284
  ```sh
288
285
  sfdx force:source:deploy -x package/package.xml --postdestructivechanges destructiveChanges/destructiveChanges.xml
@@ -434,6 +431,22 @@ To cover this need, parse the content of the package.xml file produced by SGD us
434
431
 
435
432
  `xq . < package/package.xml | jq '.Package.types | [.] | flatten | map(select(.name=="ApexClass")) | .[] | .members | [.] | flatten | map(select(. | index("*") | not)) | unique | join(",")'`
436
433
 
434
+ ### Condition deployment on package.xml and destructiveChange content
435
+
436
+ SGD does not always generate content in the package.xml (or destructiveChanges.xml). Sometimes the commit range contains changes only within files to ignore (using .sgdignore and `--i` parameter).
437
+ [Deploying empty package.xml can lead to deployment errors.](https://github.com/scolladon/sfdx-git-delta/issues/249)
438
+ To avoid starting a failing deployment, test files content before execution:
439
+
440
+ ```sh
441
+ # run deploy command only if the generated package contains metadata
442
+ if grep -q '<types>' ./package/package.xml ; then
443
+ echo "---- Deploying added and modified metadata ----"
444
+ sfdx force:source:deploy -x package/package.xml
445
+ else
446
+ echo "---- No changes to deploy ----"
447
+ fi
448
+ ```
449
+
437
450
  ### Use the module in your own node application
438
451
 
439
452
  If you want to embed sgd in your node application, install it has a dependency for your application
@@ -0,0 +1,7 @@
1
+ export const errorGitSHAisBlank: string;
2
+ export const errorParameterIsNotGitSHA: string;
3
+ export const errorAPIVersionIsNan: string;
4
+ export const errorPathIsNotDir: string;
5
+ export const errorPathIsNotFile: string;
6
+ export const errorPathIsNotGit: string;
7
+ export const errorToNotHeadWithDeltaGenerate: string;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ module.exports = {
3
+ errorGitSHAisBlank: '--%s is blank: "%s"',
4
+ errorParameterIsNotGitSHA: '--%s is not a valid sha pointer: "%s"',
5
+ errorAPIVersionIsNan: 'api-version %s is not a number',
6
+ errorPathIsNotDir: '%s folder does not exist',
7
+ errorPathIsNotFile: '%s file does not exist',
8
+ errorPathIsNotGit: '%s is not a git repository',
9
+ errorToNotHeadWithDeltaGenerate: '--generate-delta (-d) parameter cannot be used when --to (-t) parameter is not equivalent to HEAD',
10
+ };
11
+ //# sourceMappingURL=en.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en.js","sourceRoot":"","sources":["../../src/locales/en.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG;IACf,kBAAkB,EAAE,qBAAqB;IACzC,yBAAyB,EAAE,uCAAuC;IAClE,oBAAoB,EAAE,gCAAgC;IACtD,iBAAiB,EAAE,0BAA0B;IAC7C,kBAAkB,EAAE,wBAAwB;IAC5C,iBAAiB,EAAE,4BAA4B;IAC/C,+BAA+B,EAC7B,mGAAmG;CACtG,CAAA"}
@@ -1,4 +1,11 @@
1
1
  [
2
+ {
3
+ "directoryName": "batchCalcJobDefinitions",
4
+ "inFolder": false,
5
+ "metaFile": false,
6
+ "suffix": "batchCalcJobDefinition",
7
+ "xmlName": "BatchCalcJobDefinition"
8
+ },
2
9
  {
3
10
  "directoryName": "installedPackages",
4
11
  "inFolder": false,
@@ -1,4 +1,11 @@
1
1
  [
2
+ {
3
+ "directoryName": "batchCalcJobDefinitions",
4
+ "inFolder": false,
5
+ "metaFile": false,
6
+ "suffix": "batchCalcJobDefinition",
7
+ "xmlName": "BatchCalcJobDefinition"
8
+ },
2
9
  {
3
10
  "directoryName": "installedPackages",
4
11
  "inFolder": false,
@@ -1119,6 +1126,13 @@
1119
1126
  "suffix": "deployment",
1120
1127
  "xmlName": "RecordActionDeployment"
1121
1128
  },
1129
+ {
1130
+ "directoryName": "restrictionRules",
1131
+ "inFolder": false,
1132
+ "metaFile": false,
1133
+ "suffix": "rule",
1134
+ "xmlName": "RestrictionRule"
1135
+ },
1122
1136
  {
1123
1137
  "directoryName": "EmbeddedServiceConfig",
1124
1138
  "inFolder": false,
@@ -1,4 +1,11 @@
1
1
  [
2
+ {
3
+ "directoryName": "batchCalcJobDefinitions",
4
+ "inFolder": false,
5
+ "metaFile": false,
6
+ "suffix": "batchCalcJobDefinition",
7
+ "xmlName": "BatchCalcJobDefinition"
8
+ },
2
9
  {
3
10
  "directoryName": "installedPackages",
4
11
  "inFolder": false,
@@ -1119,6 +1126,13 @@
1119
1126
  "suffix": "deployment",
1120
1127
  "xmlName": "RecordActionDeployment"
1121
1128
  },
1129
+ {
1130
+ "directoryName": "restrictionRules",
1131
+ "inFolder": false,
1132
+ "metaFile": false,
1133
+ "suffix": "rule",
1134
+ "xmlName": "RestrictionRule"
1135
+ },
1122
1136
  {
1123
1137
  "directoryName": "EmbeddedServiceConfig",
1124
1138
  "inFolder": false,
@@ -1,4 +1,11 @@
1
1
  [
2
+ {
3
+ "directoryName": "batchCalcJobDefinitions",
4
+ "inFolder": false,
5
+ "metaFile": false,
6
+ "suffix": "batchCalcJobDefinition",
7
+ "xmlName": "BatchCalcJobDefinition"
8
+ },
2
9
  {
3
10
  "directoryName": "installedPackages",
4
11
  "inFolder": false,
@@ -1119,6 +1126,13 @@
1119
1126
  "suffix": "deployment",
1120
1127
  "xmlName": "RecordActionDeployment"
1121
1128
  },
1129
+ {
1130
+ "directoryName": "restrictionRules",
1131
+ "inFolder": false,
1132
+ "metaFile": false,
1133
+ "suffix": "rule",
1134
+ "xmlName": "RestrictionRule"
1135
+ },
1122
1136
  {
1123
1137
  "directoryName": "EmbeddedServiceConfig",
1124
1138
  "inFolder": false,