zephyr-rspress-plugin 0.0.0-canary.3 → 0.0.0-canary.31

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 +1,3 @@
1
1
  export { withZephyr } from './with-zephyr';
2
+ export type { ZephyrBuildHooks, DeploymentInfo } from 'zephyr-agent';
3
+ export type { RspressUserConfig, RspressPlugin, SSGConfig } from './types';
@@ -1,2 +1,2 @@
1
1
  import type { ZephyrRspressPluginOptions } from '../../types';
2
- export declare function setupZeDeploy({ deferEngine, outDir, files, }: ZephyrRspressPluginOptions): Promise<void>;
2
+ export declare function setupZeDeploy({ deferEngine, outDir, files, hooks, }: ZephyrRspressPluginOptions): Promise<void>;
@@ -5,7 +5,7 @@ const zephyr_agent_1 = require("zephyr-agent");
5
5
  const zephyr_xpack_internal_1 = require("zephyr-xpack-internal");
6
6
  const buildStats_1 = require("../stats/buildStats");
7
7
  const buildAssets_1 = require("./buildAssets");
8
- async function setupZeDeploy({ deferEngine, outDir, files, }) {
8
+ async function setupZeDeploy({ deferEngine, outDir, files, hooks, }) {
9
9
  if (!files.length) {
10
10
  zephyr_agent_1.ze_log.package('ZeRspressPlugin: No files to process.');
11
11
  return;
@@ -22,6 +22,7 @@ async function setupZeDeploy({ deferEngine, outDir, files, }) {
22
22
  pluginName: 'rspress-ssg',
23
23
  zephyr_engine: await deferEngine,
24
24
  options: {},
25
+ hooks,
25
26
  },
26
27
  });
27
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"setupZeDeploy.js","sourceRoot":"","sources":["../../../src/internal/assets/setupZeDeploy.ts"],"names":[],"mappings":";;AAMA,sCAyBC;AA/BD,+CAAsC;AACtC,iEAA2D;AAE3D,oDAAiD;AACjD,+CAAuD;AAEhD,KAAK,UAAU,aAAa,CAAC,EAClC,WAAW,EACX,MAAM,EACN,KAAK,GACsB;IAC3B,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;Q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AE;QAC1B,MAAM;QACN,aAAa,EAAE;YACb,UAAU,EAAE,aAAa;YACzB,aAAa,EAAE,MAAM,WAAW;YAChC,OAAO,EAAE,EAAE;YACX,KAAK;SACN;KACF,CAAC,CAAC;AACL,CAAC"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-rspress-plugin",
3
- "version": "0.1.0",
3
+ "version": "0.1.3",
4
4
  "description": "Rspress plugin for Zephyr",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,7 +22,6 @@
22
22
  "test": "jest"
23
23
  },
24
24
  "dependencies": {
25
- "@rspress/shared": "catalog:rspress",
26
25
  "tslib": "catalog:typescript",
27
26
  "zephyr-agent": "workspace:*",
28
27
  "zephyr-edge-contract": "workspace:*",
@@ -30,12 +29,15 @@
30
29
  "zephyr-xpack-internal": "workspace:*"
31
30
  },
32
31
  "devDependencies": {
33
- "@types/is-ci": "catalog:typescript",
32
+ "@rspress/core": "catalog:rspress",
34
33
  "@types/jest": "catalog:typescript",
35
34
  "@types/node-persist": "catalog:typescript",
36
35
  "@typescript-eslint/eslint-plugin": "catalog:eslint",
37
36
  "ts-jest": "catalog:typescript"
38
37
  },
38
+ "peerDependencies": {
39
+ "@rspress/core": "^2.0.0"
40
+ },
39
41
  "publishConfig": {
40
42
  "access": "public",
41
43
  "provenance": true
@@ -1,8 +1,46 @@
1
- import type { ZephyrEngine } from 'zephyr-agent';
1
+ import type { ZephyrEngine, ZephyrBuildHooks } from 'zephyr-agent';
2
2
  export interface ZephyrRspressPluginOptions {
3
3
  deferEngine: Promise<ZephyrEngine>;
4
4
  outDir: string;
5
5
  files: string[];
6
+ hooks?: ZephyrBuildHooks;
7
+ }
8
+ /**
9
+ * Generic type for rspress SSG config that works with both v1 and v2 v1: boolean | {
10
+ * strict?: boolean } v2: boolean | { experimentalWorker?: boolean;
11
+ * experimentalExcludeRoutePaths?: (string | RegExp)[] }
12
+ */
13
+ export type SSGConfig = boolean | Record<string, unknown>;
14
+ /**
15
+ * Minimal builder config shape for plugin injection Both rspress v1 and v2 support this
16
+ * shape for their builder configuration
17
+ */
18
+ export interface BuilderConfigWithPlugins {
19
+ plugins?: unknown[];
20
+ }
21
+ /**
22
+ * Generic rspress user config that works with both v1 and v2 Uses intersection of both
23
+ * config shapes. The index signature is intentionally omitted to allow compatibility with
24
+ * stricter types like RsbuildConfig that don't have index signatures.
25
+ */
26
+ export interface RspressUserConfig {
27
+ ssg?: SSGConfig;
28
+ root?: string;
29
+ outDir?: string;
30
+ builderPlugins?: unknown[];
31
+ builderConfig?: BuilderConfigWithPlugins;
32
+ }
33
+ /**
34
+ * Generic rspress plugin interface that works with both v1 and v2 Uses a generic config
35
+ * type parameter with default
36
+ */
37
+ export interface RspressPlugin<TConfig extends RspressUserConfig = RspressUserConfig> {
38
+ name: string;
39
+ config?: (config: TConfig, utils: {
40
+ addPlugin: (plugin: RspressPlugin<TConfig>) => void;
41
+ removePlugin: (pluginName: string) => void;
42
+ }, isProd: boolean) => TConfig | Promise<TConfig>;
43
+ afterBuild?: () => void | Promise<void>;
6
44
  }
7
45
  export interface Stats {
8
46
  compilation: {
@@ -1,2 +1,31 @@
1
- import type { RspressPlugin } from '@rspress/shared';
2
- export declare function withZephyr(): RspressPlugin;
1
+ import { type ZephyrBuildHooks } from 'zephyr-rsbuild-plugin';
2
+ import type { RspressUserConfig, RspressPlugin } from './types';
3
+ export interface ZephyrRspressOptions {
4
+ hooks?: ZephyrBuildHooks;
5
+ }
6
+ /**
7
+ * Creates a Zephyr plugin for Rspress that works with both v1 and v2
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * // rspress.config.ts (v1)
12
+ * import { defineConfig } from 'rspress/config';
13
+ * import { withZephyr } from 'zephyr-rspress-plugin';
14
+ *
15
+ * export default defineConfig({
16
+ * plugins: [withZephyr()],
17
+ * });
18
+ * ```;
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * // rspress.config.ts (v2)
23
+ * import { defineConfig } from '@rspress/core';
24
+ * import { withZephyr } from 'zephyr-rspress-plugin';
25
+ *
26
+ * export default defineConfig({
27
+ * plugins: [withZephyr()],
28
+ * });
29
+ * ```;
30
+ */
31
+ export declare function withZephyr<TConfig extends RspressUserConfig = RspressUserConfig>(options?: ZephyrRspressOptions): RspressPlugin<TConfig>;
@@ -3,16 +3,69 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.withZephyr = withZephyr;
4
4
  const zephyr_rsbuild_plugin_1 = require("zephyr-rsbuild-plugin");
5
5
  const zephyrRspressSSGPlugin_1 = require("./zephyrRspressSSGPlugin");
6
- function withZephyr() {
6
+ /**
7
+ * Type guard to detect if rspress v1 API is being used v1 uses builderPlugins, v2 uses
8
+ * builderConfig.plugins
9
+ */
10
+ function isRspressV1(config) {
11
+ return 'builderPlugins' in config;
12
+ }
13
+ /** Type guard to check if SSG is enabled (can be boolean or object with options) */
14
+ function isSsgEnabled(ssg) {
15
+ return ssg === true || (typeof ssg === 'object' && ssg !== null);
16
+ }
17
+ /**
18
+ * Creates a Zephyr plugin for Rspress that works with both v1 and v2
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * // rspress.config.ts (v1)
23
+ * import { defineConfig } from 'rspress/config';
24
+ * import { withZephyr } from 'zephyr-rspress-plugin';
25
+ *
26
+ * export default defineConfig({
27
+ * plugins: [withZephyr()],
28
+ * });
29
+ * ```;
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * // rspress.config.ts (v2)
34
+ * import { defineConfig } from '@rspress/core';
35
+ * import { withZephyr } from 'zephyr-rspress-plugin';
36
+ *
37
+ * export default defineConfig({
38
+ * plugins: [withZephyr()],
39
+ * });
40
+ * ```;
41
+ */
42
+ function withZephyr(options) {
7
43
  return {
8
44
  name: 'zephyr-rspress-plugin',
9
45
  async config(config, { addPlugin }) {
10
- const { ssg = false } = config;
11
- if (ssg) {
12
- addPlugin((0, zephyrRspressSSGPlugin_1.zephyrRspressSSGPlugin)(config));
46
+ const { ssg } = config;
47
+ if (isSsgEnabled(ssg)) {
48
+ addPlugin((0, zephyrRspressSSGPlugin_1.zephyrRspressSSGPlugin)(config, options));
13
49
  }
14
50
  else {
15
- config.builderPlugins = [...(config.builderPlugins ?? []), (0, zephyr_rsbuild_plugin_1.withZephyr)()];
51
+ // Support both rspress v1 (builderPlugins) and v2 (builderConfig.plugins)
52
+ if (isRspressV1(config)) {
53
+ // rspress v1: use builderPlugins
54
+ config.builderPlugins = [
55
+ ...config.builderPlugins,
56
+ (0, zephyr_rsbuild_plugin_1.withZephyr)(options),
57
+ ];
58
+ }
59
+ else {
60
+ // rspress v2: use builderConfig.plugins
61
+ const existingPlugins = config.builderConfig?.plugins ?? [];
62
+ const newBuilderConfig = {
63
+ ...config.builderConfig,
64
+ plugins: [...existingPlugins, (0, zephyr_rsbuild_plugin_1.withZephyr)(options)],
65
+ };
66
+ config.builderConfig =
67
+ newBuilderConfig;
68
+ }
16
69
  }
17
70
  return config;
18
71
  },
@@ -1 +1 @@
1
- {"version":3,"file":"with-zephyr.js","sourceRoot":"","sources":["../src/with-zephyr.ts"],"names":[],"mappings":";;AAIA,gCAcC;AAjBD,iEAA0E;AAC1E,qEAAkE;AAElE,SAAgB,UAAU;IACxB,OAAO;QACL,IAAI,EAAE,uBAAuB;QAC7B,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE;YAChC,MAAM,EAAE,GAAG,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;YAE/B,IAAI,GAAG,EAAE,CAAC;gBACR,SAAS,CAAC,IAAA,+CAAsB,EAAC,MAAM,CAAC,CAAC,CAAC;YAC5C,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,cAAc,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,cAAc,IAAI,EAAE,CAAC,EAAE,IAAA,kCAAmB,GAAE,CAAC,CAAC;YACpF,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":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E,gBAAgB,CAAC;gBACrB,CAAC;YACH,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,2 +1,5 @@
1
- import type { RspressPlugin, UserConfig } from '@rspress/shared';
2
- export declare const zephyrRspressSSGPlugin: (config: UserConfig) => RspressPlugin;
1
+ import { type ZephyrBuildHooks } from 'zephyr-agent';
2
+ import type { RspressUserConfig, RspressPlugin } from './types';
3
+ export declare const zephyrRspressSSGPlugin: <TConfig extends RspressUserConfig = RspressUserConfig>(config: TConfig, options?: {
4
+ hooks?: ZephyrBuildHooks;
5
+ }) => RspressPlugin<TConfig>;
@@ -6,7 +6,7 @@ const zephyr_agent_1 = require("zephyr-agent");
6
6
  const setupZeDeploy_1 = require("./internal/assets/setupZeDeploy");
7
7
  const showFiles_1 = require("./internal/files/showFiles");
8
8
  const walkFiles_1 = require("./internal/files/walkFiles");
9
- const zephyrRspressSSGPlugin = (config) => {
9
+ const zephyrRspressSSGPlugin = (config, options) => {
10
10
  const { zephyr_engine_defer, zephyr_defer_create } = zephyr_agent_1.ZephyrEngine.defer_create();
11
11
  const root = (0, node_path_1.resolve)(config.root ?? '');
12
12
  const outDir = (0, node_path_1.resolve)(config.outDir ?? './doc_build');
@@ -21,7 +21,12 @@ const zephyrRspressSSGPlugin = (config) => {
21
21
  return;
22
22
  }
23
23
  await (0, showFiles_1.showFiles)(outDir, files);
24
- await (0, setupZeDeploy_1.setupZeDeploy)({ deferEngine: zephyr_engine_defer, outDir, files });
24
+ await (0, setupZeDeploy_1.setupZeDeploy)({
25
+ deferEngine: zephyr_engine_defer,
26
+ outDir,
27
+ files,
28
+ hooks: options?.hooks,
29
+ });
25
30
  }
26
31
  catch (error) {
27
32
  (0, zephyr_agent_1.logFn)('error', zephyr_agent_1.ZephyrError.format(error));
@@ -1 +1 @@
1
- {"version":3,"file":"zephyrRspressSSGPlugin.js","sourceRoot":"","sources":["../src/zephyrRspressSSGPlugin.ts"],"names":[],"mapp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+
3
+ export default [
4
+ ...baseConfig,
5
+ {
6
+ files: ['**/*.ts', '**/*.tsx'],
7
+ rules: {
8
+ '@typescript-eslint/explicit-function-return-type': [
9
+ 'error',
10
+ {
11
+ allowExpressions: true,
12
+ },
13
+ ],
14
+ },
15
+ },
16
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-rspress-plugin",
3
- "version": "0.0.0-canary.3",
3
+ "version": "0.0.0-canary.31",
4
4
  "description": "Rspress plugin for Zephyr",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,20 +16,22 @@
16
16
  "main": "dist/index.js",
17
17
  "types": "dist/index.d.ts",
18
18
  "dependencies": {
19
- "@rspress/shared": "^1.44.0",
20
19
  "tslib": "^2.8.1",
21
- "zephyr-agent": "0.0.0-canary.3",
22
- "zephyr-edge-contract": "0.0.0-canary.3",
23
- "zephyr-xpack-internal": "0.0.0-canary.3",
24
- "zephyr-rsbuild-plugin": "0.0.0-canary.3"
20
+ "zephyr-agent": "0.0.0-canary.31",
21
+ "zephyr-edge-contract": "0.0.0-canary.31",
22
+ "zephyr-rsbuild-plugin": "0.0.0-canary.31",
23
+ "zephyr-xpack-internal": "0.0.0-canary.31"
25
24
  },
26
25
  "devDependencies": {
27
- "@types/is-ci": "3.0.4",
26
+ "@rspress/core": "^2.0.0-rc.1",
28
27
  "@types/jest": "29.5.14",
29
28
  "@types/node-persist": "^3.1.8",
30
29
  "@typescript-eslint/eslint-plugin": "^8.27.0",
31
30
  "ts-jest": "^29.2.6"
32
31
  },
32
+ "peerDependencies": {
33
+ "@rspress/core": "^2.0.0"
34
+ },
33
35
  "publishConfig": {
34
36
  "access": "public",
35
37
  "provenance": true