utiller 1.0.365 → 1.0.366
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.
|
@@ -1113,7 +1113,7 @@ var NodeUtiller = /*#__PURE__*/function (_Utiller) {
|
|
|
1113
1113
|
return !_this7.has(path, projectName);
|
|
1114
1114
|
};
|
|
1115
1115
|
})))) {
|
|
1116
|
-
_context13.next =
|
|
1116
|
+
_context13.next = 46;
|
|
1117
1117
|
break;
|
|
1118
1118
|
}
|
|
1119
1119
|
_context13.next = 4;
|
|
@@ -1142,69 +1142,64 @@ var NodeUtiller = /*#__PURE__*/function (_Utiller) {
|
|
|
1142
1142
|
return _this7.copyFromFolderToDestFolder(templatePath, _this7.persistByPath(_path4["default"].join(release, "template")));
|
|
1143
1143
|
case 16:
|
|
1144
1144
|
if (!deployToNPMServer) {
|
|
1145
|
-
_context13.next =
|
|
1145
|
+
_context13.next = 24;
|
|
1146
1146
|
break;
|
|
1147
1147
|
}
|
|
1148
|
-
|
|
1149
|
-
console.log("\u8D70\u5230\u9019\uFF1F1");
|
|
1150
|
-
_context13.next = 20;
|
|
1148
|
+
_context13.next = 19;
|
|
1151
1149
|
return _this7.upgradePackageJsonVersion(pathOfPackageJson);
|
|
1152
|
-
case
|
|
1150
|
+
case 19:
|
|
1153
1151
|
_yield$_this7$upgrade = _context13.sent;
|
|
1154
1152
|
moduleName = _yield$_this7$upgrade.moduleName;
|
|
1155
1153
|
version = _yield$_this7$upgrade.version;
|
|
1156
|
-
|
|
1157
|
-
/** 把所有樣板的版號都提升 */
|
|
1158
|
-
_context13.next = 26;
|
|
1154
|
+
_context13.next = 24;
|
|
1159
1155
|
return _this7.updateVersionOfTemplate(moduleName, version);
|
|
1160
|
-
case
|
|
1156
|
+
case 24:
|
|
1161
1157
|
/** 把package.json release放進去 */
|
|
1162
|
-
console.log("\u8D70\u5230\u9019\uFF1F3");
|
|
1163
1158
|
_this7.copySingleFile(pathOfPackageJson, _path4["default"].join(release, "package.json"), undefined, true);
|
|
1164
1159
|
|
|
1165
1160
|
/** 安裝一個沒有devDependency 的node_module */
|
|
1166
1161
|
if (!(forceInstallNodeModule || !_this7.isPathExist(_path4["default"].join(release, "node_module")))) {
|
|
1167
|
-
_context13.next =
|
|
1162
|
+
_context13.next = 30;
|
|
1168
1163
|
break;
|
|
1169
1164
|
}
|
|
1170
|
-
_context13.next =
|
|
1165
|
+
_context13.next = 28;
|
|
1171
1166
|
return _this7.executeCommandLine("cd ".concat(release, " && yarn install --production"));
|
|
1172
|
-
case
|
|
1173
|
-
_context13.next =
|
|
1167
|
+
case 28:
|
|
1168
|
+
_context13.next = 31;
|
|
1174
1169
|
break;
|
|
1175
|
-
case
|
|
1170
|
+
case 30:
|
|
1176
1171
|
_this7.appendInfo("ignore node-module install behavior");
|
|
1177
|
-
case
|
|
1172
|
+
case 31:
|
|
1178
1173
|
_this7.appendInfo("build ".concat(path, " succeed"));
|
|
1179
1174
|
|
|
1180
1175
|
/** 部署到 local server*/
|
|
1181
1176
|
if (!deployToNPMServer) {
|
|
1182
|
-
_context13.next =
|
|
1177
|
+
_context13.next = 35;
|
|
1183
1178
|
break;
|
|
1184
1179
|
}
|
|
1185
|
-
_context13.next =
|
|
1180
|
+
_context13.next = 35;
|
|
1186
1181
|
return _this7.executeCommandLine("cd ".concat(release, " && npm publish"));
|
|
1187
|
-
case
|
|
1188
|
-
_context13.next =
|
|
1182
|
+
case 35:
|
|
1183
|
+
_context13.next = 42;
|
|
1189
1184
|
break;
|
|
1190
|
-
case
|
|
1191
|
-
_context13.prev =
|
|
1185
|
+
case 37:
|
|
1186
|
+
_context13.prev = 37;
|
|
1192
1187
|
_context13.t0 = _context13["catch"](9);
|
|
1193
|
-
_context13.next =
|
|
1188
|
+
_context13.next = 41;
|
|
1194
1189
|
return _this7.deleteSelfByPath(release, true);
|
|
1195
|
-
case
|
|
1190
|
+
case 41:
|
|
1196
1191
|
throw new _index2["default"](9999, "generatePackage \u5831\u932F, ".concat(_context13.t0.message));
|
|
1197
|
-
case
|
|
1198
|
-
_context13.prev =
|
|
1199
|
-
_context13.next =
|
|
1192
|
+
case 42:
|
|
1193
|
+
_context13.prev = 42;
|
|
1194
|
+
_context13.next = 45;
|
|
1200
1195
|
return _this7.deleteSelfByPath(tempFolderPath, true);
|
|
1201
|
-
case
|
|
1202
|
-
return _context13.finish(
|
|
1203
|
-
case
|
|
1196
|
+
case 45:
|
|
1197
|
+
return _context13.finish(42);
|
|
1198
|
+
case 46:
|
|
1204
1199
|
case "end":
|
|
1205
1200
|
return _context13.stop();
|
|
1206
1201
|
}
|
|
1207
|
-
}, _loop, null, [[9,
|
|
1202
|
+
}, _loop, null, [[9, 37, 42, 46]]);
|
|
1208
1203
|
});
|
|
1209
1204
|
_iterator7.s();
|
|
1210
1205
|
case 11:
|
|
@@ -1250,56 +1245,55 @@ var NodeUtiller = /*#__PURE__*/function (_Utiller) {
|
|
|
1250
1245
|
_i = 0, _paths = paths;
|
|
1251
1246
|
case 2:
|
|
1252
1247
|
if (!(_i < _paths.length)) {
|
|
1253
|
-
_context15.next =
|
|
1248
|
+
_context15.next = 24;
|
|
1254
1249
|
break;
|
|
1255
1250
|
}
|
|
1256
1251
|
path = _paths[_i];
|
|
1257
1252
|
if (!this.isPathExist(path)) {
|
|
1258
|
-
_context15.next =
|
|
1253
|
+
_context15.next = 21;
|
|
1259
1254
|
break;
|
|
1260
1255
|
}
|
|
1261
1256
|
succeedOfPersistFile = false;
|
|
1262
|
-
console.log("\u554F\u984C\u662F\u4F60\uFF1D> path\uFF1A", path);
|
|
1263
1257
|
json = this.getJsonObjByFilePath(path);
|
|
1264
1258
|
if (!(json && json.dependencies && json.dependencies[dependency])) {
|
|
1265
|
-
_context15.next =
|
|
1259
|
+
_context15.next = 18;
|
|
1266
1260
|
break;
|
|
1267
1261
|
}
|
|
1268
1262
|
json.dependencies[dependency] = "^".concat(newVersion);
|
|
1269
|
-
_context15.prev =
|
|
1270
|
-
_context15.next =
|
|
1263
|
+
_context15.prev = 9;
|
|
1264
|
+
_context15.next = 12;
|
|
1271
1265
|
return this.writeJsonThanPrettier(path, json);
|
|
1272
|
-
case
|
|
1266
|
+
case 12:
|
|
1273
1267
|
succeedOfPersistFile = true;
|
|
1274
|
-
_context15.next =
|
|
1268
|
+
_context15.next = 18;
|
|
1275
1269
|
break;
|
|
1276
|
-
case
|
|
1277
|
-
_context15.prev =
|
|
1278
|
-
_context15.t0 = _context15["catch"](
|
|
1270
|
+
case 15:
|
|
1271
|
+
_context15.prev = 15;
|
|
1272
|
+
_context15.t0 = _context15["catch"](9);
|
|
1279
1273
|
succeedOfPersistFile = true;
|
|
1280
|
-
case
|
|
1274
|
+
case 18:
|
|
1281
1275
|
if (succeedOfPersistFile) {
|
|
1282
|
-
_context15.next =
|
|
1276
|
+
_context15.next = 21;
|
|
1283
1277
|
break;
|
|
1284
1278
|
}
|
|
1285
|
-
_context15.next =
|
|
1279
|
+
_context15.next = 21;
|
|
1286
1280
|
return this.updateFileOfSpecificLine(path, function (line) {
|
|
1287
1281
|
return " \"".concat(dependency, "\":\"^").concat(newVersion, "\"").concat(_lodash["default"].endsWith(_lodash["default"].trim(line), "," ? "," : ""));
|
|
1288
1282
|
}, function (each) {
|
|
1289
1283
|
return _lodash["default"].startsWith(_lodash["default"].trim(each), "\"".concat(dependency, "\""));
|
|
1290
1284
|
});
|
|
1291
|
-
case
|
|
1285
|
+
case 21:
|
|
1292
1286
|
_i++;
|
|
1293
1287
|
_context15.next = 2;
|
|
1294
1288
|
break;
|
|
1295
|
-
case
|
|
1296
|
-
_context15.next =
|
|
1289
|
+
case 24:
|
|
1290
|
+
_context15.next = 26;
|
|
1297
1291
|
return this.copyFromFolderToDestFolder("/Users/davidtu/cross-achieve/high/idea-inventer/utiller/template/", "/Users/davidtu/cross-achieve/high/idea-inventer/newp/template/", true, true);
|
|
1298
|
-
case
|
|
1292
|
+
case 26:
|
|
1299
1293
|
case "end":
|
|
1300
1294
|
return _context15.stop();
|
|
1301
1295
|
}
|
|
1302
|
-
}, _callee14, this, [[
|
|
1296
|
+
}, _callee14, this, [[9, 15]]);
|
|
1303
1297
|
}));
|
|
1304
1298
|
function updateVersionOfTemplate(_x16, _x17) {
|
|
1305
1299
|
return _updateVersionOfTemplate.apply(this, arguments);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "utiller",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.366",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
"author": "davidtu<freshingmoon0725@gmail.com>",
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@babel/runtime": "^7.24.8",
|
|
19
18
|
"bl": "^4.1.0",
|
|
20
19
|
"configerer": "^1.0.11",
|
|
21
20
|
"crypto-js": "^4.2.0",
|
|
@@ -32,6 +31,7 @@
|
|
|
32
31
|
"uuid": "^8.3.2"
|
|
33
32
|
},
|
|
34
33
|
"devDependencies": {
|
|
34
|
+
"@babel/runtime": "^7.24.8",
|
|
35
35
|
"@babel/cli": "^7.24.8",
|
|
36
36
|
"@babel/core": "^7.24.9",
|
|
37
37
|
"@babel/plugin-proposal-decorators": "^7.24.1",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"configerer": "^1.0.
|
|
14
|
-
"utiller": "^1.0.
|
|
15
|
-
"linepayer": "^1.0.
|
|
16
|
-
"databazer": "^1.0.
|
|
13
|
+
"configerer": "^1.0.14",
|
|
14
|
+
"utiller": "^1.0.366",
|
|
15
|
+
"linepayer": "^1.0.13",
|
|
16
|
+
"databazer": "^1.0.15",
|
|
17
17
|
"lodash": "^4.17.20",
|
|
18
18
|
"moment": "^2.29.1"
|
|
19
19
|
},
|