@intelligentgraphics/ig.gfx.packager 2.0.10 → 2.1.0
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/build/index.js +29 -17
- package/build/index.js.map +1 -1
- package/package.json +4 -4
- package/readme.md +6 -0
package/build/index.js
CHANGED
|
@@ -3416,7 +3416,6 @@ const releaseFolder = async (folderPath, options) => {
|
|
|
3416
3416
|
var _options$domain, _options$subdomain;
|
|
3417
3417
|
|
|
3418
3418
|
const {
|
|
3419
|
-
version,
|
|
3420
3419
|
write: writeVersionFile,
|
|
3421
3420
|
reset: resetVersionFile
|
|
3422
3421
|
} = getVersionFile(folderPath);
|
|
@@ -3436,21 +3435,30 @@ const releaseFolder = async (folderPath, options) => {
|
|
|
3436
3435
|
throw new Error(`Please enter a version in this format 1.0.0.100`);
|
|
3437
3436
|
}
|
|
3438
3437
|
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3438
|
+
if (newVersion.buildNumber < 100) {
|
|
3439
|
+
newVersion.preRelease = {
|
|
3440
|
+
type: "beta",
|
|
3441
|
+
version: newVersion.buildNumber
|
|
3442
|
+
};
|
|
3443
|
+
} else if (newVersion.buildNumber > 100) {
|
|
3444
|
+
newVersion.preRelease = {
|
|
3445
|
+
type: "patch",
|
|
3446
|
+
version: newVersion.buildNumber - 100
|
|
3447
|
+
};
|
|
3448
|
+
}
|
|
3442
3449
|
|
|
3443
3450
|
if (!options.pushOnly) {
|
|
3444
|
-
if (!options.noValidate && version !== undefined && version.buildNumber >= 100 && !newVersion.isGreaterThan(version)) {
|
|
3445
|
-
throw new Error(`Release versions with a build number > 100 may not be overwritten. Please increase the version.`);
|
|
3446
|
-
}
|
|
3447
|
-
|
|
3448
3451
|
writeVersionFile(fullPackageName, newVersion);
|
|
3449
3452
|
await (0, _build.buildFolders)(_objectSpread(_objectSpread({}, options), {}, {
|
|
3450
3453
|
directories: [folderPath]
|
|
3451
3454
|
}));
|
|
3452
3455
|
}
|
|
3453
3456
|
|
|
3457
|
+
newVersion.preRelease = undefined;
|
|
3458
|
+
const newVersionString = newVersion.toVersionString({
|
|
3459
|
+
buildNumber: true
|
|
3460
|
+
});
|
|
3461
|
+
|
|
3454
3462
|
try {
|
|
3455
3463
|
await (0, _packager.executePackager)({
|
|
3456
3464
|
data: packageDescription,
|
|
@@ -3520,7 +3528,9 @@ const getVersionFile = folder => {
|
|
|
3520
3528
|
});
|
|
3521
3529
|
|
|
3522
3530
|
const createVersionFileWriter = (copyright = [currentYear], copyrightStuff = "") => (name, newVersion) => {
|
|
3523
|
-
const
|
|
3531
|
+
const descriptionText = newVersion.toDescriptionString(name);
|
|
3532
|
+
const copyrightText = createYearString(copyright);
|
|
3533
|
+
const result = `console.log("${descriptionText}. Copyright (C) ${copyrightText}${copyrightStuff}");`;
|
|
3524
3534
|
|
|
3525
3535
|
_igTools.FileUtil.writeFile(filePath, result);
|
|
3526
3536
|
};
|
|
@@ -4166,7 +4176,7 @@ exports.loadDataFromFolder = loadDataFromFolder;
|
|
|
4166
4176
|
Object.defineProperty(exports, "__esModule", ({
|
|
4167
4177
|
value: true
|
|
4168
4178
|
}));
|
|
4169
|
-
exports.build = void 0;
|
|
4179
|
+
exports.tryReadTsConfig = exports.build = void 0;
|
|
4170
4180
|
|
|
4171
4181
|
__webpack_require__(/*! core-js/modules/es.promise.js */ "../../node_modules/core-js/modules/es.promise.js");
|
|
4172
4182
|
|
|
@@ -4190,7 +4200,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4190
4200
|
|
|
4191
4201
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4192
4202
|
|
|
4193
|
-
const
|
|
4203
|
+
const tryReadTsConfig = folderPath => {
|
|
4194
4204
|
const {
|
|
4195
4205
|
config
|
|
4196
4206
|
} = ts.readConfigFile(path.join(folderPath, "tsconfig.json"), path => {
|
|
@@ -4200,6 +4210,13 @@ const build = async (folderPath, options) => {
|
|
|
4200
4210
|
return undefined;
|
|
4201
4211
|
}
|
|
4202
4212
|
});
|
|
4213
|
+
return config;
|
|
4214
|
+
};
|
|
4215
|
+
|
|
4216
|
+
exports.tryReadTsConfig = tryReadTsConfig;
|
|
4217
|
+
|
|
4218
|
+
const build = async (folderPath, options) => {
|
|
4219
|
+
const config = tryReadTsConfig(folderPath);
|
|
4203
4220
|
config.compilerOptions.lib = ["es5", "dom"];
|
|
4204
4221
|
const result = ts.convertCompilerOptionsFromJson(config.compilerOptions, folderPath);
|
|
4205
4222
|
|
|
@@ -7567,7 +7584,7 @@ module.exports = require("util");
|
|
|
7567
7584
|
/***/ ((module) => {
|
|
7568
7585
|
|
|
7569
7586
|
"use strict";
|
|
7570
|
-
module.exports = JSON.parse('{"name":"@intelligentgraphics/ig.gfx.packager","version":"2.0
|
|
7587
|
+
module.exports = JSON.parse('{"name":"@intelligentgraphics/ig.gfx.packager","version":"2.1.0","description":"IG.GFX.Packager 2.1.0 (2.1.0.100)","main":"build/index.js","private":false,"publishConfig":{"access":"public"},"bin":{"packager":"./build/index.js"},"files":["build","locales","scripts"],"scripts":{"dist":"webpack","clean":"rimraf build *.tsbuildinfo","prepublishOnly":"yarn clean && yarn dist","_postinstall":"node scripts/postinstall.js"},"author":"Michael Beier <mb@intelligentgraphics.biz>","dependencies":{"ajv":"^8.6.2","archiver":"^5.0.0","axios":"^0.21.1","core-js":"^3.16.0","execa":"^5.1.1","fs-extra":"^10.0.0","glob":"^7.1.4","rimraf":"^3.0.2","source-map-support":"^0.5.19","terser":"^4.8.0","typedoc":"~0.22.15","typescript":"~4.6.3","update-notifier":"^5.1.0","v8-compile-cache":"^2.1.1","y18n":"^5.0.8","yargs":"^17.0.1"},"devDependencies":{"@babel/plugin-proposal-class-properties":"^7.14.5","@babel/plugin-proposal-object-rest-spread":"^7.14.7","@babel/preset-env":"^7.14.9","@intelligentgraphics/ig.tools.core":"^1.5.1","@intelligentgraphics/ig.utilities":"^1.6.6","@types/archiver":"^5.1.1","@types/fs-extra":"^9.0.12","@types/glob":"^7.1.4","@types/node":"^16.4.11","@types/rimraf":"^3.0.1","@types/update-notifier":"^5.1.0","@types/yargs":"^17.0.2","babel-loader":"^8.1.0","ts-loader":"^9.2.5","ts-node":"^10.1.0","webpack":"^5.64.4","webpack-cli":"^4.7.2"}}');
|
|
7571
7588
|
|
|
7572
7589
|
/***/ })
|
|
7573
7590
|
|
|
@@ -7753,11 +7770,6 @@ yargs.command({
|
|
|
7753
7770
|
type: "boolean",
|
|
7754
7771
|
default: false,
|
|
7755
7772
|
description: (0, _localization.translate)("options.pushOnly.description")
|
|
7756
|
-
},
|
|
7757
|
-
noValidate: {
|
|
7758
|
-
type: "boolean",
|
|
7759
|
-
default: false,
|
|
7760
|
-
description: (0, _localization.translate)("options.noValidate.description")
|
|
7761
7773
|
}
|
|
7762
7774
|
}),
|
|
7763
7775
|
handler: async _ref2 => {
|