@infomaximum/package-cli 2.10.1 → 2.10.3
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/CHANGELOG.md +15 -0
- package/dist/package/templates/packageIcon.js +7 -1
- package/dist/widget/commands/common.js +7 -16
- package/dist/widget/commands/release.js +1 -5
- package/dist/widget/scripts/init/actions.js +5 -21
- package/dist/widget/scripts/release/release.js +5 -71
- package/dist/widget/scripts/release/utils.js +0 -28
- package/dist/widget/templates/widgetManifest.js +0 -2
- package/dist/widget/widgetPaths.js +1 -4
- package/package.json +1 -2
- package/schemas/widgetManifestSchema.json +3 -9
- package/dist/widget/scripts/release/const.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [2.10.3](https://github.com/Infomaximum/package-cli/compare/v2.10.2...v2.10.3) (2024-10-04)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* иконка пакета svg ([ab59ac9](https://github.com/Infomaximum/package-cli/commit/ab59ac9ee5c9c6159139ae659f6a2f7155d6cf49))
|
|
11
|
+
|
|
12
|
+
### [2.10.2](https://github.com/Infomaximum/package-cli/compare/v2.10.1...v2.10.2) (2024-10-02)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* возвращено стандартное семантическое версионирование ([2ba7fbc](https://github.com/Infomaximum/package-cli/commit/2ba7fbce4363bcd64957a594efb1d44d72ade484))
|
|
18
|
+
* поля в манифесте виджета 2408 ([ed269f4](https://github.com/Infomaximum/package-cli/commit/ed269f4fc726f14349c308131817e4e75eeb2b36))
|
|
19
|
+
|
|
5
20
|
### [2.10.1](https://github.com/Infomaximum/package-cli/compare/v2.10.0...v2.10.1) (2024-09-30)
|
|
6
21
|
|
|
7
22
|
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
export const PACKAGE_ICON_TEMPLATE =
|
|
1
|
+
export const PACKAGE_ICON_TEMPLATE = `\
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20px" height="20px" viewBox="0 0 20 20">
|
|
3
|
+
<path fill="#0CB3B3" d="M 2.65625 1.25 C 1.878906 1.25 1.25 1.878906 1.25 2.65625 L 1.25 7.890625 C 1.25 8.667969 1.878906 9.296875 2.65625 9.296875 L 7.890625 9.296875 C 8.667969 9.296875 9.296875 8.667969 9.296875 7.890625 L 9.296875 2.65625 C 9.296875 1.878906 8.667969 1.25 7.890625 1.25 Z M 2.65625 1.25 "/>
|
|
4
|
+
<path fill="#0CB3B3" d="M 2.65625 10.703125 C 1.878906 10.703125 1.25 11.332031 1.25 12.109375 L 1.25 17.34375 C 1.25 18.121094 1.878906 18.75 2.65625 18.75 L 7.890625 18.75 C 8.667969 18.75 9.296875 18.121094 9.296875 17.34375 L 9.296875 12.109375 C 9.296875 11.332031 8.667969 10.703125 7.890625 10.703125 Z M 2.65625 10.703125 "/>
|
|
5
|
+
<path fill="#0CB3B3" d="M 10.703125 2.65625 C 10.703125 1.878906 11.332031 1.25 12.109375 1.25 L 17.34375 1.25 C 18.121094 1.25 18.75 1.878906 18.75 2.65625 L 18.75 7.890625 C 18.75 8.667969 18.121094 9.296875 17.34375 9.296875 L 12.109375 9.296875 C 11.332031 9.296875 10.703125 8.667969 10.703125 7.890625 Z M 10.703125 2.65625 "/>
|
|
6
|
+
<path fill="#0CB3B3" d="M 14.726562 10.703125 C 12.503906 10.703125 10.703125 12.503906 10.703125 14.726562 C 10.703125 16.949219 12.503906 18.75 14.726562 18.75 C 16.949219 18.75 18.75 16.949219 18.75 14.726562 C 18.75 12.503906 16.949219 10.703125 14.726562 10.703125 Z M 14.726562 10.703125 "/>
|
|
7
|
+
</svg>`;
|
|
@@ -1,34 +1,25 @@
|
|
|
1
|
-
import { __rest } from "tslib";
|
|
2
1
|
import chalk from "chalk";
|
|
3
2
|
import { assertSimple } from "@infomaximum/assert";
|
|
4
3
|
import { DEFAULT_BUILD_DIR_NAME } from "../../const.js";
|
|
5
|
-
export function registerWidgetManifestOption(command) {
|
|
6
|
-
command.option("--widget-manifest <manifestPath>", "путь до файла манифеста виджета");
|
|
7
|
-
}
|
|
8
4
|
export function registerCommonOption(command) {
|
|
9
5
|
command
|
|
10
6
|
.option("--entry <path>", "путь до entrypoint")
|
|
11
7
|
.option("--assets-dir <assetsDirPath>", "путь до директории с ресурсами виджета, которые будут перенесены в архив с виджетом")
|
|
12
8
|
.option("--package-manifest <manifestPath>", "путь до файла манифеста пакета")
|
|
13
|
-
.option("--package-dir <packageDirPath>", "путь до директории с файлами пакета")
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
export function configMergeWithWidgetManifestOptions(config, _a) {
|
|
17
|
-
var { "widget-manifest": optionWidgetManifest } = _a, rest = __rest(_a, ["widget-manifest"]);
|
|
18
|
-
const widgetManifest = optionWidgetManifest || (config === null || config === void 0 ? void 0 : config.widgetManifest);
|
|
19
|
-
assertSimple(!!widgetManifest, chalk.red("В конфигурации не задан widgetManifest"));
|
|
20
|
-
return Object.assign({ widgetManifest }, rest);
|
|
9
|
+
.option("--package-dir <packageDirPath>", "путь до директории с файлами пакета")
|
|
10
|
+
.option("--widget-manifest <manifestPath>", "путь до файла манифеста виджета");
|
|
21
11
|
}
|
|
22
12
|
export function configMergeWithOptionsCommon(config, options) {
|
|
23
13
|
const entry = options.entry || (config === null || config === void 0 ? void 0 : config.entry);
|
|
24
|
-
const assetsDir = options
|
|
25
|
-
const packageDir = options
|
|
14
|
+
const assetsDir = (options === null || options === void 0 ? void 0 : options.assetsDir) || (config === null || config === void 0 ? void 0 : config.assetsDir);
|
|
15
|
+
const packageDir = (options === null || options === void 0 ? void 0 : options.packageDir) || (config === null || config === void 0 ? void 0 : config.packageDir);
|
|
26
16
|
const buildDir = (config === null || config === void 0 ? void 0 : config.buildDir) || DEFAULT_BUILD_DIR_NAME;
|
|
27
|
-
const packageManifest = options
|
|
17
|
+
const packageManifest = (options === null || options === void 0 ? void 0 : options.packageManifest) || (config === null || config === void 0 ? void 0 : config.packageManifest);
|
|
18
|
+
const widgetManifest = (options === null || options === void 0 ? void 0 : options.widgetManifest) || (config === null || config === void 0 ? void 0 : config.widgetManifest);
|
|
28
19
|
assertSimple(!!entry, chalk.red("В конфигурации не задан entry"));
|
|
29
20
|
assertSimple(!!packageDir, chalk.red("В конфигурации не задан packageDir"));
|
|
30
21
|
assertSimple(!!packageManifest, chalk.red("В конфигурации не задан packageManifest"));
|
|
31
|
-
|
|
22
|
+
assertSimple(!!widgetManifest, chalk.red("В конфигурации не задан widgetManifest"));
|
|
32
23
|
return {
|
|
33
24
|
entry,
|
|
34
25
|
assetsDir,
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { runReleaseWidget } from "../scripts/release/release.js";
|
|
2
|
-
import { configMergeWithWidgetManifestOptions, registerWidgetManifestOption, } from "./common.js";
|
|
3
|
-
import { getConfigFromFile } from "../configs/file.js";
|
|
4
2
|
export const registerWidgetReleaseCommand = (widgetCommand) => {
|
|
5
3
|
const widgetReleaseCommand = widgetCommand.command("release");
|
|
6
|
-
const config = getConfigFromFile();
|
|
7
|
-
registerWidgetManifestOption(widgetReleaseCommand);
|
|
8
4
|
widgetReleaseCommand
|
|
9
5
|
.description("Создание релиза виджета")
|
|
10
6
|
.option("--first", "Первый релиз без повышения версии в package.json", false)
|
|
@@ -14,6 +10,6 @@ export const registerWidgetReleaseCommand = (widgetCommand) => {
|
|
|
14
10
|
.option("--skip-bump", "Не увеличивать версию", false)
|
|
15
11
|
.option("--dry-run", "Посмотреть что будет сделано при релизе", false)
|
|
16
12
|
.action((options) => {
|
|
17
|
-
runReleaseWidget(
|
|
13
|
+
runReleaseWidget(options);
|
|
18
14
|
});
|
|
19
15
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
-
import
|
|
3
|
-
import { getLatestVersionOfLibrary, safeWriteFile } from "../../../utils.js";
|
|
2
|
+
import { getLatestVersionOfLibrary } from "../../../utils.js";
|
|
4
3
|
import { PACKAGE_MANIFEST_TEMPLATE } from "../../../package/templates/packageManifest.js";
|
|
5
4
|
import { PACKAGE_ICON_TEMPLATE } from "../../../package/templates/packageIcon.js";
|
|
6
5
|
import { CUSTOM_PACKAGE_CLI_LIB_NAME, MANIFEST_JSON_FILE_NAME, } from "../../../const.js";
|
|
@@ -16,24 +15,9 @@ import { WIDGET_BABEL_CONFIG, WIDGET_ESLINTIGNORE, WIDGET_ESLINTRC, WIDGET_GITIG
|
|
|
16
15
|
import { WIDGET_PACKAGE_JSON_TEMPLATE } from "../../templates/widgetPackageJson.js";
|
|
17
16
|
import { WIDGET_SDK_LIB_NAME } from "../../const.js";
|
|
18
17
|
import { WIDGET_RC_CONFIG } from "../../templates/widgetRCConfig.js";
|
|
19
|
-
const
|
|
20
|
-
const addInitActions = (basePath, plop) => {
|
|
21
|
-
plop.setActionType(addIconActionName, function (answers, config, plop) {
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
try {
|
|
24
|
-
yield safeWriteFile(path.resolve(basePath, config.path), config.template, {
|
|
25
|
-
encoding: "base64",
|
|
26
|
-
});
|
|
27
|
-
return config.path;
|
|
28
|
-
}
|
|
29
|
-
catch (error) {
|
|
30
|
-
throw error;
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
};
|
|
18
|
+
const addInitActions = (basePath, plop) => { };
|
|
35
19
|
const actions = ({ widgetSDKVersion, packageCliVersion }) => {
|
|
36
|
-
const packageIconName = "
|
|
20
|
+
const packageIconName = "Package";
|
|
37
21
|
return [
|
|
38
22
|
{
|
|
39
23
|
type: "add",
|
|
@@ -45,8 +29,8 @@ const actions = ({ widgetSDKVersion, packageCliVersion }) => {
|
|
|
45
29
|
},
|
|
46
30
|
},
|
|
47
31
|
{
|
|
48
|
-
type:
|
|
49
|
-
path: `package/resources/${packageIconName}.
|
|
32
|
+
type: "add",
|
|
33
|
+
path: `package/resources/${packageIconName}.svg`,
|
|
50
34
|
template: PACKAGE_ICON_TEMPLATE,
|
|
51
35
|
},
|
|
52
36
|
...["ru", "en"].flatMap((language) => [
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
-
import fs from "fs-extra";
|
|
3
2
|
import path from "path";
|
|
4
|
-
import semver from "semver";
|
|
5
3
|
import standardVersion, {} from "standard-version";
|
|
6
4
|
import stringifyPackage from "stringify-package";
|
|
7
|
-
import { number } from "@inquirer/prompts";
|
|
8
5
|
import { generateGlobalPaths } from "../../../paths.js";
|
|
9
6
|
import { getConfigFromFile } from "../../configs/file.js";
|
|
10
7
|
import { DEFAULT_BUILD_DIR_NAME } from "../../../const.js";
|
|
11
8
|
import { isExist } from "../../../utils.js";
|
|
12
|
-
import {
|
|
13
|
-
import { getJsonContentFile, getRecommendedReleaseType, validateSystemVersion, } from "./utils.js";
|
|
14
|
-
import { MIN_SYSTEM_VERSION_MANIFEST_FIELD_NAME } from "./const.js";
|
|
9
|
+
import { getJsonContentFile } from "./utils.js";
|
|
15
10
|
const getSkipOptions = ({ skipChangelog, skipBump, skipCommit, skipTag, }) => {
|
|
16
11
|
return {
|
|
17
12
|
changelog: skipChangelog,
|
|
@@ -20,25 +15,13 @@ const getSkipOptions = ({ skipChangelog, skipBump, skipCommit, skipTag, }) => {
|
|
|
20
15
|
tag: skipTag,
|
|
21
16
|
};
|
|
22
17
|
};
|
|
23
|
-
const getBumpFiles = (
|
|
18
|
+
const getBumpFiles = () => {
|
|
24
19
|
const readVersionPackageJson = (contents) => JSON.parse(contents).version;
|
|
25
|
-
const readVersionManifest = (contents) => { var _a; return (_a = JSON.parse(contents)) === null || _a === void 0 ? void 0 : _a[MIN_SYSTEM_VERSION_MANIFEST_FIELD_NAME]; };
|
|
26
20
|
const writeVersionPackageJson = (contents, version) => {
|
|
27
21
|
const { json, indent, newline } = getJsonContentFile(contents);
|
|
28
22
|
json.version = version;
|
|
29
23
|
return stringifyPackage(json, indent, newline);
|
|
30
24
|
};
|
|
31
|
-
const writeVersionManifest = (contents, version) => {
|
|
32
|
-
const { json, indent, newline } = getJsonContentFile(contents);
|
|
33
|
-
const newVersion = semver.major(version);
|
|
34
|
-
const currentMajorVersion = semver.major(readVersionManifest(contents));
|
|
35
|
-
const validator = validateSystemVersion(currentMajorVersion);
|
|
36
|
-
const isValid = validator(newVersion);
|
|
37
|
-
if (isValid === true) {
|
|
38
|
-
json[MIN_SYSTEM_VERSION_MANIFEST_FIELD_NAME] = String(newVersion);
|
|
39
|
-
}
|
|
40
|
-
return stringifyPackage(json, indent, newline);
|
|
41
|
-
};
|
|
42
25
|
return [
|
|
43
26
|
{
|
|
44
27
|
filename: "package.json",
|
|
@@ -49,75 +32,26 @@ const getBumpFiles = (manifestWidgetPath) => {
|
|
|
49
32
|
writeVersion: writeVersionPackageJson,
|
|
50
33
|
},
|
|
51
34
|
},
|
|
52
|
-
{
|
|
53
|
-
filename: manifestWidgetPath,
|
|
54
|
-
readVersion: readVersionManifest,
|
|
55
|
-
writeVersion: writeVersionManifest,
|
|
56
|
-
updater: {
|
|
57
|
-
readVersion: readVersionManifest,
|
|
58
|
-
writeVersion: writeVersionManifest,
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
35
|
];
|
|
62
36
|
};
|
|
63
|
-
const getVersionOnRelease = (_a) => __awaiter(void 0, [_a], void 0, function* ({ globalPaths, manifestWidgetPath, }) {
|
|
64
|
-
const releaseType = yield getRecommendedReleaseType(globalPaths.appPath);
|
|
65
|
-
const [packageJsonContent, widgetManifestContent] = yield Promise.all([
|
|
66
|
-
fs.readFile(globalPaths.appPackageJson, {
|
|
67
|
-
encoding: "utf-8",
|
|
68
|
-
}),
|
|
69
|
-
fs.readFile(manifestWidgetPath, {
|
|
70
|
-
encoding: "utf-8",
|
|
71
|
-
}),
|
|
72
|
-
]);
|
|
73
|
-
const packageJSON = JSON.parse(packageJsonContent);
|
|
74
|
-
const currentWidgetVersion = packageJSON.version;
|
|
75
|
-
const manifestJSON = JSON.parse(widgetManifestContent);
|
|
76
|
-
const minSystemVersionFromManifest = manifestJSON === null || manifestJSON === void 0 ? void 0 : manifestJSON[MIN_SYSTEM_VERSION_MANIFEST_FIELD_NAME];
|
|
77
|
-
let newVersion = currentWidgetVersion;
|
|
78
|
-
if (releaseType === "major") {
|
|
79
|
-
const majorWidgetVersion = semver.major(currentWidgetVersion);
|
|
80
|
-
const currentMinSystemVersion = minSystemVersionFromManifest && +minSystemVersionFromManifest;
|
|
81
|
-
const isValidVersion = typeof currentMinSystemVersion === "number" &&
|
|
82
|
-
!isNaN(currentMinSystemVersion) &&
|
|
83
|
-
currentMinSystemVersion > majorWidgetVersion;
|
|
84
|
-
const minSystemVersion = isValidVersion
|
|
85
|
-
? currentMinSystemVersion
|
|
86
|
-
: yield number({
|
|
87
|
-
message: "Введите минимальную версию системы в которой работает виджет (в формате 2409): ",
|
|
88
|
-
validate: validateSystemVersion(majorWidgetVersion),
|
|
89
|
-
});
|
|
90
|
-
const version = `${minSystemVersion}.0.0`;
|
|
91
|
-
if (!semver.valid(version)) {
|
|
92
|
-
throw new Error(`Не валидная версия ${version}`);
|
|
93
|
-
}
|
|
94
|
-
newVersion = version;
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
newVersion = semver.inc(currentWidgetVersion, releaseType);
|
|
98
|
-
}
|
|
99
|
-
return newVersion;
|
|
100
|
-
});
|
|
101
37
|
export const runReleaseWidget = (options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
102
38
|
var _a;
|
|
103
|
-
const { first,
|
|
39
|
+
const { first, dryRun } = options;
|
|
104
40
|
const config = getConfigFromFile();
|
|
105
41
|
const globalPaths = generateGlobalPaths({
|
|
106
42
|
buildDirPath: (_a = config === null || config === void 0 ? void 0 : config.buildDir) !== null && _a !== void 0 ? _a : DEFAULT_BUILD_DIR_NAME,
|
|
107
43
|
});
|
|
108
|
-
const manifestWidgetPath = getWidgetManifestPath(widgetManifest);
|
|
109
44
|
const changelogFile = path.resolve(globalPaths.appPath, "CHANGELOG.md");
|
|
110
45
|
const isFirstRelease = first || !(yield isExist(changelogFile));
|
|
111
46
|
yield standardVersion({
|
|
112
|
-
releaseAs: yield getVersionOnRelease({ globalPaths, manifestWidgetPath }),
|
|
113
47
|
header: "",
|
|
114
48
|
dryRun,
|
|
115
49
|
path: globalPaths.appPath,
|
|
116
|
-
bumpFiles: getBumpFiles(
|
|
50
|
+
bumpFiles: getBumpFiles(),
|
|
117
51
|
firstRelease: isFirstRelease,
|
|
118
52
|
infile: changelogFile,
|
|
119
53
|
skip: getSkipOptions(options),
|
|
120
|
-
packageFiles: [path.basename(globalPaths.appPackageJson)
|
|
54
|
+
packageFiles: [path.basename(globalPaths.appPackageJson)],
|
|
121
55
|
verify: false,
|
|
122
56
|
});
|
|
123
57
|
});
|
|
@@ -1,33 +1,5 @@
|
|
|
1
|
-
import { __awaiter } from "tslib";
|
|
2
|
-
import { Bumper } from "conventional-recommended-bump";
|
|
3
1
|
import detectIndent from "detect-indent";
|
|
4
2
|
import { detectNewline } from "detect-newline";
|
|
5
|
-
import semver, {} from "semver";
|
|
6
|
-
export const getRecommendedReleaseType = (projectPath) => __awaiter(void 0, void 0, void 0, function* () {
|
|
7
|
-
var _a;
|
|
8
|
-
const bumper = new Bumper(projectPath).loadPreset("angular");
|
|
9
|
-
const recommendation = yield bumper.bump();
|
|
10
|
-
return (_a = recommendation.releaseType) !== null && _a !== void 0 ? _a : "patch";
|
|
11
|
-
});
|
|
12
|
-
export const validateSystemVersion = (currentMajorVersion) => (version) => {
|
|
13
|
-
if (!version) {
|
|
14
|
-
return "Версия не была указана, укажите версию";
|
|
15
|
-
}
|
|
16
|
-
const versionStr = `${version}`;
|
|
17
|
-
const versionRegex = /^\d{4}$/;
|
|
18
|
-
if (!versionRegex.test(versionStr)) {
|
|
19
|
-
return `Указанная версия (${version}) не соответствует шаблону версии системы 2409`;
|
|
20
|
-
}
|
|
21
|
-
if (version <= currentMajorVersion) {
|
|
22
|
-
return `Указанная версия системы (${version}) должна быть больше текущей версии (${currentMajorVersion}) `;
|
|
23
|
-
}
|
|
24
|
-
const year = parseInt(versionStr.slice(0, 2), 10);
|
|
25
|
-
const month = parseInt(versionStr.slice(2, 4), 10);
|
|
26
|
-
if (year >= 23 && month >= 1 && month <= 12) {
|
|
27
|
-
return true;
|
|
28
|
-
}
|
|
29
|
-
return `Указанная версия (${version}) не является валидной`;
|
|
30
|
-
};
|
|
31
3
|
export const getJsonContentFile = (content) => {
|
|
32
4
|
const json = JSON.parse(content);
|
|
33
5
|
const indent = detectIndent(content).indent;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
2
|
import { CUSTOM_PACKAGE_CLI_LIB_NAME } from "../../const.js";
|
|
3
3
|
import { capitalizeHelperName } from "../../plopHelpers.js";
|
|
4
|
-
import { MIN_SYSTEM_VERSION_MANIFEST_FIELD_NAME } from "../scripts/release/const.js";
|
|
5
4
|
export const WIDGET_MANIFEST_TEMPLATE = `\
|
|
6
5
|
{
|
|
7
6
|
"$schema": "node_modules/${CUSTOM_PACKAGE_CLI_LIB_NAME}/schemas/widgetManifestSchema.json",
|
|
8
7
|
"uuid": "${randomUUID()}",
|
|
9
8
|
"api_version": 1,
|
|
10
|
-
"${MIN_SYSTEM_VERSION_MANIFEST_FIELD_NAME}": "2408",
|
|
11
9
|
"name": {
|
|
12
10
|
"en": "{{${capitalizeHelperName} packageName}}",
|
|
13
11
|
"ru": "{{${capitalizeHelperName} packageName}}"
|
|
@@ -5,8 +5,5 @@ export function generateWidgetPaths({ entry, assetsDir, widgetManifest, buildDir
|
|
|
5
5
|
const globalPaths = generateGlobalPaths({ buildDirPath: buildDir });
|
|
6
6
|
return Object.assign(Object.assign({}, globalPaths), { get moduleIndex() {
|
|
7
7
|
return generateIndexPath(entry);
|
|
8
|
-
}, widgetManifestJsonPath:
|
|
9
|
-
}
|
|
10
|
-
export function getWidgetManifestPath(widgetManifest) {
|
|
11
|
-
return resolveApp(widgetManifest);
|
|
8
|
+
}, widgetManifestJsonPath: resolveApp(widgetManifest), widgetResourcesPath: assetsDir ? resolveApp(assetsDir) : null, widgetResourcesDirName: assetsDir ? path.basename(assetsDir) : null, widgetBuildDirPath: resolveApp(buildDir) });
|
|
12
9
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infomaximum/package-cli",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.3",
|
|
4
4
|
"exports": "./dist/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
"@babel/plugin-transform-runtime": "^7.23.6",
|
|
27
27
|
"@infomaximum/assert": "^1.1.3",
|
|
28
28
|
"@infomaximum/json-modify-webpack-plugin": "^1.1.0",
|
|
29
|
-
"@inquirer/prompts": "^6.0.1",
|
|
30
29
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
|
|
31
30
|
"@svgr/webpack": "^8.1.0",
|
|
32
31
|
"autoprefixer": "^10.4.16",
|
|
@@ -38,15 +38,9 @@
|
|
|
38
38
|
},
|
|
39
39
|
"default_size_percentage": {
|
|
40
40
|
"type": "object",
|
|
41
|
-
"title": "Размеры виджета по умолчанию
|
|
42
|
-
"required": ["
|
|
41
|
+
"title": "Размеры виджета по умолчанию",
|
|
42
|
+
"required": ["min_width", "min_height"],
|
|
43
43
|
"properties": {
|
|
44
|
-
"width": {
|
|
45
|
-
"type": "integer"
|
|
46
|
-
},
|
|
47
|
-
"height": {
|
|
48
|
-
"type": "integer"
|
|
49
|
-
},
|
|
50
44
|
"min_width": {
|
|
51
45
|
"type": "integer"
|
|
52
46
|
},
|
|
@@ -56,5 +50,5 @@
|
|
|
56
50
|
}
|
|
57
51
|
}
|
|
58
52
|
},
|
|
59
|
-
"required": ["uuid", "name"]
|
|
53
|
+
"required": ["uuid", "name", "min_system_version"]
|
|
60
54
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const MIN_SYSTEM_VERSION_MANIFEST_FIELD_NAME = "min_system_version";
|