@modern-js/plugin-bff 1.3.6 → 1.3.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/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.3.6",
14
+ "version": "1.3.7",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -33,6 +33,10 @@
33
33
  "./server": {
34
34
  "jsnext:source": "./src/server.ts",
35
35
  "default": "./dist/js/node/server.js"
36
+ },
37
+ "./loader": {
38
+ "jsnext:source": "./src/loader.ts",
39
+ "default": "./dist/js/node/loader.js"
36
40
  }
37
41
  },
38
42
  "typesVersions": {
@@ -87,7 +91,8 @@
87
91
  "sideEffects": false,
88
92
  "publishConfig": {
89
93
  "registry": "https://registry.npmjs.org/",
90
- "access": "public"
94
+ "access": "public",
95
+ "types": "./dist/types/index.d.ts"
91
96
  },
92
97
  "scripts": {
93
98
  "new": "modern new",
package/tests/cli.test.ts CHANGED
@@ -89,7 +89,7 @@ describe('bff cli plugin', () => {
89
89
 
90
90
  it('server routes', async () => {
91
91
  const main = manager.clone().usePlugin(plugin);
92
- main.registe({ modifyServerRoutes });
92
+ main.registerHook({ modifyServerRoutes });
93
93
  const runner = await main.init();
94
94
  const result = await runner.modifyServerRoutes({ routes: [] });
95
95
 
@@ -1,5 +0,0 @@
1
- import './types';
2
-
3
- declare const _default: any;
4
-
5
- export default _default;
@@ -1,2 +0,0 @@
1
- export declare const API_APP_NAME = "_app";
2
- export declare const BUILD_FILES: string[];
@@ -1,2 +0,0 @@
1
- import './types';
2
- export * from './constants';
@@ -1,11 +0,0 @@
1
- import { LoaderContext } from 'webpack';
2
- export declare type APILoaderOptions = {
3
- prefix: string;
4
- apiDir: string;
5
- port: number;
6
- fetcher?: string;
7
- requestCreator?: string;
8
- target: string;
9
- };
10
- declare function loader(this: LoaderContext<APILoaderOptions>, source: string): Promise<void>;
11
- export default loader;
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
-
3
- export default _default;
@@ -1,11 +0,0 @@
1
- import '@modern-js/core';
2
- declare module '@modern-js/core' {
3
- interface UserConfig {
4
- bff?: {
5
- prefix?: string;
6
- requestCreator?: string;
7
- fetcher?: string;
8
- proxy: Record<string, any>;
9
- };
10
- }
11
- }