@infomaximum/package-cli 1.20.0 → 1.21.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,13 @@
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.21.0](https://github.com/Infomaximum/package-cli/compare/v1.20.0...v1.21.0) (2024-02-26)
6
+
7
+
8
+ ### Features
9
+
10
+ * удаление поля "$schema" из манифестов ([aecc8a8](https://github.com/Infomaximum/package-cli/commit/aecc8a8d66b05b8fdd16c841d794c7418e3dc10b))
11
+
5
12
  ## [1.20.0](https://github.com/Infomaximum/package-cli/compare/v1.19.1...v1.20.0) (2024-02-22)
6
13
 
7
14
 
@@ -4,7 +4,7 @@ import RemovePlugin from "remove-files-webpack-plugin";
4
4
  import CopyWebpackPlugin from "copy-webpack-plugin";
5
5
  import path from "path";
6
6
  import { JsonModifyWebpackPlugin } from "@infomaximum/json-modify-webpack-plugin";
7
- import { isExist, systemRequire } from "../../utils.js";
7
+ import { isExist, removeServiceFieldsForDevelopment, systemRequire, } from "../../utils.js";
8
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";
@@ -78,6 +78,7 @@ export const getPackageConfig = (mode, PATHS, isBuildDevMode) => __awaiter(void
78
78
  name: packageName + DEV_POSTFIX,
79
79
  });
80
80
  }
81
+ removeServiceFieldsForDevelopment(currentJsonContent);
81
82
  return currentJsonContent;
82
83
  },
83
84
  },
@@ -1,5 +1,6 @@
1
1
  import { JsonModifyWebpackPlugin } from "@infomaximum/json-modify-webpack-plugin";
2
2
  import { DEV_POSTFIX } from "../../../../const.js";
3
+ import { removeServiceFieldsForDevelopment } from "../../../../utils.js";
3
4
  export const getModifyManifestWidgetPlugin = ({ host, port }) => {
4
5
  return new JsonModifyWebpackPlugin({
5
6
  matchers: [
@@ -15,6 +16,7 @@ export const getModifyManifestWidgetPlugin = ({ host, port }) => {
15
16
  });
16
17
  });
17
18
  }
19
+ removeServiceFieldsForDevelopment(currentJsonContent);
18
20
  return currentJsonContent;
19
21
  },
20
22
  },
package/dist/const.js CHANGED
@@ -9,3 +9,4 @@ export const MANIFEST_JSON_FILE_NAME = "manifest.json";
9
9
  export const MANIFEST_REG_EXP = new RegExp(`${MANIFEST_JSON_FILE_NAME}$`, "i");
10
10
  export const DEV_POSTFIX = "__DEV";
11
11
  export const WIDGET_RESOURCES_DIR_NAME = "_resources";
12
+ export const MANIFEST_SERVICE_FIELDS_FOR_DEVELOPMENT = ["$schema"];
package/dist/utils.js CHANGED
@@ -6,7 +6,7 @@ import util from "node:util";
6
6
  import Module from "node:module";
7
7
  import semver from "semver";
8
8
  import chalk from "chalk";
9
- import { CUSTOM_PACKAGE_CLI_LIB_NAME, WIDGET_SDK_LIB_NAME } from "./const.js";
9
+ import { CUSTOM_PACKAGE_CLI_LIB_NAME, MANIFEST_SERVICE_FIELDS_FOR_DEVELOPMENT, WIDGET_SDK_LIB_NAME, } from "./const.js";
10
10
  const execPromise = util.promisify(exec);
11
11
  export const isExist = (entityPath) => __awaiter(void 0, void 0, void 0, function* () {
12
12
  try {
@@ -92,3 +92,8 @@ export function checkLatestLibsVersion() {
92
92
  catch (error) { }
93
93
  });
94
94
  }
95
+ export function removeServiceFieldsForDevelopment(obj) {
96
+ MANIFEST_SERVICE_FIELDS_FOR_DEVELOPMENT.forEach((key) => {
97
+ delete obj[key];
98
+ });
99
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infomaximum/package-cli",
3
- "version": "1.20.0",
3
+ "version": "1.21.0",
4
4
  "exports": "./dist/index.js",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",