@volter/tabnode 0.4.0 → 0.5.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.
Files changed (80) hide show
  1. package/dist/__sw__.js +259 -5
  2. package/dist/assets/{runtime-worker-DoV8lqBn.js → runtime-worker-B9buriZs.js} +4021 -2961
  3. package/dist/fetch-transport.d.ts +20 -0
  4. package/dist/guest-timers.d.ts +15 -0
  5. package/dist/http-client-transport.d.ts +19 -0
  6. package/dist/index.d.ts +11 -0
  7. package/dist/index.mjs +5204 -3057
  8. package/dist/native-stream-binding.d.ts +57 -0
  9. package/dist/native-stream-owner.d.ts +121 -0
  10. package/dist/node-lib/binding/duplex_stream.d.ts +26 -0
  11. package/dist/node-lib/binding/fds.d.ts +8 -0
  12. package/dist/node-lib/binding/fs.d.ts +311 -78
  13. package/dist/node-lib/binding/misc.d.ts +1 -0
  14. package/dist/node-lib/binding/pipe_wrap.d.ts +4 -4
  15. package/dist/node-lib/binding/process_wrap.d.ts +13 -2
  16. package/dist/node-lib/binding/stream_wrap.d.ts +27 -18
  17. package/dist/node-lib/binding/tcp_wrap.d.ts +0 -1
  18. package/dist/node-lib/binding/tty_wrap.d.ts +43 -2
  19. package/dist/node-lib/binding/util.d.ts +83 -0
  20. package/dist/node-lib/binding/uv.d.ts +4 -0
  21. package/dist/node-lib/fs-module.d.ts +1 -0
  22. package/dist/node-lib/internals/buffer-and-streams.d.ts +30 -17
  23. package/dist/node-lib/internals/index.d.ts +1 -1
  24. package/dist/node-lib/load.d.ts +17 -3
  25. package/dist/node-lib/module-hooks.d.ts +1 -0
  26. package/dist/node-lib/public-modules.d.ts +1 -1
  27. package/dist/node-lib/timers.d.ts +38 -0
  28. package/dist/node-process-host.d.ts +41 -0
  29. package/dist/process-registry.d.ts +39 -0
  30. package/dist/process-tokens.d.ts +16 -0
  31. package/dist/promise-ownership.d.ts +3 -0
  32. package/dist/runtime.d.ts +10 -9
  33. package/dist/shims/child_process.d.ts +2 -0
  34. package/dist/shims/crypto.d.ts +660 -119
  35. package/dist/shims/dns.d.ts +76 -2
  36. package/dist/shims/process.d.ts +1 -0
  37. package/dist/shims/string_decoder.d.ts +19 -3
  38. package/dist/shims/tls.d.ts +853 -31
  39. package/dist/source-edits.d.ts +7 -0
  40. package/package.json +1 -1
  41. package/src/code-transforms.ts +2 -3
  42. package/src/fetch-transport.ts +98 -0
  43. package/src/guest-timers.ts +89 -0
  44. package/src/http-client-transport.ts +169 -0
  45. package/src/index.ts +12 -0
  46. package/src/native-stream-binding.ts +393 -0
  47. package/src/native-stream-owner.ts +317 -0
  48. package/src/node-lib/binding/duplex_stream.ts +95 -0
  49. package/src/node-lib/binding/fds.ts +18 -1
  50. package/src/node-lib/binding/fs.ts +45 -17
  51. package/src/node-lib/binding/misc.ts +2 -0
  52. package/src/node-lib/binding/pipe_wrap.ts +35 -12
  53. package/src/node-lib/binding/process_wrap.ts +72 -18
  54. package/src/node-lib/binding/stream_wrap.ts +196 -72
  55. package/src/node-lib/binding/tcp_wrap.ts +43 -8
  56. package/src/node-lib/binding/tty_wrap.ts +135 -8
  57. package/src/node-lib/binding/util.ts +24 -15
  58. package/src/node-lib/binding/uv.ts +4 -0
  59. package/src/node-lib/fs-module.ts +2 -18
  60. package/src/node-lib/internal/navigator.js +149 -0
  61. package/src/node-lib/internals/buffer-and-streams.ts +50 -11
  62. package/src/node-lib/internals/events-util.ts +5 -0
  63. package/src/node-lib/internals/index.ts +12 -2
  64. package/src/node-lib/load.ts +170 -62
  65. package/src/node-lib/module-hooks.ts +5 -2
  66. package/src/node-lib/public-modules.ts +12 -48
  67. package/src/node-lib/sources.ts +4 -0
  68. package/src/node-lib/timers.ts +93 -0
  69. package/src/node-process-host.ts +124 -0
  70. package/src/process-registry.ts +144 -0
  71. package/src/process-tokens.ts +60 -6
  72. package/src/promise-ownership.ts +28 -0
  73. package/src/runtime.ts +90 -214
  74. package/src/shims/child_process.ts +313 -80
  75. package/src/shims/crypto.ts +115 -100
  76. package/src/shims/dns.ts +17 -1
  77. package/src/shims/process.ts +33 -11
  78. package/src/shims/string_decoder.ts +10 -6
  79. package/src/shims/tls.ts +49 -19
  80. package/src/source-edits.ts +20 -0
@@ -61,7 +61,7 @@ export declare const promises: {
61
61
  export declare const ADDRCONFIG = 0;
62
62
  export declare const V4MAPPED = 0;
63
63
  export declare const ALL = 0;
64
- declare const _default: {
64
+ declare const dnsModule: {
65
65
  lookup: typeof lookup;
66
66
  resolve: typeof resolve;
67
67
  resolve4: typeof resolve4;
@@ -87,4 +87,78 @@ declare const _default: {
87
87
  V4MAPPED: number;
88
88
  ALL: number;
89
89
  };
90
- export default _default;
90
+ export declare function createDnsModule(): {
91
+ promises: {
92
+ NODATA: string;
93
+ FORMERR: string;
94
+ SERVFAIL: string;
95
+ NOTFOUND: string;
96
+ NOTIMP: string;
97
+ REFUSED: string;
98
+ BADQUERY: string;
99
+ BADNAME: string;
100
+ BADFAMILY: string;
101
+ BADRESP: string;
102
+ CONNREFUSED: string;
103
+ TIMEOUT: string;
104
+ EOF: string;
105
+ FILE: string;
106
+ NOMEM: string;
107
+ DESTRUCTION: string;
108
+ BADSTR: string;
109
+ BADFLAGS: string;
110
+ NONAME: string;
111
+ BADHINTS: string;
112
+ NOTINITIALIZED: string;
113
+ LOADIPHLPAPI: string;
114
+ ADDRGETNETWORKPARAMS: string;
115
+ CANCELLED: string;
116
+ lookup: (hostname: string, options?: {
117
+ family?: number;
118
+ all?: boolean;
119
+ }) => Promise<unknown>;
120
+ resolve: (hostname: string) => Promise<string[]>;
121
+ resolve4: (hostname: string) => Promise<string[]>;
122
+ resolve6: (hostname: string) => Promise<string[]>;
123
+ reverse: (ip: string) => Promise<string[]>;
124
+ setServers: (_servers: string[]) => void;
125
+ getServers: () => string[];
126
+ };
127
+ NODATA: string;
128
+ FORMERR: string;
129
+ SERVFAIL: string;
130
+ NOTFOUND: string;
131
+ NOTIMP: string;
132
+ REFUSED: string;
133
+ BADQUERY: string;
134
+ BADNAME: string;
135
+ BADFAMILY: string;
136
+ BADRESP: string;
137
+ CONNREFUSED: string;
138
+ TIMEOUT: string;
139
+ EOF: string;
140
+ FILE: string;
141
+ NOMEM: string;
142
+ DESTRUCTION: string;
143
+ BADSTR: string;
144
+ BADFLAGS: string;
145
+ NONAME: string;
146
+ BADHINTS: string;
147
+ NOTINITIALIZED: string;
148
+ LOADIPHLPAPI: string;
149
+ ADDRGETNETWORKPARAMS: string;
150
+ CANCELLED: string;
151
+ lookup: typeof lookup;
152
+ resolve: typeof resolve;
153
+ resolve4: typeof resolve4;
154
+ resolve6: typeof resolve6;
155
+ reverse: typeof reverse;
156
+ setServers: typeof setServers;
157
+ getServers: typeof getServers;
158
+ setDefaultResultOrder: typeof setDefaultResultOrder;
159
+ getDefaultResultOrder: typeof getDefaultResultOrder;
160
+ ADDRCONFIG: number;
161
+ V4MAPPED: number;
162
+ ALL: number;
163
+ };
164
+ export default dnsModule;
@@ -82,6 +82,7 @@ export interface ProcessStdin extends Readable {
82
82
  type ProcessReadableStream = ProcessStdin;
83
83
  export interface Process {
84
84
  env: ProcessEnv;
85
+ title: string;
85
86
  cwd: () => string;
86
87
  chdir: (directory: string) => void;
87
88
  platform: string;
@@ -18,6 +18,18 @@
18
18
  * a string too long for V8 is refused by the input's size rather than by
19
19
  * building the string and failing.
20
20
  */
21
+ /**
22
+ * Node's `Buffer`, read when a decoder is first used rather than when this
23
+ * module is evaluated. `buffer` is a vendored Node file that `node-lib`'s
24
+ * loader builds, and this shim is one of the public modules that loader
25
+ * resolves: taking the class at import time makes the two wait on each other
26
+ * and neither loads at all.
27
+ */
28
+ interface BufferClass {
29
+ isBuffer(value: unknown): boolean;
30
+ from(value: unknown, offset?: unknown, length?: number): Buffer;
31
+ alloc(size: number): Buffer;
32
+ }
21
33
  export interface StringDecoder {
22
34
  encoding: string;
23
35
  lastChar: Buffer;
@@ -33,8 +45,12 @@ interface StringDecoderConstructor {
33
45
  (this: unknown, encoding?: string): void;
34
46
  prototype: StringDecoder;
35
47
  }
36
- export declare const StringDecoder: StringDecoderConstructor;
37
- declare const _default: {
48
+ /** A decoder's constructors and held bytes belong to one builtin graph. */
49
+ export declare function createStringDecoderModule(Bytes: () => BufferClass): {
38
50
  StringDecoder: StringDecoderConstructor;
39
51
  };
40
- export default _default;
52
+ declare const decoder: {
53
+ StringDecoder: StringDecoderConstructor;
54
+ };
55
+ export declare const StringDecoder: StringDecoderConstructor;
56
+ export default decoder;