@tmsfe/tmskit 0.0.9-beta.2 → 0.0.11

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
@@ -1249,7 +1249,12 @@ const symLink$1 = tmsConfig => {
1249
1249
  try {
1250
1250
  if (tmsConfig.cloudModules) {
1251
1251
  tmsConfig.cloudModules.forEach(item => {
1252
- fs$8.symlinkSync(resolve$a(item.path), resolve$a(DEFAULT_CLOUD_MODULE_DIR, item.name));
1252
+ const path = resolve$a(DEFAULT_CLOUD_MODULE_DIR, item.name);
1253
+ fs$8.access(path, fs$8.constants.F_OK, res => {
1254
+ if (res) {
1255
+ fs$8.symlinkSync(resolve$a(item.path), path);
1256
+ }
1257
+ });
1253
1258
  });
1254
1259
  }
1255
1260
  } catch (e) {
@@ -3152,7 +3157,7 @@ var entry = [{
3152
3157
 
3153
3158
  var require$$7 = {
3154
3159
  name: "@tmsfe/tmskit",
3155
- version: "0.0.9-beta.2",
3160
+ version: "0.0.10",
3156
3161
  description: "tmskit",
3157
3162
  main: "dist/index.cjs",
3158
3163
  bin: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmsfe/tmskit",
3
- "version": "0.0.9-beta.2",
3
+ "version": "0.0.11",
4
4
  "description": "tmskit",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {
@@ -11,7 +11,12 @@ const symLink = (tmsConfig) => {
11
11
  try {
12
12
  if (tmsConfig.cloudModules) {
13
13
  tmsConfig.cloudModules.forEach((item) => {
14
- fs.symlinkSync(resolve(item.path), resolve(DEFAULT_CLOUD_MODULE_DIR, item.name));
14
+ const path = resolve(DEFAULT_CLOUD_MODULE_DIR, item.name);
15
+ fs.access(path, fs.constants.F_OK, (res) => {
16
+ if (res) {
17
+ fs.symlinkSync(resolve(item.path), path);
18
+ }
19
+ });
15
20
  });
16
21
  }
17
22
  } catch (e) {