@tuya-sat/micro-dev-proxy 3.1.7 → 3.1.10

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.
@@ -37,7 +37,7 @@ export default class AppProxy {
37
37
  init(): Promise<void>;
38
38
  getCsrf(): Promise<void>;
39
39
  getLoginCookie(): Promise<void>;
40
- getCookie(prevCookie: any): string;
40
+ getCookie(prevCookie?: string): string;
41
41
  processReq(proxyReq: Parameters<Options['onProxyReq']>[0], req: any, res: any): void;
42
42
  combinedHeader(prevHeadar: any): any;
43
43
  processRes(responseBuffer: any, proxyRes: any, req: any, res: any): Promise<any>;
package/dist/appProxy.js CHANGED
@@ -149,7 +149,7 @@ class AppProxy {
149
149
  });
150
150
  });
151
151
  }
152
- getCookie(prevCookie) {
152
+ getCookie(prevCookie = '') {
153
153
  return [
154
154
  ...prevCookie
155
155
  .split(';')
package/dist/index.js CHANGED
@@ -37,6 +37,7 @@ function createProxy(_a) {
37
37
  return function middleware(app) {
38
38
  const [resolve, , waiting] = awaiting();
39
39
  app._isLogin = waiting;
40
+ app.__appProxy__ = appProxy;
40
41
  appProxy.init().finally(() => {
41
42
  resolve();
42
43
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-sat/micro-dev-proxy",
3
- "version": "3.1.7",
3
+ "version": "3.1.10",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "scripts": {