@pagopa/io-app-email-templates 0.1.6

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capitalize.js","sourceRoot":"","sources":["../../utils/capitalize.ts"],"names":[],"mappings":";;;AAAO,MAAM,UAAU,GAAG,CAAC,CAAS,EAAU,EAAE,CAC9C,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAD5B,QAAA,UAAU,cACkB;AAElC,MAAM,WAAW,GAAG,CAAC,CAAS,EAAU,EAAE,CAC/C,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,kBAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAD1C,QAAA,WAAW,eAC+B","sourcesContent":["export const capitalize = (s: string): string =>\n s.charAt(0).toUpperCase() + s.slice(1);\n\nexport const splitAndCap = (s: string): string =>\n s.toLowerCase().split(\" \").map(capitalize).join(\" \");\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const extractTime: (d: Date) => string;
2
+ export declare const extractDate: (d: Date) => string;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.extractDate = exports.extractTime = void 0;
7
+ const moment_timezone_1 = __importDefault(require("moment-timezone"));
8
+ const TIME_ZONE = "Europe/Rome";
9
+ const TIME_FORMAT = "HH:mm";
10
+ const DATE_FORMAT = "DD/MM/YYYY";
11
+ const extractTime = (d) => (0, moment_timezone_1.default)(d).tz(TIME_ZONE).format(TIME_FORMAT);
12
+ exports.extractTime = extractTime;
13
+ const extractDate = (d) => (0, moment_timezone_1.default)(d).tz(TIME_ZONE).format(DATE_FORMAT);
14
+ exports.extractDate = extractDate;
15
+ //# sourceMappingURL=datetime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetime.js","sourceRoot":"","sources":["../../utils/datetime.ts"],"names":[],"mappings":";;;;;;AAAA,sEAAqC;AAErC,MAAM,SAAS,GAAG,aAAa,CAAC;AAChC,MAAM,WAAW,GAAG,OAAO,CAAC;AAC5B,MAAM,WAAW,GAAG,YAAY,CAAC;AAE1B,MAAM,WAAW,GAAG,CAAC,CAAO,EAAU,EAAE,CAC7C,IAAA,yBAAM,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AADjC,QAAA,WAAW,eACsB;AAEvC,MAAM,WAAW,GAAG,CAAC,CAAO,EAAU,EAAE,CAC7C,IAAA,yBAAM,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AADjC,QAAA,WAAW,eACsB","sourcesContent":["import moment from \"moment-timezone\";\n\nconst TIME_ZONE = \"Europe/Rome\";\nconst TIME_FORMAT = \"HH:mm\";\nconst DATE_FORMAT = \"DD/MM/YYYY\";\n\nexport const extractTime = (d: Date): string =>\n moment(d).tz(TIME_ZONE).format(TIME_FORMAT);\n\nexport const extractDate = (d: Date): string =>\n moment(d).tz(TIME_ZONE).format(DATE_FORMAT);\n"]}
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@pagopa/io-app-email-templates",
3
+ "version": "0.1.6",
4
+ "description": "Common html template for email",
5
+ "repository": "https://github.com/pagopa/io-app-email-templates",
6
+ "author": "https://www.pagopa.gov.it",
7
+ "license": "MIT",
8
+ "files": [
9
+ "package.json",
10
+ "README.md",
11
+ "./dist/*"
12
+ ],
13
+ "exports": {
14
+ "./*": "./dist/*.js"
15
+ },
16
+ "typesVersions": {
17
+ "*": {
18
+ "*": [
19
+ "./dist/*"
20
+ ]
21
+ }
22
+ },
23
+ "scripts": {
24
+ "prebuild": "shx rm -rf dist && npm-run-all -p generate:*",
25
+ "build": "tsc",
26
+ "postbuild": "dependency-check package.json --no-dev --missing ./dist/**/*.js",
27
+ "test": "vitest run",
28
+ "lint": "eslint . -c .eslintrc.js --ext .ts,.tsx --cache",
29
+ "generate": "npm-run-all -p generate:*",
30
+ "generate:mailvalidation": "ts-node ./utils/email_generation_script.ts MailValidation/",
31
+ "generate:loginnotification": "ts-node ./utils/email_generation_script.ts LoginNotificationIOWeb/",
32
+ "generate:loginnotificationfallback": "ts-node ./utils/email_generation_script.ts LoginNotification/",
33
+ "test:watch": "vitest"
34
+ },
35
+ "dependencies": {
36
+ "@pagopa/ts-commons": "^13.0.0",
37
+ "fp-ts": "^2.16.5",
38
+ "io-ts": "^2.2.21",
39
+ "moment-timezone": "^0.5.45"
40
+ },
41
+ "devDependencies": {
42
+ "@pagopa/eslint-config": "^3.0.0",
43
+ "@types/mjml": "^4.7.4",
44
+ "@types/node": "^18",
45
+ "dependency-check": "^4.1.0",
46
+ "eslint": "^8.28.0",
47
+ "eslint-plugin-prettier": "^4.0.0",
48
+ "mjml": "^4.15.3",
49
+ "npm-run-all": "^4.1.5",
50
+ "shx": "^0.3.4",
51
+ "ts-node": "^10.9.2",
52
+ "typescript": "^5.4.4",
53
+ "vitest": "^1.4.0"
54
+ },
55
+ "publishConfig": {
56
+ "access": "public",
57
+ "registry": "https://registry.npmjs.org/"
58
+ }
59
+ }