@coopenomics/factory 2025.7.15-1 → 2025.7.20

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/dist/index.cjs CHANGED
@@ -2916,7 +2916,7 @@ class PDFService {
2916
2916
 
2917
2917
  const name = "@coopenomics/factory";
2918
2918
  const type = "module";
2919
- const version = "2025.7.15-1";
2919
+ const version = "2025.7.20";
2920
2920
  const description = "";
2921
2921
  const author = "Alex Ant <chairman.voskhod@gmail.com>";
2922
2922
  const license = "MIT";
@@ -2966,7 +2966,7 @@ const dependencies = {
2966
2966
  "ajv-formats": "^3.0.1",
2967
2967
  "ajv-i18n": "^4.2.0",
2968
2968
  axios: "^1.7.2",
2969
- cooptypes: "2025.7.15-1",
2969
+ cooptypes: "2025.7.20",
2970
2970
  dotenv: "^16.4.5",
2971
2971
  "eosjs-ecc": "^4.0.7",
2972
2972
  handlebars: "^4.7.8",
@@ -2997,7 +2997,7 @@ const devDependencies = {
2997
2997
  vite: "^5.2.11",
2998
2998
  vitest: "^1.6.0"
2999
2999
  };
3000
- const gitHead = "f26c9960956f6be4c1970b3618b1922cd52decc5";
3000
+ const gitHead = "60e319589d8e78f0a9c686b89ef424b7038637d1";
3001
3001
  const packageJson = {
3002
3002
  name: name,
3003
3003
  type: type,
@@ -3377,12 +3377,17 @@ class DocFactory {
3377
3377
  };
3378
3378
  }
3379
3379
  extractOrganizationName(input) {
3380
- const regex = /^\s*(?:[А-ЯЁA-Za-z]{2,4}\s+)?["'«»]?([А-ЯЁа-яёA-Za-z0-9\- ]+(?:\s[А-ЯЁа-яёA-Za-z0-9\- ]+)*)["'«»]?\s*$/;
3380
+ const regex = /["'«»]([^"'«»]+)["'«»]/;
3381
3381
  const match = input.short_name.match(regex);
3382
- if (!match) {
3382
+ if (match) {
3383
+ return match[1].trim().toUpperCase();
3384
+ }
3385
+ const words = input.short_name.trim().split(/\s+/);
3386
+ const lastWord = words[words.length - 1];
3387
+ if (!lastWord) {
3383
3388
  throw new Error(`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0438\u0437\u0432\u043B\u0435\u0447\u044C \u0438\u043C\u044F \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0437: "${input.short_name}"`);
3384
3389
  }
3385
- return match[1].toUpperCase();
3390
+ return lastWord.toUpperCase();
3386
3391
  }
3387
3392
  extractPersonalAbbreviatedName(input) {
3388
3393
  return `${input.first_name[0]}${input.middle_name[0]}${input.last_name[0]}`.toUpperCase();
package/dist/index.mjs CHANGED
@@ -2903,7 +2903,7 @@ class PDFService {
2903
2903
 
2904
2904
  const name = "@coopenomics/factory";
2905
2905
  const type = "module";
2906
- const version = "2025.7.15-1";
2906
+ const version = "2025.7.20";
2907
2907
  const description = "";
2908
2908
  const author = "Alex Ant <chairman.voskhod@gmail.com>";
2909
2909
  const license = "MIT";
@@ -2953,7 +2953,7 @@ const dependencies = {
2953
2953
  "ajv-formats": "^3.0.1",
2954
2954
  "ajv-i18n": "^4.2.0",
2955
2955
  axios: "^1.7.2",
2956
- cooptypes: "2025.7.15-1",
2956
+ cooptypes: "2025.7.20",
2957
2957
  dotenv: "^16.4.5",
2958
2958
  "eosjs-ecc": "^4.0.7",
2959
2959
  handlebars: "^4.7.8",
@@ -2984,7 +2984,7 @@ const devDependencies = {
2984
2984
  vite: "^5.2.11",
2985
2985
  vitest: "^1.6.0"
2986
2986
  };
2987
- const gitHead = "f26c9960956f6be4c1970b3618b1922cd52decc5";
2987
+ const gitHead = "60e319589d8e78f0a9c686b89ef424b7038637d1";
2988
2988
  const packageJson = {
2989
2989
  name: name,
2990
2990
  type: type,
@@ -3364,12 +3364,17 @@ class DocFactory {
3364
3364
  };
3365
3365
  }
3366
3366
  extractOrganizationName(input) {
3367
- const regex = /^\s*(?:[А-ЯЁA-Za-z]{2,4}\s+)?["'«»]?([А-ЯЁа-яёA-Za-z0-9\- ]+(?:\s[А-ЯЁа-яёA-Za-z0-9\- ]+)*)["'«»]?\s*$/;
3367
+ const regex = /["'«»]([^"'«»]+)["'«»]/;
3368
3368
  const match = input.short_name.match(regex);
3369
- if (!match) {
3369
+ if (match) {
3370
+ return match[1].trim().toUpperCase();
3371
+ }
3372
+ const words = input.short_name.trim().split(/\s+/);
3373
+ const lastWord = words[words.length - 1];
3374
+ if (!lastWord) {
3370
3375
  throw new Error(`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0438\u0437\u0432\u043B\u0435\u0447\u044C \u0438\u043C\u044F \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0437: "${input.short_name}"`);
3371
3376
  }
3372
- return match[1].toUpperCase();
3377
+ return lastWord.toUpperCase();
3373
3378
  }
3374
3379
  extractPersonalAbbreviatedName(input) {
3375
3380
  return `${input.first_name[0]}${input.middle_name[0]}${input.last_name[0]}`.toUpperCase();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coopenomics/factory",
3
3
  "type": "module",
4
- "version": "2025.7.15-1",
4
+ "version": "2025.7.20",
5
5
  "description": "",
6
6
  "author": "Alex Ant <chairman.voskhod@gmail.com>",
7
7
  "license": "MIT",
@@ -50,7 +50,7 @@
50
50
  "ajv-formats": "^3.0.1",
51
51
  "ajv-i18n": "^4.2.0",
52
52
  "axios": "^1.7.2",
53
- "cooptypes": "2025.7.15-1",
53
+ "cooptypes": "2025.7.20",
54
54
  "dotenv": "^16.4.5",
55
55
  "eosjs-ecc": "^4.0.7",
56
56
  "handlebars": "^4.7.8",
@@ -81,5 +81,5 @@
81
81
  "vite": "^5.2.11",
82
82
  "vitest": "^1.6.0"
83
83
  },
84
- "gitHead": "f26c9960956f6be4c1970b3618b1922cd52decc5"
84
+ "gitHead": "60e319589d8e78f0a9c686b89ef424b7038637d1"
85
85
  }