ics-builder 4.1.89 → 4.1.90

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ics-builder",
3
- "version": "4.1.89",
3
+ "version": "4.1.90",
4
4
  "description": "",
5
5
  "main": "./src/app.js",
6
6
  "preferGlobal": true,
@@ -51,18 +51,16 @@ var Net5ApiBuilder = /** @class */ (function (_super) {
51
51
  var slnDir = path.dirname(coreModule.Project);
52
52
  var configuration = ((_a = this.config.api) === null || _a === void 0 ? void 0 : _a.configuration) || "Debug";
53
53
  var tempSlnPath = path.join(slnDir, slnName + ".sln");
54
- var tempProjects = [];
55
54
  try {
56
55
  dotnetUtils_1.DotnetUtils.createTempSln(slnDir, slnName);
57
56
  for (var _i = 0, _b = this.modules; _i < _b.length; _i++) {
58
57
  var m = _b[_i];
58
+ utils_1.Utils.copyFile(m.Project, m.TempProject);
59
59
  var csproj = new csprojFile_1.CsprojFile(m.Project);
60
60
  csproj.addPostBuildCopy(m.OutputPath);
61
- var tempProjPath = this.getTempProjPath(m.Project);
62
- tempProjects.push(tempProjPath);
63
- csproj.save(tempProjPath);
61
+ csproj.save(m.Project);
64
62
  }
65
- dotnetUtils_1.DotnetUtils.addProjectsToSln(tempSlnPath, tempProjects);
63
+ dotnetUtils_1.DotnetUtils.addProjectsToSln(tempSlnPath, this.modules.map(function (m) { return m.Project; }));
66
64
  dotnetUtils_1.DotnetUtils.restoreNugetPackages(tempSlnPath);
67
65
  dotnetUtils_1.DotnetUtils.publish(tempSlnPath, configuration);
68
66
  this.modules.filter(function (m) { return !m.IsCoreModule; }).forEach(function (m) {
@@ -72,13 +70,12 @@ var Net5ApiBuilder = /** @class */ (function (_super) {
72
70
  }
73
71
  finally {
74
72
  utils_1.Utils.deleteFile(tempSlnPath);
75
- tempProjects.forEach(function (p) { return utils_1.Utils.deleteFile(p); });
73
+ this.modules.forEach(function (m) {
74
+ utils_1.Utils.copyFile(m.TempProject, m.Project);
75
+ utils_1.Utils.deleteFile(m.TempProject);
76
+ });
76
77
  }
77
78
  };
78
- Net5ApiBuilder.prototype.getTempProjPath = function (projPath) {
79
- var dir = path.dirname(projPath);
80
- return path.join(dir, utils_1.Utils.getFileName(projPath) + "_temp.csproj");
81
- };
82
79
  Net5ApiBuilder.prototype.collectModuleInfo = function (pkg) {
83
80
  var _this = this;
84
81
  packageStructureManager_1.packageStructureManager.getModuleSourcePaths(pkg, "api", this.config).forEach(function (_a) {
@@ -132,6 +129,8 @@ var ApiModuleInfo = /** @class */ (function () {
132
129
  this.Package = pkg;
133
130
  this.Module = module;
134
131
  this.Project = project;
132
+ var dir = path.dirname(project);
133
+ this.TempProject = path.join(dir, utils_1.Utils.getFileName(project) + "_temp.csproj");
135
134
  this.IsCoreModule = module.name == "_core" && pkg == "mdt";
136
135
  this.OutputPath = this.IsCoreModule
137
136
  ? buildApiFolder