@rspress/plugin-client-redirects 1.37.2 → 1.37.4

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/dist/index.d.ts CHANGED
@@ -1,16 +1,17 @@
1
- import { RspressPlugin } from '@rspress/shared';
2
-
3
- type RedirectRule = {
4
- to: string;
5
- from: string | string[];
6
- };
7
- type RedirectsOptions = {
8
- redirects?: RedirectRule[];
9
- };
10
-
11
- /**
12
- * The plugin is used to add client redirect feature to the doc site.
13
- */
14
- declare function pluginClientRedirects(options?: RedirectsOptions): RspressPlugin;
15
-
16
- export { pluginClientRedirects };
1
+ import type { RspressPlugin } from '@rspress/shared';
2
+
3
+ /**
4
+ * The plugin is used to add client redirect feature to the doc site.
5
+ */
6
+ export declare function pluginClientRedirects(options?: RedirectsOptions): RspressPlugin;
7
+
8
+ declare type RedirectRule = {
9
+ to: string;
10
+ from: string | string[];
11
+ };
12
+
13
+ declare type RedirectsOptions = {
14
+ redirects?: RedirectRule[];
15
+ };
16
+
17
+ export { }
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
- // src/index.ts
2
- import path from "path";
3
- function pluginClientRedirects(options = {}) {
4
- return {
5
- name: "@rspress/plugin-client-redirects",
6
- globalUIComponents: [
7
- [path.join(__dirname, "../src/components/Redirect.tsx"), options]
8
- ]
9
- };
1
+ import * as __WEBPACK_EXTERNAL_MODULE_node_path__ from "node:path";
2
+ /**
3
+ * The plugin is used to add client redirect feature to the doc site.
4
+ */ function pluginClientRedirects(options = {}) {
5
+ return {
6
+ name: '@rspress/plugin-client-redirects',
7
+ globalUIComponents: [
8
+ [
9
+ __WEBPACK_EXTERNAL_MODULE_node_path__["default"].join(__dirname, '../src/components/Redirect.tsx'),
10
+ options
11
+ ]
12
+ ]
13
+ };
10
14
  }
11
- export {
12
- pluginClientRedirects
13
- };
14
-
15
- //# sourceMappingURL=index.js.map
15
+ export { pluginClientRedirects };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/plugin-client-redirects",
3
- "version": "1.37.2",
3
+ "version": "1.37.4",
4
4
  "description": "A plugin for rspress to client redirect in docs.",
5
5
  "bugs": "https://github.com/web-infra-dev/rspress/issues",
6
6
  "repository": {
@@ -17,18 +17,22 @@
17
17
  "engines": {
18
18
  "node": ">=14.17.6"
19
19
  },
20
+ "dependencies": {
21
+ "@rspress/shared": "1.37.4"
22
+ },
20
23
  "devDependencies": {
21
- "@modern-js/tsconfig": "2.62.0",
24
+ "@microsoft/api-extractor": "^7.48.0",
25
+ "@modern-js/tsconfig": "2.63.0",
26
+ "@rslib/core": "0.1.2",
22
27
  "@types/node": "^18.11.17",
23
28
  "@types/react": "^18.3.12",
24
29
  "@types/react-dom": "^18.3.1",
25
30
  "react": "^18.3.1",
26
31
  "typescript": "^5.5.3",
27
- "vitest": "2.1.5",
28
- "@rspress/shared": "1.37.2"
32
+ "vitest": "2.1.8"
29
33
  },
30
34
  "peerDependencies": {
31
- "@rspress/runtime": "^1.37.2"
35
+ "@rspress/runtime": "^1.37.4"
32
36
  },
33
37
  "sideEffects": [
34
38
  "*.css",
@@ -46,8 +50,8 @@
46
50
  "registry": "https://registry.npmjs.org/"
47
51
  },
48
52
  "scripts": {
49
- "dev": "modern build -w",
50
- "build": "modern build",
53
+ "dev": "rslib build -w",
54
+ "build": "rslib build",
51
55
  "reset": "rimraf ./**/node_modules",
52
56
  "test": "vitest run --passWithNoTests"
53
57
  }
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"mappings":";AAAA,OAAO,UAAU;AAOV,SAAS,sBACd,UAA4B,CAAC,GACd;AACf,SAAO;AAAA,IACL,MAAM;AAAA,IACN,oBAAoB;AAAA,MAClB,CAAC,KAAK,KAAK,WAAW,gCAAgC,GAAG,OAAO;AAAA,IAClE;AAAA,EACF;AACF","names":[],"ignoreList":[],"sources":["../src/index.ts"],"sourcesContent":["import path from 'node:path';\nimport type { RspressPlugin } from '@rspress/shared';\nimport type { RedirectsOptions } from './types';\n\n/**\n * The plugin is used to add client redirect feature to the doc site.\n */\nexport function pluginClientRedirects(\n options: RedirectsOptions = {},\n): RspressPlugin {\n return {\n name: '@rspress/plugin-client-redirects',\n globalUIComponents: [\n [path.join(__dirname, '../src/components/Redirect.tsx'), options],\n ],\n };\n}\n"]}