@docusaurus/core 0.0.0-5314 → 0.0.0-5318

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.
@@ -101,17 +101,24 @@ const I18N_CONFIG_SCHEMA = utils_validation_1.Joi.object({
101
101
  })
102
102
  .optional()
103
103
  .default(exports.DEFAULT_I18N_CONFIG);
104
- const SiteUrlSchema = utils_validation_1.URISchema.required().custom((value, helpers) => {
104
+ const SiteUrlSchema = utils_validation_1.Joi.string()
105
+ .required()
106
+ .custom((value, helpers) => {
105
107
  try {
106
- const { pathname } = new URL(String(value));
108
+ const { pathname } = new URL(value);
107
109
  if (pathname !== '/') {
108
110
  helpers.warn('docusaurus.configValidationWarning', {
109
111
  warningMessage: `The url is not supposed to contain a sub-path like '${pathname}'. Please use the baseUrl field for sub-paths.`,
110
112
  });
111
113
  }
112
114
  }
113
- catch { }
115
+ catch {
116
+ return helpers.error('any.invalid');
117
+ }
114
118
  return (0, utils_1.removeTrailingSlash)(value);
119
+ })
120
+ .messages({
121
+ 'any.invalid': '"{#value}" does not look like a valid URL. Make sure it has a protocol; for example, "https://example.com".',
115
122
  });
116
123
  // TODO move to @docusaurus/utils-validation
117
124
  exports.ConfigSchema = utils_validation_1.Joi.object({
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-5314",
4
+ "version": "0.0.0-5318",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -43,13 +43,13 @@
43
43
  "@babel/runtime": "^7.19.0",
44
44
  "@babel/runtime-corejs3": "^7.19.0",
45
45
  "@babel/traverse": "^7.19.0",
46
- "@docusaurus/cssnano-preset": "0.0.0-5314",
47
- "@docusaurus/logger": "0.0.0-5314",
48
- "@docusaurus/mdx-loader": "0.0.0-5314",
46
+ "@docusaurus/cssnano-preset": "0.0.0-5318",
47
+ "@docusaurus/logger": "0.0.0-5318",
48
+ "@docusaurus/mdx-loader": "0.0.0-5318",
49
49
  "@docusaurus/react-loadable": "5.5.2",
50
- "@docusaurus/utils": "0.0.0-5314",
51
- "@docusaurus/utils-common": "0.0.0-5314",
52
- "@docusaurus/utils-validation": "0.0.0-5314",
50
+ "@docusaurus/utils": "0.0.0-5318",
51
+ "@docusaurus/utils-common": "0.0.0-5318",
52
+ "@docusaurus/utils-validation": "0.0.0-5318",
53
53
  "@slorber/static-site-generator-webpack-plugin": "^4.0.7",
54
54
  "@svgr/webpack": "^6.3.1",
55
55
  "autoprefixer": "^10.4.8",
@@ -106,8 +106,8 @@
106
106
  "webpackbar": "^5.0.2"
107
107
  },
108
108
  "devDependencies": {
109
- "@docusaurus/module-type-aliases": "0.0.0-5314",
110
- "@docusaurus/types": "0.0.0-5314",
109
+ "@docusaurus/module-type-aliases": "0.0.0-5318",
110
+ "@docusaurus/types": "0.0.0-5318",
111
111
  "@types/detect-port": "^1.3.2",
112
112
  "@types/react-dom": "^18.0.6",
113
113
  "@types/react-router-config": "^5.0.6",
@@ -127,5 +127,5 @@
127
127
  "engines": {
128
128
  "node": ">=16.14"
129
129
  },
130
- "gitHead": "1d660508846285cd626ddaf2c38fb2fa478eaf08"
130
+ "gitHead": "cf69ed170f230cd78645aa3d2239a713b649ecdb"
131
131
  }