FIXES: FRMW-2727 MikroORM (with version 5.9) has [hardcoded the TypeScript module](https://github.com/mikro-orm/mikro-orm/blob/5.x/packages/core/src/utils/ConfigurationLoader.ts#L138-L139) system to `commonjs`, which makes it incompatible with the module system we are using, ie `Node16`. So, in order to continue using the Mikro ORM CLI within our modules, we will have to monkey-patch the block of code responsible for configuring `ts-node`. However, the monkey-patching must be done before their CLI gets booted. As a result of this, we have to create a wrapper CLI on top of Mikro ORM CLI that performs the following steps. - Monkey-patch the relevant code - Register Mikro ORM CLI as the second step. Due do this, we will have to use this new wrapper CLI within the modules, which is exposed as `medusa-db`. Maybe, `medusa-db` is not a great name, so please send your suggestions.
58 lines
2.0 KiB
JSON
58 lines
2.0 KiB
JSON
{
|
|
"name": "@medusajs/file",
|
|
"version": "0.0.1",
|
|
"description": "Medusa File module",
|
|
"main": "dist/index.js",
|
|
"types": "dist/index.d.ts",
|
|
"files": [
|
|
"dist",
|
|
"!dist/**/__tests__",
|
|
"!dist/**/__mocks__",
|
|
"!dist/**/__fixtures__"
|
|
],
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/medusajs/medusa",
|
|
"directory": "packages/file"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"author": "Medusa",
|
|
"license": "MIT",
|
|
"scripts": {
|
|
"watch": "tsc --build --watch",
|
|
"watch:test": "tsc --build tsconfig.spec.json --watch",
|
|
"resolve:aliases": "tsc --showConfig -p tsconfig.json > tsconfig.resolved.json && tsc-alias -p tsconfig.resolved.json && rimraf tsconfig.resolved.json",
|
|
"build": "rimraf dist && tsc --build && npm run resolve:aliases",
|
|
"test": "jest --passWithNoTests --runInBand --bail --forceExit -- src/**/__tests__/**/*.ts",
|
|
"test:integration": "jest --passWithNoTests --forceExit -- integration-tests/**/__tests__/**/*.ts",
|
|
"migration:generate": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts medusa-mikro-orm migration:generate",
|
|
"migration:initial": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts medusa-mikro-orm migration:create --initial",
|
|
"migration:create": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts medusa-mikro-orm migration:create",
|
|
"migration:up": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts medusa-mikro-orm migration:up",
|
|
"orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts medusa-mikro-orm cache:clear"
|
|
},
|
|
"devDependencies": {
|
|
"@medusajs/framework": "^0.0.1",
|
|
"@mikro-orm/cli": "5.9.7",
|
|
"@mikro-orm/core": "5.9.7",
|
|
"@mikro-orm/migrations": "5.9.7",
|
|
"@mikro-orm/postgresql": "5.9.7",
|
|
"@swc/core": "^1.7.28",
|
|
"@swc/jest": "^0.2.36",
|
|
"jest": "^29.7.0",
|
|
"medusa-test-utils": "^1.1.43",
|
|
"rimraf": "^3.0.2",
|
|
"tsc-alias": "^1.8.6",
|
|
"typescript": "^5.6.2"
|
|
},
|
|
"peerDependencies": {
|
|
"@medusajs/framework": "^0.0.1",
|
|
"awilix": "^8.0.1"
|
|
}
|
|
}
|