ics-builder 4.1.91 → 4.1.95
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/csprojFile.js +7 -20
- package/src/builder/api/net5Builder.js +1 -1
- package/src/builder/api/webConfigFile.js +1 -1
- package/src/builder/api/xmlFile.js +1 -1
- package/src/builder/uiDependency/dependencyBuilder.js +7 -1
- package/src/services/buildManager.js +8 -27
- package/src/services/commandManager.js +1 -0
package/package.json
CHANGED
package/src/app.js
CHANGED
|
File without changes
|
|
@@ -20,30 +20,17 @@ var CsprojFile = /** @class */ (function (_super) {
|
|
|
20
20
|
function CsprojFile() {
|
|
21
21
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
22
22
|
}
|
|
23
|
-
CsprojFile.prototype.
|
|
23
|
+
CsprojFile.prototype.setPublishPath = function (publishPath) {
|
|
24
24
|
if (!this._xmlObj)
|
|
25
25
|
this._readFile();
|
|
26
26
|
if (!this._xmlObj.Project)
|
|
27
27
|
this._xmlObj.Project = {};
|
|
28
|
-
this._xmlObj.Project.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
OutputFiles: {
|
|
35
|
-
$: {
|
|
36
|
-
Include: "$(TargetDir)\\*.*"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
Copy: {
|
|
41
|
-
$: {
|
|
42
|
-
SourceFiles: "@(OutputFiles)",
|
|
43
|
-
DestinationFolder: copyToPath,
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
};
|
|
28
|
+
if (!this._xmlObj.Project.PropertyGroup)
|
|
29
|
+
this._xmlObj.Project.PropertyGroup = {};
|
|
30
|
+
var propertyGroup = Array.isArray(this._xmlObj.Project.PropertyGroup)
|
|
31
|
+
? this._xmlObj.Project.PropertyGroup[0]
|
|
32
|
+
: this._xmlObj.Project.PropertyGroup;
|
|
33
|
+
propertyGroup.PublishDir = publishPath;
|
|
47
34
|
};
|
|
48
35
|
return CsprojFile;
|
|
49
36
|
}(xmlFile_1.XmlFile));
|
|
@@ -58,7 +58,7 @@ var Net5ApiBuilder = /** @class */ (function (_super) {
|
|
|
58
58
|
var m = _b[_i];
|
|
59
59
|
utils_1.Utils.copyFile(m.Project, m.TempProject);
|
|
60
60
|
var csproj = new csprojFile_1.CsprojFile(m.Project);
|
|
61
|
-
csproj.
|
|
61
|
+
csproj.setPublishPath(m.OutputPath);
|
|
62
62
|
csproj.save(m.Project);
|
|
63
63
|
}
|
|
64
64
|
dotnetUtils_1.DotnetUtils.addProjectsToSln(tempSlnPath, this.modules.map(function (m) { return m.Project; }));
|
|
@@ -23,7 +23,7 @@ var WebConfigFile = /** @class */ (function (_super) {
|
|
|
23
23
|
WebConfigFile.prototype.addDotnetProcessPath = function () {
|
|
24
24
|
if (!this._xmlObj)
|
|
25
25
|
this._readFile();
|
|
26
|
-
var aspNetCoreSectionOptions = this._xmlObj.configuration.location[
|
|
26
|
+
var aspNetCoreSectionOptions = this._xmlObj.configuration.location["system.webServer"].aspNetCore.$;
|
|
27
27
|
aspNetCoreSectionOptions.processPath = "dotnet";
|
|
28
28
|
aspNetCoreSectionOptions.arguments = ".\\Mdt.WebApi.dll";
|
|
29
29
|
aspNetCoreSectionOptions.stdoutLogEnabled = "false";
|
|
@@ -10,7 +10,7 @@ var XmlFile = /** @class */ (function () {
|
|
|
10
10
|
XmlFile.prototype._readFile = function () {
|
|
11
11
|
var _this = this;
|
|
12
12
|
var file = fs.readFileSync(this._path);
|
|
13
|
-
xml2js.parseString(file, function (err, result) { return _this._xmlObj = result; });
|
|
13
|
+
xml2js.parseString(file, { explicitArray: false }, function (err, result) { return _this._xmlObj = result; });
|
|
14
14
|
};
|
|
15
15
|
XmlFile.prototype.save = function (path) {
|
|
16
16
|
if (path === void 0) { path = null; }
|
|
@@ -43,7 +43,13 @@ var UIDependencyBuilder = /** @class */ (function (_super) {
|
|
|
43
43
|
utils_1.Logger.warn("File package.json not found!");
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
var packageLockPath = Path.join(cwd, "package-lock.json");
|
|
47
|
+
var hasPackageLockPath = utils_1.Utils.ensurePath(packageLockPath);
|
|
48
|
+
utils_1.Utils.exec("npm " + (hasPackageLockPath && this.isCi() ? "ci" : "install"), { silent: true, cwd: cwd });
|
|
49
|
+
};
|
|
50
|
+
UIDependencyBuilder.prototype.isCi = function () {
|
|
51
|
+
var _a;
|
|
52
|
+
return ((_a = this.config.options.uiInstall) === null || _a === void 0 ? void 0 : _a.mode) === "ci";
|
|
47
53
|
};
|
|
48
54
|
return UIDependencyBuilder;
|
|
49
55
|
}(baseBuilder_1.BaseBuilder));
|
|
@@ -79,36 +79,17 @@ var BuildManager = /** @class */ (function () {
|
|
|
79
79
|
if (utils_1.Utils.ensurePath(packageInfoPath)) {
|
|
80
80
|
var packageInfo = yaml.load(packageInfoPath);
|
|
81
81
|
packageInfo = packageInfo || {};
|
|
82
|
-
|
|
83
|
-
if (packageInfo.
|
|
84
|
-
var builderType = _this.getDefaultBuilder(layer);
|
|
85
|
-
_this.updateLayerBuilder(layer, builderType, layerBuilders, pkg);
|
|
86
|
-
return;
|
|
87
|
-
// new version of package.yml
|
|
88
|
-
}
|
|
89
|
-
else if (packageInfo.builder) {
|
|
82
|
+
var newVersionOfPackageYaml = !packageInfo.api;
|
|
83
|
+
if (newVersionOfPackageYaml && packageInfo.builder && packageInfo.builder[layer]) {
|
|
90
84
|
var layerInfo = packageInfo.builder[layer];
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
else if (layerInfo) {
|
|
97
|
-
layerInfo.path = layerInfo.path || layer;
|
|
98
|
-
var builderType = layerInfo.type || _this.getDefaultBuilder(layer);
|
|
99
|
-
_this.updateLayerBuilder(layer, builderType, layerBuilders, pkg);
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
var builderType = _this.getDefaultBuilder(layer);
|
|
105
|
-
_this.updateLayerBuilder(layer, builderType, layerBuilders, pkg);
|
|
85
|
+
layerInfo.path = layerInfo.path || layer;
|
|
86
|
+
var builderType_1 = layerInfo.type || _this.getDefaultBuilder(layer);
|
|
87
|
+
_this.updateLayerBuilder(layer, builderType_1, layerBuilders, pkg);
|
|
88
|
+
return;
|
|
106
89
|
}
|
|
107
90
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
_this.updateLayerBuilder(layer, builderType, layerBuilders, pkg);
|
|
111
|
-
}
|
|
91
|
+
var builderType = _this.getDefaultBuilder(layer);
|
|
92
|
+
_this.updateLayerBuilder(layer, builderType, layerBuilders, pkg);
|
|
112
93
|
});
|
|
113
94
|
if (!buildOptions)
|
|
114
95
|
buildOptions = {};
|
|
@@ -60,6 +60,7 @@ var CommandManager = /** @class */ (function () {
|
|
|
60
60
|
index_1.task("webpack-build", function () { return _this.runBuilder(_this.builderManager.buildUi({ ui: { mode: "prod" } })); });
|
|
61
61
|
index_1.task("webpack-build:dev", function () { return _this.runBuilder(_this.builderManager.buildUi({ ui: { mode: "dev" } })); });
|
|
62
62
|
index_1.task("install-ui", function () { return _this.runBuilder(_this.builderManager.buildUIdependency()); });
|
|
63
|
+
index_1.task("install-ui:ci", function () { return _this.runBuilder(_this.builderManager.buildUIdependency({ uiInstall: { mode: "ci" } })); });
|
|
63
64
|
index_1.task("build-ui", index_1.series("generate-schema", "webpack-build"));
|
|
64
65
|
index_1.task("install-build-ui", index_1.series("install-ui", "build-ui"));
|
|
65
66
|
index_1.task("build-ui:dev", index_1.series("generate-schema", "webpack-build:dev"));
|