mokup 2.0.2 → 2.1.0
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/cli-bin.cjs +3 -1
- package/dist/cli-bin.mjs +3 -1
- package/dist/index.cjs +39 -0
- package/dist/index.d.cts +62 -44
- package/dist/index.d.mts +62 -44
- package/dist/index.d.ts +64 -44
- package/dist/index.mjs +37 -0
- package/dist/server/worker.d.ts +2 -0
- package/dist/shared/{mokup.jeVwRMia.mjs → mokup.Bp9u3JKA.mjs} +1630 -1220
- package/dist/shared/mokup.CWQ8woZc.d.cts +302 -0
- package/dist/shared/mokup.CWQ8woZc.d.mts +302 -0
- package/dist/shared/mokup.CWQ8woZc.d.ts +302 -0
- package/dist/shared/{mokup.B-yfMz5B.cjs → mokup.i875Kuim.cjs} +1630 -1220
- package/dist/sw.cjs +5 -2
- package/dist/sw.d.cts +63 -0
- package/dist/sw.d.mts +63 -0
- package/dist/sw.d.ts +63 -0
- package/dist/sw.mjs +5 -2
- package/dist/types/virtual.d.ts +9 -0
- package/dist/vite.cjs +645 -347
- package/dist/vite.d.cts +20 -2
- package/dist/vite.d.mts +20 -2
- package/dist/vite.d.ts +22 -2
- package/dist/vite.mjs +637 -340
- package/dist/webpack.cjs +276 -204
- package/dist/webpack.d.cts +36 -4
- package/dist/webpack.d.mts +37 -3
- package/dist/webpack.d.ts +36 -4
- package/dist/webpack.mjs +272 -197
- package/package.json +7 -6
package/dist/vite.d.cts
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
|
+
import { M as MokupPluginOptions } from './shared/mokup.CWQ8woZc.cjs';
|
|
2
|
+
export { H as HttpMethod, a as MiddlewarePosition, b as MiddlewareRegistry, R as RequestHandler, c as RouteDirectoryConfig, d as RouteResponse, e as RouteRule, f as RuntimeMode, S as ServiceWorkerOptions, V as VitePluginOptions, g as VitePluginOptionsInput, h as ViteRuntime } from './shared/mokup.CWQ8woZc.cjs';
|
|
1
3
|
import { Plugin } from 'vite';
|
|
2
|
-
import { MokupPluginOptions } from './index.cjs';
|
|
3
|
-
export { HttpMethod, RequestHandler, RouteDirectoryConfig, RouteResponse, RouteRule, RuntimeMode, ServiceWorkerOptions, VitePluginOptions, VitePluginOptionsInput } from './index.cjs';
|
|
4
4
|
export { Context, MiddlewareHandler } from '@mokup/shared/hono';
|
|
5
5
|
export { PlaygroundOptionsInput } from '@mokup/shared';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Create the mokup Vite plugin.
|
|
9
|
+
*
|
|
10
|
+
* @param options - Plugin options.
|
|
11
|
+
* @returns Vite plugin instance.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import mokup from 'mokup/vite'
|
|
15
|
+
*
|
|
16
|
+
* export default {
|
|
17
|
+
* plugins: [
|
|
18
|
+
* mokup({
|
|
19
|
+
* entries: { dir: 'mock', prefix: '/api' },
|
|
20
|
+
* playground: true,
|
|
21
|
+
* }),
|
|
22
|
+
* ],
|
|
23
|
+
* }
|
|
24
|
+
*/
|
|
7
25
|
declare function createMokupPlugin(options?: MokupPluginOptions): Plugin;
|
|
8
26
|
|
|
9
27
|
// @ts-ignore
|
package/dist/vite.d.mts
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
|
+
import { M as MokupPluginOptions } from './shared/mokup.CWQ8woZc.mjs';
|
|
2
|
+
export { H as HttpMethod, a as MiddlewarePosition, b as MiddlewareRegistry, R as RequestHandler, c as RouteDirectoryConfig, d as RouteResponse, e as RouteRule, f as RuntimeMode, S as ServiceWorkerOptions, V as VitePluginOptions, g as VitePluginOptionsInput, h as ViteRuntime } from './shared/mokup.CWQ8woZc.mjs';
|
|
1
3
|
import { Plugin } from 'vite';
|
|
2
|
-
import { MokupPluginOptions } from './index.mjs';
|
|
3
|
-
export { HttpMethod, RequestHandler, RouteDirectoryConfig, RouteResponse, RouteRule, RuntimeMode, ServiceWorkerOptions, VitePluginOptions, VitePluginOptionsInput } from './index.mjs';
|
|
4
4
|
export { Context, MiddlewareHandler } from '@mokup/shared/hono';
|
|
5
5
|
export { PlaygroundOptionsInput } from '@mokup/shared';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Create the mokup Vite plugin.
|
|
9
|
+
*
|
|
10
|
+
* @param options - Plugin options.
|
|
11
|
+
* @returns Vite plugin instance.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import mokup from 'mokup/vite'
|
|
15
|
+
*
|
|
16
|
+
* export default {
|
|
17
|
+
* plugins: [
|
|
18
|
+
* mokup({
|
|
19
|
+
* entries: { dir: 'mock', prefix: '/api' },
|
|
20
|
+
* playground: true,
|
|
21
|
+
* }),
|
|
22
|
+
* ],
|
|
23
|
+
* }
|
|
24
|
+
*/
|
|
7
25
|
declare function createMokupPlugin(options?: MokupPluginOptions): Plugin;
|
|
8
26
|
|
|
9
27
|
export { MokupPluginOptions, createMokupPlugin as default };
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,9 +1,29 @@
|
|
|
1
|
+
/// <reference path="./types/virtual.d.ts" />
|
|
2
|
+
|
|
3
|
+
import { M as MokupPluginOptions } from './shared/mokup.CWQ8woZc.js';
|
|
4
|
+
export { H as HttpMethod, a as MiddlewarePosition, b as MiddlewareRegistry, R as RequestHandler, c as RouteDirectoryConfig, d as RouteResponse, e as RouteRule, f as RuntimeMode, S as ServiceWorkerOptions, V as VitePluginOptions, g as VitePluginOptionsInput, h as ViteRuntime } from './shared/mokup.CWQ8woZc.js';
|
|
1
5
|
import { Plugin } from 'vite';
|
|
2
|
-
import { MokupPluginOptions } from './index.js';
|
|
3
|
-
export { HttpMethod, RequestHandler, RouteDirectoryConfig, RouteResponse, RouteRule, RuntimeMode, ServiceWorkerOptions, VitePluginOptions, VitePluginOptionsInput } from './index.js';
|
|
4
6
|
export { Context, MiddlewareHandler } from '@mokup/shared/hono';
|
|
5
7
|
export { PlaygroundOptionsInput } from '@mokup/shared';
|
|
6
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Create the mokup Vite plugin.
|
|
11
|
+
*
|
|
12
|
+
* @param options - Plugin options.
|
|
13
|
+
* @returns Vite plugin instance.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* import mokup from 'mokup/vite'
|
|
17
|
+
*
|
|
18
|
+
* export default {
|
|
19
|
+
* plugins: [
|
|
20
|
+
* mokup({
|
|
21
|
+
* entries: { dir: 'mock', prefix: '/api' },
|
|
22
|
+
* playground: true,
|
|
23
|
+
* }),
|
|
24
|
+
* ],
|
|
25
|
+
* }
|
|
26
|
+
*/
|
|
7
27
|
declare function createMokupPlugin(options?: MokupPluginOptions): Plugin;
|
|
8
28
|
|
|
9
29
|
// @ts-ignore
|