@salesforce/plugin-deploy-retrieve 1.0.4 → 1.1.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.
Files changed (47) hide show
  1. package/CHANGELOG.md +45 -45
  2. package/LICENSE.txt +1 -1
  3. package/README.md +214 -2
  4. package/lib/commands/deploy/metadata.d.ts +36 -0
  5. package/lib/commands/deploy/metadata.js +123 -0
  6. package/lib/commands/deploy/metadata.js.map +1 -0
  7. package/lib/commands/deploy.js +3 -3
  8. package/lib/commands/deploy.js.map +1 -1
  9. package/lib/commands/retrieve/metadata.d.ts +29 -0
  10. package/lib/commands/retrieve/metadata.js +134 -0
  11. package/lib/commands/retrieve/metadata.js.map +1 -0
  12. package/lib/hooks/deploy.d.ts +4 -0
  13. package/lib/hooks/deploy.js +17 -0
  14. package/lib/hooks/deploy.js.map +1 -0
  15. package/lib/utils/componentSetBuilder.d.ts +28 -0
  16. package/lib/utils/componentSetBuilder.js +123 -0
  17. package/lib/utils/componentSetBuilder.js.map +1 -0
  18. package/lib/utils/config.d.ts +1 -0
  19. package/lib/utils/config.js +18 -0
  20. package/lib/utils/config.js.map +1 -0
  21. package/lib/utils/metadataDeployer.d.ts +30 -0
  22. package/lib/utils/metadataDeployer.js +178 -0
  23. package/lib/utils/metadataDeployer.js.map +1 -0
  24. package/lib/utils/orgs.d.ts +4 -0
  25. package/lib/utils/orgs.js +39 -0
  26. package/lib/utils/orgs.js.map +1 -0
  27. package/lib/utils/output.d.ts +18 -0
  28. package/lib/utils/output.js +152 -0
  29. package/lib/utils/output.js.map +1 -0
  30. package/lib/utils/progressBar.d.ts +8 -0
  31. package/lib/utils/progressBar.js +55 -0
  32. package/lib/utils/progressBar.js.map +1 -0
  33. package/lib/utils/requiredFlagValidator.d.ts +3 -0
  34. package/lib/utils/requiredFlagValidator.js +19 -0
  35. package/lib/utils/requiredFlagValidator.js.map +1 -0
  36. package/lib/utils/testLevel.d.ts +6 -0
  37. package/lib/utils/testLevel.js +17 -0
  38. package/lib/utils/testLevel.js.map +1 -0
  39. package/messages/deploy.metadata.md +114 -0
  40. package/messages/metadata.transfer.md +27 -0
  41. package/messages/required.flag.md +3 -0
  42. package/messages/retrieve.metadata.md +100 -0
  43. package/oclif.manifest.json +1 -1
  44. package/package.json +28 -25
  45. package/schemas/deploy-metadata.json +98 -0
  46. package/schemas/hooks/sf-deploy.json +106 -0
  47. package/schemas/retrieve-metadata.json +69 -0
package/package.json CHANGED
@@ -1,25 +1,28 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-deploy-retrieve",
3
3
  "description": "deploy and retrieve commands for sf",
4
- "version": "1.0.4",
4
+ "version": "1.1.0",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "dependencies": {
8
- "@oclif/core": "^1.0.0",
9
- "@salesforce/core": "3.6.5",
10
- "@salesforce/sf-plugins-core": "^1.0.0",
8
+ "@oclif/core": "^1.3.4",
9
+ "@salesforce/core": "3.7.3",
10
+ "@salesforce/sf-plugins-core": "^1.2.1",
11
+ "@sf/sdr": "npm:@salesforce/source-deploy-retrieve@^5.9.9",
12
+ "chalk": "^4.1.2",
11
13
  "shelljs": "^0.8.4",
12
14
  "tslib": "^2"
13
15
  },
14
16
  "devDependencies": {
15
- "@oclif/plugin-command-snapshot": "^2.2.2",
16
- "@salesforce/cli-plugins-testkit": "^1.4.2",
17
- "@salesforce/dev-config": "^2.1.2",
18
- "@salesforce/dev-scripts": "^0.9.18",
17
+ "@oclif/plugin-command-snapshot": "^3.1.1",
18
+ "@salesforce/cli-plugins-testkit": "^1.4.11",
19
+ "@salesforce/dev-config": "^2.1.3",
20
+ "@salesforce/dev-scripts": "^1.0.2",
19
21
  "@salesforce/plugin-command-reference": "^1.3.15",
20
- "@salesforce/plugin-deploy-retrieve-metadata": "^1.0.0",
21
- "@salesforce/plugin-functions": "^1.0.2",
22
+ "@salesforce/plugin-config": "^2.2.9",
23
+ "@salesforce/plugin-functions": "^1.1.4",
22
24
  "@salesforce/prettier-config": "^0.0.2",
25
+ "@salesforce/source-testkit": "^0.0.17",
23
26
  "@salesforce/ts-sinon": "1.3.21",
24
27
  "@types/shelljs": "^0.8.9",
25
28
  "@typescript-eslint/eslint-plugin": "^4.2.0",
@@ -30,19 +33,19 @@
30
33
  "eslint-config-prettier": "^6.11.0",
31
34
  "eslint-config-salesforce": "^0.1.6",
32
35
  "eslint-config-salesforce-license": "^0.1.6",
33
- "eslint-config-salesforce-typescript": "^0.2.7",
36
+ "eslint-config-salesforce-typescript": "^0.2.8",
34
37
  "eslint-plugin-header": "^3.0.0",
35
- "eslint-plugin-import": "^2.20.2",
38
+ "eslint-plugin-import": "2.24.2",
36
39
  "eslint-plugin-jsdoc": "^35.1.3",
37
40
  "eslint-plugin-prettier": "^3.1.3",
38
- "husky": "^4.3.8",
41
+ "husky": "^7.0.4",
39
42
  "lint-staged": "^11.0.0",
40
43
  "mocha": "^8.4.0",
41
44
  "nyc": "^15.1.0",
42
- "oclif": "^2.0.0-main.5",
45
+ "oclif": "^2.4.0",
43
46
  "prettier": "^2.0.5",
44
47
  "pretty-quick": "^3.1.0",
45
- "shx": "0.3.3",
48
+ "shx": "0.3.4",
46
49
  "sinon": "11.1.1",
47
50
  "ts-node": "^10.0.0",
48
51
  "typescript": "^4.1.3"
@@ -75,16 +78,22 @@
75
78
  "commands": "./lib/commands",
76
79
  "topicSeparator": " ",
77
80
  "bin": "sf",
81
+ "hooks": {
82
+ "sf:deploy": "./lib/hooks/deploy"
83
+ },
78
84
  "devPlugins": [
79
85
  "@oclif/plugin-help",
80
86
  "@oclif/plugin-command-snapshot",
81
87
  "@salesforce/plugin-command-reference",
82
- "@salesforce/plugin-deploy-retrieve-metadata",
88
+ "@salesforce/plugin-config",
83
89
  "@salesforce/plugin-functions"
84
90
  ],
85
91
  "topics": {
86
92
  "deploy": {
87
93
  "description": "Commands to deploy artifacts to an environment."
94
+ },
95
+ "retrieve": {
96
+ "description": "Commands to retrieve artifacts from an environment."
88
97
  }
89
98
  }
90
99
  },
@@ -110,18 +119,12 @@
110
119
  "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
111
120
  "version": "oclif readme"
112
121
  },
113
- "husky": {
114
- "hooks": {
115
- "pre-commit": "sf-husky-pre-commit",
116
- "commit-msg": "sf-husky-commit-msg",
117
- "pre-push": "sf-husky-pre-push"
118
- }
119
- },
120
122
  "publishConfig": {
121
123
  "access": "public"
122
124
  },
125
+ "main": "lib/index.js",
123
126
  "sfdx": {
124
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.0.4.crt",
125
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.0.4.sig"
127
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.1.0.crt",
128
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.1.0.sig"
126
129
  }
127
130
  }
@@ -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
+ }