@infomaximum/package-cli 1.13.0 → 1.15.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.15.0](https://github.com/Infomaximum/package-cli/compare/v1.14.0...v1.15.0) (2023-12-26)
6
+
7
+
8
+ ### Features
9
+
10
+ * добавлены шаблоны документации, и истории изменений пакета ([125891b](https://github.com/Infomaximum/package-cli/commit/125891bd80741171216698204dbf8387c6bafa1c))
11
+
12
+ ## [1.14.0](https://github.com/Infomaximum/package-cli/compare/v1.13.0...v1.14.0) (2023-12-25)
13
+
14
+
15
+ ### Features
16
+
17
+ * добавлены валидаторы манифестов ([cfbd6f4](https://github.com/Infomaximum/package-cli/commit/cfbd6f4a047dabf85c39000ea54add57ed2b8871))
18
+
5
19
  ## [1.13.0](https://github.com/Infomaximum/package-cli/compare/v1.12.0...v1.13.0) (2023-12-19)
6
20
 
7
21
 
@@ -12,6 +12,7 @@ import { WIDGET_PACKAGE_JSON_TEMPLATE } from "../../../templates/widget/widgetPa
12
12
  import { CUSTOM_PACKAGE_CLI_LIB_NAME, CUSTOM_WIDGET_LIB_NAME, MANIFEST_JSON_FILE_NAME, } from "../../../const.js";
13
13
  import { WIDGET_SETTINGS_TEMPLATE } from "../../../templates/widget/src/settings.js";
14
14
  import { WIDGET_PANEL_TEMPLATE } from "../../../templates/widget/src/panel.js";
15
+ import { GET_CHANGELOG_MD, GET_DOC_MD, } from "../../../templates/package/additionalFiles.js";
15
16
  const addIconActionName = "addIcon";
16
17
  const addInitActions = (basePath, plop) => {
17
18
  plop.setActionType(addIconActionName, function (answers, config, plop) {
@@ -45,6 +46,18 @@ const actions = ({ customWidgetVersion, packageCliVersion }) => {
45
46
  path: `package/resources/${packageIconName}.png`,
46
47
  template: PACKAGE_ICON_TEMPLATE,
47
48
  },
49
+ ...["ru", "en"].flatMap((language) => [
50
+ {
51
+ type: "add",
52
+ path: `package/${language}/doc.md`,
53
+ template: GET_DOC_MD(language),
54
+ },
55
+ {
56
+ type: "add",
57
+ path: `package/${language}/changelog.md`,
58
+ template: GET_CHANGELOG_MD(language),
59
+ },
60
+ ]),
48
61
  {
49
62
  type: "add",
50
63
  path: MANIFEST_JSON_FILE_NAME,
@@ -0,0 +1,20 @@
1
+ export const GET_CHANGELOG_MD = (language) => {
2
+ switch (language) {
3
+ case "en":
4
+ return "<!-- Description of changes -->";
5
+ case "ru":
6
+ return "<!-- Описание изменений -->";
7
+ default:
8
+ return "";
9
+ }
10
+ };
11
+ export const GET_DOC_MD = (language) => {
12
+ switch (language) {
13
+ case "en":
14
+ return "<!-- Package documentation -->";
15
+ case "ru":
16
+ return "<!-- Документация по пакету -->";
17
+ default:
18
+ return "";
19
+ }
20
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infomaximum/package-cli",
3
- "version": "1.13.0",
3
+ "version": "1.15.0",
4
4
  "exports": "./dist/index.js",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -13,6 +13,7 @@
13
13
  "guid": {
14
14
  "type": "string",
15
15
  "format": "uuid",
16
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
16
17
  "title": "Уникальный идентификатор пакета, формат uuid v4"
17
18
  },
18
19
  "name": {
@@ -42,7 +43,8 @@
42
43
  "required": ["name"],
43
44
  "properties": {
44
45
  "name": {
45
- "type": "string"
46
+ "type": "string",
47
+ "minLength": 1
46
48
  }
47
49
  }
48
50
  }
@@ -53,10 +55,12 @@
53
55
  "required": ["ru", "en"],
54
56
  "properties": {
55
57
  "ru": {
56
- "type": "string"
58
+ "type": "string",
59
+ "minLength": 1
57
60
  },
58
61
  "en": {
59
- "type": "string"
62
+ "type": "string",
63
+ "minLength": 1
60
64
  }
61
65
  }
62
66
  },
@@ -71,7 +75,8 @@
71
75
  "type": "object",
72
76
  "properties": {
73
77
  "name": {
74
- "type": "string"
78
+ "type": "string",
79
+ "minLength": 1
75
80
  }
76
81
  },
77
82
  "required": ["name"]
@@ -83,7 +88,8 @@
83
88
  "type": "object",
84
89
  "properties": {
85
90
  "name": {
86
- "type": "string"
91
+ "type": "string",
92
+ "minLength": 1
87
93
  }
88
94
  },
89
95
  "required": ["name"]
@@ -100,6 +106,7 @@
100
106
  "properties": {
101
107
  "guid": {
102
108
  "type": "string",
109
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
103
110
  "format": "uuid"
104
111
  },
105
112
  "version": {
@@ -5,11 +5,13 @@
5
5
  "uuid": {
6
6
  "type": "string",
7
7
  "format": "uuid",
8
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
8
9
  "title": "Уникальный идентификатор виджета в формате uuid v4"
9
10
  },
10
11
  "entry": {
11
12
  "type": "string",
12
13
  "title": "Имя файла в который будет собран виджет",
14
+ "pattern": "\\w+\\.js$",
13
15
  "examples": ["index.js", "main.js"]
14
16
  },
15
17
  "api_version": {
@@ -21,10 +23,12 @@
21
23
  "required": ["ru", "en"],
22
24
  "properties": {
23
25
  "en": {
24
- "type": "string"
26
+ "type": "string",
27
+ "minLength": 1
25
28
  },
26
29
  "ru": {
27
- "type": "string"
30
+ "type": "string",
31
+ "minLength": 1
28
32
  }
29
33
  }
30
34
  },