@docusaurus/types
Advanced tools
+2
-2
| { | ||
| "name": "@docusaurus/types", | ||
| "version": "3.9.2-canary-6437", | ||
| "version": "3.9.2-canary-6439", | ||
| "description": "Common types for Docusaurus packages.", | ||
@@ -31,3 +31,3 @@ "types": "./src/index.d.ts", | ||
| }, | ||
| "gitHead": "c36f3ac2e06fc332b02fc2feaae5011d1a51ac87" | ||
| "gitHead": "67795b9b8e2c6d94284ae736bb0d974a2cf2000b" | ||
| } |
+51
-0
@@ -36,2 +36,3 @@ /** | ||
| ssgWorkerThreads: boolean; | ||
| gitEagerVcs: boolean; | ||
| }; | ||
@@ -44,2 +45,49 @@ | ||
| // VCS (Version Control System) info about a given change, e.g., a git commit. | ||
| // The agnostic term "VCS" is used instead of "git" to acknowledge the existence | ||
| // of other version control systems, and external systems like CMSs and i18n | ||
| // translation SaaS (e.g., Crowdin) | ||
| export type VcsChangeInfo = {timestamp: number; author: string}; | ||
| export type VscInitializeParams = { | ||
| siteDir: string; | ||
| // TODO could it be useful to provide all plugins getPathsToWatch() here? | ||
| // this could give the opportunity to find out all VCS roots ahead of times | ||
| // this is mostly useful for multi-git-repo setups, can be added later | ||
| }; | ||
| // VCS (Version Control System) config hooks to get file change info. | ||
| // This lets you override and customize the default Docusaurus behavior. | ||
| // This can be useful to optimize calls or when using something else than git | ||
| // See https://github.com/facebook/docusaurus/issues/11208 | ||
| // See https://github.com/e18e/ecosystem-issues/issues/216 | ||
| export type VcsConfig = { | ||
| /** | ||
| * Initialize the VCS system. | ||
| * This is notably useful to pre-read eagerly a full Git repository so that | ||
| * all the files first/last update info can be retrieved efficiently later | ||
| * | ||
| * Note: for now, this function is synchronous on purpose, it can be used to | ||
| * start warming up the VCS by reading eagerly, but we don't want to delay | ||
| * the rest of the Docusaurus start/build process. Instead of awaiting the | ||
| * init promise, you can create/store it and await it later during reads. | ||
| * | ||
| * @param params Initialization params that can be useful to warm up the VCS | ||
| */ | ||
| initialize: (params: VscInitializeParams) => void; | ||
| getFileCreationInfo: (filePath: string) => Promise<VcsChangeInfo | null>; | ||
| getFileLastUpdateInfo: (filePath: string) => Promise<VcsChangeInfo | null>; | ||
| }; | ||
| /** | ||
| * List of pre-built VcsConfig that Docusaurus provides. | ||
| */ | ||
| export type VcsPreset = | ||
| | 'git-ad-hoc' | ||
| | 'git-eager' | ||
| | 'hardcoded' | ||
| | 'disabled' | ||
| | 'default-v1' | ||
| | 'default-v2'; | ||
| export type FutureConfig = { | ||
@@ -55,2 +103,4 @@ /** | ||
| experimental_vcs: VcsConfig; | ||
| /** | ||
@@ -373,2 +423,3 @@ * Docusaurus can work with 2 router types. | ||
| experimental_faster?: boolean | Partial<FasterConfig>; | ||
| experimental_vcs?: VcsPreset | VcsConfig | boolean; | ||
| } | ||
@@ -375,0 +426,0 @@ >; |
+4
-0
@@ -16,2 +16,6 @@ /** | ||
| StorageConfig, | ||
| VcsConfig, | ||
| VcsPreset, | ||
| VcsChangeInfo, | ||
| VscInitializeParams, | ||
| Config, | ||
@@ -18,0 +22,0 @@ } from './config'; |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
46567
4.89%1323
3.93%