@docusaurus/plugin-client-redirects 2.0.0-beta.15a2b59f9 → 2.0.0-beta.17

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.
Files changed (36) hide show
  1. package/lib/collectRedirects.d.ts +1 -1
  2. package/lib/collectRedirects.js +30 -35
  3. package/lib/createRedirectPageContent.js +2 -4
  4. package/lib/extensionRedirects.d.ts +1 -1
  5. package/lib/extensionRedirects.js +9 -16
  6. package/lib/index.d.ts +3 -3
  7. package/lib/index.js +5 -5
  8. package/lib/normalizePluginOptions.d.ts +1 -1
  9. package/lib/normalizePluginOptions.js +2 -2
  10. package/lib/redirectValidation.d.ts +1 -1
  11. package/lib/types.d.ts +2 -14
  12. package/lib/writeRedirectFiles.d.ts +1 -1
  13. package/lib/writeRedirectFiles.js +15 -14
  14. package/package.json +16 -14
  15. package/src/collectRedirects.ts +36 -46
  16. package/src/createRedirectPageContent.ts +4 -4
  17. package/src/extensionRedirects.ts +9 -17
  18. package/src/index.ts +5 -4
  19. package/src/normalizePluginOptions.ts +6 -2
  20. package/src/plugin-client-redirects.d.ts +27 -0
  21. package/src/redirectValidation.ts +1 -1
  22. package/src/types.ts +2 -22
  23. package/src/writeRedirectFiles.ts +17 -14
  24. package/lib/.tsbuildinfo +0 -1
  25. package/src/__tests__/__snapshots__/collectRedirects.test.ts.snap +0 -27
  26. package/src/__tests__/__snapshots__/createRedirectPageContent.test.ts.snap +0 -29
  27. package/src/__tests__/__snapshots__/normalizePluginOptions.test.ts.snap +0 -35
  28. package/src/__tests__/__snapshots__/redirectValidation.test.ts.snap +0 -11
  29. package/src/__tests__/__snapshots__/writeRedirectFiles.test.ts.snap +0 -147
  30. package/src/__tests__/collectRedirects.test.ts +0 -340
  31. package/src/__tests__/createRedirectPageContent.test.ts +0 -26
  32. package/src/__tests__/extensionRedirects.test.ts +0 -143
  33. package/src/__tests__/normalizePluginOptions.test.ts +0 -76
  34. package/src/__tests__/redirectValidation.test.ts +0 -66
  35. package/src/__tests__/writeRedirectFiles.test.ts +0 -204
  36. package/tsconfig.json +0 -10
@@ -5,16 +5,15 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import {flatten} from 'lodash';
9
8
  import {
10
9
  addTrailingSlash,
11
10
  removeSuffix,
12
11
  removeTrailingSlash,
13
12
  } from '@docusaurus/utils';
14
- import {RedirectMetadata} from './types';
13
+ import type {RedirectMetadata} from './types';
15
14
 
16
15
  const ExtensionAdditionalMessage =
17
- 'If the redirect extension system is not good enough for your usecase, you can create redirects yourself with the "createRedirects" plugin option.';
16
+ 'If the redirect extension system is not good enough for your use case, you can create redirects yourself with the "createRedirects" plugin option.';
18
17
 
19
18
  const validateExtension = (ext: string) => {
20
19
  if (!ext) {
@@ -62,7 +61,7 @@ export function createToExtensionsRedirects(
62
61
  return [];
63
62
  };
64
63
 
65
- return flatten(paths.map(createPathRedirects));
64
+ return paths.flatMap(createPathRedirects);
66
65
  }
67
66
 
68
67
  // Create new /path.html/index.html that redirects to existing an /path
@@ -82,22 +81,15 @@ export function createFromExtensionsRedirects(
82
81
  if (path === '' || path === '/' || alreadyEndsWithAnExtension(path)) {
83
82
  return [];
84
83
  }
85
-
86
- // /path => /path.html
87
- // /path/ => /path.html/
88
- function getFrom(ext: string) {
89
- if (path.endsWith('/')) {
90
- return addTrailingSlash(`${removeTrailingSlash(path)}.${ext}`);
91
- } else {
92
- return `${path}.${ext}`;
93
- }
94
- }
95
-
96
84
  return extensions.map((ext) => ({
97
- from: getFrom(ext),
85
+ // /path => /path.html
86
+ // /path/ => /path.html/
87
+ from: path.endsWith('/')
88
+ ? addTrailingSlash(`${removeTrailingSlash(path)}.${ext}`)
89
+ : `${path}.${ext}`,
98
90
  to: path,
99
91
  }));
100
92
  };
101
93
 
102
- return flatten(paths.map(createPathRedirects));
94
+ return paths.flatMap(createPathRedirects);
103
95
  }
package/src/index.ts CHANGED
@@ -5,20 +5,21 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import {LoadContext, Plugin, Props} from '@docusaurus/types';
9
- import {UserPluginOptions, PluginContext, RedirectMetadata} from './types';
8
+ import type {LoadContext, Plugin, Props} from '@docusaurus/types';
9
+ import type {PluginContext, RedirectMetadata} from './types';
10
+ import type {PluginOptions} from '@docusaurus/plugin-client-redirects';
10
11
 
11
12
  import normalizePluginOptions from './normalizePluginOptions';
12
13
  import collectRedirects from './collectRedirects';
13
14
  import writeRedirectFiles, {
14
15
  toRedirectFilesMetadata,
15
- RedirectFileMetadata,
16
+ type RedirectFileMetadata,
16
17
  } from './writeRedirectFiles';
17
18
  import {removePrefix, addLeadingSlash} from '@docusaurus/utils';
18
19
 
19
20
  export default function pluginClientRedirectsPages(
20
21
  context: LoadContext,
21
- opts: UserPluginOptions,
22
+ opts: PluginOptions,
22
23
  ): Plugin<unknown> {
23
24
  const {trailingSlash} = context.siteConfig;
24
25
 
@@ -5,9 +5,13 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import {PluginOptions, RedirectOption, UserPluginOptions} from './types';
8
+ import type {
9
+ PluginOptions,
10
+ Options as UserPluginOptions,
11
+ RedirectOption,
12
+ } from '@docusaurus/plugin-client-redirects';
9
13
  import {Joi, PathnameSchema} from '@docusaurus/utils-validation';
10
- import {DEFAULT_PLUGIN_ID} from '@docusaurus/core/lib/constants';
14
+ import {DEFAULT_PLUGIN_ID} from '@docusaurus/utils';
11
15
 
12
16
  export const DefaultPluginOptions: PluginOptions = {
13
17
  id: DEFAULT_PLUGIN_ID, // TODO temporary
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ export type RedirectOption = {
9
+ to: string;
10
+ from: string | string[];
11
+ };
12
+
13
+ // For a given existing route path,
14
+ // return all the paths from which we should redirect from
15
+ export type CreateRedirectsFnOption = (
16
+ path: string,
17
+ ) => string[] | string | null | undefined;
18
+
19
+ export type PluginOptions = {
20
+ id: string;
21
+ fromExtensions: string[];
22
+ toExtensions: string[];
23
+ redirects: RedirectOption[];
24
+ createRedirects?: CreateRedirectsFnOption;
25
+ };
26
+
27
+ export type Options = Partial<PluginOptions>;
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import {RedirectMetadata} from './types';
8
+ import type {RedirectMetadata} from './types';
9
9
  import {Joi, PathnameSchema} from '@docusaurus/utils-validation';
10
10
 
11
11
  const RedirectSchema = Joi.object<RedirectMetadata>({
package/src/types.ts CHANGED
@@ -5,28 +5,8 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import {Props} from '@docusaurus/types';
9
-
10
- export type PluginOptions = {
11
- id: string;
12
- fromExtensions: string[];
13
- toExtensions: string[];
14
- redirects: RedirectOption[];
15
- createRedirects?: CreateRedirectsFnOption;
16
- };
17
-
18
- // For a given existing route path,
19
- // return all the paths from which we should redirect from
20
- export type CreateRedirectsFnOption = (
21
- path: string,
22
- ) => string[] | string | null | undefined;
23
-
24
- export type RedirectOption = {
25
- to: string;
26
- from: string | string[];
27
- };
28
-
29
- export type UserPluginOptions = Partial<PluginOptions>;
8
+ import type {Props} from '@docusaurus/types';
9
+ import type {PluginOptions} from '@docusaurus/plugin-client-redirects';
30
10
 
31
11
  // The minimal infos the plugin needs to work
32
12
  export type PluginContext = Pick<Props, 'outDir' | 'baseUrl'> & {
@@ -7,9 +7,9 @@
7
7
 
8
8
  import fs from 'fs-extra';
9
9
  import path from 'path';
10
- import {memoize} from 'lodash';
10
+ import _ from 'lodash';
11
11
 
12
- import {PluginContext, RedirectMetadata} from './types';
12
+ import type {PluginContext, RedirectMetadata} from './types';
13
13
  import createRedirectPageContent from './createRedirectPageContent';
14
14
  import {normalizeUrl} from '@docusaurus/utils';
15
15
 
@@ -25,7 +25,8 @@ export function createToUrl(baseUrl: string, to: string): string {
25
25
  }
26
26
 
27
27
  // Create redirect file path
28
- // Make sure this path has lower precedence over the original file path when served by host providers!
28
+ // Make sure this path has lower precedence over the original file path when
29
+ // served by host providers!
29
30
  // Otherwise it can produce infinite redirect loops!
30
31
  //
31
32
  // See https://github.com/facebook/docusaurus/issues/5055
@@ -39,17 +40,19 @@ function getRedirectFilePath(
39
40
  const filePath = path.dirname(fromPath);
40
41
  // Edge case for https://github.com/facebook/docusaurus/pull/5102
41
42
  // If the redirect source path is /xyz, with file /xyz.html
42
- // We can't write the redirect file at /xyz.html/index.html because for Unix FS, a file/folder can't have the same name "xyz.html"
43
- // The only possible solution for a redirect file is thus /xyz.html.html (I know, looks suspicious)
43
+ // We can't write the redirect file at /xyz.html/index.html because for Unix
44
+ // FS, a file/folder can't have the same name "xyz.html"
45
+ // The only possible solution for a redirect file is thus /xyz.html.html (I
46
+ // know, looks suspicious)
44
47
  if (trailingSlash === false && fileName.endsWith('.html')) {
45
48
  return path.join(filePath, `${fileName}.html`);
46
49
  }
47
- // If the target path is /xyz, with file /xyz/index.html, we don't want the redirect file to be /xyz.html
48
- // otherwise it would be picked in priority and the redirect file would redirect to itself
49
- // We prefer the redirect file to be /xyz.html/index.html, served with lower priority for most static hosting tools
50
- else {
51
- return path.join(filePath, `${fileName}/index.html`);
52
- }
50
+ // If the target path is /xyz, with file /xyz/index.html, we don't want the
51
+ // redirect file to be /xyz.html, otherwise it would be picked in priority and
52
+ // the redirect file would redirect to itself. We prefer the redirect file to
53
+ // be /xyz.html/index.html, served with lower priority for most static hosting
54
+ // tools
55
+ return path.join(filePath, `${fileName}/index.html`);
53
56
  }
54
57
 
55
58
  export function toRedirectFilesMetadata(
@@ -60,9 +63,9 @@ export function toRedirectFilesMetadata(
60
63
  // Perf: avoid rendering the template twice with the exact same "props"
61
64
  // We might create multiple redirect pages for the same destination url
62
65
  // note: the first fn arg is the cache key!
63
- const createPageContentMemoized = memoize((toUrl: string) => {
64
- return createRedirectPageContent({toUrl});
65
- });
66
+ const createPageContentMemoized = _.memoize((toUrl: string) =>
67
+ createRedirectPageContent({toUrl}),
68
+ );
66
69
 
67
70
  const createFileMetadata = (redirect: RedirectMetadata) => {
68
71
  const fileRelativePath = getRedirectFilePath(redirect.from, trailingSlash);
package/lib/.tsbuildinfo DELETED
@@ -1 +0,0 @@
1
- {"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/tslib/tslib.d.ts","../../../node_modules/@types/lodash/common/common.d.ts","../../../node_modules/@types/lodash/common/array.d.ts","../../../node_modules/@types/lodash/common/collection.d.ts","../../../node_modules/@types/lodash/common/date.d.ts","../../../node_modules/@types/lodash/common/function.d.ts","../../../node_modules/@types/lodash/common/lang.d.ts","../../../node_modules/@types/lodash/common/math.d.ts","../../../node_modules/@types/lodash/common/number.d.ts","../../../node_modules/@types/lodash/common/object.d.ts","../../../node_modules/@types/lodash/common/seq.d.ts","../../../node_modules/@types/lodash/common/string.d.ts","../../../node_modules/@types/lodash/common/util.d.ts","../../../node_modules/@types/lodash/index.d.ts","../../../node_modules/webpack/node_modules/@types/estree/index.d.ts","../../../node_modules/@types/json-schema/index.d.ts","../../../node_modules/ajv/lib/ajv.d.ts","../../../node_modules/schema-utils/declarations/ValidationError.d.ts","../../../node_modules/schema-utils/declarations/validate.d.ts","../../../node_modules/schema-utils/declarations/index.d.ts","../../../node_modules/tapable/tapable.d.ts","../../../node_modules/webpack/types.d.ts","../../docusaurus-types/node_modules/commander/typings/index.d.ts","../../../node_modules/joi/lib/index.d.ts","../../docusaurus-types/src/index.d.ts","../src/types.ts","../../docusaurus-utils/lib/posixPath.d.ts","../../docusaurus-utils/lib/codeTranslationsUtils.d.ts","../../docusaurus-utils/lib/markdownParser.d.ts","../../docusaurus-utils/lib/markdownLinks.d.ts","../../docusaurus-utils/lib/escapePath.d.ts","../../docusaurus-utils/lib/hashUtils.d.ts","../../docusaurus-utils/lib/index.d.ts","../src/extensionRedirects.ts","../../docusaurus-utils-validation/lib/Joi.d.ts","../../docusaurus-utils-validation/lib/validationUtils.d.ts","../../docusaurus-utils-validation/lib/validationSchemas.d.ts","../../docusaurus-utils-validation/lib/index.d.ts","../src/redirectValidation.ts","../../docusaurus-utils-common/lib/applyTrailingSlash.d.ts","../../docusaurus-utils-common/lib/uniq.d.ts","../../docusaurus-utils-common/lib/index.d.ts","../../../node_modules/chalk/index.d.ts","../src/collectRedirects.ts","../../../node_modules/eta/dist/types/compile.d.ts","../../../node_modules/eta/dist/types/storage.d.ts","../../../node_modules/eta/dist/types/config.d.ts","../../../node_modules/eta/dist/types/file-handlers.d.ts","../../../node_modules/eta/dist/types/compile-string.d.ts","../../../node_modules/eta/dist/types/parse.d.ts","../../../node_modules/eta/dist/types/render.d.ts","../../../node_modules/eta/dist/types/containers.d.ts","../../../node_modules/eta/dist/types/index.d.ts","../src/templates/redirectPage.template.html.ts","../src/createRedirectPageContent.ts","../../docusaurus/lib/constants.d.ts","../src/normalizePluginOptions.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/globals.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/console.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/constants.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/diagnostic_channel.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/dns.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/domain.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/events.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/fs.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/http.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/http2.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/https.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/module.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/net.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/os.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/path.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/process.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/readline.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/repl.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/stream.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/timers.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/tls.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/tty.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/url.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/util.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/util/types.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/v8.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/vm.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/ts3.6/base.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/assert.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/base.d.ts","../../../node_modules/@types/fs-extra/node_modules/@types/node/index.d.ts","../../../node_modules/@types/fs-extra/index.d.ts","../src/writeRedirectFiles.ts","../src/index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","eb75e89d63b3b72dd9ca8b0cac801cecae5be352307c004adeaa60bc9d6df51f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"60761e6ea886034af0f294f025a7199360ce4e2c8ba4ec6408bc049cf9b89799","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"cd6efb9467a8b6338ece2e2855e37765700f2cd061ca54b01b33878cf5c7677e","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e","affectsGlobalScope":true},"ea7abf23498b7c214c67fc14f22f41983fbb7bf7c4826c7fcdef542b2022545f","3594c022901a1c8993b0f78a3f534cfb81e7b619ed215348f7f6882f3db02abc","438284c7c455a29b9c0e2d1e72abc62ee93d9a163029ffe918a34c5db3b92da2","0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","782abf371043fc65a987f835a3acfd80602a30c3e2122f6d5756a86bf6913352","509235563ea2b939e1bbe92aae17e71e6a82ceab8f568b45fb4fce7d72523a32","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","82251920b05f30981c9a4109cb5f3169dce4b477effc845c6d781044a30e7672","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","4908e4c00832b26ce77a629de8501b0e23a903c094f9e79a7fec313a15da796a","2630a7cbb597e85d713b7ef47f2946d4280d3d4c02733282770741d40672b1a5",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},"f1e8ecd1d960d12e57316fd2889b0a57635f38f8c4c976d8deafa29650bbf320","3a1e165b22a1cb8df82c44c9a09502fd2b33f160cd277de2cd3a055d8e5c6b27","67f129ed8b372622ff36b8b10e39d03e09e363a5ff7821105f92f085b8d1ccba","327f42ab31ff4539ba868d0374f8825af328b104b5f78d26b2e3ce9cc17b43a0","62a05210201c793349ec28254f06a01814c5b4f5591f6d1921941286db78ea2a","8f877178233f74095130e129ce86128a6a15afcfc6171d714e154863b6a65fe8","b395ec0779c66de885f97974534e95ee2c8bbf9acaf5857a6782ddc32972b6d8","572b4d4c4e2cd3026db925ca5cb721f5c3f4f52938da404de1148a126348f29b","c72b982add26c5ddf410899bcafe3f47253a5d274d4b93d2ef67850d4af4545b","332bc92a89da24ef3a645208f2b3159292460a52fbe63c40eef64c2a63bb1e40","aefb89303293b92387354bd8464557e02efa728bfd0d7f9316579092e9e47856","57dc389181eeb619a8b10299e3447cd6d9b216453af993abda5afedd6b39b455","0daf3165e72cc1ed5263a3374b98cb065f78922c76602477973ee0654b99df17","98249526332851a623664fd515a293f50d680d4a86d633585ecb9168e67cd872","3fedee34f24b13af4a97c4184a9e215a6f6b2dfb655dafc24970c76791b06c43","4fae0cbdbb492b0fc847ec76d0a4af44eb04028200cec088d97fca05438213f1","c7642b1c7345e546c81831fe5fa9233e15a12fa2743f6685b0d700af8292cdd0","857d6d4a53c4372a2799e733ab122d28f7b2b580fe58b80a5fe1321a733c20f7","2c20d6df034f99432a23cfd95b2e48784fe4224cc9c0bc4094881c99bce1ef66","f69977513b0d68b014b1a9f0442d5a426981da391870d15626b595206be9ae62","889859c907d8388cfe92d4bdfe5b5ff0885a41e6e4568691230e21757f7673c9","d62aae9510ec58d3533a76b9915dae85dea65aa39c915613dc9f47918f596b1e","57e1940021e5e3ff12963f4218195c786a0d2a475a400fffb7cdd4352823854d","01c67feaa6d785a1f958c92f0e1eabdd69bd5e44cbd8a233b89a247ad9bb1dc3","700c2f83a83482242336bf0033edbd961105577f16b9cf549333159fc719add2","63c9b50b55f320e8da81290acd27de8e1dab92e13b3ec7f24b80fde9dd80b795","efc0cf69f54f6d4fbdcc205cc938f1f6f6f1d63fbcb7b3f912a4755805b05b31","20da58cecd1ad8c239745c7ebb8ae0729c182223650702ec816d3bdec566e3bb","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","b12f0a6baceceb49f0f3db81a91b21ba490993ff6aff649cdb7393822cbcc301","a3cf09a8ce34726b0557b3e51135a6768b464e86b7190355e42f10ba368e9786","dcd04eabb6c23406dc589f688c7a83d25a8aa0c93ee34c0be1114113c32792d6","0a21f90e2ffaf26b305183fd2029a7dd512bb3189a9d6842ba764782e609429e","5560fae6a4c210279d4c913e62dfa82f6ebbc283800e430c4ec54e20216e4b2f","bd868c7a5868f2680d332b85283be6be45edb766a95c4b8034aff7c741ab1aad","5ec0c5db09dfb4f1cd140417dc86fed025bd757d63c11fe2c4148ec12fd20111","2737dcbf71e062619538a0d3075795be33900ccf377d5dae1e90197f95787566","2db6353e2fdcbd2842b5b0a36d11e11ffbff703552e19481a55a63155e14c6be","74175ef96c3d3cb5e7bcaf0387ca4cc3de9f1bf68b42a082d8be5e79178c2c7e","37723b12b6a526579c9a467ab70a9414fc30994e24bd4b9dae41148ed3e112a1","63a254a5a16ee3457a0dd00dedacc0d76cc7897b976ec64d59d149d43c4859b7","4977865ec3570795ce920e30b51b6c345ad782bd804202e80d95fc1a09299a7d","c8c407861245162fcf6c4a65125331964efa6f75972dd908ea0e2ba13ca77b33","c7bdc99177a2a94d25fb13722adaaf5b3291bf70b4d1b27584ba189dd3889ba3",{"version":"7c4064a324cd755a9b281d5795fc6ebd9dd713b1c356220185c61eb1b2d0f1af","affectsGlobalScope":true},"e23424b97418eca3226fd24de079f1203eb70360622e4e093af2aff14d4be6ec","ff16181fe134bb123283eb6777c624f6f3ee3f5c17d70b8447fa68af0935d312","54868134aa26f98b6fbc8d28040d8a0f5e64a1cb0dfac7f059b35cac99d626f2","04eaa93bd75f937f9184dcb95a7983800c5770cf8ddd8ac0f3734dc02f5b20ef",{"version":"7ddd5487c03df04c01a8618e06d875e167524902ed3dd9a2a9345a0ef5202d6f","affectsGlobalScope":true},"45ac321f2e15d268fd74a90ddaa6467dcaaff2c5b13f95b4b85831520fb7a491","dfc747ab8dd5f623055a4c26fd35e8cceca869fd3f1cf09701c941ca3679665a","c9f5f2920ff61d7158417b8440d5181ddc34a3dfef811a5677dd8a9fb91471e9","5cc0a492da3602510b8f5ed1852b1e0390002780d8758fbc8c0cd023ca7085f8","ec7dafafe751a5121f8f1c80201ebe7e7238c47e6329280a73c4d1ca4bb7fa28","64debeb10e4b7ae4ec9e89bfb4e04c6101ab98c3cc806d14e5488607cfec2753",{"version":"2866a528b2708aa272ec3eaafd3c980abb23aec1ef831cfc5eb2186b98c37ce5","affectsGlobalScope":true},{"version":"a5782d6cea81fe43d2db7ed41e789458c933ab3ab60602f7b5b14c4da3370496","affectsGlobalScope":true},"b86b7ff709a82ef3cba2184136c025989958bad483ffb13e4ca35d720245adf4","05b1c856de9c8f2c09c86a89455e25965342496ebe6d089760a9646c51295c76","c0d983dfc997b446ec8e456dea90e8c0c97ba896d55d7e34dfc351f32c405eb9","b447e123210c68f205f67b20c996c04a1eb64b0e591c5e06e164cd3d3a869b28","13257840c0850d4ebd7c2b17604a9e006f752de76c2400ebc752bc465c330452","42176966283d3835c34278b9b5c0f470d484c0c0c6a55c20a2c916a1ce69b6e8","0cff7901aedfe78e314f7d44088f07e2afa1b6e4f0473a4169b8456ca2fb245d","6ea59cf5479f3fad5db2caa4513d8d06d6cfee8d8df69e7a040c9b5b7f25f39c","e2236264a811ed1d09a2487a433e8f5216ae62378cf233954ae220cf886f6717","3ec1e108d587a5661ec790db607f482605ba9f3830e118ce578e3ffa3c42e22b","100b3bb9d39d2b1b5340f1bf45a52e94ef1692b45232b4ba00fac5c3cc56d331",{"version":"ec1a29ddaecb683aa360df0bd98ab5d4171d2d549554f7c5ab2a5c183a3dcb67","affectsGlobalScope":true},"7f77304372efe3c9967e5f9ea2061f1b4bf41dc3cda3c83cdd676f2e5af6b7e6","992c6f6be16c0a1d2eec13ece33adeea2c747ba27fcd078353a8f4bb5b4fea58","2597718d91e306949d89e285bf34c44192014ef541c3bd7cbb825c022749e974","a6b0abdb67d63ebe964ba5fee31bc3daf10c12eecd46b24d778426010c04c67e","ac4801ebc2355ba32329070123b1cd15891bf71b41dcaf9e75b4744832126a59","fd2298fba0640e7295e7bd545e2dfbfcccbb00c27019e501c87965a02bbdebf6","4fd3c4debadce3e9ab9dec3eb45f7f5e2e3d4ad65cf975a6d938d883cfb25a50","71ddd49185b68f27bfac127ef5d22cb2672c278e53e5370d9020ef50ca9c377d","b1ea7a6eaa7608e0e0529aebd323b526a79c6c05a4e519ae5c779675004dcdf1","9fcb033a6208485d8f3fadde31eb5cbcaf99149cff3e40c0dc53ebc6d0dff4e9","7df562288f949945cf69c21cd912100c2afedeeb7cdb219085f7f4b46cb7dde4","9d16690485ff1eb4f6fc57aebe237728fd8e03130c460919da3a35f4d9bd97f5","dcc6910d95a3625fd2b0487fda055988e46ab46c357a1b3618c27b4a8dd739c9","f4149f1aa299474c7040a35fe8f8ac2ad078cc1b190415adc1fff3ed52d490ea","3730099ed008776216268a97771de31753ef71e0a7d0ec650f588cba2a06ce44","8d649dbc429d7139a1d9a14ea2bf8af1dc089e0a879447539587463d4b6c248c","60c9e27816ec8ac8df7240598bb086e95b47edfb454c5cbf4003c812e0ed6e39","e361aecf17fc4034b4c122a1564471cdcd22ef3a51407803cb5a5fc020c04d02","4926467de88a92a4fc9971d8c6f21b91eca1c0e7fc2a46cc4638ab9440c73875",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"fc0ae4a8ad3c762b96f9d2c3700cb879a373458cb0bf3175478e3b4f85f7ef2f","fabbec378e1ddd86fcf2662e716c2b8318acedb664ee3a4cba6f9e8ee8269cf1","b3593bd345ebea5e4d0a894c03251a3774b34df3d6db57075c18e089a599ba76","e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b","13c7832f048b08604b7e88b69247aecf955bb7b27a0881c2f7f23bb645435479","8d01c38ccb9af3a4035a68818799e5ef32ccc8cf70bdb83e181e1921d7ad32f6","e416db84fd295bcdc144cdbbac861045b0d08608bdb5eaa8ac326864d87114af","c16e15a7bbbb323cdf9df7a6b05a96b474831768886e0c85f5e0df3275249923"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"declarationMap":false,"esModuleInterop":true,"importHelpers":true,"jsx":2,"module":1,"noEmitHelpers":true,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noImplicitThis":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strictFunctionTypes":true,"strictNullChecks":true,"strictPropertyInitialization":true,"target":6,"tsBuildInfoFile":"./.tsbuildinfo"},"fileIdsList":[[117,153],[151],[150,151],[105,110],[116,117,124,133],[106,116,124],[142],[110,117,125],[133,138],[113,116,124],[114],[113],[116],[116,118,133,141],[116,117],[124,133,141],[116,117,119,124,133,138,141],[119,138,141],[152],[141],[113,116,133],[126],[104],[140],[131,142,145],[116,134],[133],[136],[110,124],[102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149],[124],[130],[143],[105,110,116,118,127,133,141,145],[46,48,49,50,51,52,53,54,55,56,57,58],[46,47,49,50,51,52,53,54,55,56,57,58],[47,48,49,50,51,52,53,54,55,56,57,58],[46,47,48,50,51,52,53,54,55,56,57,58],[46,47,48,49,51,52,53,54,55,56,57,58],[46,47,48,49,50,52,53,54,55,56,57,58],[46,47,48,49,50,51,53,54,55,56,57,58],[46,47,48,49,50,51,52,54,55,56,57,58],[46,47,48,49,50,51,52,53,55,56,57,58],[46,47,48,49,50,51,52,53,54,56,57,58],[46,47,48,49,50,51,52,53,54,55,57,58],[46,47,48,49,50,51,52,53,54,55,56,58],[46,47,48,49,50,51,52,53,54,55,56,57],[91],[91,92],[89,90],[89,91],[89,91,92,93,94,95,96],[89,91,92],[60,61,63],[62,63],[60,61,62],[59,63,64,65],[45,58,70,78,83,86,87],[45,58,97,98],[45,58,70,77],[45,69,70,77,88,101,155],[45,70,82,100],[45,70,82],[45],[45,69],[45,58,70,77,99,126,154],[66,67,68,130],[69],[84,85],[68],[79,80,81],[79],[69,71,72,73,74,75,76]],"referencedMap":[[154,1],[102,2],[152,3],[105,4],[106,5],[107,6],[108,7],[109,8],[110,9],[111,10],[113,11],[114,12],[115,13],[116,13],[117,14],[118,15],[119,16],[120,17],[121,18],[153,19],[122,13],[123,20],[124,21],[126,22],[127,23],[128,24],[131,13],[132,25],[133,26],[134,27],[136,13],[137,28],[138,29],[150,30],[140,31],[141,32],[142,33],[144,27],[146,34],[147,27],[47,35],[48,36],[46,37],[49,38],[50,39],[51,40],[52,41],[53,42],[54,43],[55,44],[56,45],[57,46],[58,47],[93,48],[89,49],[91,50],[96,50],[92,51],[97,52],[94,48],[95,53],[62,54],[64,55],[63,56],[66,57],[88,58],[99,59],[78,60],[156,61],[101,62],[83,63],[98,64],[70,65],[155,66],[69,67],[84,68],[86,69],[79,70],[82,71],[81,72],[80,72],[77,73]],"exportedModulesMap":[[154,1],[102,2],[152,3],[105,4],[106,5],[107,6],[108,7],[109,8],[110,9],[111,10],[113,11],[114,12],[115,13],[116,13],[117,14],[118,15],[119,16],[120,17],[121,18],[153,19],[122,13],[123,20],[124,21],[126,22],[127,23],[128,24],[131,13],[132,25],[133,26],[134,27],[136,13],[137,28],[138,29],[150,30],[140,31],[141,32],[142,33],[144,27],[146,34],[147,27],[47,35],[48,36],[46,37],[49,38],[50,39],[51,40],[52,41],[53,42],[54,43],[55,44],[56,45],[57,46],[58,47],[93,48],[89,49],[91,50],[96,50],[92,51],[97,52],[94,48],[95,53],[62,54],[64,55],[63,56],[66,57],[88,58],[99,59],[78,60],[156,61],[101,62],[83,63],[98,64],[70,65],[155,66],[69,67],[84,68],[86,69],[79,70],[82,71],[81,72],[80,72],[77,73]],"semanticDiagnosticsPerFile":[154,151,102,104,152,105,106,107,108,109,110,111,112,113,114,115,116,117,118,103,148,119,120,121,153,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,150,140,141,142,143,144,145,149,146,147,60,47,48,46,49,50,51,52,53,54,55,56,57,58,61,87,93,89,91,96,92,97,94,95,90,68,62,64,63,65,45,10,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,40,36,37,38,39,8,41,42,43,1,9,44,59,66,88,99,78,156,101,83,98,70,155,67,69,84,86,85,79,82,81,80,72,75,76,77,74,73,71,100]},"version":"4.3.2"}
@@ -1,27 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`collectRedirects should throw if plugin option redirects contain invalid to paths 1`] = `
4
- "You are trying to create client-side redirections to paths that do not exist:
5
- - /this/path/does/not/exist2
6
- - /this/path/does/not/exist2
7
-
8
- Valid paths you can redirect to:
9
- - /
10
- - /someExistingPath
11
- - /anotherExistingPath
12
- "
13
- `;
14
-
15
- exports[`collectRedirects should throw if redirect creator creates array of array redirect 1`] = `
16
- "Some created redirects are invalid:
17
- - {\\"from\\":[\\"/fromPath\\"],\\"to\\":\\"/\\"} => Validation error: \\"from\\" must be a string
18
- "
19
- `;
20
-
21
- exports[`collectRedirects should throw if redirect creator creates invalid redirects 1`] = `
22
- "Some created redirects are invalid:
23
- - {\\"from\\":\\"https://google.com/\\",\\"to\\":\\"/\\"} => Validation error: \\"from\\" is not a valid pathname. Pathname should start with slash and not contain any domain or query string.
24
- - {\\"from\\":\\"//abc\\",\\"to\\":\\"/\\"} => Validation error: \\"from\\" is not a valid pathname. Pathname should start with slash and not contain any domain or query string.
25
- - {\\"from\\":\\"/def?queryString=toto\\",\\"to\\":\\"/\\"} => Validation error: \\"from\\" is not a valid pathname. Pathname should start with slash and not contain any domain or query string.
26
- "
27
- `;
@@ -1,29 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`createRedirectPageContent should encode uri special chars 1`] = `
4
- "<!DOCTYPE html>
5
- <html>
6
- <head>
7
- <meta charset=\\"UTF-8\\">
8
- <meta http-equiv=\\"refresh\\" content=\\"0; url=https://docusaurus.io/gr/%CF%83%CE%B5%CE%BB%CE%B9%CE%B4%CE%B1%CF%82/\\">
9
- <link rel=\\"canonical\\" href=\\"https://docusaurus.io/gr/%CF%83%CE%B5%CE%BB%CE%B9%CE%B4%CE%B1%CF%82/\\" />
10
- </head>
11
- <script>
12
- window.location.href = 'https://docusaurus.io/gr/%CF%83%CE%B5%CE%BB%CE%B9%CE%B4%CE%B1%CF%82/';
13
- </script>
14
- </html>"
15
- `;
16
-
17
- exports[`createRedirectPageContent should match snapshot 1`] = `
18
- "<!DOCTYPE html>
19
- <html>
20
- <head>
21
- <meta charset=\\"UTF-8\\">
22
- <meta http-equiv=\\"refresh\\" content=\\"0; url=https://docusaurus.io/\\">
23
- <link rel=\\"canonical\\" href=\\"https://docusaurus.io/\\" />
24
- </head>
25
- <script>
26
- window.location.href = 'https://docusaurus.io/';
27
- </script>
28
- </html>"
29
- `;
@@ -1,35 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`normalizePluginOptions should reject bad createRedirects user inputs 1`] = `
4
- "Invalid @docusaurus/plugin-client-redirects options: \\"createRedirects\\" must be of type function
5
- {
6
- \\"createRedirects\\": [
7
- \\"bad\\",
8
- \\"value\\"
9
- ]
10
- }"
11
- `;
12
-
13
- exports[`normalizePluginOptions should reject bad fromExtensions user inputs 1`] = `
14
- "Invalid @docusaurus/plugin-client-redirects options: \\"fromExtensions[0]\\" contains an invalid value
15
- {
16
- \\"fromExtensions\\": [
17
- null,
18
- null,
19
- 123,
20
- true
21
- ]
22
- }"
23
- `;
24
-
25
- exports[`normalizePluginOptions should reject bad toExtensions user inputs 1`] = `
26
- "Invalid @docusaurus/plugin-client-redirects options: \\"toExtensions[0]\\" contains an invalid value
27
- {
28
- \\"toExtensions\\": [
29
- null,
30
- null,
31
- 123,
32
- true
33
- ]
34
- }"
35
- `;
@@ -1,11 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`validateRedirect throw for bad redirects 1`] = `"{\\"from\\":\\"https://fb.com/fromSomePath\\",\\"to\\":\\"/toSomePath\\"} => Validation error: \\"from\\" is not a valid pathname. Pathname should start with slash and not contain any domain or query string."`;
4
-
5
- exports[`validateRedirect throw for bad redirects 2`] = `"{\\"from\\":\\"/fromSomePath\\",\\"to\\":\\"https://fb.com/toSomePath\\"} => Validation error: \\"to\\" is not a valid pathname. Pathname should start with slash and not contain any domain or query string."`;
6
-
7
- exports[`validateRedirect throw for bad redirects 3`] = `"{\\"from\\":\\"/fromSomePath\\",\\"to\\":\\"/toSomePath?queryString=xyz\\"} => Validation error: \\"to\\" is not a valid pathname. Pathname should start with slash and not contain any domain or query string."`;
8
-
9
- exports[`validateRedirect throw for bad redirects 4`] = `"{\\"from\\":null,\\"to\\":\\"/toSomePath?queryString=xyz\\"} => Validation error: \\"from\\" must be a string"`;
10
-
11
- exports[`validateRedirect throw for bad redirects 5`] = `"{\\"from\\":[\\"heyho\\"],\\"to\\":\\"/toSomePath?queryString=xyz\\"} => Validation error: \\"from\\" must be a string"`;
@@ -1,147 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`toRedirectFilesMetadata should create appropriate metadatas for empty baseUrl: fileContent baseUrl=empty 1`] = `
4
- Array [
5
- "<!DOCTYPE html>
6
- <html>
7
- <head>
8
- <meta charset=\\"UTF-8\\">
9
- <meta http-equiv=\\"refresh\\" content=\\"0; url=/abc\\">
10
- <link rel=\\"canonical\\" href=\\"/abc\\" />
11
- </head>
12
- <script>
13
- window.location.href = '/abc';
14
- </script>
15
- </html>",
16
- ]
17
- `;
18
-
19
- exports[`toRedirectFilesMetadata should create appropriate metadatas for root baseUrl: fileContent baseUrl=/ 1`] = `
20
- Array [
21
- "<!DOCTYPE html>
22
- <html>
23
- <head>
24
- <meta charset=\\"UTF-8\\">
25
- <meta http-equiv=\\"refresh\\" content=\\"0; url=/abc\\">
26
- <link rel=\\"canonical\\" href=\\"/abc\\" />
27
- </head>
28
- <script>
29
- window.location.href = '/abc';
30
- </script>
31
- </html>",
32
- ]
33
- `;
34
-
35
- exports[`toRedirectFilesMetadata should create appropriate metadatas trailingSlash=false: fileContent 1`] = `
36
- Array [
37
- "<!DOCTYPE html>
38
- <html>
39
- <head>
40
- <meta charset=\\"UTF-8\\">
41
- <meta http-equiv=\\"refresh\\" content=\\"0; url=https://docusaurus.io/abc\\">
42
- <link rel=\\"canonical\\" href=\\"https://docusaurus.io/abc\\" />
43
- </head>
44
- <script>
45
- window.location.href = 'https://docusaurus.io/abc';
46
- </script>
47
- </html>",
48
- "<!DOCTYPE html>
49
- <html>
50
- <head>
51
- <meta charset=\\"UTF-8\\">
52
- <meta http-equiv=\\"refresh\\" content=\\"0; url=https://docusaurus.io/def.html\\">
53
- <link rel=\\"canonical\\" href=\\"https://docusaurus.io/def.html\\" />
54
- </head>
55
- <script>
56
- window.location.href = 'https://docusaurus.io/def.html';
57
- </script>
58
- </html>",
59
- "<!DOCTYPE html>
60
- <html>
61
- <head>
62
- <meta charset=\\"UTF-8\\">
63
- <meta http-equiv=\\"refresh\\" content=\\"0; url=https://docusaurus.io/\\">
64
- <link rel=\\"canonical\\" href=\\"https://docusaurus.io/\\" />
65
- </head>
66
- <script>
67
- window.location.href = 'https://docusaurus.io/';
68
- </script>
69
- </html>",
70
- ]
71
- `;
72
-
73
- exports[`toRedirectFilesMetadata should create appropriate metadatas trailingSlash=true: fileContent 1`] = `
74
- Array [
75
- "<!DOCTYPE html>
76
- <html>
77
- <head>
78
- <meta charset=\\"UTF-8\\">
79
- <meta http-equiv=\\"refresh\\" content=\\"0; url=https://docusaurus.io/abc\\">
80
- <link rel=\\"canonical\\" href=\\"https://docusaurus.io/abc\\" />
81
- </head>
82
- <script>
83
- window.location.href = 'https://docusaurus.io/abc';
84
- </script>
85
- </html>",
86
- "<!DOCTYPE html>
87
- <html>
88
- <head>
89
- <meta charset=\\"UTF-8\\">
90
- <meta http-equiv=\\"refresh\\" content=\\"0; url=https://docusaurus.io/def.html\\">
91
- <link rel=\\"canonical\\" href=\\"https://docusaurus.io/def.html\\" />
92
- </head>
93
- <script>
94
- window.location.href = 'https://docusaurus.io/def.html';
95
- </script>
96
- </html>",
97
- "<!DOCTYPE html>
98
- <html>
99
- <head>
100
- <meta charset=\\"UTF-8\\">
101
- <meta http-equiv=\\"refresh\\" content=\\"0; url=https://docusaurus.io/\\">
102
- <link rel=\\"canonical\\" href=\\"https://docusaurus.io/\\" />
103
- </head>
104
- <script>
105
- window.location.href = 'https://docusaurus.io/';
106
- </script>
107
- </html>",
108
- ]
109
- `;
110
-
111
- exports[`toRedirectFilesMetadata should create appropriate metadatas trailingSlash=undefined: fileContent 1`] = `
112
- Array [
113
- "<!DOCTYPE html>
114
- <html>
115
- <head>
116
- <meta charset=\\"UTF-8\\">
117
- <meta http-equiv=\\"refresh\\" content=\\"0; url=https://docusaurus.io/abc\\">
118
- <link rel=\\"canonical\\" href=\\"https://docusaurus.io/abc\\" />
119
- </head>
120
- <script>
121
- window.location.href = 'https://docusaurus.io/abc';
122
- </script>
123
- </html>",
124
- "<!DOCTYPE html>
125
- <html>
126
- <head>
127
- <meta charset=\\"UTF-8\\">
128
- <meta http-equiv=\\"refresh\\" content=\\"0; url=https://docusaurus.io/def.html\\">
129
- <link rel=\\"canonical\\" href=\\"https://docusaurus.io/def.html\\" />
130
- </head>
131
- <script>
132
- window.location.href = 'https://docusaurus.io/def.html';
133
- </script>
134
- </html>",
135
- "<!DOCTYPE html>
136
- <html>
137
- <head>
138
- <meta charset=\\"UTF-8\\">
139
- <meta http-equiv=\\"refresh\\" content=\\"0; url=https://docusaurus.io/\\">
140
- <link rel=\\"canonical\\" href=\\"https://docusaurus.io/\\" />
141
- </head>
142
- <script>
143
- window.location.href = 'https://docusaurus.io/';
144
- </script>
145
- </html>",
146
- ]
147
- `;