@salesforce/plugin-templates 55.3.1 → 55.4.2
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/LICENSE.txt +1 -1
- package/lib/commands/analytics/generate/template.d.ts +16 -0
- package/lib/commands/analytics/generate/template.js +53 -0
- package/lib/commands/analytics/generate/template.js.map +1 -0
- package/lib/commands/apex/generate/class.d.ts +17 -0
- package/lib/commands/apex/generate/class.js +65 -0
- package/lib/commands/apex/generate/class.js.map +1 -0
- package/lib/commands/apex/generate/trigger.d.ts +19 -0
- package/lib/commands/apex/generate/trigger.js +86 -0
- package/lib/commands/apex/generate/trigger.js.map +1 -0
- package/lib/commands/lightning/generate/app.d.ts +18 -0
- package/lib/commands/lightning/generate/app.js +68 -0
- package/lib/commands/lightning/generate/app.js.map +1 -0
- package/lib/commands/lightning/generate/component.d.ts +19 -0
- package/lib/commands/lightning/generate/component.js +75 -0
- package/lib/commands/lightning/generate/component.js.map +1 -0
- package/lib/commands/lightning/generate/event.d.ts +18 -0
- package/lib/commands/lightning/generate/event.js +68 -0
- package/lib/commands/lightning/generate/event.js.map +1 -0
- package/lib/commands/lightning/generate/interface.d.ts +18 -0
- package/lib/commands/lightning/generate/interface.js +68 -0
- package/lib/commands/lightning/generate/interface.js.map +1 -0
- package/lib/commands/lightning/generate/test.d.ts +18 -0
- package/lib/commands/lightning/generate/test.js +68 -0
- package/lib/commands/lightning/generate/test.js.map +1 -0
- package/lib/commands/project/generate.d.ts +20 -0
- package/lib/commands/project/generate.js +93 -0
- package/lib/commands/project/generate.js.map +1 -0
- package/lib/commands/static-resource/generate.d.ts +17 -0
- package/lib/commands/static-resource/generate.js +64 -0
- package/lib/commands/static-resource/generate.js.map +1 -0
- package/lib/commands/visualforce/generate/component.d.ts +18 -0
- package/lib/commands/visualforce/generate/component.js +73 -0
- package/lib/commands/visualforce/generate/component.js.map +1 -0
- package/lib/commands/visualforce/generate/page.d.ts +18 -0
- package/lib/commands/visualforce/generate/page.js +75 -0
- package/lib/commands/visualforce/generate/page.js.map +1 -0
- package/lib/utils/flags.d.ts +3 -0
- package/lib/utils/flags.js +36 -0
- package/lib/utils/flags.js.map +1 -0
- package/lib/utils/templateCommand.d.ts +58 -14
- package/lib/utils/templateCommand.js +42 -82
- package/lib/utils/templateCommand.js.map +1 -1
- package/messages/analyticsTemplate.md +17 -0
- package/messages/apexClass.md +25 -0
- package/messages/apexTrigger.md +40 -0
- package/messages/lightning.md +27 -0
- package/messages/lightningApp.md +9 -0
- package/messages/lightningCmp.md +31 -0
- package/messages/lightningEvent.md +9 -0
- package/messages/lightningInterface.md +9 -0
- package/messages/lightningTest.md +21 -0
- package/messages/messages.md +43 -0
- package/messages/project.md +87 -0
- package/messages/staticResource.md +37 -0
- package/messages/vf.md +39 -0
- package/oclif.manifest.json +1190 -1
- package/package.json +174 -96
- package/lib/commands/force/analytics/template/create.d.ts +0 -15
- package/lib/commands/force/analytics/template/create.js +0 -42
- package/lib/commands/force/analytics/template/create.js.map +0 -1
- package/lib/commands/force/apex/class/create.d.ts +0 -16
- package/lib/commands/force/apex/class/create.js +0 -52
- package/lib/commands/force/apex/class/create.js.map +0 -1
- package/lib/commands/force/apex/trigger/create.d.ts +0 -18
- package/lib/commands/force/apex/trigger/create.js +0 -74
- package/lib/commands/force/apex/trigger/create.js.map +0 -1
- package/lib/commands/force/lightning/app/create.d.ts +0 -17
- package/lib/commands/force/lightning/app/create.js +0 -58
- package/lib/commands/force/lightning/app/create.js.map +0 -1
- package/lib/commands/force/lightning/component/create.d.ts +0 -18
- package/lib/commands/force/lightning/component/create.js +0 -67
- package/lib/commands/force/lightning/component/create.js.map +0 -1
- package/lib/commands/force/lightning/event/create.d.ts +0 -17
- package/lib/commands/force/lightning/event/create.js +0 -58
- package/lib/commands/force/lightning/event/create.js.map +0 -1
- package/lib/commands/force/lightning/interface/create.d.ts +0 -17
- package/lib/commands/force/lightning/interface/create.js +0 -58
- package/lib/commands/force/lightning/interface/create.js.map +0 -1
- package/lib/commands/force/lightning/test/create.d.ts +0 -16
- package/lib/commands/force/lightning/test/create.js +0 -56
- package/lib/commands/force/lightning/test/create.js.map +0 -1
- package/lib/commands/force/project/create.d.ts +0 -19
- package/lib/commands/force/project/create.js +0 -78
- package/lib/commands/force/project/create.js.map +0 -1
- package/lib/commands/force/staticresource/create.d.ts +0 -16
- package/lib/commands/force/staticresource/create.js +0 -49
- package/lib/commands/force/staticresource/create.js.map +0 -1
- package/lib/commands/force/visualforce/component/create.d.ts +0 -17
- package/lib/commands/force/visualforce/component/create.js +0 -59
- package/lib/commands/force/visualforce/component/create.js.map +0 -1
- package/lib/commands/force/visualforce/page/create.d.ts +0 -17
- package/lib/commands/force/visualforce/page/create.js +0 -59
- package/lib/commands/force/visualforce/page/create.js.map +0 -1
- package/lib/utils/index.d.ts +0 -2
- package/lib/utils/index.js +0 -14
- package/lib/utils/index.js.map +0 -1
- package/lib/utils/messageUtil.d.ts +0 -33
- package/lib/utils/messageUtil.js +0 -59
- package/lib/utils/messageUtil.js.map +0 -1
- package/messages/messages.json +0 -87
- package/yarn.lock +0 -9362
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
/*
|
|
5
|
+
* Copyright (c) 2019, salesforce.com, inc.
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
* Licensed under the BSD 3-Clause license.
|
|
8
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
|
+
*/
|
|
10
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
11
|
+
const lightningInterfaceGenerator_1 = require("@salesforce/templates/lib/generators/lightningInterfaceGenerator");
|
|
12
|
+
const utils_1 = require("@salesforce/templates/lib/utils");
|
|
13
|
+
const core_1 = require("@salesforce/core");
|
|
14
|
+
const templateCommand_1 = require("../../../utils/templateCommand");
|
|
15
|
+
const flags_1 = require("../../../utils/flags");
|
|
16
|
+
const lightningInterfaceFileSuffix = /.intf$/;
|
|
17
|
+
const BUNDLE_TYPE = 'Interface';
|
|
18
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
19
|
+
const messages = core_1.Messages.loadMessages('@salesforce/plugin-templates', 'lightningInterface');
|
|
20
|
+
const lightningCommon = core_1.Messages.loadMessages('@salesforce/plugin-templates', 'lightning');
|
|
21
|
+
class LightningInterface extends sf_plugins_core_1.SfCommand {
|
|
22
|
+
run() {
|
|
23
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const { flags } = yield this.parse(LightningInterface);
|
|
25
|
+
const flagsAsOptions = {
|
|
26
|
+
interfacename: flags.name,
|
|
27
|
+
outputdir: flags['output-dir'],
|
|
28
|
+
internal: flags.internal,
|
|
29
|
+
apiversion: flags['api-version'],
|
|
30
|
+
template: 'DefaultLightningIntf',
|
|
31
|
+
};
|
|
32
|
+
return (0, templateCommand_1.runGenerator)({
|
|
33
|
+
generator: lightningInterfaceGenerator_1.default,
|
|
34
|
+
opts: flagsAsOptions,
|
|
35
|
+
ux: new sf_plugins_core_1.Ux({ jsonEnabled: this.jsonEnabled() }),
|
|
36
|
+
templates: (0, templateCommand_1.getCustomTemplates)(this.configAggregator),
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.default = LightningInterface;
|
|
42
|
+
LightningInterface.summary = lightningCommon.getMessage('summary', [BUNDLE_TYPE]);
|
|
43
|
+
LightningInterface.description = lightningCommon.getMessage('description', [BUNDLE_TYPE]);
|
|
44
|
+
LightningInterface.examples = messages.getMessages('examples');
|
|
45
|
+
LightningInterface.aliases = ['force:lightning:interface:create'];
|
|
46
|
+
LightningInterface.deprecateAliases = true;
|
|
47
|
+
LightningInterface.flags = {
|
|
48
|
+
name: sf_plugins_core_1.Flags.string({
|
|
49
|
+
char: 'n',
|
|
50
|
+
summary: lightningCommon.getMessage('flags.name', [BUNDLE_TYPE]),
|
|
51
|
+
description: lightningCommon.getMessage('flags.name.description'),
|
|
52
|
+
required: true,
|
|
53
|
+
aliases: ['interfacename'],
|
|
54
|
+
deprecateAliases: true,
|
|
55
|
+
}),
|
|
56
|
+
template: sf_plugins_core_1.Flags.string({
|
|
57
|
+
char: 't',
|
|
58
|
+
summary: lightningCommon.getMessage('flags.template'),
|
|
59
|
+
description: lightningCommon.getMessage('flags.template.description'),
|
|
60
|
+
default: 'DefaultLightningIntf',
|
|
61
|
+
options: utils_1.CreateUtil.getCommandTemplatesForFiletype(lightningInterfaceFileSuffix, 'lightninginterface'),
|
|
62
|
+
}),
|
|
63
|
+
'output-dir': flags_1.outputDirFlagLightning,
|
|
64
|
+
'api-version': sf_plugins_core_1.orgApiVersionFlagWithDeprecations,
|
|
65
|
+
internal: flags_1.internalFlag,
|
|
66
|
+
loglevel: sf_plugins_core_1.loglevel,
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=interface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/commands/lightning/generate/interface.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,iEAAgH;AAEhH,kHAA2G;AAC3G,2DAA6D;AAC7D,2CAA4C;AAC5C,oEAAkF;AAClF,gDAA4E;AAC5E,MAAM,4BAA4B,GAAG,QAAQ,CAAC;AAC9C,MAAM,WAAW,GAAG,WAAW,CAAC;AAEhC,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,oBAAoB,CAAC,CAAC;AAC7F,MAAM,eAAe,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,WAAW,CAAC,CAAC;AAE3F,MAAqB,kBAAmB,SAAQ,2BAAuB;IA4BxD,GAAG;;YACd,MAAM,EAAE,K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;IACF,QAAQ,EAAE,uBAAK,CAAC,MAAM,CAAC;QACrB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,eAAe,CAAC,UAAU,CAAC,gBAAgB,CAAC;QACrD,WAAW,EAAE,eAAe,CAAC,UAAU,CAAC,4BAA4B,CAAC;QACrE,OAAO,EAAE,sBAAsB;QAC/B,OAAO,EAAE,kBAAU,CAAC,8BAA8B,CAAC,4BAA4B,EAAE,oBAAoB,CAAC;KACvG,CAAC;IACF,YAAY,EAAE,8BAAsB;IACpC,aAAa,EAAE,mDAAiC;IAChD,QAAQ,EAAE,oBAAY;IACtB,QAAQ,EAAR,0BAAQ;CACT,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { CreateOutput } from '@salesforce/templates';
|
|
3
|
+
export default class LightningTest extends SfCommand<CreateOutput> {
|
|
4
|
+
static readonly summary: string;
|
|
5
|
+
static readonly description: string;
|
|
6
|
+
static readonly examples: string[];
|
|
7
|
+
static readonly aliases: string[];
|
|
8
|
+
static readonly deprecateAliases = true;
|
|
9
|
+
static readonly flags: {
|
|
10
|
+
name: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
+
template: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
|
+
'output-dir': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
13
|
+
internal: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
15
|
+
loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
16
|
+
};
|
|
17
|
+
run(): Promise<CreateOutput>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
/*
|
|
5
|
+
* Copyright (c) 2019, salesforce.com, inc.
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
* Licensed under the BSD 3-Clause license.
|
|
8
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
|
+
*/
|
|
10
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
11
|
+
const lightningTestGenerator_1 = require("@salesforce/templates/lib/generators/lightningTestGenerator");
|
|
12
|
+
const utils_1 = require("@salesforce/templates/lib/utils");
|
|
13
|
+
const core_1 = require("@salesforce/core");
|
|
14
|
+
const templateCommand_1 = require("../../../utils/templateCommand");
|
|
15
|
+
const flags_1 = require("../../../utils/flags");
|
|
16
|
+
const lightningTestFileSuffix = /.resource$/;
|
|
17
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
18
|
+
const messages = core_1.Messages.loadMessages('@salesforce/plugin-templates', 'lightningTest');
|
|
19
|
+
const lightningMessages = core_1.Messages.loadMessages('@salesforce/plugin-templates', 'lightning');
|
|
20
|
+
class LightningTest extends sf_plugins_core_1.SfCommand {
|
|
21
|
+
run() {
|
|
22
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const { flags } = yield this.parse(LightningTest);
|
|
24
|
+
// translate the new flags to the old ones the generator expects
|
|
25
|
+
const flagsAsOptions = {
|
|
26
|
+
testname: flags.name,
|
|
27
|
+
template: 'DefaultLightningTest',
|
|
28
|
+
outputdir: flags['output-dir'],
|
|
29
|
+
internal: flags.internal,
|
|
30
|
+
apiversion: flags['api-version'],
|
|
31
|
+
};
|
|
32
|
+
return (0, templateCommand_1.runGenerator)({
|
|
33
|
+
generator: lightningTestGenerator_1.default,
|
|
34
|
+
opts: flagsAsOptions,
|
|
35
|
+
ux: new sf_plugins_core_1.Ux({ jsonEnabled: this.jsonEnabled() }),
|
|
36
|
+
templates: (0, templateCommand_1.getCustomTemplates)(this.configAggregator),
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.default = LightningTest;
|
|
42
|
+
LightningTest.summary = messages.getMessage('summary');
|
|
43
|
+
LightningTest.description = messages.getMessage('description');
|
|
44
|
+
LightningTest.examples = messages.getMessages('examples');
|
|
45
|
+
LightningTest.aliases = ['force:lightning:test:create'];
|
|
46
|
+
LightningTest.deprecateAliases = true;
|
|
47
|
+
LightningTest.flags = {
|
|
48
|
+
name: sf_plugins_core_1.Flags.string({
|
|
49
|
+
char: 'n',
|
|
50
|
+
summary: lightningMessages.getMessage('flags.name', ['Test']),
|
|
51
|
+
description: messages.getMessage('flags.name.description'),
|
|
52
|
+
required: true,
|
|
53
|
+
aliases: ['testname'],
|
|
54
|
+
deprecateAliases: true,
|
|
55
|
+
}),
|
|
56
|
+
template: sf_plugins_core_1.Flags.string({
|
|
57
|
+
char: 't',
|
|
58
|
+
summary: lightningMessages.getMessage('flags.template'),
|
|
59
|
+
description: lightningMessages.getMessage('flags.template.description'),
|
|
60
|
+
default: 'DefaultLightningTest',
|
|
61
|
+
options: utils_1.CreateUtil.getCommandTemplatesForFiletype(lightningTestFileSuffix, 'lightningtest'),
|
|
62
|
+
}),
|
|
63
|
+
'output-dir': flags_1.outputDirFlagLightning,
|
|
64
|
+
internal: flags_1.internalFlag,
|
|
65
|
+
'api-version': sf_plugins_core_1.orgApiVersionFlagWithDeprecations,
|
|
66
|
+
loglevel: sf_plugins_core_1.loglevel,
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../../src/commands/lightning/generate/test.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH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AG,CAAC,6BAA6B,CAAC,CAAC;AAC1C,8BAAgB,GAAG,IAAI,CAAC;AACxB,mBAAK,GAAG;IAC7B,IAAI,EAAE,uBAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,iBAAiB,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC,MAAM,CAAC,CAAC;QAC7D,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAAC;QAC1D,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,CAAC,UAAU,CAAC;QACrB,gBAAgB,EAAE,IAAI;KACvB,CAAC;IACF,QAAQ,EAAE,uBAAK,CAAC,MAAM,CAAC;QACrB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,iBAAiB,CAAC,UAAU,CAAC,gBAAgB,CAAC;QACvD,WAAW,EAAE,iBAAiB,CAAC,UAAU,CAAC,4BAA4B,CAAC;QACvE,OAAO,EAAE,sBAAsB;QAC/B,OAAO,EAAE,kBAAU,CAAC,8BAA8B,CAAC,uBAAuB,EAAE,eAAe,CAAC;KAC7F,CAAC;IACF,YAAY,EAAE,8BAAsB;IACpC,QAAQ,EAAE,oBAAY;IACtB,aAAa,EAAE,mDAAiC;IAChD,QAAQ,EAAR,0BAAQ;CACT,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { CreateOutput } from '@salesforce/templates';
|
|
3
|
+
export default class Project extends SfCommand<CreateOutput> {
|
|
4
|
+
static readonly summary: string;
|
|
5
|
+
static readonly description: string;
|
|
6
|
+
static readonly examples: string[];
|
|
7
|
+
static readonly aliases: string[];
|
|
8
|
+
static readonly deprecateAliases = true;
|
|
9
|
+
static readonly flags: {
|
|
10
|
+
name: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
+
template: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
|
+
'output-dir': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
13
|
+
namespace: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
14
|
+
'default-package-dir': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
15
|
+
manifest: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
'login-url': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
17
|
+
loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
18
|
+
};
|
|
19
|
+
run(): Promise<CreateOutput>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
/*
|
|
5
|
+
* Copyright (c) 2019, salesforce.com, inc.
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
* Licensed under the BSD 3-Clause license.
|
|
8
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
|
+
*/
|
|
10
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
11
|
+
const projectGenerator_1 = require("@salesforce/templates/lib/generators/projectGenerator");
|
|
12
|
+
const core_1 = require("@salesforce/core");
|
|
13
|
+
const templateCommand_1 = require("../../utils/templateCommand");
|
|
14
|
+
const flags_1 = require("../../utils/flags");
|
|
15
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
16
|
+
const messages = core_1.Messages.loadMessages('@salesforce/plugin-templates', 'project');
|
|
17
|
+
class Project extends sf_plugins_core_1.SfCommand {
|
|
18
|
+
run() {
|
|
19
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
const { flags } = yield this.parse(Project);
|
|
21
|
+
flags.ns = flags.namespace;
|
|
22
|
+
const flagsAsOptions = {
|
|
23
|
+
projectname: flags.name,
|
|
24
|
+
outputdir: flags['output-dir'],
|
|
25
|
+
manifest: flags.manifest,
|
|
26
|
+
loginurl: flags['login-url'],
|
|
27
|
+
template: flags.template,
|
|
28
|
+
// namespace is a reserved keyword for the generator
|
|
29
|
+
ns: flags.namespace,
|
|
30
|
+
defaultpackagedir: flags['default-package-dir'],
|
|
31
|
+
};
|
|
32
|
+
return (0, templateCommand_1.runGenerator)({
|
|
33
|
+
generator: projectGenerator_1.default,
|
|
34
|
+
opts: flagsAsOptions,
|
|
35
|
+
ux: new sf_plugins_core_1.Ux({ jsonEnabled: this.jsonEnabled() }),
|
|
36
|
+
templates: (0, templateCommand_1.getCustomTemplates)(this.configAggregator),
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.default = Project;
|
|
42
|
+
Project.summary = messages.getMessage('summary');
|
|
43
|
+
Project.description = messages.getMessage('description');
|
|
44
|
+
Project.examples = messages.getMessages('examples');
|
|
45
|
+
Project.aliases = ['force:project:create'];
|
|
46
|
+
Project.deprecateAliases = true;
|
|
47
|
+
Project.flags = {
|
|
48
|
+
name: sf_plugins_core_1.Flags.string({
|
|
49
|
+
char: 'n',
|
|
50
|
+
summary: messages.getMessage('flags.name'),
|
|
51
|
+
description: messages.getMessage('flags.name.description'),
|
|
52
|
+
required: true,
|
|
53
|
+
aliases: ['projectname'],
|
|
54
|
+
deprecateAliases: true,
|
|
55
|
+
}),
|
|
56
|
+
template: sf_plugins_core_1.Flags.string({
|
|
57
|
+
char: 't',
|
|
58
|
+
summary: messages.getMessage('flags.template'),
|
|
59
|
+
description: messages.getMessage('flags.template.description'),
|
|
60
|
+
default: 'standard',
|
|
61
|
+
options: ['standard', 'empty', 'analytics'],
|
|
62
|
+
}),
|
|
63
|
+
'output-dir': flags_1.outputDirFlag,
|
|
64
|
+
namespace: sf_plugins_core_1.Flags.string({
|
|
65
|
+
char: 's',
|
|
66
|
+
summary: messages.getMessage('flags.namespace'),
|
|
67
|
+
default: '',
|
|
68
|
+
}),
|
|
69
|
+
'default-package-dir': sf_plugins_core_1.Flags.string({
|
|
70
|
+
char: 'p',
|
|
71
|
+
summary: messages.getMessage('flags.packagedir'),
|
|
72
|
+
description: messages.getMessage('flags.packagedir.description'),
|
|
73
|
+
default: 'force-app',
|
|
74
|
+
aliases: ['defaultpackagedir'],
|
|
75
|
+
deprecateAliases: true,
|
|
76
|
+
}),
|
|
77
|
+
manifest: sf_plugins_core_1.Flags.boolean({
|
|
78
|
+
char: 'x',
|
|
79
|
+
summary: messages.getMessage('flags.manifest'),
|
|
80
|
+
description: messages.getMessage('flags.manifest.description'),
|
|
81
|
+
}),
|
|
82
|
+
'login-url': sf_plugins_core_1.Flags.string({
|
|
83
|
+
char: 'l',
|
|
84
|
+
summary: messages.getMessage('flags.loginurl'),
|
|
85
|
+
description: messages.getMessage('flags.loginurl.description'),
|
|
86
|
+
default: 'https://login.salesforce.com',
|
|
87
|
+
hidden: true,
|
|
88
|
+
aliases: ['loginurl'],
|
|
89
|
+
deprecateAliases: true,
|
|
90
|
+
}),
|
|
91
|
+
loglevel: sf_plugins_core_1.loglevel,
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=generate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/commands/project/generate.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,iEAA6E;AAE7E,4FAAqF;AACrF,2CAA4C;AAC5C,iEAA+E;AAC/E,6CAAkD;AAElD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,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E,QAAQ,CAAC,UAAU,CAAC,gBAAgB,CAAC;QAC9C,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,4BAA4B,CAAC;QAC9D,OAAO,EAAE,8BAA8B;QACvC,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,CAAC,UAAU,CAAC;QACrB,gBAAgB,EAAE,IAAI;KACvB,CAAC;IACF,QAAQ,EAAR,0BAAQ;CACT,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { CreateOutput } from '@salesforce/templates';
|
|
3
|
+
export default class StaticResource extends SfCommand<CreateOutput> {
|
|
4
|
+
static readonly summary: string;
|
|
5
|
+
static readonly description: string;
|
|
6
|
+
static readonly examples: string[];
|
|
7
|
+
static readonly aliases: string[];
|
|
8
|
+
static readonly deprecateAliases = true;
|
|
9
|
+
static readonly flags: {
|
|
10
|
+
name: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
+
type: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
|
+
'output-dir': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
13
|
+
'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
14
|
+
loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
15
|
+
};
|
|
16
|
+
run(): Promise<CreateOutput>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
/*
|
|
5
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
* Licensed under the BSD 3-Clause license.
|
|
8
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
|
+
*/
|
|
10
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
11
|
+
const staticResourceGenerator_1 = require("@salesforce/templates/lib/generators/staticResourceGenerator");
|
|
12
|
+
const core_1 = require("@salesforce/core");
|
|
13
|
+
const flags_1 = require("../../utils/flags");
|
|
14
|
+
const templateCommand_1 = require("../../utils/templateCommand");
|
|
15
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
16
|
+
const messages = core_1.Messages.loadMessages('@salesforce/plugin-templates', 'staticResource');
|
|
17
|
+
class StaticResource extends sf_plugins_core_1.SfCommand {
|
|
18
|
+
run() {
|
|
19
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
const { flags } = yield this.parse(StaticResource);
|
|
21
|
+
// translate the new flags to the old ones the generator expects
|
|
22
|
+
const flagsAsOptions = {
|
|
23
|
+
resourcename: flags.name,
|
|
24
|
+
contenttype: flags.type,
|
|
25
|
+
template: 'empty',
|
|
26
|
+
outputdir: flags['output-dir'],
|
|
27
|
+
apiversion: flags['api-version'],
|
|
28
|
+
};
|
|
29
|
+
return (0, templateCommand_1.runGenerator)({
|
|
30
|
+
generator: staticResourceGenerator_1.default,
|
|
31
|
+
opts: flagsAsOptions,
|
|
32
|
+
ux: new sf_plugins_core_1.Ux({ jsonEnabled: this.jsonEnabled() }),
|
|
33
|
+
templates: (0, templateCommand_1.getCustomTemplates)(this.configAggregator),
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.default = StaticResource;
|
|
39
|
+
StaticResource.summary = messages.getMessage('summary');
|
|
40
|
+
StaticResource.description = messages.getMessage('description');
|
|
41
|
+
StaticResource.examples = messages.getMessages('examples');
|
|
42
|
+
StaticResource.aliases = ['force:staticresource:create'];
|
|
43
|
+
StaticResource.deprecateAliases = true;
|
|
44
|
+
StaticResource.flags = {
|
|
45
|
+
name: sf_plugins_core_1.Flags.string({
|
|
46
|
+
char: 'n',
|
|
47
|
+
summary: messages.getMessage('flags.name.summary'),
|
|
48
|
+
description: messages.getMessage('flags.name.description'),
|
|
49
|
+
required: true,
|
|
50
|
+
aliases: ['resourcename'],
|
|
51
|
+
deprecateAliases: true,
|
|
52
|
+
}),
|
|
53
|
+
type: sf_plugins_core_1.Flags.string({
|
|
54
|
+
summary: messages.getMessage('flags.type.summary'),
|
|
55
|
+
description: messages.getMessage('flags.type.description'),
|
|
56
|
+
default: 'application/zip',
|
|
57
|
+
aliases: ['contenttype'],
|
|
58
|
+
deprecateAliases: true,
|
|
59
|
+
}),
|
|
60
|
+
'output-dir': flags_1.outputDirFlag,
|
|
61
|
+
'api-version': sf_plugins_core_1.orgApiVersionFlagWithDeprecations,
|
|
62
|
+
loglevel: sf_plugins_core_1.loglevel,
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=generate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/commands/static-resource/generate.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,iEAAgH;AAEhH,0GAAmG;AACnG,2CAA4C;AAC5C,6CAAkD;AAClD,iEAA+E;AAE/E,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,gBAAgB,CAAC,CAAC;AACzF,MAAqB,cAAe,SAAQ,2BAAuB;IA2BpD,GAAG;;YACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;YACnD,gEAAgE;YAChE,MAAM,cAAc,GAA0B;gBAC5C,YAAY,EAAE,KAAK,CAAC,IAAI;gBACxB,WAAW,EAAE,K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AC;QACxB,gBAAgB,EAAE,IAAI;KACvB,CAAC;IACF,YAAY,EAAE,qBAAa;IAC3B,aAAa,EAAE,mDAAiC;IAChD,QAAQ,EAAR,0BAAQ;CACT,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { CreateOutput } from '@salesforce/templates';
|
|
3
|
+
export default class VisualforceComponent extends SfCommand<CreateOutput> {
|
|
4
|
+
static readonly summary: string;
|
|
5
|
+
static readonly description: string;
|
|
6
|
+
static readonly examples: string[];
|
|
7
|
+
static readonly aliases: string[];
|
|
8
|
+
static readonly deprecateAliases = true;
|
|
9
|
+
static readonly flags: {
|
|
10
|
+
name: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
+
template: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
|
+
'output-dir': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
13
|
+
'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
14
|
+
label: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
15
|
+
loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
16
|
+
};
|
|
17
|
+
run(): Promise<CreateOutput>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
/*
|
|
5
|
+
* Copyright (c) 2019, salesforce.com, inc.
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
* Licensed under the BSD 3-Clause license.
|
|
8
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
|
+
*/
|
|
10
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
11
|
+
const visualforceComponentGenerator_1 = require("@salesforce/templates/lib/generators/visualforceComponentGenerator");
|
|
12
|
+
const utils_1 = require("@salesforce/templates/lib/utils");
|
|
13
|
+
const core_1 = require("@salesforce/core");
|
|
14
|
+
const flags_1 = require("../../../utils/flags");
|
|
15
|
+
const templateCommand_1 = require("../../../utils/templateCommand");
|
|
16
|
+
const visualforceComponentFileSuffix = /.component$/;
|
|
17
|
+
const VF_TYPE = 'Component';
|
|
18
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
19
|
+
const commonMessages = core_1.Messages.loadMessages('@salesforce/plugin-templates', 'messages');
|
|
20
|
+
const messages = core_1.Messages.loadMessages('@salesforce/plugin-templates', 'vf');
|
|
21
|
+
class VisualforceComponent extends sf_plugins_core_1.SfCommand {
|
|
22
|
+
run() {
|
|
23
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const { flags } = yield this.parse(VisualforceComponent);
|
|
25
|
+
// translate the new flags to the old ones the generator expects
|
|
26
|
+
const flagsAsOptions = {
|
|
27
|
+
componentname: flags.name,
|
|
28
|
+
label: flags.label,
|
|
29
|
+
template: 'DefaultVFComponent',
|
|
30
|
+
outputdir: flags['output-dir'],
|
|
31
|
+
apiversion: flags['api-version'],
|
|
32
|
+
};
|
|
33
|
+
return (0, templateCommand_1.runGenerator)({
|
|
34
|
+
generator: visualforceComponentGenerator_1.default,
|
|
35
|
+
opts: flagsAsOptions,
|
|
36
|
+
ux: new sf_plugins_core_1.Ux({ jsonEnabled: this.jsonEnabled() }),
|
|
37
|
+
templates: (0, templateCommand_1.getCustomTemplates)(this.configAggregator),
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.default = VisualforceComponent;
|
|
43
|
+
VisualforceComponent.summary = messages.getMessage('summary', [VF_TYPE]);
|
|
44
|
+
VisualforceComponent.description = messages.getMessage('description', [VF_TYPE]);
|
|
45
|
+
VisualforceComponent.examples = messages.getMessages('examples.component');
|
|
46
|
+
VisualforceComponent.aliases = ['force:visualforce:component:create'];
|
|
47
|
+
VisualforceComponent.deprecateAliases = true;
|
|
48
|
+
VisualforceComponent.flags = {
|
|
49
|
+
name: sf_plugins_core_1.Flags.string({
|
|
50
|
+
char: 'n',
|
|
51
|
+
summary: messages.getMessage('flags.name', [VF_TYPE]),
|
|
52
|
+
description: messages.getMessage('flags.name.description'),
|
|
53
|
+
required: true,
|
|
54
|
+
aliases: ['componentname'],
|
|
55
|
+
deprecateAliases: true,
|
|
56
|
+
}),
|
|
57
|
+
template: sf_plugins_core_1.Flags.string({
|
|
58
|
+
char: 't',
|
|
59
|
+
summary: commonMessages.getMessage('flags.template'),
|
|
60
|
+
description: commonMessages.getMessage('flags.template.description'),
|
|
61
|
+
default: 'DefaultVFComponent',
|
|
62
|
+
options: utils_1.CreateUtil.getCommandTemplatesForFiletype(visualforceComponentFileSuffix, 'visualforcecomponent'),
|
|
63
|
+
}),
|
|
64
|
+
'output-dir': flags_1.outputDirFlag,
|
|
65
|
+
'api-version': sf_plugins_core_1.orgApiVersionFlagWithDeprecations,
|
|
66
|
+
label: sf_plugins_core_1.Flags.string({
|
|
67
|
+
char: 'l',
|
|
68
|
+
summary: messages.getMessage('flags.label', [VF_TYPE]),
|
|
69
|
+
required: true,
|
|
70
|
+
}),
|
|
71
|
+
loglevel: sf_plugins_core_1.loglevel,
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/commands/visualforce/generate/component.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,iEAAgH;AAEhH,sHAA+G;AAC/G,2DAA6D;AAC7D,2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,oBAAoB,CAAC,CAAC;AACtD,4BAAO,GAAG,CAAC,oCAAoC,CAAC,CAAC;AACjD,qCAAgB,GAAG,IAAI,CAAC;AACxB,0BAAK,GAAG;IAC7B,IAAI,EAAE,uBAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC,OAAO,CAAC,CAAC;QACrD,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAAC;QAC1D,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,CAAC,eAAe,CAAC;QAC1B,gBAAgB,EAAE,IAAI;KACvB,CAAC;IACF,QAAQ,EAAE,uBAAK,CAAC,MAAM,CAAC;QACrB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,cAAc,CAAC,UAAU,CAAC,gBAAgB,CAAC;QACpD,WAAW,EAAE,cAAc,CAAC,UAAU,CAAC,4BAA4B,CAAC;QACpE,OAAO,EAAE,oBAAoB;QAC7B,OAAO,EAAE,kBAAU,CAAC,8BAA8B,CAAC,8BAA8B,EAAE,sBAAsB,CAAC;KAC3G,CAAC;IACF,YAAY,EAAE,qBAAa;IAC3B,aAAa,EAAE,mDAAiC;IAChD,KAAK,EAAE,uBAAK,CAAC,MAAM,CAAC;QAClB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,CAAC;QACtD,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,QAAQ,EAAR,0BAAQ;CACT,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { CreateOutput } from '@salesforce/templates';
|
|
3
|
+
export default class VisualforcePage extends SfCommand<CreateOutput> {
|
|
4
|
+
static readonly summary: string;
|
|
5
|
+
static readonly description: string;
|
|
6
|
+
static readonly examples: string[];
|
|
7
|
+
static readonly aliases: string[];
|
|
8
|
+
static readonly deprecateAliases = true;
|
|
9
|
+
static readonly flags: {
|
|
10
|
+
name: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
+
template: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
|
+
'output-dir': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
13
|
+
'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
14
|
+
label: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
15
|
+
loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
16
|
+
};
|
|
17
|
+
run(): Promise<CreateOutput>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
/*
|
|
5
|
+
* Copyright (c) 2019, salesforce.com, inc.
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
* Licensed under the BSD 3-Clause license.
|
|
8
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
|
+
*/
|
|
10
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
11
|
+
const visualforcePageGenerator_1 = require("@salesforce/templates/lib/generators/visualforcePageGenerator");
|
|
12
|
+
const templates_1 = require("@salesforce/templates");
|
|
13
|
+
const core_1 = require("@salesforce/core");
|
|
14
|
+
const templateCommand_1 = require("../../../utils/templateCommand");
|
|
15
|
+
const flags_1 = require("../../../utils/flags");
|
|
16
|
+
const visualforcePageFileSuffix = /.page$/;
|
|
17
|
+
const VF_TYPE = 'Page';
|
|
18
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
19
|
+
const commonMessages = core_1.Messages.loadMessages('@salesforce/plugin-templates', 'messages');
|
|
20
|
+
const messages = core_1.Messages.loadMessages('@salesforce/plugin-templates', 'vf');
|
|
21
|
+
class VisualforcePage extends sf_plugins_core_1.SfCommand {
|
|
22
|
+
run() {
|
|
23
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const { flags } = yield this.parse(VisualforcePage);
|
|
25
|
+
// translate the new flags to the old ones the generator expects
|
|
26
|
+
const flagsAsOptions = {
|
|
27
|
+
pagename: flags.name,
|
|
28
|
+
label: flags.label,
|
|
29
|
+
template: 'DefaultVFPage',
|
|
30
|
+
outputdir: flags['output-dir'],
|
|
31
|
+
apiversion: flags['api-version'],
|
|
32
|
+
};
|
|
33
|
+
return (0, templateCommand_1.runGenerator)({
|
|
34
|
+
generator: visualforcePageGenerator_1.default,
|
|
35
|
+
opts: flagsAsOptions,
|
|
36
|
+
ux: new sf_plugins_core_1.Ux({ jsonEnabled: this.jsonEnabled() }),
|
|
37
|
+
templates: (0, templateCommand_1.getCustomTemplates)(this.configAggregator),
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.default = VisualforcePage;
|
|
43
|
+
VisualforcePage.summary = messages.getMessage('summary', [VF_TYPE]);
|
|
44
|
+
VisualforcePage.description = messages.getMessage('description', [VF_TYPE]);
|
|
45
|
+
VisualforcePage.examples = messages.getMessages('examples.page');
|
|
46
|
+
VisualforcePage.aliases = ['force:visualforce:page:create'];
|
|
47
|
+
VisualforcePage.deprecateAliases = true;
|
|
48
|
+
VisualforcePage.flags = {
|
|
49
|
+
name: sf_plugins_core_1.Flags.string({
|
|
50
|
+
char: 'n',
|
|
51
|
+
summary: messages.getMessage('flags.name', [VF_TYPE]),
|
|
52
|
+
description: messages.getMessage('flags.name.description'),
|
|
53
|
+
required: true,
|
|
54
|
+
aliases: ['pagename'],
|
|
55
|
+
deprecateAliases: true,
|
|
56
|
+
}),
|
|
57
|
+
// there is only one valid template in the interface for VisualforcePageOptions
|
|
58
|
+
template: sf_plugins_core_1.Flags.string({
|
|
59
|
+
char: 't',
|
|
60
|
+
summary: commonMessages.getMessage('flags.template'),
|
|
61
|
+
description: commonMessages.getMessage('flags.template.description'),
|
|
62
|
+
default: 'DefaultVFPage',
|
|
63
|
+
hidden: true,
|
|
64
|
+
options: templates_1.CreateUtil.getCommandTemplatesForFiletype(visualforcePageFileSuffix, 'visualforcepage'),
|
|
65
|
+
}),
|
|
66
|
+
'output-dir': flags_1.outputDirFlag,
|
|
67
|
+
'api-version': sf_plugins_core_1.orgApiVersionFlagWithDeprecations,
|
|
68
|
+
label: sf_plugins_core_1.Flags.string({
|
|
69
|
+
char: 'l',
|
|
70
|
+
summary: messages.getMessage('flags.label', [VF_TYPE]),
|
|
71
|
+
required: true,
|
|
72
|
+
}),
|
|
73
|
+
loglevel: sf_plugins_core_1.loglevel,
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../../src/commands/visualforce/generate/page.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,iEAAgH;AAChH,4GAAqG;AACrG,qDAAyF;AACzF,2CAA4C;AAC5C,oEAAkF;AAClF,gDAAqD;AACrD,MAAM,yBAAyB,GAAG,QAAQ,CAAC;AAC3C,MAAM,OAAO,GAAG,MAAM,CAAC;AAEvB,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,cAAc,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,UAAU,CAAC,CAAC;AACzF,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,IAAI,CAAC,CAAC;AAC7E,MAAqB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QACd,OAAO,EAAE,CAAC,UAAU,CAAC;QACrB,gBAAgB,EAAE,IAAI;KACvB,CAAC;IACF,+EAA+E;IAC/E,QAAQ,EAAE,uBAAK,CAAC,MAAM,CAAC;QACrB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,cAAc,CAAC,UAAU,CAAC,gBAAgB,CAAC;QACpD,WAAW,EAAE,cAAc,CAAC,UAAU,CAAC,4BAA4B,CAAC;QACpE,OAAO,EAAE,eAAe;QACxB,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,sBAAU,CAAC,8BAA8B,CAAC,yBAAyB,EAAE,iBAAiB,CAAC;KACjG,CAAC;IACF,YAAY,EAAE,qBAAa;IAE3B,aAAa,EAAE,mDAAiC;IAChD,KAAK,EAAE,uBAAK,CAAC,MAAM,CAAC;QAClB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,CAAC;QACtD,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,QAAQ,EAAR,0BAAQ;CACT,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const outputDirFlag: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
2
|
+
export declare const outputDirFlagLightning: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
3
|
+
export declare const internalFlag: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.internalFlag = exports.outputDirFlagLightning = exports.outputDirFlag = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* Copyright (c) 2022, salesforce.com, inc.
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
* Licensed under the BSD 3-Clause license.
|
|
8
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
|
+
*/
|
|
10
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
11
|
+
const core_1 = require("@salesforce/core");
|
|
12
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
13
|
+
const messages = core_1.Messages.loadMessages('@salesforce/plugin-templates', 'messages');
|
|
14
|
+
const lightningMessages = core_1.Messages.loadMessages('@salesforce/plugin-templates', 'lightning');
|
|
15
|
+
exports.outputDirFlag = sf_plugins_core_1.Flags.string({
|
|
16
|
+
char: 'd',
|
|
17
|
+
summary: messages.getMessage('flags.outputdir'),
|
|
18
|
+
description: messages.getMessage('flags.outputdir.description'),
|
|
19
|
+
default: '.',
|
|
20
|
+
deprecateAliases: true,
|
|
21
|
+
aliases: ['outputdir'],
|
|
22
|
+
});
|
|
23
|
+
exports.outputDirFlagLightning = sf_plugins_core_1.Flags.string({
|
|
24
|
+
char: 'd',
|
|
25
|
+
summary: messages.getMessage('flags.outputdir'),
|
|
26
|
+
description: messages.getMessage('flags.outputdir.description'),
|
|
27
|
+
default: '.',
|
|
28
|
+
deprecateAliases: true,
|
|
29
|
+
aliases: ['outputdir'],
|
|
30
|
+
});
|
|
31
|
+
exports.internalFlag = sf_plugins_core_1.Flags.boolean({
|
|
32
|
+
char: 'i',
|
|
33
|
+
summary: lightningMessages.getMessage('flags.internal'),
|
|
34
|
+
hidden: true,
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=flags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flags.js","sourceRoot":"","sources":["../../src/utils/flags.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,iEAAoD;AACpD,2CAA4C;AAC5C,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,UAAU,CAAC,CAAC;AACnF,MAAM,iBAAiB,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,WAAW,CAAC,CAAC;AAEhF,QAAA,aAAa,GAAG,uBAAK,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC;IAC/C,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,6BAA6B,CAAC;IAC/D,OAAO,EAAE,GAAG;IACZ,gBAAgB,EAAE,IAAI;IACtB,OAAO,EAAE,CAAC,WAAW,CAAC;CACvB,CAAC,CAAC;AAEU,QAAA,sBAAsB,GAAG,uBAAK,CAAC,MAAM,CAAC;IACjD,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC;IAC/C,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,6BAA6B,CAAC;IAC/D,OAAO,EAAE,GAAG;IACZ,gBAAgB,EAAE,IAAI;IACtB,OAAO,EAAE,CAAC,WAAW,CAAC;CACvB,CAAC,CAAC;AAEU,QAAA,YAAY,GAAG,uBAAK,CAAC,OAAO,CAAC;IACxC,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,iBAAiB,CAAC,UAAU,CAAC,gBAAgB,CAAC;IACvD,MAAM,EAAE,IAAI;CACb,CAAC,CAAC"}
|