feat(medusa,dashboard,admin-sdk): Run admin dashboard from Medusa instance (#7330)
This commit is contained in:
1 parent
ec5415ea1a
commit
490586f566
82 files changed
+3946
-788
No files matched your search
@@ -28,6 +28,7 @@
|
||||
"rimraf": "^5.0.1",
|
||||
"typeorm": "^0.3.16",
|
||||
"typescript": "^5.1.6",
|
||||
"vite": "^5.2.11",
|
||||
"winston": "^3.8.2"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -3,8 +3,42 @@ import {
|
||||
InternalModuleDeclaration,
|
||||
} from "../modules-sdk"
|
||||
|
||||
import { RedisOptions } from "ioredis"
|
||||
import { LoggerOptions } from "typeorm"
|
||||
import type { RedisOptions } from "ioredis"
|
||||
import type { LoggerOptions } from "typeorm"
|
||||
import type { InlineConfig } from "vite"
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*
|
||||
* Admin dashboard configurations.
|
||||
*/
|
||||
export type AdminOptions = {
|
||||
/**
|
||||
* Whether to disable the admin dashboard. If set to `true`, the admin dashboard is disabled,
|
||||
* in both development and production environments. The default value is `false`.
|
||||
*/
|
||||
disable?: boolean
|
||||
/**
|
||||
* The path to the admin dashboard. The default value is `/app`.
|
||||
*
|
||||
* The value cannot be one of the reserved paths:
|
||||
* - `/admin`
|
||||
* - `/store`
|
||||
* - `/auth`
|
||||
* - `/`
|
||||
*/
|
||||
path?: `/${string}`
|
||||
/**
|
||||
* The directory where the admin build is output. This is where the build process will place the generated files.
|
||||
* The default value is `./build`.
|
||||
*/
|
||||
outDir?: string
|
||||
/**
|
||||
* Configure the Vite configuration for the admin dashboard. This function receives the default Vite configuration
|
||||
* and returns the modified configuration. The default value is `undefined`.
|
||||
*/
|
||||
vite?: (config: InlineConfig) => InlineConfig
|
||||
}
|
||||
|
||||
/**
|
||||
* @interface
|
||||
@@ -632,6 +666,11 @@ export type ConfigModule = {
|
||||
*/
|
||||
projectConfig: ProjectConfigOptions
|
||||
|
||||
/**
|
||||
* Admin dashboard configurations.
|
||||
*/
|
||||
admin?: AdminOptions
|
||||
|
||||
/**
|
||||
* On your Medusa backend, you can use [Plugins](https://docs.medusajs.com/development/plugins/overview) to add custom features or integrate third-party services.
|
||||
* For example, installing a plugin to use Stripe as a payment processor.
|
||||
|
||||
Reference in new issue
Block a user