@testforgejs/vue-test-plugin-router 1.0.0-beta.6 → 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,11 +12,11 @@ declare const ROUTER_PLUGIN_NAME: "router";
12
12
  /**
13
13
  * Configuration options for the Vue Router test plugin.
14
14
  *
15
- * Combines native Vue Router options with TestForge-specific
16
- * controls for managed plugin instances.
15
+ * Uses native Vue Router options for configuring the router instance
16
+ * created by TestForge.
17
17
  *
18
- * TestForge control options are handled internally and are not
19
- * forwarded to the native Vue Router factory.
18
+ * Managed instance controls are provided separately by TestForge
19
+ * through its plugin configuration types.
20
20
  *
21
21
  * @example
22
22
  * Configure the managed Vue Router plugin for a component test:
@@ -33,9 +33,26 @@ declare const ROUTER_PLUGIN_NAME: "router";
33
33
  * ```
34
34
  *
35
35
  * @see `RouterOptions` from `vue-router` for native Vue Router configuration.
36
- * @see `PluginControlOptions` from `@testforgejs/vue-test-core` for type-safe instance capturing.
37
36
  */
38
- type VueTestRouterOptions = RouterOptions & PluginControlOptions<Router>;
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`.
54
+ */
55
+ type RouterRuntimeOptions = RuntimePluginOptions<Router, VueTestRouterOptions>;
39
56
 
40
57
  /**
41
58
  * TestForge core type augmentation for Vue Router integration.
@@ -67,9 +84,10 @@ declare module "@testforgejs/vue-test-core" {
67
84
  /**
68
85
  * Managed Vue Router plugin module for TestForge.
69
86
  *
70
- * Provides the runtime definition for creating Vue Router instances
71
- * 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.
72
90
  */
73
91
  declare const routerPlugin: PluginModuleWithDefaults<Router, VueTestRouterOptions>;
74
92
 
75
- 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,11 +12,11 @@ declare const ROUTER_PLUGIN_NAME: "router";
12
12
  /**
13
13
  * Configuration options for the Vue Router test plugin.
14
14
  *
15
- * Combines native Vue Router options with TestForge-specific
16
- * controls for managed plugin instances.
15
+ * Uses native Vue Router options for configuring the router instance
16
+ * created by TestForge.
17
17
  *
18
- * TestForge control options are handled internally and are not
19
- * forwarded to the native Vue Router factory.
18
+ * Managed instance controls are provided separately by TestForge
19
+ * through its plugin configuration types.
20
20
  *
21
21
  * @example
22
22
  * Configure the managed Vue Router plugin for a component test:
@@ -33,9 +33,26 @@ declare const ROUTER_PLUGIN_NAME: "router";
33
33
  * ```
34
34
  *
35
35
  * @see `RouterOptions` from `vue-router` for native Vue Router configuration.
36
- * @see `PluginControlOptions` from `@testforgejs/vue-test-core` for type-safe instance capturing.
37
36
  */
38
- type VueTestRouterOptions = RouterOptions & PluginControlOptions<Router>;
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`.
54
+ */
55
+ type RouterRuntimeOptions = RuntimePluginOptions<Router, VueTestRouterOptions>;
39
56
 
40
57
  /**
41
58
  * TestForge core type augmentation for Vue Router integration.
@@ -67,9 +84,10 @@ declare module "@testforgejs/vue-test-core" {
67
84
  /**
68
85
  * Managed Vue Router plugin module for TestForge.
69
86
  *
70
- * Provides the runtime definition for creating Vue Router instances
71
- * 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.
72
90
  */
73
91
  declare const routerPlugin: PluginModuleWithDefaults<Router, VueTestRouterOptions>;
74
92
 
75
- 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.6",
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.5"
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.5"
52
+ "@testforgejs/vue-test-core": "1.0.0-beta.6"
53
53
  },
54
54
  "testforge": {
55
55
  "plugin": {