plotlink-ows 0.1.13

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 (142) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +151 -0
  3. package/app/db.ts +8 -0
  4. package/app/lib/llm-client.ts +265 -0
  5. package/app/lib/paths.ts +11 -0
  6. package/app/lib/publish.ts +204 -0
  7. package/app/lib/writer-prompt.ts +44 -0
  8. package/app/node_modules/.prisma/local-client/client.d.ts +1 -0
  9. package/app/node_modules/.prisma/local-client/client.js +5 -0
  10. package/app/node_modules/.prisma/local-client/default.d.ts +1 -0
  11. package/app/node_modules/.prisma/local-client/default.js +5 -0
  12. package/app/node_modules/.prisma/local-client/edge.d.ts +1 -0
  13. package/app/node_modules/.prisma/local-client/edge.js +184 -0
  14. package/app/node_modules/.prisma/local-client/index-browser.js +173 -0
  15. package/app/node_modules/.prisma/local-client/index.d.ts +3304 -0
  16. package/app/node_modules/.prisma/local-client/index.js +207 -0
  17. package/app/node_modules/.prisma/local-client/libquery_engine-darwin-arm64.dylib.node +0 -0
  18. package/app/node_modules/.prisma/local-client/package.json +183 -0
  19. package/app/node_modules/.prisma/local-client/query_engine_bg.js +2 -0
  20. package/app/node_modules/.prisma/local-client/query_engine_bg.wasm +0 -0
  21. package/app/node_modules/.prisma/local-client/runtime/edge-esm.js +35 -0
  22. package/app/node_modules/.prisma/local-client/runtime/edge.js +35 -0
  23. package/app/node_modules/.prisma/local-client/runtime/index-browser.d.ts +370 -0
  24. package/app/node_modules/.prisma/local-client/runtime/index-browser.js +17 -0
  25. package/app/node_modules/.prisma/local-client/runtime/library.d.ts +3982 -0
  26. package/app/node_modules/.prisma/local-client/runtime/library.js +147 -0
  27. package/app/node_modules/.prisma/local-client/runtime/react-native.js +84 -0
  28. package/app/node_modules/.prisma/local-client/runtime/wasm-compiler-edge.js +85 -0
  29. package/app/node_modules/.prisma/local-client/runtime/wasm-engine-edge.js +38 -0
  30. package/app/node_modules/.prisma/local-client/schema.prisma +21 -0
  31. package/app/node_modules/.prisma/local-client/wasm-edge-light-loader.mjs +5 -0
  32. package/app/node_modules/.prisma/local-client/wasm-worker-loader.mjs +5 -0
  33. package/app/node_modules/.prisma/local-client/wasm.d.ts +1 -0
  34. package/app/node_modules/.prisma/local-client/wasm.js +191 -0
  35. package/app/prisma/schema.prisma +57 -0
  36. package/app/routes/auth.ts +173 -0
  37. package/app/routes/chat.ts +135 -0
  38. package/app/routes/config.ts +210 -0
  39. package/app/routes/dashboard.ts +186 -0
  40. package/app/routes/oauth.ts +150 -0
  41. package/app/routes/publish.ts +112 -0
  42. package/app/routes/wallet.ts +99 -0
  43. package/app/server.ts +154 -0
  44. package/app/vite.config.ts +19 -0
  45. package/app/web/App.tsx +102 -0
  46. package/app/web/components/Chat.tsx +272 -0
  47. package/app/web/components/Dashboard.tsx +222 -0
  48. package/app/web/components/LLMSetup.tsx +291 -0
  49. package/app/web/components/Layout.tsx +235 -0
  50. package/app/web/components/Login.tsx +62 -0
  51. package/app/web/components/Publish.tsx +245 -0
  52. package/app/web/components/Settings.tsx +175 -0
  53. package/app/web/components/Setup.tsx +84 -0
  54. package/app/web/components/WalletCard.tsx +117 -0
  55. package/app/web/dist/assets/index-C9kXlYO_.css +2 -0
  56. package/app/web/dist/assets/index-CJiiaLHs.js +9 -0
  57. package/app/web/dist/index.html +16 -0
  58. package/app/web/index.html +15 -0
  59. package/app/web/main.tsx +10 -0
  60. package/app/web/plotlink-logo.svg +5 -0
  61. package/app/web/styles.css +51 -0
  62. package/bin/plotlink-ows.js +394 -0
  63. package/lib/ows/index.ts +3 -0
  64. package/lib/ows/policy.ts +68 -0
  65. package/lib/ows/types.ts +14 -0
  66. package/lib/ows/wallet.ts +70 -0
  67. package/package.json +79 -0
  68. package/packages/cli/node_modules/commander/LICENSE +22 -0
  69. package/packages/cli/node_modules/commander/Readme.md +1149 -0
  70. package/packages/cli/node_modules/commander/esm.mjs +16 -0
  71. package/packages/cli/node_modules/commander/index.js +24 -0
  72. package/packages/cli/node_modules/commander/lib/argument.js +149 -0
  73. package/packages/cli/node_modules/commander/lib/command.js +2662 -0
  74. package/packages/cli/node_modules/commander/lib/error.js +39 -0
  75. package/packages/cli/node_modules/commander/lib/help.js +709 -0
  76. package/packages/cli/node_modules/commander/lib/option.js +367 -0
  77. package/packages/cli/node_modules/commander/lib/suggestSimilar.js +101 -0
  78. package/packages/cli/node_modules/commander/package-support.json +16 -0
  79. package/packages/cli/node_modules/commander/package.json +82 -0
  80. package/packages/cli/node_modules/commander/typings/esm.d.mts +3 -0
  81. package/packages/cli/node_modules/commander/typings/index.d.ts +1045 -0
  82. package/packages/cli/node_modules/resolve-from/index.d.ts +31 -0
  83. package/packages/cli/node_modules/resolve-from/index.js +47 -0
  84. package/packages/cli/node_modules/resolve-from/license +9 -0
  85. package/packages/cli/node_modules/resolve-from/package.json +36 -0
  86. package/packages/cli/node_modules/resolve-from/readme.md +72 -0
  87. package/packages/cli/node_modules/tsup/LICENSE +21 -0
  88. package/packages/cli/node_modules/tsup/README.md +75 -0
  89. package/packages/cli/node_modules/tsup/assets/cjs_shims.js +13 -0
  90. package/packages/cli/node_modules/tsup/assets/esm_shims.js +9 -0
  91. package/packages/cli/node_modules/tsup/assets/package.json +3 -0
  92. package/packages/cli/node_modules/tsup/dist/chunk-DI5BO6XE.js +153 -0
  93. package/packages/cli/node_modules/tsup/dist/chunk-JZ25TPTY.js +42 -0
  94. package/packages/cli/node_modules/tsup/dist/chunk-PEEXUWMS.js +6 -0
  95. package/packages/cli/node_modules/tsup/dist/chunk-TWFEYLU4.js +352 -0
  96. package/packages/cli/node_modules/tsup/dist/chunk-VGC3FXLU.js +203 -0
  97. package/packages/cli/node_modules/tsup/dist/cli-default.js +12 -0
  98. package/packages/cli/node_modules/tsup/dist/cli-main.js +8 -0
  99. package/packages/cli/node_modules/tsup/dist/cli-node.js +14 -0
  100. package/packages/cli/node_modules/tsup/dist/index.d.ts +511 -0
  101. package/packages/cli/node_modules/tsup/dist/index.js +1711 -0
  102. package/packages/cli/node_modules/tsup/dist/rollup.js +6949 -0
  103. package/packages/cli/node_modules/tsup/package.json +99 -0
  104. package/packages/cli/node_modules/tsup/schema.json +362 -0
  105. package/packages/cli/package.json +35 -0
  106. package/packages/cli/src/commands/agent-register.ts +77 -0
  107. package/packages/cli/src/commands/chain.ts +29 -0
  108. package/packages/cli/src/commands/claim.ts +70 -0
  109. package/packages/cli/src/commands/create.ts +34 -0
  110. package/packages/cli/src/commands/status.ts +201 -0
  111. package/packages/cli/src/config.ts +103 -0
  112. package/packages/cli/src/index.ts +21 -0
  113. package/packages/cli/src/sdk/abi.ts +222 -0
  114. package/packages/cli/src/sdk/client.ts +713 -0
  115. package/packages/cli/src/sdk/constants.ts +56 -0
  116. package/packages/cli/src/sdk/index.ts +46 -0
  117. package/packages/cli/src/sdk/ipfs.ts +88 -0
  118. package/packages/cli/src/sdk.ts +36 -0
  119. package/packages/cli/tsconfig.json +20 -0
  120. package/packages/cli/tsup.config.ts +14 -0
  121. package/public/.well-known/farcaster.json +38 -0
  122. package/public/basescan-icon.svg +4 -0
  123. package/public/embed-image.png +0 -0
  124. package/public/favicon.png +0 -0
  125. package/public/hunt-token.svg +11 -0
  126. package/public/icon-192.png +0 -0
  127. package/public/icon.png +0 -0
  128. package/public/manifest.json +26 -0
  129. package/public/mc-icon-light.svg +12 -0
  130. package/public/og-image.png +0 -0
  131. package/public/plotlink-logo-symbol.svg +5 -0
  132. package/public/plotlink-logo.svg +5 -0
  133. package/public/screenshot-1.png +0 -0
  134. package/public/screenshot-2.png +0 -0
  135. package/public/screenshot-3.png +0 -0
  136. package/public/splash.png +0 -0
  137. package/public/wide-banner.png +0 -0
  138. package/scripts/backfill-trade-prices.ts +97 -0
  139. package/scripts/backfill-usd-rates.ts +220 -0
  140. package/scripts/e2e-verify.ts +1100 -0
  141. package/scripts/ows-smoke-test.ts +37 -0
  142. package/scripts/score-users.mjs +203 -0
@@ -0,0 +1,511 @@
1
+ import { BuildOptions, Metafile, Plugin as Plugin$1, Loader } from 'esbuild';
2
+ import { SourceMap, TreeshakingOptions, TreeshakingPreset, InputOption } from 'rollup';
3
+ import { SectionedSourceMapInput } from './types.cts';
4
+ import { RawSourceMap } from 'source-map';
5
+ import { Options as Options$1 } from '@swc/core';
6
+
7
+ /// <reference lib="es2015" />
8
+
9
+
10
+
11
+ type ECMA = 5 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020;
12
+
13
+ type ConsoleProperty = keyof typeof console;
14
+ type DropConsoleOption = boolean | ConsoleProperty[];
15
+
16
+ interface ParseOptions {
17
+ bare_returns?: boolean;
18
+ /** @deprecated legacy option. Currently, all supported EcmaScript is valid to parse. */
19
+ ecma?: ECMA;
20
+ html5_comments?: boolean;
21
+ shebang?: boolean;
22
+ }
23
+
24
+ interface CompressOptions {
25
+ arguments?: boolean;
26
+ arrows?: boolean;
27
+ booleans_as_integers?: boolean;
28
+ booleans?: boolean;
29
+ collapse_vars?: boolean;
30
+ comparisons?: boolean;
31
+ computed_props?: boolean;
32
+ conditionals?: boolean;
33
+ dead_code?: boolean;
34
+ defaults?: boolean;
35
+ directives?: boolean;
36
+ drop_console?: DropConsoleOption;
37
+ drop_debugger?: boolean;
38
+ ecma?: ECMA;
39
+ evaluate?: boolean;
40
+ expression?: boolean;
41
+ global_defs?: object;
42
+ hoist_funs?: boolean;
43
+ hoist_props?: boolean;
44
+ hoist_vars?: boolean;
45
+ ie8?: boolean;
46
+ if_return?: boolean;
47
+ inline?: boolean | InlineFunctions;
48
+ join_vars?: boolean;
49
+ keep_classnames?: boolean | RegExp;
50
+ keep_fargs?: boolean;
51
+ keep_fnames?: boolean | RegExp;
52
+ keep_infinity?: boolean;
53
+ lhs_constants?: boolean;
54
+ loops?: boolean;
55
+ module?: boolean;
56
+ negate_iife?: boolean;
57
+ passes?: number;
58
+ properties?: boolean;
59
+ pure_funcs?: string[];
60
+ pure_new?: boolean;
61
+ pure_getters?: boolean | 'strict';
62
+ reduce_funcs?: boolean;
63
+ reduce_vars?: boolean;
64
+ sequences?: boolean | number;
65
+ side_effects?: boolean;
66
+ switches?: boolean;
67
+ toplevel?: boolean;
68
+ top_retain?: null | string | string[] | RegExp;
69
+ typeofs?: boolean;
70
+ unsafe_arrows?: boolean;
71
+ unsafe?: boolean;
72
+ unsafe_comps?: boolean;
73
+ unsafe_Function?: boolean;
74
+ unsafe_math?: boolean;
75
+ unsafe_symbols?: boolean;
76
+ unsafe_methods?: boolean;
77
+ unsafe_proto?: boolean;
78
+ unsafe_regexp?: boolean;
79
+ unsafe_undefined?: boolean;
80
+ unused?: boolean;
81
+ }
82
+
83
+ declare enum InlineFunctions {
84
+ Disabled = 0,
85
+ SimpleFunctions = 1,
86
+ WithArguments = 2,
87
+ WithArgumentsAndVariables = 3
88
+ }
89
+
90
+ interface MangleOptions {
91
+ eval?: boolean;
92
+ keep_classnames?: boolean | RegExp;
93
+ keep_fnames?: boolean | RegExp;
94
+ module?: boolean;
95
+ nth_identifier?: SimpleIdentifierMangler | WeightedIdentifierMangler;
96
+ properties?: boolean | ManglePropertiesOptions;
97
+ reserved?: string[];
98
+ safari10?: boolean;
99
+ toplevel?: boolean;
100
+ }
101
+
102
+ /**
103
+ * An identifier mangler for which the output is invariant with respect to the source code.
104
+ */
105
+ interface SimpleIdentifierMangler {
106
+ /**
107
+ * Obtains the nth most favored (usually shortest) identifier to rename a variable to.
108
+ * The mangler will increment n and retry until the return value is not in use in scope, and is not a reserved word.
109
+ * This function is expected to be stable; Evaluating get(n) === get(n) should always return true.
110
+ * @param n The ordinal of the identifier.
111
+ */
112
+ get(n: number): string;
113
+ }
114
+
115
+ /**
116
+ * An identifier mangler that leverages character frequency analysis to determine identifier precedence.
117
+ */
118
+ interface WeightedIdentifierMangler extends SimpleIdentifierMangler {
119
+ /**
120
+ * Modifies the internal weighting of the input characters by the specified delta.
121
+ * Will be invoked on the entire printed AST, and then deduct mangleable identifiers.
122
+ * @param chars The characters to modify the weighting of.
123
+ * @param delta The numeric weight to add to the characters.
124
+ */
125
+ consider(chars: string, delta: number): number;
126
+ /**
127
+ * Resets character weights.
128
+ */
129
+ reset(): void;
130
+ /**
131
+ * Sorts identifiers by character frequency, in preparation for calls to get(n).
132
+ */
133
+ sort(): void;
134
+ }
135
+
136
+ interface ManglePropertiesOptions {
137
+ builtins?: boolean;
138
+ debug?: boolean;
139
+ keep_quoted?: boolean | 'strict';
140
+ nth_identifier?: SimpleIdentifierMangler | WeightedIdentifierMangler;
141
+ regex?: RegExp | string;
142
+ reserved?: string[];
143
+ }
144
+
145
+ interface FormatOptions {
146
+ ascii_only?: boolean;
147
+ /** @deprecated Not implemented anymore */
148
+ beautify?: boolean;
149
+ braces?: boolean;
150
+ comments?: boolean | 'all' | 'some' | RegExp | ( (node: any, comment: {
151
+ value: string,
152
+ type: 'comment1' | 'comment2' | 'comment3' | 'comment4',
153
+ pos: number,
154
+ line: number,
155
+ col: number,
156
+ }) => boolean );
157
+ ecma?: ECMA;
158
+ ie8?: boolean;
159
+ keep_numbers?: boolean;
160
+ indent_level?: number;
161
+ indent_start?: number;
162
+ inline_script?: boolean;
163
+ keep_quoted_props?: boolean;
164
+ max_line_len?: number | false;
165
+ preamble?: string;
166
+ preserve_annotations?: boolean;
167
+ quote_keys?: boolean;
168
+ quote_style?: OutputQuoteStyle;
169
+ safari10?: boolean;
170
+ semicolons?: boolean;
171
+ shebang?: boolean;
172
+ shorthand?: boolean;
173
+ source_map?: SourceMapOptions;
174
+ webkit?: boolean;
175
+ width?: number;
176
+ wrap_iife?: boolean;
177
+ wrap_func_args?: boolean;
178
+ }
179
+
180
+ declare enum OutputQuoteStyle {
181
+ PreferDouble = 0,
182
+ AlwaysSingle = 1,
183
+ AlwaysDouble = 2,
184
+ AlwaysOriginal = 3
185
+ }
186
+
187
+ interface MinifyOptions {
188
+ compress?: boolean | CompressOptions;
189
+ ecma?: ECMA;
190
+ enclose?: boolean | string;
191
+ ie8?: boolean;
192
+ keep_classnames?: boolean | RegExp;
193
+ keep_fnames?: boolean | RegExp;
194
+ mangle?: boolean | MangleOptions;
195
+ module?: boolean;
196
+ nameCache?: object;
197
+ format?: FormatOptions;
198
+ /** @deprecated */
199
+ output?: FormatOptions;
200
+ parse?: ParseOptions;
201
+ safari10?: boolean;
202
+ sourceMap?: boolean | SourceMapOptions;
203
+ toplevel?: boolean;
204
+ }
205
+
206
+ interface SourceMapOptions {
207
+ /** Source map object, 'inline' or source map file content */
208
+ content?: SectionedSourceMapInput | string;
209
+ includeSources?: boolean;
210
+ filename?: string;
211
+ root?: string;
212
+ asObject?: boolean;
213
+ url?: string | 'inline';
214
+ }
215
+
216
+ type Prettify<Type> = Type extends Function ? Type : Extract<{
217
+ [Key in keyof Type]: Type[Key];
218
+ }, Type>;
219
+
220
+ type MarkRequired<Type, Keys extends keyof Type> = Type extends Type ? Prettify<Type & Required<Omit<Type, Exclude<keyof Type, Keys>>>> : never;
221
+
222
+ type Logger = ReturnType<typeof createLogger>;
223
+ declare const createLogger: (name?: string) => {
224
+ setName(_name: string): void;
225
+ success(label: string, ...args: any[]): void;
226
+ info(label: string, ...args: any[]): void;
227
+ error(label: string, ...args: any[]): void;
228
+ warn(label: string, ...args: any[]): void;
229
+ log(label: string, type: "info" | "success" | "error" | "warn", ...data: unknown[]): void;
230
+ };
231
+
232
+ type ChunkInfo = {
233
+ type: 'chunk';
234
+ code: string;
235
+ map?: string | RawSourceMap | null;
236
+ path: string;
237
+ /**
238
+ * Sets the file mode
239
+ */
240
+ mode?: number;
241
+ entryPoint?: string;
242
+ exports?: string[];
243
+ imports?: Metafile['outputs'][string]['imports'];
244
+ };
245
+ type RenderChunk = (this: PluginContext, code: string, chunkInfo: ChunkInfo) => MaybePromise<{
246
+ code: string;
247
+ map?: object | string | SourceMap | null;
248
+ } | undefined | null | void>;
249
+ type BuildStart = (this: PluginContext) => MaybePromise<void>;
250
+ type BuildEnd = (this: PluginContext, ctx: {
251
+ writtenFiles: WrittenFile[];
252
+ }) => MaybePromise<void>;
253
+ type ModifyEsbuildOptions = (this: PluginContext, options: BuildOptions) => void;
254
+ type Plugin = {
255
+ name: string;
256
+ esbuildOptions?: ModifyEsbuildOptions;
257
+ buildStart?: BuildStart;
258
+ renderChunk?: RenderChunk;
259
+ buildEnd?: BuildEnd;
260
+ };
261
+ type PluginContext = {
262
+ format: Format;
263
+ splitting?: boolean;
264
+ options: NormalizedOptions;
265
+ logger: Logger;
266
+ };
267
+ type WrittenFile = {
268
+ readonly name: string;
269
+ readonly size: number;
270
+ };
271
+
272
+ type TreeshakingStrategy = boolean | TreeshakingOptions | TreeshakingPreset;
273
+
274
+ type SwcPluginConfig = {
275
+ logger: Logger;
276
+ } & Options$1;
277
+
278
+ type KILL_SIGNAL = 'SIGKILL' | 'SIGTERM';
279
+ type Format = 'cjs' | 'esm' | 'iife';
280
+ type ContextForOutPathGeneration = {
281
+ options: NormalizedOptions;
282
+ format: Format;
283
+ /** "type" field in project's package.json */
284
+ pkgType?: string;
285
+ };
286
+ type OutExtensionObject = {
287
+ js?: string;
288
+ dts?: string;
289
+ };
290
+ type OutExtensionFactory = (ctx: ContextForOutPathGeneration) => OutExtensionObject;
291
+ type DtsConfig = {
292
+ entry?: InputOption;
293
+ /** Resolve external types used in dts files from node_modules */
294
+ resolve?: boolean | (string | RegExp)[];
295
+ /** Emit declaration files only */
296
+ only?: boolean;
297
+ /** Insert at the top of each output .d.ts file */
298
+ banner?: string;
299
+ /** Insert at the bottom */
300
+ footer?: string;
301
+ /**
302
+ * Overrides `compilerOptions`
303
+ * This option takes higher priority than `compilerOptions` in tsconfig.json
304
+ */
305
+ compilerOptions?: any;
306
+ };
307
+ type ExperimentalDtsConfig = {
308
+ entry?: InputOption;
309
+ /**
310
+ * Overrides `compilerOptions`
311
+ * This option takes higher priority than `compilerOptions` in tsconfig.json
312
+ */
313
+ compilerOptions?: any;
314
+ };
315
+ type BannerOrFooter = {
316
+ js?: string;
317
+ css?: string;
318
+ } | ((ctx: {
319
+ format: Format;
320
+ }) => {
321
+ js?: string;
322
+ css?: string;
323
+ } | undefined);
324
+ type BrowserTarget = 'chrome' | 'deno' | 'edge' | 'firefox' | 'hermes' | 'ie' | 'ios' | 'node' | 'opera' | 'rhino' | 'safari';
325
+ type BrowserTargetWithVersion = `${BrowserTarget}${number}` | `${BrowserTarget}${number}.${number}` | `${BrowserTarget}${number}.${number}.${number}`;
326
+ type EsTarget = 'es3' | 'es5' | 'es6' | 'es2015' | 'es2016' | 'es2017' | 'es2018' | 'es2019' | 'es2020' | 'es2021' | 'es2022' | 'es2023' | 'es2024' | 'esnext';
327
+ type Target = BrowserTarget | BrowserTargetWithVersion | EsTarget | (string & {});
328
+ type Entry = string[] | Record<string, string>;
329
+ /**
330
+ * The options available in tsup.config.ts
331
+ * Not all of them are available from CLI flags
332
+ */
333
+ type Options = {
334
+ /** Optional config name to show in CLI output */
335
+ name?: string;
336
+ /**
337
+ * @deprecated Use `entry` instead
338
+ */
339
+ entryPoints?: Entry;
340
+ entry?: Entry;
341
+ /**
342
+ * Output different formats to different folder instead of using different extensions
343
+ */
344
+ legacyOutput?: boolean;
345
+ /**
346
+ * Compile target
347
+ *
348
+ * default to `node16`
349
+ */
350
+ target?: Target | Target[];
351
+ minify?: boolean | 'terser';
352
+ terserOptions?: MinifyOptions;
353
+ minifyWhitespace?: boolean;
354
+ minifyIdentifiers?: boolean;
355
+ minifySyntax?: boolean;
356
+ keepNames?: boolean;
357
+ watch?: boolean | string | (string | boolean)[];
358
+ ignoreWatch?: string[] | string;
359
+ onSuccess?: string | (() => Promise<void | undefined | (() => void | Promise<void>)>);
360
+ jsxFactory?: string;
361
+ jsxFragment?: string;
362
+ outDir?: string;
363
+ outExtension?: OutExtensionFactory;
364
+ format?: Format[] | Format;
365
+ globalName?: string;
366
+ env?: {
367
+ [k: string]: string;
368
+ };
369
+ define?: {
370
+ [k: string]: string;
371
+ };
372
+ dts?: boolean | string | DtsConfig;
373
+ experimentalDts?: boolean | string | ExperimentalDtsConfig;
374
+ sourcemap?: boolean | 'inline';
375
+ /** Always bundle modules matching given patterns */
376
+ noExternal?: (string | RegExp)[];
377
+ /** Don't bundle these modules */
378
+ external?: (string | RegExp)[];
379
+ /**
380
+ * Replace `process.env.NODE_ENV` with `production` or `development`
381
+ * `production` when the bundled is minified, `development` otherwise
382
+ */
383
+ replaceNodeEnv?: boolean;
384
+ /**
385
+ * Code splitting
386
+ * Default to `true` for ESM, `false` for CJS.
387
+ *
388
+ * You can set it to `true` explicitly, and may want to disable code splitting sometimes: [`#255`](https://github.com/egoist/tsup/issues/255)
389
+ */
390
+ splitting?: boolean;
391
+ /**
392
+ * Clean output directory before each build
393
+ */
394
+ clean?: boolean | string[];
395
+ esbuildPlugins?: Plugin$1[];
396
+ esbuildOptions?: (options: BuildOptions, context: {
397
+ format: Format;
398
+ }) => void;
399
+ /**
400
+ * Suppress non-error logs (excluding "onSuccess" process output)
401
+ */
402
+ silent?: boolean;
403
+ /**
404
+ * Skip node_modules bundling
405
+ * Will still bundle modules matching the `noExternal` option
406
+ */
407
+ skipNodeModulesBundle?: boolean;
408
+ /**
409
+ * @see https://esbuild.github.io/api/#pure
410
+ */
411
+ pure?: string | string[];
412
+ /**
413
+ * Disable bundling, default to true
414
+ */
415
+ bundle?: boolean;
416
+ /**
417
+ * This option allows you to automatically replace a global variable with an import from another file.
418
+ * @see https://esbuild.github.io/api/#inject
419
+ */
420
+ inject?: string[];
421
+ /**
422
+ * Emit esbuild metafile
423
+ * @see https://esbuild.github.io/api/#metafile
424
+ */
425
+ metafile?: boolean;
426
+ footer?: BannerOrFooter;
427
+ banner?: BannerOrFooter;
428
+ /**
429
+ * Target platform
430
+ * @default `node`
431
+ */
432
+ platform?: 'node' | 'browser' | 'neutral';
433
+ /**
434
+ * Esbuild loader option
435
+ */
436
+ loader?: Record<string, Loader>;
437
+ /**
438
+ * Disable config file with `false`
439
+ * Or pass a custom config filename
440
+ */
441
+ config?: boolean | string;
442
+ /**
443
+ * Use a custom tsconfig
444
+ */
445
+ tsconfig?: string;
446
+ /**
447
+ * Inject CSS as style tags to document head
448
+ * @default {false}
449
+ */
450
+ injectStyle?: boolean | ((css: string, fileId: string) => string | Promise<string>);
451
+ /**
452
+ * Inject cjs and esm shims if needed
453
+ * @default false
454
+ */
455
+ shims?: boolean;
456
+ /**
457
+ * TSUP plugins
458
+ * @experimental
459
+ * @alpha
460
+ */
461
+ plugins?: Plugin[];
462
+ /**
463
+ * By default esbuild already does treeshaking
464
+ *
465
+ * But this option allow you to perform additional treeshaking with Rollup
466
+ *
467
+ * This can result in smaller bundle size
468
+ */
469
+ treeshake?: TreeshakingStrategy;
470
+ /**
471
+ * Copy the files inside `publicDir` to output directory
472
+ */
473
+ publicDir?: string | boolean;
474
+ killSignal?: KILL_SIGNAL;
475
+ /**
476
+ * Interop default within `module.exports` in cjs
477
+ * @default false
478
+ */
479
+ cjsInterop?: boolean;
480
+ /**
481
+ * Remove `node:` protocol from imports
482
+ *
483
+ * The default value will be flipped to `false` in the next major release
484
+ * @default true
485
+ */
486
+ removeNodeProtocol?: boolean;
487
+ swc?: SwcPluginConfig;
488
+ };
489
+ interface NormalizedExperimentalDtsConfig {
490
+ entry: {
491
+ [entryAlias: string]: string;
492
+ };
493
+ compilerOptions?: any;
494
+ }
495
+ type NormalizedOptions = Omit<MarkRequired<Options, 'entry' | 'outDir'>, 'dts' | 'experimentalDts' | 'format'> & {
496
+ dts?: DtsConfig;
497
+ experimentalDts?: NormalizedExperimentalDtsConfig;
498
+ tsconfigResolvePaths: Record<string, string[]>;
499
+ tsconfigDecoratorMetadata?: boolean;
500
+ format: Format[];
501
+ swc?: SwcPluginConfig;
502
+ };
503
+
504
+ type MaybePromise<T> = T | Promise<T>;
505
+
506
+ declare const defineConfig: (options: Options | Options[] | ((
507
+ /** The options derived from CLI flags */
508
+ overrideOptions: Options) => MaybePromise<Options | Options[]>)) => Options | Options[] | ((overrideOptions: Options) => MaybePromise<Options | Options[]>);
509
+ declare function build(_options: Options): Promise<void>;
510
+
511
+ export { type Format, type NormalizedOptions, type Options, build, defineConfig };