@continuous-labs/sdk 0.0.4 → 0.0.5

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 (148) hide show
  1. package/esm/lib/config.d.ts +2 -2
  2. package/esm/lib/config.js +2 -2
  3. package/jsr.json +1 -1
  4. package/package.json +2 -2
  5. package/src/lib/config.ts +2 -2
  6. package/esm/models/errors/continuous-simulation-default-error.d.ts +0 -10
  7. package/esm/models/errors/continuous-simulation-default-error.d.ts.map +0 -1
  8. package/esm/models/errors/continuous-simulation-default-error.js +0 -30
  9. package/esm/models/errors/continuous-simulation-default-error.js.map +0 -1
  10. package/esm/models/errors/continuous-simulation-error.d.ts +0 -19
  11. package/esm/models/errors/continuous-simulation-error.d.ts.map +0 -1
  12. package/esm/models/errors/continuous-simulation-error.js +0 -26
  13. package/esm/models/errors/continuous-simulation-error.js.map +0 -1
  14. package/examples/node_modules/@types/node/assert/strict.d.ts +0 -8
  15. package/examples/node_modules/@types/node/assert.d.ts +0 -1062
  16. package/examples/node_modules/@types/node/async_hooks.d.ts +0 -605
  17. package/examples/node_modules/@types/node/buffer.buffer.d.ts +0 -471
  18. package/examples/node_modules/@types/node/buffer.d.ts +0 -1936
  19. package/examples/node_modules/@types/node/child_process.d.ts +0 -1475
  20. package/examples/node_modules/@types/node/cluster.d.ts +0 -577
  21. package/examples/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  22. package/examples/node_modules/@types/node/compatibility/index.d.ts +0 -9
  23. package/examples/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  24. package/examples/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  25. package/examples/node_modules/@types/node/console.d.ts +0 -452
  26. package/examples/node_modules/@types/node/constants.d.ts +0 -21
  27. package/examples/node_modules/@types/node/crypto.d.ts +0 -4590
  28. package/examples/node_modules/@types/node/dgram.d.ts +0 -597
  29. package/examples/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
  30. package/examples/node_modules/@types/node/dns/promises.d.ts +0 -479
  31. package/examples/node_modules/@types/node/dns.d.ts +0 -871
  32. package/examples/node_modules/@types/node/domain.d.ts +0 -170
  33. package/examples/node_modules/@types/node/events.d.ts +0 -977
  34. package/examples/node_modules/@types/node/fs/promises.d.ts +0 -1270
  35. package/examples/node_modules/@types/node/fs.d.ts +0 -4375
  36. package/examples/node_modules/@types/node/globals.d.ts +0 -172
  37. package/examples/node_modules/@types/node/globals.typedarray.d.ts +0 -38
  38. package/examples/node_modules/@types/node/http.d.ts +0 -2049
  39. package/examples/node_modules/@types/node/http2.d.ts +0 -2712
  40. package/examples/node_modules/@types/node/https.d.ts +0 -578
  41. package/examples/node_modules/@types/node/index.d.ts +0 -93
  42. package/examples/node_modules/@types/node/inspector.generated.d.ts +0 -3966
  43. package/examples/node_modules/@types/node/module.d.ts +0 -539
  44. package/examples/node_modules/@types/node/net.d.ts +0 -1031
  45. package/examples/node_modules/@types/node/os.d.ts +0 -506
  46. package/examples/node_modules/@types/node/path.d.ts +0 -200
  47. package/examples/node_modules/@types/node/perf_hooks.d.ts +0 -961
  48. package/examples/node_modules/@types/node/process.d.ts +0 -1961
  49. package/examples/node_modules/@types/node/punycode.d.ts +0 -117
  50. package/examples/node_modules/@types/node/querystring.d.ts +0 -152
  51. package/examples/node_modules/@types/node/readline/promises.d.ts +0 -162
  52. package/examples/node_modules/@types/node/readline.d.ts +0 -589
  53. package/examples/node_modules/@types/node/repl.d.ts +0 -430
  54. package/examples/node_modules/@types/node/sea.d.ts +0 -153
  55. package/examples/node_modules/@types/node/stream/consumers.d.ts +0 -38
  56. package/examples/node_modules/@types/node/stream/promises.d.ts +0 -90
  57. package/examples/node_modules/@types/node/stream/web.d.ts +0 -533
  58. package/examples/node_modules/@types/node/stream.d.ts +0 -1698
  59. package/examples/node_modules/@types/node/string_decoder.d.ts +0 -67
  60. package/examples/node_modules/@types/node/test.d.ts +0 -1787
  61. package/examples/node_modules/@types/node/timers/promises.d.ts +0 -108
  62. package/examples/node_modules/@types/node/timers.d.ts +0 -286
  63. package/examples/node_modules/@types/node/tls.d.ts +0 -1259
  64. package/examples/node_modules/@types/node/trace_events.d.ts +0 -197
  65. package/examples/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -468
  66. package/examples/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -34
  67. package/examples/node_modules/@types/node/ts5.6/index.d.ts +0 -93
  68. package/examples/node_modules/@types/node/tty.d.ts +0 -208
  69. package/examples/node_modules/@types/node/url.d.ts +0 -964
  70. package/examples/node_modules/@types/node/util.d.ts +0 -2331
  71. package/examples/node_modules/@types/node/v8.d.ts +0 -809
  72. package/examples/node_modules/@types/node/vm.d.ts +0 -1001
  73. package/examples/node_modules/@types/node/wasi.d.ts +0 -181
  74. package/examples/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
  75. package/examples/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
  76. package/examples/node_modules/@types/node/web-globals/events.d.ts +0 -97
  77. package/examples/node_modules/@types/node/web-globals/fetch.d.ts +0 -55
  78. package/examples/node_modules/@types/node/worker_threads.d.ts +0 -715
  79. package/examples/node_modules/@types/node/zlib.d.ts +0 -598
  80. package/examples/node_modules/dotenv/config.d.ts +0 -1
  81. package/examples/node_modules/dotenv/config.js +0 -9
  82. package/examples/node_modules/dotenv/lib/cli-options.js +0 -17
  83. package/examples/node_modules/dotenv/lib/env-options.js +0 -28
  84. package/examples/node_modules/dotenv/lib/main.d.ts +0 -162
  85. package/examples/node_modules/dotenv/lib/main.js +0 -386
  86. package/examples/node_modules/esbuild/install.js +0 -300
  87. package/examples/node_modules/esbuild/lib/main.d.ts +0 -720
  88. package/examples/node_modules/esbuild/lib/main.js +0 -2536
  89. package/examples/node_modules/tsx/dist/cjs/api/index.mjs +0 -1
  90. package/examples/node_modules/tsx/dist/cjs/index.mjs +0 -1
  91. package/examples/node_modules/tsx/dist/cli.mjs +0 -55
  92. package/examples/node_modules/tsx/dist/client-D_mPDF5S.mjs +0 -1
  93. package/examples/node_modules/tsx/dist/esm/api/index.mjs +0 -1
  94. package/examples/node_modules/tsx/dist/esm/index.mjs +0 -1
  95. package/examples/node_modules/tsx/dist/get-pipe-path-_tAJyU_v.mjs +0 -1
  96. package/examples/node_modules/tsx/dist/index-DCefr8NP.mjs +0 -14
  97. package/examples/node_modules/tsx/dist/index-gbaejti9.mjs +0 -1
  98. package/examples/node_modules/tsx/dist/lexer-DQCqS3nf.mjs +0 -3
  99. package/examples/node_modules/tsx/dist/loader.mjs +0 -1
  100. package/examples/node_modules/tsx/dist/node-features-JeyyvQz6.mjs +0 -1
  101. package/examples/node_modules/tsx/dist/package-BL7Whz21.mjs +0 -1
  102. package/examples/node_modules/tsx/dist/patch-repl.mjs +0 -1
  103. package/examples/node_modules/tsx/dist/preflight.mjs +0 -1
  104. package/examples/node_modules/tsx/dist/register-DHgpdRjs.mjs +0 -10
  105. package/examples/node_modules/tsx/dist/register-SoqaU4rg.mjs +0 -2
  106. package/examples/node_modules/tsx/dist/repl.mjs +0 -3
  107. package/examples/node_modules/tsx/dist/require-Cuv-0BLU.mjs +0 -1
  108. package/examples/node_modules/tsx/dist/suppress-warnings.mjs +0 -1
  109. package/examples/node_modules/tsx/dist/temporary-directory-BDDVQOvU.mjs +0 -1
  110. package/examples/node_modules/tsx/dist/types-Cxp8y2TL.d.ts +0 -5
  111. package/examples/node_modules/undici-types/agent.d.ts +0 -31
  112. package/examples/node_modules/undici-types/api.d.ts +0 -43
  113. package/examples/node_modules/undici-types/balanced-pool.d.ts +0 -29
  114. package/examples/node_modules/undici-types/cache.d.ts +0 -36
  115. package/examples/node_modules/undici-types/client.d.ts +0 -108
  116. package/examples/node_modules/undici-types/connector.d.ts +0 -34
  117. package/examples/node_modules/undici-types/content-type.d.ts +0 -21
  118. package/examples/node_modules/undici-types/cookies.d.ts +0 -28
  119. package/examples/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  120. package/examples/node_modules/undici-types/dispatcher.d.ts +0 -256
  121. package/examples/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  122. package/examples/node_modules/undici-types/errors.d.ts +0 -149
  123. package/examples/node_modules/undici-types/eventsource.d.ts +0 -61
  124. package/examples/node_modules/undici-types/fetch.d.ts +0 -209
  125. package/examples/node_modules/undici-types/file.d.ts +0 -39
  126. package/examples/node_modules/undici-types/filereader.d.ts +0 -54
  127. package/examples/node_modules/undici-types/formdata.d.ts +0 -108
  128. package/examples/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  129. package/examples/node_modules/undici-types/global-origin.d.ts +0 -7
  130. package/examples/node_modules/undici-types/handlers.d.ts +0 -15
  131. package/examples/node_modules/undici-types/header.d.ts +0 -4
  132. package/examples/node_modules/undici-types/index.d.ts +0 -71
  133. package/examples/node_modules/undici-types/interceptors.d.ts +0 -17
  134. package/examples/node_modules/undici-types/mock-agent.d.ts +0 -50
  135. package/examples/node_modules/undici-types/mock-client.d.ts +0 -25
  136. package/examples/node_modules/undici-types/mock-errors.d.ts +0 -12
  137. package/examples/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  138. package/examples/node_modules/undici-types/mock-pool.d.ts +0 -25
  139. package/examples/node_modules/undici-types/patch.d.ts +0 -33
  140. package/examples/node_modules/undici-types/pool-stats.d.ts +0 -19
  141. package/examples/node_modules/undici-types/pool.d.ts +0 -39
  142. package/examples/node_modules/undici-types/proxy-agent.d.ts +0 -28
  143. package/examples/node_modules/undici-types/readable.d.ts +0 -65
  144. package/examples/node_modules/undici-types/retry-agent.d.ts +0 -8
  145. package/examples/node_modules/undici-types/retry-handler.d.ts +0 -116
  146. package/examples/node_modules/undici-types/util.d.ts +0 -18
  147. package/examples/node_modules/undici-types/webidl.d.ts +0 -228
  148. package/examples/node_modules/undici-types/websocket.d.ts +0 -150
@@ -1,720 +0,0 @@
1
- export type Platform = 'browser' | 'node' | 'neutral'
2
- export type Format = 'iife' | 'cjs' | 'esm'
3
- export type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'local-css' | 'text' | 'ts' | 'tsx'
4
- export type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent'
5
- export type LogStyle = 'default' | 'visualstudio'
6
- export type Charset = 'ascii' | 'utf8'
7
- export type Drop = 'console' | 'debugger'
8
- export type AbsPaths = 'code' | 'log' | 'metafile'
9
-
10
- interface CommonOptions {
11
- /** Documentation: https://esbuild.github.io/api/#sourcemap */
12
- sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both'
13
- /** Documentation: https://esbuild.github.io/api/#legal-comments */
14
- legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external'
15
- /** Documentation: https://esbuild.github.io/api/#source-root */
16
- sourceRoot?: string
17
- /** Documentation: https://esbuild.github.io/api/#sources-content */
18
- sourcesContent?: boolean
19
-
20
- /** Documentation: https://esbuild.github.io/api/#format */
21
- format?: Format
22
- /** Documentation: https://esbuild.github.io/api/#global-name */
23
- globalName?: string
24
- /** Documentation: https://esbuild.github.io/api/#target */
25
- target?: string | string[]
26
- /** Documentation: https://esbuild.github.io/api/#supported */
27
- supported?: Record<string, boolean>
28
- /** Documentation: https://esbuild.github.io/api/#platform */
29
- platform?: Platform
30
-
31
- /** Documentation: https://esbuild.github.io/api/#mangle-props */
32
- mangleProps?: RegExp
33
- /** Documentation: https://esbuild.github.io/api/#mangle-props */
34
- reserveProps?: RegExp
35
- /** Documentation: https://esbuild.github.io/api/#mangle-props */
36
- mangleQuoted?: boolean
37
- /** Documentation: https://esbuild.github.io/api/#mangle-props */
38
- mangleCache?: Record<string, string | false>
39
- /** Documentation: https://esbuild.github.io/api/#drop */
40
- drop?: Drop[]
41
- /** Documentation: https://esbuild.github.io/api/#drop-labels */
42
- dropLabels?: string[]
43
- /** Documentation: https://esbuild.github.io/api/#minify */
44
- minify?: boolean
45
- /** Documentation: https://esbuild.github.io/api/#minify */
46
- minifyWhitespace?: boolean
47
- /** Documentation: https://esbuild.github.io/api/#minify */
48
- minifyIdentifiers?: boolean
49
- /** Documentation: https://esbuild.github.io/api/#minify */
50
- minifySyntax?: boolean
51
- /** Documentation: https://esbuild.github.io/api/#line-limit */
52
- lineLimit?: number
53
- /** Documentation: https://esbuild.github.io/api/#charset */
54
- charset?: Charset
55
- /** Documentation: https://esbuild.github.io/api/#tree-shaking */
56
- treeShaking?: boolean
57
- /** Documentation: https://esbuild.github.io/api/#ignore-annotations */
58
- ignoreAnnotations?: boolean
59
-
60
- /** Documentation: https://esbuild.github.io/api/#jsx */
61
- jsx?: 'transform' | 'preserve' | 'automatic'
62
- /** Documentation: https://esbuild.github.io/api/#jsx-factory */
63
- jsxFactory?: string
64
- /** Documentation: https://esbuild.github.io/api/#jsx-fragment */
65
- jsxFragment?: string
66
- /** Documentation: https://esbuild.github.io/api/#jsx-import-source */
67
- jsxImportSource?: string
68
- /** Documentation: https://esbuild.github.io/api/#jsx-development */
69
- jsxDev?: boolean
70
- /** Documentation: https://esbuild.github.io/api/#jsx-side-effects */
71
- jsxSideEffects?: boolean
72
-
73
- /** Documentation: https://esbuild.github.io/api/#define */
74
- define?: { [key: string]: string }
75
- /** Documentation: https://esbuild.github.io/api/#pure */
76
- pure?: string[]
77
- /** Documentation: https://esbuild.github.io/api/#keep-names */
78
- keepNames?: boolean
79
-
80
- /** Documentation: https://esbuild.github.io/api/#abs-paths */
81
- absPaths?: AbsPaths[]
82
- /** Documentation: https://esbuild.github.io/api/#color */
83
- color?: boolean
84
- /** Documentation: https://esbuild.github.io/api/#log-level */
85
- logLevel?: LogLevel
86
- /** Documentation: https://esbuild.github.io/api/#log-limit */
87
- logLimit?: number
88
- /** Documentation: https://esbuild.github.io/api/#log-override */
89
- logOverride?: Record<string, LogLevel>
90
- /** Documentation: https://esbuild.github.io/api/#log-style */
91
- logStyle?: LogStyle
92
-
93
- /** Documentation: https://esbuild.github.io/api/#tsconfig-raw */
94
- tsconfigRaw?: string | TsconfigRaw
95
- }
96
-
97
- export interface TsconfigRaw {
98
- compilerOptions?: {
99
- alwaysStrict?: boolean
100
- baseUrl?: string
101
- experimentalDecorators?: boolean
102
- importsNotUsedAsValues?: 'remove' | 'preserve' | 'error'
103
- jsx?: 'preserve' | 'react-native' | 'react' | 'react-jsx' | 'react-jsxdev'
104
- jsxFactory?: string
105
- jsxFragmentFactory?: string
106
- jsxImportSource?: string
107
- paths?: Record<string, string[]>
108
- preserveValueImports?: boolean
109
- strict?: boolean
110
- target?: string
111
- useDefineForClassFields?: boolean
112
- verbatimModuleSyntax?: boolean
113
- }
114
- }
115
-
116
- export interface BuildOptions extends CommonOptions {
117
- /** Documentation: https://esbuild.github.io/api/#bundle */
118
- bundle?: boolean
119
- /** Documentation: https://esbuild.github.io/api/#splitting */
120
- splitting?: boolean
121
- /** Documentation: https://esbuild.github.io/api/#preserve-symlinks */
122
- preserveSymlinks?: boolean
123
- /** Documentation: https://esbuild.github.io/api/#outfile */
124
- outfile?: string
125
- /** Documentation: https://esbuild.github.io/api/#metafile */
126
- metafile?: boolean
127
- /** Documentation: https://esbuild.github.io/api/#outdir */
128
- outdir?: string
129
- /** Documentation: https://esbuild.github.io/api/#outbase */
130
- outbase?: string
131
- /** Documentation: https://esbuild.github.io/api/#external */
132
- external?: string[]
133
- /** Documentation: https://esbuild.github.io/api/#packages */
134
- packages?: 'bundle' | 'external'
135
- /** Documentation: https://esbuild.github.io/api/#alias */
136
- alias?: Record<string, string>
137
- /** Documentation: https://esbuild.github.io/api/#loader */
138
- loader?: { [ext: string]: Loader }
139
- /** Documentation: https://esbuild.github.io/api/#resolve-extensions */
140
- resolveExtensions?: string[]
141
- /** Documentation: https://esbuild.github.io/api/#main-fields */
142
- mainFields?: string[]
143
- /** Documentation: https://esbuild.github.io/api/#conditions */
144
- conditions?: string[]
145
- /** Documentation: https://esbuild.github.io/api/#write */
146
- write?: boolean
147
- /** Documentation: https://esbuild.github.io/api/#allow-overwrite */
148
- allowOverwrite?: boolean
149
- /** Documentation: https://esbuild.github.io/api/#tsconfig */
150
- tsconfig?: string
151
- /** Documentation: https://esbuild.github.io/api/#out-extension */
152
- outExtension?: { [ext: string]: string }
153
- /** Documentation: https://esbuild.github.io/api/#public-path */
154
- publicPath?: string
155
- /** Documentation: https://esbuild.github.io/api/#entry-names */
156
- entryNames?: string
157
- /** Documentation: https://esbuild.github.io/api/#chunk-names */
158
- chunkNames?: string
159
- /** Documentation: https://esbuild.github.io/api/#asset-names */
160
- assetNames?: string
161
- /** Documentation: https://esbuild.github.io/api/#inject */
162
- inject?: string[]
163
- /** Documentation: https://esbuild.github.io/api/#banner */
164
- banner?: { [type: string]: string }
165
- /** Documentation: https://esbuild.github.io/api/#footer */
166
- footer?: { [type: string]: string }
167
- /** Documentation: https://esbuild.github.io/api/#entry-points */
168
- entryPoints?: (string | { in: string, out: string })[] | Record<string, string>
169
- /** Documentation: https://esbuild.github.io/api/#stdin */
170
- stdin?: StdinOptions
171
- /** Documentation: https://esbuild.github.io/plugins/ */
172
- plugins?: Plugin[]
173
- /** Documentation: https://esbuild.github.io/api/#working-directory */
174
- absWorkingDir?: string
175
- /** Documentation: https://esbuild.github.io/api/#node-paths */
176
- nodePaths?: string[]; // The "NODE_PATH" variable from Node.js
177
- }
178
-
179
- export interface StdinOptions {
180
- contents: string | Uint8Array
181
- resolveDir?: string
182
- sourcefile?: string
183
- loader?: Loader
184
- }
185
-
186
- export interface Message {
187
- id: string
188
- pluginName: string
189
- text: string
190
- location: Location | null
191
- notes: Note[]
192
-
193
- /**
194
- * Optional user-specified data that is passed through unmodified. You can
195
- * use this to stash the original error, for example.
196
- */
197
- detail: any
198
- }
199
-
200
- export interface Note {
201
- text: string
202
- location: Location | null
203
- }
204
-
205
- export interface Location {
206
- file: string
207
- namespace: string
208
- /** 1-based */
209
- line: number
210
- /** 0-based, in bytes */
211
- column: number
212
- /** in bytes */
213
- length: number
214
- lineText: string
215
- suggestion: string
216
- }
217
-
218
- export interface OutputFile {
219
- path: string
220
- contents: Uint8Array
221
- hash: string
222
- /** "contents" as text (changes automatically with "contents") */
223
- readonly text: string
224
- }
225
-
226
- export interface BuildResult<ProvidedOptions extends BuildOptions = BuildOptions> {
227
- errors: Message[]
228
- warnings: Message[]
229
- /** Only when "write: false" */
230
- outputFiles: OutputFile[] | (ProvidedOptions['write'] extends false ? never : undefined)
231
- /** Only when "metafile: true" */
232
- metafile: Metafile | (ProvidedOptions['metafile'] extends true ? never : undefined)
233
- /** Only when "mangleCache" is present */
234
- mangleCache: Record<string, string | false> | (ProvidedOptions['mangleCache'] extends Object ? never : undefined)
235
- }
236
-
237
- export interface BuildFailure extends Error {
238
- errors: Message[]
239
- warnings: Message[]
240
- }
241
-
242
- /** Documentation: https://esbuild.github.io/api/#serve-arguments */
243
- export interface ServeOptions {
244
- port?: number
245
- host?: string
246
- servedir?: string
247
- keyfile?: string
248
- certfile?: string
249
- fallback?: string
250
- cors?: CORSOptions
251
- onRequest?: (args: ServeOnRequestArgs) => void
252
- }
253
-
254
- /** Documentation: https://esbuild.github.io/api/#cors */
255
- export interface CORSOptions {
256
- origin?: string | string[]
257
- }
258
-
259
- export interface ServeOnRequestArgs {
260
- remoteAddress: string
261
- method: string
262
- path: string
263
- status: number
264
- /** The time to generate the response, not to send it */
265
- timeInMS: number
266
- }
267
-
268
- /** Documentation: https://esbuild.github.io/api/#serve-return-values */
269
- export interface ServeResult {
270
- port: number
271
- hosts: string[]
272
- }
273
-
274
- export interface TransformOptions extends CommonOptions {
275
- /** Documentation: https://esbuild.github.io/api/#sourcefile */
276
- sourcefile?: string
277
- /** Documentation: https://esbuild.github.io/api/#loader */
278
- loader?: Loader
279
- /** Documentation: https://esbuild.github.io/api/#banner */
280
- banner?: string
281
- /** Documentation: https://esbuild.github.io/api/#footer */
282
- footer?: string
283
- }
284
-
285
- export interface TransformResult<ProvidedOptions extends TransformOptions = TransformOptions> {
286
- code: string
287
- map: string
288
- warnings: Message[]
289
- /** Only when "mangleCache" is present */
290
- mangleCache: Record<string, string | false> | (ProvidedOptions['mangleCache'] extends Object ? never : undefined)
291
- /** Only when "legalComments" is "external" */
292
- legalComments: string | (ProvidedOptions['legalComments'] extends 'external' ? never : undefined)
293
- }
294
-
295
- export interface TransformFailure extends Error {
296
- errors: Message[]
297
- warnings: Message[]
298
- }
299
-
300
- export interface Plugin {
301
- name: string
302
- setup: (build: PluginBuild) => (void | Promise<void>)
303
- }
304
-
305
- export interface PluginBuild {
306
- /** Documentation: https://esbuild.github.io/plugins/#build-options */
307
- initialOptions: BuildOptions
308
-
309
- /** Documentation: https://esbuild.github.io/plugins/#resolve */
310
- resolve(path: string, options?: ResolveOptions): Promise<ResolveResult>
311
-
312
- /** Documentation: https://esbuild.github.io/plugins/#on-start */
313
- onStart(callback: () =>
314
- (OnStartResult | null | void | Promise<OnStartResult | null | void>)): void
315
-
316
- /** Documentation: https://esbuild.github.io/plugins/#on-end */
317
- onEnd(callback: (result: BuildResult) =>
318
- (OnEndResult | null | void | Promise<OnEndResult | null | void>)): void
319
-
320
- /** Documentation: https://esbuild.github.io/plugins/#on-resolve */
321
- onResolve(options: OnResolveOptions, callback: (args: OnResolveArgs) =>
322
- (OnResolveResult | null | undefined | Promise<OnResolveResult | null | undefined>)): void
323
-
324
- /** Documentation: https://esbuild.github.io/plugins/#on-load */
325
- onLoad(options: OnLoadOptions, callback: (args: OnLoadArgs) =>
326
- (OnLoadResult | null | undefined | Promise<OnLoadResult | null | undefined>)): void
327
-
328
- /** Documentation: https://esbuild.github.io/plugins/#on-dispose */
329
- onDispose(callback: () => void): void
330
-
331
- // This is a full copy of the esbuild library in case you need it
332
- esbuild: {
333
- context: typeof context,
334
- build: typeof build,
335
- buildSync: typeof buildSync,
336
- transform: typeof transform,
337
- transformSync: typeof transformSync,
338
- formatMessages: typeof formatMessages,
339
- formatMessagesSync: typeof formatMessagesSync,
340
- analyzeMetafile: typeof analyzeMetafile,
341
- analyzeMetafileSync: typeof analyzeMetafileSync,
342
- initialize: typeof initialize,
343
- version: typeof version,
344
- }
345
- }
346
-
347
- /** Documentation: https://esbuild.github.io/plugins/#resolve-options */
348
- export interface ResolveOptions {
349
- pluginName?: string
350
- importer?: string
351
- namespace?: string
352
- resolveDir?: string
353
- kind?: ImportKind
354
- pluginData?: any
355
- with?: Record<string, string>
356
- }
357
-
358
- /** Documentation: https://esbuild.github.io/plugins/#resolve-results */
359
- export interface ResolveResult {
360
- errors: Message[]
361
- warnings: Message[]
362
-
363
- path: string
364
- external: boolean
365
- sideEffects: boolean
366
- namespace: string
367
- suffix: string
368
- pluginData: any
369
- }
370
-
371
- export interface OnStartResult {
372
- errors?: PartialMessage[]
373
- warnings?: PartialMessage[]
374
- }
375
-
376
- export interface OnEndResult {
377
- errors?: PartialMessage[]
378
- warnings?: PartialMessage[]
379
- }
380
-
381
- /** Documentation: https://esbuild.github.io/plugins/#on-resolve-options */
382
- export interface OnResolveOptions {
383
- filter: RegExp
384
- namespace?: string
385
- }
386
-
387
- /** Documentation: https://esbuild.github.io/plugins/#on-resolve-arguments */
388
- export interface OnResolveArgs {
389
- path: string
390
- importer: string
391
- namespace: string
392
- resolveDir: string
393
- kind: ImportKind
394
- pluginData: any
395
- with: Record<string, string>
396
- }
397
-
398
- export type ImportKind =
399
- | 'entry-point'
400
-
401
- // JS
402
- | 'import-statement'
403
- | 'require-call'
404
- | 'dynamic-import'
405
- | 'require-resolve'
406
-
407
- // CSS
408
- | 'import-rule'
409
- | 'composes-from'
410
- | 'url-token'
411
-
412
- /** Documentation: https://esbuild.github.io/plugins/#on-resolve-results */
413
- export interface OnResolveResult {
414
- pluginName?: string
415
-
416
- errors?: PartialMessage[]
417
- warnings?: PartialMessage[]
418
-
419
- path?: string
420
- external?: boolean
421
- sideEffects?: boolean
422
- namespace?: string
423
- suffix?: string
424
- pluginData?: any
425
-
426
- watchFiles?: string[]
427
- watchDirs?: string[]
428
- }
429
-
430
- /** Documentation: https://esbuild.github.io/plugins/#on-load-options */
431
- export interface OnLoadOptions {
432
- filter: RegExp
433
- namespace?: string
434
- }
435
-
436
- /** Documentation: https://esbuild.github.io/plugins/#on-load-arguments */
437
- export interface OnLoadArgs {
438
- path: string
439
- namespace: string
440
- suffix: string
441
- pluginData: any
442
- with: Record<string, string>
443
- }
444
-
445
- /** Documentation: https://esbuild.github.io/plugins/#on-load-results */
446
- export interface OnLoadResult {
447
- pluginName?: string
448
-
449
- errors?: PartialMessage[]
450
- warnings?: PartialMessage[]
451
-
452
- contents?: string | Uint8Array
453
- resolveDir?: string
454
- loader?: Loader
455
- pluginData?: any
456
-
457
- watchFiles?: string[]
458
- watchDirs?: string[]
459
- }
460
-
461
- export interface PartialMessage {
462
- id?: string
463
- pluginName?: string
464
- text?: string
465
- location?: Partial<Location> | null
466
- notes?: PartialNote[]
467
- detail?: any
468
- }
469
-
470
- export interface PartialNote {
471
- text?: string
472
- location?: Partial<Location> | null
473
- }
474
-
475
- /** Documentation: https://esbuild.github.io/api/#metafile */
476
- export interface Metafile {
477
- inputs: {
478
- [path: string]: {
479
- bytes: number
480
- imports: {
481
- path: string
482
- kind: ImportKind
483
- external?: boolean
484
- original?: string
485
- with?: Record<string, string>
486
- }[]
487
- format?: 'cjs' | 'esm'
488
- with?: Record<string, string>
489
- }
490
- }
491
- outputs: {
492
- [path: string]: {
493
- bytes: number
494
- inputs: {
495
- [path: string]: {
496
- bytesInOutput: number
497
- }
498
- }
499
- imports: {
500
- path: string
501
- kind: ImportKind | 'file-loader'
502
- external?: boolean
503
- }[]
504
- exports: string[]
505
- entryPoint?: string
506
- cssBundle?: string
507
- }
508
- }
509
- }
510
-
511
- export interface FormatMessagesOptions {
512
- kind: 'error' | 'warning'
513
- color?: boolean
514
- terminalWidth?: number
515
- logStyle?: LogStyle
516
- }
517
-
518
- export interface AnalyzeMetafileOptions {
519
- color?: boolean
520
- verbose?: boolean
521
- }
522
-
523
- /** Documentation: https://esbuild.github.io/api/#watch-arguments */
524
- export interface WatchOptions {
525
- delay?: number // In milliseconds
526
- }
527
-
528
- export interface BuildContext<ProvidedOptions extends BuildOptions = BuildOptions> {
529
- /** Documentation: https://esbuild.github.io/api/#rebuild */
530
- rebuild(): Promise<BuildResult<ProvidedOptions>>
531
-
532
- /** Documentation: https://esbuild.github.io/api/#watch */
533
- watch(options?: WatchOptions): Promise<void>
534
-
535
- /** Documentation: https://esbuild.github.io/api/#serve */
536
- serve(options?: ServeOptions): Promise<ServeResult>
537
-
538
- cancel(): Promise<void>
539
- dispose(): Promise<void>
540
- }
541
-
542
- // This is a TypeScript type-level function which replaces any keys in "In"
543
- // that aren't in "Out" with "never". We use this to reject properties with
544
- // typos in object literals. See: https://stackoverflow.com/questions/49580725
545
- type SameShape<Out, In extends Out> = In & { [Key in Exclude<keyof In, keyof Out>]: never }
546
-
547
- /**
548
- * This function invokes the "esbuild" command-line tool for you. It returns a
549
- * promise that either resolves with a "BuildResult" object or rejects with a
550
- * "BuildFailure" object.
551
- *
552
- * - Works in node: yes
553
- * - Works in browser: yes
554
- *
555
- * Documentation: https://esbuild.github.io/api/#build
556
- */
557
- export declare function build<T extends BuildOptions>(options: SameShape<BuildOptions, T>): Promise<BuildResult<T>>
558
-
559
- /**
560
- * This is the advanced long-running form of "build" that supports additional
561
- * features such as watch mode and a local development server.
562
- *
563
- * - Works in node: yes
564
- * - Works in browser: no
565
- *
566
- * Documentation: https://esbuild.github.io/api/#build
567
- */
568
- export declare function context<T extends BuildOptions>(options: SameShape<BuildOptions, T>): Promise<BuildContext<T>>
569
-
570
- /**
571
- * This function transforms a single JavaScript file. It can be used to minify
572
- * JavaScript, convert TypeScript/JSX to JavaScript, or convert newer JavaScript
573
- * to older JavaScript. It returns a promise that is either resolved with a
574
- * "TransformResult" object or rejected with a "TransformFailure" object.
575
- *
576
- * - Works in node: yes
577
- * - Works in browser: yes
578
- *
579
- * Documentation: https://esbuild.github.io/api/#transform
580
- */
581
- export declare function transform<T extends TransformOptions>(input: string | Uint8Array, options?: SameShape<TransformOptions, T>): Promise<TransformResult<T>>
582
-
583
- /**
584
- * Converts log messages to formatted message strings suitable for printing in
585
- * the terminal. This allows you to reuse the built-in behavior of esbuild's
586
- * log message formatter. This is a batch-oriented API for efficiency.
587
- *
588
- * - Works in node: yes
589
- * - Works in browser: yes
590
- */
591
- export declare function formatMessages(messages: PartialMessage[], options: FormatMessagesOptions): Promise<string[]>
592
-
593
- /**
594
- * Pretty-prints an analysis of the metafile JSON to a string. This is just for
595
- * convenience to be able to match esbuild's pretty-printing exactly. If you want
596
- * to customize it, you can just inspect the data in the metafile yourself.
597
- *
598
- * - Works in node: yes
599
- * - Works in browser: yes
600
- *
601
- * Documentation: https://esbuild.github.io/api/#analyze
602
- */
603
- export declare function analyzeMetafile(metafile: Metafile | string, options?: AnalyzeMetafileOptions): Promise<string>
604
-
605
- /**
606
- * A synchronous version of "build".
607
- *
608
- * - Works in node: yes
609
- * - Works in browser: no
610
- *
611
- * Documentation: https://esbuild.github.io/api/#build
612
- */
613
- export declare function buildSync<T extends BuildOptions>(options: SameShape<BuildOptions, T>): BuildResult<T>
614
-
615
- /**
616
- * A synchronous version of "transform".
617
- *
618
- * - Works in node: yes
619
- * - Works in browser: no
620
- *
621
- * Documentation: https://esbuild.github.io/api/#transform
622
- */
623
- export declare function transformSync<T extends TransformOptions>(input: string | Uint8Array, options?: SameShape<TransformOptions, T>): TransformResult<T>
624
-
625
- /**
626
- * A synchronous version of "formatMessages".
627
- *
628
- * - Works in node: yes
629
- * - Works in browser: no
630
- */
631
- export declare function formatMessagesSync(messages: PartialMessage[], options: FormatMessagesOptions): string[]
632
-
633
- /**
634
- * A synchronous version of "analyzeMetafile".
635
- *
636
- * - Works in node: yes
637
- * - Works in browser: no
638
- *
639
- * Documentation: https://esbuild.github.io/api/#analyze
640
- */
641
- export declare function analyzeMetafileSync(metafile: Metafile | string, options?: AnalyzeMetafileOptions): string
642
-
643
- /**
644
- * This configures the browser-based version of esbuild. It is necessary to
645
- * call this first and wait for the returned promise to be resolved before
646
- * making other API calls when using esbuild in the browser.
647
- *
648
- * - Works in node: yes
649
- * - Works in browser: yes ("options" is required)
650
- *
651
- * Documentation: https://esbuild.github.io/api/#browser
652
- */
653
- export declare function initialize(options: InitializeOptions): Promise<void>
654
-
655
- export interface InitializeOptions {
656
- /**
657
- * The URL of the "esbuild.wasm" file. This must be provided when running
658
- * esbuild in the browser.
659
- */
660
- wasmURL?: string | URL
661
-
662
- /**
663
- * The result of calling "new WebAssembly.Module(buffer)" where "buffer"
664
- * is a typed array or ArrayBuffer containing the binary code of the
665
- * "esbuild.wasm" file.
666
- *
667
- * You can use this as an alternative to "wasmURL" for environments where it's
668
- * not possible to download the WebAssembly module.
669
- */
670
- wasmModule?: WebAssembly.Module
671
-
672
- /**
673
- * By default esbuild runs the WebAssembly-based browser API in a web worker
674
- * to avoid blocking the UI thread. This can be disabled by setting "worker"
675
- * to false.
676
- */
677
- worker?: boolean
678
- }
679
-
680
- export let version: string
681
-
682
- // Call this function to terminate esbuild's child process. The child process
683
- // is not terminated and re-created after each API call because it's more
684
- // efficient to keep it around when there are multiple API calls.
685
- //
686
- // In node this happens automatically before the parent node process exits. So
687
- // you only need to call this if you know you will not make any more esbuild
688
- // API calls and you want to clean up resources.
689
- //
690
- // Unlike node, Deno lacks the necessary APIs to clean up child processes
691
- // automatically. You must manually call stop() in Deno when you're done
692
- // using esbuild or Deno will continue running forever.
693
- //
694
- // Another reason you might want to call this is if you are using esbuild from
695
- // within a Deno test. Deno fails tests that create a child process without
696
- // killing it before the test ends, so you have to call this function (and
697
- // await the returned promise) in every Deno test that uses esbuild.
698
- export declare function stop(): Promise<void>
699
-
700
- // Note: These declarations exist to avoid type errors when you omit "dom" from
701
- // "lib" in your "tsconfig.json" file. TypeScript confusingly declares the
702
- // global "WebAssembly" type in "lib.dom.d.ts" even though it has nothing to do
703
- // with the browser DOM and is present in many non-browser JavaScript runtimes
704
- // (e.g. node and deno). Declaring it here allows esbuild's API to be used in
705
- // these scenarios.
706
- //
707
- // There's an open issue about getting this problem corrected (although these
708
- // declarations will need to remain even if this is fixed for backward
709
- // compatibility with older TypeScript versions):
710
- //
711
- // https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/826
712
- //
713
- declare global {
714
- namespace WebAssembly {
715
- interface Module {
716
- }
717
- }
718
- interface URL {
719
- }
720
- }