@salesforce/sf-plugins-core 1.17.7 → 1.18.0
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 +2 -2
- package/messages/messages.md +4 -0
- package/package.json +2 -2
|
@@ -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', 'v'],
|
|
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,7 @@ exports.optionalOrgFlag = core_1.Flags.custom({
|
|
|
95
95
|
* ```
|
|
96
96
|
*/
|
|
97
97
|
exports.requiredOrgFlag = core_1.Flags.custom({
|
|
98
|
-
char: '
|
|
98
|
+
char: 'o',
|
|
99
99
|
parse: async (input) => getOrgOrThrow(input),
|
|
100
100
|
default: async () => getOrgOrThrow(),
|
|
101
101
|
defaultHelp: async () => (await getOrgOrThrow())?.getUsername(),
|
package/messages/messages.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/sf-plugins-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
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",
|