@salesforce/sf-plugins-core 2.0.0-beta.6 → 2.0.0-beta.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.
@@ -47,5 +47,5 @@ export type ArrayWithDeprecationOptions = {
47
47
  /**
48
48
  * @deprecated
49
49
  */
50
- export declare const arrayWithDeprecation: import("@oclif/core/lib/interfaces/parser").FlagDefinition<string, ArrayWithDeprecationOptions>;
50
+ export declare const arrayWithDeprecation: import("@oclif/core/lib/interfaces/parser").FlagDefinition<string[], ArrayWithDeprecationOptions>;
51
51
  //# sourceMappingURL=compatibility.d.ts.map
@@ -86,8 +86,13 @@ exports.optionalHubFlagWithDeprecations = (0, orgFlags_1.optionalHubFlag)({
86
86
  exports.arrayWithDeprecation = core_1.Flags.custom({
87
87
  multiple: true,
88
88
  delimiter: ',',
89
- parse: async (input) => {
90
- const inputParts = input.split(',').map((i) => i.trim());
89
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
90
+ // @ts-expect-error parse expects to return string[] but we need to return string.
91
+ // This is a weird consequence of implementing an array flag. The oclif parser splits the input (e.g. "thing1,thing2")
92
+ // on the delimiter and passes each value individually to the parse function. However, the return type needs to be
93
+ // string[] so that upstream consumers have the correct flag typings.
94
+ parse: async (input, ctx) => {
95
+ const inputParts = ctx.token.input.split(',').map((i) => i.trim());
91
96
  if (inputParts.length > 1) {
92
97
  await core_2.Lifecycle.getInstance().emitWarning(messages.getMessage('warning.arrayInputFormat'));
93
98
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/sf-plugins-core",
3
- "version": "2.0.0-beta.6",
3
+ "version": "2.0.0-beta.8",
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",