sfdx-git-delta 5.2.0 → 5.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/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
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.0](https://github.com/scolladon/sfdx-git-delta/compare/v5.2.0...v5.3.0) (2022-06-13)
6
+
7
+
8
+ ### Features
9
+
10
+ * add batchCalcJobDefinitions metadata ([#312](https://github.com/scolladon/sfdx-git-delta/issues/312)) ([e770955](https://github.com/scolladon/sfdx-git-delta/commit/e770955d70fcc627d7f6488000cf7f45de4c51cb))
11
+ * add restriction rules metadata ([#309](https://github.com/scolladon/sfdx-git-delta/issues/309)) ([24a818d](https://github.com/scolladon/sfdx-git-delta/commit/24a818d954b4ea4506f9b488b0793acfbaa62516))
12
+ * introduce incremental deployment concept ([#306](https://github.com/scolladon/sfdx-git-delta/issues/306)) ([9392add](https://github.com/scolladon/sfdx-git-delta/commit/9392add66cea76d8da9e947d2c077dcdfebe5824))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * 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))
18
+
5
19
  ## [5.2.0](https://github.com/scolladon/sfdx-git-delta/compare/v5.1.2...v5.2.0) (2022-04-21)
6
20
 
7
21
 
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
  ·
@@ -92,8 +92,8 @@ If you are a Technical Architect or Developer, then it’s a very useful tool fo
92
92
 
93
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).
94
94
 
95
- Pro tip: Make sure your pipeline works **before** implementing delta 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 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.
97
97
 
98
98
  **DISCLAIMER:**
99
99
 
@@ -183,7 +183,7 @@ OPTIONS
183
183
  this command invocation
184
184
  ```
185
185
 
186
- _See code: [src/commands/sgd/source/delta.ts](https://github.com/scolladon/sfdx-git-delta/blob/v5.2.0/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.0/src/commands/sgd/source/delta.ts)_
187
187
  <!-- commandsstop -->
188
188
 
189
189
  ### Windows users
@@ -279,7 +279,7 @@ Note: it is also possible to generate a **source** folder containing added/chang
279
279
 
280
280
  ### Deploy the delta metadata
281
281
 
282
- The simplest option to deploy the delta changes is to use `force:source:deploy` command with `-x` parameter:
282
+ The simplest option to deploy the incremental changes is to use `force:source:deploy` command with `-x` parameter:
283
283
 
284
284
  ```sh
285
285
  sfdx force:source:deploy -x package/package.xml --postdestructivechanges destructiveChanges/destructiveChanges.xml
@@ -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,
@@ -13,7 +13,9 @@ declare class StandardHandler {
13
13
  warnings: any;
14
14
  suffixRegex: RegExp;
15
15
  handlerMap: {
16
- [x: string]: () => void;
16
+ A: () => Promise<void>;
17
+ D: () => void;
18
+ M: () => Promise<void>;
17
19
  };
18
20
  ext: string;
19
21
  handle(): Promise<void>;
@@ -27,7 +29,7 @@ declare class StandardHandler {
27
29
  _copyWithMetaFile(src: any, dst: any): Promise<void>;
28
30
  _getMetaTypeFilePath(path: any): string;
29
31
  _copyFiles(src: any, dst: any): Promise<void>;
30
- _readFile(): Promise<Buffer & string>;
32
+ _readFile(): Promise<string>;
31
33
  _parseLine(): RegExpMatchArray;
32
34
  }
33
35
  declare namespace StandardHandler {
@@ -1,12 +1,12 @@
1
- export var ADDITION: string;
2
- export var DELETION: string;
3
- export var MODIFICATION: string;
4
- export var POINTER_REF_TYPES: string[];
5
- export var GIT_DIFF_TYPE_REGEX: RegExp;
6
- export var GIT_FOLDER: string;
7
- export var MINUS: string;
8
- export var IGNORE_WHITESPACE_PARAMS: string[];
9
- export var PLUS: string;
10
- export var UTF8_ENCODING: string;
1
+ export const ADDITION: "A";
2
+ export const DELETION: "D";
3
+ export const MODIFICATION: "M";
4
+ export const POINTER_REF_TYPES: string[];
5
+ export const GIT_DIFF_TYPE_REGEX: RegExp;
6
+ export const GIT_FOLDER: ".git";
7
+ export const MINUS: "-";
8
+ export const IGNORE_WHITESPACE_PARAMS: string[];
9
+ export const PLUS: "+";
10
+ export const UTF8_ENCODING: "utf8";
11
11
  export const COMMIT_REF_TYPE: "commit";
12
12
  export const TAG_REF_TYPE: "tag";
@@ -1,11 +1,15 @@
1
1
  export = RepoGitDiff;
2
2
  declare class RepoGitDiff {
3
3
  static _addIncludes(lines: any, setup: any): any;
4
- static _setupIncludes(config: any): Promise<{
4
+ static _setupIncludes(config: any): Promise<({
5
5
  content: string[];
6
6
  include: any;
7
- prefix: string;
8
- }[]>;
7
+ prefix: "A";
8
+ } | {
9
+ content: string[];
10
+ include: any;
11
+ prefix: "D";
12
+ })[]>;
9
13
  static _setupIgnore(config: any): Promise<{
10
14
  ignore: any;
11
15
  helper: any;
@@ -15,7 +19,7 @@ declare class RepoGitDiff {
15
19
  metadata: any;
16
20
  spawnConfig: {
17
21
  cwd: any;
18
- encoding: string;
22
+ encoding: "utf8";
19
23
  };
20
24
  ignoreWhitespaceParams: string[];
21
25
  getLines(): Promise<any[]>;
@@ -1 +1 @@
1
- {"version":"5.2.0","commands":{"sgd:source:delta":{"id":"sgd:source:delta","description":"Generate the sfdx content in source format and destructive change from two git commits","usage":"<%= command.id %> -f <string> [-t <string>] [-r <filepath>] [-i <filepath>] [-D <filepath>] [-s <filepath>] [-W] [-o <filepath>] [-a <number>] [-d] [-n <filepath>] [-N <filepath>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"sfdx-git-delta","pluginType":"core","aliases":[],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"to":{"name":"to","type":"option","char":"t","description":"commit sha to where the diff is done","default":"HEAD"},"from":{"name":"from","type":"option","char":"f","description":"commit sha from where the diff is done [git rev-list --max-parents=0 HEAD]","required":true},"repo":{"name":"repo","type":"option","char":"r","description":"git repository location","default":"."},"ignore":{"name":"ignore","type":"option","char":"i","description":"file listing paths to explicitly ignore for any diff actions"},"ignore-destructive":{"name":"ignore-destructive","type":"option","char":"D","description":"file listing paths to explicitly ignore for any destructive actions"},"source":{"name":"source","type":"option","char":"s","description":"source folder focus location related to --repo","default":"."},"ignore-whitespace":{"name":"ignore-whitespace","type":"boolean","char":"W","description":"ignore git diff whitespace (space, tab, eol) changes","allowNo":false},"output":{"name":"output","type":"option","char":"o","description":"source package specific output","default":"./output"},"api-version":{"name":"api-version","type":"option","char":"a","description":"salesforce API version","default":54},"generate-delta":{"name":"generate-delta","type":"boolean","char":"d","description":"generate delta files in [--output] folder","allowNo":false},"include":{"name":"include","type":"option","char":"n","description":"file listing paths to explicitly include for any diff actions"},"include-destructive":{"name":"include-destructive","type":"option","char":"N","description":"file listing paths to explicitly include for any destructive actions"}},"args":[]}}}
1
+ {"version":"5.3.0","commands":{"sgd:source:delta":{"id":"sgd:source:delta","description":"Generate the sfdx content in source format and destructive change from two git commits","usage":"<%= command.id %> -f <string> [-t <string>] [-r <filepath>] [-i <filepath>] [-D <filepath>] [-s <filepath>] [-W] [-o <filepath>] [-a <number>] [-d] [-n <filepath>] [-N <filepath>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"sfdx-git-delta","pluginType":"core","aliases":[],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"to":{"name":"to","type":"option","char":"t","description":"commit sha to where the diff is done","default":"HEAD"},"from":{"name":"from","type":"option","char":"f","description":"commit sha from where the diff is done [git rev-list --max-parents=0 HEAD]","required":true},"repo":{"name":"repo","type":"option","char":"r","description":"git repository location","default":"."},"ignore":{"name":"ignore","type":"option","char":"i","description":"file listing paths to explicitly ignore for any diff actions"},"ignore-destructive":{"name":"ignore-destructive","type":"option","char":"D","description":"file listing paths to explicitly ignore for any destructive actions"},"source":{"name":"source","type":"option","char":"s","description":"source folder focus location related to --repo","default":"."},"ignore-whitespace":{"name":"ignore-whitespace","type":"boolean","char":"W","description":"ignore git diff whitespace (space, tab, eol) changes","allowNo":false},"output":{"name":"output","type":"option","char":"o","description":"source package specific output","default":"./output"},"api-version":{"name":"api-version","type":"option","char":"a","description":"salesforce API version","default":54},"generate-delta":{"name":"generate-delta","type":"boolean","char":"d","description":"generate delta files in [--output] folder","allowNo":false},"include":{"name":"include","type":"option","char":"n","description":"file listing paths to explicitly include for any diff actions"},"include-destructive":{"name":"include-destructive","type":"option","char":"N","description":"file listing paths to explicitly include for any destructive actions"}},"args":[]}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sfdx-git-delta",
3
- "version": "5.2.0",
3
+ "version": "5.3.0",
4
4
  "description": "Generate the sfdx content in source format and destructive change from two git commits",
5
5
  "keyword": [
6
6
  "salesforce",
@@ -26,16 +26,16 @@
26
26
  },
27
27
  "author": "Sebastien Colladon <colladonsebastien@gmail.com>",
28
28
  "dependencies": {
29
- "@oclif/command": "^1.8.15",
30
- "@oclif/config": "^1.18.2",
29
+ "@oclif/command": "^1.8.16",
30
+ "@oclif/config": "^1.18.3",
31
31
  "@oclif/errors": "^1.3.5",
32
- "@salesforce/command": "^5.0.1",
33
- "@salesforce/core": "^2.28.1",
34
- "fast-xml-parser": "^4",
35
- "fs-extra": "^10.0.0",
36
- "ignore": "^5.1.8",
37
- "micromatch": "^4.0.4",
38
- "tslib": "^2.3.1",
32
+ "@salesforce/command": "^5.2.0",
33
+ "@salesforce/core": "^2.37.1",
34
+ "fast-xml-parser": "^4.0.8",
35
+ "fs-extra": "^10.1.0",
36
+ "ignore": "^5.2.0",
37
+ "micromatch": "^4.0.5",
38
+ "tslib": "^2.4.0",
39
39
  "xmlbuilder2": "^3.0.2"
40
40
  },
41
41
  "license": "MIT",
@@ -54,44 +54,47 @@
54
54
  "test:coverage": "jest --coverage --runInBand",
55
55
  "test:debug": "node --inspect node_modules/.bin/jest",
56
56
  "test:debug:break": "node --inspect-brk node_modules/.bin/jest",
57
- "postpack": "rm -f oclif.manifest.json ; prettier --write README.md",
57
+ "test:watch": "jest --watch",
58
+ "postpack": "rm -f oclif.manifest.json && prettier --write README.md",
58
59
  "postrelease": "yarn release:tags && yarn release:github",
59
60
  "prepack": "rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme",
60
61
  "prepare": "husky install",
61
62
  "release": "standard-version --no-verify --commit-all",
62
63
  "release:github": "conventional-github-releaser -p angular",
63
64
  "release:tags": "git push --follow-tags origin main -f --no-verify",
64
- "increment:apiversion": "jq '.sfdc.latestApiVersion = (.sfdc.latestApiVersion|tonumber + 1 |tostring)' package.json | sponge package.json && filename=`ls src/metadata/v*.json | tail -1` && version=${filename//[!0-9]/} && ((version++)) && targetname=\"src/metadata/v${version}.json\" && \\cp $filename $targetname && yarn pack"
65
+ "increment:apiversion": "jq '.sfdc.latestApiVersion = (.sfdc.latestApiVersion|tonumber + 1 |tostring)' package.json | sponge package.json && filename=`ls src/metadata/v*.json | tail -1` && version=${filename//[!0-9]/} && ((version++)) && targetname=\"src/metadata/v${version}.json\" && \\cp $filename $targetname && yarn pack",
66
+ "upgrade:dependencies": "yarn yarn-upgrade-all"
65
67
  },
66
68
  "devDependencies": {
67
- "@commitlint/cli": "^16",
68
- "@commitlint/config-angular": "^16",
69
- "@commitlint/prompt-cli": "^16",
69
+ "@commitlint/cli": "^17.0.2",
70
+ "@commitlint/config-angular": "^17.0.0",
71
+ "@commitlint/prompt-cli": "^17.0.0",
70
72
  "@oclif/dev-cli": "^1.26.10",
71
- "@oclif/plugin-help": "^5.1.10",
72
- "@oclif/test": "^2.0.3",
73
- "@salesforce/dev-config": "^3",
74
- "@types/chai": "^4.2.22",
75
- "@types/mocha": "^9.0.0",
76
- "@types/node": "^17.0.0",
77
- "@typescript-eslint/eslint-plugin": "^5.7.0",
78
- "@typescript-eslint/parser": "^5.7.0",
73
+ "@oclif/plugin-help": "^5.1.12",
74
+ "@oclif/test": "^2.1.0",
75
+ "@salesforce/dev-config": "^3.0.1",
76
+ "@types/chai": "^4.3.1",
77
+ "@types/mocha": "^9.1.1",
78
+ "@types/node": "^17.0.42",
79
+ "@typescript-eslint/eslint-plugin": "^5.27.1",
80
+ "@typescript-eslint/parser": "^5.27.1",
79
81
  "conventional-github-releaser": "^3.1.5",
80
- "eslint": "^8.0.0",
81
- "eslint-config-prettier": "^8.3.0",
82
+ "eslint": "^8.17.0",
83
+ "eslint-config-prettier": "^8.5.0",
82
84
  "eslint-config-salesforce-typescript": "^0.2.8",
83
- "eslint-plugin-import": "^2.24.2",
84
- "eslint-plugin-jsdoc": "^39.2.7",
85
+ "eslint-plugin-import": "^2.26.0",
86
+ "eslint-plugin-jsdoc": "^39.3.2",
85
87
  "eslint-plugin-prettier": "^4.0.0",
86
- "husky": "^7.0.2",
87
- "jest": "^27.2.5",
88
- "lint-staged": "^12.1.2",
88
+ "husky": "^8.0.1",
89
+ "jest": "^28.1.1",
90
+ "lint-staged": "^13.0.1",
89
91
  "nyc": "^15.1.0",
90
- "prettier": "^2.4.1",
91
- "prettier-eslint": "^13.0.0",
92
- "standard-version": "^9.3.1",
93
- "ts-node": "^10.2.1",
94
- "typescript": "^4.4.3"
92
+ "prettier": "^2.6.2",
93
+ "prettier-eslint": "^15.0.1",
94
+ "standard-version": "^9.5.0",
95
+ "ts-node": "^10.8.1",
96
+ "typescript": "^4.7.3",
97
+ "yarn-upgrade-all": "^0.7.1"
95
98
  },
96
99
  "oclif": {
97
100
  "commands": "./lib/commands",