@salesforce/sf-plugins-core 1.17.7 → 1.18.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.
- package/lib/compatibility.d.ts +39 -0
- package/lib/compatibility.js +73 -0
- package/lib/exported.d.ts +1 -0
- package/lib/exported.js +1 -0
- package/lib/flags/orgFlags.js +4 -2
- package/messages/messages.md +12 -0
- package/package.json +3 -3
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adds an alias for the deprecated sfdx-style "apiversion" and provides a warning if it is used
|
|
3
|
+
* See orgApiVersionFlag for full details
|
|
4
|
+
*
|
|
5
|
+
* @deprecated
|
|
6
|
+
* @example
|
|
7
|
+
* ```
|
|
8
|
+
* import { Flags } from '@salesforce/sf-plugins-core';
|
|
9
|
+
* public static flags = {
|
|
10
|
+
* 'api-version': Flags.orgApiVersion({
|
|
11
|
+
* char: 'a',
|
|
12
|
+
* description: 'api version for the org'
|
|
13
|
+
* }),
|
|
14
|
+
* }
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare const orgApiVersionFlagWithDeprecations: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
18
|
+
/**
|
|
19
|
+
* Use only for commands that maintain sfdx compatibility.
|
|
20
|
+
* Flag will be hidden and will show a warning if used.
|
|
21
|
+
* Flag does *not* set the loglevel
|
|
22
|
+
*
|
|
23
|
+
* @deprecated
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export declare const loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated
|
|
29
|
+
*/
|
|
30
|
+
export declare const optionalOrgFlagWithDeprecations: import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org | undefined>;
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated
|
|
33
|
+
*/
|
|
34
|
+
export declare const requiredOrgFlagWithDeprecations: import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org | undefined>;
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated
|
|
37
|
+
*/
|
|
38
|
+
export declare const requiredHubFlagWithDeprecations: import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org | undefined>;
|
|
39
|
+
//# sourceMappingURL=compatibility.d.ts.map
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.requiredHubFlagWithDeprecations = exports.requiredOrgFlagWithDeprecations = exports.optionalOrgFlagWithDeprecations = exports.loglevel = exports.orgApiVersionFlagWithDeprecations = void 0;
|
|
10
|
+
const core_1 = require("@oclif/core");
|
|
11
|
+
const core_2 = require("@salesforce/core");
|
|
12
|
+
const orgApiVersion_1 = require("./flags/orgApiVersion");
|
|
13
|
+
const orgFlags_1 = require("./flags/orgFlags");
|
|
14
|
+
/**
|
|
15
|
+
* Adds an alias for the deprecated sfdx-style "apiversion" and provides a warning if it is used
|
|
16
|
+
* See orgApiVersionFlag for full details
|
|
17
|
+
*
|
|
18
|
+
* @deprecated
|
|
19
|
+
* @example
|
|
20
|
+
* ```
|
|
21
|
+
* import { Flags } from '@salesforce/sf-plugins-core';
|
|
22
|
+
* public static flags = {
|
|
23
|
+
* 'api-version': Flags.orgApiVersion({
|
|
24
|
+
* char: 'a',
|
|
25
|
+
* description: 'api version for the org'
|
|
26
|
+
* }),
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
exports.orgApiVersionFlagWithDeprecations = (0, orgApiVersion_1.orgApiVersionFlag)({
|
|
31
|
+
aliases: ['apiversion'],
|
|
32
|
+
deprecateAliases: true,
|
|
33
|
+
});
|
|
34
|
+
core_2.Messages.importMessagesDirectory(__dirname);
|
|
35
|
+
const messages = core_2.Messages.loadMessages('@salesforce/sf-plugins-core', 'messages');
|
|
36
|
+
/**
|
|
37
|
+
* Use only for commands that maintain sfdx compatibility.
|
|
38
|
+
* Flag will be hidden and will show a warning if used.
|
|
39
|
+
* Flag does *not* set the loglevel
|
|
40
|
+
*
|
|
41
|
+
* @deprecated
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
exports.loglevel = core_1.Flags.string({
|
|
45
|
+
hidden: true,
|
|
46
|
+
deprecated: {
|
|
47
|
+
message: messages.getMessage('warning.loglevel'),
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
const deprecatedOrgAliases = {
|
|
51
|
+
aliases: ['targetusername', 'u'],
|
|
52
|
+
deprecateAliases: true,
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated
|
|
56
|
+
*/
|
|
57
|
+
exports.optionalOrgFlagWithDeprecations = (0, orgFlags_1.optionalOrgFlag)({
|
|
58
|
+
...deprecatedOrgAliases,
|
|
59
|
+
});
|
|
60
|
+
/**
|
|
61
|
+
* @deprecated
|
|
62
|
+
*/
|
|
63
|
+
exports.requiredOrgFlagWithDeprecations = (0, orgFlags_1.requiredOrgFlag)({
|
|
64
|
+
...deprecatedOrgAliases,
|
|
65
|
+
});
|
|
66
|
+
/**
|
|
67
|
+
* @deprecated
|
|
68
|
+
*/
|
|
69
|
+
exports.requiredHubFlagWithDeprecations = (0, orgFlags_1.requiredHubFlag)({
|
|
70
|
+
aliases: ['targetdevhubusername'],
|
|
71
|
+
deprecateAliases: true,
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=compatibility.js.map
|
package/lib/exported.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export { Progress, Prompter, generateTableChoices, Ux } from './ux';
|
|
|
7
7
|
export { SfHook } from './hooks';
|
|
8
8
|
export * from './types';
|
|
9
9
|
export { SfCommand, SfCommandInterface, StandardColors } from './sfCommand';
|
|
10
|
+
export * from './compatibility';
|
|
10
11
|
export declare const Flags: {
|
|
11
12
|
boolean: typeof OclifFlags.boolean;
|
|
12
13
|
directory: import("@oclif/core/lib/interfaces").Definition<string, {
|
package/lib/exported.js
CHANGED
|
@@ -41,6 +41,7 @@ __exportStar(require("./types"), exports);
|
|
|
41
41
|
var sfCommand_1 = require("./sfCommand");
|
|
42
42
|
Object.defineProperty(exports, "SfCommand", { enumerable: true, get: function () { return sfCommand_1.SfCommand; } });
|
|
43
43
|
Object.defineProperty(exports, "StandardColors", { enumerable: true, get: function () { return sfCommand_1.StandardColors; } });
|
|
44
|
+
__exportStar(require("./compatibility"), exports);
|
|
44
45
|
// custom flags
|
|
45
46
|
const orgFlags_1 = require("./flags/orgFlags");
|
|
46
47
|
const salesforceId_1 = require("./flags/salesforceId");
|
package/lib/flags/orgFlags.js
CHANGED
|
@@ -67,7 +67,7 @@ const getHubOrThrow = async (aliasOrUsername) => {
|
|
|
67
67
|
* ```
|
|
68
68
|
*/
|
|
69
69
|
exports.optionalOrgFlag = core_1.Flags.custom({
|
|
70
|
-
char: '
|
|
70
|
+
char: 'o',
|
|
71
71
|
parse: async (input) => maybeGetOrg(input),
|
|
72
72
|
default: async () => maybeGetOrg(),
|
|
73
73
|
defaultHelp: async () => (await maybeGetOrg())?.getUsername(),
|
|
@@ -95,7 +95,8 @@ exports.optionalOrgFlag = core_1.Flags.custom({
|
|
|
95
95
|
* ```
|
|
96
96
|
*/
|
|
97
97
|
exports.requiredOrgFlag = core_1.Flags.custom({
|
|
98
|
-
char: '
|
|
98
|
+
char: 'o',
|
|
99
|
+
summary: messages.getMessage('flags.targetOrg.summary'),
|
|
99
100
|
parse: async (input) => getOrgOrThrow(input),
|
|
100
101
|
default: async () => getOrgOrThrow(),
|
|
101
102
|
defaultHelp: async () => (await getOrgOrThrow())?.getUsername(),
|
|
@@ -124,6 +125,7 @@ exports.requiredOrgFlag = core_1.Flags.custom({
|
|
|
124
125
|
*/
|
|
125
126
|
exports.requiredHubFlag = core_1.Flags.custom({
|
|
126
127
|
char: 'v',
|
|
128
|
+
summary: messages.getMessage('flags.targetDevHubOrg.summary'),
|
|
127
129
|
parse: async (input) => getHubOrThrow(input),
|
|
128
130
|
default: async () => getHubOrThrow(),
|
|
129
131
|
defaultHelp: async () => (await getHubOrThrow())?.getUsername(),
|
package/messages/messages.md
CHANGED
|
@@ -34,6 +34,14 @@ No default dev hub found. Use -v or --target-dev-hub to specify an environment.
|
|
|
34
34
|
|
|
35
35
|
The specified org %s is not a Dev Hub.
|
|
36
36
|
|
|
37
|
+
# flags.targetOrg.summary
|
|
38
|
+
|
|
39
|
+
Username or alias of the target org.
|
|
40
|
+
|
|
41
|
+
# flags.targetDevHubOrg.summary
|
|
42
|
+
|
|
43
|
+
Username or alias of the Dev Hub org.
|
|
44
|
+
|
|
37
45
|
# flags.apiVersion.description
|
|
38
46
|
|
|
39
47
|
Override the api version used for api requests made by this command
|
|
@@ -66,6 +74,10 @@ The value must be between %s and %s (inclusive).
|
|
|
66
74
|
|
|
67
75
|
Warning:
|
|
68
76
|
|
|
77
|
+
# warning.loglevel
|
|
78
|
+
|
|
79
|
+
The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.
|
|
80
|
+
|
|
69
81
|
# actions.tryThis
|
|
70
82
|
|
|
71
83
|
Try this:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/sf-plugins-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.1",
|
|
4
4
|
"description": "Utils for writing deploy and retrieve plugins",
|
|
5
5
|
"main": "lib/exported",
|
|
6
6
|
"types": "lib/exported.d.ts",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@oclif/core": "^1.20.4",
|
|
36
|
-
"@salesforce/core": "^3.
|
|
36
|
+
"@salesforce/core": "^3.32.1",
|
|
37
37
|
"@salesforce/kit": "^1.7.1",
|
|
38
38
|
"@salesforce/ts-types": "^1.7.1",
|
|
39
39
|
"chalk": "^4",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@salesforce/prettier-config": "^0.0.2",
|
|
47
47
|
"@salesforce/ts-sinon": "^1.4.2",
|
|
48
48
|
"@types/inquirer": "^8.2.3",
|
|
49
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^5.42.1",
|
|
50
50
|
"@typescript-eslint/parser": "^5.42.0",
|
|
51
51
|
"chai": "^4.3.6",
|
|
52
52
|
"eslint": "^8.26.0",
|