@testforgejs/vue-test-plugin-router 1.0.0-beta.5 → 1.0.0-beta.7

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.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { RouterOptions, Router } from 'vue-router';
2
- import { PluginControlOptions, PluginModuleWithDefaults } from '@testforgejs/vue-test-core';
2
+ import { RuntimePluginOptions, PluginModuleWithDefaults } from '@testforgejs/vue-test-core';
3
3
 
4
4
  /**
5
5
  * Stable TestForge identifier for the managed Vue Router plugin.
@@ -12,8 +12,11 @@ declare const ROUTER_PLUGIN_NAME: "router";
12
12
  /**
13
13
  * Configuration options for the Vue Router test plugin.
14
14
  *
15
- * Combines standard Vue Router configuration (`RouterOptions` from `vue-router`)
16
- * with TestForge plugin control options.
15
+ * Uses native Vue Router options for configuring the router instance
16
+ * created by TestForge.
17
+ *
18
+ * Managed instance controls are provided separately by TestForge
19
+ * through its plugin configuration types.
17
20
  *
18
21
  * @example
19
22
  * Configure the managed Vue Router plugin for a component test:
@@ -29,10 +32,27 @@ declare const ROUTER_PLUGIN_NAME: "router";
29
32
  * });
30
33
  * ```
31
34
  *
32
- * @see `RouterOptions` from `vue-router` for configuring routes and history.
33
- * @see `PluginControlOptions` from `@testforgejs/vue-test-core` for instance capturing and exposure mechanisms.
35
+ * @see `RouterOptions` from `vue-router` for native Vue Router configuration.
36
+ */
37
+ type VueTestRouterOptions = RouterOptions;
38
+ /**
39
+ * Resolved runtime options for the managed Vue Router test plugin.
40
+ *
41
+ * Combines {@link VueTestRouterOptions} with the internal TestForge
42
+ * controls used to create, reuse, and expose a {@link Router} instance.
43
+ *
44
+ * These options are passed to `createRouterPlugin()` after the Mount Pipeline
45
+ * has resolved the plugin configuration.
46
+ *
47
+ * Input metadata provided through `withPluginInstance()` is processed
48
+ * before this stage and is not part of the resolved runtime options.
49
+ *
50
+ * @internal
51
+ *
52
+ * @see {@link VueTestRouterOptions}
53
+ * @see `RuntimePluginOptions` from `@testforgejs/vue-test-core`.
34
54
  */
35
- type VueTestRouterOptions = RouterOptions & PluginControlOptions<Router>;
55
+ type RouterRuntimeOptions = RuntimePluginOptions<Router, VueTestRouterOptions>;
36
56
 
37
57
  /**
38
58
  * TestForge core type augmentation for Vue Router integration.
@@ -64,9 +84,10 @@ declare module "@testforgejs/vue-test-core" {
64
84
  /**
65
85
  * Managed Vue Router plugin module for TestForge.
66
86
  *
67
- * Provides the runtime definition for creating Vue Router instances
68
- * and exposes the default configuration used by TestForge-managed presets.
87
+ * Provides the runtime definition for creating or reusing Vue Router
88
+ * instances and exposes a default configuration factory
89
+ * that presets can explicitly opt into.
69
90
  */
70
91
  declare const routerPlugin: PluginModuleWithDefaults<Router, VueTestRouterOptions>;
71
92
 
72
- export { ROUTER_PLUGIN_NAME as PLUGIN_NAME, type VueTestRouterOptions, routerPlugin as plugin, routerPlugin };
93
+ export { ROUTER_PLUGIN_NAME as PLUGIN_NAME, type VueTestRouterOptions as PluginOptions, type RouterRuntimeOptions, type VueTestRouterOptions, routerPlugin as plugin, routerPlugin };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { RouterOptions, Router } from 'vue-router';
2
- import { PluginControlOptions, PluginModuleWithDefaults } from '@testforgejs/vue-test-core';
2
+ import { RuntimePluginOptions, PluginModuleWithDefaults } from '@testforgejs/vue-test-core';
3
3
 
4
4
  /**
5
5
  * Stable TestForge identifier for the managed Vue Router plugin.
@@ -12,8 +12,11 @@ declare const ROUTER_PLUGIN_NAME: "router";
12
12
  /**
13
13
  * Configuration options for the Vue Router test plugin.
14
14
  *
15
- * Combines standard Vue Router configuration (`RouterOptions` from `vue-router`)
16
- * with TestForge plugin control options.
15
+ * Uses native Vue Router options for configuring the router instance
16
+ * created by TestForge.
17
+ *
18
+ * Managed instance controls are provided separately by TestForge
19
+ * through its plugin configuration types.
17
20
  *
18
21
  * @example
19
22
  * Configure the managed Vue Router plugin for a component test:
@@ -29,10 +32,27 @@ declare const ROUTER_PLUGIN_NAME: "router";
29
32
  * });
30
33
  * ```
31
34
  *
32
- * @see `RouterOptions` from `vue-router` for configuring routes and history.
33
- * @see `PluginControlOptions` from `@testforgejs/vue-test-core` for instance capturing and exposure mechanisms.
35
+ * @see `RouterOptions` from `vue-router` for native Vue Router configuration.
36
+ */
37
+ type VueTestRouterOptions = RouterOptions;
38
+ /**
39
+ * Resolved runtime options for the managed Vue Router test plugin.
40
+ *
41
+ * Combines {@link VueTestRouterOptions} with the internal TestForge
42
+ * controls used to create, reuse, and expose a {@link Router} instance.
43
+ *
44
+ * These options are passed to `createRouterPlugin()` after the Mount Pipeline
45
+ * has resolved the plugin configuration.
46
+ *
47
+ * Input metadata provided through `withPluginInstance()` is processed
48
+ * before this stage and is not part of the resolved runtime options.
49
+ *
50
+ * @internal
51
+ *
52
+ * @see {@link VueTestRouterOptions}
53
+ * @see `RuntimePluginOptions` from `@testforgejs/vue-test-core`.
34
54
  */
35
- type VueTestRouterOptions = RouterOptions & PluginControlOptions<Router>;
55
+ type RouterRuntimeOptions = RuntimePluginOptions<Router, VueTestRouterOptions>;
36
56
 
37
57
  /**
38
58
  * TestForge core type augmentation for Vue Router integration.
@@ -64,9 +84,10 @@ declare module "@testforgejs/vue-test-core" {
64
84
  /**
65
85
  * Managed Vue Router plugin module for TestForge.
66
86
  *
67
- * Provides the runtime definition for creating Vue Router instances
68
- * and exposes the default configuration used by TestForge-managed presets.
87
+ * Provides the runtime definition for creating or reusing Vue Router
88
+ * instances and exposes a default configuration factory
89
+ * that presets can explicitly opt into.
69
90
  */
70
91
  declare const routerPlugin: PluginModuleWithDefaults<Router, VueTestRouterOptions>;
71
92
 
72
- export { ROUTER_PLUGIN_NAME as PLUGIN_NAME, type VueTestRouterOptions, routerPlugin as plugin, routerPlugin };
93
+ export { ROUTER_PLUGIN_NAME as PLUGIN_NAME, type VueTestRouterOptions as PluginOptions, type RouterRuntimeOptions, type VueTestRouterOptions, routerPlugin as plugin, routerPlugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testforgejs/vue-test-plugin-router",
3
- "version": "1.0.0-beta.5",
3
+ "version": "1.0.0-beta.7",
4
4
  "type": "module",
5
5
  "description": "Official TestForge plugin for Vue Router integration in component tests",
6
6
  "homepage": "https://github.com/testforgejs/testforge#readme",
@@ -45,11 +45,11 @@
45
45
  "author": "Roman Levchenko",
46
46
  "peerDependencies": {
47
47
  "vue-router": "^4.0.0 || ^5.0.0",
48
- "@testforgejs/vue-test-core": "1.0.0-beta.4"
48
+ "@testforgejs/vue-test-core": "1.0.0-beta.6"
49
49
  },
50
50
  "devDependencies": {
51
51
  "vue-router": "^5.0.0",
52
- "@testforgejs/vue-test-core": "1.0.0-beta.4"
52
+ "@testforgejs/vue-test-core": "1.0.0-beta.6"
53
53
  },
54
54
  "testforge": {
55
55
  "plugin": {