@salesforce/plugin-custom-metadata 1.0.11 → 2.0.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 (54) hide show
  1. package/CHANGELOG.md +23 -7
  2. package/LICENSE.txt +2 -2
  3. package/README.md +153 -149
  4. package/lib/commands/force/cmdt/create.d.ts +12 -6
  5. package/lib/commands/force/cmdt/create.js +80 -82
  6. package/lib/commands/force/cmdt/create.js.map +1 -1
  7. package/lib/commands/force/cmdt/field/create.d.ts +10 -5
  8. package/lib/commands/force/cmdt/field/create.js +98 -90
  9. package/lib/commands/force/cmdt/field/create.js.map +1 -1
  10. package/lib/commands/force/cmdt/generate.d.ts +12 -8
  11. package/lib/commands/force/cmdt/generate.js +199 -257
  12. package/lib/commands/force/cmdt/generate.js.map +1 -1
  13. package/lib/commands/force/cmdt/record/create.d.ts +20 -9
  14. package/lib/commands/force/cmdt/record/create.js +123 -125
  15. package/lib/commands/force/cmdt/record/create.js.map +1 -1
  16. package/lib/commands/force/cmdt/record/insert.d.ts +7 -7
  17. package/lib/commands/force/cmdt/record/insert.js +97 -109
  18. package/lib/commands/force/cmdt/record/insert.js.map +1 -1
  19. package/lib/index.js +3 -3
  20. package/lib/lib/helpers/createUtil.d.ts +10 -6
  21. package/lib/lib/helpers/createUtil.js +50 -98
  22. package/lib/lib/helpers/createUtil.js.map +1 -1
  23. package/lib/lib/helpers/fileWriter.d.ts +13 -11
  24. package/lib/lib/helpers/fileWriter.js +19 -27
  25. package/lib/lib/helpers/fileWriter.js.map +1 -1
  26. package/lib/lib/helpers/metadataUtil.d.ts +25 -51
  27. package/lib/lib/helpers/metadataUtil.js +58 -127
  28. package/lib/lib/helpers/metadataUtil.js.map +1 -1
  29. package/lib/lib/helpers/validationUtil.d.ts +25 -26
  30. package/lib/lib/helpers/validationUtil.js +69 -43
  31. package/lib/lib/helpers/validationUtil.js.map +1 -1
  32. package/lib/lib/interfaces/createConfig.d.ts +3 -2
  33. package/lib/lib/interfaces/createConfig.js +3 -3
  34. package/lib/lib/templates/templates.d.ts +10 -99
  35. package/lib/lib/templates/templates.js +52 -40
  36. package/lib/lib/templates/templates.js.map +1 -1
  37. package/messages/createField.json +22 -31
  38. package/messages/generate.json +38 -51
  39. package/messages/template.json +2 -2
  40. package/messages/validation.json +5 -0
  41. package/oclif.manifest.json +1 -1
  42. package/package.json +57 -46
  43. package/lib/lib/interfaces/customField.d.ts +0 -7
  44. package/lib/lib/interfaces/customField.js +0 -9
  45. package/lib/lib/interfaces/customField.js.map +0 -1
  46. package/lib/lib/interfaces/errorMessage.d.ts +0 -4
  47. package/lib/lib/interfaces/errorMessage.js +0 -9
  48. package/lib/lib/interfaces/errorMessage.js.map +0 -1
  49. package/lib/lib/interfaces/record.d.ts +0 -3
  50. package/lib/lib/interfaces/record.js +0 -9
  51. package/lib/lib/interfaces/record.js.map +0 -1
  52. package/lib/lib/interfaces/saveResults.d.ts +0 -5
  53. package/lib/lib/interfaces/saveResults.js +0 -9
  54. package/lib/lib/interfaces/saveResults.js.map +0 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-custom-metadata",
3
3
  "description": "Tools for working with custom metadata types and their records.",
4
- "version": "1.0.11",
4
+ "version": "2.0.0",
5
5
  "contributors": [
6
6
  {
7
7
  "name": "Carolyn Grabill",
@@ -42,42 +42,50 @@
42
42
  ],
43
43
  "bugs": "https://github.com/salesforcecli/plugin-custom-metadata/issues",
44
44
  "dependencies": {
45
- "@oclif/command": "^1.6.1",
46
- "@oclif/config": "^1.15.1",
47
- "@oclif/errors": "^1.2.2",
48
- "@salesforce/command": "^3.0.0",
49
- "@salesforce/ts-types": "^1.2.2",
50
- "tslib": "^2.0.0"
45
+ "@oclif/core": "^1.9.0",
46
+ "@salesforce/command": "^5.1.2",
47
+ "@salesforce/core": "^3.19.0",
48
+ "@salesforce/ts-types": "^1.5.20",
49
+ "fast-xml-parser": "^4.0.7",
50
+ "tslib": "^2"
51
51
  },
52
52
  "devDependencies": {
53
- "@oclif/dev-cli": "^1.22.2",
54
- "@oclif/plugin-command-snapshot": "^1.0.0",
55
- "@oclif/plugin-help": "^3.0.1",
56
- "@oclif/test": "^1.2.6",
57
- "@salesforce/dev-config": "^1.5.0",
58
- "@salesforce/dev-scripts": "0.6.1",
59
- "@salesforce/plugin-command-reference": "^1.1.0",
60
- "@salesforce/ts-sinon": "^1.1.2",
53
+ "@oclif/plugin-command-snapshot": "^3.1.3",
54
+ "@salesforce/cli-plugins-testkit": "^1.5.35",
55
+ "@salesforce/dev-config": "^3.0.1",
56
+ "@salesforce/dev-scripts": "^2.0.2",
57
+ "@salesforce/plugin-command-reference": "^1.3.17",
58
+ "@salesforce/prettier-config": "^0.0.2",
59
+ "@salesforce/ts-sinon": "^1.3.21",
61
60
  "@semantic-release/git": "^9.0.0",
62
- "@types/chai": "^4.2.11",
63
- "@types/jsforce": "1.9.18",
64
- "@types/mocha": "^7.0.2",
65
- "@types/node": "^14.0.9",
66
- "@types/xml2js": "^0.4.5",
61
+ "@typescript-eslint/eslint-plugin": "^5.26.0",
62
+ "@typescript-eslint/parser": "^4.2.0",
63
+ "bluebird": "3.7.2",
67
64
  "chai": "^4.2.0",
68
- "globby": "^11.0.1",
69
- "husky": "^4.2.5",
70
- "mocha": "^7.2.0",
65
+ "cz-conventional-changelog": "^3.3.0",
66
+ "eslint": "^7.27.0",
67
+ "eslint-config-prettier": "^6.15.0",
68
+ "eslint-config-salesforce": "^0.1.6",
69
+ "eslint-config-salesforce-license": "^0.1.6",
70
+ "eslint-config-salesforce-typescript": "^0.2.8",
71
+ "eslint-plugin-header": "^3.1.1",
72
+ "eslint-plugin-import": "^2.26.0",
73
+ "eslint-plugin-jsdoc": "^39.3.2",
74
+ "eslint-plugin-prettier": "^3.4.1",
75
+ "husky": "^7.0.4",
76
+ "jsforce": "2.0.0-beta.10",
77
+ "mocha": "^9.1.3",
71
78
  "nyc": "^15.1.0",
72
- "semantic-release": "^17.0.8",
79
+ "oclif": "^3.0.1",
80
+ "prettier": "^2.6.2",
81
+ "pretty-quick": "^3.1.0",
73
82
  "shx": "0.2.2",
74
- "sinon": "9.0.2",
75
- "ts-node": "^8.10.2",
76
- "typescript": "^3.9.3",
77
- "xml2js": "^0.4.23"
83
+ "sinon": "10.0.0",
84
+ "ts-node": "^10.0.0",
85
+ "typescript": "^4.3.2"
78
86
  },
79
87
  "engines": {
80
- "node": ">=8.0.0"
88
+ "node": ">=14.0.0"
81
89
  },
82
90
  "files": [
83
91
  "/csvtojson",
@@ -116,28 +124,31 @@
116
124
  },
117
125
  "repository": "github:salesforcecli/plugin-custom-metadata",
118
126
  "scripts": {
127
+ "build": "sf-build",
128
+ "clean": "sf-clean",
129
+ "clean-all": "sf-clean all",
119
130
  "clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -f oclif.manifest.json",
120
- "compile": "tsc -b",
121
- "build": "yarn run clean:lib && yarn compile",
122
- "postpack": "rm -f oclif.manifest.json",
123
- "posttest": "tsc -p test --noEmit && tslint -p test -t stylish && yarn test:deprecation-policy && yarn test:command-reference",
124
- "prepack": "rm -rf lib && tsc && oclif-dev manifest && oclif-dev readme",
125
- "test": "nyc mocha --forbid-only \"test/**/*.test.ts\"",
126
- "version": "oclif-dev readme && git add README.md",
127
- "release": "semantic-release -p @semantic-release/git -p @semantic-release/npm -p @semantic-release/github -p @semantic-release/commit-analyzer",
128
- "test:deprecation-policy": "./bin/run snapshot:compare",
129
- "test:command-reference": "./bin/run commandreference:generate -p @salesforce/plugin-custom-metadata --erroronwarnings"
130
- },
131
- "husky": {
132
- "hooks": {
133
- "commit-msg": "yarn sf-husky-commit-msg"
134
- }
131
+ "compile": "sf-compile",
132
+ "docs": "sf-docs",
133
+ "format": "sf-format",
134
+ "lint": "sf-lint",
135
+ "postpack": "shx rm -f oclif.manifest.json",
136
+ "posttest": "yarn lint && yarn test:deprecation-policy && yarn test:json-schema",
137
+ "prepack": "sf-prepack",
138
+ "prepare": "sf-install",
139
+ "pretest": "sf-compile-test",
140
+ "test": "sf-test",
141
+ "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
142
+ "test:command-reference": "./bin/dev commandreference:generate --erroronwarnings",
143
+ "test:deprecation-policy": "./bin/dev snapshot:compare",
144
+ "test:json-schema": "./bin/dev schema:compare",
145
+ "version": "oclif readme"
135
146
  },
136
147
  "publishConfig": {
137
148
  "access": "public"
138
149
  },
139
150
  "sfdx": {
140
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/sfdx-cli-03032020.crt",
141
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/signatures/salesforce-plugin-custom-metadata-1.0.11.sig"
151
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-custom-metadata/2.0.0.crt",
152
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-custom-metadata/2.0.0.sig"
142
153
  }
143
154
  }
@@ -1,7 +0,0 @@
1
- export interface CustomField {
2
- CustomField: {
3
- fullName: string;
4
- type: string;
5
- scale: string;
6
- };
7
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2018-2020, salesforce.com, inc.
4
- * All rights reserved.
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- //# sourceMappingURL=customField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"customField.js","sourceRoot":"","sources":["../../../src/lib/interfaces/customField.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
@@ -1,4 +0,0 @@
1
- export interface ErrorMessage {
2
- errorCode: string;
3
- errorMessage: string;
4
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2018-2020, salesforce.com, inc.
4
- * All rights reserved.
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- //# sourceMappingURL=errorMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errorMessage.js","sourceRoot":"","sources":["../../../src/lib/interfaces/errorMessage.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
@@ -1,3 +0,0 @@
1
- export interface Record {
2
- Name: string;
3
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2018-2020, salesforce.com, inc.
4
- * All rights reserved.
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- //# sourceMappingURL=record.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"record.js","sourceRoot":"","sources":["../../../src/lib/interfaces/record.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
@@ -1,5 +0,0 @@
1
- export interface SaveResults {
2
- dir: string;
3
- fileName: string;
4
- updated: boolean;
5
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2018-2020, salesforce.com, inc.
4
- * All rights reserved.
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- //# sourceMappingURL=saveResults.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"saveResults.js","sourceRoot":"","sources":["../../../src/lib/interfaces/saveResults.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}