@medusajs/store 3.0.0-snapshot-20250410112222 → 3.0.0-snapshot-20251104011621
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/migrations/InitialSetup20240227075933.d.ts +1 -1
- package/dist/migrations/InitialSetup20240227075933.d.ts.map +1 -1
- package/dist/migrations/InitialSetup20240227075933.js +1 -1
- package/dist/migrations/InitialSetup20240227075933.js.map +1 -1
- package/dist/migrations/Migration20240621145944.d.ts +1 -1
- package/dist/migrations/Migration20240621145944.d.ts.map +1 -1
- package/dist/migrations/Migration20240621145944.js +1 -1
- package/dist/migrations/Migration20240621145944.js.map +1 -1
- package/dist/migrations/Migration20241206083313.d.ts +1 -1
- package/dist/migrations/Migration20241206083313.d.ts.map +1 -1
- package/dist/migrations/Migration20241206083313.js +1 -1
- package/dist/migrations/Migration20241206083313.js.map +1 -1
- package/dist/models/currency.d.ts +2 -2
- package/dist/models/store.d.ts +1 -1
- package/dist/services/store-module-service.d.ts +1 -0
- package/dist/services/store-module-service.d.ts.map +1 -1
- package/dist/services/store-module-service.js +18 -4
- package/dist/services/store-module-service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -28
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InitialSetup20240227075933.d.ts","sourceRoot":"","sources":["../../src/migrations/InitialSetup20240227075933.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"InitialSetup20240227075933.d.ts","sourceRoot":"","sources":["../../src/migrations/InitialSetup20240227075933.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAA;AAEpE,qBAAa,0BAA2B,SAAQ,SAAS;IACjD,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;CA8D1B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InitialSetup20240226130829 = void 0;
|
|
4
|
-
const migrations_1 = require("@mikro-orm/migrations");
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
5
|
class InitialSetup20240226130829 extends migrations_1.Migration {
|
|
6
6
|
async up() {
|
|
7
7
|
// TODO: The migration needs to take care of moving data before dropping columns, among other things
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InitialSetup20240227075933.js","sourceRoot":"","sources":["../../src/migrations/InitialSetup20240227075933.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"InitialSetup20240227075933.js","sourceRoot":"","sources":["../../src/migrations/InitialSetup20240227075933.ts"],"names":[],"mappings":";;;AAAA,yEAAoE;AAEpE,MAAa,0BAA2B,SAAQ,sBAAS;IACvD,KAAK,CAAC,EAAE;QACN,oGAAoG;QACpG,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,OAAO,CACpC,gGAAgG,CACjG,CAAA;QAED,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,IAAI,CAAC,MAAM,CAAC,kDAAkD,CAAC,CAAA;YAC/D,IAAI,CAAC,MAAM,CAAC,oDAAoD,CAAC,CAAA;YACjE,IAAI,CAAC,MAAM,CACT,qEAAqE,CACtE,CAAA;YACD,IAAI,CAAC,MAAM,CACT,qEAAqE,CACtE,CAAA;YACD,IAAI,CAAC,MAAM,CACT,yEAAyE,CAC1E,CAAA;YACD,IAAI,CAAC,MAAM,CACT,wEAAwE,CACzE,CAAA;YACD,IAAI,CAAC,MAAM,CACT,mEAAmE,CACpE,CAAA;YAED,IAAI,CAAC,MAAM,CACT,+DAA+D,CAChE,CAAA;YACD,IAAI,CAAC,MAAM,CACT,+DAA+D,CAChE,CAAA;YACD,IAAI,CAAC,MAAM,CACT,2FAA2F,CAC5F,CAAA;YAED,IAAI,CAAC,MAAM,CACT,yGAAyG,CAC1G,CAAA;YAED,IAAI,CAAC,MAAM,CACT,iFAAiF,CAClF,CAAA;YACD,IAAI,CAAC,MAAM,CACT,iFAAiF,CAClF,CAAA;YAED,0EAA0E;YAC1E,uEAAuE;YACvE,0EAA0E;YAC1E,yEAAyE;QAC3E,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,MAAM,CAAC;;;;mDAIiC,CAAC,CAAA;YAE9C,IAAI,CAAC,MAAM,CACT,yGAAyG,CAC1G,CAAA;QACH,CAAC;IACH,CAAC;CACF;AA/DD,gEA+DC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migration20240621145944.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20240621145944.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Migration20240621145944.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20240621145944.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAA;AAEpE,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;CAiB1B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Migration20240621145944 = void 0;
|
|
4
|
-
const migrations_1 = require("@mikro-orm/migrations");
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
5
|
class Migration20240621145944 extends migrations_1.Migration {
|
|
6
6
|
async up() {
|
|
7
7
|
this.addSql('create table if not exists "store_currency" ("id" text not null, "currency_code" text not null, "is_default" boolean not null default false, "store_id" text null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "store_currency_pkey" primary key ("id"));');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migration20240621145944.js","sourceRoot":"","sources":["../../src/migrations/Migration20240621145944.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"Migration20240621145944.js","sourceRoot":"","sources":["../../src/migrations/Migration20240621145944.ts"],"names":[],"mappings":";;;AAAA,yEAAoE;AAEpE,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,MAAM,CACT,2VAA2V,CAC5V,CAAA;QACD,IAAI,CAAC,MAAM,CACT,2HAA2H,CAC5H,CAAA;QACD,IAAI,CAAC,MAAM,CACT,iLAAiL,CAClL,CAAA;QACD,IAAI,CAAC,MAAM,CACT,iFAAiF,CAClF,CAAA;QACD,IAAI,CAAC,MAAM,CACT,8EAA8E,CAC/E,CAAA;IACH,CAAC;CACF;AAlBD,0DAkBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migration20241206083313.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20241206083313.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Migration20241206083313.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20241206083313.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAErE,qBAAa,uBAAwB,SAAQ,SAAS;IAE9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAInB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAI5B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Migration20241206083313 = void 0;
|
|
4
|
-
const migrations_1 = require("@mikro-orm/migrations");
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
5
|
class Migration20241206083313 extends migrations_1.Migration {
|
|
6
6
|
async up() {
|
|
7
7
|
this.addSql('CREATE INDEX IF NOT EXISTS "IDX_store_currency_store_id" ON "store_currency" (store_id) WHERE deleted_at IS NULL;');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migration20241206083313.js","sourceRoot":"","sources":["../../src/migrations/Migration20241206083313.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"Migration20241206083313.js","sourceRoot":"","sources":["../../src/migrations/Migration20241206083313.ts"],"names":[],"mappings":";;;AAAA,yEAAqE;AAErE,MAAa,uBAAwB,SAAQ,sBAAS;IAEpD,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,MAAM,CAAC,mHAAmH,CAAC,CAAC;IACnI,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAI,CAAC,MAAM,CAAC,qDAAqD,CAAC,CAAC;IACrE,CAAC;CAEF;AAVD,0DAUC"}
|
|
@@ -9,7 +9,7 @@ declare const StoreCurrency: import("@medusajs/framework/utils").DmlEntity<impor
|
|
|
9
9
|
default_region_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
10
10
|
default_location_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
11
11
|
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
12
|
-
supported_currencies: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder
|
|
12
|
+
supported_currencies: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "StoreCurrency">>;
|
|
13
13
|
}>, "Store">, import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
14
14
|
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
15
15
|
name: import("@medusajs/framework/utils").TextProperty;
|
|
@@ -17,7 +17,7 @@ declare const StoreCurrency: import("@medusajs/framework/utils").DmlEntity<impor
|
|
|
17
17
|
default_region_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
18
18
|
default_location_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
19
19
|
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
20
|
-
supported_currencies: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder
|
|
20
|
+
supported_currencies: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "StoreCurrency">>;
|
|
21
21
|
}>, "Store">, undefined>, true>;
|
|
22
22
|
}>, "StoreCurrency">;
|
|
23
23
|
export default StoreCurrency;
|
package/dist/models/store.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ declare const Store: import("@medusajs/framework/utils").DmlEntity<import("@medu
|
|
|
9
9
|
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
10
10
|
currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
11
11
|
is_default: import("@medusajs/framework/utils").BooleanProperty;
|
|
12
|
-
store: import("@medusajs/framework/utils").RelationNullableModifier<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder
|
|
12
|
+
store: import("@medusajs/framework/utils").RelationNullableModifier<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "Store">, import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "Store">, undefined>, true>;
|
|
13
13
|
}>, "StoreCurrency">>;
|
|
14
14
|
}>, "Store">;
|
|
15
15
|
export default Store;
|
|
@@ -23,6 +23,7 @@ export default class StoreModuleService extends StoreModuleService_base implemen
|
|
|
23
23
|
create_(data: StoreTypes.CreateStoreDTO[], sharedContext?: Context): Promise<InferEntityType<typeof Store>[]>;
|
|
24
24
|
upsertStores(data: StoreTypes.UpsertStoreDTO[], sharedContext?: Context): Promise<StoreTypes.StoreDTO[]>;
|
|
25
25
|
upsertStores(data: StoreTypes.UpsertStoreDTO, sharedContext?: Context): Promise<StoreTypes.StoreDTO>;
|
|
26
|
+
protected upsertStores_(data: StoreTypes.UpsertStoreDTO | StoreTypes.UpsertStoreDTO[], sharedContext?: Context): Promise<InferEntityType<typeof Store>[]>;
|
|
26
27
|
updateStores(id: string, data: StoreTypes.UpdateStoreDTO, sharedContext?: Context): Promise<StoreTypes.StoreDTO>;
|
|
27
28
|
updateStores(selector: StoreTypes.FilterableStoreProps, data: StoreTypes.UpdateStoreDTO, sharedContext?: Context): Promise<StoreTypes.StoreDTO[]>;
|
|
28
29
|
protected update_(data: UpdateStoreInput[], sharedContext?: Context): Promise<InferEntityType<typeof Store>[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-module-service.d.ts","sourceRoot":"","sources":["../../src/services/store-module-service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,GAAG,EACH,eAAe,EACf,yBAAyB,EACzB,mBAAmB,EACnB,eAAe,EACf,UAAU,EACX,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"store-module-service.d.ts","sourceRoot":"","sources":["../../src/services/store-module-service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,GAAG,EACH,eAAe,EACf,yBAAyB,EACzB,mBAAmB,EACnB,eAAe,EACf,UAAU,EACX,MAAM,2BAA2B,CAAA;AAclC,OAAO,EAAE,KAAK,EA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Q,EAAE,CAAC;IAC3B,YAAY,CAChB,IAAI,EAAE,UAAU,CAAC,cAAc,EAC/B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC;cAgBf,aAAa,CAC3B,IAAI,EAAE,UAAU,CAAC,cAAc,GAAG,UAAU,CAAC,cAAc,EAAE,EAC5C,aAAa,GAAE,OAAY,GAC3C,OAAO,CAAC,eAAe,CAAC,OAAO,KAAK,CAAC,EAAE,CAAC;IAwBrC,YAAY,CAChB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,UAAU,CAAC,cAAc,EAC/B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC;IAEzB,YAAY,CAChB,QAAQ,EAAE,UAAU,CAAC,oBAAoB,EACzC,IAAI,EAAE,UAAU,CAAC,cAAc,EAC/B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;cAoCjB,OAAO,CACrB,IAAI,EAAE,gBAAgB,EAAE,EACP,aAAa,GAAE,OAAY,GAC3C,OAAO,CAAC,eAAe,CAAC,OAAO,KAAK,CAAC,EAAE,CAAC;IAa3C,OAAO,CAAC,MAAM,CAAC,cAAc;IAe7B,OAAO,CAAC,MAAM,CAAC,qBAAqB;IAuCpC,OAAO,CAAC,MAAM,CAAC,qBAAqB;CAGrC"}
|
|
@@ -35,6 +35,10 @@ class StoreModuleService extends (0, utils_1.MedusaService)({ Store: _models_1.S
|
|
|
35
35
|
return (await this.storeService_.upsertWithReplace(normalizedInput, { relations: ["supported_currencies"] }, sharedContext)).entities;
|
|
36
36
|
}
|
|
37
37
|
async upsertStores(data, sharedContext = {}) {
|
|
38
|
+
const result = await this.upsertStores_(data, sharedContext);
|
|
39
|
+
return await this.baseRepository_.serialize(Array.isArray(data) ? result : result[0]);
|
|
40
|
+
}
|
|
41
|
+
async upsertStores_(data, sharedContext = {}) {
|
|
38
42
|
const input = Array.isArray(data) ? data : [data];
|
|
39
43
|
const forUpdate = input.filter((store) => !!store.id);
|
|
40
44
|
const forCreate = input.filter((store) => !store.id);
|
|
@@ -46,7 +50,7 @@ class StoreModuleService extends (0, utils_1.MedusaService)({ Store: _models_1.S
|
|
|
46
50
|
operations.push(this.update_(forUpdate, sharedContext));
|
|
47
51
|
}
|
|
48
52
|
const result = (await (0, utils_1.promiseAll)(operations)).flat();
|
|
49
|
-
return
|
|
53
|
+
return result;
|
|
50
54
|
}
|
|
51
55
|
// @ts-expect-error
|
|
52
56
|
async updateStores(idOrSelector, data, sharedContext = {}) {
|
|
@@ -108,7 +112,8 @@ class StoreModuleService extends (0, utils_1.MedusaService)({ Store: _models_1.S
|
|
|
108
112
|
}
|
|
109
113
|
exports.default = StoreModuleService;
|
|
110
114
|
__decorate([
|
|
111
|
-
(0, utils_1.InjectManager)()
|
|
115
|
+
(0, utils_1.InjectManager)(),
|
|
116
|
+
(0, utils_1.EmitEvents)()
|
|
112
117
|
// @ts-expect-error
|
|
113
118
|
,
|
|
114
119
|
__param(1, (0, utils_1.MedusaContext)()),
|
|
@@ -124,14 +129,23 @@ __decorate([
|
|
|
124
129
|
__metadata("design:returntype", Promise)
|
|
125
130
|
], StoreModuleService.prototype, "create_", null);
|
|
126
131
|
__decorate([
|
|
127
|
-
(0, utils_1.
|
|
132
|
+
(0, utils_1.InjectManager)(),
|
|
133
|
+
(0, utils_1.EmitEvents)(),
|
|
128
134
|
__param(1, (0, utils_1.MedusaContext)()),
|
|
129
135
|
__metadata("design:type", Function),
|
|
130
136
|
__metadata("design:paramtypes", [Object, Object]),
|
|
131
137
|
__metadata("design:returntype", Promise)
|
|
132
138
|
], StoreModuleService.prototype, "upsertStores", null);
|
|
133
139
|
__decorate([
|
|
134
|
-
(0, utils_1.
|
|
140
|
+
(0, utils_1.InjectTransactionManager)(),
|
|
141
|
+
__param(1, (0, utils_1.MedusaContext)()),
|
|
142
|
+
__metadata("design:type", Function),
|
|
143
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
144
|
+
__metadata("design:returntype", Promise)
|
|
145
|
+
], StoreModuleService.prototype, "upsertStores_", null);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, utils_1.InjectManager)(),
|
|
148
|
+
(0, utils_1.EmitEvents)()
|
|
135
149
|
// @ts-expect-error
|
|
136
150
|
,
|
|
137
151
|
__param(2, (0, utils_1.MedusaContext)()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-module-service.js","sourceRoot":"","sources":["../../src/services/store-module-service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qDAQkC;AAClC,
|
|
1
|
+
{"version":3,"file":"store-module-service.js","sourceRoot":"","sources":["../../src/services/store-module-service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qDAQkC;AAClC,qDAWkC;AAElC,qCAA8C;AAQ9C,MAAqB,kBACnB,SAAQ,IAAA,qBAAa,EAGlB,EAAE,KAAK,EAAL,eAAK,EAAE,aAAa,EAAb,uBAAa,EAAE,CAAC;IAQ5B,YACE,EAAE,cAAc,EAAE,YAAY,EAAwB,EACnC,iBAA4C;QAE/D,aAAa;QACb,KAAK,CAAC,GAAG,SAAS,CAAC,CAAA;QAHA,sBAAiB,GAAjB,iBAAiB,CAA2B;QAI/D,IAAI,CAAC,eAAe,GAAG,cAAc,CAAA;QACrC,IAAI,CAAC,aAAa,GAAG,YAAY,CAAA;IACnC,CAAC;IAgBK,AADN,mBAAmB;IACnB,KAAK,CAAC,YAAY,CAChB,IAA6D,EAC5C,gBAAyB,EAAE;QAE5C,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;QAEjD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,aAAa,CAAC,CAAA;QAEvD,OAAO,MAAM,IAAI,CAAC,eA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ACf,IAAA,kBAAU,GAAE;IACb,mBAAmB;;IAIhB,WAAA,IAAA,qBAAa,GAAE,CAAA;;;;sDAyBjB;AAGe;IADf,IAAA,gCAAwB,GAAE;IAGxB,WAAA,IAAA,qBAAa,GAAE,CAAA;;;;iDAYjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/index.ts","../src/migrations/InitialSetup20240227075933.ts","../src/migrations/Migration20240621145944.ts","../src/migrations/Migration20241206083313.ts","../src/models/currency.ts","../src/models/index.ts","../src/models/store.ts","../src/services/index.ts","../src/services/store-module-service.ts","../src/services/__tests__/noop.ts","../src/types/index.ts"],"version":"5.
|
|
1
|
+
{"root":["../src/index.ts","../src/migrations/InitialSetup20240227075933.ts","../src/migrations/Migration20240621145944.ts","../src/migrations/Migration20241206083313.ts","../src/models/currency.ts","../src/models/index.ts","../src/models/store.ts","../src/services/index.ts","../src/services/store-module-service.ts","../src/services/__tests__/noop.ts","../src/types/index.ts"],"version":"5.9.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/store",
|
|
3
|
-
"version": "3.0.0-snapshot-
|
|
3
|
+
"version": "3.0.0-snapshot-20251104011621",
|
|
4
4
|
"description": "Medusa Store module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -24,36 +24,22 @@
|
|
|
24
24
|
"author": "Medusa",
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"scripts": {
|
|
27
|
-
"watch": "tsc --build --watch",
|
|
28
|
-
"watch:test": "tsc --build tsconfig.spec.json --watch",
|
|
29
|
-
"resolve:aliases": "tsc --showConfig -p tsconfig.json > tsconfig.resolved.json && tsc-alias -p tsconfig.resolved.json && rimraf tsconfig.resolved.json",
|
|
30
|
-
"build": "rimraf dist && tsc --build && npm run resolve:aliases",
|
|
31
|
-
"test": "jest --
|
|
32
|
-
"test:integration": "jest --forceExit --
|
|
33
|
-
"migration:initial": "
|
|
34
|
-
"migration:create": "
|
|
35
|
-
"migration:up": "
|
|
36
|
-
"orm:cache:clear": "
|
|
27
|
+
"watch": "yarn run -T tsc --build --watch",
|
|
28
|
+
"watch:test": "yarn run -T tsc --build tsconfig.spec.json --watch",
|
|
29
|
+
"resolve:aliases": "yarn run -T tsc --showConfig -p tsconfig.json > tsconfig.resolved.json && yarn run -T tsc-alias -p tsconfig.resolved.json && yarn run -T rimraf tsconfig.resolved.json",
|
|
30
|
+
"build": "yarn run -T rimraf dist && yarn run -T tsc --build && npm run resolve:aliases",
|
|
31
|
+
"test": "../../../node_modules/.bin/jest --bail --forceExit --testPathPattern=src",
|
|
32
|
+
"test:integration": "../../../node_modules/.bin/jest --passWithNoTests --forceExit --testPathPattern=\"integration-tests/__tests__/.*\\.ts\"",
|
|
33
|
+
"migration:initial": "MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts MIKRO_ORM_ALLOW_GLOBAL_CLI=true medusa-mikro-orm migration:create --initial",
|
|
34
|
+
"migration:create": "MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts MIKRO_ORM_ALLOW_GLOBAL_CLI=true medusa-mikro-orm migration:create",
|
|
35
|
+
"migration:up": "MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts MIKRO_ORM_ALLOW_GLOBAL_CLI=true medusa-mikro-orm migration:up",
|
|
36
|
+
"orm:cache:clear": "MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts MIKRO_ORM_ALLOW_GLOBAL_CLI=true medusa-mikro-orm cache:clear"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@medusajs/framework": "3.0.0-snapshot-
|
|
40
|
-
"@medusajs/test-utils": "3.0.0-snapshot-
|
|
41
|
-
"@mikro-orm/cli": "6.4.3",
|
|
42
|
-
"@mikro-orm/core": "6.4.3",
|
|
43
|
-
"@mikro-orm/migrations": "6.4.3",
|
|
44
|
-
"@mikro-orm/postgresql": "6.4.3",
|
|
45
|
-
"@swc/core": "^1.7.28",
|
|
46
|
-
"@swc/jest": "^0.2.36",
|
|
47
|
-
"jest": "^29.7.0",
|
|
48
|
-
"rimraf": "^3.0.2",
|
|
49
|
-
"tsc-alias": "^1.8.6",
|
|
50
|
-
"typescript": "^5.6.2"
|
|
39
|
+
"@medusajs/framework": "3.0.0-snapshot-20251104011621",
|
|
40
|
+
"@medusajs/test-utils": "3.0.0-snapshot-20251104011621"
|
|
51
41
|
},
|
|
52
42
|
"peerDependencies": {
|
|
53
|
-
"@medusajs/framework": "3.0.0-snapshot-
|
|
54
|
-
"@mikro-orm/core": "6.4.3",
|
|
55
|
-
"@mikro-orm/migrations": "6.4.3",
|
|
56
|
-
"@mikro-orm/postgresql": "6.4.3",
|
|
57
|
-
"awilix": "^8.0.1"
|
|
43
|
+
"@medusajs/framework": "3.0.0-snapshot-20251104011621"
|
|
58
44
|
}
|
|
59
45
|
}
|