almostnode 0.1.0
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/LICENSE +21 -0
- package/README.md +731 -0
- package/dist/__sw__.js +394 -0
- package/dist/ai-chatbot-demo-entry.d.ts +6 -0
- package/dist/ai-chatbot-demo-entry.d.ts.map +1 -0
- package/dist/ai-chatbot-demo.d.ts +42 -0
- package/dist/ai-chatbot-demo.d.ts.map +1 -0
- package/dist/assets/runtime-worker-D9x_Ddwz.js +60543 -0
- package/dist/assets/runtime-worker-D9x_Ddwz.js.map +1 -0
- package/dist/convex-app-demo-entry.d.ts +6 -0
- package/dist/convex-app-demo-entry.d.ts.map +1 -0
- package/dist/convex-app-demo.d.ts +68 -0
- package/dist/convex-app-demo.d.ts.map +1 -0
- package/dist/cors-proxy.d.ts +46 -0
- package/dist/cors-proxy.d.ts.map +1 -0
- package/dist/create-runtime.d.ts +42 -0
- package/dist/create-runtime.d.ts.map +1 -0
- package/dist/demo.d.ts +6 -0
- package/dist/demo.d.ts.map +1 -0
- package/dist/dev-server.d.ts +97 -0
- package/dist/dev-server.d.ts.map +1 -0
- package/dist/frameworks/next-dev-server.d.ts +202 -0
- package/dist/frameworks/next-dev-server.d.ts.map +1 -0
- package/dist/frameworks/vite-dev-server.d.ts +85 -0
- package/dist/frameworks/vite-dev-server.d.ts.map +1 -0
- package/dist/index.cjs +14965 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +71 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +14867 -0
- package/dist/index.mjs.map +1 -0
- package/dist/next-demo.d.ts +49 -0
- package/dist/next-demo.d.ts.map +1 -0
- package/dist/npm/index.d.ts +71 -0
- package/dist/npm/index.d.ts.map +1 -0
- package/dist/npm/registry.d.ts +66 -0
- package/dist/npm/registry.d.ts.map +1 -0
- package/dist/npm/resolver.d.ts +52 -0
- package/dist/npm/resolver.d.ts.map +1 -0
- package/dist/npm/tarball.d.ts +29 -0
- package/dist/npm/tarball.d.ts.map +1 -0
- package/dist/runtime-interface.d.ts +90 -0
- package/dist/runtime-interface.d.ts.map +1 -0
- package/dist/runtime.d.ts +103 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/sandbox-helpers.d.ts +43 -0
- package/dist/sandbox-helpers.d.ts.map +1 -0
- package/dist/sandbox-runtime.d.ts +65 -0
- package/dist/sandbox-runtime.d.ts.map +1 -0
- package/dist/server-bridge.d.ts +89 -0
- package/dist/server-bridge.d.ts.map +1 -0
- package/dist/shims/assert.d.ts +51 -0
- package/dist/shims/assert.d.ts.map +1 -0
- package/dist/shims/async_hooks.d.ts +37 -0
- package/dist/shims/async_hooks.d.ts.map +1 -0
- package/dist/shims/buffer.d.ts +20 -0
- package/dist/shims/buffer.d.ts.map +1 -0
- package/dist/shims/child_process-browser.d.ts +92 -0
- package/dist/shims/child_process-browser.d.ts.map +1 -0
- package/dist/shims/child_process.d.ts +93 -0
- package/dist/shims/child_process.d.ts.map +1 -0
- package/dist/shims/chokidar.d.ts +55 -0
- package/dist/shims/chokidar.d.ts.map +1 -0
- package/dist/shims/cluster.d.ts +52 -0
- package/dist/shims/cluster.d.ts.map +1 -0
- package/dist/shims/crypto.d.ts +122 -0
- package/dist/shims/crypto.d.ts.map +1 -0
- package/dist/shims/dgram.d.ts +34 -0
- package/dist/shims/dgram.d.ts.map +1 -0
- package/dist/shims/diagnostics_channel.d.ts +80 -0
- package/dist/shims/diagnostics_channel.d.ts.map +1 -0
- package/dist/shims/dns.d.ts +87 -0
- package/dist/shims/dns.d.ts.map +1 -0
- package/dist/shims/domain.d.ts +25 -0
- package/dist/shims/domain.d.ts.map +1 -0
- package/dist/shims/esbuild.d.ts +105 -0
- package/dist/shims/esbuild.d.ts.map +1 -0
- package/dist/shims/events.d.ts +37 -0
- package/dist/shims/events.d.ts.map +1 -0
- package/dist/shims/fs.d.ts +115 -0
- package/dist/shims/fs.d.ts.map +1 -0
- package/dist/shims/fsevents.d.ts +67 -0
- package/dist/shims/fsevents.d.ts.map +1 -0
- package/dist/shims/http.d.ts +217 -0
- package/dist/shims/http.d.ts.map +1 -0
- package/dist/shims/http2.d.ts +81 -0
- package/dist/shims/http2.d.ts.map +1 -0
- package/dist/shims/https.d.ts +36 -0
- package/dist/shims/https.d.ts.map +1 -0
- package/dist/shims/inspector.d.ts +25 -0
- package/dist/shims/inspector.d.ts.map +1 -0
- package/dist/shims/module.d.ts +22 -0
- package/dist/shims/module.d.ts.map +1 -0
- package/dist/shims/net.d.ts +100 -0
- package/dist/shims/net.d.ts.map +1 -0
- package/dist/shims/os.d.ts +159 -0
- package/dist/shims/os.d.ts.map +1 -0
- package/dist/shims/path.d.ts +72 -0
- package/dist/shims/path.d.ts.map +1 -0
- package/dist/shims/perf_hooks.d.ts +50 -0
- package/dist/shims/perf_hooks.d.ts.map +1 -0
- package/dist/shims/process.d.ts +93 -0
- package/dist/shims/process.d.ts.map +1 -0
- package/dist/shims/querystring.d.ts +23 -0
- package/dist/shims/querystring.d.ts.map +1 -0
- package/dist/shims/readdirp.d.ts +52 -0
- package/dist/shims/readdirp.d.ts.map +1 -0
- package/dist/shims/readline.d.ts +62 -0
- package/dist/shims/readline.d.ts.map +1 -0
- package/dist/shims/rollup.d.ts +34 -0
- package/dist/shims/rollup.d.ts.map +1 -0
- package/dist/shims/sentry.d.ts +163 -0
- package/dist/shims/sentry.d.ts.map +1 -0
- package/dist/shims/stream.d.ts +181 -0
- package/dist/shims/stream.d.ts.map +1 -0
- package/dist/shims/tls.d.ts +53 -0
- package/dist/shims/tls.d.ts.map +1 -0
- package/dist/shims/tty.d.ts +30 -0
- package/dist/shims/tty.d.ts.map +1 -0
- package/dist/shims/url.d.ts +64 -0
- package/dist/shims/url.d.ts.map +1 -0
- package/dist/shims/util.d.ts +106 -0
- package/dist/shims/util.d.ts.map +1 -0
- package/dist/shims/v8.d.ts +73 -0
- package/dist/shims/v8.d.ts.map +1 -0
- package/dist/shims/vfs-adapter.d.ts +126 -0
- package/dist/shims/vfs-adapter.d.ts.map +1 -0
- package/dist/shims/vm.d.ts +45 -0
- package/dist/shims/vm.d.ts.map +1 -0
- package/dist/shims/worker_threads.d.ts +66 -0
- package/dist/shims/worker_threads.d.ts.map +1 -0
- package/dist/shims/ws.d.ts +66 -0
- package/dist/shims/ws.d.ts.map +1 -0
- package/dist/shims/zlib.d.ts +161 -0
- package/dist/shims/zlib.d.ts.map +1 -0
- package/dist/transform.d.ts +24 -0
- package/dist/transform.d.ts.map +1 -0
- package/dist/virtual-fs.d.ts +226 -0
- package/dist/virtual-fs.d.ts.map +1 -0
- package/dist/vite-demo.d.ts +35 -0
- package/dist/vite-demo.d.ts.map +1 -0
- package/dist/vite-sw.js +132 -0
- package/dist/worker/runtime-worker.d.ts +8 -0
- package/dist/worker/runtime-worker.d.ts.map +1 -0
- package/dist/worker-runtime.d.ts +50 -0
- package/dist/worker-runtime.d.ts.map +1 -0
- package/package.json +85 -0
- package/src/ai-chatbot-demo-entry.ts +244 -0
- package/src/ai-chatbot-demo.ts +509 -0
- package/src/convex-app-demo-entry.ts +1107 -0
- package/src/convex-app-demo.ts +1316 -0
- package/src/cors-proxy.ts +81 -0
- package/src/create-runtime.ts +147 -0
- package/src/demo.ts +304 -0
- package/src/dev-server.ts +274 -0
- package/src/frameworks/next-dev-server.ts +2224 -0
- package/src/frameworks/vite-dev-server.ts +702 -0
- package/src/index.ts +101 -0
- package/src/next-demo.ts +1784 -0
- package/src/npm/index.ts +347 -0
- package/src/npm/registry.ts +152 -0
- package/src/npm/resolver.ts +385 -0
- package/src/npm/tarball.ts +209 -0
- package/src/runtime-interface.ts +103 -0
- package/src/runtime.ts +1046 -0
- package/src/sandbox-helpers.ts +173 -0
- package/src/sandbox-runtime.ts +252 -0
- package/src/server-bridge.ts +426 -0
- package/src/shims/assert.ts +664 -0
- package/src/shims/async_hooks.ts +86 -0
- package/src/shims/buffer.ts +75 -0
- package/src/shims/child_process-browser.ts +217 -0
- package/src/shims/child_process.ts +463 -0
- package/src/shims/chokidar.ts +313 -0
- package/src/shims/cluster.ts +67 -0
- package/src/shims/crypto.ts +830 -0
- package/src/shims/dgram.ts +47 -0
- package/src/shims/diagnostics_channel.ts +196 -0
- package/src/shims/dns.ts +172 -0
- package/src/shims/domain.ts +58 -0
- package/src/shims/esbuild.ts +805 -0
- package/src/shims/events.ts +195 -0
- package/src/shims/fs.ts +803 -0
- package/src/shims/fsevents.ts +63 -0
- package/src/shims/http.ts +904 -0
- package/src/shims/http2.ts +96 -0
- package/src/shims/https.ts +86 -0
- package/src/shims/inspector.ts +30 -0
- package/src/shims/module.ts +82 -0
- package/src/shims/net.ts +359 -0
- package/src/shims/os.ts +195 -0
- package/src/shims/path.ts +199 -0
- package/src/shims/perf_hooks.ts +92 -0
- package/src/shims/process.ts +346 -0
- package/src/shims/querystring.ts +97 -0
- package/src/shims/readdirp.ts +228 -0
- package/src/shims/readline.ts +110 -0
- package/src/shims/rollup.ts +80 -0
- package/src/shims/sentry.ts +133 -0
- package/src/shims/stream.ts +1126 -0
- package/src/shims/tls.ts +95 -0
- package/src/shims/tty.ts +64 -0
- package/src/shims/url.ts +171 -0
- package/src/shims/util.ts +312 -0
- package/src/shims/v8.ts +113 -0
- package/src/shims/vfs-adapter.ts +402 -0
- package/src/shims/vm.ts +83 -0
- package/src/shims/worker_threads.ts +111 -0
- package/src/shims/ws.ts +382 -0
- package/src/shims/zlib.ts +289 -0
- package/src/transform.ts +313 -0
- package/src/types/external.d.ts +67 -0
- package/src/virtual-fs.ts +903 -0
- package/src/vite-demo.ts +577 -0
- package/src/worker/runtime-worker.ts +128 -0
- package/src/worker-runtime.ts +145 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* readline shim - Terminal readline is not available in browser
|
|
3
|
+
* Provides stubs for common usage patterns
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { EventEmitter } from './events';
|
|
7
|
+
|
|
8
|
+
export interface ReadLineOptions {
|
|
9
|
+
input?: unknown;
|
|
10
|
+
output?: unknown;
|
|
11
|
+
terminal?: boolean;
|
|
12
|
+
prompt?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export class Interface extends EventEmitter {
|
|
16
|
+
constructor(_options?: ReadLineOptions) {
|
|
17
|
+
super();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
prompt(_preserveCursor?: boolean): void {
|
|
21
|
+
// No-op in browser
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
setPrompt(_prompt: string): void {
|
|
25
|
+
// No-op
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
getPrompt(): string {
|
|
29
|
+
return '';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
question(_query: string, callback: (answer: string) => void): void {
|
|
33
|
+
// In browser, we can't get input - just call callback with empty
|
|
34
|
+
setTimeout(() => callback(''), 0);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
pause(): this {
|
|
38
|
+
return this;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
resume(): this {
|
|
42
|
+
return this;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
close(): void {
|
|
46
|
+
this.emit('close');
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
write(_data: string, _key?: { ctrl?: boolean; name?: string }): void {
|
|
50
|
+
// No-op
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
line: string = '';
|
|
54
|
+
cursor: number = 0;
|
|
55
|
+
|
|
56
|
+
getCursorPos(): { rows: number; cols: number } {
|
|
57
|
+
return { rows: 0, cols: 0 };
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function createInterface(options?: ReadLineOptions): Interface {
|
|
62
|
+
return new Interface(options);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function clearLine(_stream: unknown, _dir: number, _callback?: () => void): boolean {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function clearScreenDown(_stream: unknown, _callback?: () => void): boolean {
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function cursorTo(_stream: unknown, _x: number, _y?: number, _callback?: () => void): boolean {
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function moveCursor(_stream: unknown, _dx: number, _dy: number, _callback?: () => void): boolean {
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function emitKeypressEvents(_stream: unknown, _interface?: Interface): void {
|
|
82
|
+
// No-op
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Promises API
|
|
86
|
+
export const promises = {
|
|
87
|
+
createInterface: (options?: ReadLineOptions) => {
|
|
88
|
+
const rl = createInterface(options);
|
|
89
|
+
return {
|
|
90
|
+
question: (query: string) => new Promise<string>((resolve) => {
|
|
91
|
+
rl.question(query, resolve);
|
|
92
|
+
}),
|
|
93
|
+
close: () => rl.close(),
|
|
94
|
+
[Symbol.asyncIterator]: async function* () {
|
|
95
|
+
// No lines in browser
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export default {
|
|
102
|
+
Interface,
|
|
103
|
+
createInterface,
|
|
104
|
+
clearLine,
|
|
105
|
+
clearScreenDown,
|
|
106
|
+
cursorTo,
|
|
107
|
+
moveCursor,
|
|
108
|
+
emitKeypressEvents,
|
|
109
|
+
promises,
|
|
110
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rollup shim - Uses @rollup/browser for browser-compatible Rollup
|
|
3
|
+
*
|
|
4
|
+
* Vite uses Rollup for bundling. The native Rollup package doesn't work
|
|
5
|
+
* in browsers, so we need to use @rollup/browser instead.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// Rollup instance loaded from CDN
|
|
9
|
+
let rollupInstance: unknown = null;
|
|
10
|
+
let loadPromise: Promise<unknown> | null = null;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Load Rollup from CDN
|
|
14
|
+
*/
|
|
15
|
+
async function loadRollup(): Promise<unknown> {
|
|
16
|
+
if (rollupInstance) return rollupInstance;
|
|
17
|
+
if (loadPromise) return loadPromise;
|
|
18
|
+
|
|
19
|
+
loadPromise = (async () => {
|
|
20
|
+
try {
|
|
21
|
+
// Load @rollup/browser from CDN
|
|
22
|
+
const rollup = await import(
|
|
23
|
+
/* @vite-ignore */
|
|
24
|
+
'https://esm.sh/@rollup/browser@4.9.0'
|
|
25
|
+
);
|
|
26
|
+
rollupInstance = rollup;
|
|
27
|
+
console.log('[rollup] Browser version loaded');
|
|
28
|
+
return rollup;
|
|
29
|
+
} catch (error) {
|
|
30
|
+
console.error('[rollup] Failed to load browser version:', error);
|
|
31
|
+
loadPromise = null;
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
})();
|
|
35
|
+
|
|
36
|
+
return loadPromise;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// For synchronous require(), we need a stub that works before async load
|
|
40
|
+
// This will be replaced when loadRollup() is called
|
|
41
|
+
|
|
42
|
+
export const VERSION = '4.9.0';
|
|
43
|
+
|
|
44
|
+
export async function rollup(options: unknown): Promise<unknown> {
|
|
45
|
+
const r = await loadRollup() as { rollup: (options: unknown) => Promise<unknown> };
|
|
46
|
+
return r.rollup(options);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export async function watch(options: unknown): Promise<unknown> {
|
|
50
|
+
const r = await loadRollup() as { watch: (options: unknown) => unknown };
|
|
51
|
+
return r.watch(options);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Export a function to pre-load rollup
|
|
55
|
+
export { loadRollup };
|
|
56
|
+
|
|
57
|
+
// Define plugin context types that Vite expects
|
|
58
|
+
export interface Plugin {
|
|
59
|
+
name: string;
|
|
60
|
+
[key: string]: unknown;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface PluginContext {
|
|
64
|
+
meta: { rollupVersion: string };
|
|
65
|
+
parse: (code: string) => unknown;
|
|
66
|
+
[key: string]: unknown;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Stub for native module detection - this prevents the "unsupported platform" error
|
|
70
|
+
export function getPackageBase(): string {
|
|
71
|
+
return '';
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Export default that matches Rollup's API
|
|
75
|
+
export default {
|
|
76
|
+
VERSION,
|
|
77
|
+
rollup,
|
|
78
|
+
watch,
|
|
79
|
+
loadRollup,
|
|
80
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sentry SDK shim for browser-based runtime
|
|
3
|
+
* Provides no-op implementations since error tracking to Sentry isn't useful in our environment
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// No-op functions
|
|
7
|
+
const noop = () => {};
|
|
8
|
+
const noopPromise = () => Promise.resolve();
|
|
9
|
+
|
|
10
|
+
// Scope class (no-op)
|
|
11
|
+
class Scope {
|
|
12
|
+
setTag = noop;
|
|
13
|
+
setTags = noop;
|
|
14
|
+
setUser = noop;
|
|
15
|
+
setContext = noop;
|
|
16
|
+
setExtra = noop;
|
|
17
|
+
setExtras = noop;
|
|
18
|
+
setLevel = noop;
|
|
19
|
+
setTransactionName = noop;
|
|
20
|
+
setFingerprint = noop;
|
|
21
|
+
addBreadcrumb = noop;
|
|
22
|
+
clearBreadcrumbs = noop;
|
|
23
|
+
addEventProcessor = noop;
|
|
24
|
+
addAttachment = noop;
|
|
25
|
+
clear = noop;
|
|
26
|
+
update = () => this;
|
|
27
|
+
clone = () => new Scope();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Hub class (no-op)
|
|
31
|
+
class Hub {
|
|
32
|
+
getClient = () => undefined;
|
|
33
|
+
getScope = () => new Scope();
|
|
34
|
+
pushScope = () => new Scope();
|
|
35
|
+
popScope = noop;
|
|
36
|
+
withScope = (callback: (scope: Scope) => void) => callback(new Scope());
|
|
37
|
+
captureException = () => '';
|
|
38
|
+
captureMessage = () => '';
|
|
39
|
+
captureEvent = () => '';
|
|
40
|
+
addBreadcrumb = noop;
|
|
41
|
+
setUser = noop;
|
|
42
|
+
setTags = noop;
|
|
43
|
+
setTag = noop;
|
|
44
|
+
setExtra = noop;
|
|
45
|
+
setExtras = noop;
|
|
46
|
+
setContext = noop;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Transaction (no-op)
|
|
50
|
+
class Transaction {
|
|
51
|
+
name = '';
|
|
52
|
+
spanId = '';
|
|
53
|
+
traceId = '';
|
|
54
|
+
op = '';
|
|
55
|
+
finish = noop;
|
|
56
|
+
setTag = noop;
|
|
57
|
+
setData = noop;
|
|
58
|
+
setStatus = noop;
|
|
59
|
+
startChild = () => new Transaction();
|
|
60
|
+
toTraceparent = () => '';
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Current hub singleton
|
|
64
|
+
const currentHub = new Hub();
|
|
65
|
+
|
|
66
|
+
// Main exports
|
|
67
|
+
export const init = noop;
|
|
68
|
+
export const close = noopPromise;
|
|
69
|
+
export const flush = noopPromise;
|
|
70
|
+
export const captureException = () => '';
|
|
71
|
+
export const captureMessage = () => '';
|
|
72
|
+
export const captureEvent = () => '';
|
|
73
|
+
export const addBreadcrumb = noop;
|
|
74
|
+
export const setUser = noop;
|
|
75
|
+
export const setTag = noop;
|
|
76
|
+
export const setTags = noop;
|
|
77
|
+
export const setExtra = noop;
|
|
78
|
+
export const setExtras = noop;
|
|
79
|
+
export const setContext = noop;
|
|
80
|
+
export const configureScope = (callback: (scope: Scope) => void) => callback(new Scope());
|
|
81
|
+
export const withScope = (callback: (scope: Scope) => void) => callback(new Scope());
|
|
82
|
+
export const getCurrentHub = () => currentHub;
|
|
83
|
+
export const getHubFromCarrier = () => currentHub;
|
|
84
|
+
export const startTransaction = () => new Transaction();
|
|
85
|
+
export const lastEventId = () => undefined;
|
|
86
|
+
|
|
87
|
+
// Classes
|
|
88
|
+
export { Scope, Hub };
|
|
89
|
+
|
|
90
|
+
// Integrations (no-op)
|
|
91
|
+
export const Integrations = {
|
|
92
|
+
Http: class {},
|
|
93
|
+
OnUncaughtException: class {},
|
|
94
|
+
OnUnhandledRejection: class {},
|
|
95
|
+
Console: class {},
|
|
96
|
+
Context: class {},
|
|
97
|
+
ContextLines: class {},
|
|
98
|
+
Modules: class {},
|
|
99
|
+
RequestData: class {},
|
|
100
|
+
LinkedErrors: class {},
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
// Node-specific exports
|
|
104
|
+
export const Handlers = {
|
|
105
|
+
requestHandler: () => (_req: unknown, _res: unknown, next: () => void) => next(),
|
|
106
|
+
errorHandler: () => (_err: unknown, _req: unknown, _res: unknown, next: () => void) => next(),
|
|
107
|
+
tracingHandler: () => (_req: unknown, _res: unknown, next: () => void) => next(),
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export default {
|
|
111
|
+
init,
|
|
112
|
+
close,
|
|
113
|
+
flush,
|
|
114
|
+
captureException,
|
|
115
|
+
captureMessage,
|
|
116
|
+
captureEvent,
|
|
117
|
+
addBreadcrumb,
|
|
118
|
+
setUser,
|
|
119
|
+
setTag,
|
|
120
|
+
setTags,
|
|
121
|
+
setExtra,
|
|
122
|
+
setExtras,
|
|
123
|
+
setContext,
|
|
124
|
+
configureScope,
|
|
125
|
+
withScope,
|
|
126
|
+
getCurrentHub,
|
|
127
|
+
startTransaction,
|
|
128
|
+
lastEventId,
|
|
129
|
+
Scope,
|
|
130
|
+
Hub,
|
|
131
|
+
Integrations,
|
|
132
|
+
Handlers,
|
|
133
|
+
};
|