@salesforce/templates 57.1.0 → 57.1.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/lib/generators/analyticsTemplateGenerator.js +11 -11
- package/lib/generators/analyticsTemplateGenerator.js.map +1 -1
- package/lib/generators/apexClassGenerator.js +3 -3
- package/lib/generators/apexClassGenerator.js.map +1 -1
- package/lib/generators/apexTriggerGenerator.js +3 -3
- package/lib/generators/apexTriggerGenerator.js.map +1 -1
- package/lib/generators/lightningAppGenerator.js +11 -11
- package/lib/generators/lightningAppGenerator.js.map +1 -1
- package/lib/generators/lightningComponentGenerator.js +16 -16
- package/lib/generators/lightningComponentGenerator.js.map +1 -1
- package/lib/generators/lightningEventGenerator.js +5 -5
- package/lib/generators/lightningEventGenerator.js.map +1 -1
- package/lib/generators/lightningInterfaceGenerator.js +5 -5
- package/lib/generators/lightningInterfaceGenerator.js.map +1 -1
- package/lib/generators/lightningTestGenerator.js +3 -3
- package/lib/generators/lightningTestGenerator.js.map +1 -1
- package/lib/generators/projectGenerator.js +17 -17
- package/lib/generators/projectGenerator.js.map +1 -1
- package/lib/generators/sfdxGenerator.d.ts +3 -4
- package/lib/generators/sfdxGenerator.js +3 -3
- package/lib/generators/sfdxGenerator.js.map +1 -1
- package/lib/generators/staticResourceGenerator.js +5 -5
- package/lib/generators/staticResourceGenerator.js.map +1 -1
- package/lib/generators/visualforceComponentGenerator.js +3 -3
- package/lib/generators/visualforceComponentGenerator.js.map +1 -1
- package/lib/generators/visualforcePageGenerator.js +3 -3
- package/lib/generators/visualforcePageGenerator.js.map +1 -1
- package/lib/templates/analytics/waveTemplates/DefaultAnalyticsTemplate/dashboards/basicDashboard.json +22 -6
- package/lib/templates/analytics/waveTemplates/DefaultAnalyticsTemplate/template-info.json +1 -1
- package/package.json +4 -4
|
@@ -17,25 +17,25 @@ class AnalyticsTemplateGenerator extends sfdxGenerator_1.SfdxGenerator {
|
|
|
17
17
|
}
|
|
18
18
|
validateOptions() {
|
|
19
19
|
utils_1.CreateUtil.checkInputs(this.options.templatename);
|
|
20
|
-
const fileparts = path.resolve(this.
|
|
20
|
+
const fileparts = path.resolve(this.outputdir).split(path.sep);
|
|
21
21
|
if (!fileparts.includes('waveTemplates')) {
|
|
22
22
|
throw new Error(i18n_1.nls.localize('MissingWaveTemplatesDir'));
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
writing() {
|
|
26
|
-
const {
|
|
26
|
+
const { templatename } = this.options;
|
|
27
27
|
// tslint:disable-next-line:no-unused-expression
|
|
28
|
-
this.fs.copyTpl(this.templatePath(path.join('DefaultAnalyticsTemplate', 'dashboards', 'basicDashboard.json')), this.destinationPath(path.join(outputdir, templatename, 'dashboards', templatename + 'Dashboard.json')), { templateName: templatename });
|
|
29
|
-
this.fs.copyTpl(this.templatePath(path.join('DefaultAnalyticsTemplate', 'app-to-template-rules.json')), this.destinationPath(path.join(outputdir, templatename, 'app-to-template-rules.json')), {});
|
|
30
|
-
this.fs.copyTpl(this.templatePath(path.join('DefaultAnalyticsTemplate', 'folder.json')), this.destinationPath(path.join(outputdir, templatename, 'folder.json')), { templateName: templatename });
|
|
31
|
-
this.fs.copyTpl(this.templatePath(path.join('DefaultAnalyticsTemplate', 'releaseNotes.html')), this.destinationPath(path.join(outputdir, templatename, 'releaseNotes.html')), {});
|
|
32
|
-
this.fs.copyTpl(this.templatePath(path.join('DefaultAnalyticsTemplate', 'template-info.json')), this.destinationPath(path.join(outputdir, templatename, 'template-info.json')), {
|
|
28
|
+
this.fs.copyTpl(this.templatePath(path.join('DefaultAnalyticsTemplate', 'dashboards', 'basicDashboard.json')), this.destinationPath(path.join(this.outputdir, templatename, 'dashboards', templatename + 'Dashboard.json')), { templateName: templatename });
|
|
29
|
+
this.fs.copyTpl(this.templatePath(path.join('DefaultAnalyticsTemplate', 'app-to-template-rules.json')), this.destinationPath(path.join(this.outputdir, templatename, 'app-to-template-rules.json')), {});
|
|
30
|
+
this.fs.copyTpl(this.templatePath(path.join('DefaultAnalyticsTemplate', 'folder.json')), this.destinationPath(path.join(this.outputdir, templatename, 'folder.json')), { templateName: templatename });
|
|
31
|
+
this.fs.copyTpl(this.templatePath(path.join('DefaultAnalyticsTemplate', 'releaseNotes.html')), this.destinationPath(path.join(this.outputdir, templatename, 'releaseNotes.html')), {});
|
|
32
|
+
this.fs.copyTpl(this.templatePath(path.join('DefaultAnalyticsTemplate', 'template-info.json')), this.destinationPath(path.join(this.outputdir, templatename, 'template-info.json')), {
|
|
33
33
|
templateName: templatename,
|
|
34
|
-
sourceApiVersion: apiversion,
|
|
34
|
+
sourceApiVersion: this.apiversion,
|
|
35
35
|
});
|
|
36
|
-
this.fs.copyTpl(this.templatePath(path.join('DefaultAnalyticsTemplate', 'template-to-app-rules.json')), this.destinationPath(path.join(outputdir, templatename, 'template-to-app-rules.json')), {});
|
|
37
|
-
this.fs.copyTpl(this.templatePath(path.join('DefaultAnalyticsTemplate', 'ui.json')), this.destinationPath(path.join(outputdir, templatename, 'ui.json')), {});
|
|
38
|
-
this.fs.copyTpl(this.templatePath(path.join('DefaultAnalyticsTemplate', 'variables.json')), this.destinationPath(path.join(outputdir, templatename, 'variables.json')), {});
|
|
36
|
+
this.fs.copyTpl(this.templatePath(path.join('DefaultAnalyticsTemplate', 'template-to-app-rules.json')), this.destinationPath(path.join(this.outputdir, templatename, 'template-to-app-rules.json')), {});
|
|
37
|
+
this.fs.copyTpl(this.templatePath(path.join('DefaultAnalyticsTemplate', 'ui.json')), this.destinationPath(path.join(this.outputdir, templatename, 'ui.json')), {});
|
|
38
|
+
this.fs.copyTpl(this.templatePath(path.join('DefaultAnalyticsTemplate', 'variables.json')), this.destinationPath(path.join(this.outputdir, templatename, 'variables.json')), {});
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
exports.default = AnalyticsTemplateGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyticsTemplateGenerator.js","sourceRoot":"","sources":["../../src/generators/analyticsTemplateGenerator.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,kCAA8B;AAC9B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,0BAA2B,SAAQ,6BAAuC;IAC7F,YAAY,IAAuB,EAAE,OAAiC;QACpE,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC,CAAC;IAC1E,CAAC;IAEM,eAAe;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAElD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"analyticsTemplateGenerator.js","sourceRoot":"","sources":["../../src/generators/analyticsTemplateGenerator.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,kCAA8B;AAC9B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,0BAA2B,SAAQ,6BAAuC;IAC7F,YAAY,IAAuB,EAAE,OAAiC;QACpE,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC,CAAC;IAC1E,CAAC;IAEM,eAAe;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAElD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/D,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE;YACxC,MAAM,IAAI,KAAK,CAAC,UAAG,CAAC,QAAQ,CAAC,yBAAyB,CAAC,C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E,CAAC,OAAO,CACb,IAAI,CAAC,YAAY,CACf,IAAI,CAAC,IAAI,CAAC,0BAA0B,EAAE,oBAAoB,CAAC,CAC5D,EACD,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAC9D,EACD;YACE,YAAY,EAAE,YAAY;YAC1B,gBAAgB,EAAE,IAAI,CAAC,UAAU;SAClC,CACF,CAAC;QACF,IAAI,CAAC,EAAE,CAAC,OAAO,CACb,IAAI,CAAC,YAAY,CACf,IAAI,CAAC,IAAI,CAAC,0BAA0B,EAAE,4BAA4B,CAAC,CACpE,EACD,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,EAAE,4BAA4B,CAAC,CACtE,EACD,EAAE,CACH,CAAC;QACF,IAAI,CAAC,EAAE,CAAC,OAAO,CACb,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,0BAA0B,EAAE,SAAS,CAAC,CAAC,EACnE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC,EACxE,EAAE,CACH,CAAC;QACF,IAAI,CAAC,EAAE,CAAC,OAAO,CACb,IAAI,CAAC,YAAY,CACf,IAAI,CAAC,IAAI,CAAC,0BAA0B,EAAE,gBAAgB,CAAC,CACxD,EACD,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,EAAE,gBAAgB,CAAC,CAC1D,EACD,EAAE,CACH,CAAC;IACJ,CAAC;CACF;AAjGD,6CAiGC"}
|
|
@@ -19,9 +19,9 @@ class ApexClassGenerator extends sfdxGenerator_1.SfdxGenerator {
|
|
|
19
19
|
utils_1.CreateUtil.checkInputs(this.options.classname);
|
|
20
20
|
}
|
|
21
21
|
writing() {
|
|
22
|
-
const { template,
|
|
23
|
-
this.fs.copyTpl(this.templatePath(`${template}.cls`), this.destinationPath(path.join(outputdir, `${classname}.cls`)), { apiName: classname }),
|
|
24
|
-
this.fs.copyTpl(this.templatePath('_class.cls-meta.xml'), this.destinationPath(path.join(outputdir, `${classname}.cls-meta.xml`)), { apiName: classname, apiVersion: apiversion });
|
|
22
|
+
const { template, classname } = this.options;
|
|
23
|
+
this.fs.copyTpl(this.templatePath(`${template}.cls`), this.destinationPath(path.join(this.outputdir, `${classname}.cls`)), { apiName: classname }),
|
|
24
|
+
this.fs.copyTpl(this.templatePath('_class.cls-meta.xml'), this.destinationPath(path.join(this.outputdir, `${classname}.cls-meta.xml`)), { apiName: classname, apiVersion: this.apiversion });
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
exports.default = ApexClassGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apexClassGenerator.js","sourceRoot":"","sources":["../../src/generators/apexClassGenerator.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,kBAAmB,SAAQ,6BAA+B;IAC7E,YAAY,IAAuB,EAAE,OAAyB;QAC5D,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,yBAAyB,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;IAEM,eAAe;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC9C,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACjD,CAAC;IAEM,OAAO;QACZ,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"apexClassGenerator.js","sourceRoot":"","sources":["../../src/generators/apexClassGenerator.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,kBAAmB,SAAQ,6BAA+B;IAC7E,YAAY,IAAuB,EAAE,OAAyB;QAC5D,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,yBAAyB,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;IAEM,eAAe;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC9C,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACjD,CAAC;IAEM,OAAO;QACZ,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7C,IAAI,CAAC,EAAE,CAAC,OAAO,CACb,IAAI,CAAC,YAAY,CAAC,GAAG,QAAQ,MAAM,CAAC,EACpC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,SAAS,MAAM,CAAC,CAAC,EACnE,EAAE,OAAO,EAAE,SAAS,EAAE,CACvB;YACC,IAAI,CAAC,EAAE,CAAC,OAAO,CACb,IAAI,CAAC,YAAY,CAAC,qBAAqB,CAAC,EACxC,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,SAAS,eAAe,CAAC,CACvD,EACD,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CACpD,CAAC;IACN,CAAC;CACF;AA1BD,qCA0BC"}
|
|
@@ -19,9 +19,9 @@ class ApexTriggerGenerator extends sfdxGenerator_1.SfdxGenerator {
|
|
|
19
19
|
utils_1.CreateUtil.checkInputs(this.options.template);
|
|
20
20
|
}
|
|
21
21
|
writing() {
|
|
22
|
-
const { template,
|
|
23
|
-
this.fs.copyTpl(this.templatePath(`${template}.trigger`), this.destinationPath(path.join(outputdir, `${triggername}.trigger`)), { triggername, sobject, triggerEvents: triggerevents })
|
|
24
|
-
|
|
22
|
+
const { template, triggername, triggerevents, sobject } = this.options;
|
|
23
|
+
this.fs.copyTpl(this.templatePath(`${template}.trigger`), this.destinationPath(path.join(this.outputdir, `${triggername}.trigger`)), { triggername, sobject, triggerEvents: triggerevents });
|
|
24
|
+
this.fs.copyTpl(this.templatePath('_trigger.trigger-meta.xml'), this.destinationPath(path.join(this.outputdir, `${triggername}.trigger-meta.xml`)), { apiVersion: this.apiversion });
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
exports.default = ApexTriggerGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apexTriggerGenerator.js","sourceRoot":"","sources":["../../src/generators/apexTriggerGenerator.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,oBAAqB,SAAQ,6BAAiC;IACjF,YAAY,IAAuB,EAAE,OAA2B;QAC9D,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,yBAAyB,CAAC,aAAa,CAAC,CAAC;IAChD,CAAC;IACM,eAAe;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACjD,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IACM,OAAO;QACZ,MAAM,
|
|
1
|
+
{"version":3,"file":"apexTriggerGenerator.js","sourceRoot":"","sources":["../../src/generators/apexTriggerGenerator.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,oBAAqB,SAAQ,6BAAiC;IACjF,YAAY,IAAuB,EAAE,OAA2B;QAC9D,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,yBAAyB,CAAC,aAAa,CAAC,CAAC;IAChD,CAAC;IACM,eAAe;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACjD,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IACM,OAAO;QACZ,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QACvE,IAAI,CAAC,EAAE,CAAC,OAAO,CACb,IAAI,CAAC,YAAY,CAAC,GAAG,QAAQ,UAAU,CAAC,EACxC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,WAAW,UAAU,CAAC,CAAC,EACzE,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,CACvD,CAAC;QACF,IAAI,CAAC,EAAE,CAAC,OAAO,CACb,IAAI,CAAC,YAAY,CAAC,2BAA2B,CAAC,EAC9C,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,WAAW,mBAAmB,CAAC,CAC7D,EACD,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAChC,CAAC;IACJ,CAAC;CACF;AAxBD,uCAwBC"}
|
|
@@ -18,27 +18,27 @@ class LightningAppGenerator extends sfdxGenerator_1.SfdxGenerator {
|
|
|
18
18
|
validateOptions() {
|
|
19
19
|
utils_1.CreateUtil.checkInputs(this.options.appname);
|
|
20
20
|
utils_1.CreateUtil.checkInputs(this.options.template);
|
|
21
|
-
const fileparts = path.resolve(this.
|
|
21
|
+
const fileparts = path.resolve(this.outputdir).split(path.sep);
|
|
22
22
|
if (!fileparts.includes('aura') && !this.options.internal) {
|
|
23
23
|
throw new Error(i18n_1.nls.localize('MissingAuraDir'));
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
writing() {
|
|
27
|
-
const { template,
|
|
27
|
+
const { template, appname, internal } = this.options;
|
|
28
28
|
// tslint:disable-next-line:no-unused-expression
|
|
29
29
|
if (!internal) {
|
|
30
|
-
this.fs.copyTpl(this.templatePath('_auradefinitionbundle.app-meta.xml'), this.destinationPath(path.join(outputdir, appname, `${appname}.app-meta.xml`)), {
|
|
31
|
-
apiVersion: apiversion,
|
|
30
|
+
this.fs.copyTpl(this.templatePath('_auradefinitionbundle.app-meta.xml'), this.destinationPath(path.join(this.outputdir, appname, `${appname}.app-meta.xml`)), {
|
|
31
|
+
apiVersion: this.apiversion,
|
|
32
32
|
description: i18n_1.nls.localize('LightningAppBundle'),
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
this.fs.copyTpl(this.templatePath(`${template}.app`), this.destinationPath(path.join(outputdir, appname, `${appname}.app`)), {}),
|
|
36
|
-
this.fs.copyTpl(this.templatePath('DefaultLightningAuradoc.auradoc'), this.destinationPath(path.join(outputdir, appname, `${appname}.auradoc`)), {}),
|
|
37
|
-
this.fs.copyTpl(this.templatePath('DefaultLightningController.js'), this.destinationPath(path.join(outputdir, appname, `${appname}Controller.js`)), {}),
|
|
38
|
-
this.fs.copyTpl(this.templatePath('DefaultLightningCss.css'), this.destinationPath(path.join(outputdir, appname, `${appname}.css`)), {}),
|
|
39
|
-
this.fs.copyTpl(this.templatePath('DefaultLightningHelper.js'), this.destinationPath(path.join(outputdir, appname, `${appname}Helper.js`)), {}),
|
|
40
|
-
this.fs.copyTpl(this.templatePath('DefaultLightningRenderer.js'), this.destinationPath(path.join(outputdir, appname, `${appname}Renderer.js`)), {}),
|
|
41
|
-
this.fs.copyTpl(this.templatePath('DefaultLightningSVG.svg'), this.destinationPath(path.join(outputdir, appname, `${appname}.svg`)), {});
|
|
35
|
+
this.fs.copyTpl(this.templatePath(`${template}.app`), this.destinationPath(path.join(this.outputdir, appname, `${appname}.app`)), {}),
|
|
36
|
+
this.fs.copyTpl(this.templatePath('DefaultLightningAuradoc.auradoc'), this.destinationPath(path.join(this.outputdir, appname, `${appname}.auradoc`)), {}),
|
|
37
|
+
this.fs.copyTpl(this.templatePath('DefaultLightningController.js'), this.destinationPath(path.join(this.outputdir, appname, `${appname}Controller.js`)), {}),
|
|
38
|
+
this.fs.copyTpl(this.templatePath('DefaultLightningCss.css'), this.destinationPath(path.join(this.outputdir, appname, `${appname}.css`)), {}),
|
|
39
|
+
this.fs.copyTpl(this.templatePath('DefaultLightningHelper.js'), this.destinationPath(path.join(this.outputdir, appname, `${appname}Helper.js`)), {}),
|
|
40
|
+
this.fs.copyTpl(this.templatePath('DefaultLightningRenderer.js'), this.destinationPath(path.join(this.outputdir, appname, `${appname}Renderer.js`)), {}),
|
|
41
|
+
this.fs.copyTpl(this.templatePath('DefaultLightningSVG.svg'), this.destinationPath(path.join(this.outputdir, appname, `${appname}.svg`)), {});
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
exports.default = LightningAppGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lightningAppGenerator.js","sourceRoot":"","sources":["../../src/generators/lightningAppGenerator.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,kCAA8B;AAC9B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,qBAAsB,SAAQ,6BAAkC;IACnF,YAAY,IAAuB,EAAE,OAA4B;QAC/D,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,yBAAyB,CAAC,cAAc,CAAC,CAAC;IACjD,CAAC;IAEM,eAAe;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC7C,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAE9C,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,C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YAAY,CAAC,6BAA6B,CAAC,EAChD,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,OAAO,aAAa,CAAC,CAC5D,EACD,EAAE,CACH;YACD,IAAI,CAAC,EAAE,CAAC,OAAO,CACb,IAAI,CAAC,YAAY,CAAC,yBAAyB,CAAC,EAC5C,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,OAAO,MAAM,CAAC,CACrD,EACD,EAAE,CACH,CAAC;IACN,CAAC;CACF;AAjFD,wCAiFC"}
|
|
@@ -18,7 +18,7 @@ class LightningComponentGenerator extends sfdxGenerator_1.SfdxGenerator {
|
|
|
18
18
|
validateOptions() {
|
|
19
19
|
utils_1.CreateUtil.checkInputs(this.options.componentname);
|
|
20
20
|
utils_1.CreateUtil.checkInputs(this.options.template);
|
|
21
|
-
const fileparts = path.resolve(this.
|
|
21
|
+
const fileparts = path.resolve(this.outputdir).split(path.sep);
|
|
22
22
|
if (!this.options.internal) {
|
|
23
23
|
if (this.options.type === 'lwc' && !fileparts.includes('lwc')) {
|
|
24
24
|
throw new Error(i18n_1.nls.localize('MissingLWCDir'));
|
|
@@ -37,24 +37,24 @@ class LightningComponentGenerator extends sfdxGenerator_1.SfdxGenerator {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
writing() {
|
|
40
|
-
const { template,
|
|
40
|
+
const { template, componentname, type, internal } = this.options;
|
|
41
41
|
if (type === 'aura') {
|
|
42
42
|
this.sourceRootWithPartialPath(path.join('lightningcomponent', 'aura', template));
|
|
43
43
|
if (!internal) {
|
|
44
|
-
this.fs.copyTpl(this.templatePath(`${template}.cmp-meta.xml`), this.destinationPath(path.join(outputdir, componentname, `${componentname}.cmp-meta.xml`)), {
|
|
44
|
+
this.fs.copyTpl(this.templatePath(`${template}.cmp-meta.xml`), this.destinationPath(path.join(this.outputdir, componentname, `${componentname}.cmp-meta.xml`)), {
|
|
45
45
|
componentname,
|
|
46
46
|
description: i18n_1.nls.localize('LightningComponentBundle'),
|
|
47
|
-
apiVersion: apiversion,
|
|
47
|
+
apiVersion: this.apiversion,
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
this.fs.copyTpl(this.templatePath(`${template}.auradoc`), this.destinationPath(path.join(outputdir, componentname, `${componentname}.auradoc`)), {});
|
|
51
|
-
this.fs.copyTpl(this.templatePath(`${template}.cmp`), this.destinationPath(path.join(outputdir, componentname, `${componentname}.cmp`)), {});
|
|
52
|
-
this.fs.copyTpl(this.templatePath(`${template}.css`), this.destinationPath(path.join(outputdir, componentname, `${componentname}.css`)), {});
|
|
53
|
-
this.fs.copyTpl(this.templatePath(`${template}.design`), this.destinationPath(path.join(outputdir, componentname, `${componentname}.design`)), {});
|
|
54
|
-
this.fs.copyTpl(this.templatePath(`${template}.svg`), this.destinationPath(path.join(outputdir, componentname, `${componentname}.svg`)), {});
|
|
55
|
-
this.fs.copyTpl(this.templatePath(`${template}Controller.js`), this.destinationPath(path.join(outputdir, componentname, `${componentname}Controller.js`)), {});
|
|
56
|
-
this.fs.copyTpl(this.templatePath(`${template}Helper.js`), this.destinationPath(path.join(outputdir, componentname, `${componentname}Helper.js`)), {});
|
|
57
|
-
this.fs.copyTpl(this.templatePath(`${template}Renderer.js`), this.destinationPath(path.join(outputdir, componentname, `${componentname}Renderer.js`)), {});
|
|
50
|
+
this.fs.copyTpl(this.templatePath(`${template}.auradoc`), this.destinationPath(path.join(this.outputdir, componentname, `${componentname}.auradoc`)), {});
|
|
51
|
+
this.fs.copyTpl(this.templatePath(`${template}.cmp`), this.destinationPath(path.join(this.outputdir, componentname, `${componentname}.cmp`)), {});
|
|
52
|
+
this.fs.copyTpl(this.templatePath(`${template}.css`), this.destinationPath(path.join(this.outputdir, componentname, `${componentname}.css`)), {});
|
|
53
|
+
this.fs.copyTpl(this.templatePath(`${template}.design`), this.destinationPath(path.join(this.outputdir, componentname, `${componentname}.design`)), {});
|
|
54
|
+
this.fs.copyTpl(this.templatePath(`${template}.svg`), this.destinationPath(path.join(this.outputdir, componentname, `${componentname}.svg`)), {});
|
|
55
|
+
this.fs.copyTpl(this.templatePath(`${template}Controller.js`), this.destinationPath(path.join(this.outputdir, componentname, `${componentname}Controller.js`)), {});
|
|
56
|
+
this.fs.copyTpl(this.templatePath(`${template}Helper.js`), this.destinationPath(path.join(this.outputdir, componentname, `${componentname}Helper.js`)), {});
|
|
57
|
+
this.fs.copyTpl(this.templatePath(`${template}Renderer.js`), this.destinationPath(path.join(this.outputdir, componentname, `${componentname}Renderer.js`)), {});
|
|
58
58
|
}
|
|
59
59
|
if (type === 'lwc') {
|
|
60
60
|
const pascalCaseComponentName = `${componentname
|
|
@@ -68,9 +68,9 @@ class LightningComponentGenerator extends sfdxGenerator_1.SfdxGenerator {
|
|
|
68
68
|
.join('-')
|
|
69
69
|
.toLowerCase();
|
|
70
70
|
this.sourceRootWithPartialPath(path.join('lightningcomponent', 'lwc', template));
|
|
71
|
-
this.fs.copyTpl(this.templatePath(`${template}.js`), this.destinationPath(path.join(outputdir, camelCaseComponentName, `${camelCaseComponentName}.js`)), { pascalCaseComponentName });
|
|
72
|
-
this.fs.copyTpl(this.templatePath(`${template}.html`), this.destinationPath(path.join(outputdir, camelCaseComponentName, `${camelCaseComponentName}.html`)), {});
|
|
73
|
-
this.fs.copyTpl(this.templatePath(path.join(`__tests__`, `${template}.test.js`)), this.destinationPath(path.join(outputdir, camelCaseComponentName, `__tests__`, `${camelCaseComponentName}.test.js`)), {
|
|
71
|
+
this.fs.copyTpl(this.templatePath(`${template}.js`), this.destinationPath(path.join(this.outputdir, camelCaseComponentName, `${camelCaseComponentName}.js`)), { pascalCaseComponentName });
|
|
72
|
+
this.fs.copyTpl(this.templatePath(`${template}.html`), this.destinationPath(path.join(this.outputdir, camelCaseComponentName, `${camelCaseComponentName}.html`)), {});
|
|
73
|
+
this.fs.copyTpl(this.templatePath(path.join(`__tests__`, `${template}.test.js`)), this.destinationPath(path.join(this.outputdir, camelCaseComponentName, `__tests__`, `${camelCaseComponentName}.test.js`)), {
|
|
74
74
|
pascalCaseComponentName,
|
|
75
75
|
camelCaseComponentName,
|
|
76
76
|
kebabCaseComponentName,
|
|
@@ -79,7 +79,7 @@ class LightningComponentGenerator extends sfdxGenerator_1.SfdxGenerator {
|
|
|
79
79
|
const masterLabel = (0, kit_1.camelCaseToTitleCase)(componentname)
|
|
80
80
|
.replace(/</g, '<')
|
|
81
81
|
.replace(/>/g, '>');
|
|
82
|
-
this.fs.copyTpl(this.templatePath(`${template}.js-meta.xml`), this.destinationPath(path.join(outputdir, camelCaseComponentName, `${camelCaseComponentName}.js-meta.xml`)), { apiVersion: apiversion, masterLabel });
|
|
82
|
+
this.fs.copyTpl(this.templatePath(`${template}.js-meta.xml`), this.destinationPath(path.join(this.outputdir, camelCaseComponentName, `${camelCaseComponentName}.js-meta.xml`)), { apiVersion: this.apiversion, masterLabel });
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lightningComponentGenerator.js","sourceRoot":"","sources":["../../src/generators/lightningComponentGenerator.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,yCAAuD;AACvD,6BAA6B;AAC7B,kCAA8B;AAC9B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,2BAA4B,SAAQ,6BAAwC;IAC/F,YAAY,IAAuB,EAAE,OAAkC;QACrE,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACvB,CAAC;IAEM,eAAe;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QACnD,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAE9C,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CA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BAAsB,OAAO,CACjC,CACF,EACD,EAAE,CACH,CAAC;YAEF,IAAI,CAAC,EAAE,CAAC,OAAO,CACb,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,QAAQ,UAAU,CAAC,CAAC,EAChE,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CACP,IAAI,CAAC,SAAS,EACd,sBAAsB,EACtB,WAAW,EACX,GAAG,sBAAsB,UAAU,CACpC,CACF,EACD;gBACE,uBAAuB;gBACvB,sBAAsB;gBACtB,sBAAsB;aACvB,CACF,CAAC;YAEF,IAAI,CAAC,QAAQ,EAAE;gBACb,MAAM,WAAW,GAAG,IAAA,0BAAoB,EAAC,aAAa,CAAC;qBACpD,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;qBACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;gBACzB,IAAI,CAAC,EAAE,CAAC,OAAO,CACb,IAAI,CAAC,YAAY,CAAC,GAAG,QAAQ,cAAc,CAAC,EAC5C,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CACP,IAAI,CAAC,SAAS,EACd,sBAAsB,EACtB,GAAG,sBAAsB,cAAc,CACxC,CACF,EACD,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,EAAE,CAC7C,CAAC;aACH;SACF;IACH,CAAC;CACF;AAvMD,8CAuMC"}
|
|
@@ -18,22 +18,22 @@ class LightningEventGenerator extends sfdxGenerator_1.SfdxGenerator {
|
|
|
18
18
|
validateOptions() {
|
|
19
19
|
utils_1.CreateUtil.checkInputs(this.options.eventname);
|
|
20
20
|
utils_1.CreateUtil.checkInputs(this.options.template);
|
|
21
|
-
const fileparts = path.resolve(this.
|
|
21
|
+
const fileparts = path.resolve(this.outputdir).split(path.sep);
|
|
22
22
|
if (!this.options.internal && !fileparts.includes('aura')) {
|
|
23
23
|
throw new Error(i18n_1.nls.localize('MissingAuraDir'));
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
writing() {
|
|
27
|
-
const { template,
|
|
27
|
+
const { template, eventname, internal } = this.options;
|
|
28
28
|
// tslint:disable-next-line:no-unused-expression
|
|
29
29
|
if (!internal) {
|
|
30
|
-
this.fs.copyTpl(this.templatePath('_auradefinitionbundle.evt-meta.xml'), this.destinationPath(path.join(outputdir, eventname, `${eventname}.evt-meta.xml`)), {
|
|
30
|
+
this.fs.copyTpl(this.templatePath('_auradefinitionbundle.evt-meta.xml'), this.destinationPath(path.join(this.outputdir, eventname, `${eventname}.evt-meta.xml`)), {
|
|
31
31
|
eventname,
|
|
32
|
-
apiVersion: apiversion,
|
|
32
|
+
apiVersion: this.apiversion,
|
|
33
33
|
description: i18n_1.nls.localize('LightningEventBundle'),
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
this.fs.copyTpl(this.templatePath(`${template}.evt`), this.destinationPath(path.join(outputdir, eventname, `${eventname}.evt`)), {});
|
|
36
|
+
this.fs.copyTpl(this.templatePath(`${template}.evt`), this.destinationPath(path.join(this.outputdir, eventname, `${eventname}.evt`)), {});
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
exports.default = LightningEventGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lightningEventGenerator.js","sourceRoot":"","sources":["../../src/generators/lightningEventGenerator.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,kCAA8B;AAC9B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,uBAAwB,SAAQ,6BAAoC;IACvF,YAAY,IAAuB,EAAE,OAA8B;QACjE,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,yBAAyB,CAAC,gBAAgB,CAAC,CAAC;IACnD,CAAC;IAEM,eAAe;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC/C,kBAAU,CAAC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CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,SAAS,eAAe,CAAC,CAClE,EACD;gBACE,SAAS;gBACT,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,WAAW,EAAE,UAAG,CAAC,QAAQ,CAAC,sBAAsB,CAAC;aAClD,CACF,CAAC;SACH;QACD,IAAI,CAAC,EAAE,CAAC,OAAO,CACb,IAAI,CAAC,YAAY,CAAC,GAAG,QAAQ,MAAM,CAAC,EACpC,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,SAAS,MAAM,CAAC,CACzD,EACD,EAAE,CACH,CAAC;IACJ,CAAC;CACF;AAxCD,0CAwCC"}
|
|
@@ -18,21 +18,21 @@ class LightningInterfaceGenerator extends sfdxGenerator_1.SfdxGenerator {
|
|
|
18
18
|
validateOptions() {
|
|
19
19
|
utils_1.CreateUtil.checkInputs(this.options.interfacename);
|
|
20
20
|
utils_1.CreateUtil.checkInputs(this.options.template);
|
|
21
|
-
const fileparts = path.resolve(this.
|
|
21
|
+
const fileparts = path.resolve(this.outputdir).split(path.sep);
|
|
22
22
|
if (!this.options.internal && !fileparts.includes('aura')) {
|
|
23
23
|
throw new Error(i18n_1.nls.localize('MissingAuraDir'));
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
writing() {
|
|
27
|
-
const { template,
|
|
27
|
+
const { template, interfacename, internal } = this.options;
|
|
28
28
|
// tslint:disable-next-line:no-unused-expression
|
|
29
29
|
if (!internal) {
|
|
30
|
-
this.fs.copyTpl(this.templatePath('_auradefinitionbundle.intf-meta.xml'), this.destinationPath(path.join(outputdir, interfacename, `${interfacename}.intf-meta.xml`)), {
|
|
31
|
-
apiVersion: apiversion,
|
|
30
|
+
this.fs.copyTpl(this.templatePath('_auradefinitionbundle.intf-meta.xml'), this.destinationPath(path.join(this.outputdir, interfacename, `${interfacename}.intf-meta.xml`)), {
|
|
31
|
+
apiVersion: this.apiversion,
|
|
32
32
|
description: i18n_1.nls.localize('LightningInterfaceBundle'),
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
this.fs.copyTpl(this.templatePath(`${template}.intf`), this.destinationPath(path.join(outputdir, interfacename, `${interfacename}.intf`)), {});
|
|
35
|
+
this.fs.copyTpl(this.templatePath(`${template}.intf`), this.destinationPath(path.join(this.outputdir, interfacename, `${interfacename}.intf`)), {});
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
exports.default = LightningInterfaceGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lightningInterfaceGenerator.js","sourceRoot":"","sources":["../../src/generators/lightningInterfaceGenerator.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,kCAA8B;AAC9B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,2BAA4B,SAAQ,6BAAwC;IAC/F,YAAY,IAAuB,EAAE,OAAkC;QACrE,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,yBAAyB,CAAC,oBAAoB,CAAC,CAAC;IACvD,CAAC;IAEM,eAAe;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QACnD,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAE9C,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"lightningInterfaceGenerator.js","sourceRoot":"","sources":["../../src/generators/lightningInterfaceGenerator.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,kCAA8B;AAC9B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,2BAA4B,SAAQ,6BAAwC;IAC/F,YAAY,IAAuB,EAAE,OAAkC;QACrE,KAAK,CAAC,IAAI,EAAE,OAA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,CAClE,EACD,EAAE,CACH,CAAC;IACJ,CAAC;CACF;AA5CD,8CA4CC"}
|
|
@@ -20,16 +20,16 @@ class LightningTestGenerator extends sfdxGenerator_1.SfdxGenerator {
|
|
|
20
20
|
utils_1.CreateUtil.checkInputs(this.options.template);
|
|
21
21
|
}
|
|
22
22
|
writing() {
|
|
23
|
-
const { template,
|
|
23
|
+
const { template, testname, internal } = this.options;
|
|
24
24
|
// tslint:disable-next-line:no-unused-expression
|
|
25
25
|
if (!internal) {
|
|
26
|
-
this.fs.copyTpl(this.templatePath('_staticresource.resource-meta.xml'), this.destinationPath(path.join(outputdir, `${testname}.resource-meta.xml`)), {
|
|
26
|
+
this.fs.copyTpl(this.templatePath('_staticresource.resource-meta.xml'), this.destinationPath(path.join(this.outputdir, `${testname}.resource-meta.xml`)), {
|
|
27
27
|
description: i18n_1.nls.localize('LightningTest'),
|
|
28
28
|
},
|
|
29
29
|
// @ts-ignore
|
|
30
30
|
{ apiName: testname });
|
|
31
31
|
}
|
|
32
|
-
this.fs.copyTpl(this.templatePath(`${template}.resource`), this.destinationPath(path.join(outputdir, `${testname}.resource`)), { apiName: testname });
|
|
32
|
+
this.fs.copyTpl(this.templatePath(`${template}.resource`), this.destinationPath(path.join(this.outputdir, `${testname}.resource`)), { apiName: testname });
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
exports.default = LightningTestGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lightningTestGenerator.js","sourceRoot":"","sources":["../../src/generators/lightningTestGenerator.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,kCAA8B;AAC9B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,sBAAuB,SAAQ,6BAAmC;IACrF,YAAY,IAAuB,EAAE,OAA6B;QAChE,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,yBAAyB,CAAC,eAAe,CAAC,CAAC;IAClD,CA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C,EAAE,CAAC,OAAO,CACb,IAAI,CAAC,YAAY,CAAC,GAAG,QAAQ,WAAW,CAAC,EACzC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,QAAQ,WAAW,CAAC,CAAC,EACvE,EAAE,OAAO,EAAE,QAAQ,EAAE,CACtB,CAAC;IACJ,CAAC;CACF;AAjCD,yCAiCC"}
|
|
@@ -51,9 +51,9 @@ class ProjectGenerator extends sfdxGenerator_1.SfdxGenerator {
|
|
|
51
51
|
utils_1.CreateUtil.checkInputs(this.options.template);
|
|
52
52
|
}
|
|
53
53
|
writing() {
|
|
54
|
-
const {
|
|
54
|
+
const { projectname, template, defaultpackagedir, manifest, ns, loginurl } = this.options;
|
|
55
55
|
const folderlayout = [
|
|
56
|
-
outputdir,
|
|
56
|
+
this.outputdir,
|
|
57
57
|
projectname,
|
|
58
58
|
defaultpackagedir,
|
|
59
59
|
'main',
|
|
@@ -63,47 +63,47 @@ class ProjectGenerator extends sfdxGenerator_1.SfdxGenerator {
|
|
|
63
63
|
const manifestFile = `${template}/Manifest.xml`;
|
|
64
64
|
const soqlQueryFile = 'account.soql';
|
|
65
65
|
const anonApexFile = 'hello.apex';
|
|
66
|
-
this.fs.copyTpl(this.templatePath(scratchDefFile), this.destinationPath(path.join(outputdir, projectname, 'config', 'project-scratch-def.json')), { company: (process.env.USER || 'Demo') + ' company' });
|
|
67
|
-
this.fs.copyTpl(this.templatePath(`${template}/README.md`), this.destinationPath(path.join(outputdir, projectname, 'README.md')), {});
|
|
68
|
-
this.fs.copyTpl(this.templatePath('sfdx-project.json'), this.destinationPath(path.join(outputdir, projectname, 'sfdx-project.json')), {
|
|
66
|
+
this.fs.copyTpl(this.templatePath(scratchDefFile), this.destinationPath(path.join(this.outputdir, projectname, 'config', 'project-scratch-def.json')), { company: (process.env.USER || 'Demo') + ' company' });
|
|
67
|
+
this.fs.copyTpl(this.templatePath(`${template}/README.md`), this.destinationPath(path.join(this.outputdir, projectname, 'README.md')), {});
|
|
68
|
+
this.fs.copyTpl(this.templatePath('sfdx-project.json'), this.destinationPath(path.join(this.outputdir, projectname, 'sfdx-project.json')), {
|
|
69
69
|
defaultpackagedir,
|
|
70
70
|
namespace: ns,
|
|
71
71
|
loginurl,
|
|
72
|
-
apiversion,
|
|
72
|
+
apiversion: this.apiversion,
|
|
73
73
|
name: projectname,
|
|
74
74
|
});
|
|
75
75
|
if (manifest === true) {
|
|
76
|
-
this.fs.copyTpl(this.templatePath(manifestFile), this.destinationPath(path.join(outputdir, projectname, 'manifest', 'package.xml')), { apiversion });
|
|
76
|
+
this.fs.copyTpl(this.templatePath(manifestFile), this.destinationPath(path.join(this.outputdir, projectname, 'manifest', 'package.xml')), { apiversion: this.apiversion });
|
|
77
77
|
}
|
|
78
78
|
if (template === 'standard') {
|
|
79
79
|
makeEmptyFolders(folderlayout, standardfolderarray);
|
|
80
80
|
// Add Husky directory and hooks
|
|
81
|
-
this._createHuskyConfig(path.join(outputdir, projectname));
|
|
81
|
+
this._createHuskyConfig(path.join(this.outputdir, projectname));
|
|
82
82
|
for (const file of vscodearray) {
|
|
83
|
-
this.fs.copyTpl(this.templatePath(`${file}.json`), this.destinationPath(path.join(outputdir, projectname, '.vscode', `${file}.json`)), {});
|
|
83
|
+
this.fs.copyTpl(this.templatePath(`${file}.json`), this.destinationPath(path.join(this.outputdir, projectname, '.vscode', `${file}.json`)), {});
|
|
84
84
|
}
|
|
85
85
|
this.fs.copyTpl(this.templatePath('lwc.eslintrc.json'), this.destinationPath(path.join(...folderlayout, 'lwc', '.eslintrc.json')), {});
|
|
86
86
|
this.fs.copyTpl(this.templatePath('aura.eslintrc.json'), this.destinationPath(path.join(...folderlayout, 'aura', '.eslintrc.json')), {});
|
|
87
|
-
this.fs.copyTpl(this.templatePath(path.join(template, soqlQueryFile)), this.destinationPath(path.join(outputdir, projectname, 'scripts', 'soql', soqlQueryFile)), {});
|
|
88
|
-
this.fs.copyTpl(this.templatePath(path.join(template, anonApexFile)), this.destinationPath(path.join(outputdir, projectname, 'scripts', 'apex', anonApexFile)), {});
|
|
87
|
+
this.fs.copyTpl(this.templatePath(path.join(template, soqlQueryFile)), this.destinationPath(path.join(this.outputdir, projectname, 'scripts', 'soql', soqlQueryFile)), {});
|
|
88
|
+
this.fs.copyTpl(this.templatePath(path.join(template, anonApexFile)), this.destinationPath(path.join(this.outputdir, projectname, 'scripts', 'apex', anonApexFile)), {});
|
|
89
89
|
for (const file of filestocopy) {
|
|
90
90
|
const out = file === GITIGNORE ? `.${file}` : file;
|
|
91
|
-
this.fs.copyTpl(this.templatePath(file), this.destinationPath(path.join(outputdir, projectname, out)), {});
|
|
91
|
+
this.fs.copyTpl(this.templatePath(file), this.destinationPath(path.join(this.outputdir, projectname, out)), {});
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
if (template === 'empty') {
|
|
95
95
|
makeEmptyFolders(folderlayout, emptyfolderarray);
|
|
96
|
-
this.fs.copyTpl(this.templatePath('.forceignore'), this.destinationPath(path.join(outputdir, projectname, '.forceignore')), {});
|
|
96
|
+
this.fs.copyTpl(this.templatePath('.forceignore'), this.destinationPath(path.join(this.outputdir, projectname, '.forceignore')), {});
|
|
97
97
|
}
|
|
98
98
|
if (template === 'analytics') {
|
|
99
99
|
makeEmptyFolders(folderlayout, analyticsfolderarray);
|
|
100
100
|
// Add Husky directory and hooks
|
|
101
|
-
this._createHuskyConfig(path.join(outputdir, projectname));
|
|
101
|
+
this._createHuskyConfig(path.join(this.outputdir, projectname));
|
|
102
102
|
for (const file of vscodearray) {
|
|
103
|
-
this.fs.copyTpl(this.templatePath(`${file}.json`), this.destinationPath(path.join(outputdir, projectname, '.vscode', `${file}.json`)), {});
|
|
103
|
+
this.fs.copyTpl(this.templatePath(`${file}.json`), this.destinationPath(path.join(this.outputdir, projectname, '.vscode', `${file}.json`)), {});
|
|
104
104
|
}
|
|
105
105
|
// add the analytics vscode extension to the recommendations
|
|
106
|
-
this.fs.extendJSON(path.join(outputdir, projectname, '.vscode', 'extensions.json'), {}, (key, value) => {
|
|
106
|
+
this.fs.extendJSON(path.join(this.outputdir, projectname, '.vscode', 'extensions.json'), {}, (key, value) => {
|
|
107
107
|
if (key === 'recommendations' &&
|
|
108
108
|
Array.isArray(value) &&
|
|
109
109
|
!value.some((n) => n === analyticsVscodeExt)) {
|
|
@@ -115,7 +115,7 @@ class ProjectGenerator extends sfdxGenerator_1.SfdxGenerator {
|
|
|
115
115
|
this.fs.copyTpl(this.templatePath('aura.eslintrc.json'), this.destinationPath(path.join(...folderlayout, 'aura', '.eslintrc.json')), {});
|
|
116
116
|
for (const file of filestocopy) {
|
|
117
117
|
const out = file === GITIGNORE ? `.${file}` : file;
|
|
118
|
-
this.fs.copyTpl(this.templatePath(file), this.destinationPath(path.join(outputdir, projectname, out)), {});
|
|
118
|
+
this.fs.copyTpl(this.templatePath(file), this.destinationPath(path.join(this.outputdir, projectname, out)), {});
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectGenerator.js","sourceRoot":"","sources":["../../src/generators/projectGenerator.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,6BAA6B;AAC7B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAM,SAAS,GAAG,WAAW,CAAC;AAC9B,MAAM,YAAY,GAAG,QAAQ,CAAC;AAC9B,MAAM,cAAc,GAAG,CAAC,YAAY,CAAC,CAAC;AACtC,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;AACzD,MAAM,mBAAmB,GAAG;IAC1B,cAAc;IACd,MAAM;IACN,SAAS;IACT,eAAe;IACf,YAAY;IACZ,SAAS;IACT,SAAS;IACT,gBAAgB;IAChB,iBAAiB;IACjB,MAAM;IACN,UAAU;CACX,CAAC;AACF,MAAM,WAAW,GAAG;IAClB,eAAe;IACf,cAAc;IACd,SAAS;IACT,iBAAiB;IACjB,aAAa;IACb,gBAAgB;IAChB,cAAc;CACf,CAAC;AACF,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAEzC,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC;AACzE,MAAM,kBAAkB,GAAG,+BAA+B,CAAC;AAE3D,MAAqB,gBAAiB,SAAQ,6BAA6B;IACzE,YAAY,IAAuB,EAAE,OAAuB;QAC1D,4EAA4E;QAC5E,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE;YACnB,iBAAiB,EAAE,KAAK;SACzB,CAAC,CAAC;QACH,IAAI,CAAC,yBAAyB,CAAC,SAAS,CAAC,CAAC;IAC5C,CAAC;IAEM,eAAe;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IAEM,OAAO;QACZ,MAAM,
|
|
1
|
+
{"version":3,"file":"projectGenerator.js","sourceRoot":"","sources":["../../src/generators/projectGenerator.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,6BAA6B;AAC7B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAM,SAAS,GAAG,WAAW,CAAC;AAC9B,MAAM,YAAY,GAAG,QAAQ,CAAC;AAC9B,MAAM,cAAc,GAAG,CAAC,YAAY,CAAC,CAAC;AACtC,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;AACzD,MAAM,mBAAmB,GAAG;IAC1B,cAAc;IACd,MAAM;IACN,SAAS;IACT,eAAe;IACf,YAAY;IACZ,SAAS;IACT,SAAS;IACT,gBAAgB;IAChB,iBAAiB;IACjB,MAAM;IACN,UAAU;CACX,CAAC;AACF,MAAM,WAAW,GAAG;IAClB,eAAe;IACf,cAAc;IACd,SAAS;IACT,iBAAiB;IACjB,aA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C,YAAY,CAAC,EAAE;YAChC,EAAE,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;SAC5B;QACD,KAAK,MAAM,IAAI,IAAI,cAAc,EAAE;YACjC,IAAI,CAAC,EAAE,CAAC,OAAO,CACb,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,EAChD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,EACnD,EAAE,CACH,CAAC;SACH;IACH,CAAC;CACF;AAtND,mCAsNC;AAED,SAAS,gBAAgB,CACvB,eAAyB,EACzB,eAAyB;IAEzB,IAAI,SAAS,GAAG,EAAE,CAAC;IACnB,KAAK,MAAM,MAAM,IAAI,eAAe,EAAE;QACpC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,EAAE;YAChD,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;SAC5C;QACD,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;KAC1C;IACD,KAAK,MAAM,SAAS,IAAI,eAAe,EAAE;QACvC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,EAAE;YACnD,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;SAC/C;KACF;AACH,CAAC"}
|
|
@@ -4,14 +4,13 @@ import { TemplateOptions } from '../utils/types';
|
|
|
4
4
|
* Base class for generators
|
|
5
5
|
*/
|
|
6
6
|
export declare abstract class SfdxGenerator<TOptions extends TemplateOptions> extends Generator<Generator.GeneratorOptions> {
|
|
7
|
-
options: TOptions
|
|
8
|
-
apiversion: string;
|
|
9
|
-
outputdir: string;
|
|
10
|
-
};
|
|
7
|
+
options: TOptions;
|
|
11
8
|
/**
|
|
12
9
|
* Set by sourceRootWithPartialPath called in generator
|
|
13
10
|
*/
|
|
14
11
|
builtInTemplatesRootPath?: string;
|
|
12
|
+
protected outputdir: string;
|
|
13
|
+
protected apiversion: string;
|
|
15
14
|
/**
|
|
16
15
|
* The constructor for the SFDXGenerator.
|
|
17
16
|
*
|
|
@@ -30,9 +30,9 @@ class SfdxGenerator extends Generator {
|
|
|
30
30
|
}) {
|
|
31
31
|
var _a, _b;
|
|
32
32
|
super(args, options, features);
|
|
33
|
-
this.
|
|
34
|
-
(_a =
|
|
35
|
-
this.
|
|
33
|
+
this.apiversion =
|
|
34
|
+
(_a = options.apiversion) !== null && _a !== void 0 ? _a : templateService_1.TemplateService.getDefaultApiVersion();
|
|
35
|
+
this.outputdir = (_b = options.outputdir) !== null && _b !== void 0 ? _b : process.cwd();
|
|
36
36
|
this.validateOptions();
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sfdxGenerator.js","sourceRoot":"","sources":["../../src/generators/sfdxGenerator.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,yBAAyB;AACzB,6BAA6B;AAC7B,8CAA8C;AAC9C,gEAA6D;AAG7D;;GAEG;AACH,MAAsB,aAEpB,SAAQ,SAAqC;
|
|
1
|
+
{"version":3,"file":"sfdxGenerator.js","sourceRoot":"","sources":["../../src/generators/sfdxGenerator.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,yBAAyB;AACzB,6BAA6B;AAC7B,8CAA8C;AAC9C,gEAA6D;AAG7D;;GAEG;AACH,MAAsB,aAEpB,SAAQ,SAAqC;IAU7C;;;;;;OAMG;IACH,YACE,IAAuB,EACvB,OAAiB;IACjB,6GAA6G;IAC7G,0EAA0E;IAC1E,WAAwC;QACtC,iBAAiB,EAAE,IAAI;KACxB;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AC;SACH;IACH,CAAC;CACF;AA3ED,sCA2EC"}
|
|
@@ -24,21 +24,21 @@ class StaticResourceGenerator extends sfdxGenerator_1.SfdxGenerator {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
writing() {
|
|
27
|
-
const {
|
|
27
|
+
const { resourcename, contenttype } = this.options;
|
|
28
28
|
const ext = (0, mime_types_1.extension)(contenttype);
|
|
29
29
|
if (ext && EXTENSION_TEMPLATES.includes(ext)) {
|
|
30
30
|
// For types that we have default file, write that (js, css, txt, json)
|
|
31
|
-
this.fs.copyTpl(this.templatePath(`empty.${ext}`), this.destinationPath(path.join(outputdir, `${resourcename}.${ext}`)), {});
|
|
31
|
+
this.fs.copyTpl(this.templatePath(`empty.${ext}`), this.destinationPath(path.join(this.outputdir, `${resourcename}.${ext}`)), {});
|
|
32
32
|
}
|
|
33
33
|
else if (ext === 'zip') {
|
|
34
34
|
// For zip files, write an empty js file in a folder
|
|
35
|
-
this.fs.copyTpl(this.templatePath('_gitkeep'), this.destinationPath(path.join(outputdir, resourcename, '.gitkeep')), {});
|
|
35
|
+
this.fs.copyTpl(this.templatePath('_gitkeep'), this.destinationPath(path.join(this.outputdir, resourcename, '.gitkeep')), {});
|
|
36
36
|
}
|
|
37
37
|
else {
|
|
38
38
|
// For all other mime types write a generic .resource file
|
|
39
|
-
this.fs.copyTpl(this.templatePath('empty.resource'), this.destinationPath(path.join(outputdir, `${resourcename}.resource`)), {});
|
|
39
|
+
this.fs.copyTpl(this.templatePath('empty.resource'), this.destinationPath(path.join(this.outputdir, `${resourcename}.resource`)), {});
|
|
40
40
|
}
|
|
41
|
-
this.fs.copyTpl(this.templatePath('_staticresource.resource-meta.xml'), this.destinationPath(path.join(outputdir, `${resourcename}.resource-meta.xml`)), {
|
|
41
|
+
this.fs.copyTpl(this.templatePath('_staticresource.resource-meta.xml'), this.destinationPath(path.join(this.outputdir, `${resourcename}.resource-meta.xml`)), {
|
|
42
42
|
contentType: contenttype,
|
|
43
43
|
});
|
|
44
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staticResourceGenerator.js","sourceRoot":"","sources":["../../src/generators/staticResourceGenerator.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,2CAAuC;AACvC,6BAA6B;AAC7B,kCAA8B;AAC9B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAEzD,MAAqB,uBAAwB,SAAQ,6BAAoC;IACvF,YAAY,IAAuB,EAAE,OAA8B;QACjE,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,yBAAyB,CAAC,gBAAgB,CAAC,CAAC;IACnD,CAAC;IAEM,eAAe;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAElD,IAAI,CAAC,IAAA,sBAAS,EAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,EAAE;YACtD,MAAM,IAAI,KAAK,CAAC,UAAG,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC;SAClD;IACH,CAAC;IAEM,OAAO;QACZ,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"staticResourceGenerator.js","sourceRoot":"","sources":["../../src/generators/staticResourceGenerator.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,2CAAuC;AACvC,6BAA6B;AAC7B,kCAA8B;AAC9B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAEzD,MAAqB,uBAAwB,SAAQ,6BAAoC;IACvF,YAAY,IAAuB,EAAE,OAA8B;QACjE,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,yBAAyB,CAA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,YAAY,WAAW,CAAC,CACtD,EACD,EAAE,CACH,CAAC;SACH;QAED,IAAI,CAAC,EAAE,CAAC,OAAO,CACb,IAAI,CAAC,YAAY,CAAC,mCAAmC,CAAC,EACtD,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,YAAY,oBAAoB,CAAC,CAC/D,EACD;YACE,WAAW,EAAE,WAAW;SACzB,CACF,CAAC;IACJ,CAAC;CACF;AA1DD,0CA0DC"}
|
|
@@ -19,9 +19,9 @@ class VisualforceComponentGenerator extends sfdxGenerator_1.SfdxGenerator {
|
|
|
19
19
|
utils_1.CreateUtil.checkInputs(this.options.template);
|
|
20
20
|
}
|
|
21
21
|
writing() {
|
|
22
|
-
const { template,
|
|
23
|
-
this.fs.copyTpl(this.templatePath(`${template}.component`), this.destinationPath(path.join(outputdir, `${componentname}.component`)), {}),
|
|
24
|
-
this.fs.copyTpl(this.templatePath('_component.component-meta.xml'), this.destinationPath(path.join(outputdir, `${componentname}.component-meta.xml`)), { vfLabel: label, apiVersion: apiversion });
|
|
22
|
+
const { template, label, componentname } = this.options;
|
|
23
|
+
this.fs.copyTpl(this.templatePath(`${template}.component`), this.destinationPath(path.join(this.outputdir, `${componentname}.component`)), {}),
|
|
24
|
+
this.fs.copyTpl(this.templatePath('_component.component-meta.xml'), this.destinationPath(path.join(this.outputdir, `${componentname}.component-meta.xml`)), { vfLabel: label, apiVersion: this.apiversion });
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
exports.default = VisualforceComponentGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visualforceComponentGenerator.js","sourceRoot":"","sources":["../../src/generators/visualforceComponentGenerator.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,6BAA8B,SAAQ,6BAA0C;IACnG,YAAY,IAAuB,EAAE,OAAoC;QACvE,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,yBAAyB,CAAC,sBAAsB,CAAC,CAAC;IACzD,CAAC;IAEM,eAAe;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QACnD,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IAEM,OAAO;QACZ,MAAM,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"visualforceComponentGenerator.js","sourceRoot":"","sources":["../../src/generators/visualforceComponentGenerator.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,6BAA8B,SAAQ,6BAA0C;IACnG,YAAY,IAAuB,EAAE,OAAoC;QACvE,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,yBAAyB,CAAC,sBAAsB,CAAC,CAAC;IACzD,CAAC;IAEM,eAAe;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QACnD,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IAEM,OAAO;QACZ,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QACxD,IAAI,CAAC,EAAE,CAAC,OAAO,CACb,IAAI,CAAC,YAAY,CAAC,GAAG,QAAQ,YAAY,CAAC,EAC1C,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,aAAa,YAAY,CAAC,CACxD,EACD,EAAE,CACH;YACC,IAAI,CAAC,EAAE,CAAC,OAAO,CACb,IAAI,CAAC,YAAY,CAAC,+BAA+B,CAAC,EAClD,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,aAAa,qBAAqB,CAAC,CACjE,EACD,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAChD,CAAC;IACN,CAAC;CACF;AA5BD,gDA4BC"}
|
|
@@ -19,9 +19,9 @@ class VisualforcePageGenerator extends sfdxGenerator_1.SfdxGenerator {
|
|
|
19
19
|
utils_1.CreateUtil.checkInputs(this.options.template);
|
|
20
20
|
}
|
|
21
21
|
writing() {
|
|
22
|
-
const { template,
|
|
23
|
-
this.fs.copyTpl(this.templatePath(`${template}.page`), this.destinationPath(path.join(outputdir, `${pagename}.page`)), {});
|
|
24
|
-
this.fs.copyTpl(this.templatePath('_page.page-meta.xml'), this.destinationPath(path.join(outputdir, `${pagename}.page-meta.xml`)), { vfLabel: label, apiVersion: apiversion });
|
|
22
|
+
const { template, label, pagename } = this.options;
|
|
23
|
+
this.fs.copyTpl(this.templatePath(`${template}.page`), this.destinationPath(path.join(this.outputdir, `${pagename}.page`)), {});
|
|
24
|
+
this.fs.copyTpl(this.templatePath('_page.page-meta.xml'), this.destinationPath(path.join(this.outputdir, `${pagename}.page-meta.xml`)), { vfLabel: label, apiVersion: this.apiversion });
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
exports.default = VisualforcePageGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visualforcePageGenerator.js","sourceRoot":"","sources":["../../src/generators/visualforcePageGenerator.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,wBAAyB,SAAQ,6BAAqC;IACzF,YAAY,IAAuB,EAAE,OAA+B;QAClE,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,yBAAyB,CAAC,iBAAiB,CAAC,CAA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,QAAQ,gBAAgB,CAAC,CACvD,EACD,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAChD,CAAC;IACJ,CAAC;CACF;AA1BD,2CA0BC"}
|
|
@@ -17,7 +17,11 @@
|
|
|
17
17
|
"dimensions": []
|
|
18
18
|
},
|
|
19
19
|
"state": {
|
|
20
|
-
"
|
|
20
|
+
"dataSourceLinksInfo": {
|
|
21
|
+
"enableAutomaticLinking": false,
|
|
22
|
+
"excludeRelationships": [],
|
|
23
|
+
"links": []
|
|
24
|
+
},
|
|
21
25
|
"filters": [],
|
|
22
26
|
"gridLayouts": [
|
|
23
27
|
{
|
|
@@ -69,12 +73,24 @@
|
|
|
69
73
|
"text_1": {
|
|
70
74
|
"parameters": {
|
|
71
75
|
"content": {
|
|
72
|
-
"
|
|
76
|
+
"richTextContent": [
|
|
77
|
+
{
|
|
78
|
+
"attributes": {
|
|
79
|
+
"size": "48px",
|
|
80
|
+
"color": "rgb(9, 26, 62)"
|
|
81
|
+
},
|
|
82
|
+
"insert": "<%= templateName %> Analytics Dashboard"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"attributes": {
|
|
86
|
+
"align": "center"
|
|
87
|
+
},
|
|
88
|
+
"insert": "\n"
|
|
89
|
+
}
|
|
90
|
+
]
|
|
73
91
|
},
|
|
74
|
-
"
|
|
75
|
-
"showActionMenu": true
|
|
76
|
-
"textAlignment": "center",
|
|
77
|
-
"textColor": "rgb(9, 26, 62)"
|
|
92
|
+
"interactions": [],
|
|
93
|
+
"showActionMenu": true
|
|
78
94
|
},
|
|
79
95
|
"type": "text"
|
|
80
96
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/templates",
|
|
3
|
-
"version": "57.1.
|
|
4
|
-
"salesforceApiVersion": "
|
|
3
|
+
"version": "57.1.2",
|
|
4
|
+
"salesforceApiVersion": "57",
|
|
5
5
|
"description": "Salesforce JS library for templates",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/salesforcedx-templates/issues",
|
|
7
7
|
"main": "lib/index.js",
|
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
"mime-types": "^2.1.27",
|
|
20
20
|
"proxy-agent": "^5.0.0",
|
|
21
21
|
"proxy-from-env": "^1.1.0",
|
|
22
|
-
"
|
|
23
|
-
"tar": "^6.1.10",
|
|
22
|
+
"tar": "^6.1.13",
|
|
24
23
|
"tslib": "^1",
|
|
25
24
|
"yeoman-environment": "^3.9.1",
|
|
26
25
|
"yeoman-generator": "^5.6.1"
|
|
@@ -59,6 +58,7 @@
|
|
|
59
58
|
"nyc": "^15.1.0",
|
|
60
59
|
"prettier": "^2.0.5",
|
|
61
60
|
"pretty-quick": "^3.1.0",
|
|
61
|
+
"shelljs": "^0.8.5",
|
|
62
62
|
"shx": "^0.3.4",
|
|
63
63
|
"sinon": "10.0.0",
|
|
64
64
|
"ts-node": "^10.0.0",
|