@rspress/shared 1.37.1 → 1.37.2

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.
package/dist/index.d.ts CHANGED
@@ -779,6 +779,7 @@ declare const DEFAULT_HIGHLIGHT_LANGUAGES: string[][];
779
779
  declare const isSCM: () => boolean;
780
780
  declare const isProduction: () => boolean;
781
781
  declare const isDebugMode: () => boolean;
782
+ declare const isDevDebugMode: () => boolean;
782
783
  declare const cleanUrl: (url: string) => string;
783
784
  declare function slash(str: string): string;
784
785
  declare function removeHash(str: string): string;
@@ -819,4 +820,4 @@ declare function removeBase(url: string, base: string): string;
819
820
  declare function withoutHash(url: string): string;
820
821
  declare const mergeDocConfig: (...configs: UserConfig[]) => UserConfig;
821
822
 
822
- export { APPEARANCE_KEY, type AdditionalPage, type BaseRuntimePageInfo, type Config, DEFAULT_HIGHLIGHT_LANGUAGES, type Config$1 as DefaultThemeConfig, type DocFooter, type EditLink, type Feature, type FilterConfig, type Footer, type FrontMatterMeta, HASH_REGEXP, type Header, type Hero, type Image, type LocalSearchOptions, type Locale, type LocaleConfig, type LocaleLink, type LocaleLinks, MDX_REGEXP, type MarkdownOptions, type MdxRsOptions, type Nav, type NavItem, type NavItemWithChildren, type NavItemWithLink, type NavItemWithLinkAndChildren, type NormalizedConfig, type NormalizedConfig as NormalizedDefaultThemeConfig, type NormalizedLocales, type NormalizedSidebar, type NormalizedSidebarGroup, type PageData, type PageIndexInfo, type PageModule, type PageType, type RspressPlugin as Plugin, QUERY_REGEXP, RSPRESS_TEMP_DIR, type RemotePageInfo, type RemoteSearchIndexInfo, type RemoteSearchOptions, type ReplaceRule, type Route, type RouteMeta, type RouteOptions, type RspressPlugin, SEARCH_INDEX_NAME, type SSGConfig, type SearchHooks, type SearchOptions, type Sidebar, type SidebarDivider, type SidebarGroup, type SidebarItem, type SidebarSectionHeader, type SiteData, type SocialLink, type SocialLinkIcon, type UserConfig, addLeadingSlash, addTrailingSlash, cleanUrl, inBrowser, isDataUrl, isDebugMode, isExternalUrl, isProduction, isSCM, mergeDocConfig, normalizeHref, normalizePosixPath, normalizeSlash, omit, parseUrl, removeBase, removeHash, removeLeadingSlash, removeTrailingSlash, replaceLang, replaceVersion, slash, withBase, withoutBase, withoutHash, withoutLang };
823
+ export { APPEARANCE_KEY, type AdditionalPage, type BaseRuntimePageInfo, type Config, DEFAULT_HIGHLIGHT_LANGUAGES, type Config$1 as DefaultThemeConfig, type DocFooter, type EditLink, type Feature, type FilterConfig, type Footer, type FrontMatterMeta, HASH_REGEXP, type Header, type Hero, type Image, type LocalSearchOptions, type Locale, type LocaleConfig, type LocaleLink, type LocaleLinks, MDX_REGEXP, type MarkdownOptions, type MdxRsOptions, type Nav, type NavItem, type NavItemWithChildren, type NavItemWithLink, type NavItemWithLinkAndChildren, type NormalizedConfig, type NormalizedConfig as NormalizedDefaultThemeConfig, type NormalizedLocales, type NormalizedSidebar, type NormalizedSidebarGroup, type PageData, type PageIndexInfo, type PageModule, type PageType, type RspressPlugin as Plugin, QUERY_REGEXP, RSPRESS_TEMP_DIR, type RemotePageInfo, type RemoteSearchIndexInfo, type RemoteSearchOptions, type ReplaceRule, type Route, type RouteMeta, type RouteOptions, type RspressPlugin, SEARCH_INDEX_NAME, type SSGConfig, type SearchHooks, type SearchOptions, type Sidebar, type SidebarDivider, type SidebarGroup, type SidebarItem, type SidebarSectionHeader, type SiteData, type SocialLink, type SocialLinkIcon, type UserConfig, addLeadingSlash, addTrailingSlash, cleanUrl, inBrowser, isDataUrl, isDebugMode, isDevDebugMode, isExternalUrl, isProduction, isSCM, mergeDocConfig, normalizeHref, normalizePosixPath, normalizeSlash, omit, parseUrl, removeBase, removeHash, removeLeadingSlash, removeTrailingSlash, replaceLang, replaceVersion, slash, withBase, withoutBase, withoutHash, withoutLang };
package/dist/index.js CHANGED
@@ -33,6 +33,7 @@ __export(src_exports, {
33
33
  inBrowser: () => inBrowser,
34
34
  isDataUrl: () => isDataUrl,
35
35
  isDebugMode: () => isDebugMode,
36
+ isDevDebugMode: () => isDevDebugMode,
36
37
  isExternalUrl: () => isExternalUrl,
37
38
  isProduction: () => isProduction,
38
39
  isSCM: () => isSCM,
@@ -1135,6 +1136,7 @@ var isDebugMode = () => {
1135
1136
  const values = process.env.DEBUG?.toLocaleLowerCase().split(",") ?? [];
1136
1137
  return ["rsbuild", "builder", "*"].some((key) => values.includes(key));
1137
1138
  };
1139
+ var isDevDebugMode = () => process.env.DEBUG === "rspress-dev";
1138
1140
  var cleanUrl = (url) => url.replace(HASH_REGEXP, "").replace(QUERY_REGEXP, "");
1139
1141
  function slash(str) {
1140
1142
  return str.replace(/\\/g, "/");
@@ -1328,6 +1330,7 @@ var mergeDocConfig = (...configs) => mergeWith_default({}, ...configs, (target,
1328
1330
  inBrowser,
1329
1331
  isDataUrl,
1330
1332
  isDebugMode,
1333
+ isDevDebugMode,
1331
1334
  isExternalUrl,
1332
1335
  isProduction,
1333
1336
  isSCM,
package/dist/index.mjs CHANGED
@@ -1077,6 +1077,7 @@ var isDebugMode = () => {
1077
1077
  const values = process.env.DEBUG?.toLocaleLowerCase().split(",") ?? [];
1078
1078
  return ["rsbuild", "builder", "*"].some((key) => values.includes(key));
1079
1079
  };
1080
+ var isDevDebugMode = () => process.env.DEBUG === "rspress-dev";
1080
1081
  var cleanUrl = (url) => url.replace(HASH_REGEXP, "").replace(QUERY_REGEXP, "");
1081
1082
  function slash(str) {
1082
1083
  return str.replace(/\\/g, "/");
@@ -1269,6 +1270,7 @@ export {
1269
1270
  inBrowser,
1270
1271
  isDataUrl,
1271
1272
  isDebugMode,
1273
+ isDevDebugMode,
1272
1274
  isExternalUrl,
1273
1275
  isProduction,
1274
1276
  isSCM,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/shared",
3
- "version": "1.37.1",
3
+ "version": "1.37.2",
4
4
  "types": "./dist/index.d.ts",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -42,7 +42,7 @@
42
42
  }
43
43
  },
44
44
  "dependencies": {
45
- "@rsbuild/core": "~1.1.3",
45
+ "@rsbuild/core": "~1.1.4",
46
46
  "chalk": "5.3.0",
47
47
  "execa": "5.1.1",
48
48
  "fs-extra": "11.2.0",