**Usage**
**Create a new feature flag**
```
$ medusa-dev ff create [name of flag] -d [description of what flag is for]
```
Will put a new file in `packages/medusa/src/loaders/feature-flags/[kebab-cased-flag-name].ts` and fill out the details.
**List feature flags**
```
$ medusa-dev ff list
```
Note: your Medusa repo must be built for the flags to show up
**Delete a feature flag**
```
$ medusa-dev ff delete [name of flag]
```
Will delete a file at `packages/medusa/src/loaders/feature-flags/[kebab-cased-flag-name].ts` if it exists.
**What**
- added `SalesChannel` entity
- added `SalesChannel` repository
- added `SalesChannel` relations to the order, cart and store entities
- added a migrations file
**How**
- introduced entities and relations under a new feature flag "sales-channels"
Fixes CORE-271
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>
* feat: add feature flag loading in projects
* fix: make feature flag consume itself
* fix: rename container registration to featureFlagRouter
* fix: refactor
* behavioral feature flags
* add environment to server
* limit "useTemplateDb" to non feature flagged migrations
* filter migrations and entities according to those which are enabled in the environment
* run only migrations that are enabled when running 'medusa migrations run'
* add logging to the featureflag loader
* initial implementation of featureFlagEntity
* column descriptors
* initial startServerWithEnv (to be refactored)
* update commands
* final touches
* update loaders to fix unit tests
* enable all batch job tests
* update seed method
* add api test capabilities
* revert batch job test
* revert formatting changes
* pr feedback
* pr feedback
* remove unused imports
* rename feature flag decorators
* pr feedback
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
* fix(medusa): Remove deps mongoose, mongodb and transaction service + base model
* chore: delete permissions+add-ons legacy plugins
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
**What**
Changes the order of object type evaluation to properly handle null properties.
Previously, `stringifyNullProperties({ test: null })` would fail in the 2nd iteration due to an attempt to iterate `null` in `Object.keys(obj)`.
**What**
- convert fulfillment service to typescript
I have removed the `transform` parameter from the getFulfillmentItems_ function since it was not being used with different methods, only `validateFulfillmentLineItem_`. Instead I have just reference the validateFulfillmentLineItem_ function directly.
We have the same pattern across some different methods, is there a specific reason or just for future proofing?
### What
At the moment it is not possible to pass explicitly null on a property since the qs.stringify will transform it as `url?property=` which is then interpreted on the backend side as `""` value which is not what we expect.
The actual way to pass null value is to set the property as `{ prop: "null" }` in order to get the stringify method to send it correctly.
### How
I just created a small util that loop through the input object and transform all null values to "null" before being passed to the qs.stringify method.
The new util is only applied on the list batch job since this is for now the only place that require that behaviour.
### What
At the moment, it is not possible to not invalidate any queries>
Example, when we want to Create a new signed url, it does not require to invalidate any of the queries.
But the way it is done in the buildOptions, require to give either a key or an array of keys.
### How
The behaviour for empty array is to invalidate all the queries and here we would like to be able to just pass undefined in order to not trigger the invalidation. The update allow the arg to be optional and check for undefined explicitly before choosing the invalidation
* centralize common knowledge and checks for list-customers in repository
* convert customer service to typescript
* fix typing error in update-address
* add await
* add atomic phases
* update types for customerservice
* update api and model types
* pr feedback
* remove Promise.resolve
* typing of buildQuery
* remove atomic phase from private method
* add batch job strategy interface
* update plugin loaders
* remove comment
* make map async
* ensure that only one of each strategy is registered
* register strategies plural
* add identifier and batchType properties
* extend batch job strategy identification method
* initial test
* update loaders to accomodate different ways of accessing batch job strategies
* identifier batch type field
* redo merge in plugins
* update interface and load only js files
* use switches instead of elif
* remove comments
* use static properties for strategy registration
* update tests
* fix unit tests
* update test names
* update isBatchJobStrategy method
* add check for TransactionBaseService in services for plugins
* update interfaces export
* update batchjob strategy interface with a prepare script
* update loaders
* update batchjob strategy interface
* remove everything but public interface methods from batchJobStrategy
* add default implementation to prepareBathJobForProcessing
* remove unused import