mockaton 13.9.0 → 13.9.2

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "mockaton",
3
3
  "description": "HTTP Mock Server",
4
4
  "type": "module",
5
- "version": "13.9.0",
5
+ "version": "13.9.2",
6
6
  "exports": {
7
7
  ".": {
8
8
  "import": "./index.js",
@@ -10,7 +10,7 @@ npm install mockaton --save-dev
10
10
 
11
11
  ## Usage
12
12
 
13
- In your `vite.config.ts`:
13
+ In your `vite.config.js`:
14
14
 
15
15
  ```ts
16
16
  import { defineConfig } from 'vite'
@@ -0,0 +1,5 @@
1
+ import { type Config } from 'mockaton'
2
+ import { type Plugin } from 'vite'
3
+
4
+ declare function mockatonPlugin(options: Config): Plugin;
5
+ export default mockatonPlugin
@@ -1,13 +1,13 @@
1
- import { type Config, Mockaton } from 'mockaton'
2
- import { type ViteDevServer } from 'vite'
1
+ import { Mockaton } from 'mockaton'
3
2
 
4
- export default function (options: Config = {}) {
3
+
4
+ export default function (options = {}) {
5
5
  let mockatonServer
6
6
 
7
7
  return {
8
8
  name: 'mockaton-vite-plugin',
9
9
 
10
- async configureServer(viteServer: ViteDevServer) {
10
+ async configureServer(viteServer) {
11
11
  mockatonServer = await Mockaton(options)
12
12
  viteServer.httpServer?.on('close', () => {
13
13
  mockatonServer?.close()
@@ -3,9 +3,12 @@
3
3
  "version": "0.0.1",
4
4
  "description": "Vite plugin for Mockaton",
5
5
  "type": "module",
6
- "main": "index.ts",
6
+ "main": "index.js",
7
7
  "exports": {
8
- ".": "./index.ts"
8
+ ".": {
9
+ "import": "./index.js",
10
+ "types": "./index.d.ts"
11
+ }
9
12
  },
10
13
  "peerDependencies": {
11
14
  "vite": ">=8.0.0",