@based/server
Advanced tools
Comparing version 4.4.0 to 4.5.0
/// <reference types="node" /> | ||
import type { BasedServer } from '../server'; | ||
import { BasedRoute, BasedSpec, FunctionConfig } from './types'; | ||
import { BasedRoute, BasedSpec, FunctionConfig, BasedFullFunctionSpec } from './types'; | ||
export * from './types'; | ||
@@ -32,2 +32,3 @@ export declare class BasedFunctions { | ||
constructor(server: BasedServer, config?: FunctionConfig); | ||
addSpecs(specs: BasedFullFunctionSpec): void; | ||
uninstallLoop(): void; | ||
@@ -34,0 +35,0 @@ updateConfig(config: FunctionConfig): void; |
@@ -42,2 +42,8 @@ "use strict"; | ||
} | ||
addSpecs(specs) { | ||
for (const key in specs) { | ||
const s = specs[key]; | ||
this.updateInternal(s); | ||
} | ||
} | ||
uninstallLoop() { | ||
@@ -44,0 +50,0 @@ this.unregisterTimeout = setTimeout(async () => { |
@@ -149,2 +149,8 @@ import { BasedQueryFunction, BasedFunction, BasedChannelFunction, HttpResponse, UninstallFunction, BasedStreamFunction, BasedChannelPublishFunction, Authorize } from '@based/functions'; | ||
export declare function isRoute(route: any): route is BasedRoute; | ||
export type BasedFullFunctionSpec = { | ||
[name: string]: BasedSpec & { | ||
maxPayloadSize?: number; | ||
rateLimitTokens?: number; | ||
}; | ||
}; | ||
export {}; |
{ | ||
"name": "@based/server", | ||
"version": "4.4.0", | ||
"version": "4.5.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
397358
6044