ics-builder 4.1.97 → 4.1.98
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/package.json +1 -1
- package/src/app.js +0 -0
- package/src/builder/api/dotnetApiBuilder.js +5 -3
- package/src/builder/api/net5Builder.js +2 -2
- package/src/utils.js +14 -0
package/package.json
CHANGED
package/src/app.js
CHANGED
|
File without changes
|
|
@@ -87,10 +87,8 @@ var DotnetApiBuilder = /** @class */ (function (_super) {
|
|
|
87
87
|
var configuration = (this.config.api && this.config.api.configuration) || "debug";
|
|
88
88
|
moduleDir = path.dirname(projectFile);
|
|
89
89
|
var projectBinDir_1 = path.join(moduleDir, "bin");
|
|
90
|
-
var projectObjDir = path.join(moduleDir, "obj");
|
|
91
90
|
var webAppPath = path.join(moduleDir, "global.asax");
|
|
92
|
-
|
|
93
|
-
utils_1.Utils.clearFolder(projectObjDir);
|
|
91
|
+
this.clearCache(moduleDir);
|
|
94
92
|
if (utils_1.Utils.ensurePath(webAppPath)) {
|
|
95
93
|
utils_1.Utils.copyFile(path.join(moduleDir, "web.config.template"), path.join(moduleDir, "web.config"));
|
|
96
94
|
}
|
|
@@ -136,6 +134,10 @@ var DotnetApiBuilder = /** @class */ (function (_super) {
|
|
|
136
134
|
skipLog: true
|
|
137
135
|
});
|
|
138
136
|
};
|
|
137
|
+
DotnetApiBuilder.prototype.clearCache = function (folderPath) {
|
|
138
|
+
utils_1.Utils.deleteAllFoldersRecursively(folderPath, "bin");
|
|
139
|
+
utils_1.Utils.deleteAllFoldersRecursively(folderPath, "obj");
|
|
140
|
+
};
|
|
139
141
|
return DotnetApiBuilder;
|
|
140
142
|
}(baseBuilder_1.BaseBuilder));
|
|
141
143
|
exports.DotnetApiBuilder = DotnetApiBuilder;
|
|
@@ -127,8 +127,8 @@ var Net5ApiBuilder = /** @class */ (function (_super) {
|
|
|
127
127
|
});
|
|
128
128
|
};
|
|
129
129
|
Net5ApiBuilder.prototype.clearCache = function (folderPath) {
|
|
130
|
-
utils_1.Utils.
|
|
131
|
-
utils_1.Utils.
|
|
130
|
+
utils_1.Utils.deleteAllFoldersRecursively(folderPath, "bin");
|
|
131
|
+
utils_1.Utils.deleteAllFoldersRecursively(folderPath, "obj");
|
|
132
132
|
};
|
|
133
133
|
return Net5ApiBuilder;
|
|
134
134
|
}(baseBuilder_1.BaseBuilder));
|
package/src/utils.js
CHANGED
|
@@ -188,6 +188,20 @@ var Utils = /** @class */ (function () {
|
|
|
188
188
|
}
|
|
189
189
|
return res;
|
|
190
190
|
};
|
|
191
|
+
Utils.deleteAllFoldersRecursively = function (cwd, folderName) {
|
|
192
|
+
var _this = this;
|
|
193
|
+
var files = fs.readdirSync(cwd, { withFileTypes: true });
|
|
194
|
+
files.forEach(function (f) {
|
|
195
|
+
if (!f.isDirectory())
|
|
196
|
+
return;
|
|
197
|
+
var dirFullPath = path.join(cwd, f.name);
|
|
198
|
+
if (f.name == folderName) {
|
|
199
|
+
Utils.clearFolder(dirFullPath);
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
_this.deleteAllFoldersRecursively(dirFullPath, folderName);
|
|
203
|
+
});
|
|
204
|
+
};
|
|
191
205
|
Utils.getFileName = function (path) {
|
|
192
206
|
var _a, _b;
|
|
193
207
|
return (_b = (_a = path.match(/([^\\/]+?)(\.[^.\\/]+)?$/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : "";
|