@salesforce/plugin-sobject 0.0.8

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 (48) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/LICENSE.txt +12 -0
  3. package/README.md +282 -0
  4. package/lib/commands/generate/metadata/field.d.ts +25 -0
  5. package/lib/commands/generate/metadata/field.js +242 -0
  6. package/lib/commands/generate/metadata/field.js.map +1 -0
  7. package/lib/commands/generate/metadata/platformevent.d.ts +18 -0
  8. package/lib/commands/generate/metadata/platformevent.js +66 -0
  9. package/lib/commands/generate/metadata/platformevent.js.map +1 -0
  10. package/lib/commands/generate/metadata/sobject.d.ts +19 -0
  11. package/lib/commands/generate/metadata/sobject.js +105 -0
  12. package/lib/commands/generate/metadata/sobject.js.map +1 -0
  13. package/lib/commands/generate/metadata/tab.d.ts +19 -0
  14. package/lib/commands/generate/metadata/tab.js +177 -0
  15. package/lib/commands/generate/metadata/tab.js.map +1 -0
  16. package/lib/index.d.ts +2 -0
  17. package/lib/index.js +9 -0
  18. package/lib/index.js.map +1 -0
  19. package/lib/shared/convert.d.ts +11 -0
  20. package/lib/shared/convert.js +38 -0
  21. package/lib/shared/convert.js.map +1 -0
  22. package/lib/shared/flags.d.ts +15 -0
  23. package/lib/shared/flags.js +58 -0
  24. package/lib/shared/flags.js.map +1 -0
  25. package/lib/shared/fs.d.ts +22 -0
  26. package/lib/shared/fs.js +59 -0
  27. package/lib/shared/fs.js.map +1 -0
  28. package/lib/shared/prompts/prompts.d.ts +28 -0
  29. package/lib/shared/prompts/prompts.js +141 -0
  30. package/lib/shared/prompts/prompts.js.map +1 -0
  31. package/lib/shared/prompts/relationshipField.d.ts +9 -0
  32. package/lib/shared/prompts/relationshipField.js +86 -0
  33. package/lib/shared/prompts/relationshipField.js.map +1 -0
  34. package/lib/shared/types.d.ts +25 -0
  35. package/lib/shared/types.js +9 -0
  36. package/lib/shared/types.js.map +1 -0
  37. package/messages/flags.md +11 -0
  38. package/messages/generate.event.md +21 -0
  39. package/messages/generate.field.md +81 -0
  40. package/messages/generate.object.md +58 -0
  41. package/messages/generate.tab.md +39 -0
  42. package/messages/prompts.relationship.md +27 -0
  43. package/messages/prompts.shared.md +51 -0
  44. package/oclif.manifest.json +1 -0
  45. package/package.json +131 -0
  46. package/schemas/generate-metadata-field.json +59 -0
  47. package/schemas/generate-metadata-sobject.json +85 -0
  48. package/schemas/generate-metadata-tab.json +28 -0
package/package.json ADDED
@@ -0,0 +1,131 @@
1
+ {
2
+ "name": "@salesforce/plugin-sobject",
3
+ "description": "Create objects, fields, tabs, etc",
4
+ "version": "0.0.8",
5
+ "author": "Salesforce",
6
+ "bugs": "https://github.com/forcedotcom/cli/issues",
7
+ "dependencies": {
8
+ "@oclif/core": "^1.14.1",
9
+ "@salesforce/core": "^3.26.2",
10
+ "@salesforce/kit": "^1.6.0",
11
+ "@salesforce/sf-plugins-core": "^1.13.2",
12
+ "change-case": "^4.1.2",
13
+ "fast-glob": "^3.2.11",
14
+ "fast-xml-parser": "^4.0.9",
15
+ "inquirer": "^8.2.4",
16
+ "js2xmlparser": "^4.0.2",
17
+ "tslib": "^2"
18
+ },
19
+ "devDependencies": {
20
+ "@oclif/plugin-command-snapshot": "^3.1.3",
21
+ "@oclif/test": "^2.1.1",
22
+ "@salesforce/cli-plugins-testkit": "^2.3.10",
23
+ "@salesforce/dev-config": "^3.1.0",
24
+ "@salesforce/dev-scripts": "^3.0.0",
25
+ "@salesforce/plugin-command-reference": "^2.2.8",
26
+ "@salesforce/prettier-config": "^0.0.2",
27
+ "@salesforce/ts-sinon": "1.3.21",
28
+ "@types/inquirer": "^8.2.0",
29
+ "@types/shelljs": "^0.8.11",
30
+ "@typescript-eslint/eslint-plugin": "^5.33.1",
31
+ "@typescript-eslint/parser": "^5.33.1",
32
+ "chai": "^4.3.6",
33
+ "cz-conventional-changelog": "^3.3.0",
34
+ "eslint": "^8.21.0",
35
+ "eslint-config-prettier": "^8.5.0",
36
+ "eslint-config-salesforce": "^1.1.0",
37
+ "eslint-config-salesforce-license": "^0.1.6",
38
+ "eslint-config-salesforce-typescript": "^1.1.1",
39
+ "eslint-plugin-header": "^3.0.0",
40
+ "eslint-plugin-import": "2.26.0",
41
+ "eslint-plugin-jsdoc": "^39.3.6",
42
+ "eslint-plugin-sf-plugin": "^1.1.0",
43
+ "husky": "^7.0.4",
44
+ "lint-staged": "^11.2.6",
45
+ "mocha": "^9.2.2",
46
+ "nyc": "^15.1.0",
47
+ "oclif": "^2.7.0",
48
+ "prettier": "^2.7.1",
49
+ "pretty-quick": "^3.1.3",
50
+ "shelljs": "^0.8.4",
51
+ "shx": "0.3.4",
52
+ "sinon": "10.0.0",
53
+ "ts-node": "^10.9.1",
54
+ "typescript": "^4.7.4"
55
+ },
56
+ "config": {
57
+ "commitizen": {
58
+ "path": "cz-conventional-changelog"
59
+ }
60
+ },
61
+ "engines": {
62
+ "node": ">=14.0.0"
63
+ },
64
+ "files": [
65
+ "/lib",
66
+ "/messages",
67
+ "/oclif.manifest.json",
68
+ "/schemas"
69
+ ],
70
+ "homepage": "https://github.com/salesforcecli/plugin-sobject",
71
+ "keywords": [
72
+ "force",
73
+ "salesforce",
74
+ "sfdx",
75
+ "salesforcedx",
76
+ "sfdx-plugin",
77
+ "sf-plugin",
78
+ "sf"
79
+ ],
80
+ "license": "BSD-3-Clause",
81
+ "main": "lib/index.js",
82
+ "oclif": {
83
+ "commands": "./lib/commands",
84
+ "bin": "sf",
85
+ "topicSeparator": " ",
86
+ "devPlugins": [
87
+ "@oclif/plugin-help",
88
+ "@oclif/plugin-command-snapshot",
89
+ "@salesforce/plugin-command-reference"
90
+ ],
91
+ "topics": {
92
+ "generate": {
93
+ "description": "generate local files",
94
+ "subtopics": {
95
+ "metadata": {
96
+ "description": "generate metadata files for various Salesforce metadata types"
97
+ }
98
+ }
99
+ }
100
+ }
101
+ },
102
+ "repository": "salesforcecli/plugin-sobject",
103
+ "scripts": {
104
+ "build": "sf-build",
105
+ "clean": "sf-clean",
106
+ "clean-all": "sf-clean all",
107
+ "clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -f oclif.manifest.json",
108
+ "compile": "sf-compile",
109
+ "docs": "sf-docs",
110
+ "format": "sf-format",
111
+ "lint": "sf-lint",
112
+ "postpack": "shx rm -f oclif.manifest.json",
113
+ "posttest": "yarn lint && yarn test:deprecation-policy && yarn test:json-schema && yarn test:command-reference",
114
+ "prepack": "sf-prepack",
115
+ "prepare": "sf-install",
116
+ "pretest": "sf-compile-test",
117
+ "test": "sf-test",
118
+ "test:command-reference": "./bin/dev commandreference:generate --erroronwarnings",
119
+ "test:deprecation-policy": "./bin/dev snapshot:compare",
120
+ "test:json-schema": "./bin/dev schema:compare",
121
+ "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
122
+ "version": "oclif readme"
123
+ },
124
+ "publishConfig": {
125
+ "access": "public"
126
+ },
127
+ "sfdx": {
128
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-sobject/0.0.8.crt",
129
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-sobject/0.0.8.sig"
130
+ }
131
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/FieldGenerateResult",
4
+ "definitions": {
5
+ "FieldGenerateResult": {
6
+ "type": "object",
7
+ "properties": {
8
+ "field": {
9
+ "type": "object",
10
+ "additionalProperties": false,
11
+ "properties": {
12
+ "displayLocationInDecimal": {
13
+ "type": "boolean"
14
+ },
15
+ "type": {
16
+ "type": ["string", "null"]
17
+ },
18
+ "label": {
19
+ "type": ["string", "null"]
20
+ },
21
+ "description": {
22
+ "type": ["string", "null"]
23
+ },
24
+ "trackHistory": {
25
+ "type": ["boolean", "null"]
26
+ },
27
+ "inlineHelpText": {
28
+ "type": ["string", "null"]
29
+ },
30
+ "required": {
31
+ "type": ["boolean", "null"]
32
+ },
33
+ "fullName": {
34
+ "type": ["string", "null"]
35
+ },
36
+ "scale": {
37
+ "type": ["number", "null"]
38
+ },
39
+ "precision": {
40
+ "type": ["number", "null"]
41
+ },
42
+ "visibleLines": {
43
+ "type": ["number", "null"]
44
+ },
45
+ "length": {
46
+ "type": ["number", "null"]
47
+ }
48
+ },
49
+ "required": ["type"]
50
+ },
51
+ "path": {
52
+ "type": "string"
53
+ }
54
+ },
55
+ "required": ["field", "path"],
56
+ "additionalProperties": false
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,85 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/CustomObjectGenerateResult",
4
+ "definitions": {
5
+ "CustomObjectGenerateResult": {
6
+ "type": "object",
7
+ "properties": {
8
+ "object": {
9
+ "$ref": "#/definitions/SaveableCustomObject"
10
+ },
11
+ "path": {
12
+ "type": "string"
13
+ }
14
+ },
15
+ "required": ["object", "path"],
16
+ "additionalProperties": false
17
+ },
18
+ "SaveableCustomObject": {
19
+ "type": "object",
20
+ "additionalProperties": false,
21
+ "properties": {
22
+ "nameField": {
23
+ "type": "object",
24
+ "properties": {
25
+ "label": {
26
+ "type": ["string", "null"]
27
+ },
28
+ "type": {
29
+ "type": ["string", "null"]
30
+ },
31
+ "displayFormat": {
32
+ "type": ["string", "null"]
33
+ }
34
+ },
35
+ "additionalProperties": false,
36
+ "description": "Used by classical CustomObject"
37
+ },
38
+ "label": {
39
+ "type": ["string", "null"]
40
+ },
41
+ "deploymentStatus": {
42
+ "type": ["string", "null"]
43
+ },
44
+ "description": {
45
+ "type": ["string", "null"]
46
+ },
47
+ "enableHistory": {
48
+ "type": ["boolean", "null"]
49
+ },
50
+ "enableActivities": {
51
+ "type": ["boolean", "null"]
52
+ },
53
+ "enableBulkApi": {
54
+ "type": ["boolean", "null"]
55
+ },
56
+ "enableFeeds": {
57
+ "type": ["boolean", "null"]
58
+ },
59
+ "enableReports": {
60
+ "type": ["boolean", "null"]
61
+ },
62
+ "enableSearch": {
63
+ "type": ["boolean", "null"]
64
+ },
65
+ "enableStreamingApi": {
66
+ "type": ["boolean", "null"]
67
+ },
68
+ "enableSharing": {
69
+ "type": ["boolean", "null"]
70
+ },
71
+ "pluralLabel": {
72
+ "type": ["string", "null"]
73
+ },
74
+ "sharingModel": {
75
+ "type": ["string", "null"]
76
+ },
77
+ "fullName": {
78
+ "type": ["string", "null"]
79
+ }
80
+ },
81
+ "required": ["nameField"],
82
+ "description": "There are a lot of properties that we don't, and some that jsforce thinks are mandatory that aren't. Many apply to the various sub-species (mdt, external, events)\n\nThis type represents a \"classical\" CustomObject subset that can deploy."
83
+ }
84
+ }
85
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/GenerateTabResult",
4
+ "definitions": {
5
+ "GenerateTabResult": {
6
+ "type": "object",
7
+ "properties": {
8
+ "tab": {
9
+ "type": "object",
10
+ "properties": {
11
+ "customObject": {
12
+ "type": ["boolean", "null"]
13
+ },
14
+ "motif": {
15
+ "type": ["string", "null"]
16
+ }
17
+ },
18
+ "additionalProperties": false
19
+ },
20
+ "path": {
21
+ "type": "string"
22
+ }
23
+ },
24
+ "required": ["tab", "path"],
25
+ "additionalProperties": false
26
+ }
27
+ }
28
+ }