github-actions[bot]
16851c557d
chore: Version Packages ( #6241 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-08 16:23:19 +01:00
Carlos R. L. Rodrigues
884428a1b5
feat: event aggregator ( #6218 )
...
What:
- Event Aggregator Util
- Preparation for normalizing event in a new format (backward compatible with the current format)
- GQL Schema to joiner config and some Entities configured
- Link modules emmiting events
2024-02-05 11:59:10 +00:00
Adrien de Peretti
946db51a9b
chore(): Add engines to all package.json if needed ( #5812 )
2023-12-07 17:03:50 +01:00
Adrien de Peretti
154c9b43bd
feat(medusa, modules-sdk, types, utils): Re work modules loading and remove legacy functions ( #5496 )
2023-11-02 17:59:13 +01:00
github-actions[bot]
309c82e175
chore: Version Packages ( #5454 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-01 08:19:58 +01:00
Adrien de Peretti
a45da9215d
fix(medusa, modules-sdk, modules): Module loading missing dependencies + remote query reference issue ( #5468 )
2023-10-26 20:24:38 +02:00
Carlos R. L. Rodrigues
4d16acf5f0
feat(link-modules,modules-sdk, utils, types, products) - Remote Link and Link modules ( #4695 )
...
What:
- Definition of all Modules links
- `link-modules` package to manage the creation of all pre-defined link or custom ones
```typescript
import { initialize as iniInventory } from "@medusajs/inventory";
import { initialize as iniProduct } from "@medusajs/product";
import {
initialize as iniLinks,
runMigrations as migrateLinks
} from "@medusajs/link-modules";
await Promise.all([iniInventory(), iniProduct()]);
await migrateLinks(); // create tables based on previous loaded modules
await iniLinks(); // load link based on previous loaded modules
await iniLinks(undefined, [
{
serviceName: "product_custom_translation_service_link",
isLink: true,
databaseConfig: {
tableName: "product_transalations",
},
alias: [
{
name: "translations",
},
],
primaryKeys: ["id", "product_id", "translation_id"],
relationships: [
{
serviceName: Modules.PRODUCT,
primaryKey: "id",
foreignKey: "product_id",
alias: "product",
},
{
serviceName: "custom_translation_service",
primaryKey: "id",
foreignKey: "translation_id",
alias: "transalation",
deleteCascade: true,
},
],
extends: [
{
serviceName: Modules.PRODUCT,
relationship: {
serviceName: "product_custom_translation_service_link",
primaryKey: "product_id",
foreignKey: "id",
alias: "translations",
isList: true,
},
},
{
serviceName: "custom_translation_service",
relationship: {
serviceName: "product_custom_translation_service_link",
primaryKey: "product_id",
foreignKey: "id",
alias: "product_link",
},
},
],
},
]); // custom links
```
Remote Link
```typescript
import { RemoteLink, Modules } from "@medusajs/modules-sdk";
// [...] initialize modules and links
const remoteLink = new RemoteLink();
// upsert the relationship
await remoteLink.create({ // one (object) or many (array)
[Modules.PRODUCT]: {
variant_id: "var_abc",
},
[Modules.INVENTORY]: {
inventory_item_id: "iitem_abc",
},
data: { // optional additional fields
required_quantity: 5
}
});
// dismiss (doesn't cascade)
await remoteLink.dismiss({ // one (object) or many (array)
[Modules.PRODUCT]: {
variant_id: "var_abc",
},
[Modules.INVENTORY]: {
inventory_item_id: "iitem_abc",
},
});
// delete
await remoteLink.delete({
// every key is a module
[Modules.PRODUCT]: {
// every key is a linkable field
variant_id: "var_abc", // single or multiple values
},
});
// restore
await remoteLink.restore({
// every key is a module
[Modules.PRODUCT]: {
// every key is a linkable field
variant_id: "var_abc", // single or multiple values
},
});
```
Co-authored-by: Riqwan Thamir <5105988+riqwan@users.noreply.github.com >
2023-08-30 14:31:32 +00:00
Oli Juhl
1d2637572b
chore: Remove rimraf from prepare ( #4741 )
2023-08-11 22:55:59 +02:00
Adrien de Peretti
58d4c230e2
chore: include rimraf as part of the build for most of the packages ( #4615 )
...
* chore: include rimraf as part of the build for most of the packages
* cleanup
* revert medusa interface
* missing script update
2023-07-31 09:23:27 +02:00
Carlos R. L. Rodrigues
5a8a889c6d
feat(modules-sdk): Remote Query ( #4463 )
...
* feat: Remote Query
2023-07-19 15:35:36 -03:00
github-actions[bot]
04917d0721
chore: Version Packages ( #4502 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-11 20:38:52 +02:00
Adrien de Peretti
6f1fa244fa
chore(medusa-cli): Cleanup plugin setup ( #4420 )
...
* chore(medusa-cli): Cleanup plugin setup
* fix: logger types
* fix event bus local
* fix event bus redis
* Create late-dragons-collect.md
* move to ts
* remove unused command
* env
* fix
2023-06-28 16:37:25 +02:00
github-actions[bot]
5d7877ded6
chore: Version Packages ( #4223 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-18 13:14:20 +02:00
Oliver Windall Juhl
9b42387fd3
chore: Add missing deps ( #4317 )
2023-06-15 18:27:31 +02:00
Oliver Windall Juhl
afd1b67f1c
chore: Clean up deps, devDeps, and peerDeps across all packages ( #4276 )
...
* chore: Use caret for all Medusa deps
* Create wild-balloons-push.md
* Address PR feedback
* force build order
* add missing dep
* add missing dev deps
* addresses last comments
2023-06-14 15:18:11 +02:00
github-actions[bot]
8f8f6332b7
chore: Version Packages ( #4114 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-30 12:11:45 +02:00
github-actions[bot]
0be70113f9
chore: Version Packages ( #4074 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-16 11:03:47 +02:00
github-actions[bot]
a8f43055db
chore: Version Packages ( #4020 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-09 15:49:04 +02:00
github-actions[bot]
6b2bcc1a36
chore: Version Packages ( #3942 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-04 10:51:13 +02:00
Adrien de Peretti
0e488e71b1
fix(medusa, types, utils, event-bus-local): Revert retrieveSubscribers ( #4002 )
...
* fix(medusa, event-bus-redis, event-bus-local): Revert retrieveSubscribers as the wildcard prevent us from filtering
* Create calm-eggs-collect.md
---------
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
2023-05-03 18:55:45 +02:00
github-actions[bot]
b41b6303cc
chore: Release ( #3856 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-04-26 19:09:01 +02:00
Adrien de Peretti
af710f1b48
fix(medusa): Bulk create variant + pass transaction to the inventory service context methods ( #3835 )
...
* fix(medusa): Bulk create variant and pass transaction where needed
* Create fair-penguins-stare.md
* fix unit tests
* event
* transaction orchestration
* revert options
* Prevent isolated module to use the given transaction if any in the exposed service
* Use enum
* remove changeset to re do it
* Create thick-ants-tickle.md
* update event bus local
* remove changeset to re do it
* Create thick-kings-wonder.md
* remove changeset to re do it
* Create slimy-bees-eat.md
* Update packages/utils/src/event-bus/index.ts
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
---------
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com >
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
2023-04-19 09:27:48 +02:00
github-actions[bot]
0f51e3a400
chore: Release ( #3818 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
2023-04-14 11:18:39 +02:00
github-actions[bot]
3efe13eefd
chore: Release ( #3782 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
2023-04-12 11:32:05 +02:00
olivermrbl
4c268238a4
Merge branch 'master' into develop
2023-04-05 09:18:48 +02:00
olivermrbl
66c59d54ff
chore(release): v1.8.0
2023-04-04 18:35:27 +02:00
Patrick
089f1eb19e
feat(tests): harmonize and clean-up yarn test commands convention ( #3695 )
...
## What
Harmonize and clean-up yarn test commands convention.
## Why
Current strategy to filter integration tests from unit tests was cumbersome to maintain. Also, some packages declared `test:unit` which ended up being an alias to `test`.
## How
* Remove all occurrences of `test:unit`
* Rename all `test` commands under `/integration-tests/**/package.json` to `test:integration`
* In the root `package.json`, rewrite `test:integration` command to run `turbo run test:integration`
* In the root `package.json`, remove filtering on the `test` command
* Introduce a new `test:integration` task in the Turborepo config.
2023-04-04 13:47:54 +00:00
olivermrbl
bb9df09e37
chore(release): v1.8.0-rc.6
2023-04-03 18:05:12 +02:00
Carlos R. L. Rodrigues
bd12a95083
chore: Initialize method for modules ( #3649 )
...
What:
- Export initialize methods for all modules to be used as a package.
- Export `runMigrations` and `revertMigration` on modules that DB migrations are available
```typescript
import {
initialize as initializeInventory,
InventoryServiceInitializeOptions,
runMigrations as runMigrationsInventory,
} from "@medusajs/inventory";
import { initialize as eventBusInitialize } from "@medusajs/event-bus-redis";
import { initialize as cacheInitialize } from "@medusajs/cache-redis";
const eventBus = await eventBusInitialize({
redisUrl: "localhost",
});
const cache = await cacheInitialize({
redisUrl: "localhost",
});
const options: InventoryServiceInitializeOptions = {
database: {
type: "postgres",
url: `postgres://postgres:@localhost/inventory`,
},
};
await runMigrationsInventory({
options,
});
const inventoryService = await initializeInventory(options, {
eventBusService: eventBus,
});
const sku = "sku_123"
const item = await service.createInventoryItem({
sku,
});
cache.set(sku, { item });
```
2023-03-31 12:09:04 +00:00
olivermrbl
15a43c1cc0
chore(release): v1.8.0-rc.3
2023-03-29 13:42:11 +02:00
olivermrbl
8ddb3952c0
chore(release): v1.8.0-rc.2
2023-03-28 21:04:57 +02:00
olivermrbl
990c79d2d5
chore(release): v1.8.0-rc.1
2023-03-28 19:32:36 +02:00
Adrien de Peretti
4a7bdc917a
fix(event-bus-local): Error handling ( #3575 )
...
**What**
The error handling was applied on the emit, which always succeed. On the other hand, the `on` which calls the handler, was not handling any errors and therefore crashed the server
2023-03-24 13:49:29 +00:00
olivermrbl
b57ea22461
chore: Enter pre-release mode and version packages
2023-03-24 10:16:11 +01:00
olivermrbl
3b917b469a
chore: Bump module versions
2023-03-24 10:00:28 +01:00
Carlos R. L. Rodrigues
4e9d257d3b
Chore(medusa,utils,types,inventory,stock-location): remove core dependency modules ( #3531 )
2023-03-23 08:07:32 -03:00
Oliver Windall Juhl
ef5ef9f5a2
feat(medusa,event-bus-local,event-bus-redis): Event Bus modules ( #2599 )
2023-03-22 10:26:21 +01:00