Browse Source

Fix import, configs

Rares Capilnar 2 years ago
parent
commit
335f2dcc7d
3 changed files with 10 additions and 13 deletions
  1. 3 2
      package.json
  2. 1 1
      src/api/routes/admin/onboarding/update-status.ts
  3. 6 10
      tsconfig.json

+ 3 - 2
package.json

@@ -14,14 +14,15 @@
   ],
   ],
   "scripts": {
   "scripts": {
     "clean": "cross-env ./node_modules/.bin/rimraf dist",
     "clean": "cross-env ./node_modules/.bin/rimraf dist",
-    "build": "cross-env npm run clean && tsc -p tsconfig.json",
+    "build": "cross-env npm run clean && tsc -p tsconfig.json && npm run build:extensions && npm run build:admin",
     "watch": "cross-env tsc --watch",
     "watch": "cross-env tsc --watch",
     "test": "cross-env jest",
     "test": "cross-env jest",
     "seed": "cross-env medusa seed -f ./data/seed.json",
     "seed": "cross-env medusa seed -f ./data/seed.json",
     "start": "cross-env npm run build && medusa start",
     "start": "cross-env npm run build && medusa start",
     "start:custom": "cross-env npm run build && node --preserve-symlinks index.js",
     "start:custom": "cross-env npm run build && node --preserve-symlinks index.js",
     "dev": "cross-env npm run build && medusa develop",
     "dev": "cross-env npm run build && medusa develop",
-    "build:admin": "cross-env medusa-admin build"
+    "build:admin": "cross-env medusa-admin build",
+    "build:extensions": "medusa-admin-sdk build"
   },
   },
   "dependencies": {
   "dependencies": {
     "@babel/preset-typescript": "7.21.4",
     "@babel/preset-typescript": "7.21.4",

+ 1 - 1
src/api/routes/admin/onboarding/update-status.ts

@@ -1,6 +1,6 @@
 import { Request, Response } from "express";
 import { Request, Response } from "express";
 import { EntityManager } from "typeorm";
 import { EntityManager } from "typeorm";
-import OnboardingService from "src/services/onboarding";
+import OnboardingService from "../../../../services/onboarding";
 
 
 export default async function updateOnboardingStatus(
 export default async function updateOnboardingStatus(
   req: Request,
   req: Request,

+ 6 - 10
tsconfig.json

@@ -1,7 +1,6 @@
 {
 {
   "compilerOptions": {
   "compilerOptions": {
-    "lib": ["es5", "es6"],
-    "target": "esnext",
+    "target": "es2019",
     "allowJs": true,
     "allowJs": true,
     "esModuleInterop": true,
     "esModuleInterop": true,
     "module": "commonjs",
     "module": "commonjs",
@@ -10,16 +9,13 @@
     "experimentalDecorators": true,
     "experimentalDecorators": true,
     "skipLibCheck": true,
     "skipLibCheck": true,
     "skipDefaultLibCheck": true,
     "skipDefaultLibCheck": true,
-    "declaration": false,
+    "declaration": true,
     "sourceMap": false,
     "sourceMap": false,
     "outDir": "./dist",
     "outDir": "./dist",
-    "rootDir": "src",
-    "baseUrl": "src"
+    "rootDir": "./src",
+    "baseUrl": ".",
+    "jsx": "react"
   },
   },
   "include": ["src"],
   "include": ["src"],
-  "exclude": [
-    "**/__tests__",
-    "**/__fixtures__",
-    "node_modules"
-  ]
+  "exclude": ["**/__tests__", "**/__fixtures__", "node_modules"]
 }
 }