build: add script to build MikroORM entities
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 13 Jan 2024 21:03:37 +0000 (22:03 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 13 Jan 2024 21:03:37 +0000 (22:03 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
package.json
pnpm-lock.yaml
tsconfig-mikro-orm.json [new file with mode: 0644]
tsconfig-orm.json [deleted file]
tsconfig.json

index 8f45c24116a5585bdf3a6ecab48e7956b6eef07a..0b05f6ac3d296356fea27d29933ab6faf054f8e3 100644 (file)
@@ -47,7 +47,7 @@
     "compareUrl": "https://github.com/sap/e-mobility-charging-stations-simulator/compare/{from}...{to}"
   },
   "mikro-orm": {
-    "tsConfigPath": "./tsconfig-orm.json",
+    "tsConfigPath": "./tsconfig-mikro-orm.json",
     "useTsNode": true
   },
   "scripts": {
@@ -67,6 +67,7 @@
     "build:dev": "cross-env BUILD=development pnpm esbuild",
     "build:cf": "pnpm clean:node_modules && npx cross-env SKIP_PREINSTALL=1 npm install && pnpm build",
     "build:cf:dev": "pnpm clean:node_modules && npx cross-env SKIP_PREINSTALL=1 npm install && pnpm build:dev",
+    "build:entities": "tsc -p tsconfig-mikro-orm.json",
     "clean:dist": "npx rimraf dist",
     "clean:node_modules": "npx rimraf node_modules",
     "lint": "cross-env TIMING=1 eslint --cache src tests .eslintrc.cjs bundle.js mikro-orm.config-template.ts",
     "mongodb": "^6.3.0",
     "poolifier": "^3.1.18",
     "tar": "^6.2.0",
-    "tslib": "^2.6.2",
     "winston": "^3.11.0",
     "winston-daily-rotate-file": "^4.7.1",
     "ws": "^8.16.0"
index c02ce18b5066effb2107329d8f89ccea08802fc2..ea0520a39f5e5f8bc0297ba1c067e0c17201e698 100644 (file)
@@ -62,9 +62,6 @@ dependencies:
   tar:
     specifier: ^6.2.0
     version: 6.2.0
-  tslib:
-    specifier: ^2.6.2
-    version: 2.6.2
   winston:
     specifier: ^3.11.0
     version: 3.11.0
@@ -9130,6 +9127,7 @@ packages:
 
   /tslib@2.6.2:
     resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
+    dev: true
 
   /tsx@4.7.0:
     resolution: {integrity: sha512-I+t79RYPlEYlHn9a+KzwrvEwhJg35h/1zHsLC2JXvhC2mdynMv6Zxzvhv5EMV6VF5qJlLlkSnMVvdZV3PSIGcg==}
diff --git a/tsconfig-mikro-orm.json b/tsconfig-mikro-orm.json
new file mode 100644 (file)
index 0000000..1d40e6e
--- /dev/null
@@ -0,0 +1,10 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "rootDir": "./src/types/orm/entities",
+    "outDir": "./dist/types/orm/entities",
+    "sourceMap": true,
+    "esModuleInterop": true
+  },
+  "include": ["src/types/orm/entities/*.ts"]
+}
diff --git a/tsconfig-orm.json b/tsconfig-orm.json
deleted file mode 100644 (file)
index 5635d6c..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-{
-  "extends": "./tsconfig.json",
-  "compilerOptions": {
-    "sourceMap": true
-  }
-}
index a72199292466d734e981e836edd7c930a8fc2c94..0107ea53c898860570280bde6ad65d6e572ddd76 100644 (file)
@@ -5,7 +5,6 @@
     "module": "NodeNext",
     "lib": ["es2022"],
     "removeComments": true,
-    "importHelpers": true,
 
     "strict": true,