@based/functions 3.2.0 → 3.2.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.
@@ -5,7 +5,7 @@ import { Context, HttpSession } from './context.js';
5
5
  import { BasedFunctionClient } from './client.js';
6
6
  import { BasedDataStream } from './stream.js';
7
7
  import { Authorize } from './auth.js';
8
- import type { BuildOptions } from 'esbuild';
8
+ import type { Plugin } from 'esbuild';
9
9
  export type ObservableUpdateFunction<K = any> = (data: K, checksum?: number, err?: any, cache?: Uint8Array, diff?: any, fromChecksum?: number, isDeflate?: boolean) => void;
10
10
  export type ObserveErrorListener = (err: any) => void;
11
11
  export type HttpHeaders = {
@@ -233,7 +233,7 @@ type BasedAppFunctionConfig = {
233
233
  /** The path your main file will be served through HTTP */
234
234
  path?: string;
235
235
  favicon?: string;
236
- plugins?: BuildOptions['plugins'];
236
+ plugins?: Plugin[];
237
237
  };
238
238
  type BasedJobFunctionConfig = {
239
239
  /** Function type `app, http, channel, function, query, stream, authorize, job` */
@@ -250,6 +250,7 @@ export type BasedAuthorizeFunctionConfig = {
250
250
  export type BasedRoute<T extends BasedFunctionTypes = BasedFunctionTypes, R extends keyof BasedFunctionConfig = 'type' | 'name'> = Required<Partial<BasedFunctionConfig<T>>, R>;
251
251
  export type BasedRouteComplete<T extends BasedFunctionTypes = BasedFunctionTypes> = Required<Partial<BasedFunctionConfig<T>>, 'type' | 'name' | 'maxPayloadSize' | 'rateLimitTokens'> & {
252
252
  tokens?: PathToken[];
253
+ nameOnPath?: boolean;
253
254
  };
254
255
  export declare function isBasedRoute<T extends BasedFunctionTypes>(type: T, route: any): route is BasedRoute<T>;
255
256
  export declare function isAnyBasedRoute(route: any): route is BasedRoute;
@@ -1 +1 @@
1
- {"version":3,"file":"functions.js","sourceRoot":"","sources":["../src/functions.ts"],"names":[],"mappings":"AA6ZA,MAAM,UAAU,YAAY,CAC1B,IAAO,EACP,KAAU;IAEV,OAAO,CACL,KAAK;QACL,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,CAAC;QAC1B,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAC/B,CAAA;AACH,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,IAAO,EACP,MAAW;IAEX,OAAO,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;AACnC,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,MAAW;IAEX,OAAO,eAAe,CAAC,MAAM,CAAC,CAAA;AAChC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@based/functions",
3
- "version": "3.2.0",
3
+ "version": "3.2.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -19,12 +19,14 @@
19
19
  "sideEffects": false,
20
20
  "dependencies": {
21
21
  "@saulx/utils": "^5.0.0",
22
- "esbuild": "^0.24.2",
23
22
  "utility-types": "^3.10.0"
24
23
  },
25
24
  "devDependencies": {
26
25
  "rimraf": "^3.0.2",
27
26
  "ts-node": "10.9.1",
28
27
  "typescript": "^4.3.5"
28
+ },
29
+ "peerDependencies": {
30
+ "esbuild": "^0.24.2"
29
31
  }
30
32
  }