@salesforce/plugin-data 3.3.5 → 3.4.1

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.
@@ -331,167 +331,6 @@
331
331
  "resume:data"
332
332
  ]
333
333
  },
334
- "data:create:record": {
335
- "aliases": [
336
- "force:data:record:create"
337
- ],
338
- "args": {},
339
- "deprecateAliases": true,
340
- "description": "You must specify a value for all required fields of the object.\n\nWhen specifying fields, use the format <fieldName>=<value>. Enclose all field-value pairs in one set of double quotation marks, delimited by spaces. Enclose values that contain spaces in single quotes.\n\nThis command inserts a record into Salesforce objects by default. Use the --use-tooling-api flag to insert into a Tooling API object.",
341
- "examples": [
342
- "Insert a record into the Account object of your default org; only the required Name field has a value:\n<%= config.bin %> <%= command.id %> --sobject Account --values \"Name=Acme\"",
343
- "Insert an Account record with values for two fields, one value contains a space; the command uses the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --sobject Account --values \"Name='Universal Containers' Website=www.example.com\" --target-org my-scratch",
344
- "Insert a record into the Tooling API object TraceFlag:\n<%= config.bin %> <%= command.id %> --use-tooling-api --sobject TraceFlag --values \"DebugLevelId=7dl170000008U36AAE StartDate=2022-12-15T00:26:04.000+0000 ExpirationDate=2022-12-15T00:56:04.000+0000 LogType=CLASS_TRACING TracedEntityId=01p17000000R6bLAAS\""
345
- ],
346
- "flags": {
347
- "json": {
348
- "description": "Format output as json.",
349
- "helpGroup": "GLOBAL",
350
- "name": "json",
351
- "allowNo": false,
352
- "type": "boolean"
353
- },
354
- "flags-dir": {
355
- "helpGroup": "GLOBAL",
356
- "name": "flags-dir",
357
- "summary": "Import flag values from a directory.",
358
- "hasDynamicHelp": false,
359
- "multiple": false,
360
- "type": "option"
361
- },
362
- "target-org": {
363
- "aliases": [
364
- "targetusername",
365
- "u"
366
- ],
367
- "char": "o",
368
- "deprecateAliases": true,
369
- "name": "target-org",
370
- "noCacheDefault": true,
371
- "required": true,
372
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
373
- "hasDynamicHelp": true,
374
- "multiple": false,
375
- "type": "option"
376
- },
377
- "api-version": {
378
- "aliases": [
379
- "apiversion"
380
- ],
381
- "deprecateAliases": true,
382
- "description": "Override the api version used for api requests made by this command",
383
- "name": "api-version",
384
- "hasDynamicHelp": false,
385
- "multiple": false,
386
- "type": "option"
387
- },
388
- "loglevel": {
389
- "deprecated": {
390
- "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
391
- },
392
- "hidden": true,
393
- "name": "loglevel",
394
- "hasDynamicHelp": false,
395
- "multiple": false,
396
- "type": "option"
397
- },
398
- "sobject": {
399
- "aliases": [
400
- "sobjecttype"
401
- ],
402
- "char": "s",
403
- "deprecateAliases": true,
404
- "name": "sobject",
405
- "required": true,
406
- "summary": "API name of the Salesforce or Tooling API object that you're inserting a record into.",
407
- "hasDynamicHelp": false,
408
- "multiple": false,
409
- "type": "option"
410
- },
411
- "values": {
412
- "char": "v",
413
- "name": "values",
414
- "required": true,
415
- "summary": "Values for the flags in the form <fieldName>=<value>, separate multiple pairs with spaces.",
416
- "hasDynamicHelp": false,
417
- "multiple": false,
418
- "type": "option"
419
- },
420
- "use-tooling-api": {
421
- "aliases": [
422
- "usetoolingapi"
423
- ],
424
- "char": "t",
425
- "deprecateAliases": true,
426
- "name": "use-tooling-api",
427
- "summary": "Use Tooling API so you can insert a record in a Tooling API object.",
428
- "allowNo": false,
429
- "type": "boolean"
430
- },
431
- "perflog": {
432
- "deprecated": {
433
- "version": "57"
434
- },
435
- "description": "Gets data on API performance metrics from the server. The data is stored in $HOME/.sfdx/apiPerformanceLog.json.",
436
- "hidden": true,
437
- "name": "perflog",
438
- "summary": "Get API performance data.",
439
- "allowNo": false,
440
- "type": "boolean"
441
- }
442
- },
443
- "hasDynamicHelp": true,
444
- "hiddenAliases": [],
445
- "id": "data:create:record",
446
- "pluginAlias": "@salesforce/plugin-data",
447
- "pluginName": "@salesforce/plugin-data",
448
- "pluginType": "core",
449
- "strict": true,
450
- "summary": "Create and insert a record into a Salesforce or Tooling API object.",
451
- "enableJsonFlag": true,
452
- "isESM": true,
453
- "relativePath": [
454
- "lib",
455
- "commands",
456
- "data",
457
- "create",
458
- "record.js"
459
- ],
460
- "aliasPermutations": [
461
- "force:data:record:create",
462
- "data:force:record:create",
463
- "data:record:force:create",
464
- "data:record:create:force",
465
- "force:record:data:create",
466
- "record:force:data:create",
467
- "record:data:force:create",
468
- "record:data:create:force",
469
- "force:record:create:data",
470
- "record:force:create:data",
471
- "record:create:force:data",
472
- "record:create:data:force",
473
- "force:data:create:record",
474
- "data:force:create:record",
475
- "data:create:force:record",
476
- "data:create:record:force",
477
- "force:create:data:record",
478
- "create:force:data:record",
479
- "create:data:force:record",
480
- "create:data:record:force",
481
- "force:create:record:data",
482
- "create:force:record:data",
483
- "create:record:force:data",
484
- "create:record:data:force"
485
- ],
486
- "permutations": [
487
- "data:create:record",
488
- "create:data:record",
489
- "create:record:data",
490
- "data:record:create",
491
- "record:data:create",
492
- "record:create:data"
493
- ]
494
- },
495
334
  "data:delete:bulk": {
496
335
  "aliases": [],
497
336
  "args": {},
@@ -920,6 +759,263 @@
920
759
  "resume:delete:data"
921
760
  ]
922
761
  },
762
+ "data:create:file": {
763
+ "aliases": [],
764
+ "args": {},
765
+ "description": "This command always creates a new file in the org; you can't update an existing file. After a successful upload, the command displays the ID of the new ContentDocument record which represents the uploaded file.\n\nBy default, the uploaded file isn't attached to a record; in the Salesforce UI the file shows up in the Files tab. You can optionally attach the file to an existing record, such as an account, as long as you know its record ID.\n\nYou can also give the file a new name after it's been uploaded; by default its name in the org is the same as the local file name.",
766
+ "examples": [
767
+ "Upload the local file \"resources/astro.png\" to your default org:\n<%= config.bin %> <%= command.id %> --file resources/astro.png",
768
+ "Give the file a different filename after it's uploaded to the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --file resources/astro.png --title AstroOnABoat.png --target-org my-scratch",
769
+ "Attach the file to a record in the org:\n<%= config.bin %> <%= command.id %> --file path/to/astro.png --parent-id a03fakeLoJWPIA3"
770
+ ],
771
+ "flags": {
772
+ "json": {
773
+ "description": "Format output as json.",
774
+ "helpGroup": "GLOBAL",
775
+ "name": "json",
776
+ "allowNo": false,
777
+ "type": "boolean"
778
+ },
779
+ "flags-dir": {
780
+ "helpGroup": "GLOBAL",
781
+ "name": "flags-dir",
782
+ "summary": "Import flag values from a directory.",
783
+ "hasDynamicHelp": false,
784
+ "multiple": false,
785
+ "type": "option"
786
+ },
787
+ "target-org": {
788
+ "char": "o",
789
+ "name": "target-org",
790
+ "noCacheDefault": true,
791
+ "required": true,
792
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
793
+ "hasDynamicHelp": true,
794
+ "multiple": false,
795
+ "type": "option"
796
+ },
797
+ "api-version": {
798
+ "description": "Override the api version used for api requests made by this command",
799
+ "name": "api-version",
800
+ "hasDynamicHelp": false,
801
+ "multiple": false,
802
+ "type": "option"
803
+ },
804
+ "title": {
805
+ "char": "t",
806
+ "name": "title",
807
+ "required": false,
808
+ "summary": "New title given to the file (ContentDocument) after it's uploaded.",
809
+ "hasDynamicHelp": false,
810
+ "multiple": false,
811
+ "type": "option"
812
+ },
813
+ "file": {
814
+ "char": "f",
815
+ "name": "file",
816
+ "required": true,
817
+ "summary": "Path of file to upload.",
818
+ "hasDynamicHelp": false,
819
+ "multiple": false,
820
+ "type": "option"
821
+ },
822
+ "parent-id": {
823
+ "char": "i",
824
+ "name": "parent-id",
825
+ "summary": "ID of the record to attach the file to.",
826
+ "hasDynamicHelp": false,
827
+ "multiple": false,
828
+ "type": "option"
829
+ }
830
+ },
831
+ "hasDynamicHelp": true,
832
+ "hiddenAliases": [],
833
+ "id": "data:create:file",
834
+ "pluginAlias": "@salesforce/plugin-data",
835
+ "pluginName": "@salesforce/plugin-data",
836
+ "pluginType": "core",
837
+ "strict": true,
838
+ "summary": "Upload a local file to an org.",
839
+ "enableJsonFlag": true,
840
+ "isESM": true,
841
+ "relativePath": [
842
+ "lib",
843
+ "commands",
844
+ "data",
845
+ "create",
846
+ "file.js"
847
+ ],
848
+ "aliasPermutations": [],
849
+ "permutations": [
850
+ "data:create:file",
851
+ "create:data:file",
852
+ "create:file:data",
853
+ "data:file:create",
854
+ "file:data:create",
855
+ "file:create:data"
856
+ ]
857
+ },
858
+ "data:create:record": {
859
+ "aliases": [
860
+ "force:data:record:create"
861
+ ],
862
+ "args": {},
863
+ "deprecateAliases": true,
864
+ "description": "You must specify a value for all required fields of the object.\n\nWhen specifying fields, use the format <fieldName>=<value>. Enclose all field-value pairs in one set of double quotation marks, delimited by spaces. Enclose values that contain spaces in single quotes.\n\nThis command inserts a record into Salesforce objects by default. Use the --use-tooling-api flag to insert into a Tooling API object.",
865
+ "examples": [
866
+ "Insert a record into the Account object of your default org; only the required Name field has a value:\n<%= config.bin %> <%= command.id %> --sobject Account --values \"Name=Acme\"",
867
+ "Insert an Account record with values for two fields, one value contains a space; the command uses the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --sobject Account --values \"Name='Universal Containers' Website=www.example.com\" --target-org my-scratch",
868
+ "Insert a record into the Tooling API object TraceFlag:\n<%= config.bin %> <%= command.id %> --use-tooling-api --sobject TraceFlag --values \"DebugLevelId=7dl170000008U36AAE StartDate=2022-12-15T00:26:04.000+0000 ExpirationDate=2022-12-15T00:56:04.000+0000 LogType=CLASS_TRACING TracedEntityId=01p17000000R6bLAAS\""
869
+ ],
870
+ "flags": {
871
+ "json": {
872
+ "description": "Format output as json.",
873
+ "helpGroup": "GLOBAL",
874
+ "name": "json",
875
+ "allowNo": false,
876
+ "type": "boolean"
877
+ },
878
+ "flags-dir": {
879
+ "helpGroup": "GLOBAL",
880
+ "name": "flags-dir",
881
+ "summary": "Import flag values from a directory.",
882
+ "hasDynamicHelp": false,
883
+ "multiple": false,
884
+ "type": "option"
885
+ },
886
+ "target-org": {
887
+ "aliases": [
888
+ "targetusername",
889
+ "u"
890
+ ],
891
+ "char": "o",
892
+ "deprecateAliases": true,
893
+ "name": "target-org",
894
+ "noCacheDefault": true,
895
+ "required": true,
896
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
897
+ "hasDynamicHelp": true,
898
+ "multiple": false,
899
+ "type": "option"
900
+ },
901
+ "api-version": {
902
+ "aliases": [
903
+ "apiversion"
904
+ ],
905
+ "deprecateAliases": true,
906
+ "description": "Override the api version used for api requests made by this command",
907
+ "name": "api-version",
908
+ "hasDynamicHelp": false,
909
+ "multiple": false,
910
+ "type": "option"
911
+ },
912
+ "loglevel": {
913
+ "deprecated": {
914
+ "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
915
+ },
916
+ "hidden": true,
917
+ "name": "loglevel",
918
+ "hasDynamicHelp": false,
919
+ "multiple": false,
920
+ "type": "option"
921
+ },
922
+ "sobject": {
923
+ "aliases": [
924
+ "sobjecttype"
925
+ ],
926
+ "char": "s",
927
+ "deprecateAliases": true,
928
+ "name": "sobject",
929
+ "required": true,
930
+ "summary": "API name of the Salesforce or Tooling API object that you're inserting a record into.",
931
+ "hasDynamicHelp": false,
932
+ "multiple": false,
933
+ "type": "option"
934
+ },
935
+ "values": {
936
+ "char": "v",
937
+ "name": "values",
938
+ "required": true,
939
+ "summary": "Values for the flags in the form <fieldName>=<value>, separate multiple pairs with spaces.",
940
+ "hasDynamicHelp": false,
941
+ "multiple": false,
942
+ "type": "option"
943
+ },
944
+ "use-tooling-api": {
945
+ "aliases": [
946
+ "usetoolingapi"
947
+ ],
948
+ "char": "t",
949
+ "deprecateAliases": true,
950
+ "name": "use-tooling-api",
951
+ "summary": "Use Tooling API so you can insert a record in a Tooling API object.",
952
+ "allowNo": false,
953
+ "type": "boolean"
954
+ },
955
+ "perflog": {
956
+ "deprecated": {
957
+ "version": "57"
958
+ },
959
+ "description": "Gets data on API performance metrics from the server. The data is stored in $HOME/.sfdx/apiPerformanceLog.json.",
960
+ "hidden": true,
961
+ "name": "perflog",
962
+ "summary": "Get API performance data.",
963
+ "allowNo": false,
964
+ "type": "boolean"
965
+ }
966
+ },
967
+ "hasDynamicHelp": true,
968
+ "hiddenAliases": [],
969
+ "id": "data:create:record",
970
+ "pluginAlias": "@salesforce/plugin-data",
971
+ "pluginName": "@salesforce/plugin-data",
972
+ "pluginType": "core",
973
+ "strict": true,
974
+ "summary": "Create and insert a record into a Salesforce or Tooling API object.",
975
+ "enableJsonFlag": true,
976
+ "isESM": true,
977
+ "relativePath": [
978
+ "lib",
979
+ "commands",
980
+ "data",
981
+ "create",
982
+ "record.js"
983
+ ],
984
+ "aliasPermutations": [
985
+ "force:data:record:create",
986
+ "data:force:record:create",
987
+ "data:record:force:create",
988
+ "data:record:create:force",
989
+ "force:record:data:create",
990
+ "record:force:data:create",
991
+ "record:data:force:create",
992
+ "record:data:create:force",
993
+ "force:record:create:data",
994
+ "record:force:create:data",
995
+ "record:create:force:data",
996
+ "record:create:data:force",
997
+ "force:data:create:record",
998
+ "data:force:create:record",
999
+ "data:create:force:record",
1000
+ "data:create:record:force",
1001
+ "force:create:data:record",
1002
+ "create:force:data:record",
1003
+ "create:data:force:record",
1004
+ "create:data:record:force",
1005
+ "force:create:record:data",
1006
+ "create:force:record:data",
1007
+ "create:record:force:data",
1008
+ "create:record:data:force"
1009
+ ],
1010
+ "permutations": [
1011
+ "data:create:record",
1012
+ "create:data:record",
1013
+ "create:record:data",
1014
+ "data:record:create",
1015
+ "record:data:create",
1016
+ "record:create:data"
1017
+ ]
1018
+ },
923
1019
  "data:export:tree": {
924
1020
  "aliases": [
925
1021
  "force:data:tree:export"
@@ -2821,5 +2917,5 @@
2821
2917
  ]
2822
2918
  }
2823
2919
  },
2824
- "version": "3.3.5"
2920
+ "version": "3.4.1"
2825
2921
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-data",
3
- "version": "3.3.5",
3
+ "version": "3.4.1",
4
4
  "description": "Plugin for salesforce data commands",
5
5
  "author": "Salesforce",
6
6
  "homepage": "https://github.com/salesforcecli/plugin-data",
@@ -47,7 +47,7 @@
47
47
  "longDescription": "Use the data commands to manipulate records in your org. Commands are available to help you work with various APIs. Import CSV files with the Bulk API V2. Export and import data with the SObject Tree Save API. Perform simple CRUD operations on individual records with the REST API.",
48
48
  "subtopics": {
49
49
  "create": {
50
- "description": "Create a record."
50
+ "description": "Create a record or a file."
51
51
  },
52
52
  "delete": {
53
53
  "description": "Delete a single record or multiple records in bulk."
@@ -70,7 +70,8 @@
70
70
  "upsert": {
71
71
  "description": "Upsert many records."
72
72
  }
73
- }
73
+ },
74
+ "external": true
74
75
  }
75
76
  },
76
77
  "flexibleTaxonomy": true,
@@ -79,8 +80,6 @@
79
80
  "files": [
80
81
  "/lib",
81
82
  "/messages",
82
- "/npm-shrinkwrap.json",
83
- "/oclif.lock",
84
83
  "/oclif.manifest.json",
85
84
  "/schema"
86
85
  ],
@@ -112,18 +111,20 @@
112
111
  "@oclif/core": "^3.26.3",
113
112
  "@salesforce/core": "^7.3.6",
114
113
  "@salesforce/kit": "^3.1.0",
115
- "@salesforce/sf-plugins-core": "^9.0.4",
114
+ "@salesforce/sf-plugins-core": "^9.0.11",
116
115
  "@salesforce/ts-types": "^2.0.9",
117
116
  "chalk": "^5.3.0",
118
117
  "change-case": "^5.4.4",
119
118
  "csv-parse": "^4.16.3",
120
- "csv-stringify": "^6.4.6"
119
+ "csv-stringify": "^6.4.6",
120
+ "form-data": "^4.0.0"
121
121
  },
122
122
  "devDependencies": {
123
- "@oclif/plugin-command-snapshot": "^5.1.7",
124
- "@salesforce/cli-plugins-testkit": "^5.3.2",
125
- "@salesforce/dev-scripts": "^9.0.0",
126
- "@salesforce/plugin-command-reference": "^3.0.83",
123
+ "@oclif/plugin-command-snapshot": "^5.1.9",
124
+ "@salesforce/cli-plugins-testkit": "^5.3.4",
125
+ "@salesforce/dev-scripts": "^9.1.2",
126
+ "@salesforce/plugin-command-reference": "^3.0.85",
127
+ "@salesforce/types": "^1.1.0",
127
128
  "eslint-plugin-sf-plugin": "^1.18.3",
128
129
  "oclif": "^4.10.2",
129
130
  "ts-node": "^10.9.2",
@@ -247,7 +248,7 @@
247
248
  "exports": "./lib/index.js",
248
249
  "type": "module",
249
250
  "sfdx": {
250
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.3.5.crt",
251
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.3.5.sig"
251
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.4.1.crt",
252
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.4.1.sig"
252
253
  }
253
254
  }