@salesforce/templates 61.0.1 → 61.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/lib/generators/analyticsTemplateGenerator.d.ts +4 -4
  2. package/lib/generators/analyticsTemplateGenerator.js +20 -18
  3. package/lib/generators/analyticsTemplateGenerator.js.map +1 -1
  4. package/lib/generators/apexClassGenerator.d.ts +4 -4
  5. package/lib/generators/apexClassGenerator.js +12 -9
  6. package/lib/generators/apexClassGenerator.js.map +1 -1
  7. package/lib/generators/apexTriggerGenerator.d.ts +4 -4
  8. package/lib/generators/apexTriggerGenerator.js +12 -9
  9. package/lib/generators/apexTriggerGenerator.js.map +1 -1
  10. package/lib/generators/baseGenerator.d.ts +60 -0
  11. package/lib/generators/baseGenerator.js +204 -0
  12. package/lib/generators/baseGenerator.js.map +1 -0
  13. package/lib/generators/lightningAppGenerator.d.ts +4 -4
  14. package/lib/generators/lightningAppGenerator.js +23 -21
  15. package/lib/generators/lightningAppGenerator.js.map +1 -1
  16. package/lib/generators/lightningComponentGenerator.d.ts +4 -4
  17. package/lib/generators/lightningComponentGenerator.js +51 -48
  18. package/lib/generators/lightningComponentGenerator.js.map +1 -1
  19. package/lib/generators/lightningEventGenerator.d.ts +4 -4
  20. package/lib/generators/lightningEventGenerator.js +18 -16
  21. package/lib/generators/lightningEventGenerator.js.map +1 -1
  22. package/lib/generators/lightningInterfaceGenerator.d.ts +4 -4
  23. package/lib/generators/lightningInterfaceGenerator.js +17 -15
  24. package/lib/generators/lightningInterfaceGenerator.js.map +1 -1
  25. package/lib/generators/lightningTestGenerator.d.ts +4 -4
  26. package/lib/generators/lightningTestGenerator.js +18 -16
  27. package/lib/generators/lightningTestGenerator.js.map +1 -1
  28. package/lib/generators/projectGenerator.d.ts +4 -4
  29. package/lib/generators/projectGenerator.js +91 -88
  30. package/lib/generators/projectGenerator.js.map +1 -1
  31. package/lib/generators/staticResourceGenerator.d.ts +4 -4
  32. package/lib/generators/staticResourceGenerator.js +25 -22
  33. package/lib/generators/staticResourceGenerator.js.map +1 -1
  34. package/lib/generators/visualforceComponentGenerator.d.ts +4 -4
  35. package/lib/generators/visualforceComponentGenerator.js +12 -9
  36. package/lib/generators/visualforceComponentGenerator.js.map +1 -1
  37. package/lib/generators/visualforcePageGenerator.d.ts +4 -4
  38. package/lib/generators/visualforcePageGenerator.js +12 -9
  39. package/lib/generators/visualforcePageGenerator.js.map +1 -1
  40. package/lib/service/templateService.d.ts +6 -24
  41. package/lib/service/templateService.js +23 -99
  42. package/lib/service/templateService.js.map +1 -1
  43. package/lib/utils/index.d.ts +0 -3
  44. package/lib/utils/index.js +1 -5
  45. package/lib/utils/index.js.map +1 -1
  46. package/lib/utils/types.d.ts +3 -7
  47. package/lib/utils/types.js +7 -1
  48. package/lib/utils/types.js.map +1 -1
  49. package/package.json +7 -12
  50. package/lib/generators/sfdxGenerator.d.ts +0 -32
  51. package/lib/generators/sfdxGenerator.js +0 -69
  52. package/lib/generators/sfdxGenerator.js.map +0 -1
  53. package/lib/utils/adapter.d.ts +0 -8
  54. package/lib/utils/adapter.js +0 -23
  55. package/lib/utils/adapter.js.map +0 -1
  56. package/lib/utils/logger.d.ts +0 -40
  57. package/lib/utils/logger.js +0 -130
  58. package/lib/utils/logger.js.map +0 -1
@@ -6,27 +6,28 @@
6
6
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.TemplateService = void 0;
9
+ exports.TemplateService = exports.importGenerator = void 0;
10
10
  const tslib_1 = require("tslib");
11
- const fs = require("fs");
12
- const path = require("path");
13
- const yeoman = require("yeoman-environment");
14
- const i18n_1 = require("../i18n");
15
- const utils_1 = require("../utils");
16
11
  const types_1 = require("../utils/types");
17
- const gitRepoUtils_1 = require("./gitRepoUtils");
12
+ function importGenerator(templateType) {
13
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
14
+ const generatorClass = types_1.TemplateType[templateType].toString().charAt(0).toLowerCase() +
15
+ types_1.TemplateType[templateType].toString().slice(1) +
16
+ 'Generator';
17
+ return (yield Promise.resolve(`${`../generators/${generatorClass}`}`).then(s => require(s))).default;
18
+ });
19
+ }
20
+ exports.importGenerator = importGenerator;
18
21
  /**
19
22
  * Template Service
20
23
  */
21
24
  class TemplateService {
22
25
  constructor(cwd = process.cwd()) {
23
- this.adapter = new utils_1.ForceGeneratorAdapter();
24
- // @ts-ignore the adaptor doesn't fully implement yeoman's adaptor yet
25
- this.env = yeoman.createEnv(undefined, { cwd }, this.adapter);
26
+ this._cwd = cwd;
26
27
  }
27
28
  /**
28
29
  * Get an instance of TemplateService
29
- * @param cwd cwd of current yeoman environment. CLI: don't need to set explicitly. VS Code: it's typically the root workspace path
30
+ * @param cwd cwd of current environment. CLI: don't need to set explicitly. VS Code: it's typically the root workspace path
30
31
  */
31
32
  static getInstance(cwd) {
32
33
  if (!TemplateService.instance) {
@@ -38,25 +39,17 @@ class TemplateService {
38
39
  return TemplateService.instance;
39
40
  }
40
41
  /**
41
- * Getting cwd of current yeoman environment
42
+ * Getting cwd of current environment
42
43
  */
43
44
  get cwd() {
44
- return this.env.cwd;
45
+ return this._cwd;
45
46
  }
46
47
  /**
47
- * Setting cwd of current yeoman environment
48
+ * Setting cwd of current environment
48
49
  * In VS Code, it's typically the root workspace path
49
50
  */
50
51
  set cwd(cwd) {
51
- this.env.cwd = cwd;
52
- }
53
- /**
54
- * Look up package version of @salesforce/templates package to supply a default API version
55
- */
56
- static getDefaultApiVersion() {
57
- const packageJsonPath = path.join('..', '..', 'package.json');
58
- const versionTrimmed = require(packageJsonPath).salesforceApiVersion.trim();
59
- return `${versionTrimmed.split('.')[0]}.0`;
52
+ this._cwd = cwd;
60
53
  }
61
54
  /**
62
55
  * Create using templates
@@ -66,82 +59,13 @@ class TemplateService {
66
59
  */
67
60
  create(templateType, templateOptions, customTemplatesRootPathOrGitRepo) {
68
61
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
69
- yield this.setCustomTemplatesRootPathOrGitRepo(customTemplatesRootPathOrGitRepo);
70
- if (customTemplatesRootPathOrGitRepo) {
71
- // In VS Code, if creating using a custom template, we need to reset the yeoman environment
72
- this.resetEnv();
73
- }
74
- const generatorClass = types_1.TemplateType[templateType].toString().charAt(0).toLowerCase() +
75
- types_1.TemplateType[templateType].toString().slice(1) +
76
- 'Generator';
77
- const generatorNamespace = `@salesforce/${generatorClass}`;
78
- let generator = this.env.get(generatorNamespace);
79
- if (!generator) {
80
- generator = (yield Promise.resolve(`${`../generators/${generatorClass}`}`).then(s => require(s))).default;
81
- const generatorPackagePath = path.join(__dirname, '..', '..');
82
- this.env.registerStub(generator, generatorNamespace, generatorPackagePath);
83
- }
84
- this.adapter.log.clear();
85
- return new Promise((resolve, reject) => {
86
- this.env
87
- .run(generatorNamespace, templateOptions)
88
- .then(() => {
89
- const outputDir = path.resolve(this.cwd, templateOptions.outputdir);
90
- const created = this.adapter.log.getCleanOutput();
91
- const rawOutput = i18n_1.nls.localize('RawOutput', [
92
- outputDir,
93
- this.adapter.log.getOutput(),
94
- ]);
95
- const result = {
96
- outputDir,
97
- created,
98
- rawOutput,
99
- };
100
- resolve(result);
101
- })
102
- .catch((err) => {
103
- reject(err);
104
- });
105
- });
106
- });
107
- }
108
- resetEnv() {
109
- const cwd = this.env.cwd;
110
- // @ts-ignore
111
- this.env = yeoman.createEnv(undefined, { cwd }, this.adapter);
112
- }
113
- /**
114
- * Set custom templates root path or git repo.
115
- * Throws an error if local path doesn't exist or cannot reach git repo.
116
- * @param customTemplatesRootPathOrGitRepo custom templates root path or git repo
117
- * @param forceLoadingRemoteRepo by default do not reload remote repo if the repo is already downloaded
118
- */
119
- setCustomTemplatesRootPathOrGitRepo(pathOrRepoUri_1) {
120
- return tslib_1.__awaiter(this, arguments, void 0, function* (pathOrRepoUri, forceLoadingRemoteRepo = false) {
121
- if (pathOrRepoUri === undefined) {
122
- this.customTemplatesRootPath = undefined;
123
- return;
124
- }
125
- try {
126
- // if pathOrRepoUri is valid url, load the repo
127
- const url = new URL(pathOrRepoUri);
128
- if (url) {
129
- this.customTemplatesRootPath = yield (0, gitRepoUtils_1.loadCustomTemplatesGitRepo)(url, forceLoadingRemoteRepo);
130
- }
131
- }
132
- catch (error) {
133
- const err = error;
134
- if (err.code !== 'ERR_INVALID_URL') {
135
- throw error;
136
- }
137
- const localTemplatesPath = pathOrRepoUri;
138
- if (fs.existsSync(localTemplatesPath)) {
139
- this.customTemplatesRootPath = localTemplatesPath;
140
- }
141
- else {
142
- throw new Error(i18n_1.nls.localize('localCustomTemplateDoNotExist', localTemplatesPath));
143
- }
144
- }
62
+ const runOptions = {
63
+ cwd: this.cwd,
64
+ customTemplatesRootPathOrGitRepo,
65
+ };
66
+ const Generator = yield importGenerator(templateType);
67
+ const instance = new Generator(templateOptions);
68
+ return instance.run(runOptions);
145
69
  });
146
70
  }
147
71
  }
@@ -1 +1 @@
1
- {"version":3,"file":"templateService.js","sourceRoot":"","sources":["../../src/service/templateService.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEH,yBAAyB;AACzB,6BAA6B;AAC7B,6CAA6C;AAE7C,kCAA8B;AAC9B,oCAAiD;AACjD,0CAA6E;AAC7E,iDAA4D;AAM5D;;GAEG;AACH,MAAa,eAAe;IAI1B,YAAY,MAAc,OAAO,CAAC,GAAG,EAAE;QACrC,IAAI,CAAC,OAAO,GAAG,IAAI,6BAAqB,EAAE,CAAC;QAC3C,sEAAsE;QACtE,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,WAAW,CAAC,GAAY;QACpC,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC;YAC9B,eAAe,CAAC,QAAQ,GAAG,IAAI,eAAe,CA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C,GAAG,CAAC,GAAG,CAAC;QACzB,aAAa;QACb,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;;;;OAKG;IACU,mCAAmC;qEAC9C,aAAsB,EACtB,sBAAsB,GAAG,KAAK;YAE9B,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;gBAChC,IAAI,CAAC,uBAAuB,GAAG,SAAS,CAAC;gBACzC,OAAO;YACT,CAAC;YAED,IAAI,CAAC;gBACH,+CAA+C;gBAC/C,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC,CAAC;gBACnC,IAAI,GAAG,EAAE,CAAC;oBACR,IAAI,CAAC,uBAAuB,GAAG,MAAM,IAAA,yCAA0B,EAC7D,GAAG,EACH,sBAAsB,CACvB,CAAC;gBACJ,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,GAAG,GAAG,KAAgB,CAAC;gBAC7B,IAAI,GAAG,CAAC,IAAI,KAAK,iBAAiB,EAAE,CAAC;oBACnC,MAAM,KAAK,CAAC;gBACd,CAAC;gBAED,MAAM,kBAAkB,GAAG,aAAa,CAAC;gBACzC,IAAI,EAAE,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE,CAAC;oBACtC,IAAI,CAAC,uBAAuB,GAAG,kBAAkB,CAAC;gBACpD,CAAC;qBAAM,CAAC;oBACN,MAAM,IAAI,KAAK,CACb,UAAG,CAAC,QAAQ,CAAC,+BAA+B,EAAE,kBAAkB,CAAC,CAClE,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;KAAA;CACF;AA/JD,0CA+JC"}
1
+ {"version":3,"file":"templateService.js","sourceRoot":"","sources":["../../src/service/templateService.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEH,0CAIwB;AAExB,SAAsB,eAAe,CAAC,YAA0B;;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,OAAO,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAClC,CAAC;KAAA;CACF;AAxDD,0CAwDC"}
@@ -1,4 +1 @@
1
1
  export { CreateUtil } from './createUtil';
2
- export { Log } from './logger';
3
- export { ForceGeneratorAdapter } from './adapter';
4
- export { Answers } from './types';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ForceGeneratorAdapter = exports.Log = exports.CreateUtil = void 0;
3
+ exports.CreateUtil = void 0;
4
4
  /*
5
5
  * Copyright (c) 2021, salesforce.com, inc.
6
6
  * All rights reserved.
@@ -9,8 +9,4 @@ exports.ForceGeneratorAdapter = exports.Log = exports.CreateUtil = void 0;
9
9
  */
10
10
  var createUtil_1 = require("./createUtil");
11
11
  Object.defineProperty(exports, "CreateUtil", { enumerable: true, get: function () { return createUtil_1.CreateUtil; } });
12
- var logger_1 = require("./logger");
13
- Object.defineProperty(exports, "Log", { enumerable: true, get: function () { return logger_1.Log; } });
14
- var adapter_1 = require("./adapter");
15
- Object.defineProperty(exports, "ForceGeneratorAdapter", { enumerable: true, get: function () { return adapter_1.ForceGeneratorAdapter; } });
16
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,mCAA+B;AAAtB,6FAAA,GAAG,OAAA;AACZ,qCAAkD;AAAzC,gHAAA,qBAAqB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2CAA0C;AAAjC,wGAAA,UAAU,OAAA"}
@@ -1,17 +1,13 @@
1
- interface StringKeyValueObject<V> {
2
- [opt: string]: V;
3
- }
4
- export type Answers = StringKeyValueObject<string>;
5
- export interface CreateOutput {
1
+ export type CreateOutput = {
6
2
  outputDir: string;
7
3
  created: string[];
8
4
  rawOutput: string;
9
- }
5
+ };
10
6
  /**
11
7
  * Available Template types
12
8
  * Each template type must have a corresponding generator class:
13
9
  * - generator class file should locate in generators/
14
- * - generator class file should default export a generator class extending SfdxGenerator
10
+ * - generator class file should default export a generator class extending SfGenerator
15
11
  * - generator class file should have a name same as the type name, except with the first letter lowercased
16
12
  */
17
13
  export declare enum TemplateType {
@@ -1,11 +1,17 @@
1
1
  "use strict";
2
+ /*
3
+ * Copyright (c) 2019, salesforce.com, inc.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
2
8
  Object.defineProperty(exports, "__esModule", { value: true });
3
9
  exports.TemplateType = void 0;
4
10
  /**
5
11
  * Available Template types
6
12
  * Each template type must have a corresponding generator class:
7
13
  * - generator class file should locate in generators/
8
- * - generator class file should default export a generator class extending SfdxGenerator
14
+ * - generator class file should default export a generator class extending SfGenerator
9
15
  * - generator class file should have a name same as the type name, except with the first letter lowercased
10
16
  */
11
17
  var TemplateType;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":";;;AAgBA;;;;;;GAMG;AACH,IAAY,YAaX;AAbD,WAAY,YAAY;IACtB,yEAAiB,CAAA;IACjB,yDAAS,CAAA;IACT,6DAAW,CAAA;IACX,+DAAY,CAAA;IACZ,2EAAkB,CAAA;IAClB,mEAAc,CAAA;IACd,2EAAkB,CAAA;IAClB,iEAAa,CAAA;IACb,qDAAO,CAAA;IACP,+EAAoB,CAAA;IACpB,sEAAe,CAAA;IACf,oEAAc,CAAA;AAChB,CAAC,EAbW,YAAY,4BAAZ,YAAY,QAavB"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAQH;;;;;;GAMG;AACH,IAAY,YAaX;AAbD,WAAY,YAAY;IACtB,yEAAiB,CAAA;IACjB,yDAAS,CAAA;IACT,6DAAW,CAAA;IACX,+DAAY,CAAA;IACZ,2EAAkB,CAAA;IAClB,mEAAc,CAAA;IACd,2EAAkB,CAAA;IAClB,iEAAa,CAAA;IACb,qDAAO,CAAA;IACP,+EAAoB,CAAA;IACpB,sEAAe,CAAA;IACf,oEAAc,CAAA;AAChB,CAAC,EAbW,YAAY,4BAAZ,YAAY,QAavB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/templates",
3
- "version": "61.0.1",
3
+ "version": "61.1.0",
4
4
  "salesforceApiVersion": "61",
5
5
  "description": "Salesforce JS library for templates",
6
6
  "bugs": "https://github.com/forcedotcom/salesforcedx-templates/issues",
@@ -15,28 +15,24 @@
15
15
  "dependencies": {
16
16
  "@salesforce/core": "^7.3.10",
17
17
  "@salesforce/kit": "^3.1.2",
18
+ "ejs": "^3.1.10",
18
19
  "got": "^11.8.2",
19
20
  "hpagent": "^1.2.0",
20
21
  "mime-types": "^2.1.35",
21
22
  "proxy-from-env": "^1.1.0",
22
23
  "tar": "^6.2.0",
23
- "tslib": "^2.6.2",
24
- "yeoman-environment": "^3.9.1",
25
- "yeoman-generator": "^5.6.1"
24
+ "tslib": "^2.6.2"
26
25
  },
27
26
  "devDependencies": {
28
27
  "@salesforce/dev-config": "^4.1.0",
29
28
  "@salesforce/dev-scripts": "^6.0.3",
30
29
  "@salesforce/prettier-config": "^0.0.3",
31
30
  "@types/chai-as-promised": "^7.1.8",
32
- "@types/fs-extra": "^11.0.4",
31
+ "@types/ejs": "^3.1.5",
33
32
  "@types/got": "^9.6.12",
34
33
  "@types/mime-types": "^2.1.4",
35
34
  "@types/proxy-from-env": "^1.0.4",
36
35
  "@types/tar": "^6.1.8",
37
- "@types/yeoman-assert": "^3.1.4",
38
- "@types/yeoman-environment": "^2.10.11",
39
- "@types/yeoman-generator": "^5.2.14",
40
36
  "@typescript-eslint/eslint-plugin": "^5.30.7",
41
37
  "@typescript-eslint/parser": "^5.30.7",
42
38
  "chai": "^4.3.10",
@@ -59,10 +55,9 @@
59
55
  "pretty-quick": "^3.1.0",
60
56
  "shelljs": "^0.8.5",
61
57
  "shx": "^0.3.4",
62
- "sinon": "^17.0.1",
58
+ "sinon": "^18",
63
59
  "ts-node": "^10.9.2",
64
- "typescript": "^5.4.5",
65
- "yeoman-assert": "^3.1.1"
60
+ "typescript": "^5.4.5"
66
61
  },
67
62
  "engines": {
68
63
  "node": ">=18.18.2"
@@ -79,7 +74,7 @@
79
74
  "compile": "tsc -b",
80
75
  "lint": "eslint -c .eslintrc.json --ext .ts ./src ./test",
81
76
  "lint:fix": "eslint -c .eslintrc.json --ext .ts ./src ./test --fix",
82
- "test": "nyc --exclude src/i18n/localization.ts --extension .ts mocha --parallel --forbid-only \"test/**/*.test.ts\"",
77
+ "test": "nyc --exclude src/i18n/localization.ts --extension .ts mocha --parallel --forbid-only \"test/**/*.test.ts\" --timeout 600000",
83
78
  "prepare": "husky install"
84
79
  },
85
80
  "config": {
@@ -1,32 +0,0 @@
1
- import * as Generator from 'yeoman-generator';
2
- import { TemplateOptions } from '../utils/types';
3
- /**
4
- * Base class for generators
5
- */
6
- export declare abstract class SfdxGenerator<TOptions extends TemplateOptions> extends Generator<Generator.GeneratorOptions> {
7
- options: TOptions;
8
- /**
9
- * Set by sourceRootWithPartialPath called in generator
10
- */
11
- builtInTemplatesRootPath?: string;
12
- protected outputdir: string;
13
- protected apiversion: string;
14
- /**
15
- * The constructor for the SFDXGenerator.
16
- *
17
- * @param args arguments to pass to the yeoman generator constructor.
18
- * @param options SFDXGenerator specific options.
19
- * @param features The yeoman GeneratorFeatures. Defaults to a customInstallTask of false in order to skip the automatic npm/yarn install. Override to true if you need to run the package manager install.
20
- */
21
- constructor(args: string | string[], options: TOptions, features?: Generator.GeneratorFeatures);
22
- /**
23
- * Validate provided options
24
- */
25
- abstract validateOptions(): void;
26
- /**
27
- * Set source root to built-in templates or custom templates root if available.
28
- * @param partialPath the relative path from the templates folder to templates root folder.
29
- */
30
- sourceRootWithPartialPath(partialPath: string): void;
31
- templatePath(...paths: string[]): string;
32
- }
@@ -1,69 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2020, salesforce.com, inc.
4
- * All rights reserved.
5
- * Licensed under the BSD 3-Clause license.
6
- * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.SfdxGenerator = void 0;
10
- const fs = require("fs");
11
- const path = require("path");
12
- const Generator = require("yeoman-generator");
13
- const templateService_1 = require("../service/templateService");
14
- /**
15
- * Base class for generators
16
- */
17
- class SfdxGenerator extends Generator {
18
- /**
19
- * The constructor for the SFDXGenerator.
20
- *
21
- * @param args arguments to pass to the yeoman generator constructor.
22
- * @param options SFDXGenerator specific options.
23
- * @param features The yeoman GeneratorFeatures. Defaults to a customInstallTask of false in order to skip the automatic npm/yarn install. Override to true if you need to run the package manager install.
24
- */
25
- constructor(args, options,
26
- // custom install task set to true keeps us from getting a warning message about a missing package.json file.
27
- // Note for generators that need an npm install it should be set to false.
28
- features = {
29
- customInstallTask: true,
30
- }) {
31
- var _a, _b;
32
- super(args, options, features);
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
- this.validateOptions();
37
- }
38
- /**
39
- * Set source root to built-in templates or custom templates root if available.
40
- * @param partialPath the relative path from the templates folder to templates root folder.
41
- */
42
- sourceRootWithPartialPath(partialPath) {
43
- this.builtInTemplatesRootPath = path.join(__dirname, '..', 'templates', partialPath);
44
- const { customTemplatesRootPath } = templateService_1.TemplateService.getInstance();
45
- if (!customTemplatesRootPath) {
46
- this.sourceRoot(path.join(this.builtInTemplatesRootPath));
47
- }
48
- else {
49
- if (fs.existsSync(path.join(customTemplatesRootPath, partialPath))) {
50
- this.sourceRoot(path.join(customTemplatesRootPath, partialPath));
51
- }
52
- }
53
- }
54
- templatePath(...paths) {
55
- // The template paths are relative to the generator's source root
56
- // If we have set a custom template root, the source root should have already been set.
57
- // Otherwise we'll fallback to the built-in templates
58
- const customPath = super.templatePath(...paths);
59
- if (fs.existsSync(customPath)) {
60
- return customPath;
61
- }
62
- else {
63
- // files that are builtin and not in the custom template folder
64
- return super.templatePath(path.join(this.builtInTemplatesRootPath, ...paths));
65
- }
66
- }
67
- }
68
- exports.SfdxGenerator = SfdxGenerator;
69
- //# sourceMappingURL=sfdxGenerator.js.map
@@ -1 +0,0 @@
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;;QAED,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC/B,IAAI,CAAC,UAAU;YACb,MAAA,OAAO,CAAC,UAAU,mCAAI,iCAAe,CAAC,oBAAoB,EAAE,CAAC;QAC/D,IAAI,CAAC,SAAS,GAAG,MAAA,OAAO,CAAC,SAAS,mCAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QACpD,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IAOD;;;OAGG;IACI,yBAAyB,CAAC,WAAmB;QAClD,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC,IAAI,CACvC,SAAS,EACT,IAAI,EACJ,WAAW,EACX,WAAW,CACZ,CAAC;QACF,MAAM,EAAE,uBAAuB,EAAE,GAAG,iCAAe,CAAC,WAAW,EAAE,CAAC;QAClE,IAAI,CAAC,uBAAuB,EAAE,CAAC;YAC7B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC;QAC5D,CAAC;aAAM,CAAC;YACN,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC;gBACnE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE,WAAW,CAAC,CAAC,CAAC;YACnE,CAAC;QACH,CAAC;IACH,CAAC;IAEM,YAAY,CAAC,GAAG,KAAe;QACpC,iEAAiE;QACjE,uFAAuF;QACvF,qDAAqD;QACrD,MAAM,UAAU,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,CAAC;QAChD,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAC9B,OAAO,UAAU,CAAC;QACpB,CAAC;aAAM,CAAC;YACN,+DAA+D;YAC/D,OAAO,KAAK,CAAC,YAAY,CACvB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,wBAAyB,EAAE,GAAG,KAAK,CAAC,CACpD,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AA3ED,sCA2EC"}
@@ -1,8 +0,0 @@
1
- import * as generator from 'yeoman-generator';
2
- import { Answers } from './types';
3
- export declare class ForceGeneratorAdapter {
4
- private _log;
5
- log: import("./logger").ILogRef;
6
- constructor();
7
- prompt(opt: [generator.Questions], cb: () => void): Promise<Answers>;
8
- }
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ForceGeneratorAdapter = void 0;
4
- const logger_1 = require("./logger");
5
- class ForceGeneratorAdapter {
6
- constructor() {
7
- this._log = new logger_1.Log();
8
- this.log = (0, logger_1.getYeomanLogger)(this._log);
9
- }
10
- prompt(opt, cb) {
11
- const promptPromise = new Promise((resolve) => {
12
- const answers = {};
13
- answers[0] = '';
14
- resolve(answers);
15
- });
16
- promptPromise.then(cb || undefined).catch(() => {
17
- throw new Error('Error resolving conflicting files');
18
- });
19
- return promptPromise;
20
- }
21
- }
22
- exports.ForceGeneratorAdapter = ForceGeneratorAdapter;
23
- //# sourceMappingURL=adapter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../src/utils/adapter.ts"],"names":[],"mappings":";;;AAOA,qCAAgD;AAGhD,MAAa,qBAAqB;IAIhC;QAHQ,SAAI,GAAG,IAAI,YAAG,EAAE,CAAC;QAClB,QAAG,GAAG,IAAA,wBAAe,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEzB,CAAC;IAET,MAAM,CAAC,GAA0B,EAAE,EAAc;QACtD,MAAM,aAAa,GAAG,IAAI,OAAO,CAAU,CAAC,OAAO,EAAE,EAAE;YACrD,MAAM,OAAO,GAAY,EAAE,CAAC;YAC5B,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;YAChB,OAAO,CAAC,OAAO,CAAC,CAAC;QACnB,CAAC,CAAC,CAAC;QACH,aAAa,CAAC,IAAI,CAAC,EAAE,IAAI,SAAS,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE;YAC7C,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACvD,CAAC,CAAC,CAAC;QACH,OAAO,aAAa,CAAC;IACvB,CAAC;CACF;AAjBD,sDAiBC"}
@@ -1,40 +0,0 @@
1
- export declare class Log {
2
- private output;
3
- private cleanOutput;
4
- [index: string]: any;
5
- constructor();
6
- getOutput(): string;
7
- getCleanOutput(): string[];
8
- write(...args: [string]): Log;
9
- pad(status: string): string;
10
- setOutput(text: string): void;
11
- setCleanOutput(cleanText: string[]): void;
12
- clear(): void;
13
- }
14
- export interface ILogRef {
15
- (args: string): void;
16
- clear(): void;
17
- setCleanOutput(...args: string[]): void;
18
- setOutput(text: string): void;
19
- pad(status: string): string;
20
- write(arg: string): ILogRef;
21
- getCleanOutput(): string[];
22
- getOutput(): string;
23
- skip(arg: string): ILogRef;
24
- force(arg: string): ILogRef;
25
- create(arg: string): ILogRef;
26
- invoke(arg: string): ILogRef;
27
- conflict(arg: string): ILogRef;
28
- identical(arg: string): ILogRef;
29
- info(arg: string): ILogRef;
30
- }
31
- /**
32
- * The Yeoman adapter had a log property that has the unusual
33
- * requirement of being both a function and an object. See the yeoman
34
- * environment log implementation
35
- * https://github.com/yeoman/environment/blob/5f0e87b696c4926ba69b9fbd83e4486a02492fcc/lib/util/log.js#L59
36
- *
37
- * @param log The Log instance for the Yeoman logger to utilize.
38
- * @returns The log instance that is both a function and an object.
39
- */
40
- export declare const getYeomanLogger: (log: Log) => ILogRef;
@@ -1,130 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2021, salesforce.com, inc.
4
- * All rights reserved.
5
- * Licensed under the BSD 3-Clause license.
6
- * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.getYeomanLogger = exports.Log = void 0;
10
- const util = require("util");
11
- const padding = ' ';
12
- const statuses = [
13
- 'skip',
14
- 'force',
15
- 'create',
16
- 'invoke',
17
- 'conflict',
18
- 'identical',
19
- 'info',
20
- ];
21
- class Log {
22
- constructor() {
23
- this.output = '';
24
- this.cleanOutput = [];
25
- for (const status of statuses) {
26
- this[status] = (arg) => {
27
- if (status !== 'identical' && status !== 'conflict') {
28
- this.cleanOutput.push(arg);
29
- }
30
- this.write(this.pad(status)).write(padding);
31
- this.write(`${arg}\n`);
32
- return this;
33
- };
34
- }
35
- }
36
- getOutput() {
37
- return this.output;
38
- }
39
- getCleanOutput() {
40
- return this.cleanOutput;
41
- }
42
- write(...args) {
43
- /* eslint prefer-spread: off */
44
- this.output = this.output + util.format.apply(util, args);
45
- return this;
46
- }
47
- pad(status) {
48
- const max = 'identical'.length;
49
- const delta = max - status.length;
50
- return delta ? new Array(delta + 1).join(' ') + status : status;
51
- }
52
- setOutput(text) {
53
- this.output = text;
54
- }
55
- setCleanOutput(cleanText) {
56
- this.cleanOutput = cleanText;
57
- }
58
- clear() {
59
- this.output = '';
60
- this.cleanOutput = [];
61
- }
62
- }
63
- exports.Log = Log;
64
- /**
65
- * The Yeoman adapter had a log property that has the unusual
66
- * requirement of being both a function and an object. See the yeoman
67
- * environment log implementation
68
- * https://github.com/yeoman/environment/blob/5f0e87b696c4926ba69b9fbd83e4486a02492fcc/lib/util/log.js#L59
69
- *
70
- * @param log The Log instance for the Yeoman logger to utilize.
71
- * @returns The log instance that is both a function and an object.
72
- */
73
- const getYeomanLogger = (log) => {
74
- const yeomanLogger = (args) => {
75
- log.info(args);
76
- };
77
- yeomanLogger.skip = (args) => {
78
- log.skip(args);
79
- return yeomanLogger;
80
- };
81
- yeomanLogger.force = (args) => {
82
- log.force(args);
83
- return yeomanLogger;
84
- };
85
- yeomanLogger.create = (args) => {
86
- log.create(args);
87
- return yeomanLogger;
88
- };
89
- yeomanLogger.invoke = (args) => {
90
- log.invoke(args);
91
- return yeomanLogger;
92
- };
93
- yeomanLogger.conflict = (args) => {
94
- log.conflict(args);
95
- return yeomanLogger;
96
- };
97
- yeomanLogger.identical = (args) => {
98
- log.identical(args);
99
- return yeomanLogger;
100
- };
101
- yeomanLogger.info = (args) => {
102
- log.info(args);
103
- return yeomanLogger;
104
- };
105
- yeomanLogger.clear = () => {
106
- log.clear();
107
- };
108
- yeomanLogger.setCleanOutput = (...args) => {
109
- log.setCleanOutput(args);
110
- };
111
- yeomanLogger.setOutput = (text) => {
112
- log.setOutput(text);
113
- };
114
- yeomanLogger.pad = (status) => {
115
- return log.pad(status);
116
- };
117
- yeomanLogger.write = (...args) => {
118
- log.write(...args);
119
- return yeomanLogger;
120
- };
121
- yeomanLogger.getCleanOutput = () => {
122
- return log.getCleanOutput();
123
- };
124
- yeomanLogger.getOutput = () => {
125
- return log.getOutput();
126
- };
127
- return yeomanLogger;
128
- };
129
- exports.getYeomanLogger = getYeomanLogger;
130
- //# sourceMappingURL=logger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6BAA6B;AAE7B,MAAM,OAAO,GAAG,GAAG,CAAC;AACpB,MAAM,QAAQ,GAAG;IACf,MAAM;IACN,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,WAAW;IACX,MAAM;CACP,CAAC;AAEF,MAAa,GAAG;IAKd;QAJQ,WAAM,GAAG,EAAE,CAAC;QACZ,gBAAW,GAAa,EAAE,CAAC;QAIjC,KAAK,MAAM,MAAM,IAAI,QAAQ,EAAE,CAAC;YAC9B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAW,EAAE,EAAE;gBAC7B,IAAI,MAAM,KAAK,WAAW,IAAI,MAAM,KAAK,UAAU,EAAE,CAAC;oBACpD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC7B,CAAC;gBACD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;gBAC5C,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;gBACvB,OAAO,IAAI,CAAC;YACd,CAAC,CAAC;QACJ,CAAC;IACH,CAAC;IAEM,SAAS;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAEM,cAAc;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAEM,KAAK,CAAC,GAAG,IAAc;QAC5B,+BAA+B;QAC/B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,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