@medusajs/framework 1.0.0-rc-20241001083650 → 1.0.0-rc-20241003153304
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/config/types.d.ts +1 -1
- package/dist/container.d.ts +2 -8
- package/dist/container.d.ts.map +1 -1
- package/dist/container.js.map +1 -1
- package/dist/http/index.d.ts +7 -0
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +7 -0
- package/dist/http/index.js.map +1 -1
- package/dist/http/middlewares/apply-default-filters.d.ts +3 -0
- package/dist/http/middlewares/apply-default-filters.d.ts.map +1 -0
- package/dist/http/middlewares/apply-default-filters.js +32 -0
- package/dist/http/middlewares/apply-default-filters.js.map +1 -0
- package/dist/http/middlewares/apply-params-as-filters.d.ts +5 -0
- package/dist/http/middlewares/apply-params-as-filters.d.ts.map +1 -0
- package/dist/http/middlewares/apply-params-as-filters.js +14 -0
- package/dist/http/middlewares/apply-params-as-filters.js.map +1 -0
- package/dist/http/middlewares/clear-filters-by-key.d.ts +3 -0
- package/dist/http/middlewares/clear-filters-by-key.d.ts.map +1 -0
- package/dist/http/middlewares/clear-filters-by-key.js +12 -0
- package/dist/http/middlewares/clear-filters-by-key.js.map +1 -0
- package/dist/http/middlewares/ensure-publishable-api-key.d.ts +3 -0
- package/dist/http/middlewares/ensure-publishable-api-key.d.ts.map +1 -0
- package/dist/http/middlewares/ensure-publishable-api-key.js +49 -0
- package/dist/http/middlewares/ensure-publishable-api-key.js.map +1 -0
- package/dist/http/middlewares/error-handler.d.ts.map +1 -1
- package/dist/http/middlewares/error-handler.js.map +1 -1
- package/dist/http/middlewares/index.d.ts +4 -0
- package/dist/http/middlewares/index.d.ts.map +1 -1
- package/dist/http/middlewares/index.js +4 -0
- package/dist/http/middlewares/index.js.map +1 -1
- package/dist/http/middlewares/set-context.d.ts +3 -0
- package/dist/http/middlewares/set-context.d.ts.map +1 -0
- package/dist/http/middlewares/set-context.js +18 -0
- package/dist/http/middlewares/set-context.js.map +1 -0
- package/dist/http/router.d.ts +4 -0
- package/dist/http/router.d.ts.map +1 -1
- package/dist/http/router.js +14 -0
- package/dist/http/router.js.map +1 -1
- package/dist/http/types.d.ts +1 -10
- package/dist/http/types.d.ts.map +1 -1
- package/dist/http/types.js.map +1 -1
- package/dist/http/utils/get-query-config.d.ts +38 -0
- package/dist/http/utils/get-query-config.d.ts.map +1 -0
- package/dist/http/utils/get-query-config.js +163 -0
- package/dist/http/utils/get-query-config.js.map +1 -0
- package/dist/http/utils/http-compression.d.ts +5 -0
- package/dist/http/utils/http-compression.d.ts.map +1 -0
- package/dist/http/utils/http-compression.js +33 -0
- package/dist/http/utils/http-compression.js.map +1 -0
- package/dist/http/utils/maybe-apply-link-filter.d.ts +8 -0
- package/dist/http/utils/maybe-apply-link-filter.d.ts.map +1 -0
- package/dist/http/utils/maybe-apply-link-filter.js +71 -0
- package/dist/http/utils/maybe-apply-link-filter.js.map +1 -0
- package/dist/http/utils/refetch-entities.d.ts +5 -0
- package/dist/http/utils/refetch-entities.d.ts.map +1 -0
- package/dist/http/utils/refetch-entities.js +29 -0
- package/dist/http/utils/refetch-entities.js.map +1 -0
- package/dist/http/utils/unless-path.d.ts +9 -0
- package/dist/http/utils/unless-path.d.ts.map +1 -0
- package/dist/http/utils/unless-path.js +19 -0
- package/dist/http/utils/unless-path.js.map +1 -0
- package/dist/http/utils/validate-body.d.ts +5 -0
- package/dist/http/utils/validate-body.d.ts.map +1 -0
- package/dist/http/utils/validate-body.js +23 -0
- package/dist/http/utils/validate-body.js.map +1 -0
- package/dist/http/utils/validate-query.d.ts +6 -0
- package/dist/http/utils/validate-query.d.ts.map +1 -0
- package/dist/http/utils/validate-query.js +69 -0
- package/dist/http/utils/validate-query.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/jobs/index.d.ts +1 -1
- package/dist/medusa-app-loader.d.ts +3 -2
- package/dist/medusa-app-loader.d.ts.map +1 -1
- package/dist/medusa-app-loader.js.map +1 -1
- package/dist/mikro-orm-cli/bin.d.ts +14 -0
- package/dist/mikro-orm-cli/bin.d.ts.map +1 -0
- package/dist/mikro-orm-cli/bin.js +54 -0
- package/dist/mikro-orm-cli/bin.js.map +1 -0
- package/dist/zod/index.d.ts +2 -0
- package/dist/zod/index.d.ts.map +1 -0
- package/dist/zod/index.js +18 -0
- package/dist/zod/index.js.map +1 -0
- package/dist/zod/zod-helpers.d.ts +3 -0
- package/dist/zod/zod-helpers.d.ts.map +1 -0
- package/dist/zod/zod-helpers.js +95 -0
- package/dist/zod/zod-helpers.js.map +1 -0
- package/package.json +19 -10
- package/dist/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,14 @@
|
|
1
|
+
/**
|
2
|
+
* Custom wrapper on top of MikroORM CLI to override the issue
|
3
|
+
* they have when importing TypeScript files.
|
4
|
+
*
|
5
|
+
* They have hardcoded the module system of TypeScript to CommonJS
|
6
|
+
* and that makes it impossible to use any other module system
|
7
|
+
* like Node16 or NodeNext and so on.
|
8
|
+
*
|
9
|
+
* With this wrapper, we monkey patch the code responsible for register
|
10
|
+
* ts-node and then boot their CLI. Since, the code footprint is
|
11
|
+
* small, we should be okay with managing this wrapper.
|
12
|
+
*/
|
13
|
+
export {};
|
14
|
+
//# sourceMappingURL=bin.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../src/mikro-orm-cli/bin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* Custom wrapper on top of MikroORM CLI to override the issue
|
4
|
+
* they have when importing TypeScript files.
|
5
|
+
*
|
6
|
+
* They have hardcoded the module system of TypeScript to CommonJS
|
7
|
+
* and that makes it impossible to use any other module system
|
8
|
+
* like Node16 or NodeNext and so on.
|
9
|
+
*
|
10
|
+
* With this wrapper, we monkey patch the code responsible for register
|
11
|
+
* ts-node and then boot their CLI. Since, the code footprint is
|
12
|
+
* small, we should be okay with managing this wrapper.
|
13
|
+
*/
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
const path_1 = require("path");
|
16
|
+
const core_1 = require("@mikro-orm/core");
|
17
|
+
const cli_1 = require("@mikro-orm/cli");
|
18
|
+
/**
|
19
|
+
* Monkey patching the TSNode registration of Mikro ORM to not use
|
20
|
+
* hardcoded module system with TypeScript.
|
21
|
+
*/
|
22
|
+
core_1.ConfigurationLoader.registerTsNode = async function (configPath = "tsconfig.json") {
|
23
|
+
const tsConfigPath = (0, path_1.isAbsolute)(configPath)
|
24
|
+
? configPath
|
25
|
+
: (0, path_1.join)(process.cwd(), configPath);
|
26
|
+
const tsNode = require(require.resolve("ts-node", { paths: [tsConfigPath] }));
|
27
|
+
if (!tsNode) {
|
28
|
+
return false;
|
29
|
+
}
|
30
|
+
const { options } = tsNode.register({
|
31
|
+
project: tsConfigPath,
|
32
|
+
transpileOnly: true,
|
33
|
+
}).config;
|
34
|
+
if (Object.entries(options?.paths ?? {}).length > 0) {
|
35
|
+
require("tsconfig-paths").register({
|
36
|
+
baseUrl: options.baseUrl ?? ".",
|
37
|
+
paths: options.paths,
|
38
|
+
});
|
39
|
+
}
|
40
|
+
return true;
|
41
|
+
};
|
42
|
+
require("@jercle/yargonaut")
|
43
|
+
.style("blue")
|
44
|
+
.style("yellow", "required")
|
45
|
+
.helpStyle("green")
|
46
|
+
.errorsStyle("red");
|
47
|
+
(async () => {
|
48
|
+
const argv = await cli_1.CLIConfigurator.configure();
|
49
|
+
const args = await argv.parse(process.argv.slice(2));
|
50
|
+
if (args._.length === 0) {
|
51
|
+
cli_1.CLIHelper.showHelp();
|
52
|
+
}
|
53
|
+
})();
|
54
|
+
//# sourceMappingURL=bin.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../../src/mikro-orm-cli/bin.ts"],"names":[],"mappings":";AAAA;;;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M,IAAI,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;IACpD,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,eAAS,CAAC,QAAQ,EAAE,CAAA;IACtB,CAAC;AACH,CAAC,CAAC,EAAE,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/zod/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./zod-helpers"), exports);
|
18
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/zod/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA6B"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"zod-helpers.d.ts","sourceRoot":"","sources":["../../src/zod/zod-helpers.ts"],"names":[],"mappings":"AACA,OAAO,EACL,CAAC,EAKF,MAAM,KAAK,CAAA;AAwGZ,wBAAsB,YAAY,CAAC,CAAC,EAClC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EACzD,IAAI,EAAE,CAAC,GACN,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAmBxB"}
|
@@ -0,0 +1,95 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.zodValidator = zodValidator;
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
5
|
+
const zod_1 = require("zod");
|
6
|
+
const formatPath = (issue) => {
|
7
|
+
return issue.path.join(", ");
|
8
|
+
};
|
9
|
+
const formatInvalidType = (issues) => {
|
10
|
+
const expected = issues
|
11
|
+
.map((i) => {
|
12
|
+
// Unforutnately the zod library doesn't distinguish between a wrong type and a required field, which we want to handle differently
|
13
|
+
if (i.code === "invalid_type" && i.message !== "Required") {
|
14
|
+
return i.expected;
|
15
|
+
}
|
16
|
+
return;
|
17
|
+
})
|
18
|
+
.filter(Boolean);
|
19
|
+
if (!expected.length) {
|
20
|
+
return;
|
21
|
+
}
|
22
|
+
const received = issues?.[0]?.received;
|
23
|
+
return `Expected type: '${expected.join(", ")}' for field '${formatPath(issues[0])}', got: '${received}'`;
|
24
|
+
};
|
25
|
+
const formatRequiredField = (issues) => {
|
26
|
+
const expected = issues
|
27
|
+
.map((i) => {
|
28
|
+
if (i.code === "invalid_type" && i.message === "Required") {
|
29
|
+
return i.expected;
|
30
|
+
}
|
31
|
+
return;
|
32
|
+
})
|
33
|
+
.filter(Boolean);
|
34
|
+
if (!expected.length) {
|
35
|
+
return;
|
36
|
+
}
|
37
|
+
return `Field '${formatPath(issues[0])}' is required`;
|
38
|
+
};
|
39
|
+
const formatUnionError = (issue) => {
|
40
|
+
const issues = issue.unionErrors.flatMap((e) => e.issues);
|
41
|
+
return (formatInvalidType(issues) || formatRequiredField(issues) || issue.message);
|
42
|
+
};
|
43
|
+
const formatError = (err) => {
|
44
|
+
const issueMessages = err.issues.slice(0, 3).map((issue) => {
|
45
|
+
switch (issue.code) {
|
46
|
+
case "invalid_type":
|
47
|
+
return (formatInvalidType([issue]) ||
|
48
|
+
formatRequiredField([issue]) ||
|
49
|
+
issue.message);
|
50
|
+
case "invalid_literal":
|
51
|
+
return `Expected literal: '${issue.expected}' for field '${formatPath(issue)}', but got: '${issue.received}'`;
|
52
|
+
case "invalid_union":
|
53
|
+
return formatUnionError(issue);
|
54
|
+
case "invalid_enum_value":
|
55
|
+
return `Expected: '${issue.options.join(", ")}' for field '${formatPath(issue)}', but got: '${issue.received}'`;
|
56
|
+
case "unrecognized_keys":
|
57
|
+
return `Unrecognized fields: '${issue.keys.join(", ")}'`;
|
58
|
+
case "invalid_arguments":
|
59
|
+
return `Invalid arguments for '${issue.path.join(", ")}'`;
|
60
|
+
case "too_small":
|
61
|
+
return `Value for field '${formatPath(issue)}' too small, expected at least: '${issue.minimum}'`;
|
62
|
+
case "too_big":
|
63
|
+
return `Value for field '${formatPath(issue)}' too big, expected at most: '${issue.maximum}'`;
|
64
|
+
case "not_multiple_of":
|
65
|
+
return `Value for field '${formatPath(issue)}' not multiple of: '${issue.multipleOf}'`;
|
66
|
+
case "not_finite":
|
67
|
+
return `Value for field '${formatPath(issue)}' not finite: '${issue.message}'`;
|
68
|
+
case "invalid_union_discriminator":
|
69
|
+
case "invalid_return_type":
|
70
|
+
case "invalid_date":
|
71
|
+
case "invalid_string":
|
72
|
+
case "invalid_intersection_types":
|
73
|
+
default:
|
74
|
+
return issue.message;
|
75
|
+
}
|
76
|
+
});
|
77
|
+
return issueMessages.join("; ");
|
78
|
+
};
|
79
|
+
async function zodValidator(zodSchema, body) {
|
80
|
+
let strictSchema = zodSchema;
|
81
|
+
// ZodEffects doesn't support setting as strict, for all other schemas we want to enforce strictness.
|
82
|
+
if ("strict" in zodSchema) {
|
83
|
+
strictSchema = zodSchema.strict();
|
84
|
+
}
|
85
|
+
try {
|
86
|
+
return await strictSchema.parseAsync(body);
|
87
|
+
}
|
88
|
+
catch (err) {
|
89
|
+
if (err instanceof zod_1.ZodError) {
|
90
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, `Invalid request: ${formatError(err)}`);
|
91
|
+
}
|
92
|
+
throw err;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
//# sourceMappingURL=zod-helpers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"zod-helpers.js","sourceRoot":"","sources":["../../src/zod/zod-helpers.ts"],"names":[],"mappings":";;AA+GA,oCAsBC;AArID,qDAAuD;AACvD,6BAMY;AAEZ,MAAM,UAAU,GAAG,CAAC,KAAe,EAAE,EAAE;IACrC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC9B,CAAC,CAAA;AAED,MAAM,iBAAiB,GAAG,CAAC,MAAkB,EAAE,EAAE;IAC/C,MAAM,QAAQ,GAAG,MAAM;SACpB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACT,mIAAmI;QACnI,IAAI,CAAC,CAAC,IAAI,KAAK,cAAc,IAAI,CAAC,CAAC,OAAO,KAAK,UAAU,EAAE,CAAC;YAC1D,OAAO,CAAC,CAAC,QAAQ,CAAA;QACnB,CAAC;QACD,OAAM;IACR,CAAC,CAAC;SACD,MAAM,CAAC,OAAO,CAAC,CAAA;IAElB,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACrB,OAAM;IACR,CAAC;IAED,MAAM,QAAQ,GAAI,MAAM,EAAE,CAAC,CAAC,CAAyB,EAAE,QAAQ,CAAA;IAE/D,OAAO,mBAAmB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,UAAU,CACrE,MAAM,CAAC,CAAC,CAAC,CACV,Y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AU,YAAY,CAChC,SAAyD,EACzD,IAAO;IAEP,IAAI,YAAY,GAAG,SAAS,CAAA;IAC5B,qGAAqG;IACrG,IAAI,QAAQ,IAAI,SAAS,EAAE,CAAC;QAC1B,YAAY,GAAG,SAAS,CAAC,MAAM,EAAE,CAAA;IACnC,CAAC;IAED,IAAI,CAAC;QACH,OAAO,MAAM,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;IAC5C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,GAAG,YAAY,cAAQ,EAAE,CAAC;YAC5B,MAAM,IAAI,mBAAW,CACnB,mBAAW,CAAC,KAAK,CAAC,YAAY,EAC9B,oBAAoB,WAAW,CAAC,GAAG,CAAC,EAAE,CACvC,CAAA;QACH,CAAC;QAED,MAAM,GAAG,CAAA;IACX,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/framework",
|
3
|
-
"version": "1.0.0-rc-
|
3
|
+
"version": "1.0.0-rc-20241003153304",
|
4
4
|
"description": "Framework",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -10,6 +10,9 @@
|
|
10
10
|
"!dist/**/__mocks__",
|
11
11
|
"!dist/**/__fixtures__"
|
12
12
|
],
|
13
|
+
"bin": {
|
14
|
+
"medusa-mikro-orm": "./dist/mikro-orm-cli/bin.js"
|
15
|
+
},
|
13
16
|
"exports": {
|
14
17
|
".": "./dist/index.js",
|
15
18
|
"./config": "./dist/config/index.js",
|
@@ -49,14 +52,13 @@
|
|
49
52
|
"test": "jest --runInBand --bail --passWithNoTests --forceExit"
|
50
53
|
},
|
51
54
|
"devDependencies": {
|
52
|
-
"@medusajs/medusa-cli": "2.0.0-rc-
|
55
|
+
"@medusajs/medusa-cli": "2.0.0-rc-20241003153304",
|
53
56
|
"@mikro-orm/core": "5.9.7",
|
54
57
|
"@mikro-orm/knex": "5.9.7",
|
55
58
|
"@mikro-orm/migrations": "5.9.7",
|
56
59
|
"@mikro-orm/postgresql": "5.9.7",
|
57
60
|
"@swc/core": "^1.7.28",
|
58
61
|
"@swc/jest": "^0.2.36",
|
59
|
-
"@types/express": "^4.17.17",
|
60
62
|
"@types/jsonwebtoken": "^8.5.9",
|
61
63
|
"awilix": "^8.0.1",
|
62
64
|
"ioredis": "^5.4.1",
|
@@ -68,24 +70,28 @@
|
|
68
70
|
"vite": "^5.2.11"
|
69
71
|
},
|
70
72
|
"dependencies": {
|
71
|
-
"@
|
72
|
-
"@medusajs/
|
73
|
-
"@medusajs/
|
74
|
-
"@medusajs/
|
75
|
-
"@medusajs/
|
73
|
+
"@jercle/yargonaut": "^1.1.5",
|
74
|
+
"@medusajs/modules-sdk": "2.0.0-rc-20241003153304",
|
75
|
+
"@medusajs/orchestration": "1.0.0-rc-20241003153304",
|
76
|
+
"@medusajs/types": "2.0.0-rc-20241003153304",
|
77
|
+
"@medusajs/utils": "2.0.0-rc-20241003153304",
|
78
|
+
"@medusajs/workflows-sdk": "1.0.0-rc-20241003153304",
|
76
79
|
"@opentelemetry/api": "^1.9.0",
|
80
|
+
"@types/express": "^4.17.17",
|
77
81
|
"connect-redis": "5.2.0",
|
78
82
|
"cookie-parser": "^1.4.6",
|
79
83
|
"cors": "^2.8.5",
|
80
84
|
"express": "^4.21.0",
|
81
85
|
"express-session": "^1.17.3",
|
82
86
|
"jsonwebtoken": "^9.0.2",
|
83
|
-
"medusa-telemetry": "1.0.0-rc-
|
87
|
+
"medusa-telemetry": "1.0.0-rc-20241003153304",
|
84
88
|
"morgan": "^1.9.1",
|
89
|
+
"tsconfig-paths": "^4.2.0",
|
85
90
|
"zod": "3.22.4"
|
86
91
|
},
|
87
92
|
"peerDependencies": {
|
88
|
-
"@medusajs/medusa-cli": "2.0.0-rc-
|
93
|
+
"@medusajs/medusa-cli": "2.0.0-rc-20241003153304",
|
94
|
+
"@mikro-orm/cli": "5.9.7",
|
89
95
|
"@mikro-orm/core": "5.9.7",
|
90
96
|
"@mikro-orm/knex": "5.9.7",
|
91
97
|
"@mikro-orm/migrations": "5.9.7",
|
@@ -96,6 +102,9 @@
|
|
96
102
|
"vite": "^5.2.11"
|
97
103
|
},
|
98
104
|
"peerDependenciesMeta": {
|
105
|
+
"@mikro-orm/cli": {
|
106
|
+
"optional": true
|
107
|
+
},
|
99
108
|
"ioredis": {
|
100
109
|
"optional": true
|
101
110
|
},
|
@@ -1 +0,0 @@
|
|
1
|
-
{"root":["../src/container.ts","../src/index.ts","../src/medusa-app-loader.ts","../src/config/config.ts","../src/config/index.ts","../src/config/loader.ts","../src/config/types.ts","../src/config/__fixtures__/medusa-config-2.js","../src/config/__fixtures__/medusa-config.js","../src/config/__tests__/index.spec.ts","../src/database/index.ts","../src/database/pg-connection-loader.ts","../src/feature-flags/feature-flag-loader.ts","../src/feature-flags/flag-router.ts","../src/feature-flags/index.ts","../src/feature-flags/types.ts","../src/feature-flags/__tests__/feature-flags.spec.ts","../src/http/express-loader.ts","../src/http/index.ts","../src/http/router.ts","../src/http/types.ts","../src/http/__fixtures__/mocks/index.ts","../src/http/__fixtures__/routers/_private/route.ts","../src/http/__fixtures__/routers/admin/route.ts","../src/http/__fixtures__/routers/admin/orders/route.ts","../src/http/__fixtures__/routers/admin/orders/[id]/route.ts","../src/http/__fixtures__/routers/admin/products/route.ts","../src/http/__fixtures__/routers/admin/products/[id]/route.ts","../src/http/__fixtures__/routers/customers/route.ts","../src/http/__fixtures__/routers/customers/[customer_id]/orders/[order_id]/route.ts","../src/http/__fixtures__/routers-duplicate-parameter/admin/customers/[id]/orders/[id]/route.ts","../src/http/__fixtures__/routers-error-handler/middlewares.ts","../src/http/__fixtures__/routers-error-handler/store/route.ts","../src/http/__fixtures__/routers-middleware/middlewares.ts","../src/http/__fixtures__/routers-middleware/admin/protected/route.ts","../src/http/__fixtures__/routers-middleware/admin/unprotected/route.ts","../src/http/__fixtures__/routers-middleware/customers/route.ts","../src/http/__fixtures__/routers-middleware/customers/error/route.ts","../src/http/__fixtures__/routers-middleware/store/customers/me/protected/route.ts","../src/http/__fixtures__/routers-middleware/store/customers/me/unprotected/route.ts","../src/http/__fixtures__/routers-middleware/store/products/[id]/sync/route.ts","../src/http/__fixtures__/routers-middleware/webhooks/payment/route.ts","../src/http/__fixtures__/server/index.ts","../src/http/__tests__/index.spec.ts","../src/http/middlewares/authenticate-middleware.ts","../src/http/middlewares/error-handler.ts","../src/http/middlewares/exception-formatter.ts","../src/http/middlewares/index.ts","../src/http/utils/define-middlewares.ts","../src/jobs/index.ts","../src/jobs/job-loader.ts","../src/jobs/__fixtures__/mock-scheduler-storage.ts","../src/jobs/__fixtures__/plugin/jobs/order-summary.ts","../src/jobs/__tests__/register-jobs.spec.ts","../src/links/index.ts","../src/links/link-loader.ts","../src/links/__fixtures__/links/link.ts","../src/links/__fixtures__/links/sub-links/link.ts","../src/links/__tests__/index.spec.ts","../src/logger/index.ts","../src/modules-sdk/index.ts","../src/orchestration/index.ts","../src/subscribers/index.ts","../src/subscribers/subscriber-loader.ts","../src/subscribers/types.ts","../src/subscribers/__fixtures__/subscribers/order-notifier.ts","../src/subscribers/__fixtures__/subscribers/product-updater.ts","../src/subscribers/__fixtures__/subscribers/variant-created.ts","../src/subscribers/__mocks__/index.ts","../src/subscribers/__tests__/index.spec.ts","../src/telemetry/index.ts","../src/types/index.ts","../src/utils/index.ts","../src/workflows/index.ts","../src/workflows/workflow-loader.ts","../src/workflows/__fixtures__/workflows/order-notifier.ts","../src/workflows/__fixtures__/workflows/deep-workflows/product-updater.ts","../src/workflows/__tests__/index.spec.ts","../src/workflows-sdk/composer.ts","../src/workflows-sdk/index.ts"],"version":"5.6.2"}
|