@docusaurus/core 0.0.0-4993 → 0.0.0-4997

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.
@@ -7,9 +7,11 @@
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.getThemeSwizzleConfig = exports.normalizeSwizzleConfig = void 0;
10
+ const tslib_1 = require("tslib");
10
11
  const utils_validation_1 = require("@docusaurus/utils-validation");
11
12
  const common_1 = require("./common");
12
13
  const themes_1 = require("./themes");
14
+ const logger_1 = tslib_1.__importDefault(require("@docusaurus/logger"));
13
15
  function getModuleSwizzleConfig(swizzlePlugin) {
14
16
  const getSwizzleConfig = swizzlePlugin.plugin.plugin?.getSwizzleConfig ??
15
17
  swizzlePlugin.plugin.pluginModule?.module.getSwizzleConfig ??
@@ -74,8 +76,9 @@ function getThemeSwizzleConfig(themeName, plugins) {
74
76
  try {
75
77
  return normalizeSwizzleConfig(config);
76
78
  }
77
- catch (e) {
78
- throw new Error(`Invalid Swizzle config for theme ${themeName}.\n${e.message}`);
79
+ catch (err) {
80
+ logger_1.default.error `Invalid Swizzle config for theme name=${themeName}.`;
81
+ throw err;
79
82
  }
80
83
  }
81
84
  return FallbackSwizzleConfig;
@@ -210,16 +210,16 @@ function validateKeyAndCerts({ cert, key, keyFile, crtFile, }) {
210
210
  encrypted = crypto_1.default.publicEncrypt(cert, Buffer.from('test'));
211
211
  }
212
212
  catch (err) {
213
- throw new Error(`The certificate ${crtFile} is invalid.
214
- ${err}`);
213
+ logger_1.default.error `The certificate path=${crtFile} is invalid.`;
214
+ throw err;
215
215
  }
216
216
  try {
217
217
  // privateDecrypt will throw an error with an invalid key
218
218
  crypto_1.default.privateDecrypt(key, encrypted);
219
219
  }
220
220
  catch (err) {
221
- throw new Error(`The certificate key ${keyFile} is invalid.
222
- ${err}`);
221
+ logger_1.default.error `The certificate key path=${keyFile} is invalid.`;
222
+ throw err;
223
223
  }
224
224
  }
225
225
  // Read file and throw an error if it doesn't exist
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@docusaurus/core",
3
3
  "description": "Easy to Maintain Open Source Documentation Websites",
4
- "version": "0.0.0-4993",
4
+ "version": "0.0.0-4997",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -41,13 +41,13 @@
41
41
  "@babel/runtime": "^7.17.9",
42
42
  "@babel/runtime-corejs3": "^7.17.9",
43
43
  "@babel/traverse": "^7.17.10",
44
- "@docusaurus/cssnano-preset": "0.0.0-4993",
45
- "@docusaurus/logger": "0.0.0-4993",
46
- "@docusaurus/mdx-loader": "0.0.0-4993",
44
+ "@docusaurus/cssnano-preset": "0.0.0-4997",
45
+ "@docusaurus/logger": "0.0.0-4997",
46
+ "@docusaurus/mdx-loader": "0.0.0-4997",
47
47
  "@docusaurus/react-loadable": "5.5.2",
48
- "@docusaurus/utils": "0.0.0-4993",
49
- "@docusaurus/utils-common": "0.0.0-4993",
50
- "@docusaurus/utils-validation": "0.0.0-4993",
48
+ "@docusaurus/utils": "0.0.0-4997",
49
+ "@docusaurus/utils-common": "0.0.0-4997",
50
+ "@docusaurus/utils-validation": "0.0.0-4997",
51
51
  "@slorber/static-site-generator-webpack-plugin": "^4.0.4",
52
52
  "@svgr/webpack": "^6.2.1",
53
53
  "autoprefixer": "^10.4.7",
@@ -104,8 +104,8 @@
104
104
  "webpackbar": "^5.0.2"
105
105
  },
106
106
  "devDependencies": {
107
- "@docusaurus/module-type-aliases": "0.0.0-4993",
108
- "@docusaurus/types": "0.0.0-4993",
107
+ "@docusaurus/module-type-aliases": "0.0.0-4997",
108
+ "@docusaurus/types": "0.0.0-4997",
109
109
  "@types/detect-port": "^1.3.2",
110
110
  "@types/react-dom": "^18.0.3",
111
111
  "@types/react-router-config": "^5.0.6",
@@ -125,5 +125,5 @@
125
125
  "engines": {
126
126
  "node": ">=14"
127
127
  },
128
- "gitHead": "f08d27902e366eda1e1b19b5e405d8811123c4e9"
128
+ "gitHead": "f3fed88a945da54cc2d17b5d6f463332d1965b1b"
129
129
  }