From f82544cb4f7ea215f7978a15cba2d4ef6c60d69e Mon Sep 17 00:00:00 2001 From: Christophe CAMENSULI Date: Thu, 29 Feb 2024 17:34:24 +0100 Subject: [PATCH] fix(framework): add ejs et twig service --- nodefony/config/module-http-config.ts | 6 +- nodefony/controllers/AppController.ts | 78 +- nodefony/views/index.ejs | 25 + nodefony/views/index.twig | 27 + package-lock.json | 1315 +++++++---------- package.json | 7 +- rollup.config.ts | 22 +- src/nodefony/package-lock.json | 138 +- src/nodefony/package.json | 8 +- src/nodefony/src/kernel/Kernel.ts | 11 +- src/nodefony/src/kernel/Module.ts | 13 +- .../src/kernel/decorators/kernelDecorator.ts | 77 +- src/nodefony/src/service/fetchService.ts | 3 +- src/nodefony/src/syslog/Syslog.ts | 1 - src/nodefony/src/tests/Event.test.ts | 3 - src/packages/@nodefony/framework/index.ts | 7 +- .../nodefony/decorators/routerDecorators.ts | 25 +- .../framework/nodefony/service/Ejs.ts | 43 + .../framework/nodefony/service/Twig.ts | 118 ++ .../framework/nodefony/service/router.ts | 9 +- .../framework/nodefony/src/Controller.ts | 135 +- .../framework/nodefony/src/Resolver.ts | 7 +- .../@nodefony/framework/nodefony/src/Route.ts | 6 +- .../framework/nodefony/src/Template.ts | 26 + .../@nodefony/framework/package-lock.json | 300 +++- src/packages/@nodefony/framework/package.json | 13 +- .../@nodefony/framework/rollup.config.ts | 26 +- .../http/nodefony/service/http-kernel.ts | 2 - .../http/nodefony/src/context/Context.ts | 5 +- .../nodefony/src/context/http/HttpContext.ts | 10 +- src/packages/@nodefony/http/package-lock.json | 159 +- src/packages/@nodefony/http/package.json | 13 +- src/packages/@nodefony/http/rollup.config.ts | 25 +- src/packages/@nodefony/security/package.json | 6 +- .../@nodefony/sequelize/package-lock.json | 109 +- src/packages/@nodefony/sequelize/package.json | 8 +- .../@nodefony/sequelize/rollup.config.ts | 1 + 37 files changed, 1602 insertions(+), 1185 deletions(-) create mode 100644 nodefony/views/index.ejs create mode 100644 nodefony/views/index.twig create mode 100644 src/packages/@nodefony/framework/nodefony/service/Ejs.ts create mode 100644 src/packages/@nodefony/framework/nodefony/service/Twig.ts create mode 100644 src/packages/@nodefony/framework/nodefony/src/Template.ts diff --git a/nodefony/config/module-http-config.ts b/nodefony/config/module-http-config.ts index 213bff3..0bb8c5f 100644 --- a/nodefony/config/module-http-config.ts +++ b/nodefony/config/module-http-config.ts @@ -25,10 +25,14 @@ const certificates = { }, }; +let rejectUnauthorized = true; switch (kernel?.environment) { case "production": case "development": default: + if (kernel?.isDev) { + rejectUnauthorized = false; + } certificates.privateKeyPath = path.resolve( certificates.path, "server", @@ -43,6 +47,6 @@ switch (kernel?.environment) { } export default { - rejectUnauthorized: true, + rejectUnauthorized, certificates, }; diff --git a/nodefony/controllers/AppController.ts b/nodefony/controllers/AppController.ts index f53517b..671f8a3 100644 --- a/nodefony/controllers/AppController.ts +++ b/nodefony/controllers/AppController.ts @@ -1,56 +1,81 @@ -//import { Service, Container, Module } from "nodefony"; -import { inject, Fetch } from "nodefony"; +import { resolve } from "node:path"; + +import { inject, Fetch, FileClass } from "nodefony"; import { DefineRoute, DefineController, Controller } from "@nodefony/framework"; import { ContextType } from "@nodefony/http"; +import https from "node:https"; +//import { twig } from "@nodefony/framework"; class AppController extends Controller { static override basepath: string = "/app"; constructor( context: ContextType, - @inject("Fetch") private fetch: Fetch + @inject("Fetch") private fetchService: Fetch ) { super("app", context); } async initialize() { - //console.log("passs initialize"); //await this.startSession(); + //let response = await this.fetchService.fetch("https://google.fr"); + //TODO add certificat client in serfice for unit test + // const agent = new https.Agent({ + // rejectUnauthorized: false, + // }); + // const response = await this.fetchService.fetch("https://localhost:5152", { + // agent, + // }); + // console.log(response.headers, response.status, response.statusText); return this; } - @DefineRoute("route1", { path: "/", method: "GET" }) + @DefineRoute("route1", { path: "", method: "GET" }) async method1() { - console.log("call method", this.fetch.library); //await this.startSession(); - return this.renderJson({ foo: "bar" }); + const view = resolve( + this.module?.path as string, + "nodefony", + "views", + "index.twig" + ); + return this.renderTwigView(view, this.metaData).catch((e) => { + throw e; + }); + } + + @DefineRoute("route4", { + path: "/add/{name}", + requirements: { methods: ["GET", "POST"] }, + defaults: { name: "cci" }, + }) + async method4(name: string) { + const view = resolve( + this.module?.path as string, + "nodefony", + "views", + "index.ejs" + ); + return this.renderEjsView(view, { name, ...this.metaData }).catch((e) => { + throw e; + }); } @DefineRoute("route3", { method: "DELETE" }) - method3() { - console.log("call method3", this.route); + async method3() { + return this.renderJson(this.metaData); } @DefineRoute("route2", { path: "/add", requirements: { methods: "POST" } }) - method2() { + async method2() { console.log("call method2"); return this.renderJson({ foo: "bar" }); } - @DefineRoute("route4", { - path: "/add/{name}", - requirements: { methods: ["GET", "POST"] }, - defaults: { name: "cci" }, - }) - method4(name: string) { - console.log("call method4", name, this.route); - return this.renderJson({ name }); - } - @DefineRoute("route6", { path: "/ele/{metier}/{format}/add", defaults: { format: "cci" }, }) - method6() { + async method6() { console.log("other route for app"); return this.renderJson({ foo: "bar" }); } @@ -58,14 +83,21 @@ class AppController extends Controller { path: "/ele/{metier}/{format}/{method}/add", }) method7(metier: string, format: string, method: string) { - return this.renderJson({ metier, format, method }); + const view = resolve( + this.module?.path as string, + "nodefony", + "views", + "index.twig" + ); + return this.renderTwigView(view, { metier, format, method }); } @DefineRoute("route5", { path: "*", }) - method5() { + async method5() { console.log("other route for app"); + return this.renderJson(this.route); } } diff --git a/nodefony/views/index.ejs b/nodefony/views/index.ejs new file mode 100644 index 0000000..45ba381 --- /dev/null +++ b/nodefony/views/index.ejs @@ -0,0 +1,25 @@ + + + + + + + + + + + + + <%= nodefony.name %> + + + + + +

<%= nodefony.name %>

+

<%= name %>

+ + + + + diff --git a/nodefony/views/index.twig b/nodefony/views/index.twig new file mode 100644 index 0000000..687063d --- /dev/null +++ b/nodefony/views/index.twig @@ -0,0 +1,27 @@ + + + +{% block head %} + {% block meta %} + + + + + + + + {% endblock %} + {% block description %}{% endblock %} + {% block title %}{{nodefony.name|escape}}{% endblock %} + {% block stylesheets %} {% endblock %} + {% endblock %} + + + + +

{{nodefony.name}}

+{% block body %}{% endblock %} +{% block javascripts %} {% endblock %} + + + diff --git a/package-lock.json b/package-lock.json index 555f2e7..31104aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,9 +23,9 @@ "@rollup/plugin-replace": "5.0.5", "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "11.1.6", - "@types/node": "20.11.20", - "@typescript-eslint/eslint-plugin": "7.0.2", - "@typescript-eslint/parser": "7.0.2", + "@types/node": "20.11.24", + "@typescript-eslint/eslint-plugin": "7.1.0", + "@typescript-eslint/parser": "7.1.0", "eslint": "8.57.0", "eslint-config-prettier": "9.1.0", "eslint-plugin-prettier": "5.1.3", @@ -35,6 +35,7 @@ "rimraf": "5.0.5", "rollup": "4.12.0", "rollup-plugin-copy": "3.5.0", + "rollup-sourcemap-path-transform": "1.0.4", "tslib": "2.6.2", "typescript": "5.3.3" }, @@ -333,6 +334,17 @@ "node": ">=16" } }, + "node_modules/@babel/runtime": { + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.9.tgz", + "integrity": "sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -1523,6 +1535,12 @@ "@types/ms": "*" } }, + "node_modules/@types/ejs": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@types/ejs/-/ejs-3.1.5.tgz", + "integrity": "sha512-nv+GSx77ZtXiJzwKdsASqi+YQ5Z7vwHsTP0JY2SiQgjGckkBRKZnk8nIM+7oUZ1VCtuTz0+By4qVR7fqzp/Dfg==", + "dev": true + }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -1582,9 +1600,9 @@ } }, "node_modules/@types/node": { - "version": "20.11.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.20.tgz", - "integrity": "sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==", + "version": "20.11.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", + "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "dependencies": { "undici-types": "~5.26.4" } @@ -1598,6 +1616,12 @@ "@types/node": "*" } }, + "node_modules/@types/qs": { + "version": "6.9.12", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.12.tgz", + "integrity": "sha512-bZcOkJ6uWrL0Qb2NAWKa7TBU+mJHPzhx9jjLL1KHF+XpzEcR7EXHvjbHlGtR/IsP1vyPrehuS6XqkmaePy//mg==", + "dev": true + }, "node_modules/@types/readable-stream": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.10.tgz", @@ -1619,9 +1643,15 @@ "dev": true }, "node_modules/@types/semver": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.7.tgz", - "integrity": "sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==", + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true + }, + "node_modules/@types/twig": { + "version": "1.12.16", + "resolved": "https://registry.npmjs.org/@types/twig/-/twig-1.12.16.tgz", + "integrity": "sha512-6kXSQwqxWxdHVITY6lur6pVpKbTk5D8R/ZUn2/7Y2AACKFlRqO4jbtHgWPDLe7JUc91sZQhkmopboYDABtZqlA==", "dev": true }, "node_modules/@types/validator": { @@ -1635,16 +1665,16 @@ "integrity": "sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.0.2.tgz", - "integrity": "sha512-/XtVZJtbaphtdrWjr+CJclaCVGPtOdBpFEnvtNf/jRV0IiEemRrL0qABex/nEt8isYcnFacm3nPHYQwL+Wb7qg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.1.0.tgz", + "integrity": "sha512-j6vT/kCulhG5wBmGtstKeiVr1rdXE4nk+DT1k6trYkwlrvW9eOF5ZbgKnd/YR6PcM4uTEXa0h6Fcvf6X7Dxl0w==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "7.0.2", - "@typescript-eslint/type-utils": "7.0.2", - "@typescript-eslint/utils": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2", + "@typescript-eslint/scope-manager": "7.1.0", + "@typescript-eslint/type-utils": "7.1.0", + "@typescript-eslint/utils": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -1670,15 +1700,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.0.2.tgz", - "integrity": "sha512-GdwfDglCxSmU+QTS9vhz2Sop46ebNCXpPPvsByK7hu0rFGRHL+AusKQJ7SoN+LbLh6APFpQwHKmDSwN35Z700Q==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.1.0.tgz", + "integrity": "sha512-V1EknKUubZ1gWFjiOZhDSNToOjs63/9O0puCgGS8aDOgpZY326fzFu15QAUjwaXzRZjf/qdsdBrckYdv9YxB8w==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.0.2", - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/typescript-estree": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2", + "@typescript-eslint/scope-manager": "7.1.0", + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/typescript-estree": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0", "debug": "^4.3.4" }, "engines": { @@ -1698,13 +1728,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.0.2.tgz", - "integrity": "sha512-l6sa2jF3h+qgN2qUMjVR3uCNGjWw4ahGfzIYsCtFrQJCjhbrDPdiihYT8FnnqFwsWX+20hK592yX9I2rxKTP4g==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.1.0.tgz", + "integrity": "sha512-6TmN4OJiohHfoOdGZ3huuLhpiUgOGTpgXNUPJgeZOZR3DnIpdSgtt83RS35OYNNXxM4TScVlpVKC9jyQSETR1A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2" + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -1715,13 +1745,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.0.2.tgz", - "integrity": "sha512-IKKDcFsKAYlk8Rs4wiFfEwJTQlHcdn8CLwLaxwd6zb8HNiMcQIFX9sWax2k4Cjj7l7mGS5N1zl7RCHOVwHq2VQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.1.0.tgz", + "integrity": "sha512-UZIhv8G+5b5skkcuhgvxYWHjk7FW7/JP5lPASMEUoliAPwIH/rxoUSQPia2cuOj9AmDZmwUl1usKm85t5VUMew==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.0.2", - "@typescript-eslint/utils": "7.0.2", + "@typescript-eslint/typescript-estree": "7.1.0", + "@typescript-eslint/utils": "7.1.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -1742,9 +1772,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.2.tgz", - "integrity": "sha512-ZzcCQHj4JaXFjdOql6adYV4B/oFOFjPOC9XYwCaZFRvqN8Llfvv4gSxrkQkd2u4Ci62i2c6W6gkDwQJDaRc4nA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.1.0.tgz", + "integrity": "sha512-qTWjWieJ1tRJkxgZYXx6WUYtWlBc48YRxgY2JN1aGeVpkhmnopq+SUC8UEVGNXIvWH7XyuTjwALfG6bFEgCkQA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -1755,13 +1785,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.2.tgz", - "integrity": "sha512-3AMc8khTcELFWcKcPc0xiLviEvvfzATpdPj/DXuOGIdQIIFybf4DMT1vKRbuAEOFMwhWt7NFLXRkbjsvKZQyvw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.0.tgz", + "integrity": "sha512-k7MyrbD6E463CBbSpcOnwa8oXRdHzH1WiVzOipK3L5KSML92ZKgUBrTlehdi7PEIMT8k0bQixHUGXggPAlKnOQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2", + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1783,17 +1813,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.0.2.tgz", - "integrity": "sha512-PZPIONBIB/X684bhT1XlrkjNZJIEevwkKDsdwfiu1WeqBxYEEdIgVDgm8/bbKHVu+6YOpeRqcfImTdImx/4Bsw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.1.0.tgz", + "integrity": "sha512-WUFba6PZC5OCGEmbweGpnNJytJiLG7ZvDBJJoUcX4qZYf1mGZ97mO2Mps6O2efxJcJdRNpqweCistDbZMwIVHw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "7.0.2", - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/typescript-estree": "7.0.2", + "@typescript-eslint/scope-manager": "7.1.0", + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/typescript-estree": "7.1.0", "semver": "^7.5.4" }, "engines": { @@ -1808,12 +1838,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.2.tgz", - "integrity": "sha512-8Y+YiBmqPighbm5xA2k4wKTxRzx9EkBu7Rlw+WHqMvRJ3RPz/BMBO9b2ru0LUNmXg120PHUXD5+SWFy2R8DqlQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.0.tgz", + "integrity": "sha512-FhUqNWluiGNzlvnDZiXad4mZRhtghdoKW6e98GoEOYSu5cND+E39rG5KwJMUzeENwm1ztYBRqof8wMLP+wNPIA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.0.2", + "@typescript-eslint/types": "7.1.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -2398,6 +2428,21 @@ "node": ">=10" } }, + "node_modules/cli-color": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.4.tgz", + "integrity": "sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==", + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.64", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.15", + "timers-ext": "^0.1.7" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/cli-spinners": { "version": "2.9.2", "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", @@ -2543,6 +2588,15 @@ "resolved": "https://registry.npmjs.org/culvert/-/culvert-0.1.2.tgz", "integrity": "sha512-yi1x3EAWKjQTreYWeSd98431AV+IEE0qoDyOoaHJ7KJ21gv6HtBXHVLX74opVSGqcR8/AbjJBHAHpcOy2bj5Gg==" }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, "node_modules/data-uri-to-buffer": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", @@ -2645,6 +2699,14 @@ "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" }, + "node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "engines": { + "node": ">=0.10" + } + }, "node_modules/detect-libc": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", @@ -2696,6 +2758,20 @@ "safe-buffer": "^5.0.1" } }, + "node_modules/ejs": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", + "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/emitter-listener": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/emitter-listener/-/emitter-listener-1.1.2.tgz", @@ -2843,6 +2919,51 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es5-ext": { + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "node_modules/es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -3021,6 +3142,25 @@ "node": "*" } }, + "node_modules/esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esniff/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -3096,6 +3236,15 @@ "node": ">=0.10.0" } }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, "node_modules/event-target-shim": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", @@ -3117,6 +3266,19 @@ "node": ">=0.8.x" } }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dependencies": { + "type": "^2.7.2" + } + }, + "node_modules/ext/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, "node_modules/external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", @@ -3262,6 +3424,25 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -3393,6 +3574,11 @@ "is-callable": "^1.1.3" } }, + "node_modules/foreachasync": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/foreachasync/-/foreachasync-3.0.0.tgz", + "integrity": "sha512-J+ler7Ta54FwwNcx6wQRDhTIbNeyDcARMkOcguEqnEdtm0jKvN3Li3PDAb2Du3ubJYEWfYL83XMROXdsXAXycw==" + }, "node_modules/foreground-child": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", @@ -3527,6 +3713,14 @@ "node": ">=10" } }, + "node_modules/generate-function": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", + "dependencies": { + "is-property": "^1.0.2" + } + }, "node_modules/get-func-name": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", @@ -4165,6 +4359,16 @@ "node": ">=0.10.0" } }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" + }, + "node_modules/is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==" + }, "node_modules/is-reference": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", @@ -4293,6 +4497,43 @@ "@pkgjs/parseargs": "^0.11.0" } }, + "node_modules/jake": { + "version": "10.8.7", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz", + "integrity": "sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jake/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/jake/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/js-git": { "version": "0.7.8", "resolved": "https://registry.npmjs.org/js-git/-/js-git-0.7.8.tgz", @@ -4498,6 +4739,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/locutus": { + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/locutus/-/locutus-2.0.16.tgz", + "integrity": "sha512-pGfl6Hb/1mXLzrX5kl5lH7gz25ey0vwQssZp8Qo2CEF59di6KrAgdFm+0pW8ghLnvNzzJGj5tlWhhv2QbK3jeQ==", + "engines": { + "node": ">= 10" + } + }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", @@ -4552,6 +4801,11 @@ "node": ">=0.8.6" } }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, "node_modules/lru-cache": { "version": "7.18.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", @@ -4560,6 +4814,14 @@ "node": ">=12" } }, + "node_modules/lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "dependencies": { + "es5-ext": "~0.10.2" + } + }, "node_modules/lunr": { "version": "2.3.9", "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", @@ -4612,6 +4874,21 @@ "node": ">= 12" } }, + "node_modules/memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + } + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -4731,21 +5008,58 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/native-duplexpair": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/native-duplexpair/-/native-duplexpair-1.0.0.tgz", - "integrity": "sha512-E7QQoM+3jvNtlmyfqRZ0/U75VFgCls+fSkbml2MpgWkWyz3ox8Y58gNhfuziuQYGNNQAbFZJQck55LHCnCK6CA==" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/needle": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.4.0.tgz", - "integrity": "sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==", + "node_modules/mysql2": { + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.9.2.tgz", + "integrity": "sha512-3Cwg/UuRkAv/wm6RhtPE5L7JlPB877vwSF6gfLAS68H+zhH+u5oa3AieqEd0D0/kC3W7qIhYbH419f7O9i/5nw==", + "dependencies": { + "denque": "^2.1.0", + "generate-function": "^2.3.1", + "iconv-lite": "^0.6.3", + "long": "^5.2.1", + "lru-cache": "^8.0.0", + "named-placeholders": "^1.1.3", + "seq-queue": "^0.0.5", + "sqlstring": "^2.3.2" + }, + "engines": { + "node": ">= 8.0" + } + }, + "node_modules/mysql2/node_modules/lru-cache": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", + "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==", + "engines": { + "node": ">=16.14" + } + }, + "node_modules/named-placeholders": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz", + "integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==", + "dependencies": { + "lru-cache": "^7.14.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/native-duplexpair": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/native-duplexpair/-/native-duplexpair-1.0.0.tgz", + "integrity": "sha512-E7QQoM+3jvNtlmyfqRZ0/U75VFgCls+fSkbml2MpgWkWyz3ox8Y58gNhfuziuQYGNNQAbFZJQck55LHCnCK6CA==" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/needle": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.4.0.tgz", + "integrity": "sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==", "dependencies": { "debug": "^3.2.6", "iconv-lite": "^0.4.4", @@ -4785,6 +5099,11 @@ "node": ">= 0.4.0" } }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" + }, "node_modules/node-abort-controller": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", @@ -5713,6 +6032,11 @@ "node": ">=8.10.0" } }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, "node_modules/regexp.prototype.flags": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", @@ -5937,6 +6261,18 @@ "node": "*" } }, + "node_modules/rollup-sourcemap-path-transform": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/rollup-sourcemap-path-transform/-/rollup-sourcemap-path-transform-1.0.4.tgz", + "integrity": "sha512-rDGqCmPuYWZEzEeN42uhXrRERAlsT2Gmnwwwr/7iN6k4hqhn0wyvYWsjNk+HJCaTmU1H/JbUwnJyU7BCojAMxA==", + "dev": true, + "engines": { + "node": ">= 14.18" + }, + "peerDependencies": { + "rollup": "^2 || ^3 || ^4" + } + }, "node_modules/run-async": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", @@ -6074,6 +6410,11 @@ "node": ">=10" } }, + "node_modules/seq-queue": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", + "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" + }, "node_modules/sequelize": { "version": "6.37.1", "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.37.1.tgz", @@ -6341,6 +6682,14 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" }, + "node_modules/sqlstring": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/stoppable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", @@ -6600,6 +6949,15 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dependencies": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, "node_modules/tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -6692,6 +7050,43 @@ "node": ">= 0.8.0" } }, + "node_modules/twig": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/twig/-/twig-1.17.1.tgz", + "integrity": "sha512-atxccyr/BHtb1gPMA7Lvki0OuU17XBqHsNH9lzDHt9Rr1293EVZOosSZabEXz/DPVikIW8ZDqSkEddwyJnQN2w==", + "dependencies": { + "@babel/runtime": "^7.8.4", + "locutus": "^2.0.11", + "minimatch": "3.0.x", + "walk": "2.3.x" + }, + "bin": { + "twigjs": "bin/twigjs" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/twig/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/twig/node_modules/minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/tx2": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tx2/-/tx2-1.0.5.tgz", @@ -6701,6 +7096,11 @@ "json-stringify-safe": "^5.0.1" } }, + "node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -6989,6 +7389,14 @@ "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", "dev": true }, + "node_modules/walk": { + "version": "2.3.15", + "resolved": "https://registry.npmjs.org/walk/-/walk-2.3.15.tgz", + "integrity": "sha512-4eRTBZljBfIISK1Vnt69Gvr2w/wc3U6Vtrw7qiN5iqYJPH7LElcYh/iU4XWhdCy2dZqv1ToMyYlybDylfG/5Vg==", + "dependencies": { + "foreachasync": "^3.0.0" + } + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -7278,7 +7686,7 @@ "@inquirer/prompts": "4.1.0", "asciify": "1.3.5", "chokidar": "3.6.0", - "cli-color": "2.0.3", + "cli-color": "2.0.4", "cli-table3": "0.6.3", "clui": "0.3.6", "commander": "12.0.0", @@ -7314,14 +7722,14 @@ "@types/lodash": "4.14.202", "@types/mime-types": "2.1.4", "@types/mocha": "10.0.6", - "@types/node": "20.11.20", + "@types/node": "20.11.24", "@types/node-fetch": "2.6.11", "@types/node-forge": "1.3.11", "@types/shelljs": "0.8.15", "@types/twig": "1.12.16", "@types/uuid": "9.0.8", - "@typescript-eslint/eslint-plugin": "7.0.2", - "@typescript-eslint/parser": "7.0.2", + "@typescript-eslint/eslint-plugin": "7.1.0", + "@typescript-eslint/parser": "7.1.0", "chai": "=4.3.10", "eslint": "8.57.0", "eslint-config-prettier": "9.1.0", @@ -7379,18 +7787,6 @@ "node": ">=6.0.0" } }, - "src/nodefony/node_modules/@babel/runtime": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.9.tgz", - "integrity": "sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==", - "license": "MIT", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "src/nodefony/node_modules/@babel/types": { "version": "7.23.9", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.9.tgz", @@ -7578,13 +7974,6 @@ "@types/node": "*" } }, - "src/nodefony/node_modules/@types/twig": { - "version": "1.12.16", - "resolved": "https://registry.npmjs.org/@types/twig/-/twig-1.12.16.tgz", - "integrity": "sha512-6kXSQwqxWxdHVITY6lur6pVpKbTk5D8R/ZUn2/7Y2AACKFlRqO4jbtHgWPDLe7JUc91sZQhkmopboYDABtZqlA==", - "dev": true, - "license": "MIT" - }, "src/nodefony/node_modules/@types/uuid": { "version": "9.0.8", "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", @@ -7895,22 +8284,6 @@ "node": "*" } }, - "src/nodefony/node_modules/cli-color": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz", - "integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==", - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.61", - "es6-iterator": "^2.0.3", - "memoizee": "^0.4.15", - "timers-ext": "^0.1.7" - }, - "engines": { - "node": ">=0.10" - } - }, "src/nodefony/node_modules/cli-table3": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", @@ -8097,16 +8470,6 @@ "node": ">=18" } }, - "src/nodefony/node_modules/d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "license": "ISC", - "dependencies": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, "src/nodefony/node_modules/dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -8229,21 +8592,6 @@ "safer-buffer": "^2.1.0" } }, - "src/nodefony/node_modules/ejs": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", - "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", - "license": "Apache-2.0", - "dependencies": { - "jake": "^10.8.5" - }, - "bin": { - "ejs": "bin/cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, "src/nodefony/node_modules/emojilib": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/emojilib/-/emojilib-2.4.0.tgz", @@ -8263,54 +8611,6 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, - "src/nodefony/node_modules/es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", - "hasInstallScript": true, - "license": "ISC", - "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "next-tick": "^1.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "src/nodefony/node_modules/es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", - "license": "MIT", - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "src/nodefony/node_modules/es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "src/nodefony/node_modules/es6-weak-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", - "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", - "license": "ISC", - "dependencies": { - "d": "1", - "es5-ext": "^0.10.46", - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.1" - } - }, "src/nodefony/node_modules/escalade": { "version": "3.1.1", "dev": true, @@ -8417,31 +8717,6 @@ "node": ">= 0.8.0" } }, - "src/nodefony/node_modules/event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", - "license": "MIT", - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "src/nodefony/node_modules/ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", - "license": "ISC", - "dependencies": { - "type": "^2.7.2" - } - }, - "src/nodefony/node_modules/ext/node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", - "license": "ISC" - }, "src/nodefony/node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -8482,52 +8757,16 @@ "node": "^12.20 || >= 14.13" } }, - "src/nodefony/node_modules/filelist": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", - "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", - "license": "Apache-2.0", - "dependencies": { - "minimatch": "^5.0.1" + "src/nodefony/node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" } }, - "src/nodefony/node_modules/filelist/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "src/nodefony/node_modules/filelist/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "src/nodefony/node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, - "src/nodefony/node_modules/foreachasync": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/foreachasync/-/foreachasync-3.0.0.tgz", - "integrity": "sha512-J+ler7Ta54FwwNcx6wQRDhTIbNeyDcARMkOcguEqnEdtm0jKvN3Li3PDAb2Du3ubJYEWfYL83XMROXdsXAXycw==", - "license": "Apache2" - }, "src/nodefony/node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -8840,12 +9079,6 @@ "dev": true, "license": "MIT" }, - "src/nodefony/node_modules/is-promise": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", - "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", - "license": "MIT" - }, "src/nodefony/node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -8873,24 +9106,6 @@ "dev": true, "license": "MIT" }, - "src/nodefony/node_modules/jake": { - "version": "10.8.7", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz", - "integrity": "sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==", - "license": "Apache-2.0", - "dependencies": { - "async": "^3.2.3", - "chalk": "^4.0.2", - "filelist": "^1.0.4", - "minimatch": "^3.1.2" - }, - "bin": { - "jake": "bin/cli.js" - }, - "engines": { - "node": ">=10" - } - }, "src/nodefony/node_modules/js-stringify": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz", @@ -9020,15 +9235,6 @@ "dev": true, "license": "WTFPL" }, - "src/nodefony/node_modules/locutus": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/locutus/-/locutus-2.0.16.tgz", - "integrity": "sha512-pGfl6Hb/1mXLzrX5kl5lH7gz25ey0vwQssZp8Qo2CEF59di6KrAgdFm+0pW8ghLnvNzzJGj5tlWhhv2QbK3jeQ==", - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, "src/nodefony/node_modules/lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", @@ -9062,15 +9268,6 @@ "get-func-name": "^2.0.1" } }, - "src/nodefony/node_modules/lru-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", - "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", - "license": "MIT", - "dependencies": { - "es5-ext": "~0.10.2" - } - }, "src/nodefony/node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -9078,22 +9275,6 @@ "dev": true, "license": "ISC" }, - "src/nodefony/node_modules/memoizee": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", - "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.53", - "es6-weak-map": "^2.0.3", - "event-emitter": "^0.3.5", - "is-promise": "^2.2.2", - "lru-queue": "^0.1.0", - "next-tick": "^1.1.0", - "timers-ext": "^0.1.7" - } - }, "src/nodefony/node_modules/memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", @@ -9501,12 +9682,6 @@ "dev": true, "license": "MIT" }, - "src/nodefony/node_modules/next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", - "license": "ISC" - }, "src/nodefony/node_modules/node-domexception": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", @@ -9900,12 +10075,6 @@ "node": ">= 0.10" } }, - "src/nodefony/node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "license": "MIT" - }, "src/nodefony/node_modules/request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -10283,16 +10452,6 @@ "dev": true, "license": "MIT" }, - "src/nodefony/node_modules/timers-ext": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", - "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", - "license": "ISC", - "dependencies": { - "es5-ext": "~0.10.46", - "next-tick": "1" - } - }, "src/nodefony/node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -10534,42 +10693,6 @@ "dev": true, "license": "Unlicense" }, - "src/nodefony/node_modules/twig": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/twig/-/twig-1.17.1.tgz", - "integrity": "sha512-atxccyr/BHtb1gPMA7Lvki0OuU17XBqHsNH9lzDHt9Rr1293EVZOosSZabEXz/DPVikIW8ZDqSkEddwyJnQN2w==", - "license": "BSD-2-Clause", - "dependencies": { - "@babel/runtime": "^7.8.4", - "locutus": "^2.0.11", - "minimatch": "3.0.x", - "walk": "2.3.x" - }, - "bin": { - "twigjs": "bin/twigjs" - }, - "engines": { - "node": ">=10" - } - }, - "src/nodefony/node_modules/twig/node_modules/minimatch": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", - "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "src/nodefony/node_modules/type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", - "license": "ISC" - }, "src/nodefony/node_modules/typedoc-plugin-markdown": { "version": "3.17.1", "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-3.17.1.tgz", @@ -10684,15 +10807,6 @@ "node": ">=18" } }, - "src/nodefony/node_modules/walk": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/walk/-/walk-2.3.15.tgz", - "integrity": "sha512-4eRTBZljBfIISK1Vnt69Gvr2w/wc3U6Vtrw7qiN5iqYJPH7LElcYh/iU4XWhdCy2dZqv1ToMyYlybDylfG/5Vg==", - "license": "(MIT OR Apache-2.0)", - "dependencies": { - "foreachasync": "^3.0.0" - } - }, "src/nodefony/node_modules/web-streams-polyfill": { "version": "3.3.2", "license": "MIT", @@ -10908,7 +11022,9 @@ "src/packages/@nodefony/framework": { "version": "10.0.0", "dependencies": { - "bluebird": "3.7.2" + "bluebird": "3.7.2", + "ejs": "3.1.9", + "twig": "1.17.1" }, "devDependencies": { "@rollup/plugin-commonjs": "25.0.7", @@ -10918,19 +11034,22 @@ "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "11.1.6", "@types/bluebird": "3.5.42", - "@types/node": "20.11.20", - "@typescript-eslint/eslint-plugin": "7.0.2", - "@typescript-eslint/parser": "7.0.2", + "@types/ejs": "3.1.5", + "@types/node": "20.11.24", + "@types/twig": "1.12.16", + "@typescript-eslint/eslint-plugin": "7.1.0", + "@typescript-eslint/parser": "7.1.0", "rimraf": "5.0.5", "rollup": "4.12.0", "rollup-plugin-copy": "3.5.0", + "rollup-sourcemap-path-transform": "1.0.4", "typescript": "5.3.3" } }, "src/packages/@nodefony/http": { "version": "10.0.0", "dependencies": { - "cli-color": "2.0.3", + "cli-color": "2.0.4", "cookie": "0.6.0", "formidable": "3.5.1", "http-terminator": "3.2.0", @@ -10959,18 +11078,19 @@ "@types/formidable": "3.4.5", "@types/mime-types": "2.1.4", "@types/ms": "0.7.34", - "@types/node": "20.11.20", + "@types/node": "20.11.24", "@types/node-forge": "1.3.11", - "@types/qs": "6.9.11", + "@types/qs": "6.9.12", "@types/serve-static": "1.15.5", "@types/uuid": "9.0.8", "@types/websocket": "1.0.10", "@types/xml2js": "0.4.14", - "@typescript-eslint/eslint-plugin": "7.0.2", - "@typescript-eslint/parser": "7.0.2", + "@typescript-eslint/eslint-plugin": "7.1.0", + "@typescript-eslint/parser": "7.1.0", "rimraf": "5.0.5", "rollup": "4.12.0", "rollup-plugin-copy": "3.5.0", + "rollup-sourcemap-path-transform": "1.0.4", "typescript": "5.3.3" } }, @@ -11019,13 +11139,6 @@ "dev": true, "license": "MIT" }, - "src/packages/@nodefony/http/node_modules/@types/qs": { - "version": "6.9.11", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.11.tgz", - "integrity": "sha512-oGk0gmhnEJK4Yyk+oI7EfXsLayXatCWPHary1MtcmbAifkobT9cM9yutG/hZKIseOU0MqbIwQ/u2nn/Gb+ltuQ==", - "dev": true, - "license": "MIT" - }, "src/packages/@nodefony/http/node_modules/@types/serve-static": { "version": "1.15.5", "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.5.tgz", @@ -11090,22 +11203,6 @@ "node": ">=6.14.2" } }, - "src/packages/@nodefony/http/node_modules/cli-color": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz", - "integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==", - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.61", - "es6-iterator": "^2.0.3", - "memoizee": "^0.4.15", - "timers-ext": "^0.1.7" - }, - "engines": { - "node": ">=0.10" - } - }, "src/packages/@nodefony/http/node_modules/connection-parse": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/connection-parse/-/connection-parse-0.0.7.tgz", @@ -11121,16 +11218,6 @@ "node": ">= 0.6" } }, - "src/packages/@nodefony/http/node_modules/d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "license": "ISC", - "dependencies": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, "src/packages/@nodefony/http/node_modules/data-uri-to-buffer": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", @@ -11196,54 +11283,6 @@ "node": ">= 0.8" } }, - "src/packages/@nodefony/http/node_modules/es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", - "hasInstallScript": true, - "license": "ISC", - "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "next-tick": "^1.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "src/packages/@nodefony/http/node_modules/es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", - "license": "MIT", - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "src/packages/@nodefony/http/node_modules/es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "src/packages/@nodefony/http/node_modules/es6-weak-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", - "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", - "license": "ISC", - "dependencies": { - "d": "1", - "es5-ext": "^0.10.46", - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.1" - } - }, "src/packages/@nodefony/http/node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -11259,31 +11298,6 @@ "node": ">= 0.6" } }, - "src/packages/@nodefony/http/node_modules/event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", - "license": "MIT", - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "src/packages/@nodefony/http/node_modules/ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", - "license": "ISC", - "dependencies": { - "type": "^2.7.2" - } - }, - "src/packages/@nodefony/http/node_modules/ext/node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", - "license": "ISC" - }, "src/packages/@nodefony/http/node_modules/fast-printf": { "version": "1.6.9", "resolved": "https://registry.npmjs.org/fast-printf/-/fast-printf-1.6.9.tgz", @@ -11434,12 +11448,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "src/packages/@nodefony/http/node_modules/is-promise": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", - "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", - "license": "MIT" - }, "src/packages/@nodefony/http/node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -11454,15 +11462,6 @@ "retry": "0.6.0" } }, - "src/packages/@nodefony/http/node_modules/lru-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", - "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", - "license": "MIT", - "dependencies": { - "es5-ext": "~0.10.2" - } - }, "src/packages/@nodefony/http/node_modules/memcached": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/memcached/-/memcached-2.2.2.tgz", @@ -11473,22 +11472,6 @@ "jackpot": ">=0.0.6" } }, - "src/packages/@nodefony/http/node_modules/memoizee": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", - "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.53", - "es6-weak-map": "^2.0.3", - "event-emitter": "^0.3.5", - "is-promise": "^2.2.2", - "lru-queue": "^0.1.0", - "next-tick": "^1.1.0", - "timers-ext": "^0.1.7" - } - }, "src/packages/@nodefony/http/node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -11516,12 +11499,6 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "license": "MIT" }, - "src/packages/@nodefony/http/node_modules/next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", - "license": "ISC" - }, "src/packages/@nodefony/http/node_modules/node-domexception": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", @@ -11803,16 +11780,6 @@ "node": ">= 0.8" } }, - "src/packages/@nodefony/http/node_modules/timers-ext": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", - "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", - "license": "ISC", - "dependencies": { - "es5-ext": "~0.10.46", - "next-tick": "1" - } - }, "src/packages/@nodefony/http/node_modules/toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", @@ -11822,12 +11789,6 @@ "node": ">=0.6" } }, - "src/packages/@nodefony/http/node_modules/type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", - "license": "ISC" - }, "src/packages/@nodefony/http/node_modules/typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -11978,9 +11939,9 @@ "@rollup/plugin-replace": "5.0.5", "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "11.1.6", - "@types/node": "20.11.20", - "@typescript-eslint/eslint-plugin": "7.0.2", - "@typescript-eslint/parser": "7.0.2", + "@types/node": "20.11.24", + "@typescript-eslint/eslint-plugin": "7.1.0", + "@typescript-eslint/parser": "7.1.0", "rimraf": "5.0.5", "rollup": "4.12.0", "rollup-plugin-copy": "3.5.0", @@ -11994,7 +11955,7 @@ "@alt3/sequelize-to-json-schemas": "^0.3.56", "cls-hooked": "^4.2.2", "mariadb": "3.2.3", - "mysql2": "3.9.1", + "mysql2": "3.9.2", "pg": "8.11.3", "pg-hstore": "^2.3.4", "pgtools": "1.0.1", @@ -12010,9 +11971,9 @@ "@rollup/plugin-replace": "5.0.5", "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "11.1.6", - "@types/node": "20.11.20", - "@typescript-eslint/eslint-plugin": "7.0.2", - "@typescript-eslint/parser": "7.0.2", + "@types/node": "20.11.24", + "@typescript-eslint/eslint-plugin": "7.1.0", + "@typescript-eslint/parser": "7.1.0", "rimraf": "5.0.5", "rollup": "4.12.0", "sequelize-cli": "6.6.2", @@ -12416,23 +12377,6 @@ "node": ">=6" } }, - "src/packages/@nodefony/sequelize/node_modules/cli-color": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz", - "integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.61", - "es6-iterator": "^2.0.3", - "memoizee": "^0.4.15", - "timers-ext": "^0.1.7" - }, - "engines": { - "node": ">=0.10" - } - }, "src/packages/@nodefony/sequelize/node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -12500,17 +12444,6 @@ "proto-list": "~1.2.1" } }, - "src/packages/@nodefony/sequelize/node_modules/d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "dev": true, - "license": "ISC", - "dependencies": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, "src/packages/@nodefony/sequelize/node_modules/decompress-response": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", @@ -12535,15 +12468,6 @@ "node": ">=4.0.0" } }, - "src/packages/@nodefony/sequelize/node_modules/denque": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", - "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", - "license": "Apache-2.0", - "engines": { - "node": ">=0.10" - } - }, "src/packages/@nodefony/sequelize/node_modules/editorconfig": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-1.0.4.tgz", @@ -12627,58 +12551,6 @@ "license": "MIT", "optional": true }, - "src/packages/@nodefony/sequelize/node_modules/es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", - "dev": true, - "hasInstallScript": true, - "license": "ISC", - "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "next-tick": "^1.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "src/packages/@nodefony/sequelize/node_modules/es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", - "dev": true, - "license": "MIT", - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "src/packages/@nodefony/sequelize/node_modules/es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "dev": true, - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "src/packages/@nodefony/sequelize/node_modules/es6-weak-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", - "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", - "dev": true, - "license": "ISC", - "dependencies": { - "d": "1", - "es5-ext": "^0.10.46", - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.1" - } - }, "src/packages/@nodefony/sequelize/node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", @@ -12688,17 +12560,6 @@ "node": ">=6" } }, - "src/packages/@nodefony/sequelize/node_modules/event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", - "dev": true, - "license": "MIT", - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, "src/packages/@nodefony/sequelize/node_modules/expand-template": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", @@ -12708,23 +12569,6 @@ "node": ">=6" } }, - "src/packages/@nodefony/sequelize/node_modules/ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", - "dev": true, - "license": "ISC", - "dependencies": { - "type": "^2.7.2" - } - }, - "src/packages/@nodefony/sequelize/node_modules/ext/node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", - "dev": true, - "license": "ISC" - }, "src/packages/@nodefony/sequelize/node_modules/file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -12773,15 +12617,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "src/packages/@nodefony/sequelize/node_modules/generate-function": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", - "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", - "license": "MIT", - "dependencies": { - "is-property": "^1.0.2" - } - }, "src/packages/@nodefony/sequelize/node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -12853,19 +12688,6 @@ "license": "MIT", "optional": true }, - "src/packages/@nodefony/sequelize/node_modules/is-promise": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", - "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", - "dev": true, - "license": "MIT" - }, - "src/packages/@nodefony/sequelize/node_modules/is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==", - "license": "MIT" - }, "src/packages/@nodefony/sequelize/node_modules/js-beautify": { "version": "1.15.1", "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.15.1.tgz", @@ -12944,12 +12766,6 @@ "graceful-fs": "^4.1.6" } }, - "src/packages/@nodefony/sequelize/node_modules/long": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", - "license": "Apache-2.0" - }, "src/packages/@nodefony/sequelize/node_modules/lru-cache": { "version": "10.2.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", @@ -12959,16 +12775,6 @@ "node": "14 || >=16.14" } }, - "src/packages/@nodefony/sequelize/node_modules/lru-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", - "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "es5-ext": "~0.10.2" - } - }, "src/packages/@nodefony/sequelize/node_modules/make-fetch-happen": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", @@ -13032,23 +12838,6 @@ "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==", "license": "MIT" }, - "src/packages/@nodefony/sequelize/node_modules/memoizee": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", - "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.53", - "es6-weak-map": "^2.0.3", - "event-emitter": "^0.3.5", - "is-promise": "^2.2.2", - "lru-queue": "^0.1.0", - "next-tick": "^1.1.0", - "timers-ext": "^0.1.7" - } - }, "src/packages/@nodefony/sequelize/node_modules/mimic-response": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", @@ -13172,55 +12961,6 @@ "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", "license": "MIT" }, - "src/packages/@nodefony/sequelize/node_modules/mysql2": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.9.1.tgz", - "integrity": "sha512-3njoWAAhGBYy0tWBabqUQcLtczZUxrmmtc2vszQUekg3kTJyZ5/IeLC3Fo04u6y6Iy5Sba7pIIa2P/gs8D3ZeQ==", - "license": "MIT", - "dependencies": { - "denque": "^2.1.0", - "generate-function": "^2.3.1", - "iconv-lite": "^0.6.3", - "long": "^5.2.1", - "lru-cache": "^8.0.0", - "named-placeholders": "^1.1.3", - "seq-queue": "^0.0.5", - "sqlstring": "^2.3.2" - }, - "engines": { - "node": ">= 8.0" - } - }, - "src/packages/@nodefony/sequelize/node_modules/mysql2/node_modules/lru-cache": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", - "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==", - "license": "ISC", - "engines": { - "node": ">=16.14" - } - }, - "src/packages/@nodefony/sequelize/node_modules/named-placeholders": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz", - "integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==", - "license": "MIT", - "dependencies": { - "lru-cache": "^7.14.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "src/packages/@nodefony/sequelize/node_modules/named-placeholders/node_modules/lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, "src/packages/@nodefony/sequelize/node_modules/napi-build-utils": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", @@ -13237,13 +12977,6 @@ "node": ">= 0.6" } }, - "src/packages/@nodefony/sequelize/node_modules/next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", - "dev": true, - "license": "ISC" - }, "src/packages/@nodefony/sequelize/node_modules/node-abi": { "version": "3.54.0", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.54.0.tgz", @@ -13695,11 +13428,6 @@ "node": ">= 4" } }, - "src/packages/@nodefony/sequelize/node_modules/seq-queue": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", - "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" - }, "src/packages/@nodefony/sequelize/node_modules/sequelize-cli": { "version": "6.6.2", "resolved": "https://registry.npmjs.org/sequelize-cli/-/sequelize-cli-6.6.2.tgz", @@ -13870,15 +13598,6 @@ } } }, - "src/packages/@nodefony/sequelize/node_modules/sqlstring": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", - "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "src/packages/@nodefony/sequelize/node_modules/ssri": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", @@ -13941,17 +13660,6 @@ "node": ">=6" } }, - "src/packages/@nodefony/sequelize/node_modules/timers-ext": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", - "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "es5-ext": "~0.10.46", - "next-tick": "1" - } - }, "src/packages/@nodefony/sequelize/node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -13964,13 +13672,6 @@ "node": "*" } }, - "src/packages/@nodefony/sequelize/node_modules/type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", - "dev": true, - "license": "ISC" - }, "src/packages/@nodefony/sequelize/node_modules/umzug": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/umzug/-/umzug-3.7.0.tgz", diff --git a/package.json b/package.json index 052d3a7..fa0418f 100644 --- a/package.json +++ b/package.json @@ -37,9 +37,9 @@ "@rollup/plugin-replace": "5.0.5", "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "11.1.6", - "@types/node": "20.11.20", - "@typescript-eslint/eslint-plugin": "7.0.2", - "@typescript-eslint/parser": "7.0.2", + "@types/node": "20.11.24", + "@typescript-eslint/eslint-plugin": "7.1.0", + "@typescript-eslint/parser": "7.1.0", "eslint": "8.57.0", "eslint-config-prettier": "9.1.0", "eslint-plugin-prettier": "5.1.3", @@ -50,6 +50,7 @@ "rollup": "4.12.0", "rollup-plugin-copy": "3.5.0", "tslib": "2.6.2", + "rollup-sourcemap-path-transform": "1.0.4", "typescript": "5.3.3" }, "repository": { diff --git a/rollup.config.ts b/rollup.config.ts index 6313fe9..c940e46 100644 --- a/rollup.config.ts +++ b/rollup.config.ts @@ -1,5 +1,5 @@ // rollup.config.ts -import path from "node:path"; +import path, { resolve } from "node:path"; import { defineConfig, Plugin, RollupOptions } from "rollup"; import nodeResolve from "@rollup/plugin-node-resolve"; import typescript from "@rollup/plugin-typescript"; @@ -7,6 +7,21 @@ import commonjs from "@rollup/plugin-commonjs"; import json from "@rollup/plugin-json"; import copy from "rollup-plugin-copy"; +//@ts-ignore +import { createPathTransform } from "rollup-sourcemap-path-transform"; + +const sourcemapPathTransform = createPathTransform({ + prefixes: { + "*src/": `${resolve(".", "nodefony", "src")}/`, + "*config/": `${resolve(".", "nodefony", "config")}/`, + "*decorators/": `${resolve(".", "nodefony", "decorators")}/`, + "*service/": `${resolve(".", "nodefony", "service")}/`, + "*controller/": `${resolve(".", "nodefony", "controller")}/`, + "*entity/": `${resolve(".", "nodefony", "entity")}/`, + "*command/": `${resolve(".", "nodefony", "command")}/`, + }, +}); + const external: string[] = [ "nodefony", "@nodefony/http", @@ -14,6 +29,7 @@ const external: string[] = [ "@nodefony/framework", "@nodefony/sequelize", "cli-table3", + "tslib", ]; const sharedNodeOptions = defineConfig({ @@ -75,8 +91,8 @@ function createNodeConfig(isProduction: boolean): RollupOptions { output: { ...sharedNodeOptions.output, sourcemap: !isProduction, - //preserveModules: true, - //preserveModulesRoot: "src", + preserveModules: true, + preserveModulesRoot: "nodefony", }, external, plugins: [...createNodePlugins(isProduction, true, "dist/types")], diff --git a/src/nodefony/package-lock.json b/src/nodefony/package-lock.json index 78909f6..486dab2 100644 --- a/src/nodefony/package-lock.json +++ b/src/nodefony/package-lock.json @@ -12,7 +12,7 @@ "@inquirer/prompts": "4.1.0", "asciify": "1.3.5", "chokidar": "3.6.0", - "cli-color": "2.0.3", + "cli-color": "2.0.4", "cli-table3": "0.6.3", "clui": "0.3.6", "commander": "12.0.0", @@ -48,14 +48,14 @@ "@types/lodash": "4.14.202", "@types/mime-types": "2.1.4", "@types/mocha": "10.0.6", - "@types/node": "20.11.20", + "@types/node": "20.11.24", "@types/node-fetch": "2.6.11", "@types/node-forge": "1.3.11", "@types/shelljs": "0.8.15", "@types/twig": "1.12.16", "@types/uuid": "9.0.8", - "@typescript-eslint/eslint-plugin": "7.0.2", - "@typescript-eslint/parser": "7.0.2", + "@typescript-eslint/eslint-plugin": "7.1.0", + "@typescript-eslint/parser": "7.1.0", "chai": "=4.3.10", "eslint": "8.57.0", "eslint-config-prettier": "9.1.0", @@ -1435,9 +1435,9 @@ } }, "node_modules/@types/node": { - "version": "20.11.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.20.tgz", - "integrity": "sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==", + "version": "20.11.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", + "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "dependencies": { "undici-types": "~5.26.4" } @@ -1468,9 +1468,9 @@ "dev": true }, "node_modules/@types/semver": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.7.tgz", - "integrity": "sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==", + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", "dev": true }, "node_modules/@types/shelljs": { @@ -1510,16 +1510,16 @@ "integrity": "sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.0.2.tgz", - "integrity": "sha512-/XtVZJtbaphtdrWjr+CJclaCVGPtOdBpFEnvtNf/jRV0IiEemRrL0qABex/nEt8isYcnFacm3nPHYQwL+Wb7qg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.1.0.tgz", + "integrity": "sha512-j6vT/kCulhG5wBmGtstKeiVr1rdXE4nk+DT1k6trYkwlrvW9eOF5ZbgKnd/YR6PcM4uTEXa0h6Fcvf6X7Dxl0w==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "7.0.2", - "@typescript-eslint/type-utils": "7.0.2", - "@typescript-eslint/utils": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2", + "@typescript-eslint/scope-manager": "7.1.0", + "@typescript-eslint/type-utils": "7.1.0", + "@typescript-eslint/utils": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -1545,15 +1545,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.0.2.tgz", - "integrity": "sha512-GdwfDglCxSmU+QTS9vhz2Sop46ebNCXpPPvsByK7hu0rFGRHL+AusKQJ7SoN+LbLh6APFpQwHKmDSwN35Z700Q==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.1.0.tgz", + "integrity": "sha512-V1EknKUubZ1gWFjiOZhDSNToOjs63/9O0puCgGS8aDOgpZY326fzFu15QAUjwaXzRZjf/qdsdBrckYdv9YxB8w==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.0.2", - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/typescript-estree": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2", + "@typescript-eslint/scope-manager": "7.1.0", + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/typescript-estree": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0", "debug": "^4.3.4" }, "engines": { @@ -1573,13 +1573,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.0.2.tgz", - "integrity": "sha512-l6sa2jF3h+qgN2qUMjVR3uCNGjWw4ahGfzIYsCtFrQJCjhbrDPdiihYT8FnnqFwsWX+20hK592yX9I2rxKTP4g==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.1.0.tgz", + "integrity": "sha512-6TmN4OJiohHfoOdGZ3huuLhpiUgOGTpgXNUPJgeZOZR3DnIpdSgtt83RS35OYNNXxM4TScVlpVKC9jyQSETR1A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2" + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -1590,13 +1590,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.0.2.tgz", - "integrity": "sha512-IKKDcFsKAYlk8Rs4wiFfEwJTQlHcdn8CLwLaxwd6zb8HNiMcQIFX9sWax2k4Cjj7l7mGS5N1zl7RCHOVwHq2VQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.1.0.tgz", + "integrity": "sha512-UZIhv8G+5b5skkcuhgvxYWHjk7FW7/JP5lPASMEUoliAPwIH/rxoUSQPia2cuOj9AmDZmwUl1usKm85t5VUMew==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.0.2", - "@typescript-eslint/utils": "7.0.2", + "@typescript-eslint/typescript-estree": "7.1.0", + "@typescript-eslint/utils": "7.1.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -1617,9 +1617,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.2.tgz", - "integrity": "sha512-ZzcCQHj4JaXFjdOql6adYV4B/oFOFjPOC9XYwCaZFRvqN8Llfvv4gSxrkQkd2u4Ci62i2c6W6gkDwQJDaRc4nA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.1.0.tgz", + "integrity": "sha512-qTWjWieJ1tRJkxgZYXx6WUYtWlBc48YRxgY2JN1aGeVpkhmnopq+SUC8UEVGNXIvWH7XyuTjwALfG6bFEgCkQA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -1630,13 +1630,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.2.tgz", - "integrity": "sha512-3AMc8khTcELFWcKcPc0xiLviEvvfzATpdPj/DXuOGIdQIIFybf4DMT1vKRbuAEOFMwhWt7NFLXRkbjsvKZQyvw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.0.tgz", + "integrity": "sha512-k7MyrbD6E463CBbSpcOnwa8oXRdHzH1WiVzOipK3L5KSML92ZKgUBrTlehdi7PEIMT8k0bQixHUGXggPAlKnOQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2", + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1702,17 +1702,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.0.2.tgz", - "integrity": "sha512-PZPIONBIB/X684bhT1XlrkjNZJIEevwkKDsdwfiu1WeqBxYEEdIgVDgm8/bbKHVu+6YOpeRqcfImTdImx/4Bsw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.1.0.tgz", + "integrity": "sha512-WUFba6PZC5OCGEmbweGpnNJytJiLG7ZvDBJJoUcX4qZYf1mGZ97mO2Mps6O2efxJcJdRNpqweCistDbZMwIVHw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "7.0.2", - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/typescript-estree": "7.0.2", + "@typescript-eslint/scope-manager": "7.1.0", + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/typescript-estree": "7.1.0", "semver": "^7.5.4" }, "engines": { @@ -1727,12 +1727,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.2.tgz", - "integrity": "sha512-8Y+YiBmqPighbm5xA2k4wKTxRzx9EkBu7Rlw+WHqMvRJ3RPz/BMBO9b2ru0LUNmXg120PHUXD5+SWFy2R8DqlQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.0.tgz", + "integrity": "sha512-FhUqNWluiGNzlvnDZiXad4mZRhtghdoKW6e98GoEOYSu5cND+E39rG5KwJMUzeENwm1ztYBRqof8wMLP+wNPIA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.0.2", + "@typescript-eslint/types": "7.1.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -2343,12 +2343,12 @@ } }, "node_modules/cli-color": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz", - "integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.4.tgz", + "integrity": "sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==", "dependencies": { "d": "^1.0.1", - "es5-ext": "^0.10.61", + "es5-ext": "^0.10.64", "es6-iterator": "^2.0.3", "memoizee": "^0.4.15", "timers-ext": "^0.1.7" @@ -2949,13 +2949,14 @@ } }, "node_modules/es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", "hasInstallScript": true, "dependencies": { "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", "next-tick": "^1.1.0" }, "engines": { @@ -3229,6 +3230,25 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esniff/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", diff --git a/src/nodefony/package.json b/src/nodefony/package.json index 75f7e5c..e0639c7 100644 --- a/src/nodefony/package.json +++ b/src/nodefony/package.json @@ -65,7 +65,7 @@ "@inquirer/prompts": "4.1.0", "asciify": "1.3.5", "chokidar": "3.6.0", - "cli-color": "2.0.3", + "cli-color": "2.0.4", "cli-table3": "0.6.3", "clui": "0.3.6", "commander": "12.0.0", @@ -98,14 +98,14 @@ "@types/lodash": "4.14.202", "@types/mime-types": "2.1.4", "@types/mocha": "10.0.6", - "@types/node": "20.11.20", + "@types/node": "20.11.24", "@types/node-fetch": "2.6.11", "@types/node-forge": "1.3.11", "@types/shelljs": "0.8.15", "@types/twig": "1.12.16", "@types/uuid": "9.0.8", - "@typescript-eslint/eslint-plugin": "7.0.2", - "@typescript-eslint/parser": "7.0.2", + "@typescript-eslint/eslint-plugin": "7.1.0", + "@typescript-eslint/parser": "7.1.0", "chai": "=4.3.10", "eslint": "8.57.0", "eslint-config-prettier": "9.1.0", diff --git a/src/nodefony/src/kernel/Kernel.ts b/src/nodefony/src/kernel/Kernel.ts index ad3a474..0482ca2 100644 --- a/src/nodefony/src/kernel/Kernel.ts +++ b/src/nodefony/src/kernel/Kernel.ts @@ -153,6 +153,8 @@ class Kernel extends Service { progress: number = Events.onInit; pm2?: Pm2; injector: Injector; + isDev: boolean = false; + isProd: boolean = true; constructor( environment: EnvironmentType, cli?: CliKernel | null, @@ -239,7 +241,7 @@ class Kernel extends Service { return this.preRegister(); }) .catch((e) => { - //this.log(e, "CRITIC"); + this.log(e, "CRITIC"); throw e; }); } @@ -296,7 +298,6 @@ class Kernel extends Service { return this.boot(); }) .catch((e) => { - //this.log(e, "CRITIC"); throw e; }); } @@ -342,6 +343,7 @@ class Kernel extends Service { async boot(): Promise { await this.fireAsync("onPreBoot", this).catch((e) => { + this.log(e, "CRITIC"); throw e; }); if (this.setCommandComplete(Events.onPreBoot)) { @@ -357,7 +359,6 @@ class Kernel extends Service { return this.onReady(); }) .catch((e) => { - //this.log(e, "CRITIC"); throw e; }); } @@ -401,13 +402,11 @@ class Kernel extends Service { } }) .catch((e) => { - //this.log(e, "CRITIC"); throw e; }); }); }) .catch((e) => { - //this.log(e, "CRITIC"); throw e; }); } @@ -637,10 +636,12 @@ class Kernel extends Service { case "development": process.env.NODE_ENV = "development"; process.env.BABEL_ENV = "development"; + this.isDev = true; break; default: process.env.NODE_ENV = "production"; process.env.BABEL_ENV = "production"; + this.isProd = true; } } process.env.NODE_DEBUG = this.debug ? "true" : "false"; diff --git a/src/nodefony/src/kernel/Module.ts b/src/nodefony/src/kernel/Module.ts index f62dd42..a79dd68 100644 --- a/src/nodefony/src/kernel/Module.ts +++ b/src/nodefony/src/kernel/Module.ts @@ -70,7 +70,6 @@ class Module extends Service { options: DefaultOptionsService ) { super(name, kernel.container as Container, undefined, options); - //this.log(`Registre Modefony Module : ${this.name}`, "DEBUG"); this.setParameters(`modules.${this.name}`, this.options); this.path = this.setPath(path); this.setEvents(); @@ -219,6 +218,18 @@ class Module extends Service { return this.get(inst.name); } + async loadService( + service: string, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ...args: any[] + ): Promise { + if (!module) { + throw new Error(`Applcation not ready`); + } + const res = await import(service); + return this.addService(res.default, ...args); + } + async getPackageJson(cwd?: string): Promise { return (await this.loadJson( resolve(this.path, "package.json"), diff --git a/src/nodefony/src/kernel/decorators/kernelDecorator.ts b/src/nodefony/src/kernel/decorators/kernelDecorator.ts index a740433..df0eca4 100644 --- a/src/nodefony/src/kernel/decorators/kernelDecorator.ts +++ b/src/nodefony/src/kernel/decorators/kernelDecorator.ts @@ -6,12 +6,14 @@ import Injector from "../injector/injector"; //import nodefony from "../../Nodefony"; // eslint-disable-next-line @typescript-eslint/ban-types -type Constructor = new (...args: any[]) => T; +type Constructor = new (...args: any[]) => Module; + +type Injectable = new (...args: any[]) => T; function modules( nameOrPath: string | (string | ModuleConstructor)[] | ModuleConstructor -): >(constructor: T) => T { - return function >(constructor: T): T { +): (constructor: T) => T { + return function (constructor: T): T { class NewModuleConstructor extends constructor { constructor(...args: any[]) { super(...args); @@ -44,8 +46,8 @@ function modules( function services( nameOrPath: string | (string | ServiceConstructor)[] | ServiceConstructor -): >(constructor: T) => T { - return function >(constructor: T): T { +): (constructor: T) => T { + return function (constructor: T): T { class NewConstructorService extends constructor { constructor(...args: any[]) { super(...args); @@ -54,41 +56,31 @@ function services( }); } async initDecoratorServices() { - const targetModule = this.kernel?.getModule(this.name); - if (!targetModule) { - throw new Error( - `Decorateur services bad target Module : ${this.name} ` - ); - } if (Array.isArray(nameOrPath)) { for (const path of nameOrPath) { if (typeof path !== "string") { - await this.kernel - ?.addService(path as ServiceConstructor, targetModule) - .catch((e: Error) => { + await this.addService(path as ServiceConstructor).catch( + (e: Error) => { this.log(e, "ERROR"); - }); + } + ); } else { - await this.kernel - ?.loadService(path as string, targetModule) - .catch((e: Error) => { - this.log(e, "ERROR"); - }); + await this.loadService(path as string).catch((e: Error) => { + this.log(e, "ERROR"); + }); } } } else { if (typeof nameOrPath === "string") { - return await this.kernel - ?.loadService(nameOrPath as string, targetModule) - .catch((e: Error) => { + return await this.loadService(nameOrPath as string).catch( + (e: Error) => { this.log(e, "ERROR"); - }); + } + ); } - return await this.kernel - ?.addService(nameOrPath, targetModule) - .catch((e: Error) => { - this.log(e, "ERROR"); - }); + return await this.addService(nameOrPath).catch((e: Error) => { + this.log(e, "ERROR"); + }); } } } @@ -96,10 +88,23 @@ function services( }; } +// function injectable( +// name?: string +// ): (constructor: T) => T { +// return function (constructor: T): T { +// //console.log("injectable", name || constructor.name); +// Injector.register( +// name || constructor.name, +// constructor as ServiceConstructor +// ); +// return constructor; +// }; +// } + function injectable( name?: string -): >(constructor: T) => T { - return function >(constructor: T): T { +): >(constructor: T) => T { + return function >(constructor: T): T { //console.log("injectable", name || constructor.name); Injector.register(name || constructor.name, constructor); return constructor; @@ -116,12 +121,16 @@ function inject(serviceName: string): Function { if (!serviceName) { throw new Error(`Inject decorator bad serviceName`); } - Injector.get(serviceName); + const index = Number(parameterIndex); + // if (typeof target === "function" && propertyKey) { + // console.log(`Je suis une methode de class`); + // } else { + // console.log(`Je suis un constructeur`); + // } + //Injector.get(serviceName); if (!target._inject) { target._inject = {}; } - // Assurez-vous que parameterIndex est un nombre - const index = Number(parameterIndex); target._inject[index] = serviceName; }; } diff --git a/src/nodefony/src/service/fetchService.ts b/src/nodefony/src/service/fetchService.ts index da6b79d..cf91988 100644 --- a/src/nodefony/src/service/fetchService.ts +++ b/src/nodefony/src/service/fetchService.ts @@ -1,7 +1,7 @@ import Module from "../kernel/Module"; import Service from "../Service"; import Container from "../Container"; -import fetch from "node-fetch"; +import fetch, { Response } from "node-fetch"; import * as library from "node-fetch"; //import { injectable } from "../kernel/decorators/kernelDecorator"; @@ -16,3 +16,4 @@ class Fetch extends Service { } export default Fetch; +export { Response }; diff --git a/src/nodefony/src/syslog/Syslog.ts b/src/nodefony/src/syslog/Syslog.ts index 0046d67..bea5ad1 100644 --- a/src/nodefony/src/syslog/Syslog.ts +++ b/src/nodefony/src/syslog/Syslog.ts @@ -184,7 +184,6 @@ const conditionsObj: Conditions = { operators[condition.operator](pdu.severity, condition.data[sev]) ) { // console.log( - // "passs op", // condition.operator, // " sev: ", // pdu.severity, diff --git a/src/nodefony/src/tests/Event.test.ts b/src/nodefony/src/tests/Event.test.ts index 2fb5434..b4bb385 100644 --- a/src/nodefony/src/tests/Event.test.ts +++ b/src/nodefony/src/tests/Event.test.ts @@ -223,11 +223,9 @@ describe("NODEFONY Notifications Center", () => { res = await global.notificationsCenter .fireAsync("myEvent", i, obj) .then((...args: any[]) => { - console.log("passss", args); throw new Error("then don't be call"); }) .catch((e) => { - console.log("passss catch"); assert.strictEqual(e.message, "myError"); }); assert.strictEqual(res, undefined); @@ -239,7 +237,6 @@ describe("NODEFONY Notifications Center", () => { throw new Error("then don't be call"); }) .catch((e) => { - console.log("passss catch"); assert.strictEqual(e.message, "myError"); }); assert(isPromise(res)); diff --git a/src/packages/@nodefony/framework/index.ts b/src/packages/@nodefony/framework/index.ts index 5b2f20b..2e8fc6d 100644 --- a/src/packages/@nodefony/framework/index.ts +++ b/src/packages/@nodefony/framework/index.ts @@ -4,13 +4,16 @@ import Router, { TypeController } from "./nodefony/service/router"; import Route from "./nodefony/src/Route"; import Controller from "./nodefony/src/Controller"; import Resolver from "./nodefony/src/Resolver"; +import Twig from "./nodefony/service/Twig"; +import Ejs from "./nodefony/service/Ejs"; + import { controllers, DefineRoute, DefineController, } from "./nodefony/decorators/routerDecorators"; -@services([Router]) +@services([Router, Twig, Ejs]) class Framework extends Module { constructor(kernel: Kernel) { super("framework", kernel, import.meta.url, config); @@ -23,6 +26,8 @@ export { Route, Router, Resolver, + Twig, + Ejs, DefineRoute, DefineController, controllers, diff --git a/src/packages/@nodefony/framework/nodefony/decorators/routerDecorators.ts b/src/packages/@nodefony/framework/nodefony/decorators/routerDecorators.ts index 0dc6912..a10d85c 100644 --- a/src/packages/@nodefony/framework/nodefony/decorators/routerDecorators.ts +++ b/src/packages/@nodefony/framework/nodefony/decorators/routerDecorators.ts @@ -30,10 +30,10 @@ function controllers( async initDecoratorControllers() { if (Array.isArray(controller)) { for (const contr of controller) { - Router.setController(contr); + Router.setController(contr, this); } } else { - Router.setController(controller); + Router.setController(controller, this); } } } @@ -69,17 +69,20 @@ function DefineRoute(name: string, options: RouteOptions) { const prefix = target.constructor.basepath; const path = options.path || ""; let filePath; - const stackTrace = new Error().stack; - if (stackTrace && stackTrace.split) { - const sp = stackTrace?.split("\n"); - if (sp[2]) { - let ele = sp[2].match(/\(([^)]+)\)/); - if (ele) { - filePath = ele[1]; - filePath = fileURLToPath(filePath); + try { + const stackTrace = new Error().stack; + if (stackTrace && stackTrace.split) { + const sp = stackTrace?.split("\n"); + if (sp[2]) { + let ele = sp[2].match(/\(([^)]+)\)/); + if (ele) { + filePath = ele[1]; + filePath = fileURLToPath(filePath); + } } } - } + } catch (e) {} + Router.createRoute(name, { path, filePath, diff --git a/src/packages/@nodefony/framework/nodefony/service/Ejs.ts b/src/packages/@nodefony/framework/nodefony/service/Ejs.ts new file mode 100644 index 0000000..6baa4e5 --- /dev/null +++ b/src/packages/@nodefony/framework/nodefony/service/Ejs.ts @@ -0,0 +1,43 @@ +import { Module, extend, injectable } from "nodefony"; +import ejs from "ejs"; +import Template from "../src/Template"; + +const defaultOption = { + cache: false, +}; + +injectable(); +class Ejs extends Template { + declare engine: typeof ejs; + constructor(module: Module) { + super("ejs", ejs, module, extend(true, {}, defaultOption)); + } + + async render( + str: string, + data?: ejs.Data, + options?: ejs.Options + ): Promise { + return this.engine.render(str, data, options); + } + + async compile( + str: string, + options: ejs.Options + ): Promise { + return this.engine.compile(str, options) as ejs.AsyncTemplateFunction; + } + + async renderFile( + path: string, + data?: ejs.Data, + options?: ejs.Options + ): Promise { + return this.engine.renderFile(path, data, options).catch((e) => { + this.log(e, "ERROR"); + throw e; + }); + } +} + +export default Ejs; diff --git a/src/packages/@nodefony/framework/nodefony/service/Twig.ts b/src/packages/@nodefony/framework/nodefony/service/Twig.ts new file mode 100644 index 0000000..b4966be --- /dev/null +++ b/src/packages/@nodefony/framework/nodefony/service/Twig.ts @@ -0,0 +1,118 @@ +import { Module, FileClass, extend, injectable } from "nodefony"; +import twig from "twig"; +import Template from "../src/Template"; +import { PathOrFileDescriptor } from "fs"; + +const twigOptions: twig.RenderOptions = { + "twig options": { + async: true, + allowAsync: true, + cache: true, + }, + views: null, +}; + +injectable(); +class Twig extends Template { + declare engine: typeof twig; + + constructor(module: Module) { + super("twig", twig, module, extend(true, {}, twigOptions)); + } + + async render(view: FileClass, param: any): Promise { + try { + const template = await this.compile(view).catch((e) => { + throw e; + }); + if (template) { + return template(param); + } + throw new Error(`Twig bad Template`); + } catch (e) { + throw e; + } + } + + renderFile(file: PathOrFileDescriptor | FileClass, options = {}) { + return new Promise((resolve, reject) => { + try { + if (!(file instanceof FileClass)) { + file = new FileClass(file); + } + const mypath = file.path as string; + const settings = extend( + true, + {}, + this.options, + { + views: file.dirname, + allowAsync: true, + "twig options": { + cache: this.cache, + }, + }, + options + ); + return this.engine.renderFile(mypath, settings, (error, result) => { + if (error || result === undefined) { + if (!error) { + error = new Error(`ERROR PARSING TEMPLATE :${mypath} `); + return reject(error); + } + return reject(error); + } + return resolve(result); + }); + } catch (e) { + return reject(e); + } + }); + } + + compile(file: FileClass): Promise<(context: any) => any> { + return new Promise(async (resolve, reject) => { + try { + const read = await file.readAsync(); + //@ts-ignore + const opt: twig.CompileOptions = { + filename: file.name, + //@ts-ignore + settings: { + "twig options": { + async: true, + allowAsync: true, + cache: this.kernel?.environment, + }, + }, + }; + return resolve(this.engine.compile(read.toString(), opt)); + // this.engine.twig({ + // path: file.path, + // async: true, + // base: file.dirName, + // name: file.name, + // load: (template) => { + // console.log("template"); + // return resolve(template); + // }, + // }); + } catch (error) { + return reject(error); + } + }); + } + + extendFunction(name: string, definition: (...params: any[]) => string) { + return this.engine.extendFunction(name, definition); + } + + extendFilter( + name: string, + definition: (left: any, params: false | any[]) => string + ) { + return this.engine.extendFilter(name, definition); + } +} + +export default Twig; diff --git a/src/packages/@nodefony/framework/nodefony/service/router.ts b/src/packages/@nodefony/framework/nodefony/service/router.ts index 44f3023..ce63ac0 100644 --- a/src/packages/@nodefony/framework/nodefony/service/router.ts +++ b/src/packages/@nodefony/framework/nodefony/service/router.ts @@ -94,9 +94,14 @@ class Router extends Service { } static setController( myconstructor: TypeController, - name?: string + module: Module ): TypeController { - return (controllers[name || myconstructor.name] = myconstructor); + //myconstructor.prototype.module = module; + Object.defineProperty(myconstructor.prototype, "module", { + value: module, + writable: false, + }); + return (controllers[myconstructor.name] = myconstructor); } } diff --git a/src/packages/@nodefony/framework/nodefony/src/Controller.ts b/src/packages/@nodefony/framework/nodefony/src/Controller.ts index 39cbbd5..4abc1ea 100644 --- a/src/packages/@nodefony/framework/nodefony/src/Controller.ts +++ b/src/packages/@nodefony/framework/nodefony/src/Controller.ts @@ -1,4 +1,14 @@ -import { Service, Module, Container, Event, typeOf } from "nodefony"; +import { + Service, + Module, + Container, + Event, + typeOf, + EnvironmentType, + DebugType, + inject, + FileClass, +} from "nodefony"; import Route from "./Route"; import { contextRequest, @@ -9,8 +19,26 @@ import { Http2Request, Session, ContextType, + HttpKernel, } from "@nodefony/http"; import { HttpContext } from "@nodefony/http"; +import { runInThisContext } from "node:vm"; +import ejs from "../service/Ejs"; +import twig from "../service/Twig"; +import { IncomingMessage, ServerResponse } from "node:http"; +import { ServerHttp2Stream } from "node:http2"; + +export interface MetaData { + name?: string; + version?: string; + url?: URL; + environment?: EnvironmentType; + debug?: DebugType; +} + +export interface Data { + nodefony: MetaData; +} class Controller extends Service { static basepath: string = "/"; @@ -25,21 +53,50 @@ class Controller extends Service { query: Record = {}; queryFile: any[] = []; queryPost: Record = {}; - constructor(name: string, context: ContextType) { + metaData: Data; + module?: Module; + twig: twig; + ejs: ejs; + constructor( + name: string, + context: ContextType + //@inject("HttpKernel") private httpKernel?: HttpKernel + ) { super( name, context.container as Container, context.notificationsCenter as Event ); + this.twig = this.get("twig"); + this.ejs = this.get("ejs"); this.setContext(context); + this.metaData = { + nodefony: { + name: this.kernel?.projectName, + version: this.kernel?.version, + url: this.context?.request?.url, + environment: this.kernel?.environment, + debug: this.kernel?.debug, + //projectVersion: this.kernel?.projectVersion, + //local: context.translation.defaultLocale.substr(0, 2), + //core: this.kernel?.isCore, + //route: context?.resolver.getRoute(), + //getContext: () => this.context, + }, + }; } setContextJson(encoding: BufferEncoding = "utf-8") { return this.context?.setContextJson(encoding); } + setContextHtml(encoding: BufferEncoding = "utf-8") { + return this.context?.setContextHtml(encoding); + } async render( view: string | Object, - param: Record | BufferEncoding = {} + param: Record | BufferEncoding = {}, + status?: string | number, + headers?: Record ) { if (!this.response) { throw new Error( @@ -49,9 +106,11 @@ class Controller extends Service { try { switch (typeOf(view)) { case "string": - return await this.renderView( + return await this.renderTwigView( view as string, - param as Record + param as Record, + status, + headers ); default: return this.renderJson(view as Object, param as BufferEncoding); @@ -61,12 +120,72 @@ class Controller extends Service { } } - async renderView(view: string, param: Record = {}) { - return view; + async renderEjsView( + view: string, + param: Record = {}, + status?: string | number, + headers?: Record + ): Promise | ServerHttp2Stream> { + let data: string; + + try { + const file = new FileClass(view); + data = await this.ejs.render((await file.readAsync()).toString(), param); + if (!this.response) { + throw new Error( + "WARNING ASYNC !! RESPONSE ALREADY SENT BY EXPCEPTION FRAMEWORK" + ); + } + this.response.setBody(data as string); + this.setContextHtml(); + if (headers) { + this.response.setHeaders(headers); + } + if (status) { + this.response.setStatusCode(status); + } + return (this.context as HttpContext)?.send(data); + } catch (e) { + this.log(e, "ERROR"); + throw e; + } + } + + async renderTwigView( + view: string, + param: Record = {}, + status?: string | number, + headers?: Record + ): Promise | ServerHttp2Stream> { + // "app:ejs:index" + let data: string; + try { + const file = new FileClass(view); + data = await this.twig?.render(file, param).catch((e) => { + throw e; + }); + if (!this.response) { + throw new Error( + "WARNING ASYNC !! RESPONSE ALREADY SENT BY EXPCEPTION FRAMEWORK" + ); + } + this.response.setBody(data as string); + this.setContextHtml(); + if (headers) { + this.response.setHeaders(headers); + } + if (status) { + this.response.setStatusCode(status); + } + return (this.context as HttpContext)?.send(data); + } catch (e) { + this.log(e, "ERROR"); + throw e; + } } async renderJson( - obj: Record, + obj: any, status?: string | number, headers?: Record ) { diff --git a/src/packages/@nodefony/framework/nodefony/src/Resolver.ts b/src/packages/@nodefony/framework/nodefony/src/Resolver.ts index 47932b0..2844423 100644 --- a/src/packages/@nodefony/framework/nodefony/src/Resolver.ts +++ b/src/packages/@nodefony/framework/nodefony/src/Resolver.ts @@ -78,13 +78,16 @@ class Resolver extends Service { async callController(data: any[] = [], reload: boolean = false) { try { - let controller = this.get("controller"); + let controller = this.get("controller") as Controller; if (!controller || reload) { controller = await this.newController(); } + if (this.controller?.prototype.module) { + controller.module = this.controller?.prototype.module; + } this.set("action", this.action); this.set("route", this.route); - controller.setRoute(this.route); + controller.setRoute(this.route as Route); const methodKey = this.actionName as keyof typeof controller; const ele = [...this.variables, ...data]; if (typeof controller[methodKey] === "function") { diff --git a/src/packages/@nodefony/framework/nodefony/src/Route.ts b/src/packages/@nodefony/framework/nodefony/src/Route.ts index 4a78d29..90a9105 100644 --- a/src/packages/@nodefony/framework/nodefony/src/Route.ts +++ b/src/packages/@nodefony/framework/nodefony/src/Route.ts @@ -143,7 +143,11 @@ class Route { match(context: ContextType) { let res; if (context.request && context.request.url && this.pattern) { - res = context.request.url.pathname.match(this.pattern as RegExp); + const url = context.request.url.pathname.replace( + REG_REPLACE_END_SLASH, + "" + ); + res = url.match(this.pattern as RegExp); } if (!res) { return res; diff --git a/src/packages/@nodefony/framework/nodefony/src/Template.ts b/src/packages/@nodefony/framework/nodefony/src/Template.ts new file mode 100644 index 0000000..42a30c3 --- /dev/null +++ b/src/packages/@nodefony/framework/nodefony/src/Template.ts @@ -0,0 +1,26 @@ +import { Service, Module, Container, Event } from "nodefony"; +class Template extends Service { + engine: unknown; + module: Module; + cache: boolean = true; + constructor( + name: string, + engine: any, + module: Module, + options: Record = {} + ) { + super( + name, + module.container as Container, + module.notificationsCenter as Event, + options + ); + this.engine = engine; + this.module = module; + this.cache = + module.kernel?.environment === "prod" || + module.kernel?.environment === "production"; + } +} + +export default Template; diff --git a/src/packages/@nodefony/framework/package-lock.json b/src/packages/@nodefony/framework/package-lock.json index 12fb930..67b0950 100644 --- a/src/packages/@nodefony/framework/package-lock.json +++ b/src/packages/@nodefony/framework/package-lock.json @@ -8,7 +8,9 @@ "name": "@nodefony/framework", "version": "10.0.0", "dependencies": { - "bluebird": "3.7.2" + "bluebird": "3.7.2", + "ejs": "3.1.9", + "twig": "1.17.1" }, "devDependencies": { "@rollup/plugin-commonjs": "25.0.7", @@ -18,12 +20,15 @@ "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "11.1.6", "@types/bluebird": "3.5.42", - "@types/node": "20.11.20", - "@typescript-eslint/eslint-plugin": "7.0.2", - "@typescript-eslint/parser": "7.0.2", + "@types/ejs": "3.1.5", + "@types/node": "20.11.24", + "@types/twig": "1.12.16", + "@typescript-eslint/eslint-plugin": "7.1.0", + "@typescript-eslint/parser": "7.1.0", "rimraf": "5.0.5", "rollup": "4.12.0", "rollup-plugin-copy": "3.5.0", + "rollup-sourcemap-path-transform": "1.0.4", "typescript": "5.3.3" } }, @@ -37,6 +42,17 @@ "node": ">=0.10.0" } }, + "node_modules/@babel/runtime": { + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.9.tgz", + "integrity": "sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -662,6 +678,12 @@ "integrity": "sha512-Jhy+MWRlro6UjVi578V/4ZGNfeCOcNCp0YaFNIUGFKlImowqwb1O/22wDVk3FDGMLqxdpOV3qQHD5fPEH4hK6A==", "dev": true }, + "node_modules/@types/ejs": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@types/ejs/-/ejs-3.1.5.tgz", + "integrity": "sha512-nv+GSx77ZtXiJzwKdsASqi+YQ5Z7vwHsTP0JY2SiQgjGckkBRKZnk8nIM+7oUZ1VCtuTz0+By4qVR7fqzp/Dfg==", + "dev": true + }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -700,9 +722,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.20.tgz", - "integrity": "sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==", + "version": "20.11.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", + "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -715,22 +737,28 @@ "dev": true }, "node_modules/@types/semver": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.7.tgz", - "integrity": "sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==", + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true + }, + "node_modules/@types/twig": { + "version": "1.12.16", + "resolved": "https://registry.npmjs.org/@types/twig/-/twig-1.12.16.tgz", + "integrity": "sha512-6kXSQwqxWxdHVITY6lur6pVpKbTk5D8R/ZUn2/7Y2AACKFlRqO4jbtHgWPDLe7JUc91sZQhkmopboYDABtZqlA==", "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.0.2.tgz", - "integrity": "sha512-/XtVZJtbaphtdrWjr+CJclaCVGPtOdBpFEnvtNf/jRV0IiEemRrL0qABex/nEt8isYcnFacm3nPHYQwL+Wb7qg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.1.0.tgz", + "integrity": "sha512-j6vT/kCulhG5wBmGtstKeiVr1rdXE4nk+DT1k6trYkwlrvW9eOF5ZbgKnd/YR6PcM4uTEXa0h6Fcvf6X7Dxl0w==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "7.0.2", - "@typescript-eslint/type-utils": "7.0.2", - "@typescript-eslint/utils": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2", + "@typescript-eslint/scope-manager": "7.1.0", + "@typescript-eslint/type-utils": "7.1.0", + "@typescript-eslint/utils": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -756,15 +784,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.0.2.tgz", - "integrity": "sha512-GdwfDglCxSmU+QTS9vhz2Sop46ebNCXpPPvsByK7hu0rFGRHL+AusKQJ7SoN+LbLh6APFpQwHKmDSwN35Z700Q==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.1.0.tgz", + "integrity": "sha512-V1EknKUubZ1gWFjiOZhDSNToOjs63/9O0puCgGS8aDOgpZY326fzFu15QAUjwaXzRZjf/qdsdBrckYdv9YxB8w==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.0.2", - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/typescript-estree": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2", + "@typescript-eslint/scope-manager": "7.1.0", + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/typescript-estree": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0", "debug": "^4.3.4" }, "engines": { @@ -784,13 +812,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.0.2.tgz", - "integrity": "sha512-l6sa2jF3h+qgN2qUMjVR3uCNGjWw4ahGfzIYsCtFrQJCjhbrDPdiihYT8FnnqFwsWX+20hK592yX9I2rxKTP4g==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.1.0.tgz", + "integrity": "sha512-6TmN4OJiohHfoOdGZ3huuLhpiUgOGTpgXNUPJgeZOZR3DnIpdSgtt83RS35OYNNXxM4TScVlpVKC9jyQSETR1A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2" + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -801,13 +829,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.0.2.tgz", - "integrity": "sha512-IKKDcFsKAYlk8Rs4wiFfEwJTQlHcdn8CLwLaxwd6zb8HNiMcQIFX9sWax2k4Cjj7l7mGS5N1zl7RCHOVwHq2VQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.1.0.tgz", + "integrity": "sha512-UZIhv8G+5b5skkcuhgvxYWHjk7FW7/JP5lPASMEUoliAPwIH/rxoUSQPia2cuOj9AmDZmwUl1usKm85t5VUMew==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.0.2", - "@typescript-eslint/utils": "7.0.2", + "@typescript-eslint/typescript-estree": "7.1.0", + "@typescript-eslint/utils": "7.1.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -828,9 +856,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.2.tgz", - "integrity": "sha512-ZzcCQHj4JaXFjdOql6adYV4B/oFOFjPOC9XYwCaZFRvqN8Llfvv4gSxrkQkd2u4Ci62i2c6W6gkDwQJDaRc4nA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.1.0.tgz", + "integrity": "sha512-qTWjWieJ1tRJkxgZYXx6WUYtWlBc48YRxgY2JN1aGeVpkhmnopq+SUC8UEVGNXIvWH7XyuTjwALfG6bFEgCkQA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -841,13 +869,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.2.tgz", - "integrity": "sha512-3AMc8khTcELFWcKcPc0xiLviEvvfzATpdPj/DXuOGIdQIIFybf4DMT1vKRbuAEOFMwhWt7NFLXRkbjsvKZQyvw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.0.tgz", + "integrity": "sha512-k7MyrbD6E463CBbSpcOnwa8oXRdHzH1WiVzOipK3L5KSML92ZKgUBrTlehdi7PEIMT8k0bQixHUGXggPAlKnOQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2", + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -869,17 +897,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.0.2.tgz", - "integrity": "sha512-PZPIONBIB/X684bhT1XlrkjNZJIEevwkKDsdwfiu1WeqBxYEEdIgVDgm8/bbKHVu+6YOpeRqcfImTdImx/4Bsw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.1.0.tgz", + "integrity": "sha512-WUFba6PZC5OCGEmbweGpnNJytJiLG7ZvDBJJoUcX4qZYf1mGZ97mO2Mps6O2efxJcJdRNpqweCistDbZMwIVHw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "7.0.2", - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/typescript-estree": "7.0.2", + "@typescript-eslint/scope-manager": "7.1.0", + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/typescript-estree": "7.1.0", "semver": "^7.5.4" }, "engines": { @@ -894,12 +922,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.2.tgz", - "integrity": "sha512-8Y+YiBmqPighbm5xA2k4wKTxRzx9EkBu7Rlw+WHqMvRJ3RPz/BMBO9b2ru0LUNmXg120PHUXD5+SWFy2R8DqlQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.0.tgz", + "integrity": "sha512-FhUqNWluiGNzlvnDZiXad4mZRhtghdoKW6e98GoEOYSu5cND+E39rG5KwJMUzeENwm1ztYBRqof8wMLP+wNPIA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.0.2", + "@typescript-eslint/types": "7.1.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -969,7 +997,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -996,11 +1023,15 @@ "node": ">=8" } }, + "node_modules/async": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/bluebird": { "version": "3.7.2", @@ -1011,7 +1042,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, "dependencies": { "balanced-match": "^1.0.0" } @@ -1060,8 +1090,6 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "peer": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -1077,7 +1105,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -1088,8 +1115,7 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/colorette": { "version": "1.4.0", @@ -1112,8 +1138,7 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "node_modules/cross-spawn": { "version": "7.0.3", @@ -1193,6 +1218,20 @@ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true }, + "node_modules/ejs": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", + "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", @@ -1462,6 +1501,25 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -1574,6 +1632,11 @@ "dev": true, "peer": true }, + "node_modules/foreachasync": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/foreachasync/-/foreachasync-3.0.0.tgz", + "integrity": "sha512-J+ler7Ta54FwwNcx6wQRDhTIbNeyDcARMkOcguEqnEdtm0jKvN3Li3PDAb2Du3ubJYEWfYL83XMROXdsXAXycw==" + }, "node_modules/foreground-child": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", @@ -1729,8 +1792,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -1923,6 +1984,43 @@ "@pkgjs/parseargs": "^0.11.0" } }, + "node_modules/jake": { + "version": "10.8.7", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz", + "integrity": "sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jake/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/jake/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -2006,6 +2104,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/locutus": { + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/locutus/-/locutus-2.0.16.tgz", + "integrity": "sha512-pGfl6Hb/1mXLzrX5kl5lH7gz25ey0vwQssZp8Qo2CEF59di6KrAgdFm+0pW8ghLnvNzzJGj5tlWhhv2QbK3jeQ==", + "engines": { + "node": ">= 10" + } + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -2296,6 +2402,11 @@ "safe-buffer": "^5.1.0" } }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, "node_modules/resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", @@ -2482,6 +2593,18 @@ "node": "*" } }, + "node_modules/rollup-sourcemap-path-transform": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/rollup-sourcemap-path-transform/-/rollup-sourcemap-path-transform-1.0.4.tgz", + "integrity": "sha512-rDGqCmPuYWZEzEeN42uhXrRERAlsT2Gmnwwwr/7iN6k4hqhn0wyvYWsjNk+HJCaTmU1H/JbUwnJyU7BCojAMxA==", + "dev": true, + "engines": { + "node": ">= 14.18" + }, + "peerDependencies": { + "rollup": "^2 || ^3 || ^4" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -2723,8 +2846,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -2793,6 +2914,43 @@ "typescript": ">=4.2.0" } }, + "node_modules/twig": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/twig/-/twig-1.17.1.tgz", + "integrity": "sha512-atxccyr/BHtb1gPMA7Lvki0OuU17XBqHsNH9lzDHt9Rr1293EVZOosSZabEXz/DPVikIW8ZDqSkEddwyJnQN2w==", + "dependencies": { + "@babel/runtime": "^7.8.4", + "locutus": "^2.0.11", + "minimatch": "3.0.x", + "walk": "2.3.x" + }, + "bin": { + "twigjs": "bin/twigjs" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/twig/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/twig/node_modules/minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -2857,6 +3015,14 @@ "punycode": "^2.1.0" } }, + "node_modules/walk": { + "version": "2.3.15", + "resolved": "https://registry.npmjs.org/walk/-/walk-2.3.15.tgz", + "integrity": "sha512-4eRTBZljBfIISK1Vnt69Gvr2w/wc3U6Vtrw7qiN5iqYJPH7LElcYh/iU4XWhdCy2dZqv1ToMyYlybDylfG/5Vg==", + "dependencies": { + "foreachasync": "^3.0.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/src/packages/@nodefony/framework/package.json b/src/packages/@nodefony/framework/package.json index 8585188..5dc664b 100644 --- a/src/packages/@nodefony/framework/package.json +++ b/src/packages/@nodefony/framework/package.json @@ -20,7 +20,9 @@ ], "repository": {}, "dependencies": { - "bluebird": "3.7.2" + "bluebird": "3.7.2", + "ejs": "3.1.9", + "twig": "1.17.1" }, "devDependencies": { "@rollup/plugin-commonjs": "25.0.7", @@ -30,12 +32,15 @@ "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "11.1.6", "@types/bluebird": "3.5.42", - "@types/node": "20.11.20", - "@typescript-eslint/eslint-plugin": "7.0.2", - "@typescript-eslint/parser": "7.0.2", + "@types/ejs": "3.1.5", + "@types/node": "20.11.24", + "@types/twig": "1.12.16", + "@typescript-eslint/eslint-plugin": "7.1.0", + "@typescript-eslint/parser": "7.1.0", "rimraf": "5.0.5", "rollup": "4.12.0", "rollup-plugin-copy": "3.5.0", + "rollup-sourcemap-path-transform": "1.0.4", "typescript": "5.3.3" }, "license": "", diff --git a/src/packages/@nodefony/framework/rollup.config.ts b/src/packages/@nodefony/framework/rollup.config.ts index 99865c1..81924cd 100644 --- a/src/packages/@nodefony/framework/rollup.config.ts +++ b/src/packages/@nodefony/framework/rollup.config.ts @@ -1,11 +1,25 @@ // rollup.config.ts -import path from "node:path"; +import path, { resolve } from "node:path"; import { defineConfig, Plugin, RollupOptions } from "rollup"; import nodeResolve from "@rollup/plugin-node-resolve"; import typescript from "@rollup/plugin-typescript"; import json from "@rollup/plugin-json"; //import commonjs from "@rollup/plugin-commonjs"; //import copy from "rollup-plugin-copy"; +//@ts-ignore +import { createPathTransform } from "rollup-sourcemap-path-transform"; + +const sourcemapPathTransform = createPathTransform({ + prefixes: { + "*src/": `${resolve(".", "nodefony", "src")}/`, + "*config/": `${resolve(".", "nodefony", "config")}/`, + "*decorators/": `${resolve(".", "nodefony", "decorators")}/`, + "*service/": `${resolve(".", "nodefony", "service")}/`, + "*controller/": `${resolve(".", "nodefony", "controller")}/`, + "*entity/": `${resolve(".", "nodefony", "entity")}/`, + "*command/": `${resolve(".", "nodefony", "command")}/`, + }, +}); const external: string[] = [ "nodefony", @@ -13,6 +27,9 @@ const external: string[] = [ "@nodefony/sequelize", "@nodefony/security", "bluebird", + "twig", + "ejs", + "tslib", ]; const sharedNodeOptions = defineConfig({ @@ -67,9 +84,10 @@ function createNodeConfig(isProduction: boolean): RollupOptions { ...sharedNodeOptions, output: { ...sharedNodeOptions.output, - //sourcemap: !isProduction, - //preserveModules: !isProduction, - //preserveModulesRoot: "nodefony", + sourcemap: !isProduction, + preserveModules: !isProduction, + preserveModulesRoot: "nodefony", + sourcemapPathTransform, }, external, plugins: [...createNodePlugins(isProduction, true, "dist/types")], diff --git a/src/packages/@nodefony/http/nodefony/service/http-kernel.ts b/src/packages/@nodefony/http/nodefony/service/http-kernel.ts index bc06a9c..c514cac 100644 --- a/src/packages/@nodefony/http/nodefony/service/http-kernel.ts +++ b/src/packages/@nodefony/http/nodefony/service/http-kernel.ts @@ -44,11 +44,9 @@ type AliasObject = Record; type AliasArray = (string | RegExp)[]; type DomainAliasType = AliasObject | AliasArray | string; export type responseTimeoutType = "http" | "https" | "http2" | "http3"; - export type SchemeType = "http" | "https" | "ws" | "wss"; const serviceName: string = "HttpKernel"; - @injectable() class HttpKernel extends Service { certificates: any; diff --git a/src/packages/@nodefony/http/nodefony/src/context/Context.ts b/src/packages/@nodefony/http/nodefony/src/context/Context.ts index 511907c..1909de7 100644 --- a/src/packages/@nodefony/http/nodefony/src/context/Context.ts +++ b/src/packages/@nodefony/http/nodefony/src/context/Context.ts @@ -23,7 +23,7 @@ import { URL } from "node:url"; import Session from "../session/session"; import Cookie, { cookiesParser } from "../cookies/cookie"; import HttpError from "../errors/httpError"; -const colorLogEvent = clc.cyan.bgBlue("EVENT CONTEXT"); +const colorLogEvent = clc.cyan.bgBlack("EVENT CONTEXT"); export type contextRequest = | HttpRequest @@ -78,6 +78,8 @@ class Context extends Service { cookieSession: Cookie | null | undefined = null; user: any = null; waitAsync: boolean = false; + isJson: boolean = true; + isHtml: boolean = false; constructor(container: Container, type: ServerType) { super(`${type} CONTEXT`, container); this.type = type; @@ -206,6 +208,7 @@ class Context extends Service { return cookiesParser(this); } setContextJson(encoding: BufferEncoding = "utf-8"): void {} + setContextHtml(encoding: BufferEncoding = "utf-8"): void {} } export default Context; diff --git a/src/packages/@nodefony/http/nodefony/src/context/http/HttpContext.ts b/src/packages/@nodefony/http/nodefony/src/context/http/HttpContext.ts index 7dd878a..31104bd 100644 --- a/src/packages/@nodefony/http/nodefony/src/context/http/HttpContext.ts +++ b/src/packages/@nodefony/http/nodefony/src/context/http/HttpContext.ts @@ -59,7 +59,6 @@ class HttpContext extends Context { response: HttpRsponseType; resolver: Resolver | null = null; router: Router | null = this.get("router"); - isJson: boolean = false; constructor( container: Container, request: http.IncomingMessage | http2.Http2ServerRequest, @@ -155,7 +154,10 @@ class HttpContext extends Context { this.resolver = this.router.resolve(this); } if (this.resolver && this.resolver.resolve) { - return resolve(this.resolver.callController()); + const ret = await this.resolver.callController().catch((e) => { + return reject(e); + }); + return resolve(ret); } return reject(new HttpError("", 404, this)); } catch (e) { @@ -364,6 +366,10 @@ class HttpContext extends Context { this.isJson = true; this.response.setContentType("json", encoding); } + override setContextHtml(encoding: BufferEncoding = "utf-8"): void { + this.isHtml = true; + this.response.setContentType("html", encoding); + } } export default HttpContext; diff --git a/src/packages/@nodefony/http/package-lock.json b/src/packages/@nodefony/http/package-lock.json index aa42f26..5ef84b7 100644 --- a/src/packages/@nodefony/http/package-lock.json +++ b/src/packages/@nodefony/http/package-lock.json @@ -8,7 +8,7 @@ "name": "@nodefony/http", "version": "10.0.0", "dependencies": { - "cli-color": "2.0.3", + "cli-color": "2.0.4", "cookie": "0.6.0", "formidable": "3.5.1", "http-terminator": "3.2.0", @@ -37,18 +37,19 @@ "@types/formidable": "3.4.5", "@types/mime-types": "2.1.4", "@types/ms": "0.7.34", - "@types/node": "20.11.20", + "@types/node": "20.11.24", "@types/node-forge": "1.3.11", - "@types/qs": "6.9.11", + "@types/qs": "6.9.12", "@types/serve-static": "1.15.5", "@types/uuid": "9.0.8", "@types/websocket": "1.0.10", "@types/xml2js": "0.4.14", - "@typescript-eslint/eslint-plugin": "7.0.2", - "@typescript-eslint/parser": "7.0.2", + "@typescript-eslint/eslint-plugin": "7.1.0", + "@typescript-eslint/parser": "7.1.0", "rimraf": "5.0.5", "rollup": "4.12.0", "rollup-plugin-copy": "3.5.0", + "rollup-sourcemap-path-transform": "1.0.4", "typescript": "5.3.3" } }, @@ -764,9 +765,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.20.tgz", - "integrity": "sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==", + "version": "20.11.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", + "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -782,9 +783,9 @@ } }, "node_modules/@types/qs": { - "version": "6.9.11", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.11.tgz", - "integrity": "sha512-oGk0gmhnEJK4Yyk+oI7EfXsLayXatCWPHary1MtcmbAifkobT9cM9yutG/hZKIseOU0MqbIwQ/u2nn/Gb+ltuQ==", + "version": "6.9.12", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.12.tgz", + "integrity": "sha512-bZcOkJ6uWrL0Qb2NAWKa7TBU+mJHPzhx9jjLL1KHF+XpzEcR7EXHvjbHlGtR/IsP1vyPrehuS6XqkmaePy//mg==", "dev": true }, "node_modules/@types/resolve": { @@ -794,9 +795,9 @@ "dev": true }, "node_modules/@types/semver": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.7.tgz", - "integrity": "sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==", + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", "dev": true }, "node_modules/@types/serve-static": { @@ -835,16 +836,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.0.2.tgz", - "integrity": "sha512-/XtVZJtbaphtdrWjr+CJclaCVGPtOdBpFEnvtNf/jRV0IiEemRrL0qABex/nEt8isYcnFacm3nPHYQwL+Wb7qg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.1.0.tgz", + "integrity": "sha512-j6vT/kCulhG5wBmGtstKeiVr1rdXE4nk+DT1k6trYkwlrvW9eOF5ZbgKnd/YR6PcM4uTEXa0h6Fcvf6X7Dxl0w==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "7.0.2", - "@typescript-eslint/type-utils": "7.0.2", - "@typescript-eslint/utils": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2", + "@typescript-eslint/scope-manager": "7.1.0", + "@typescript-eslint/type-utils": "7.1.0", + "@typescript-eslint/utils": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -870,15 +871,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.0.2.tgz", - "integrity": "sha512-GdwfDglCxSmU+QTS9vhz2Sop46ebNCXpPPvsByK7hu0rFGRHL+AusKQJ7SoN+LbLh6APFpQwHKmDSwN35Z700Q==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.1.0.tgz", + "integrity": "sha512-V1EknKUubZ1gWFjiOZhDSNToOjs63/9O0puCgGS8aDOgpZY326fzFu15QAUjwaXzRZjf/qdsdBrckYdv9YxB8w==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.0.2", - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/typescript-estree": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2", + "@typescript-eslint/scope-manager": "7.1.0", + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/typescript-estree": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0", "debug": "^4.3.4" }, "engines": { @@ -898,13 +899,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.0.2.tgz", - "integrity": "sha512-l6sa2jF3h+qgN2qUMjVR3uCNGjWw4ahGfzIYsCtFrQJCjhbrDPdiihYT8FnnqFwsWX+20hK592yX9I2rxKTP4g==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.1.0.tgz", + "integrity": "sha512-6TmN4OJiohHfoOdGZ3huuLhpiUgOGTpgXNUPJgeZOZR3DnIpdSgtt83RS35OYNNXxM4TScVlpVKC9jyQSETR1A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2" + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -915,13 +916,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.0.2.tgz", - "integrity": "sha512-IKKDcFsKAYlk8Rs4wiFfEwJTQlHcdn8CLwLaxwd6zb8HNiMcQIFX9sWax2k4Cjj7l7mGS5N1zl7RCHOVwHq2VQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.1.0.tgz", + "integrity": "sha512-UZIhv8G+5b5skkcuhgvxYWHjk7FW7/JP5lPASMEUoliAPwIH/rxoUSQPia2cuOj9AmDZmwUl1usKm85t5VUMew==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.0.2", - "@typescript-eslint/utils": "7.0.2", + "@typescript-eslint/typescript-estree": "7.1.0", + "@typescript-eslint/utils": "7.1.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -942,9 +943,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.2.tgz", - "integrity": "sha512-ZzcCQHj4JaXFjdOql6adYV4B/oFOFjPOC9XYwCaZFRvqN8Llfvv4gSxrkQkd2u4Ci62i2c6W6gkDwQJDaRc4nA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.1.0.tgz", + "integrity": "sha512-qTWjWieJ1tRJkxgZYXx6WUYtWlBc48YRxgY2JN1aGeVpkhmnopq+SUC8UEVGNXIvWH7XyuTjwALfG6bFEgCkQA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -955,13 +956,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.2.tgz", - "integrity": "sha512-3AMc8khTcELFWcKcPc0xiLviEvvfzATpdPj/DXuOGIdQIIFybf4DMT1vKRbuAEOFMwhWt7NFLXRkbjsvKZQyvw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.0.tgz", + "integrity": "sha512-k7MyrbD6E463CBbSpcOnwa8oXRdHzH1WiVzOipK3L5KSML92ZKgUBrTlehdi7PEIMT8k0bQixHUGXggPAlKnOQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2", + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -983,17 +984,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.0.2.tgz", - "integrity": "sha512-PZPIONBIB/X684bhT1XlrkjNZJIEevwkKDsdwfiu1WeqBxYEEdIgVDgm8/bbKHVu+6YOpeRqcfImTdImx/4Bsw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.1.0.tgz", + "integrity": "sha512-WUFba6PZC5OCGEmbweGpnNJytJiLG7ZvDBJJoUcX4qZYf1mGZ97mO2Mps6O2efxJcJdRNpqweCistDbZMwIVHw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "7.0.2", - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/typescript-estree": "7.0.2", + "@typescript-eslint/scope-manager": "7.1.0", + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/typescript-estree": "7.1.0", "semver": "^7.5.4" }, "engines": { @@ -1008,12 +1009,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.2.tgz", - "integrity": "sha512-8Y+YiBmqPighbm5xA2k4wKTxRzx9EkBu7Rlw+WHqMvRJ3RPz/BMBO9b2ru0LUNmXg120PHUXD5+SWFy2R8DqlQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.0.tgz", + "integrity": "sha512-FhUqNWluiGNzlvnDZiXad4mZRhtghdoKW6e98GoEOYSu5cND+E39rG5KwJMUzeENwm1ztYBRqof8wMLP+wNPIA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.0.2", + "@typescript-eslint/types": "7.1.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -1216,12 +1217,12 @@ } }, "node_modules/cli-color": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz", - "integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.4.tgz", + "integrity": "sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==", "dependencies": { "d": "^1.0.1", - "es5-ext": "^0.10.61", + "es5-ext": "^0.10.64", "es6-iterator": "^2.0.3", "memoizee": "^0.4.15", "timers-ext": "^0.1.7" @@ -1448,13 +1449,14 @@ } }, "node_modules/es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", "hasInstallScript": true, "dependencies": { "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", "next-tick": "^1.1.0" }, "engines": { @@ -1617,6 +1619,25 @@ "node": "*" } }, + "node_modules/esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esniff/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -3219,6 +3240,18 @@ "node": "*" } }, + "node_modules/rollup-sourcemap-path-transform": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/rollup-sourcemap-path-transform/-/rollup-sourcemap-path-transform-1.0.4.tgz", + "integrity": "sha512-rDGqCmPuYWZEzEeN42uhXrRERAlsT2Gmnwwwr/7iN6k4hqhn0wyvYWsjNk+HJCaTmU1H/JbUwnJyU7BCojAMxA==", + "dev": true, + "engines": { + "node": ">= 14.18" + }, + "peerDependencies": { + "rollup": "^2 || ^3 || ^4" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", diff --git a/src/packages/@nodefony/http/package.json b/src/packages/@nodefony/http/package.json index 405d184..6384485 100644 --- a/src/packages/@nodefony/http/package.json +++ b/src/packages/@nodefony/http/package.json @@ -8,7 +8,7 @@ "types": "./nodefony/types/index.d.ts", "scripts": { "build": "rimraf dist && npm run rollup", - "rollup": "rollup --config rollup.config.ts --configPlugin typescript", + "rollup": "npx rollup --config ./rollup.config.ts --configPlugin typescript", "dev": "rimraf dist && npm run rollup -- --watch", "test": "node -e \"console.log('test')\"" }, @@ -20,7 +20,7 @@ ], "repository": {}, "dependencies": { - "cli-color": "2.0.3", + "cli-color": "2.0.4", "cookie": "0.6.0", "formidable": "3.5.1", "http-terminator": "3.2.0", @@ -49,18 +49,19 @@ "@types/formidable": "3.4.5", "@types/mime-types": "2.1.4", "@types/ms": "0.7.34", - "@types/node": "20.11.20", + "@types/node": "20.11.24", "@types/node-forge": "1.3.11", - "@types/qs": "6.9.11", + "@types/qs": "6.9.12", "@types/serve-static": "1.15.5", "@types/uuid": "9.0.8", "@types/websocket": "1.0.10", "@types/xml2js": "0.4.14", - "@typescript-eslint/eslint-plugin": "7.0.2", - "@typescript-eslint/parser": "7.0.2", + "@typescript-eslint/eslint-plugin": "7.1.0", + "@typescript-eslint/parser": "7.1.0", "rimraf": "5.0.5", "rollup": "4.12.0", "rollup-plugin-copy": "3.5.0", + "rollup-sourcemap-path-transform": "1.0.4", "typescript": "5.3.3" }, "license": "", diff --git a/src/packages/@nodefony/http/rollup.config.ts b/src/packages/@nodefony/http/rollup.config.ts index 8dbf80c..e521d4b 100644 --- a/src/packages/@nodefony/http/rollup.config.ts +++ b/src/packages/@nodefony/http/rollup.config.ts @@ -1,12 +1,25 @@ // rollup.config.ts -import path from "node:path"; +import path, { resolve } from "node:path"; import { defineConfig, Plugin, RollupOptions } from "rollup"; import nodeResolve from "@rollup/plugin-node-resolve"; import typescript from "@rollup/plugin-typescript"; import json from "@rollup/plugin-json"; +//@ts-ignore +import { createPathTransform } from "rollup-sourcemap-path-transform"; //import commonjs from "@rollup/plugin-commonjs"; //import copy from "rollup-plugin-copy"; +const sourcemapPathTransform = createPathTransform({ + prefixes: { + "*src/": `${resolve(".", "nodefony", "src")}/`, + "*service/": `${resolve(".", "nodefony", "service")}/`, + "*controller/": `${resolve(".", "nodefony", "controller")}/`, + "*entity/": `${resolve(".", "nodefony", "entity")}/`, + "*command/": `${resolve(".", "nodefony", "command")}/`, + //"*nodefony/": `${resolve(".", "src")}/`, + }, +}); + const external: string[] = [ "nodefony", "cli-color", @@ -26,6 +39,7 @@ const external: string[] = [ "mime-types", "uuid", "xml2js", + "tslib", ]; const sharedNodeOptions = defineConfig({ @@ -35,8 +49,8 @@ const sharedNodeOptions = defineConfig({ tryCatchDeoptimization: false, }, output: { - dir: "./dist", - entryFileNames: `[name].js`, + dir: resolve(".", "dist"), + entryFileNames: `[name].js`, //`[name].js`, //chunkFileNames: "node/chunks/dep-[hash].js", exports: "auto", format: "es", @@ -81,13 +95,14 @@ function createNodePlugins( function createNodeConfig(isProduction: boolean): RollupOptions { return defineConfig({ //input, - input: "./index.ts", + input: resolve(".", "index.ts"), ...sharedNodeOptions, output: { ...sharedNodeOptions.output, sourcemap: !isProduction, - //preserveModules: !isProduction, + preserveModules: !isProduction, preserveModulesRoot: "nodefony", + sourcemapPathTransform, }, external, plugins: [...createNodePlugins(isProduction, true, "dist/types")], diff --git a/src/packages/@nodefony/security/package.json b/src/packages/@nodefony/security/package.json index 2471d82..3796a47 100644 --- a/src/packages/@nodefony/security/package.json +++ b/src/packages/@nodefony/security/package.json @@ -40,9 +40,9 @@ "@rollup/plugin-replace": "5.0.5", "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "11.1.6", - "@types/node": "20.11.20", - "@typescript-eslint/eslint-plugin": "7.0.2", - "@typescript-eslint/parser": "7.0.2", + "@types/node": "20.11.24", + "@typescript-eslint/eslint-plugin": "7.1.0", + "@typescript-eslint/parser": "7.1.0", "rimraf": "5.0.5", "rollup": "4.12.0", "rollup-plugin-copy": "3.5.0", diff --git a/src/packages/@nodefony/sequelize/package-lock.json b/src/packages/@nodefony/sequelize/package-lock.json index cc5da9f..2c7d9bb 100644 --- a/src/packages/@nodefony/sequelize/package-lock.json +++ b/src/packages/@nodefony/sequelize/package-lock.json @@ -12,7 +12,7 @@ "@alt3/sequelize-to-json-schemas": "^0.3.56", "cls-hooked": "^4.2.2", "mariadb": "3.2.3", - "mysql2": "3.9.1", + "mysql2": "3.9.2", "pg": "8.11.3", "pg-hstore": "^2.3.4", "pgtools": "1.0.1", @@ -28,9 +28,9 @@ "@rollup/plugin-replace": "5.0.5", "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "11.1.6", - "@types/node": "20.11.20", - "@typescript-eslint/eslint-plugin": "7.0.2", - "@typescript-eslint/parser": "7.0.2", + "@types/node": "20.11.24", + "@typescript-eslint/eslint-plugin": "7.1.0", + "@typescript-eslint/parser": "7.1.0", "rimraf": "5.0.5", "rollup": "4.12.0", "sequelize-cli": "6.6.2", @@ -1137,9 +1137,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.11.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.20.tgz", - "integrity": "sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==", + "version": "20.11.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", + "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "dependencies": { "undici-types": "~5.26.4" } @@ -1163,9 +1163,9 @@ "dev": true }, "node_modules/@types/semver": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.7.tgz", - "integrity": "sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==", + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", "dev": true }, "node_modules/@types/validator": { @@ -1173,16 +1173,16 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.0.2.tgz", - "integrity": "sha512-/XtVZJtbaphtdrWjr+CJclaCVGPtOdBpFEnvtNf/jRV0IiEemRrL0qABex/nEt8isYcnFacm3nPHYQwL+Wb7qg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.1.0.tgz", + "integrity": "sha512-j6vT/kCulhG5wBmGtstKeiVr1rdXE4nk+DT1k6trYkwlrvW9eOF5ZbgKnd/YR6PcM4uTEXa0h6Fcvf6X7Dxl0w==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "7.0.2", - "@typescript-eslint/type-utils": "7.0.2", - "@typescript-eslint/utils": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2", + "@typescript-eslint/scope-manager": "7.1.0", + "@typescript-eslint/type-utils": "7.1.0", + "@typescript-eslint/utils": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -1208,15 +1208,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.0.2.tgz", - "integrity": "sha512-GdwfDglCxSmU+QTS9vhz2Sop46ebNCXpPPvsByK7hu0rFGRHL+AusKQJ7SoN+LbLh6APFpQwHKmDSwN35Z700Q==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.1.0.tgz", + "integrity": "sha512-V1EknKUubZ1gWFjiOZhDSNToOjs63/9O0puCgGS8aDOgpZY326fzFu15QAUjwaXzRZjf/qdsdBrckYdv9YxB8w==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.0.2", - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/typescript-estree": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2", + "@typescript-eslint/scope-manager": "7.1.0", + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/typescript-estree": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0", "debug": "^4.3.4" }, "engines": { @@ -1236,13 +1236,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.0.2.tgz", - "integrity": "sha512-l6sa2jF3h+qgN2qUMjVR3uCNGjWw4ahGfzIYsCtFrQJCjhbrDPdiihYT8FnnqFwsWX+20hK592yX9I2rxKTP4g==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.1.0.tgz", + "integrity": "sha512-6TmN4OJiohHfoOdGZ3huuLhpiUgOGTpgXNUPJgeZOZR3DnIpdSgtt83RS35OYNNXxM4TScVlpVKC9jyQSETR1A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2" + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -1253,13 +1253,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.0.2.tgz", - "integrity": "sha512-IKKDcFsKAYlk8Rs4wiFfEwJTQlHcdn8CLwLaxwd6zb8HNiMcQIFX9sWax2k4Cjj7l7mGS5N1zl7RCHOVwHq2VQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.1.0.tgz", + "integrity": "sha512-UZIhv8G+5b5skkcuhgvxYWHjk7FW7/JP5lPASMEUoliAPwIH/rxoUSQPia2cuOj9AmDZmwUl1usKm85t5VUMew==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.0.2", - "@typescript-eslint/utils": "7.0.2", + "@typescript-eslint/typescript-estree": "7.1.0", + "@typescript-eslint/utils": "7.1.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -1280,9 +1280,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.2.tgz", - "integrity": "sha512-ZzcCQHj4JaXFjdOql6adYV4B/oFOFjPOC9XYwCaZFRvqN8Llfvv4gSxrkQkd2u4Ci62i2c6W6gkDwQJDaRc4nA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.1.0.tgz", + "integrity": "sha512-qTWjWieJ1tRJkxgZYXx6WUYtWlBc48YRxgY2JN1aGeVpkhmnopq+SUC8UEVGNXIvWH7XyuTjwALfG6bFEgCkQA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -1293,13 +1293,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.2.tgz", - "integrity": "sha512-3AMc8khTcELFWcKcPc0xiLviEvvfzATpdPj/DXuOGIdQIIFybf4DMT1vKRbuAEOFMwhWt7NFLXRkbjsvKZQyvw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.0.tgz", + "integrity": "sha512-k7MyrbD6E463CBbSpcOnwa8oXRdHzH1WiVzOipK3L5KSML92ZKgUBrTlehdi7PEIMT8k0bQixHUGXggPAlKnOQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/visitor-keys": "7.0.2", + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/visitor-keys": "7.1.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1321,17 +1321,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.0.2.tgz", - "integrity": "sha512-PZPIONBIB/X684bhT1XlrkjNZJIEevwkKDsdwfiu1WeqBxYEEdIgVDgm8/bbKHVu+6YOpeRqcfImTdImx/4Bsw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.1.0.tgz", + "integrity": "sha512-WUFba6PZC5OCGEmbweGpnNJytJiLG7ZvDBJJoUcX4qZYf1mGZ97mO2Mps6O2efxJcJdRNpqweCistDbZMwIVHw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "7.0.2", - "@typescript-eslint/types": "7.0.2", - "@typescript-eslint/typescript-estree": "7.0.2", + "@typescript-eslint/scope-manager": "7.1.0", + "@typescript-eslint/types": "7.1.0", + "@typescript-eslint/typescript-estree": "7.1.0", "semver": "^7.5.4" }, "engines": { @@ -1346,12 +1346,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.2.tgz", - "integrity": "sha512-8Y+YiBmqPighbm5xA2k4wKTxRzx9EkBu7Rlw+WHqMvRJ3RPz/BMBO9b2ru0LUNmXg120PHUXD5+SWFy2R8DqlQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.0.tgz", + "integrity": "sha512-FhUqNWluiGNzlvnDZiXad4mZRhtghdoKW6e98GoEOYSu5cND+E39rG5KwJMUzeENwm1ztYBRqof8wMLP+wNPIA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.0.2", + "@typescript-eslint/types": "7.1.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -4185,8 +4185,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/mysql2": { - "version": "3.9.1", - "license": "MIT", + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.9.2.tgz", + "integrity": "sha512-3Cwg/UuRkAv/wm6RhtPE5L7JlPB877vwSF6gfLAS68H+zhH+u5oa3AieqEd0D0/kC3W7qIhYbH419f7O9i/5nw==", "dependencies": { "denque": "^2.1.0", "generate-function": "^2.3.1", diff --git a/src/packages/@nodefony/sequelize/package.json b/src/packages/@nodefony/sequelize/package.json index 229eea8..ed4de7c 100644 --- a/src/packages/@nodefony/sequelize/package.json +++ b/src/packages/@nodefony/sequelize/package.json @@ -22,7 +22,7 @@ "@alt3/sequelize-to-json-schemas": "^0.3.56", "cls-hooked": "^4.2.2", "mariadb": "3.2.3", - "mysql2": "3.9.1", + "mysql2": "3.9.2", "pg": "8.11.3", "pg-hstore": "^2.3.4", "pgtools": "1.0.1", @@ -38,9 +38,9 @@ "@rollup/plugin-replace": "5.0.5", "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "11.1.6", - "@types/node": "20.11.20", - "@typescript-eslint/eslint-plugin": "7.0.2", - "@typescript-eslint/parser": "7.0.2", + "@types/node": "20.11.24", + "@typescript-eslint/eslint-plugin": "7.1.0", + "@typescript-eslint/parser": "7.1.0", "rimraf": "5.0.5", "rollup": "4.12.0", "sequelize-cli": "6.6.2", diff --git a/src/packages/@nodefony/sequelize/rollup.config.ts b/src/packages/@nodefony/sequelize/rollup.config.ts index 12b2c14..64a35c4 100644 --- a/src/packages/@nodefony/sequelize/rollup.config.ts +++ b/src/packages/@nodefony/sequelize/rollup.config.ts @@ -20,6 +20,7 @@ const external: string[] = [ "sqlite3", "tedious", "umzug", + "tslib", ]; const sharedNodeOptions = defineConfig({