@tmsfe/tmskit 0.0.35 → 0.0.37

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/dist/index.cjs.js CHANGED
@@ -455,7 +455,7 @@ const CREATE_TEMPLATE_QUESTION$1 = [{
455
455
  name: '小程序项目',
456
456
  value: 'mp'
457
457
  }, {
458
- name: '小程序模块-非独立分包',
458
+ name: '小程序模块',
459
459
  value: 'mp-module'
460
460
  }, {
461
461
  name: '构建工具扩展命令',
@@ -1037,7 +1037,7 @@ const render = render_1;
1037
1037
  const ask = ask_1;
1038
1038
  const FILES_TO_IGNORE = ignoreFiles;
1039
1039
  const generator$1 = (buildDir, distDir, preMetadata = {}) => new Promise((resolve, reject) => {
1040
- Metalsmith(buildDir).metadata(preMetadata).ignore(FILES_TO_IGNORE).clean(false).use(ask(buildDir)).source('./').destination(distDir).use(render).use(render).build(err => {
1040
+ Metalsmith(buildDir).metadata(preMetadata).ignore(FILES_TO_IGNORE).clean(false).use(ask(buildDir)).source('./').destination(distDir).use(render).build(err => {
1041
1041
  if (err) {
1042
1042
  reject(err);
1043
1043
  } else {
@@ -1161,10 +1161,9 @@ async function create(projectName) {
1161
1161
  report$9('create-start', {
1162
1162
  projectType
1163
1163
  });
1164
- console.log('targetDir', targetDir, TEMPLATE_DIR);
1164
+
1165
1165
  // 创建项目目录
1166
1166
  await createProjectDir(targetDir);
1167
- console.log('createProjectDir222');
1168
1167
 
1169
1168
  // 新创建缓存目录
1170
1169
  if (fs$g.existsSync(TEMPLATE_DIR)) {
@@ -1173,7 +1172,6 @@ async function create(projectName) {
1173
1172
  fs$g.mkdirSync(TEMPLATE_DIR, {
1174
1173
  recursive: true
1175
1174
  });
1176
- console.log('downloadAndUnZipTemplate0000', TEMPLATE_DIR, TEMPLATE_URL, TEMPLATE_NAME);
1177
1175
 
1178
1176
  // 下载和解压模板
1179
1177
  await downloadAndUnZipTemplate(TEMPLATE_DIR, TEMPLATE_URL, TEMPLATE_NAME);
@@ -1546,7 +1544,7 @@ function replaceGitUrlAccount(httpRepoUrl, moduleName) {
1546
1544
  } = (tmsConfig === null || tmsConfig === void 0 ? void 0 : (_tmsConfig$gitAccount = tmsConfig.gitAccount) === null || _tmsConfig$gitAccount === void 0 ? void 0 : _tmsConfig$gitAccount[moduleName]) || (tmsConfig === null || tmsConfig === void 0 ? void 0 : (_tmsConfig$gitAccount2 = tmsConfig.gitAccount) === null || _tmsConfig$gitAccount2 === void 0 ? void 0 : _tmsConfig$gitAccount2[httpRepoUrl]) || (tmsConfig === null || tmsConfig === void 0 ? void 0 : (_tmsConfig$gitAccount3 = tmsConfig.gitAccount) === null || _tmsConfig$gitAccount3 === void 0 ? void 0 : _tmsConfig$gitAccount3[group]) || {};
1547
1545
  const urlPrefixReg = /http(s)?:\/\//;
1548
1546
  if (username && pass && urlPrefixReg.test(gitUrl)) {
1549
- gitUrl = gitUrl.replace(urlPrefixReg, val => `${val}${encodeURIComponent(username)}:${pass}@`);
1547
+ gitUrl = gitUrl.replace(urlPrefixReg, val => `${val}${encodeURIComponent(username)}:${encodeURIComponent(pass)}@`);
1550
1548
  }
1551
1549
  return gitUrl;
1552
1550
  }
@@ -3077,7 +3075,6 @@ function delOtherPackages(tmsConfig, targetSubPackages) {
3077
3075
  }
3078
3076
  });
3079
3077
  }
3080
-
3081
3078
  async function dev$3(tmsConfig, targetModules) {
3082
3079
  var _tmsConfig$hooks;
3083
3080
  const {
@@ -3906,11 +3903,11 @@ var entry = [{
3906
3903
 
3907
3904
  var require$$12 = {
3908
3905
  name: "@tmsfe/tmskit",
3909
- version: "0.0.35",
3906
+ version: "0.0.37",
3910
3907
  description: "tmskit",
3911
- main: "src/index.js",
3908
+ main: "dist/index.cjs",
3912
3909
  bin: {
3913
- tmskit: "src/index.js"
3910
+ tmskit: "main.js"
3914
3911
  },
3915
3912
  files: [
3916
3913
  "build",
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@tmsfe/tmskit",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "description": "tmskit",
5
- "main": "src/index.js",
5
+ "main": "dist/index.cjs",
6
6
  "bin": {
7
- "tmskit": "src/index.js"
7
+ "tmskit": "main.js"
8
8
  },
9
9
  "files": [
10
10
  "build",
@@ -75,7 +75,7 @@ const CREATE_TEMPLATE_QUESTION = [
75
75
  name: '小程序项目',
76
76
  value: 'mp',
77
77
  }, {
78
- name: '小程序模块-非独立分包',
78
+ name: '小程序模块',
79
79
  value: 'mp-module',
80
80
  }, {
81
81
  name: '构建工具扩展命令',
@@ -31,7 +31,7 @@ function replaceGitUrlAccount(httpRepoUrl, moduleName) {
31
31
  const urlPrefixReg = /http(s)?:\/\//;
32
32
 
33
33
  if (username && pass && urlPrefixReg.test(gitUrl)) {
34
- gitUrl = gitUrl.replace(urlPrefixReg, val => `${val}${encodeURIComponent(username)}:${pass}@`);
34
+ gitUrl = gitUrl.replace(urlPrefixReg, val => `${val}${encodeURIComponent(username)}:${encodeURIComponent(pass)}@`);
35
35
  }
36
36
 
37
37
  return gitUrl;
@@ -12,7 +12,6 @@ const generator = (buildDir, distDir, preMetadata = {}) => new Promise((resolve,
12
12
  .source('./')
13
13
  .destination(distDir)
14
14
  .use(render)
15
- .use(render)
16
15
  .build((err) => {
17
16
  if (err) {
18
17
  reject(err);
@@ -74,17 +74,14 @@ async function create(projectName) {
74
74
  const { projectType } = await inquirer.prompt(CREATE_TEMPLATE_QUESTION);
75
75
  report('create-start', { projectType });
76
76
 
77
- console.log('targetDir', targetDir, TEMPLATE_DIR);
78
77
  // 创建项目目录
79
78
  await createProjectDir(targetDir);
80
- console.log('createProjectDir222');
81
79
 
82
80
  // 新创建缓存目录
83
81
  if (fs.existsSync(TEMPLATE_DIR)) {
84
82
  shelljs.rm('-rf', TEMPLATE_DIR);
85
83
  }
86
84
  fs.mkdirSync(TEMPLATE_DIR, { recursive: true });
87
- console.log('downloadAndUnZipTemplate0000', TEMPLATE_DIR, TEMPLATE_URL, TEMPLATE_NAME);
88
85
 
89
86
  // 下载和解压模板
90
87
  await downloadAndUnZipTemplate(TEMPLATE_DIR, TEMPLATE_URL, TEMPLATE_NAME);