@docusaurus/theme-search-algolia 0.0.0-4628 → 0.0.0-4631

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/lib/index.js CHANGED
@@ -73,9 +73,9 @@ function themeSearchAlgolia(context) {
73
73
  : null,
74
74
  }),
75
75
  );
76
- } catch (e) {
76
+ } catch (err) {
77
77
  logger_1.default.error('Generating OpenSearch file failed.');
78
- throw e;
78
+ throw err;
79
79
  }
80
80
  }
81
81
  },
@@ -8,7 +8,6 @@ import { Joi } from '@docusaurus/utils-validation';
8
8
  import type { ThemeConfig, Validate, ValidationResult } from '@docusaurus/types';
9
9
  export declare const DEFAULT_CONFIG: {
10
10
  contextualSearch: boolean;
11
- appId: string;
12
11
  searchParameters: {};
13
12
  searchPagePath: string;
14
13
  };
@@ -12,9 +12,6 @@ exports.DEFAULT_CONFIG = {
12
12
  // enabled by default, as it makes sense in most cases
13
13
  // see also https://github.com/facebook/docusaurus/issues/5880
14
14
  contextualSearch: true,
15
- // By default, all Docusaurus sites are using the same AppId
16
- // This has been designed on purpose with Algolia.
17
- appId: 'BH4D9OD16A',
18
15
  searchParameters: {},
19
16
  searchPagePath: 'search',
20
17
  };
@@ -26,9 +23,10 @@ exports.Schema = utils_validation_1.Joi.object({
26
23
  ),
27
24
  externalUrlRegex: utils_validation_1.Joi.string().optional(),
28
25
  // Algolia attributes
29
- appId: utils_validation_1.Joi.string().default(
30
- exports.DEFAULT_CONFIG.appId,
31
- ),
26
+ appId: utils_validation_1.Joi.string().required().messages({
27
+ 'any.required':
28
+ '"algolia.appId" is required. If you haven\'t migrated to the new DocSearch infra, please refer to the blog post for instructions: https://docusaurus.io/blog/2021/11/21/algolia-docsearch-migration',
29
+ }),
32
30
  apiKey: utils_validation_1.Joi.string().required(),
33
31
  indexName: utils_validation_1.Joi.string().required(),
34
32
  searchParameters: utils_validation_1.Joi.object()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-search-algolia",
3
- "version": "0.0.0-4628",
3
+ "version": "0.0.0-4631",
4
4
  "description": "Algolia search component for Docusaurus.",
5
5
  "main": "lib/index.js",
6
6
  "exports": {
@@ -25,24 +25,24 @@
25
25
  "build:format": "prettier --config ../../.prettierrc --write \"lib/**/*.js\""
26
26
  },
27
27
  "dependencies": {
28
- "@docsearch/react": "^3.0.0-alpha.50",
29
- "@docusaurus/core": "0.0.0-4628",
30
- "@docusaurus/logger": "0.0.0-4628",
31
- "@docusaurus/theme-common": "0.0.0-4628",
32
- "@docusaurus/theme-translations": "0.0.0-4628",
33
- "@docusaurus/utils": "0.0.0-4628",
34
- "@docusaurus/utils-validation": "0.0.0-4628",
28
+ "@docsearch/react": "^3.0.0",
29
+ "@docusaurus/core": "0.0.0-4631",
30
+ "@docusaurus/logger": "0.0.0-4631",
31
+ "@docusaurus/theme-common": "0.0.0-4631",
32
+ "@docusaurus/theme-translations": "0.0.0-4631",
33
+ "@docusaurus/utils": "0.0.0-4631",
34
+ "@docusaurus/utils-validation": "0.0.0-4631",
35
35
  "algoliasearch": "^4.12.1",
36
36
  "algoliasearch-helper": "^3.7.0",
37
37
  "clsx": "^1.1.1",
38
38
  "eta": "^1.12.3",
39
- "fs-extra": "^10.0.0",
39
+ "fs-extra": "^10.0.1",
40
40
  "lodash": "^4.17.21",
41
41
  "tslib": "^2.3.1",
42
42
  "utility-types": "^3.10.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@docusaurus/module-type-aliases": "0.0.0-4628"
45
+ "@docusaurus/module-type-aliases": "0.0.0-4631"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "react": "^16.8.4 || ^17.0.0",
@@ -51,5 +51,5 @@
51
51
  "engines": {
52
52
  "node": ">=14"
53
53
  },
54
- "gitHead": "dbe66880af93183a5a691dd1e1397df004e0b0de"
54
+ "gitHead": "f280d17b332a55e34b33a59274fc584384687d47"
55
55
  }
package/src/index.ts CHANGED
@@ -85,9 +85,9 @@ export default function themeSearchAlgolia(context: LoadContext): Plugin<void> {
85
85
  faviconUrl: favicon ? normalizeUrl([siteUrl, favicon]) : null,
86
86
  }),
87
87
  );
88
- } catch (e) {
88
+ } catch (err) {
89
89
  logger.error('Generating OpenSearch file failed.');
90
- throw e;
90
+ throw err;
91
91
  }
92
92
  }
93
93
  },
@@ -13,10 +13,6 @@ export const DEFAULT_CONFIG = {
13
13
  // see also https://github.com/facebook/docusaurus/issues/5880
14
14
  contextualSearch: true,
15
15
 
16
- // By default, all Docusaurus sites are using the same AppId
17
- // This has been designed on purpose with Algolia.
18
- appId: 'BH4D9OD16A',
19
-
20
16
  searchParameters: {},
21
17
  searchPagePath: 'search',
22
18
  };
@@ -27,7 +23,10 @@ export const Schema = Joi.object({
27
23
  contextualSearch: Joi.boolean().default(DEFAULT_CONFIG.contextualSearch),
28
24
  externalUrlRegex: Joi.string().optional(),
29
25
  // Algolia attributes
30
- appId: Joi.string().default(DEFAULT_CONFIG.appId),
26
+ appId: Joi.string().required().messages({
27
+ 'any.required':
28
+ '"algolia.appId" is required. If you haven\'t migrated to the new DocSearch infra, please refer to the blog post for instructions: https://docusaurus.io/blog/2021/11/21/algolia-docsearch-migration',
29
+ }),
31
30
  apiKey: Joi.string().required(),
32
31
  indexName: Joi.string().required(),
33
32
  searchParameters: Joi.object()