@salesforce/plugin-deploy-retrieve 1.0.6 → 1.1.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 (46) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +211 -1
  3. package/lib/commands/deploy/metadata.d.ts +30 -0
  4. package/lib/commands/deploy/metadata.js +123 -0
  5. package/lib/commands/deploy/metadata.js.map +1 -0
  6. package/lib/commands/deploy.js +11 -10
  7. package/lib/commands/deploy.js.map +1 -1
  8. package/lib/commands/retrieve/metadata.d.ts +23 -0
  9. package/lib/commands/retrieve/metadata.js +134 -0
  10. package/lib/commands/retrieve/metadata.js.map +1 -0
  11. package/lib/hooks/deploy.d.ts +4 -0
  12. package/lib/hooks/deploy.js +17 -0
  13. package/lib/hooks/deploy.js.map +1 -0
  14. package/lib/utils/componentSetBuilder.d.ts +28 -0
  15. package/lib/utils/componentSetBuilder.js +124 -0
  16. package/lib/utils/componentSetBuilder.js.map +1 -0
  17. package/lib/utils/config.d.ts +1 -0
  18. package/lib/utils/config.js +18 -0
  19. package/lib/utils/config.js.map +1 -0
  20. package/lib/utils/metadataDeployer.d.ts +30 -0
  21. package/lib/utils/metadataDeployer.js +178 -0
  22. package/lib/utils/metadataDeployer.js.map +1 -0
  23. package/lib/utils/orgs.d.ts +4 -0
  24. package/lib/utils/orgs.js +39 -0
  25. package/lib/utils/orgs.js.map +1 -0
  26. package/lib/utils/output.d.ts +18 -0
  27. package/lib/utils/output.js +152 -0
  28. package/lib/utils/output.js.map +1 -0
  29. package/lib/utils/progressBar.d.ts +8 -0
  30. package/lib/utils/progressBar.js +55 -0
  31. package/lib/utils/progressBar.js.map +1 -0
  32. package/lib/utils/requiredFlagValidator.d.ts +3 -0
  33. package/lib/utils/requiredFlagValidator.js +19 -0
  34. package/lib/utils/requiredFlagValidator.js.map +1 -0
  35. package/lib/utils/testLevel.d.ts +6 -0
  36. package/lib/utils/testLevel.js +17 -0
  37. package/lib/utils/testLevel.js.map +1 -0
  38. package/messages/deploy.metadata.md +114 -0
  39. package/messages/metadata.transfer.md +27 -0
  40. package/messages/required.flag.md +3 -0
  41. package/messages/retrieve.metadata.md +100 -0
  42. package/oclif.manifest.json +1 -1
  43. package/package.json +44 -33
  44. package/schemas/deploy-metadata.json +98 -0
  45. package/schemas/hooks/sf-deploy.json +106 -0
  46. package/schemas/retrieve-metadata.json +69 -0
package/package.json CHANGED
@@ -1,51 +1,56 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-deploy-retrieve",
3
3
  "description": "deploy and retrieve commands for sf",
4
- "version": "1.0.6",
4
+ "version": "1.1.2",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "dependencies": {
8
- "@oclif/core": "^1.0.2",
9
- "@salesforce/core": "3.7.3",
10
- "@salesforce/sf-plugins-core": "^1.0.4",
11
- "shelljs": "^0.8.4",
8
+ "@oclif/core": "^1.6.0",
9
+ "@salesforce/core": "^3.8.0",
10
+ "@salesforce/sf-plugins-core": "^1.7.2",
11
+ "@sf/sdr": "npm:@salesforce/source-deploy-retrieve@^5.12.4",
12
+ "chalk": "^4.1.2",
13
+ "fs-extra": "^10.0.1",
14
+ "shelljs": "^0.8.5",
12
15
  "tslib": "^2"
13
16
  },
14
17
  "devDependencies": {
15
- "@oclif/plugin-command-snapshot": "^3.1.1",
16
- "@salesforce/cli-plugins-testkit": "^1.4.11",
17
- "@salesforce/dev-config": "^2.1.2",
18
- "@salesforce/dev-scripts": "^1.0.2",
19
- "@salesforce/plugin-command-reference": "^1.3.15",
20
- "@salesforce/plugin-deploy-retrieve-metadata": "^1.0.7",
21
- "@salesforce/plugin-functions": "^1.1.4",
18
+ "@oclif/plugin-command-snapshot": "^3.1.3",
19
+ "@salesforce/cli-plugins-testkit": "^1.5.20",
20
+ "@salesforce/dev-config": "^2.1.3",
21
+ "@salesforce/dev-scripts": "^1.0.4",
22
+ "@salesforce/plugin-command-reference": "^1.3.18",
23
+ "@salesforce/plugin-config": "^2.3.0",
24
+ "@salesforce/plugin-functions": "^1.7.0",
22
25
  "@salesforce/prettier-config": "^0.0.2",
26
+ "@salesforce/source-testkit": "^0.0.18",
23
27
  "@salesforce/ts-sinon": "1.3.21",
24
- "@types/shelljs": "^0.8.9",
25
- "@typescript-eslint/eslint-plugin": "^4.2.0",
26
- "@typescript-eslint/parser": "^4.2.0",
27
- "chai": "^4.2.0",
28
+ "@types/fs-extra": "^9.0.13",
29
+ "@types/shelljs": "^0.8.11",
30
+ "@typescript-eslint/eslint-plugin": "^4.33.0",
31
+ "@typescript-eslint/parser": "^4.33.0",
32
+ "chai": "^4.3.6",
28
33
  "cz-conventional-changelog": "^3.3.0",
29
- "eslint": "^7.28.0",
30
- "eslint-config-prettier": "^6.11.0",
34
+ "eslint": "^7.32.0",
35
+ "eslint-config-prettier": "^6.15.0",
31
36
  "eslint-config-salesforce": "^0.1.6",
32
37
  "eslint-config-salesforce-license": "^0.1.6",
33
38
  "eslint-config-salesforce-typescript": "^0.2.8",
34
- "eslint-plugin-header": "^3.0.0",
35
- "eslint-plugin-import": "^2.20.2",
36
- "eslint-plugin-jsdoc": "^35.1.3",
37
- "eslint-plugin-prettier": "^3.1.3",
39
+ "eslint-plugin-header": "^3.1.1",
40
+ "eslint-plugin-import": "2.24.2",
41
+ "eslint-plugin-jsdoc": "^35.5.1",
42
+ "eslint-plugin-prettier": "^3.4.1",
38
43
  "husky": "^7.0.4",
39
- "lint-staged": "^11.0.0",
44
+ "lint-staged": "^11.2.6",
40
45
  "mocha": "^8.4.0",
41
46
  "nyc": "^15.1.0",
42
- "oclif": "^2.0.0-main.5",
43
- "prettier": "^2.0.5",
44
- "pretty-quick": "^3.1.0",
45
- "shx": "0.3.3",
47
+ "oclif": "^2.6.0",
48
+ "prettier": "^2.5.1",
49
+ "pretty-quick": "^3.1.3",
50
+ "shx": "0.3.4",
46
51
  "sinon": "11.1.1",
47
- "ts-node": "^10.0.0",
48
- "typescript": "^4.1.3"
52
+ "ts-node": "^10.7.0",
53
+ "typescript": "^4.6.2"
49
54
  },
50
55
  "config": {
51
56
  "commitizen": {
@@ -75,16 +80,22 @@
75
80
  "commands": "./lib/commands",
76
81
  "topicSeparator": " ",
77
82
  "bin": "sf",
83
+ "hooks": {
84
+ "sf:deploy": "./lib/hooks/deploy"
85
+ },
78
86
  "devPlugins": [
79
87
  "@oclif/plugin-help",
80
88
  "@oclif/plugin-command-snapshot",
81
89
  "@salesforce/plugin-command-reference",
82
- "@salesforce/plugin-deploy-retrieve-metadata",
90
+ "@salesforce/plugin-config",
83
91
  "@salesforce/plugin-functions"
84
92
  ],
85
93
  "topics": {
86
94
  "deploy": {
87
95
  "description": "Commands to deploy artifacts to an environment."
96
+ },
97
+ "retrieve": {
98
+ "description": "Commands to retrieve artifacts from an environment."
88
99
  }
89
100
  }
90
101
  },
@@ -107,7 +118,7 @@
107
118
  "test:command-reference": "./bin/dev commandreference:generate --erroronwarnings",
108
119
  "test:deprecation-policy": "./bin/dev snapshot:compare",
109
120
  "test:json-schema": "./bin/dev schema:compare",
110
- "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
121
+ "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000",
111
122
  "version": "oclif readme"
112
123
  },
113
124
  "publishConfig": {
@@ -115,7 +126,7 @@
115
126
  },
116
127
  "main": "lib/index.js",
117
128
  "sfdx": {
118
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.0.6.crt",
119
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.0.6.sig"
129
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.1.2.crt",
130
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.1.2.sig"
120
131
  }
121
132
  }
@@ -0,0 +1,98 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/DeployMetadataResult",
4
+ "definitions": {
5
+ "DeployMetadataResult": {
6
+ "type": "object",
7
+ "properties": {
8
+ "files": {
9
+ "type": "array",
10
+ "items": {
11
+ "$ref": "#/definitions/FileResponse"
12
+ }
13
+ },
14
+ "tests": {
15
+ "$ref": "#/definitions/TestResults"
16
+ }
17
+ },
18
+ "required": ["files"],
19
+ "additionalProperties": false
20
+ },
21
+ "FileResponse": {
22
+ "anyOf": [
23
+ {
24
+ "type": "object",
25
+ "properties": {
26
+ "fullName": {
27
+ "type": "string"
28
+ },
29
+ "type": {
30
+ "type": "string"
31
+ },
32
+ "filePath": {
33
+ "type": "string"
34
+ },
35
+ "state": {
36
+ "type": "string",
37
+ "enum": ["Created", "Changed", "Unchanged", "Deleted"]
38
+ }
39
+ },
40
+ "required": ["fullName", "state", "type"],
41
+ "additionalProperties": false
42
+ },
43
+ {
44
+ "type": "object",
45
+ "properties": {
46
+ "fullName": {
47
+ "type": "string"
48
+ },
49
+ "type": {
50
+ "type": "string"
51
+ },
52
+ "filePath": {
53
+ "type": "string"
54
+ },
55
+ "state": {
56
+ "type": "string",
57
+ "const": "Failed"
58
+ },
59
+ "lineNumber": {
60
+ "type": "number"
61
+ },
62
+ "columnNumber": {
63
+ "type": "number"
64
+ },
65
+ "error": {
66
+ "type": "string"
67
+ },
68
+ "problemType": {
69
+ "type": "string",
70
+ "enum": ["Warning", "Error"]
71
+ }
72
+ },
73
+ "required": ["error", "fullName", "problemType", "state", "type"],
74
+ "additionalProperties": false
75
+ }
76
+ ]
77
+ },
78
+ "TestResults": {
79
+ "type": "object",
80
+ "properties": {
81
+ "passing": {
82
+ "type": "number"
83
+ },
84
+ "failing": {
85
+ "type": "number"
86
+ },
87
+ "total": {
88
+ "type": "number"
89
+ },
90
+ "time": {
91
+ "type": "number"
92
+ }
93
+ },
94
+ "required": ["passing", "failing", "total"],
95
+ "additionalProperties": false
96
+ }
97
+ }
98
+ }
@@ -0,0 +1,106 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/MetadataDeployer",
4
+ "definitions": {
5
+ "MetadataDeployer": {
6
+ "type": "object",
7
+ "properties": {
8
+ "deployables": {
9
+ "type": "array",
10
+ "items": {
11
+ "$ref": "#/definitions/DeployablePackage"
12
+ },
13
+ "description": "Deployables are individual pieces that can be deployed on their own. For example, each package in a salesforce project is considered a deployable that can be deployed on its own."
14
+ }
15
+ },
16
+ "required": ["deployables"],
17
+ "additionalProperties": false
18
+ },
19
+ "DeployablePackage": {
20
+ "type": "object",
21
+ "properties": {
22
+ "pkg": {
23
+ "$ref": "#/definitions/NamedPackageDir"
24
+ }
25
+ },
26
+ "required": ["pkg"],
27
+ "additionalProperties": false
28
+ },
29
+ "NamedPackageDir": {
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "properties": {
33
+ "name": {
34
+ "type": "string",
35
+ "description": "The [normalized](https://nodejs.org/api/path.html#path_path_normalize_path) path used as the package name."
36
+ },
37
+ "fullPath": {
38
+ "type": "string",
39
+ "description": "The absolute path of the package."
40
+ },
41
+ "ancestorId": {
42
+ "type": "string"
43
+ },
44
+ "ancestorVersion": {
45
+ "type": "string"
46
+ },
47
+ "default": {
48
+ "type": "boolean"
49
+ },
50
+ "definitionFile": {
51
+ "type": "string"
52
+ },
53
+ "dependencies": {
54
+ "type": "array",
55
+ "items": {
56
+ "$ref": "#/definitions/PackageDirDependency"
57
+ }
58
+ },
59
+ "includeProfileUserLicenses": {
60
+ "type": "boolean"
61
+ },
62
+ "package": {
63
+ "type": "string"
64
+ },
65
+ "path": {
66
+ "type": "string"
67
+ },
68
+ "postInstallScript": {
69
+ "type": "string"
70
+ },
71
+ "postInstallUrl": {
72
+ "type": "string"
73
+ },
74
+ "releaseNotesUrl": {
75
+ "type": "string"
76
+ },
77
+ "uninstallScript": {
78
+ "type": "string"
79
+ },
80
+ "versionDescription": {
81
+ "type": "string"
82
+ },
83
+ "versionName": {
84
+ "type": "string"
85
+ },
86
+ "versionNumber": {
87
+ "type": "string"
88
+ }
89
+ },
90
+ "required": ["fullPath", "name", "path"]
91
+ },
92
+ "PackageDirDependency": {
93
+ "type": "object",
94
+ "properties": {
95
+ "package": {
96
+ "type": "string"
97
+ },
98
+ "versionNumber": {
99
+ "type": "string"
100
+ }
101
+ },
102
+ "required": ["package"],
103
+ "additionalProperties": {}
104
+ }
105
+ }
106
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/RetrieveMetadataResult",
4
+ "definitions": {
5
+ "RetrieveMetadataResult": {
6
+ "type": "array",
7
+ "items": {
8
+ "$ref": "#/definitions/FileResponse"
9
+ }
10
+ },
11
+ "FileResponse": {
12
+ "anyOf": [
13
+ {
14
+ "type": "object",
15
+ "properties": {
16
+ "fullName": {
17
+ "type": "string"
18
+ },
19
+ "type": {
20
+ "type": "string"
21
+ },
22
+ "filePath": {
23
+ "type": "string"
24
+ },
25
+ "state": {
26
+ "type": "string",
27
+ "enum": ["Created", "Changed", "Unchanged", "Deleted"]
28
+ }
29
+ },
30
+ "required": ["fullName", "state", "type"],
31
+ "additionalProperties": false
32
+ },
33
+ {
34
+ "type": "object",
35
+ "properties": {
36
+ "fullName": {
37
+ "type": "string"
38
+ },
39
+ "type": {
40
+ "type": "string"
41
+ },
42
+ "filePath": {
43
+ "type": "string"
44
+ },
45
+ "state": {
46
+ "type": "string",
47
+ "const": "Failed"
48
+ },
49
+ "lineNumber": {
50
+ "type": "number"
51
+ },
52
+ "columnNumber": {
53
+ "type": "number"
54
+ },
55
+ "error": {
56
+ "type": "string"
57
+ },
58
+ "problemType": {
59
+ "type": "string",
60
+ "enum": ["Warning", "Error"]
61
+ }
62
+ },
63
+ "required": ["error", "fullName", "problemType", "state", "type"],
64
+ "additionalProperties": false
65
+ }
66
+ ]
67
+ }
68
+ }
69
+ }