@vectorx/functions-framework 0.0.0-beta-20251112071234
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/README.md +141 -0
- package/bin/rcb-ff.js +153 -0
- package/lib/async-context.js +61 -0
- package/lib/config.js +10 -0
- package/lib/constants.js +10 -0
- package/lib/error.js +47 -0
- package/lib/framework.js +183 -0
- package/lib/function-loader.js +63 -0
- package/lib/function-registry.js +20 -0
- package/lib/function-wrapper.js +170 -0
- package/lib/index.js +23 -0
- package/lib/logger.js +204 -0
- package/lib/middlewares/index.js +19 -0
- package/lib/middlewares/middle-apm-injection.js +37 -0
- package/lib/middlewares/middle-async-context.js +27 -0
- package/lib/middlewares/middle-common-logger.js +67 -0
- package/lib/middlewares/middle-context-injection.js +33 -0
- package/lib/middlewares/middle-event-id.js +20 -0
- package/lib/middlewares/middle-function-route.js +26 -0
- package/lib/middlewares/middle-logs-request.js +98 -0
- package/lib/middlewares/middle-open-gw-request.js +29 -0
- package/lib/request.js +162 -0
- package/lib/router.js +51 -0
- package/lib/server.js +115 -0
- package/lib/sse.js +258 -0
- package/lib/telemetry/langfuse.js +13 -0
- package/lib/types.js +2 -0
- package/lib/unified-responder.js +64 -0
- package/lib/user-logger.js +54 -0
- package/lib/utils/apm.config.js +7 -0
- package/lib/utils/apm.js +140 -0
- package/lib/utils/common.js +5 -0
- package/lib/utils/console-intercept.js +58 -0
- package/lib/utils/error-stack.js +30 -0
- package/lib/utils/helper.js +88 -0
- package/lib/utils/machineId.js +72 -0
- package/package.json +76 -0
- package/types/async-context.d.ts +17 -0
- package/types/config.d.ts +1 -0
- package/types/constants.d.ts +2 -0
- package/types/error.d.ts +20 -0
- package/types/framework.d.ts +32 -0
- package/types/function-loader.d.ts +26 -0
- package/types/function-registry.d.ts +4 -0
- package/types/function-wrapper.d.ts +3 -0
- package/types/index.d.ts +7 -0
- package/types/logger.d.ts +74 -0
- package/types/middlewares/index.d.ts +8 -0
- package/types/middlewares/middle-apm-injection.d.ts +2 -0
- package/types/middlewares/middle-async-context.d.ts +2 -0
- package/types/middlewares/middle-common-logger.d.ts +2 -0
- package/types/middlewares/middle-context-injection.d.ts +4 -0
- package/types/middlewares/middle-event-id.d.ts +2 -0
- package/types/middlewares/middle-function-route.d.ts +4 -0
- package/types/middlewares/middle-logs-request.d.ts +3 -0
- package/types/middlewares/middle-open-gw-request.d.ts +2 -0
- package/types/request.d.ts +46 -0
- package/types/router.d.ts +15 -0
- package/types/server.d.ts +33 -0
- package/types/sse.d.ts +23 -0
- package/types/telemetry/langfuse.d.ts +4 -0
- package/types/types.d.ts +18 -0
- package/types/unified-responder.d.ts +15 -0
- package/types/user-logger.d.ts +5 -0
- package/types/utils/apm.config.d.ts +6 -0
- package/types/utils/apm.d.ts +21 -0
- package/types/utils/common.d.ts +2 -0
- package/types/utils/console-intercept.d.ts +6 -0
- package/types/utils/error-stack.d.ts +5 -0
- package/types/utils/helper.d.ts +7 -0
- package/types/utils/machineId.d.ts +2 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface IMeasurementItem {
|
|
2
|
+
measurement_name: string;
|
|
3
|
+
measurement_data: Record<string, any>;
|
|
4
|
+
sequence: Record<string, any>;
|
|
5
|
+
}
|
|
6
|
+
export declare class ApmReporter {
|
|
7
|
+
seq: number;
|
|
8
|
+
private apmContext;
|
|
9
|
+
private reportQueue;
|
|
10
|
+
private timer;
|
|
11
|
+
constructor();
|
|
12
|
+
getSequence(): {
|
|
13
|
+
context_sdkSeqId: number;
|
|
14
|
+
context_sdkSessionId: string;
|
|
15
|
+
context_pageSessionId: string;
|
|
16
|
+
clientTime: number;
|
|
17
|
+
};
|
|
18
|
+
report(measurement_name: string, measurement_data?: IMeasurementItem["measurement_data"]): void;
|
|
19
|
+
private batchReport;
|
|
20
|
+
private _request;
|
|
21
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare function getCaller(belowFn?: any, index?: number): string;
|
|
2
|
+
declare function formatCallSite(stackTrace: any): string;
|
|
3
|
+
declare function getStackTraces(belowFn?: any): any[];
|
|
4
|
+
declare function truncateContent(content: any): any;
|
|
5
|
+
export { getCaller, formatCallSite, getStackTraces, truncateContent };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function deepFreeze<T>(obj: T): T;
|
|
2
|
+
export declare function isPlainObject(obj: any): boolean;
|
|
3
|
+
export declare function isFormData(val: any): boolean;
|
|
4
|
+
export declare function toQueryString(data: Record<string, any>): string;
|
|
5
|
+
export declare function obj2StrRecord(obj: object): Record<string, string>;
|
|
6
|
+
export declare function formatUrl(PROTOCOL: string, url: string, query: Record<string, any>): string;
|
|
7
|
+
export declare function getDependencyVersion(packageName: any, searchPath: any): any;
|