@medusajs/types 2.7.1-snapshot-20250415131624 → 2.7.1-snapshot-20250415195133
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.
@@ -13,7 +13,7 @@ export interface AdminOptions {
|
|
13
13
|
* in both development and production environments. The default value is `false`.
|
14
14
|
*
|
15
15
|
* @example
|
16
|
-
* ```js title="medusa-config.
|
16
|
+
* ```js title="medusa-config.js"
|
17
17
|
* module.exports = defineConfig({
|
18
18
|
* admin: {
|
19
19
|
* disable: process.env.ADMIN_DISABLED === "true" ||
|
@@ -34,7 +34,7 @@ export interface AdminOptions {
|
|
34
34
|
* - `/`
|
35
35
|
*
|
36
36
|
* @example
|
37
|
-
* ```
|
37
|
+
* ```js title="medusa-config.js"
|
38
38
|
* module.exports = defineConfig({
|
39
39
|
* admin: {
|
40
40
|
* path: process.env.ADMIN_PATH || `/app`,
|
@@ -48,7 +48,7 @@ export interface AdminOptions {
|
|
48
48
|
* The URL of your Medusa application. Defaults to the browser origin. This is useful to set when running the admin on a separate domain.
|
49
49
|
*
|
50
50
|
* @example
|
51
|
-
* ```js title="medusa-config.
|
51
|
+
* ```js title="medusa-config.js"
|
52
52
|
* module.exports = defineConfig({
|
53
53
|
* admin: {
|
54
54
|
* backendUrl: process.env.MEDUSA_BACKEND_URL ||
|
@@ -64,7 +64,7 @@ export interface AdminOptions {
|
|
64
64
|
* to provide to customers to complete any processes
|
65
65
|
*
|
66
66
|
* @example
|
67
|
-
* ```js title="medusa-config.
|
67
|
+
* ```js title="medusa-config.js"
|
68
68
|
* module.exports = defineConfig({
|
69
69
|
* admin: {
|
70
70
|
* storefrontUrl: process.env.MEDUSA_STOREFRONT_URL ||
|
@@ -75,11 +75,6 @@ export interface AdminOptions {
|
|
75
75
|
* ```
|
76
76
|
*/
|
77
77
|
storefrontUrl?: string;
|
78
|
-
/**
|
79
|
-
* The directory where the admin build is output. This is where the build process places the generated files.
|
80
|
-
* The default value is `./build`.
|
81
|
-
*/
|
82
|
-
outDir?: string;
|
83
78
|
/**
|
84
79
|
* Configure the Vite configuration for the admin dashboard. This function receives the default Vite configuration
|
85
80
|
* and returns the modified configuration. The default value is `undefined`.
|
@@ -93,7 +88,7 @@ export interface AdminOptions {
|
|
93
88
|
*
|
94
89
|
* Options to pass to `express-session`.
|
95
90
|
*/
|
96
|
-
|
91
|
+
type SessionOptions = {
|
97
92
|
/**
|
98
93
|
* The name of the session ID cookie to set in the response (and read from in the request). The default value is `connect.sid`.
|
99
94
|
* Refer to [express-session’s documentation](https://www.npmjs.com/package/express-session#name) for more details.
|
@@ -124,42 +119,6 @@ export type SessionOptions = {
|
|
124
119
|
* Refer to [express-session’s documentation](https://www.npmjs.com/package/express-session#cookiemaxage) for details.
|
125
120
|
*/
|
126
121
|
ttl?: number;
|
127
|
-
/**
|
128
|
-
* Specify the options for storing session data to dynamoDB. Make
|
129
|
-
* sure to install the following dependencies and set the following
|
130
|
-
* variables too.
|
131
|
-
*
|
132
|
-
* - @aws-sdk/client-dynamodb@^3.218.0
|
133
|
-
* - connect-dynamodb@^3.0.5
|
134
|
-
*
|
135
|
-
* Environment variables to set
|
136
|
-
* - AWS_REGION=<value>
|
137
|
-
* - ENDPOINT=<value>
|
138
|
-
* - AWS_ACCESS_KEY_ID=<value>
|
139
|
-
* - AWS_SECRET_ACCESS_KEY=<value>
|
140
|
-
*/
|
141
|
-
dynamodbOptions?: {
|
142
|
-
clientOptions?: {
|
143
|
-
endpoint?: string;
|
144
|
-
};
|
145
|
-
table?: string;
|
146
|
-
/** Defaults to 'sess:' */
|
147
|
-
prefix?: string;
|
148
|
-
/** Defaults to 'id' */
|
149
|
-
hashKey?: string;
|
150
|
-
readCapacityUnits?: number;
|
151
|
-
writeCapacityUnits?: number;
|
152
|
-
specialKeys?: {
|
153
|
-
name: string;
|
154
|
-
type: string;
|
155
|
-
}[];
|
156
|
-
skipThrowMissingSpecialKeys?: boolean;
|
157
|
-
/**
|
158
|
-
* Disable initialization.
|
159
|
-
* Useful if the table already exists or if you want to skip existence checks in a serverless environment such as AWS Lambda.
|
160
|
-
*/
|
161
|
-
initialized?: boolean;
|
162
|
-
};
|
163
122
|
};
|
164
123
|
/**
|
165
124
|
* @interface
|
@@ -200,7 +159,7 @@ export type ProjectConfigOptions = {
|
|
200
159
|
* [PostgreSQL's documentation](https://www.postgresql.org/docs/current/sql-createdatabase.html).
|
201
160
|
*
|
202
161
|
* @example
|
203
|
-
* ```js title="medusa-config.
|
162
|
+
* ```js title="medusa-config.js"
|
204
163
|
* module.exports = defineConfig({
|
205
164
|
* projectConfig: {
|
206
165
|
* databaseName: process.env.DATABASE_NAME ||
|
@@ -236,9 +195,9 @@ export type ProjectConfigOptions = {
|
|
236
195
|
* DATABASE_URL=postgres://postgres@localhost/medusa-store
|
237
196
|
* ```
|
238
197
|
*
|
239
|
-
* Then, use the value in `medusa-config.
|
198
|
+
* Then, use the value in `medusa-config.js`:
|
240
199
|
*
|
241
|
-
* ```js title="medusa-config.
|
200
|
+
* ```js title="medusa-config.js"
|
242
201
|
* module.exports = defineConfig({
|
243
202
|
* projectConfig: {
|
244
203
|
* databaseUrl: process.env.DATABASE_URL,
|
@@ -252,7 +211,7 @@ export type ProjectConfigOptions = {
|
|
252
211
|
/**
|
253
212
|
* The database schema to connect to. This is not required to provide if you’re using the default schema, which is `public`.
|
254
213
|
*
|
255
|
-
* ```js title="medusa-config.
|
214
|
+
* ```js title="medusa-config.js"
|
256
215
|
* module.exports = defineConfig({
|
257
216
|
* projectConfig: {
|
258
217
|
* databaseSchema: process.env.DATABASE_SCHEMA ||
|
@@ -268,7 +227,7 @@ export type ProjectConfigOptions = {
|
|
268
227
|
* This configuration specifies whether database messages should be logged.
|
269
228
|
*
|
270
229
|
* @example
|
271
|
-
* ```js title="medusa-config.
|
230
|
+
* ```js title="medusa-config.js"
|
272
231
|
* module.exports = defineConfig({
|
273
232
|
* projectConfig: {
|
274
233
|
* databaseLogging: false
|
@@ -293,7 +252,7 @@ export type ProjectConfigOptions = {
|
|
293
252
|
* :::
|
294
253
|
*
|
295
254
|
* @example
|
296
|
-
* ```js title="medusa-config.
|
255
|
+
* ```js title="medusa-config.js"
|
297
256
|
* module.exports = defineConfig({
|
298
257
|
* projectConfig: {
|
299
258
|
* databaseDriverOptions: process.env.NODE_ENV !== "development" ?
|
@@ -330,7 +289,7 @@ export type ProjectConfigOptions = {
|
|
330
289
|
* For a local Redis installation, the connection URL should be `redis://localhost:6379` unless you’ve made any changes to the Redis configuration during installation.
|
331
290
|
*
|
332
291
|
* @example
|
333
|
-
* ```js title="medusa-config.
|
292
|
+
* ```js title="medusa-config.js"
|
334
293
|
* module.exports = defineConfig({
|
335
294
|
* projectConfig: {
|
336
295
|
* redisUrl: process.env.REDIS_URL ||
|
@@ -348,7 +307,7 @@ export type ProjectConfigOptions = {
|
|
348
307
|
* If this configuration option is provided, it is prepended to `sess:`.
|
349
308
|
*
|
350
309
|
* @example
|
351
|
-
* ```js title="medusa-config.
|
310
|
+
* ```js title="medusa-config.js"
|
352
311
|
* module.exports = defineConfig({
|
353
312
|
* projectConfig: {
|
354
313
|
* redisPrefix: process.env.REDIS_URL || "medusa:",
|
@@ -364,7 +323,7 @@ export type ProjectConfigOptions = {
|
|
364
323
|
* for the list of available options.
|
365
324
|
*
|
366
325
|
* @example
|
367
|
-
* ```js title="medusa-config.
|
326
|
+
* ```js title="medusa-config.js"
|
368
327
|
* module.exports = defineConfig({
|
369
328
|
* projectConfig: {
|
370
329
|
* redisOptions: {
|
@@ -382,7 +341,7 @@ export type ProjectConfigOptions = {
|
|
382
341
|
* This configuration defines additional options to pass to [express-session](https://www.npmjs.com/package/express-session), which is used to store the Medusa server's session.
|
383
342
|
*
|
384
343
|
* @example
|
385
|
-
* ```js title="medusa-config.
|
344
|
+
* ```js title="medusa-config.js"
|
386
345
|
* module.exports = defineConfig({
|
387
346
|
* projectConfig: {
|
388
347
|
* sessionOptions: {
|
@@ -399,7 +358,7 @@ export type ProjectConfigOptions = {
|
|
399
358
|
* Configure the number of staged jobs that are polled from the database. Default is `1000`.
|
400
359
|
*
|
401
360
|
* @example
|
402
|
-
* ```js title="medusa-config.
|
361
|
+
* ```js title="medusa-config.js"
|
403
362
|
* module.exports = defineConfig({
|
404
363
|
* projectConfig: {
|
405
364
|
* jobsBatchSize: 100
|
@@ -436,7 +395,7 @@ export type ProjectConfigOptions = {
|
|
436
395
|
* 2. Another having the `workerMode` configuration set to `worker`.
|
437
396
|
*
|
438
397
|
* @example
|
439
|
-
* ```js title="medusa-config.
|
398
|
+
* ```js title="medusa-config.js"
|
440
399
|
* module.exports = defineConfig({
|
441
400
|
* projectConfig: {
|
442
401
|
* workerMode: process.env.WORKER_MODE || "shared"
|
@@ -451,7 +410,7 @@ export type ProjectConfigOptions = {
|
|
451
410
|
* This property configures the application's http-specific settings.
|
452
411
|
*
|
453
412
|
* @example
|
454
|
-
* ```js title="medusa-config.
|
413
|
+
* ```js title="medusa-config.js"
|
455
414
|
* module.exports = defineConfig({
|
456
415
|
* projectConfig: {
|
457
416
|
* http: {
|
@@ -474,7 +433,7 @@ export type ProjectConfigOptions = {
|
|
474
433
|
* error is thrown and the application crashes.
|
475
434
|
*
|
476
435
|
* @example
|
477
|
-
* ```js title="medusa-config.
|
436
|
+
* ```js title="medusa-config.js"
|
478
437
|
* module.exports = defineConfig({
|
479
438
|
* projectConfig: {
|
480
439
|
* http: {
|
@@ -493,7 +452,7 @@ export type ProjectConfigOptions = {
|
|
493
452
|
* If not provided, the default value is `24h`.
|
494
453
|
*
|
495
454
|
* @example
|
496
|
-
* ```js title="medusa-config.
|
455
|
+
* ```js title="medusa-config.js"
|
497
456
|
* module.exports = defineConfig({
|
498
457
|
* projectConfig: {
|
499
458
|
* http: {
|
@@ -513,7 +472,7 @@ export type ProjectConfigOptions = {
|
|
513
472
|
* the application crashes.
|
514
473
|
*
|
515
474
|
* @example
|
516
|
-
* ```js title="medusa-config.
|
475
|
+
* ```js title="medusa-config.js"
|
517
476
|
* module.exports = defineConfig({
|
518
477
|
* projectConfig: {
|
519
478
|
* http: {
|
@@ -550,9 +509,9 @@ export type ProjectConfigOptions = {
|
|
550
509
|
* AUTH_CORS=/http:\/\/.+/
|
551
510
|
* ```
|
552
511
|
*
|
553
|
-
* Then, set the configuration in `medusa-config.
|
512
|
+
* Then, set the configuration in `medusa-config.js`:
|
554
513
|
*
|
555
|
-
* ```js title="medusa-config.
|
514
|
+
* ```js title="medusa-config.js"
|
556
515
|
* module.exports = defineConfig({
|
557
516
|
* projectConfig: {
|
558
517
|
* http: {
|
@@ -564,9 +523,9 @@ export type ProjectConfigOptions = {
|
|
564
523
|
* })
|
565
524
|
* ```
|
566
525
|
*
|
567
|
-
* If you’re adding the value directly within `medusa-config.
|
526
|
+
* If you’re adding the value directly within `medusa-config.js`, make sure to add an extra escaping `/` for every backslash in the pattern. For example:
|
568
527
|
*
|
569
|
-
* ```js title="medusa-config.
|
528
|
+
* ```js title="medusa-config.js"
|
570
529
|
* module.exports = defineConfig({
|
571
530
|
* projectConfig: {
|
572
531
|
* http: {
|
@@ -588,7 +547,7 @@ export type ProjectConfigOptions = {
|
|
588
547
|
* Learn more in the [API Reference](https://docs.medusajs.com/api/store#http-compression).
|
589
548
|
*
|
590
549
|
* @example
|
591
|
-
* ```js title="medusa-config.
|
550
|
+
* ```js title="medusa-config.js"
|
592
551
|
* module.exports = defineConfig({
|
593
552
|
* projectConfig: {
|
594
553
|
* http: {
|
@@ -630,9 +589,9 @@ export type ProjectConfigOptions = {
|
|
630
589
|
* STORE_CORS=/http:\/\/.+/
|
631
590
|
* ```
|
632
591
|
*
|
633
|
-
* Then, set the configuration in `medusa-config.
|
592
|
+
* Then, set the configuration in `medusa-config.js`:
|
634
593
|
*
|
635
|
-
* ```js title="medusa-config.
|
594
|
+
* ```js title="medusa-config.js"
|
636
595
|
* module.exports = defineConfig({
|
637
596
|
* projectConfig: {
|
638
597
|
* http: {
|
@@ -644,9 +603,9 @@ export type ProjectConfigOptions = {
|
|
644
603
|
* })
|
645
604
|
* ```
|
646
605
|
*
|
647
|
-
* If you’re adding the value directly within `medusa-config.
|
606
|
+
* If you’re adding the value directly within `medusa-config.js`, make sure to add an extra escaping `/` for every backslash in the pattern. For example:
|
648
607
|
*
|
649
|
-
* ```js title="medusa-config.
|
608
|
+
* ```js title="medusa-config.js"
|
650
609
|
* module.exports = defineConfig({
|
651
610
|
* projectConfig: {
|
652
611
|
* http: {
|
@@ -683,9 +642,9 @@ export type ProjectConfigOptions = {
|
|
683
642
|
* ADMIN_CORS=/http:\/\/.+/
|
684
643
|
* ```
|
685
644
|
*
|
686
|
-
* Then, set the configuration in `medusa-config.
|
645
|
+
* Then, set the configuration in `medusa-config.js`:
|
687
646
|
*
|
688
|
-
* ```js title="medusa-config.
|
647
|
+
* ```js title="medusa-config.js"
|
689
648
|
* module.exports = defineConfig({
|
690
649
|
* projectConfig: {
|
691
650
|
* http: {
|
@@ -697,9 +656,9 @@ export type ProjectConfigOptions = {
|
|
697
656
|
* })
|
698
657
|
* ```
|
699
658
|
*
|
700
|
-
* If you’re adding the value directly within `medusa-config.
|
659
|
+
* If you’re adding the value directly within `medusa-config.js`, make sure to add an extra escaping `/` for every backslash in the pattern. For example:
|
701
660
|
*
|
702
|
-
* ```js title="medusa-config.
|
661
|
+
* ```js title="medusa-config.js"
|
703
662
|
* module.exports = defineConfig({
|
704
663
|
* projectConfig: {
|
705
664
|
* http: {
|
@@ -721,9 +680,9 @@ export type ProjectConfigOptions = {
|
|
721
680
|
* @example
|
722
681
|
* Some example values of common use cases:
|
723
682
|
*
|
724
|
-
* Then, set the configuration in `medusa-config.
|
683
|
+
* Then, set the configuration in `medusa-config.js`:
|
725
684
|
*
|
726
|
-
* ```js title="medusa-config.
|
685
|
+
* ```js title="medusa-config.js"
|
727
686
|
* module.exports = defineConfig({
|
728
687
|
* projectConfig: {
|
729
688
|
* http: {
|
@@ -745,7 +704,7 @@ export type ProjectConfigOptions = {
|
|
745
704
|
*
|
746
705
|
* @example
|
747
706
|
*
|
748
|
-
* ```js title="medusa-config.
|
707
|
+
* ```js title="medusa-config.js"
|
749
708
|
* module.exports = defineConfig({
|
750
709
|
* projectConfig: {
|
751
710
|
* http: {
|
@@ -763,27 +722,20 @@ export type ProjectConfigOptions = {
|
|
763
722
|
/**
|
764
723
|
* @interface
|
765
724
|
*
|
766
|
-
* The configurations for your Medusa application are
|
767
|
-
*
|
768
|
-
* :::note
|
769
|
-
*
|
770
|
-
* Some Medusa configurations are set through environment variables, which you can find in [this documentation](https://docs.medusajs.com/learn/fundamentals/environment-variables#predefined-medusa-environment-variables).
|
725
|
+
* The configurations for your Medusa application are in `medusa-config.js` located in the root of your Medusa project. The configurations include configurations for database, modules, and more.
|
771
726
|
*
|
772
|
-
*
|
773
|
-
*
|
774
|
-
* `medusa-config.ts` exports the value returned by the `defineConfig` utility function imported from `@medusajs/framework/utils`.
|
727
|
+
* `medusa-config.js` exports the value returned by the `defineConfig` utility function imported from `@medusajs/utils`.
|
775
728
|
*
|
776
729
|
* `defineConfig` accepts as a parameter an object with the following properties:
|
777
730
|
*
|
778
731
|
* - {@link ConfigModule.projectConfig | projectConfig} (required): An object that holds general configurations related to the Medusa application, such as database or CORS configurations.
|
779
|
-
* - {@link ConfigModule.plugins | plugins}: An array of strings or objects that hold the configurations of the plugins installed in the Medusa application.
|
780
732
|
* - {@link ConfigModule.admin | admin}: An object that holds admin-related configurations.
|
781
733
|
* - {@link ConfigModule.modules | modules}: An object that configures the Medusa application's modules.
|
782
734
|
* - {@link ConfigModule.featureFlags | featureFlags}: An object that enables or disables features guarded by a feature flag.
|
783
735
|
*
|
784
736
|
* For example:
|
785
737
|
*
|
786
|
-
* ```
|
738
|
+
* ```js title="medusa-config.js"
|
787
739
|
* module.exports = defineConfig({
|
788
740
|
* projectConfig: {
|
789
741
|
* // ...
|
@@ -804,7 +756,7 @@ export type ProjectConfigOptions = {
|
|
804
756
|
*
|
805
757
|
* ## Environment Variables
|
806
758
|
*
|
807
|
-
* It's highly recommended to store the values of configurations in environment variables, then reference them within `medusa-config.
|
759
|
+
* It's highly recommended to store the values of configurations in environment variables, then reference them within `medusa-config.js`.
|
808
760
|
*
|
809
761
|
* During development, you can set your environment variables in the `.env` file at the root of your Medusa application project. In production,
|
810
762
|
* setting the environment variables depends on the hosting provider.
|
@@ -820,7 +772,7 @@ export type ConfigModule = {
|
|
820
772
|
* This property holds configurations for the Medusa Admin dashboard.
|
821
773
|
*
|
822
774
|
* @example
|
823
|
-
* ```
|
775
|
+
* ```js title="medusa-config.js"
|
824
776
|
* module.exports = defineConfig({
|
825
777
|
* admin: {
|
826
778
|
* backendUrl: process.env.MEDUSA_BACKEND_URL ||
|
@@ -832,22 +784,20 @@ export type ConfigModule = {
|
|
832
784
|
*/
|
833
785
|
admin: AdminOptions;
|
834
786
|
/**
|
835
|
-
* On your Medusa
|
836
|
-
*
|
787
|
+
* On your Medusa backend, you can use [Plugins](https://docs.medusajs.com/development/plugins/overview) to add custom features or integrate third-party services.
|
788
|
+
* For example, installing a plugin to use Stripe as a payment processor.
|
837
789
|
*
|
838
|
-
* Aside from installing the plugin with NPM, you need to pass the plugin you installed into the `plugins` array defined in `medusa-config.
|
790
|
+
* Aside from installing the plugin with NPM, you need to pass the plugin you installed into the `plugins` array defined in `medusa-config.js`.
|
839
791
|
*
|
840
792
|
* The items in the array can either be:
|
841
793
|
*
|
842
|
-
* - A string, which is the name of the plugin
|
794
|
+
* - A string, which is the name of the plugin to add. You can pass a plugin as a string if it doesn’t require any configurations.
|
843
795
|
* - An object having the following properties:
|
844
|
-
* - `resolve`: The name of the plugin
|
845
|
-
* - `options`: An object that includes options
|
846
|
-
*
|
847
|
-
* Learn how to create a plugin in [this documentation](https://docs.medusajs.com/learn/fundamentals/plugins/create).
|
796
|
+
* - `resolve`: The name of the plugin.
|
797
|
+
* - `options`: An object that includes the plugin’s options. These options vary for each plugin, and you should refer to the plugin’s documentation for available options.
|
848
798
|
*
|
849
799
|
* @example
|
850
|
-
* ```
|
800
|
+
* ```js title="medusa-config.js"
|
851
801
|
* module.exports = {
|
852
802
|
* plugins: [
|
853
803
|
* `medusa-my-plugin-1`,
|
@@ -863,16 +813,14 @@ export type ConfigModule = {
|
|
863
813
|
* // ...
|
864
814
|
* }
|
865
815
|
* ```
|
816
|
+
*
|
817
|
+
* @ignore
|
818
|
+
*
|
819
|
+
* @privateRemarks
|
820
|
+
* Added the `@\ignore` tag for now so it's not generated in the main docs until we figure out what to do with plugins
|
866
821
|
*/
|
867
822
|
plugins: ({
|
868
|
-
/**
|
869
|
-
* The name of the plugin's package as specified in the plugin's `package.json` file.
|
870
|
-
*/
|
871
823
|
resolve: string;
|
872
|
-
/**
|
873
|
-
* An object that includes options to be passed to the modules within the plugin.
|
874
|
-
* Learn more in [this documentation](https://docs.medusajs.com/learn/fundamentals/modules/options).
|
875
|
-
*/
|
876
824
|
options: Record<string, unknown>;
|
877
825
|
} | string)[];
|
878
826
|
/**
|
@@ -885,19 +833,21 @@ export type ConfigModule = {
|
|
885
833
|
*
|
886
834
|
* :::
|
887
835
|
*
|
888
|
-
* `modules`
|
836
|
+
* The keys of the `modules` configuration object refer to the module's registration name. Its value can be one of the following:
|
889
837
|
*
|
890
|
-
* 1.
|
891
|
-
* 2.
|
838
|
+
* 1. A boolean value indicating whether the module type is enabled. This is only supported for Medusa's commerce and architectural modules;
|
839
|
+
* 2. Or an object having the following properties:
|
840
|
+
* 1. `resolve`: a string indicating the path to the module relative to `src`, or the module's NPM package name. For example, `./modules/my-module`.
|
841
|
+
* 2. `options`: (optional) an object indicating the options to pass to the module.
|
892
842
|
*
|
893
843
|
* @example
|
894
|
-
* ```
|
844
|
+
* ```js title="medusa-config.js"
|
895
845
|
* module.exports = defineConfig({
|
896
|
-
* modules:
|
897
|
-
* {
|
846
|
+
* modules: {
|
847
|
+
* helloModuleService: {
|
898
848
|
* resolve: "./modules/hello"
|
899
849
|
* }
|
900
|
-
*
|
850
|
+
* }
|
901
851
|
* // ...
|
902
852
|
* })
|
903
853
|
* ```
|
@@ -907,14 +857,14 @@ export type ConfigModule = {
|
|
907
857
|
* Some features in the Medusa application are guarded by a feature flag. This ensures constant shipping of new features while maintaining the engine’s stability.
|
908
858
|
*
|
909
859
|
* You can enable a feature in your application by enabling its feature flag. Feature flags are enabled through either environment
|
910
|
-
* variables or through this configuration property exported in `medusa-config.
|
860
|
+
* variables or through this configuration property exported in `medusa-config.js`.
|
911
861
|
*
|
912
862
|
* The `featureFlags`'s value is an object. Its properties are the names of the feature flags, and their value is a boolean indicating whether the feature flag is enabled.
|
913
863
|
*
|
914
864
|
* You can find available feature flags and their key name [here](https://github.com/medusajs/medusa/tree/develop/packages/medusa/src/loaders/feature-flags).
|
915
865
|
*
|
916
866
|
* @example
|
917
|
-
* ```
|
867
|
+
* ```js title="medusa-config.js"
|
918
868
|
* module.exports = defineConfig({
|
919
869
|
* featureFlags: {
|
920
870
|
* analytics: true,
|
@@ -960,7 +910,7 @@ export type InputConfigModules = Partial<InternalModuleDeclarationOverride | Ext
|
|
960
910
|
* The configuration accepted by the "defineConfig" helper
|
961
911
|
*/
|
962
912
|
export type InputConfig = Partial<Omit<ConfigModule, "admin" | "modules"> & {
|
963
|
-
admin
|
913
|
+
admin: Partial<ConfigModule["admin"]>;
|
964
914
|
modules: InputConfigModules
|
965
915
|
/**
|
966
916
|
* @deprecated use the array instead
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"config-module.d.ts","sourceRoot":"","sources":["../../src/common/config-module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,gBAAgB,CAAA;AAEvB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAE5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAExC;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;
|
1
|
+
{"version":3,"file":"config-module.d.ts","sourceRoot":"","sources":["../../src/common/config-module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,gBAAgB,CAAA;AAEvB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAE5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAExC;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,EAAE,IAAI,MAAM,EAAE,CAAA;IAClB;;;;;;;;;;;;;OAaG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;;;;;;;;;;;OAcG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,YAAY,CAAA;CAC9C;AAED;;;;GAIG;AACH,KAAK,cAAc,GAAG;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IAC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