@salesforce/sf-plugins-core 2.0.0-beta.5 → 2.0.0-beta.7

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.
@@ -85,12 +85,17 @@ exports.optionalHubFlagWithDeprecations = (0, orgFlags_1.optionalHubFlag)({
85
85
  */
86
86
  exports.arrayWithDeprecation = core_1.Flags.custom({
87
87
  multiple: true,
88
- parse: async (input) => {
89
- const inputParts = input.split(',').map((i) => i.trim());
88
+ delimiter: ',',
89
+ parse: async (input, ctx) => {
90
+ const inputParts = ctx.token.input.split(',').map((i) => i.trim());
90
91
  if (inputParts.length > 1) {
91
92
  await core_2.Lifecycle.getInstance().emitWarning(messages.getMessage('warning.arrayInputFormat'));
92
93
  }
93
- return inputParts;
94
+ // This is a weird consequence of implementing an array flag. The oclif parser splits the input (e.g. "thing1,thing2")
95
+ // on the delimiter and passes each value individually to the parse function. However, the return type needs to be
96
+ // string[] so that upstream consumers have the correct flag typings. So we simply wrap the individual elements in
97
+ // an array to satisfy typescript. Oclif ensures that the user ends up with a flat array of parsed strings.
98
+ return [input];
94
99
  },
95
100
  });
96
101
  //# sourceMappingURL=compatibility.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/sf-plugins-core",
3
- "version": "2.0.0-beta.5",
3
+ "version": "2.0.0-beta.7",
4
4
  "description": "Utils for writing Salesforce CLI plugins",
5
5
  "main": "lib/exported",
6
6
  "types": "lib/exported.d.ts",
@@ -32,7 +32,7 @@
32
32
  "/messages"
33
33
  ],
34
34
  "dependencies": {
35
- "@oclif/core": "^2.0.6",
35
+ "@oclif/core": "^2.0.7",
36
36
  "@salesforce/core": "^3.32.12",
37
37
  "@salesforce/kit": "^1.8.3",
38
38
  "@salesforce/ts-types": "^1.7.1",