chore(types,framework): pick ssl types from tls lib (#11381)
* chore(types,framework): pick ssl types from tls lib * chore: call from node:tls directly
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
|||||||
} from "@medusajs/types"
|
} from "@medusajs/types"
|
||||||
|
|
||||||
import type { RedisOptions } from "ioredis"
|
import type { RedisOptions } from "ioredis"
|
||||||
|
import { ConnectionOptions } from "node:tls"
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
import type { InlineConfig } from "vite"
|
import type { InlineConfig } from "vite"
|
||||||
|
|
||||||
@@ -89,12 +90,12 @@ export type AdminOptions = {
|
|||||||
/**
|
/**
|
||||||
* Configure the Vite configuration for the admin dashboard. This function receives the default Vite configuration
|
* 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`.
|
* and returns the modified configuration. The default value is `undefined`.
|
||||||
*
|
*
|
||||||
* Learn about configurations you can pass to Vite in [Vite's documentation](https://vite.dev/config/).
|
* Learn about configurations you can pass to Vite in [Vite's documentation](https://vite.dev/config/).
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* For example, if you're using a third-party library that isn't ESM-compatible, add it to Vite's `optimizeDeps` configuration:
|
* For example, if you're using a third-party library that isn't ESM-compatible, add it to Vite's `optimizeDeps` configuration:
|
||||||
*
|
*
|
||||||
* ```ts title="medusa-config.ts"
|
* ```ts title="medusa-config.ts"
|
||||||
* module.exports = defineConfig({
|
* module.exports = defineConfig({
|
||||||
* admin: {
|
* admin: {
|
||||||
@@ -304,12 +305,7 @@ export type ProjectConfigOptions = {
|
|||||||
/**
|
/**
|
||||||
* Configure support for TLS/SSL connection
|
* Configure support for TLS/SSL connection
|
||||||
*/
|
*/
|
||||||
ssl?: {
|
ssl?: boolean | ConnectionOptions
|
||||||
/**
|
|
||||||
* Whether to fail connection if the server certificate is verified against the list of supplied CAs and the hostname and no match is found.
|
|
||||||
*/
|
|
||||||
rejectUnauthorized?: false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -851,7 +847,7 @@ export type ConfigModule = {
|
|||||||
* - An object having the following properties:
|
* - An object having the following properties:
|
||||||
* - `resolve`: The name of the plugin's package as specified in the plugin's `package.json` file.
|
* - `resolve`: The name of the plugin's package as specified in the plugin's `package.json` file.
|
||||||
* - `options`: An object that includes options to be passed to the modules within the plugin. Learn more in [this documentation](https://docs.medusajs.com/learn/fundamentals/modules/options).
|
* - `options`: An object that includes options to be passed to the modules within the plugin. Learn more in [this documentation](https://docs.medusajs.com/learn/fundamentals/modules/options).
|
||||||
*
|
*
|
||||||
* Learn how to create a plugin in [this documentation](https://docs.medusajs.com/learn/fundamentals/plugins/create).
|
* Learn how to create a plugin in [this documentation](https://docs.medusajs.com/learn/fundamentals/plugins/create).
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
@@ -874,9 +870,9 @@ export type ConfigModule = {
|
|||||||
*/
|
*/
|
||||||
plugins: (
|
plugins: (
|
||||||
| {
|
| {
|
||||||
/**
|
/**
|
||||||
* The name of the plugin's package as specified in the plugin's `package.json` file.
|
* The name of the plugin's package as specified in the plugin's `package.json` file.
|
||||||
*/
|
*/
|
||||||
resolve: string
|
resolve: string
|
||||||
/**
|
/**
|
||||||
* An object that includes options to be passed to the modules within the plugin.
|
* An object that includes options to be passed to the modules within the plugin.
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import {
|
|||||||
} from "../modules-sdk"
|
} from "../modules-sdk"
|
||||||
|
|
||||||
import type { RedisOptions } from "ioredis"
|
import type { RedisOptions } from "ioredis"
|
||||||
|
import { ConnectionOptions } from "node:tls"
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import type { InlineConfig } from "vite"
|
import type { InlineConfig } from "vite"
|
||||||
|
|
||||||
@@ -280,12 +281,7 @@ export type ProjectConfigOptions = {
|
|||||||
/**
|
/**
|
||||||
* Configure support for TLS/SSL connection
|
* Configure support for TLS/SSL connection
|
||||||
*/
|
*/
|
||||||
ssl?: {
|
ssl?: boolean | ConnectionOptions
|
||||||
/**
|
|
||||||
* Whether to fail connection if the server certificate is verified against the list of supplied CAs and the hostname and no match is found.
|
|
||||||
*/
|
|
||||||
rejectUnauthorized?: false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user