@infomaximum/package-cli 1.16.0 → 1.17.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/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
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
+ ## [1.17.0](https://github.com/Infomaximum/package-cli/compare/v1.16.1...v1.17.0) (2024-02-16)
6
+
7
+
8
+ ### Features
9
+
10
+ * добавлен постфикс имени виджета при выполнении сборки пакета для разработки ([f05a35f](https://github.com/Infomaximum/package-cli/commit/f05a35f45a1776f905e2bd7405f9bc06a244e838))
11
+
12
+ ### [1.16.1](https://github.com/Infomaximum/package-cli/compare/v1.16.0...v1.16.1) (2024-02-14)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * исправлен шаблон ([a02cafe](https://github.com/Infomaximum/package-cli/commit/a02cafe34a045cf1537702ae678626d97e4ff726))
18
+
5
19
  ## [1.16.0](https://github.com/Infomaximum/package-cli/compare/v1.15.0...v1.16.0) (2024-02-14)
6
20
 
7
21
 
@@ -5,7 +5,7 @@ import CopyWebpackPlugin from "copy-webpack-plugin";
5
5
  import path from "path";
6
6
  import { JsonModifyWebpackPlugin } from "@infomaximum/json-modify-webpack-plugin";
7
7
  import { isExist, systemRequire } from "../../utils.js";
8
- import { BUILD_ARCHIVE_EXT, MANIFEST_REG_EXP, WIDGET_ARCHIVE_FULL_NAME, } from "../../const.js";
8
+ import { BUILD_ARCHIVE_EXT, DEV_POSTFIX, MANIFEST_REG_EXP, WIDGET_ARCHIVE_FULL_NAME, } from "../../const.js";
9
9
  import { assertSimple } from "@infomaximum/assert";
10
10
  const packageFilename = "main.js";
11
11
  export const getPackageConfig = (mode, PATHS, isBuildDevMode) => __awaiter(void 0, void 0, void 0, function* () {
@@ -13,7 +13,7 @@ export const getPackageConfig = (mode, PATHS, isBuildDevMode) => __awaiter(void
13
13
  const manifestPackageName = systemRequire(PATHS.packageManifest).name;
14
14
  let widgetPackageName = `${manifestPackageName}_${widgetVersion}`;
15
15
  if (isBuildDevMode)
16
- widgetPackageName += "__DEV";
16
+ widgetPackageName += DEV_POSTFIX;
17
17
  const widgetArchivePath = path.resolve(PATHS.appBuild, WIDGET_ARCHIVE_FULL_NAME);
18
18
  assertSimple(yield isExist(PATHS.packageManifest), `File ${PATHS.packageManifest} not found`);
19
19
  assertSimple(yield isExist(widgetArchivePath), `File ${widgetArchivePath} not found`);
@@ -1,4 +1,5 @@
1
1
  import { JsonModifyWebpackPlugin } from "@infomaximum/json-modify-webpack-plugin";
2
+ import { DEV_POSTFIX } from "../../../../const.js";
2
3
  export const getModifyManifestWidgetPlugin = ({ host, port }) => {
3
4
  return new JsonModifyWebpackPlugin({
4
5
  matchers: [
@@ -6,6 +7,14 @@ export const getModifyManifestWidgetPlugin = ({ host, port }) => {
6
7
  matcher: /^manifest.json$/,
7
8
  action: (currentJsonContent) => {
8
9
  currentJsonContent.entry = `http://${host}:${port}/${currentJsonContent.entry}`;
10
+ if ((currentJsonContent === null || currentJsonContent === void 0 ? void 0 : currentJsonContent.name) &&
11
+ typeof currentJsonContent.name === "object") {
12
+ Object.keys(currentJsonContent.name).forEach((lang) => {
13
+ Object.assign(currentJsonContent.name, {
14
+ [lang]: currentJsonContent.name[lang] + DEV_POSTFIX,
15
+ });
16
+ });
17
+ }
9
18
  return currentJsonContent;
10
19
  },
11
20
  },
package/dist/const.js CHANGED
@@ -7,3 +7,4 @@ export const DEFAULT_HOST = "localhost";
7
7
  export const DEFAULT_PORT = "5555";
8
8
  export const MANIFEST_JSON_FILE_NAME = "manifest.json";
9
9
  export const MANIFEST_REG_EXP = new RegExp(`${MANIFEST_JSON_FILE_NAME}$`, "i");
10
+ export const DEV_POSTFIX = "__DEV";
@@ -25,7 +25,7 @@ export class Definition implements IDefinition<WidgetSettings, IGroupSettings> {
25
25
  return [];
26
26
  }
27
27
 
28
- public static getMeasures(settings: WidgetSettings): IWidgetMeasure[] {
28
+ public getMeasures(settings: WidgetSettings): IWidgetMeasure[] {
29
29
  return [];
30
30
  }
31
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infomaximum/package-cli",
3
- "version": "1.16.0",
3
+ "version": "1.17.0",
4
4
  "exports": "./dist/index.js",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -25,7 +25,7 @@
25
25
  "@babel/core": "^7.23.6",
26
26
  "@babel/plugin-transform-runtime": "^7.23.6",
27
27
  "@infomaximum/assert": "1.1.2",
28
- "@infomaximum/json-modify-webpack-plugin": "^1.0.1",
28
+ "@infomaximum/json-modify-webpack-plugin": "^1.0.2",
29
29
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
30
30
  "@svgr/webpack": "^8.1.0",
31
31
  "autoprefixer": "^10.4.16",