@salesforce/plugin-data 3.5.15 → 3.6.1-dev.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.
Files changed (34) hide show
  1. package/README.md +68 -17
  2. package/lib/bulkUtils.js +1 -1
  3. package/lib/bulkUtils.js.map +1 -1
  4. package/lib/commands/data/query/resume.js +1 -1
  5. package/lib/commands/data/query/resume.js.map +1 -1
  6. package/lib/commands/data/query.js +1 -1
  7. package/lib/commands/data/query.js.map +1 -1
  8. package/lib/commands/data/search.js +60 -0
  9. package/lib/commands/data/search.js.map +1 -0
  10. package/lib/flags.js +3 -3
  11. package/lib/flags.js.map +1 -1
  12. package/lib/queryUtils.js +3 -3
  13. package/lib/queryUtils.js.map +1 -1
  14. package/lib/reporters/query/csvReporter.js.map +1 -0
  15. package/lib/reporters/{humanReporter.js → query/humanReporter.js} +1 -1
  16. package/lib/reporters/query/humanReporter.js.map +1 -0
  17. package/lib/reporters/{reporters.js → query/reporters.js} +1 -1
  18. package/lib/reporters/query/reporters.js.map +1 -0
  19. package/lib/reporters/search/csvSearchReporter.js +26 -0
  20. package/lib/reporters/search/csvSearchReporter.js.map +1 -0
  21. package/lib/reporters/search/humanSearchReporter.js +20 -0
  22. package/lib/reporters/search/humanSearchReporter.js.map +1 -0
  23. package/lib/reporters/search/reporter.js +33 -0
  24. package/lib/reporters/search/reporter.js.map +1 -0
  25. package/lib/searchUtils.js +20 -0
  26. package/lib/searchUtils.js.map +1 -0
  27. package/lib/types.js.map +1 -1
  28. package/messages/data.search.md +43 -0
  29. package/oclif.manifest.json +285 -187
  30. package/package.json +7 -7
  31. package/lib/reporters/csvReporter.js.map +0 -1
  32. package/lib/reporters/humanReporter.js.map +0 -1
  33. package/lib/reporters/reporters.js.map +0 -1
  34. /package/lib/reporters/{csvReporter.js → query/csvReporter.js} +0 -0
@@ -0,0 +1,20 @@
1
+ import { HumanSearchReporter } from './reporters/search/humanSearchReporter.js';
2
+ import { JsonSearchReporter } from './reporters/search/reporter.js';
3
+ import { CsvSearchReporter } from './reporters/search/csvSearchReporter.js';
4
+ export const displaySearchResults = (queryResult, resultFormat) => {
5
+ let reporter;
6
+ switch (resultFormat) {
7
+ case 'human':
8
+ reporter = new HumanSearchReporter(queryResult);
9
+ break;
10
+ case 'csv':
11
+ reporter = new CsvSearchReporter(queryResult);
12
+ break;
13
+ case 'json':
14
+ reporter = new JsonSearchReporter(queryResult);
15
+ break;
16
+ }
17
+ // delegate to selected reporter
18
+ reporter.display();
19
+ };
20
+ //# sourceMappingURL=searchUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchUtils.js","sourceRoot":"","sources":["../src/searchUtils.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAE5E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,WAAyB,EAAE,YAAsC,EAAQ,EAAE;IAC9G,IAAI,QAAsE,CAAC;IAE3E,QAAQ,YAAY,EAAE,CAAC;QACrB,KAAK,OAAO;YACV,QAAQ,GAAG,IAAI,mBAAmB,CAAC,WAAW,CAAC,CAAC;YAChD,MAAM;QACR,KAAK,KAAK;YACR,QAAQ,GAAG,IAAI,iBAAiB,CAAC,WAAW,CAAC,CAAC;YAC9C,MAAM;QACR,KAAK,MAAM;YACT,QAAQ,GAAG,IAAI,kBAAkB,CAAC,WAAW,CAAC,CAAC;YAC/C,MAAM;IACV,CAAC;IACD,gCAAgC;IAChC,QAAQ,CAAC,OAAO,EAAE,CAAC;AACrB,CAAC,CAAC"}
package/lib/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAcA,MAAM,CAAN,IAAY,SAIX;AAJD,WAAY,SAAS;IAC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CAAE,OAAiC,EAAE,OAAO,CAAC,CAAC;AAE7D,0EAA0E;AAC1E,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAI,OAAgB,EAAoC,EAAE,CAChG,gBAAgB,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;AAE1D,4DAA4D;AAC5D,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAI,KAAmB,EAA4C,EAAE,CACzG,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,OAAgB,EAA6C,EAAE,CACjG,CAAC,CAAE,OAA0C,CAAC,WAAW,IAAI,CAAC,CAAE,OAA0C,CAAC,IAAI,CAAC;AAElH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAmB,EAA2D,EAAE,CAChH,KAAK,CAAC,CAAC,CAAC,KAAK,YAAY,IAAI,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,43 @@
1
+ # summary
2
+
3
+ Execute a SOSL text-based search query.
4
+
5
+ # description
6
+
7
+ Specify the SOSL query at the command line with the --query flag or read the query from a file with the --file flag.
8
+
9
+ By default, the results are written to the terminal in human-readable format. If you specify `--result-format csv`, the output is written to one or more CSV (comma-separated values) files. The file names correspond to the Salesforce objects in the results, such as Account.csv. Both `--result-format human` and `--result-format json` display only to the terminal.
10
+
11
+ # examples
12
+
13
+ - Specify a SOSL query at the command line; the command uses your default org:
14
+
15
+ <%= config.bin %> <%= command.id %> --query "FIND {Anna Jones} IN Name Fields RETURNING Contact (Name, Phone)"
16
+
17
+ - Read the SOSL query from a file called "query.txt"; the command uses the org with alias "my-scratch":
18
+
19
+ <%= config.bin %> <%= command.id %> --file query.txt --target-org my-scratch
20
+
21
+ - Similar to the previous example, but write the results to one or more CSV files, depending on the Salesforce objects in the results:
22
+
23
+ <%= config.bin %> <%= command.id %> --file query.txt --target-org my-scratch --result-format csv
24
+
25
+ # flags.query.summary
26
+
27
+ SOSL query to execute.
28
+
29
+ # flags.result-format.summary
30
+
31
+ Format to display the results, or to write to disk if you specify "csv".
32
+
33
+ # flags.file.summary
34
+
35
+ File that contains the SOSL query.
36
+
37
+ # displayQueryRecordsRetrieved
38
+
39
+ Total number of records retrieved: %s.
40
+
41
+ # queryRunningMessage
42
+
43
+ Querying Data
@@ -326,14 +326,14 @@
326
326
  "resume:data"
327
327
  ]
328
328
  },
329
- "data:create:file": {
329
+ "data:search": {
330
330
  "aliases": [],
331
331
  "args": {},
332
- "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.",
332
+ "description": "Specify the SOSL query at the command line with the --query flag or read the query from a file with the --file flag.\n\nBy default, the results are written to the terminal in human-readable format. If you specify `--result-format csv`, the output is written to one or more CSV (comma-separated values) files. The file names correspond to the Salesforce objects in the results, such as Account.csv. Both `--result-format human` and `--result-format json` display only to the terminal.",
333
333
  "examples": [
334
- "Upload the local file \"resources/astro.png\" to your default org:\n<%= config.bin %> <%= command.id %> --file resources/astro.png",
335
- "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",
336
- "Attach the file to a record in the org:\n<%= config.bin %> <%= command.id %> --file path/to/astro.png --parent-id a03fakeLoJWPIA3"
334
+ "Specify a SOSL query at the command line; the command uses your default org:\n<%= config.bin %> <%= command.id %> --query \"FIND {Anna Jones} IN Name Fields RETURNING Contact (Name, Phone)\"",
335
+ "Read the SOSL query from a file called \"query.txt\"; the command uses the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --file query.txt --target-org my-scratch",
336
+ "Similar to the previous example, but write the results to one or more CSV files, depending on the Salesforce objects in the results:\n<%= config.bin %> <%= command.id %> --file query.txt --target-org my-scratch --result-format csv"
337
337
  ],
338
338
  "flags": {
339
339
  "json": {
@@ -368,11 +368,10 @@
368
368
  "multiple": false,
369
369
  "type": "option"
370
370
  },
371
- "title": {
372
- "char": "t",
373
- "name": "title",
374
- "required": false,
375
- "summary": "New title given to the file (ContentDocument) after it's uploaded.",
371
+ "query": {
372
+ "char": "q",
373
+ "name": "query",
374
+ "summary": "SOSL query to execute.",
376
375
  "hasDynamicHelp": false,
377
376
  "multiple": false,
378
377
  "type": "option"
@@ -380,207 +379,49 @@
380
379
  "file": {
381
380
  "char": "f",
382
381
  "name": "file",
383
- "required": true,
384
- "summary": "Path of file to upload.",
382
+ "summary": "File that contains the SOSL query.",
385
383
  "hasDynamicHelp": false,
386
384
  "multiple": false,
387
385
  "type": "option"
388
386
  },
389
- "parent-id": {
390
- "char": "i",
391
- "name": "parent-id",
392
- "summary": "ID of the record to attach the file to.",
393
- "hasDynamicHelp": false,
394
- "multiple": false,
395
- "type": "option"
396
- }
397
- },
398
- "hasDynamicHelp": true,
399
- "hiddenAliases": [],
400
- "id": "data:create:file",
401
- "pluginAlias": "@salesforce/plugin-data",
402
- "pluginName": "@salesforce/plugin-data",
403
- "pluginType": "core",
404
- "strict": true,
405
- "summary": "Upload a local file to an org.",
406
- "enableJsonFlag": true,
407
- "isESM": true,
408
- "relativePath": [
409
- "lib",
410
- "commands",
411
- "data",
412
- "create",
413
- "file.js"
414
- ],
415
- "aliasPermutations": [],
416
- "permutations": [
417
- "data:create:file",
418
- "create:data:file",
419
- "create:file:data",
420
- "data:file:create",
421
- "file:data:create",
422
- "file:create:data"
423
- ]
424
- },
425
- "data:create:record": {
426
- "aliases": [
427
- "force:data:record:create"
428
- ],
429
- "args": {},
430
- "deprecateAliases": true,
431
- "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.",
432
- "examples": [
433
- "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\"",
434
- "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",
435
- "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\""
436
- ],
437
- "flags": {
438
- "json": {
439
- "description": "Format output as json.",
440
- "helpGroup": "GLOBAL",
441
- "name": "json",
442
- "allowNo": false,
443
- "type": "boolean"
444
- },
445
- "flags-dir": {
446
- "helpGroup": "GLOBAL",
447
- "name": "flags-dir",
448
- "summary": "Import flag values from a directory.",
449
- "hasDynamicHelp": false,
450
- "multiple": false,
451
- "type": "option"
452
- },
453
- "target-org": {
454
- "aliases": [
455
- "targetusername",
456
- "u"
457
- ],
458
- "char": "o",
459
- "deprecateAliases": true,
460
- "name": "target-org",
461
- "noCacheDefault": true,
462
- "required": true,
463
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
464
- "hasDynamicHelp": true,
465
- "multiple": false,
466
- "type": "option"
467
- },
468
- "api-version": {
469
- "aliases": [
470
- "apiversion"
387
+ "result-format": {
388
+ "char": "r",
389
+ "exclusive": [
390
+ "json"
471
391
  ],
472
- "deprecateAliases": true,
473
- "description": "Override the api version used for api requests made by this command",
474
- "name": "api-version",
475
- "hasDynamicHelp": false,
476
- "multiple": false,
477
- "type": "option"
478
- },
479
- "loglevel": {
480
- "deprecated": {
481
- "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."
482
- },
483
- "hidden": true,
484
- "name": "loglevel",
392
+ "name": "result-format",
393
+ "summary": "Format to display the results, or to write to disk if you specify \"csv\".",
394
+ "default": "human",
485
395
  "hasDynamicHelp": false,
486
396
  "multiple": false,
487
- "type": "option"
488
- },
489
- "sobject": {
490
- "aliases": [
491
- "sobjecttype"
397
+ "options": [
398
+ "human",
399
+ "csv",
400
+ "json"
492
401
  ],
493
- "char": "s",
494
- "deprecateAliases": true,
495
- "name": "sobject",
496
- "required": true,
497
- "summary": "API name of the Salesforce or Tooling API object that you're inserting a record into.",
498
- "hasDynamicHelp": false,
499
- "multiple": false,
500
- "type": "option"
501
- },
502
- "values": {
503
- "char": "v",
504
- "name": "values",
505
- "required": true,
506
- "summary": "Values for the flags in the form <fieldName>=<value>, separate multiple pairs with spaces.",
507
- "hasDynamicHelp": false,
508
- "multiple": false,
509
402
  "type": "option"
510
- },
511
- "use-tooling-api": {
512
- "aliases": [
513
- "usetoolingapi"
514
- ],
515
- "char": "t",
516
- "deprecateAliases": true,
517
- "name": "use-tooling-api",
518
- "summary": "Use Tooling API so you can insert a record in a Tooling API object.",
519
- "allowNo": false,
520
- "type": "boolean"
521
- },
522
- "perflog": {
523
- "deprecated": {
524
- "version": "57"
525
- },
526
- "description": "Gets data on API performance metrics from the server. The data is stored in $HOME/.sfdx/apiPerformanceLog.json.",
527
- "hidden": true,
528
- "name": "perflog",
529
- "summary": "Get API performance data.",
530
- "allowNo": false,
531
- "type": "boolean"
532
403
  }
533
404
  },
534
405
  "hasDynamicHelp": true,
535
406
  "hiddenAliases": [],
536
- "id": "data:create:record",
407
+ "id": "data:search",
537
408
  "pluginAlias": "@salesforce/plugin-data",
538
409
  "pluginName": "@salesforce/plugin-data",
539
410
  "pluginType": "core",
540
411
  "strict": true,
541
- "summary": "Create and insert a record into a Salesforce or Tooling API object.",
412
+ "summary": "Execute a SOSL text-based search query.",
542
413
  "enableJsonFlag": true,
543
414
  "isESM": true,
544
415
  "relativePath": [
545
416
  "lib",
546
417
  "commands",
547
418
  "data",
548
- "create",
549
- "record.js"
550
- ],
551
- "aliasPermutations": [
552
- "force:data:record:create",
553
- "data:force:record:create",
554
- "data:record:force:create",
555
- "data:record:create:force",
556
- "force:record:data:create",
557
- "record:force:data:create",
558
- "record:data:force:create",
559
- "record:data:create:force",
560
- "force:record:create:data",
561
- "record:force:create:data",
562
- "record:create:force:data",
563
- "record:create:data:force",
564
- "force:data:create:record",
565
- "data:force:create:record",
566
- "data:create:force:record",
567
- "data:create:record:force",
568
- "force:create:data:record",
569
- "create:force:data:record",
570
- "create:data:force:record",
571
- "create:data:record:force",
572
- "force:create:record:data",
573
- "create:force:record:data",
574
- "create:record:force:data",
575
- "create:record:data:force"
419
+ "search.js"
576
420
  ],
421
+ "aliasPermutations": [],
577
422
  "permutations": [
578
- "data:create:record",
579
- "create:data:record",
580
- "create:record:data",
581
- "data:record:create",
582
- "record:data:create",
583
- "record:create:data"
423
+ "data:search",
424
+ "search:data"
584
425
  ]
585
426
  },
586
427
  "data:delete:bulk": {
@@ -1018,6 +859,263 @@
1018
859
  "resume:delete:data"
1019
860
  ]
1020
861
  },
862
+ "data:create:file": {
863
+ "aliases": [],
864
+ "args": {},
865
+ "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.",
866
+ "examples": [
867
+ "Upload the local file \"resources/astro.png\" to your default org:\n<%= config.bin %> <%= command.id %> --file resources/astro.png",
868
+ "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",
869
+ "Attach the file to a record in the org:\n<%= config.bin %> <%= command.id %> --file path/to/astro.png --parent-id a03fakeLoJWPIA3"
870
+ ],
871
+ "flags": {
872
+ "json": {
873
+ "description": "Format output as json.",
874
+ "helpGroup": "GLOBAL",
875
+ "name": "json",
876
+ "allowNo": false,
877
+ "type": "boolean"
878
+ },
879
+ "flags-dir": {
880
+ "helpGroup": "GLOBAL",
881
+ "name": "flags-dir",
882
+ "summary": "Import flag values from a directory.",
883
+ "hasDynamicHelp": false,
884
+ "multiple": false,
885
+ "type": "option"
886
+ },
887
+ "target-org": {
888
+ "char": "o",
889
+ "name": "target-org",
890
+ "noCacheDefault": true,
891
+ "required": true,
892
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
893
+ "hasDynamicHelp": true,
894
+ "multiple": false,
895
+ "type": "option"
896
+ },
897
+ "api-version": {
898
+ "description": "Override the api version used for api requests made by this command",
899
+ "name": "api-version",
900
+ "hasDynamicHelp": false,
901
+ "multiple": false,
902
+ "type": "option"
903
+ },
904
+ "title": {
905
+ "char": "t",
906
+ "name": "title",
907
+ "required": false,
908
+ "summary": "New title given to the file (ContentDocument) after it's uploaded.",
909
+ "hasDynamicHelp": false,
910
+ "multiple": false,
911
+ "type": "option"
912
+ },
913
+ "file": {
914
+ "char": "f",
915
+ "name": "file",
916
+ "required": true,
917
+ "summary": "Path of file to upload.",
918
+ "hasDynamicHelp": false,
919
+ "multiple": false,
920
+ "type": "option"
921
+ },
922
+ "parent-id": {
923
+ "char": "i",
924
+ "name": "parent-id",
925
+ "summary": "ID of the record to attach the file to.",
926
+ "hasDynamicHelp": false,
927
+ "multiple": false,
928
+ "type": "option"
929
+ }
930
+ },
931
+ "hasDynamicHelp": true,
932
+ "hiddenAliases": [],
933
+ "id": "data:create:file",
934
+ "pluginAlias": "@salesforce/plugin-data",
935
+ "pluginName": "@salesforce/plugin-data",
936
+ "pluginType": "core",
937
+ "strict": true,
938
+ "summary": "Upload a local file to an org.",
939
+ "enableJsonFlag": true,
940
+ "isESM": true,
941
+ "relativePath": [
942
+ "lib",
943
+ "commands",
944
+ "data",
945
+ "create",
946
+ "file.js"
947
+ ],
948
+ "aliasPermutations": [],
949
+ "permutations": [
950
+ "data:create:file",
951
+ "create:data:file",
952
+ "create:file:data",
953
+ "data:file:create",
954
+ "file:data:create",
955
+ "file:create:data"
956
+ ]
957
+ },
958
+ "data:create:record": {
959
+ "aliases": [
960
+ "force:data:record:create"
961
+ ],
962
+ "args": {},
963
+ "deprecateAliases": true,
964
+ "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.",
965
+ "examples": [
966
+ "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\"",
967
+ "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",
968
+ "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\""
969
+ ],
970
+ "flags": {
971
+ "json": {
972
+ "description": "Format output as json.",
973
+ "helpGroup": "GLOBAL",
974
+ "name": "json",
975
+ "allowNo": false,
976
+ "type": "boolean"
977
+ },
978
+ "flags-dir": {
979
+ "helpGroup": "GLOBAL",
980
+ "name": "flags-dir",
981
+ "summary": "Import flag values from a directory.",
982
+ "hasDynamicHelp": false,
983
+ "multiple": false,
984
+ "type": "option"
985
+ },
986
+ "target-org": {
987
+ "aliases": [
988
+ "targetusername",
989
+ "u"
990
+ ],
991
+ "char": "o",
992
+ "deprecateAliases": true,
993
+ "name": "target-org",
994
+ "noCacheDefault": true,
995
+ "required": true,
996
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
997
+ "hasDynamicHelp": true,
998
+ "multiple": false,
999
+ "type": "option"
1000
+ },
1001
+ "api-version": {
1002
+ "aliases": [
1003
+ "apiversion"
1004
+ ],
1005
+ "deprecateAliases": true,
1006
+ "description": "Override the api version used for api requests made by this command",
1007
+ "name": "api-version",
1008
+ "hasDynamicHelp": false,
1009
+ "multiple": false,
1010
+ "type": "option"
1011
+ },
1012
+ "loglevel": {
1013
+ "deprecated": {
1014
+ "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."
1015
+ },
1016
+ "hidden": true,
1017
+ "name": "loglevel",
1018
+ "hasDynamicHelp": false,
1019
+ "multiple": false,
1020
+ "type": "option"
1021
+ },
1022
+ "sobject": {
1023
+ "aliases": [
1024
+ "sobjecttype"
1025
+ ],
1026
+ "char": "s",
1027
+ "deprecateAliases": true,
1028
+ "name": "sobject",
1029
+ "required": true,
1030
+ "summary": "API name of the Salesforce or Tooling API object that you're inserting a record into.",
1031
+ "hasDynamicHelp": false,
1032
+ "multiple": false,
1033
+ "type": "option"
1034
+ },
1035
+ "values": {
1036
+ "char": "v",
1037
+ "name": "values",
1038
+ "required": true,
1039
+ "summary": "Values for the flags in the form <fieldName>=<value>, separate multiple pairs with spaces.",
1040
+ "hasDynamicHelp": false,
1041
+ "multiple": false,
1042
+ "type": "option"
1043
+ },
1044
+ "use-tooling-api": {
1045
+ "aliases": [
1046
+ "usetoolingapi"
1047
+ ],
1048
+ "char": "t",
1049
+ "deprecateAliases": true,
1050
+ "name": "use-tooling-api",
1051
+ "summary": "Use Tooling API so you can insert a record in a Tooling API object.",
1052
+ "allowNo": false,
1053
+ "type": "boolean"
1054
+ },
1055
+ "perflog": {
1056
+ "deprecated": {
1057
+ "version": "57"
1058
+ },
1059
+ "description": "Gets data on API performance metrics from the server. The data is stored in $HOME/.sfdx/apiPerformanceLog.json.",
1060
+ "hidden": true,
1061
+ "name": "perflog",
1062
+ "summary": "Get API performance data.",
1063
+ "allowNo": false,
1064
+ "type": "boolean"
1065
+ }
1066
+ },
1067
+ "hasDynamicHelp": true,
1068
+ "hiddenAliases": [],
1069
+ "id": "data:create:record",
1070
+ "pluginAlias": "@salesforce/plugin-data",
1071
+ "pluginName": "@salesforce/plugin-data",
1072
+ "pluginType": "core",
1073
+ "strict": true,
1074
+ "summary": "Create and insert a record into a Salesforce or Tooling API object.",
1075
+ "enableJsonFlag": true,
1076
+ "isESM": true,
1077
+ "relativePath": [
1078
+ "lib",
1079
+ "commands",
1080
+ "data",
1081
+ "create",
1082
+ "record.js"
1083
+ ],
1084
+ "aliasPermutations": [
1085
+ "force:data:record:create",
1086
+ "data:force:record:create",
1087
+ "data:record:force:create",
1088
+ "data:record:create:force",
1089
+ "force:record:data:create",
1090
+ "record:force:data:create",
1091
+ "record:data:force:create",
1092
+ "record:data:create:force",
1093
+ "force:record:create:data",
1094
+ "record:force:create:data",
1095
+ "record:create:force:data",
1096
+ "record:create:data:force",
1097
+ "force:data:create:record",
1098
+ "data:force:create:record",
1099
+ "data:create:force:record",
1100
+ "data:create:record:force",
1101
+ "force:create:data:record",
1102
+ "create:force:data:record",
1103
+ "create:data:force:record",
1104
+ "create:data:record:force",
1105
+ "force:create:record:data",
1106
+ "create:force:record:data",
1107
+ "create:record:force:data",
1108
+ "create:record:data:force"
1109
+ ],
1110
+ "permutations": [
1111
+ "data:create:record",
1112
+ "create:data:record",
1113
+ "create:record:data",
1114
+ "data:record:create",
1115
+ "record:data:create",
1116
+ "record:create:data"
1117
+ ]
1118
+ },
1021
1119
  "data:export:tree": {
1022
1120
  "aliases": [
1023
1121
  "force:data:tree:export",
@@ -2979,5 +3077,5 @@
2979
3077
  ]
2980
3078
  }
2981
3079
  },
2982
- "version": "3.5.15"
3080
+ "version": "3.6.1-dev.1"
2983
3081
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-data",
3
- "version": "3.5.15",
3
+ "version": "3.6.1-dev.1",
4
4
  "description": "Plugin for salesforce data commands",
5
5
  "author": "Salesforce",
6
6
  "homepage": "https://github.com/salesforcecli/plugin-data",
@@ -120,13 +120,13 @@
120
120
  },
121
121
  "devDependencies": {
122
122
  "@oclif/core": "^4.0.17",
123
- "@oclif/plugin-command-snapshot": "^5.2.11",
124
- "@salesforce/cli-plugins-testkit": "^5.3.23",
123
+ "@oclif/plugin-command-snapshot": "^5.2.12",
124
+ "@salesforce/cli-plugins-testkit": "^5.3.25",
125
125
  "@salesforce/dev-scripts": "^10.2.9",
126
126
  "@salesforce/plugin-command-reference": "^3.1.5",
127
127
  "@salesforce/types": "^1.2.0",
128
- "eslint-plugin-sf-plugin": "^1.20.1",
129
- "oclif": "^4.14.13",
128
+ "eslint-plugin-sf-plugin": "^1.20.4",
129
+ "oclif": "^4.14.17",
130
130
  "ts-node": "^10.9.2",
131
131
  "typescript": "^5.5.4"
132
132
  },
@@ -251,7 +251,7 @@
251
251
  "exports": "./lib/index.js",
252
252
  "type": "module",
253
253
  "sfdx": {
254
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.5.15.crt",
255
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.5.15.sig"
254
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.6.1-dev.1.crt",
255
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.6.1-dev.1.sig"
256
256
  }
257
257
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"csvReporter.js","sourceRoot":"","sources":["../../src/reporters/csvReporter.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