@based/functions 1.0.0 → 1.0.1

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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @based/cloud-function@1.0.0 build
2
+ > @based/functions@1.0.0 build
3
3
  > npx tsc
4
4
 
package/dist/client.d.ts CHANGED
@@ -7,5 +7,5 @@ export declare abstract class BasedFunctionClient {
7
7
  abstract query(name: string, payload?: any): BasedQuery;
8
8
  abstract stream(name: string, stream?: any, ctx?: Context): Promise<any>;
9
9
  abstract sendAuthState(ctx: Context, authState: AuthState): void;
10
- abstract renewAuthState(ctx: Context): void;
10
+ abstract renewAuthState(ctx: Context, authState?: AuthState): void;
11
11
  }
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  import { Context, HttpSession } from './context';
3
3
  import { BasedFunctionClient } from './client';
4
- import { Stream } from 'stream';
4
+ import { Duplex } from 'stream';
5
5
  export declare type ObservableUpdateFunction<K = any> = {
6
6
  (data: K, checksum?: number, diff?: any, fromChecksum?: number, isDeflate?: boolean, rawData?: K, err?: any): void;
7
7
  __internalObs__?: true;
@@ -13,7 +13,7 @@ export declare type StreamPayload<P = any> = {
13
13
  payload?: P;
14
14
  mimeType: string;
15
15
  size: number;
16
- stream: Stream & {
16
+ stream: Duplex & {
17
17
  size: number;
18
18
  receivedBytes: number;
19
19
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@based/functions",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/client.ts CHANGED
@@ -13,5 +13,5 @@ export abstract class BasedFunctionClient {
13
13
 
14
14
  abstract sendAuthState(ctx: Context, authState: AuthState): void
15
15
 
16
- abstract renewAuthState(ctx: Context): void
16
+ abstract renewAuthState(ctx: Context, authState?: AuthState): void
17
17
  }
package/src/functions.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Context, HttpSession } from './context'
2
2
  import { BasedFunctionClient } from './client'
3
- import { Stream } from 'stream'
3
+ import { Duplex } from 'stream'
4
4
 
5
5
  export type ObservableUpdateFunction<K = any> = {
6
6
  (
@@ -35,7 +35,7 @@ export type StreamPayload<P = any> = {
35
35
  payload?: P
36
36
  mimeType: string
37
37
  size: number
38
- stream: Stream & {
38
+ stream: Duplex & {
39
39
  size: number
40
40
  receivedBytes: number
41
41
  }
package/dist/errors.d.ts DELETED
File without changes
package/dist/errors.js DELETED
@@ -1,2 +0,0 @@
1
- // add all errors here and use it in the client as well
2
- //# sourceMappingURL=errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,uDAAuD"}
package/dist/network.d.ts DELETED
File without changes
package/dist/network.js DELETED
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=network.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"network.js","sourceRoot":"","sources":["../src/network.ts"],"names":[],"mappings":""}
package/dist/types.d.ts DELETED
File without changes
package/dist/types.js DELETED
@@ -1,2 +0,0 @@
1
- // function types
2
- //# sourceMappingURL=types.js.map
package/dist/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,iBAAiB"}