@rspress/shared 1.41.2 → 1.41.3

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.
@@ -0,0 +1,7 @@
1
+ export declare const DEFAULT_CONFIG_EXTENSIONS: readonly [".js", ".ts", ".mjs", ".mts", ".cjs", ".cts"];
2
+
3
+ export declare const DEFAULT_CONFIG_NAME: "rspress.config";
4
+
5
+ export declare const DEFAULT_PAGE_EXTENSIONS: string[];
6
+
7
+ export { }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = function(exports1, definition) {
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = function(obj, prop) {
13
+ return Object.prototype.hasOwnProperty.call(obj, prop);
14
+ };
15
+ })();
16
+ (()=>{
17
+ __webpack_require__.r = function(exports1) {
18
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
19
+ value: 'Module'
20
+ });
21
+ Object.defineProperty(exports1, '__esModule', {
22
+ value: true
23
+ });
24
+ };
25
+ })();
26
+ var __webpack_exports__ = {};
27
+ __webpack_require__.r(__webpack_exports__);
28
+ __webpack_require__.d(__webpack_exports__, {
29
+ DEFAULT_CONFIG_EXTENSIONS: ()=>DEFAULT_CONFIG_EXTENSIONS,
30
+ DEFAULT_CONFIG_NAME: ()=>DEFAULT_CONFIG_NAME,
31
+ DEFAULT_PAGE_EXTENSIONS: ()=>DEFAULT_PAGE_EXTENSIONS
32
+ });
33
+ const DEFAULT_CONFIG_NAME = 'rspress.config';
34
+ const DEFAULT_CONFIG_EXTENSIONS = [
35
+ '.js',
36
+ '.ts',
37
+ '.mjs',
38
+ '.mts',
39
+ '.cjs',
40
+ '.cts'
41
+ ];
42
+ const DEFAULT_PAGE_EXTENSIONS = [
43
+ '.js',
44
+ '.jsx',
45
+ '.ts',
46
+ '.tsx',
47
+ '.md',
48
+ '.mdx'
49
+ ];
50
+ var __webpack_export_target__ = exports;
51
+ for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
52
+ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
53
+ value: true
54
+ });
@@ -0,0 +1,18 @@
1
+ const DEFAULT_CONFIG_NAME = 'rspress.config';
2
+ const DEFAULT_CONFIG_EXTENSIONS = [
3
+ '.js',
4
+ '.ts',
5
+ '.mjs',
6
+ '.mts',
7
+ '.cjs',
8
+ '.cts'
9
+ ];
10
+ const DEFAULT_PAGE_EXTENSIONS = [
11
+ '.js',
12
+ '.jsx',
13
+ '.ts',
14
+ '.tsx',
15
+ '.md',
16
+ '.mdx'
17
+ ];
18
+ export { DEFAULT_CONFIG_EXTENSIONS, DEFAULT_CONFIG_NAME, DEFAULT_PAGE_EXTENSIONS };
@@ -70,7 +70,7 @@ var __webpack_exports__ = {};
70
70
  frontmatter: data
71
71
  };
72
72
  } catch (e) {
73
- if (outputWarning) core_namespaceObject.logger.warn(`Parse frontmatter error: ${e.message} in ${external_node_path_default().relative(root, filepath)}`);
73
+ if (outputWarning) core_namespaceObject.logger.warn(`Parse frontmatter error in ${external_node_path_default().relative(root, filepath)}: \n`, e);
74
74
  }
75
75
  return {
76
76
  content: '',
@@ -9,7 +9,7 @@ function loadFrontMatter(source, filepath, root, outputWarning = false) {
9
9
  frontmatter: data
10
10
  };
11
11
  } catch (e) {
12
- if (outputWarning) __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.logger.warn(`Parse frontmatter error: ${e.message} in ${__WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].relative(root, filepath)}`);
12
+ if (outputWarning) __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.logger.warn(`Parse frontmatter error in ${__WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].relative(root, filepath)}: \n`, e);
13
13
  }
14
14
  return {
15
15
  content: '',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/shared",
3
- "version": "1.41.2",
3
+ "version": "1.41.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/web-infra-dev/rspress",
@@ -13,6 +13,11 @@
13
13
  "import": "./dist/index.mjs",
14
14
  "require": "./dist/index.js"
15
15
  },
16
+ "./constants": {
17
+ "types": "./dist/constants.d.ts",
18
+ "import": "./dist/constants.mjs",
19
+ "require": "./dist/constants.js"
20
+ },
16
21
  "./logger": {
17
22
  "types": "./dist/logger.d.ts",
18
23
  "import": "./dist/logger.mjs",