@cobre-npm/library-onboarding-core 0.3.0 → 0.5.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/dist/index.js ADDED
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ var __importDefault = (this && this.__importDefault) || function (mod) {
17
+ return (mod && mod.__esModule) ? mod : { "default": mod };
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.locales = void 0;
21
+ const en_json_1 = __importDefault(require("./locales/Shared/en.json"));
22
+ const es_json_1 = __importDefault(require("./locales/Shared/es.json"));
23
+ const en_json_2 = __importDefault(require("./locales/Summary/en.json"));
24
+ const es_json_2 = __importDefault(require("./locales/Summary/es.json"));
25
+ const en_json_3 = __importDefault(require("./locales/Common/en.json"));
26
+ const es_json_3 = __importDefault(require("./locales/Common/es.json"));
27
+ const en_json_4 = __importDefault(require("./locales/Host/en.json"));
28
+ const es_json_4 = __importDefault(require("./locales/Host/es.json"));
29
+ __exportStar(require("./constants/fieldValidations"), exports);
30
+ exports.locales = {
31
+ Shared: { en: en_json_1.default, es: es_json_1.default },
32
+ Summary: { en: en_json_2.default, es: es_json_2.default },
33
+ Common: { en: en_json_3.default, es: es_json_3.default },
34
+ Host: { en: en_json_4.default, es: es_json_4.default }
35
+ };
@@ -60,5 +60,13 @@
60
60
  "legal_representatives": "Legal Representatives",
61
61
  "beneficial_owners": "Beneficial Owners",
62
62
  "maximal_controllers": "Maximal Controllers"
63
+ },
64
+ "validation": {
65
+ "required": "This field is required",
66
+ "invalid": "This field is invalid",
67
+ "nameFormat": "Enter a valid name (letters, spaces, apostrophes and hyphens only)",
68
+ "nameMinLength": "Name must be at least {min} characters",
69
+ "numericRange": "Enter a value between {min} and {max}",
70
+ "emailFormat": "Enter a valid email"
63
71
  }
64
72
  }
@@ -60,5 +60,13 @@
60
60
  "legal_representatives": "Representantes Legales",
61
61
  "beneficial_owners": "Beneficiarios Finales",
62
62
  "maximal_controllers": "Controladores Máximos"
63
+ },
64
+ "validation": {
65
+ "required": "Este campo es requerido",
66
+ "invalid": "Este campo es inválido",
67
+ "nameFormat": "Ingresa un nombre válido (solo letras, espacios, apóstrofes y guiones)",
68
+ "nameMinLength": "El nombre debe tener al menos {min} caracteres",
69
+ "numericRange": "Ingresa un valor entre {min} y {max}",
70
+ "emailFormat": "Ingresa un correo válido"
63
71
  }
64
72
  }
@@ -1094,10 +1094,6 @@
1094
1094
  "ZAF": "South Africa",
1095
1095
  "ZMB": "Zambia",
1096
1096
  "ZWE": "Zimbabwe"
1097
- },
1098
- "validation": {
1099
- "required": "This field is required",
1100
- "invalid": "This field is invalid"
1101
1097
  }
1102
1098
  }
1103
1099
 
@@ -1094,10 +1094,6 @@
1094
1094
  "ZAF": "Sudáfrica",
1095
1095
  "ZMB": "Zambia",
1096
1096
  "ZWE": "Zimbabue"
1097
- },
1098
- "validation": {
1099
- "required": "Este campo es requerido",
1100
- "invalid": "Este campo es inválido"
1101
1097
  }
1102
1098
  }
1103
1099
 
package/package.json CHANGED
@@ -1,22 +1,32 @@
1
1
  {
2
2
  "name": "@cobre-npm/library-onboarding-core",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Shared configurations and resources for onboarding MFEs",
5
- "main": "./src/index.js",
6
- "types": "./src/index.d.ts",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
7
  "exports": {
8
8
  ".": {
9
- "types": "./src/index.d.ts",
10
- "default": "./src/index.js"
9
+ "types": "./dist/index.d.ts",
10
+ "default": "./dist/index.js"
11
11
  },
12
- "./locales/*": "./src/locales/*.json"
12
+ "./locales/*": "./dist/locales/*.json"
13
13
  },
14
14
  "files": [
15
- "src"
15
+ "dist"
16
16
  ],
17
17
  "scripts": {
18
+ "build": "rm -rf dist && tsc && cp -R src/locales dist/",
19
+ "typecheck": "tsc --noEmit",
18
20
  "lint": "eslint . --fix",
19
- "publish:prod": "npm publish"
21
+ "test": "node --test",
22
+ "publish:prod": "pnpm lint && pnpm typecheck && pnpm build && pnpm publish"
23
+ },
24
+ "devDependencies": {
25
+ "@eslint/js": "^10.0.1",
26
+ "@typescript-eslint/eslint-plugin": "^8.61.1",
27
+ "@typescript-eslint/parser": "^8.61.1",
28
+ "eslint": "^10.5.0",
29
+ "typescript": "^5.9.3"
20
30
  },
21
31
  "license": "ISC",
22
32
  "packageManager": "pnpm@10.27.0"
package/src/index.d.ts DELETED
@@ -1,17 +0,0 @@
1
- type SharedEn = typeof import("./locales/Shared/en.json")
2
- type SharedEs = typeof import("./locales/Shared/es.json")
3
- type SummaryEn = typeof import("./locales/Summary/en.json")
4
- type SummaryEs = typeof import("./locales/Summary/es.json")
5
- type CommonEn = typeof import("./locales/Common/en.json")
6
- type CommonEs = typeof import("./locales/Common/es.json")
7
- type HostEn = typeof import("./locales/Host/en.json")
8
- type HostEs = typeof import("./locales/Host/es.json")
9
-
10
- export interface Locales {
11
- Shared: { en: SharedEn; es: SharedEs }
12
- Summary: { en: SummaryEn; es: SummaryEs }
13
- Common: { en: CommonEn; es: CommonEs }
14
- Host: { en: HostEn; es: HostEs }
15
- }
16
-
17
- export const locales: Locales
package/src/index.js DELETED
@@ -1,17 +0,0 @@
1
- const SharedEn = require('./locales/Shared/en.json')
2
- const SharedEs = require('./locales/Shared/es.json')
3
- const SummaryEn = require('./locales/Summary/en.json')
4
- const SummaryEs = require('./locales/Summary/es.json')
5
- const CommonEn = require('./locales/Common/en.json')
6
- const CommonEs = require('./locales/Common/es.json')
7
- const HostEn = require('./locales/Host/en.json')
8
- const HostEs = require('./locales/Host/es.json')
9
-
10
- const locales = {
11
- Shared: { en: SharedEn, es: SharedEs },
12
- Summary: { en: SummaryEn, es: SummaryEs },
13
- Common: { en: CommonEn, es: CommonEs },
14
- Host: { en: HostEn, es: HostEs }
15
- }
16
-
17
- module.exports = { locales }
File without changes
File without changes
File without changes
File without changes