@salesforce/templates 53.5.0 → 54.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js
CHANGED
|
@@ -10,5 +10,5 @@ exports.TemplateService = void 0;
|
|
|
10
10
|
const tslib_1 = require("tslib");
|
|
11
11
|
const templateService_1 = require("./service/templateService");
|
|
12
12
|
Object.defineProperty(exports, "TemplateService", { enumerable: true, get: function () { return templateService_1.TemplateService; } });
|
|
13
|
-
|
|
13
|
+
tslib_1.__exportStar(require("./utils/types"), exports);
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEH,+DAA4D;AACnD,gGADA,iCAAe,OACA;AACxB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEH,+DAA4D;AACnD,gGADA,iCAAe,OACA;AACxB,wDAA8B"}
|
|
@@ -25,7 +25,7 @@ const i18n_1 = require("../i18n");
|
|
|
25
25
|
* @param repoUri uri to git repo
|
|
26
26
|
*/
|
|
27
27
|
function getRepoInfo(repoUri) {
|
|
28
|
-
return
|
|
28
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
29
29
|
const [, username, name, t, branch, ...file] = repoUri.pathname.split('/');
|
|
30
30
|
const filePath = `${file.join('/')}`;
|
|
31
31
|
// For repos with no branch information, fetch default branch
|
|
@@ -67,7 +67,7 @@ exports.getStoragePathForCustomTemplates = getStoragePathForCustomTemplates;
|
|
|
67
67
|
* @returns path to the local storage location of the repo
|
|
68
68
|
*/
|
|
69
69
|
function loadCustomTemplatesGitRepo(repoUri, forceLoadingRemoteRepo = false) {
|
|
70
|
-
return
|
|
70
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
71
71
|
const customTemplatesPath = getStoragePathForCustomTemplates(repoUri);
|
|
72
72
|
// Do not load the remote repo if already the repo is already downloaded.
|
|
73
73
|
if (fs.existsSync(customTemplatesPath) && !forceLoadingRemoteRepo) {
|
|
@@ -65,7 +65,7 @@ class TemplateService {
|
|
|
65
65
|
* @param customTemplatesRootPathOrGitRepo custom templates root path or git repo. If not specified, use built-in templates
|
|
66
66
|
*/
|
|
67
67
|
create(templateType, templateOptions, customTemplatesRootPathOrGitRepo) {
|
|
68
|
-
return
|
|
68
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
69
69
|
yield this.setCustomTemplatesRootPathOrGitRepo(customTemplatesRootPathOrGitRepo);
|
|
70
70
|
if (customTemplatesRootPathOrGitRepo) {
|
|
71
71
|
// In VS Code, if creating using a custom template, we need to reset the yeoman environment
|
|
@@ -118,7 +118,7 @@ class TemplateService {
|
|
|
118
118
|
* @param forceLoadingRemoteRepo by default do not reload remote repo if the repo is already downloaded
|
|
119
119
|
*/
|
|
120
120
|
setCustomTemplatesRootPathOrGitRepo(pathOrRepoUri, forceLoadingRemoteRepo = false) {
|
|
121
|
-
return
|
|
121
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
122
122
|
if (pathOrRepoUri === undefined) {
|
|
123
123
|
this.customTemplatesRootPath = undefined;
|
|
124
124
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/templates",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "54.2.0",
|
|
4
4
|
"description": "Salesforce JS library for templates",
|
|
5
5
|
"bugs": "https://github.com/forcedotcom/salesforcedx-templates/issues",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -45,6 +45,10 @@
|
|
|
45
45
|
"typescript": "^4.3.2",
|
|
46
46
|
"yeoman-assert": "^3.1.1"
|
|
47
47
|
},
|
|
48
|
+
"resolutions": {
|
|
49
|
+
"yeoman-generator": "4.11.0",
|
|
50
|
+
"@types/yeoman-generator": "4.11.0"
|
|
51
|
+
},
|
|
48
52
|
"scripts": {
|
|
49
53
|
"clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output",
|
|
50
54
|
"compile": "tsc -b",
|