@simplysf/simply-data 1.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.
@@ -0,0 +1,207 @@
1
+ {
2
+ "commands": {
3
+ "simply:data:file:upload": {
4
+ "aliases": [],
5
+ "args": {},
6
+ "description": "Uploads a file to a Salesforce org.",
7
+ "examples": [
8
+ "<%= config.bin %> <%= command.id %> --file-path fileToUpload.txt --target-org myTargetOrg",
9
+ "<%= config.bin %> <%= command.id %> --file-path fileToUpload.txt --first-publish-location-id 0019000000DmehK --target-org myTargetOrg"
10
+ ],
11
+ "flags": {
12
+ "json": {
13
+ "description": "Format output as json.",
14
+ "helpGroup": "GLOBAL",
15
+ "name": "json",
16
+ "allowNo": false,
17
+ "type": "boolean"
18
+ },
19
+ "api-version": {
20
+ "description": "Override the api version used for api requests made by this command",
21
+ "name": "api-version",
22
+ "hasDynamicHelp": false,
23
+ "multiple": false,
24
+ "type": "option"
25
+ },
26
+ "file-path": {
27
+ "name": "file-path",
28
+ "required": true,
29
+ "summary": "Path to the file to upload.",
30
+ "hasDynamicHelp": false,
31
+ "multiple": false,
32
+ "type": "option"
33
+ },
34
+ "first-publish-location-id": {
35
+ "name": "first-publish-location-id",
36
+ "summary": "Specify a record Id that the file should be linked to.",
37
+ "hasDynamicHelp": false,
38
+ "multiple": false,
39
+ "type": "option"
40
+ },
41
+ "target-org": {
42
+ "char": "o",
43
+ "name": "target-org",
44
+ "noCacheDefault": true,
45
+ "required": true,
46
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
47
+ "hasDynamicHelp": true,
48
+ "multiple": false,
49
+ "type": "option"
50
+ },
51
+ "title": {
52
+ "name": "title",
53
+ "summary": "Specify the title for the file being uploaded.",
54
+ "hasDynamicHelp": false,
55
+ "multiple": false,
56
+ "type": "option"
57
+ }
58
+ },
59
+ "hasDynamicHelp": true,
60
+ "hiddenAliases": [],
61
+ "id": "simply:data:file:upload",
62
+ "pluginAlias": "@simplysf/simply-data",
63
+ "pluginName": "@simplysf/simply-data",
64
+ "pluginType": "core",
65
+ "strict": true,
66
+ "summary": "Upload a file to a Salesforce org.",
67
+ "enableJsonFlag": true,
68
+ "SF_ENV": "SF_ENV",
69
+ "isESM": true,
70
+ "relativePath": [
71
+ "lib",
72
+ "commands",
73
+ "simply",
74
+ "data",
75
+ "file",
76
+ "upload.js"
77
+ ],
78
+ "aliasPermutations": [],
79
+ "permutations": [
80
+ "simply:data:file:upload",
81
+ "data:simply:file:upload",
82
+ "data:file:simply:upload",
83
+ "data:file:upload:simply",
84
+ "simply:file:data:upload",
85
+ "file:simply:data:upload",
86
+ "file:data:simply:upload",
87
+ "file:data:upload:simply",
88
+ "simply:file:upload:data",
89
+ "file:simply:upload:data",
90
+ "file:upload:simply:data",
91
+ "file:upload:data:simply",
92
+ "simply:data:upload:file",
93
+ "data:simply:upload:file",
94
+ "data:upload:simply:file",
95
+ "data:upload:file:simply",
96
+ "simply:upload:data:file",
97
+ "upload:simply:data:file",
98
+ "upload:data:simply:file",
99
+ "upload:data:file:simply",
100
+ "simply:upload:file:data",
101
+ "upload:simply:file:data",
102
+ "upload:file:simply:data",
103
+ "upload:file:data:simply"
104
+ ]
105
+ },
106
+ "simply:data:files:upload": {
107
+ "aliases": [],
108
+ "args": {},
109
+ "description": "Uploads files specified by a csv to a Salesforce org. By default, the plugin uses the REST API for the upload as the Bulk API is limited in its payload size. This means that each file will use one REST API request.",
110
+ "examples": [
111
+ "<%= config.bin %> <%= command.id %> --file-path filesToUpload.csv --target-org myTargetOrg",
112
+ "<%= config.bin %> <%= command.id %> --file-path filesToUpload.csv --max-parallel-jobs 5 --target-org myTargetOrg"
113
+ ],
114
+ "flags": {
115
+ "json": {
116
+ "description": "Format output as json.",
117
+ "helpGroup": "GLOBAL",
118
+ "name": "json",
119
+ "allowNo": false,
120
+ "type": "boolean"
121
+ },
122
+ "api-version": {
123
+ "description": "Override the api version used for api requests made by this command",
124
+ "name": "api-version",
125
+ "hasDynamicHelp": false,
126
+ "multiple": false,
127
+ "type": "option"
128
+ },
129
+ "file-path": {
130
+ "description": "The csv file must specify the columns PathOnClient and Title. Optionally, a FirstPublishLocationId can be specified to have it linked directly to a Salesforce record after upload.",
131
+ "name": "file-path",
132
+ "required": true,
133
+ "summary": "Path to the csv file that specifies the upload.",
134
+ "hasDynamicHelp": false,
135
+ "multiple": false,
136
+ "type": "option"
137
+ },
138
+ "max-parallel-jobs": {
139
+ "description": "By default the plugin will only process a single file upload at a time. You can increase this value to allow for quasi concurrent uploads. Please note that setting this value too high can cause performance issues.",
140
+ "name": "max-parallel-jobs",
141
+ "summary": "Maximum number of parallel jobs.",
142
+ "default": 1,
143
+ "hasDynamicHelp": false,
144
+ "multiple": false,
145
+ "type": "option"
146
+ },
147
+ "target-org": {
148
+ "char": "o",
149
+ "name": "target-org",
150
+ "noCacheDefault": true,
151
+ "required": true,
152
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
153
+ "hasDynamicHelp": true,
154
+ "multiple": false,
155
+ "type": "option"
156
+ }
157
+ },
158
+ "hasDynamicHelp": true,
159
+ "hiddenAliases": [],
160
+ "id": "simply:data:files:upload",
161
+ "pluginAlias": "@simplysf/simply-data",
162
+ "pluginName": "@simplysf/simply-data",
163
+ "pluginType": "core",
164
+ "strict": true,
165
+ "summary": "Upload files to a Salesforce org.",
166
+ "enableJsonFlag": true,
167
+ "SF_ENV": "SF_ENV",
168
+ "isESM": true,
169
+ "relativePath": [
170
+ "lib",
171
+ "commands",
172
+ "simply",
173
+ "data",
174
+ "files",
175
+ "upload.js"
176
+ ],
177
+ "aliasPermutations": [],
178
+ "permutations": [
179
+ "simply:data:files:upload",
180
+ "data:simply:files:upload",
181
+ "data:files:simply:upload",
182
+ "data:files:upload:simply",
183
+ "simply:files:data:upload",
184
+ "files:simply:data:upload",
185
+ "files:data:simply:upload",
186
+ "files:data:upload:simply",
187
+ "simply:files:upload:data",
188
+ "files:simply:upload:data",
189
+ "files:upload:simply:data",
190
+ "files:upload:data:simply",
191
+ "simply:data:upload:files",
192
+ "data:simply:upload:files",
193
+ "data:upload:simply:files",
194
+ "data:upload:files:simply",
195
+ "simply:upload:data:files",
196
+ "upload:simply:data:files",
197
+ "upload:data:simply:files",
198
+ "upload:data:files:simply",
199
+ "simply:upload:files:data",
200
+ "upload:simply:files:data",
201
+ "upload:files:simply:data",
202
+ "upload:files:data:simply"
203
+ ]
204
+ }
205
+ },
206
+ "version": "1.0.0"
207
+ }
package/package.json ADDED
@@ -0,0 +1,219 @@
1
+ {
2
+ "name": "@simplysf/simply-data",
3
+ "description": "Utilities for working with data",
4
+ "version": "1.0.0",
5
+ "author": "@ClayChipps",
6
+ "bugs": "https://github.com/SimplySF/simply-data/issues",
7
+ "dependencies": {
8
+ "@oclif/core": "^3.19.2",
9
+ "@salesforce/core": "^6.5.3",
10
+ "@salesforce/kit": "^3.0.15",
11
+ "@salesforce/sf-plugins-core": "^5.0.13",
12
+ "csv-parse": "^5.5.3",
13
+ "csv-writer": "^1.6.0",
14
+ "form-data": "^4.0.0",
15
+ "got": "13.0.0",
16
+ "p-queue": "^8.0.1"
17
+ },
18
+ "devDependencies": {
19
+ "@oclif/plugin-command-snapshot": "^5.0.8",
20
+ "@salesforce/cli-plugins-testkit": "^5.1.9",
21
+ "@salesforce/plugin-command-reference": "^3.0.68",
22
+ "@salesforce/ts-sinon": "1.4.19",
23
+ "@simplysf/dev-scripts": "^2.0.0",
24
+ "@types/shelljs": "^0.8.14",
25
+ "eslint-plugin-sf-plugin": "^1.17.3",
26
+ "oclif": "^4.4.17",
27
+ "shelljs": "^0.8.5",
28
+ "ts-node": "^10.9.2",
29
+ "typescript": "^5.3.3"
30
+ },
31
+ "engines": {
32
+ "node": ">=18.0.0"
33
+ },
34
+ "files": [
35
+ "/lib",
36
+ "/messages",
37
+ "/npm-shrinkwrap.json",
38
+ "/oclif.lock",
39
+ "/oclif.manifest.json"
40
+ ],
41
+ "homepage": "https://github.com/SimplySF/simply-data",
42
+ "keywords": [
43
+ "force",
44
+ "salesforce",
45
+ "sfdx",
46
+ "salesforcedx",
47
+ "sfdx-plugin",
48
+ "sf-plugin",
49
+ "sf"
50
+ ],
51
+ "license": "BSD-3-Clause",
52
+ "oclif": {
53
+ "bin": "sf",
54
+ "commands": "./lib/commands",
55
+ "devPlugins": [
56
+ "@oclif/plugin-command-snapshot",
57
+ "@oclif/plugin-help",
58
+ "@salesforce/plugin-command-reference"
59
+ ],
60
+ "flexibleTaxonomy": true,
61
+ "plugins": [],
62
+ "repositoryPrefix": "<%- repo %>/blob/<%- version %>/<%- commandPath %>",
63
+ "topics": {
64
+ "simply": {
65
+ "description": "Commands for simplifying Salesforce",
66
+ "subtopics": {
67
+ "data": {
68
+ "description": "Commands for working with data",
69
+ "subtopics": {
70
+ "files": {
71
+ "description": "Commands for working with files"
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ },
78
+ "topicSeparator": " "
79
+ },
80
+ "repository": "SimplySF/simply-data",
81
+ "scripts": {
82
+ "build": "wireit",
83
+ "clean": "sf-clean",
84
+ "clean-all": "sf-clean all",
85
+ "compile": "wireit",
86
+ "docs": "sf-docs",
87
+ "format": "wireit",
88
+ "link-check": "wireit",
89
+ "lint": "wireit",
90
+ "postpack": "sf-clean",
91
+ "prepack": "sf-prepack",
92
+ "prepare": "sf-install",
93
+ "test": "wireit",
94
+ "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --jobs 5",
95
+ "test:only": "wireit",
96
+ "test:watch": "mocha --watch \"./test/**/*.test.ts\"",
97
+ "version": "oclif readme"
98
+ },
99
+ "publishConfig": {
100
+ "access": "public"
101
+ },
102
+ "wireit": {
103
+ "build": {
104
+ "dependencies": [
105
+ "compile",
106
+ "lint"
107
+ ]
108
+ },
109
+ "compile": {
110
+ "command": "tsc -p . --pretty --incremental",
111
+ "files": [
112
+ "src/**/*.ts",
113
+ "**/tsconfig.json",
114
+ "messages/**"
115
+ ],
116
+ "output": [
117
+ "lib/**",
118
+ "*.tsbuildinfo"
119
+ ],
120
+ "clean": "if-file-deleted"
121
+ },
122
+ "format": {
123
+ "command": "prettier --write \"+(src|test|schemas)/**/*.+(ts|js|json)|command-snapshot.json\"",
124
+ "files": [
125
+ "src/**/*.ts",
126
+ "test/**/*.ts",
127
+ "schemas/**/*.json",
128
+ "command-snapshot.json",
129
+ ".prettier*"
130
+ ],
131
+ "output": []
132
+ },
133
+ "lint": {
134
+ "command": "eslint src test --color --cache --cache-location .eslintcache",
135
+ "files": [
136
+ "src/**/*.ts",
137
+ "test/**/*.ts",
138
+ "messages/**",
139
+ "**/.eslint*",
140
+ "**/tsconfig.json"
141
+ ],
142
+ "output": []
143
+ },
144
+ "test": {
145
+ "dependencies": [
146
+ "test:compile",
147
+ "test:only",
148
+ "test:command-reference",
149
+ "test:deprecation-policy",
150
+ "lint",
151
+ "test:json-schema",
152
+ "link-check"
153
+ ]
154
+ },
155
+ "test:command-reference": {
156
+ "command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" commandreference:generate --erroronwarnings",
157
+ "files": [
158
+ "src/**/*.ts",
159
+ "messages/**",
160
+ "package.json"
161
+ ],
162
+ "output": [
163
+ "tmp/root"
164
+ ]
165
+ },
166
+ "test:deprecation-policy": {
167
+ "command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" snapshot:compare",
168
+ "files": [
169
+ "src/**/*.ts"
170
+ ],
171
+ "output": [],
172
+ "dependencies": [
173
+ "compile"
174
+ ]
175
+ },
176
+ "test:json-schema": {
177
+ "command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" schema:compare",
178
+ "files": [
179
+ "src/**/*.ts",
180
+ "schemas"
181
+ ],
182
+ "output": []
183
+ },
184
+ "test:compile": {
185
+ "command": "tsc -p \"./test\" --pretty",
186
+ "files": [
187
+ "test/**/*.ts",
188
+ "**/tsconfig.json"
189
+ ],
190
+ "output": []
191
+ },
192
+ "test:only": {
193
+ "command": "nyc mocha \"test/**/*.test.ts\"",
194
+ "env": {
195
+ "FORCE_COLOR": "2"
196
+ },
197
+ "files": [
198
+ "test/**/*.ts",
199
+ "src/**/*.ts",
200
+ "**/tsconfig.json",
201
+ ".mocha*",
202
+ "!*.nut.ts",
203
+ ".nycrc"
204
+ ],
205
+ "output": []
206
+ },
207
+ "link-check": {
208
+ "command": "node -e \"process.exit(process.env.CI ? 0 : 1)\" || linkinator \"**/*.md\" --skip \"CHANGELOG.md|node_modules|test/|confluence.internal.salesforce.com|my.salesforce.com|%s\" --markdown --retry --directory-listing --verbosity error",
209
+ "files": [
210
+ "./*.md",
211
+ "./!(CHANGELOG).md",
212
+ "messages/**/*.md"
213
+ ],
214
+ "output": []
215
+ }
216
+ },
217
+ "exports": "./lib/index.js",
218
+ "type": "module"
219
+ }