@savvy-web/rslib-builder 0.1.1 → 0.1.2
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/index.d.ts +21 -14
- package/index.js +9 -13
- package/package.json +2 -3
- package/.npmignore +0 -2
- package/api.model.json +0 -3022
package/api.model.json
DELETED
|
@@ -1,3022 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"metadata": {
|
|
3
|
-
"toolPackage": "@microsoft/api-extractor",
|
|
4
|
-
"toolVersion": "7.55.2",
|
|
5
|
-
"schemaVersion": 1011,
|
|
6
|
-
"oldestForwardsCompatibleVersion": 1001,
|
|
7
|
-
"tsdocConfig": {
|
|
8
|
-
"$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
|
|
9
|
-
"noStandardTags": true,
|
|
10
|
-
"tagDefinitions": [
|
|
11
|
-
{
|
|
12
|
-
"tagName": "@alpha",
|
|
13
|
-
"syntaxKind": "modifier"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"tagName": "@beta",
|
|
17
|
-
"syntaxKind": "modifier"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"tagName": "@defaultValue",
|
|
21
|
-
"syntaxKind": "block"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"tagName": "@decorator",
|
|
25
|
-
"syntaxKind": "block",
|
|
26
|
-
"allowMultiple": true
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"tagName": "@deprecated",
|
|
30
|
-
"syntaxKind": "block"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"tagName": "@eventProperty",
|
|
34
|
-
"syntaxKind": "modifier"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"tagName": "@example",
|
|
38
|
-
"syntaxKind": "block",
|
|
39
|
-
"allowMultiple": true
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"tagName": "@experimental",
|
|
43
|
-
"syntaxKind": "modifier"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"tagName": "@inheritDoc",
|
|
47
|
-
"syntaxKind": "inline"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"tagName": "@internal",
|
|
51
|
-
"syntaxKind": "modifier"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"tagName": "@label",
|
|
55
|
-
"syntaxKind": "inline"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"tagName": "@link",
|
|
59
|
-
"syntaxKind": "inline",
|
|
60
|
-
"allowMultiple": true
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"tagName": "@override",
|
|
64
|
-
"syntaxKind": "modifier"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"tagName": "@packageDocumentation",
|
|
68
|
-
"syntaxKind": "modifier"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"tagName": "@param",
|
|
72
|
-
"syntaxKind": "block",
|
|
73
|
-
"allowMultiple": true
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"tagName": "@privateRemarks",
|
|
77
|
-
"syntaxKind": "block"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"tagName": "@public",
|
|
81
|
-
"syntaxKind": "modifier"
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"tagName": "@readonly",
|
|
85
|
-
"syntaxKind": "modifier"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"tagName": "@remarks",
|
|
89
|
-
"syntaxKind": "block"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"tagName": "@returns",
|
|
93
|
-
"syntaxKind": "block"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"tagName": "@sealed",
|
|
97
|
-
"syntaxKind": "modifier"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"tagName": "@see",
|
|
101
|
-
"syntaxKind": "block"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"tagName": "@throws",
|
|
105
|
-
"syntaxKind": "block",
|
|
106
|
-
"allowMultiple": true
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"tagName": "@typeParam",
|
|
110
|
-
"syntaxKind": "block",
|
|
111
|
-
"allowMultiple": true
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"tagName": "@virtual",
|
|
115
|
-
"syntaxKind": "modifier"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"tagName": "@jsx",
|
|
119
|
-
"syntaxKind": "block"
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"tagName": "@jsxRuntime",
|
|
123
|
-
"syntaxKind": "block"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"tagName": "@jsxFrag",
|
|
127
|
-
"syntaxKind": "block"
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"tagName": "@jsxImportSource",
|
|
131
|
-
"syntaxKind": "block"
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"tagName": "@betaDocumentation",
|
|
135
|
-
"syntaxKind": "modifier"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"tagName": "@internalRemarks",
|
|
139
|
-
"syntaxKind": "block"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"tagName": "@preapproved",
|
|
143
|
-
"syntaxKind": "modifier"
|
|
144
|
-
}
|
|
145
|
-
],
|
|
146
|
-
"supportForTags": {
|
|
147
|
-
"@alpha": true,
|
|
148
|
-
"@beta": true,
|
|
149
|
-
"@defaultValue": true,
|
|
150
|
-
"@decorator": true,
|
|
151
|
-
"@deprecated": true,
|
|
152
|
-
"@eventProperty": true,
|
|
153
|
-
"@example": true,
|
|
154
|
-
"@experimental": true,
|
|
155
|
-
"@inheritDoc": true,
|
|
156
|
-
"@internal": true,
|
|
157
|
-
"@label": true,
|
|
158
|
-
"@link": true,
|
|
159
|
-
"@override": true,
|
|
160
|
-
"@packageDocumentation": true,
|
|
161
|
-
"@param": true,
|
|
162
|
-
"@privateRemarks": true,
|
|
163
|
-
"@public": true,
|
|
164
|
-
"@readonly": true,
|
|
165
|
-
"@remarks": true,
|
|
166
|
-
"@returns": true,
|
|
167
|
-
"@sealed": true,
|
|
168
|
-
"@see": true,
|
|
169
|
-
"@throws": true,
|
|
170
|
-
"@typeParam": true,
|
|
171
|
-
"@virtual": true,
|
|
172
|
-
"@betaDocumentation": true,
|
|
173
|
-
"@internalRemarks": true,
|
|
174
|
-
"@preapproved": true
|
|
175
|
-
},
|
|
176
|
-
"reportUnsupportedHtmlElements": false
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
"kind": "Package",
|
|
180
|
-
"canonicalReference": "@savvy-web/rslib-builder!",
|
|
181
|
-
"docComment": "/**\n * RSLib-based build system for Node.js libraries with automatic package.json transformation, TypeScript declaration bundling, and multi-target support.\n *\n * @remarks\n *\n * This package provides a powerful builder system built on top of RSLib that simplifies the process of building modern ESM Node.js libraries. It offers:\n *\n * - **Automatic Entry Detection**: Auto-detects entry points from package.json exports - **Multi-Target Builds**: Support for dev and npm build targets - **Bundled ESM Output**: Optimized single-file outputs with rolled-up types - **Package.json Transformation**: Automatic path updates, PNPM catalog resolution - **TypeScript Declaration Bundling**: Using tsgo and API Extractor - **File Array Generation**: Automatic files array creation for package.json - **API Model Generation**: Optional api.model.json for documentation tooling\n *\n * @example\n *\n * Basic usage in rslib.config.ts:\n * ```typescript\n * import { NodeLibraryBuilder } from '@savvy-web/rslib-builder';\n *\n * export default NodeLibraryBuilder.create({});\n * ```\n *\n * @example\n *\n * With custom transformations:\n * ```typescript\n * import { NodeLibraryBuilder } from '@savvy-web/rslib-builder';\n *\n * export default NodeLibraryBuilder.create({\n * externals: ['@rslib/core'],\n * transform({ pkg }) {\n * delete pkg.devDependencies;\n * return pkg;\n * }\n * });\n * ```\n *\n * @packageDocumentation\n */\n",
|
|
182
|
-
"name": "@savvy-web/rslib-builder",
|
|
183
|
-
"preserveMemberOrder": false,
|
|
184
|
-
"members": [
|
|
185
|
-
{
|
|
186
|
-
"kind": "EntryPoint",
|
|
187
|
-
"canonicalReference": "@savvy-web/rslib-builder!",
|
|
188
|
-
"name": "",
|
|
189
|
-
"preserveMemberOrder": false,
|
|
190
|
-
"members": [
|
|
191
|
-
{
|
|
192
|
-
"kind": "Interface",
|
|
193
|
-
"canonicalReference": "@savvy-web/rslib-builder!ApiModelOptions:interface",
|
|
194
|
-
"docComment": "/**\n * Options for API model generation. When enabled, generates an api.model.json file using API Extractor.\n *\n * @remarks\n *\n * API models are only generated for the main \"index\" entry point (the \".\" export). Additional entry points like \"./hooks\" or \"./utils\" do not generate separate API models. This prevents multiple conflicting API models and ensures a single source of truth for package documentation.\n *\n * @public\n */\n",
|
|
195
|
-
"excerptTokens": [
|
|
196
|
-
{
|
|
197
|
-
"kind": "Content",
|
|
198
|
-
"text": "export interface ApiModelOptions "
|
|
199
|
-
}
|
|
200
|
-
],
|
|
201
|
-
"fileUrlPath": "src/rslib/plugins/dts-plugin.ts",
|
|
202
|
-
"releaseTag": "Public",
|
|
203
|
-
"name": "ApiModelOptions",
|
|
204
|
-
"preserveMemberOrder": false,
|
|
205
|
-
"members": [
|
|
206
|
-
{
|
|
207
|
-
"kind": "PropertySignature",
|
|
208
|
-
"canonicalReference": "@savvy-web/rslib-builder!ApiModelOptions#enabled:member",
|
|
209
|
-
"docComment": "/**\n * Whether to enable API model generation.\n *\n * @defaultValue false\n */\n",
|
|
210
|
-
"excerptTokens": [
|
|
211
|
-
{
|
|
212
|
-
"kind": "Content",
|
|
213
|
-
"text": "enabled?: "
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
"kind": "Content",
|
|
217
|
-
"text": "boolean"
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
"kind": "Content",
|
|
221
|
-
"text": ";"
|
|
222
|
-
}
|
|
223
|
-
],
|
|
224
|
-
"isReadonly": false,
|
|
225
|
-
"isOptional": true,
|
|
226
|
-
"releaseTag": "Public",
|
|
227
|
-
"name": "enabled",
|
|
228
|
-
"propertyTypeTokenRange": {
|
|
229
|
-
"startIndex": 1,
|
|
230
|
-
"endIndex": 2
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
"kind": "PropertySignature",
|
|
235
|
-
"canonicalReference": "@savvy-web/rslib-builder!ApiModelOptions#filename:member",
|
|
236
|
-
"docComment": "/**\n * Filename for the generated API model file.\n *\n * @defaultValue \"api.model.json\"\n */\n",
|
|
237
|
-
"excerptTokens": [
|
|
238
|
-
{
|
|
239
|
-
"kind": "Content",
|
|
240
|
-
"text": "filename?: "
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
"kind": "Content",
|
|
244
|
-
"text": "string"
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
"kind": "Content",
|
|
248
|
-
"text": ";"
|
|
249
|
-
}
|
|
250
|
-
],
|
|
251
|
-
"isReadonly": false,
|
|
252
|
-
"isOptional": true,
|
|
253
|
-
"releaseTag": "Public",
|
|
254
|
-
"name": "filename",
|
|
255
|
-
"propertyTypeTokenRange": {
|
|
256
|
-
"startIndex": 1,
|
|
257
|
-
"endIndex": 2
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
"kind": "PropertySignature",
|
|
262
|
-
"canonicalReference": "@savvy-web/rslib-builder!ApiModelOptions#localPaths:member",
|
|
263
|
-
"docComment": "/**\n * Local paths to copy the API model and package.json to. Used for local testing with documentation systems.\n *\n * @remarks\n *\n * Each path must be a directory. The parent directory must exist, but the final directory will be created if it doesn't exist. Both api.model.json and the processed package.json will be copied.\n *\n * @example\n * ```typescript\n * apiModel: {\n * enabled: true,\n * localPaths: [\"../docs-site/lib/packages/my-package\"],\n * }\n * ```\n *\n */\n",
|
|
264
|
-
"excerptTokens": [
|
|
265
|
-
{
|
|
266
|
-
"kind": "Content",
|
|
267
|
-
"text": "localPaths?: "
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
"kind": "Content",
|
|
271
|
-
"text": "string[]"
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
"kind": "Content",
|
|
275
|
-
"text": ";"
|
|
276
|
-
}
|
|
277
|
-
],
|
|
278
|
-
"isReadonly": false,
|
|
279
|
-
"isOptional": true,
|
|
280
|
-
"releaseTag": "Public",
|
|
281
|
-
"name": "localPaths",
|
|
282
|
-
"propertyTypeTokenRange": {
|
|
283
|
-
"startIndex": 1,
|
|
284
|
-
"endIndex": 2
|
|
285
|
-
}
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
"kind": "PropertySignature",
|
|
289
|
-
"canonicalReference": "@savvy-web/rslib-builder!ApiModelOptions#npmIgnore:member",
|
|
290
|
-
"docComment": "/**\n * Whether to add a .npmignore file that excludes the API model file. This is useful when the API model is for internal tooling only.\n *\n * @defaultValue true\n */\n",
|
|
291
|
-
"excerptTokens": [
|
|
292
|
-
{
|
|
293
|
-
"kind": "Content",
|
|
294
|
-
"text": "npmIgnore?: "
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
"kind": "Content",
|
|
298
|
-
"text": "boolean"
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
"kind": "Content",
|
|
302
|
-
"text": ";"
|
|
303
|
-
}
|
|
304
|
-
],
|
|
305
|
-
"isReadonly": false,
|
|
306
|
-
"isOptional": true,
|
|
307
|
-
"releaseTag": "Public",
|
|
308
|
-
"name": "npmIgnore",
|
|
309
|
-
"propertyTypeTokenRange": {
|
|
310
|
-
"startIndex": 1,
|
|
311
|
-
"endIndex": 2
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
],
|
|
315
|
-
"extendsTokenRanges": []
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
"kind": "Function",
|
|
319
|
-
"canonicalReference": "@savvy-web/rslib-builder!AutoEntryPlugin:function(1)",
|
|
320
|
-
"docComment": "/**\n * Plugin to read package.json and configure entry points based on exports.\n *\n * @param options - Plugin configuration options\n *\n * @param - options.exportsAsIndexes - When true, export paths create index files in nested directories\n *\n * @public\n */\n",
|
|
321
|
-
"excerptTokens": [
|
|
322
|
-
{
|
|
323
|
-
"kind": "Content",
|
|
324
|
-
"text": "AutoEntryPlugin: (options?: "
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
"kind": "Content",
|
|
328
|
-
"text": "{\n exportsAsIndexes?: boolean | undefined;\n} | undefined"
|
|
329
|
-
},
|
|
330
|
-
{
|
|
331
|
-
"kind": "Content",
|
|
332
|
-
"text": ") => "
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
"kind": "Reference",
|
|
336
|
-
"text": "RsbuildPlugin",
|
|
337
|
-
"canonicalReference": "@rsbuild/core!RsbuildPlugin:type"
|
|
338
|
-
}
|
|
339
|
-
],
|
|
340
|
-
"fileUrlPath": "src/rslib/plugins/auto-entry-plugin.ts",
|
|
341
|
-
"returnTypeTokenRange": {
|
|
342
|
-
"startIndex": 3,
|
|
343
|
-
"endIndex": 4
|
|
344
|
-
},
|
|
345
|
-
"releaseTag": "Public",
|
|
346
|
-
"overloadIndex": 1,
|
|
347
|
-
"parameters": [
|
|
348
|
-
{
|
|
349
|
-
"parameterName": "options",
|
|
350
|
-
"parameterTypeTokenRange": {
|
|
351
|
-
"startIndex": 1,
|
|
352
|
-
"endIndex": 2
|
|
353
|
-
},
|
|
354
|
-
"isOptional": true
|
|
355
|
-
}
|
|
356
|
-
],
|
|
357
|
-
"name": "AutoEntryPlugin"
|
|
358
|
-
},
|
|
359
|
-
{
|
|
360
|
-
"kind": "TypeAlias",
|
|
361
|
-
"canonicalReference": "@savvy-web/rslib-builder!BuildTarget:type",
|
|
362
|
-
"docComment": "/**\n * @public\n */\n",
|
|
363
|
-
"excerptTokens": [
|
|
364
|
-
{
|
|
365
|
-
"kind": "Content",
|
|
366
|
-
"text": "export type BuildTarget = "
|
|
367
|
-
},
|
|
368
|
-
{
|
|
369
|
-
"kind": "Content",
|
|
370
|
-
"text": "\"dev\" | \"npm\""
|
|
371
|
-
},
|
|
372
|
-
{
|
|
373
|
-
"kind": "Content",
|
|
374
|
-
"text": ";"
|
|
375
|
-
}
|
|
376
|
-
],
|
|
377
|
-
"fileUrlPath": "src/rslib/builders/node-library-builder.ts",
|
|
378
|
-
"releaseTag": "Public",
|
|
379
|
-
"name": "BuildTarget",
|
|
380
|
-
"typeTokenRange": {
|
|
381
|
-
"startIndex": 1,
|
|
382
|
-
"endIndex": 2
|
|
383
|
-
}
|
|
384
|
-
},
|
|
385
|
-
{
|
|
386
|
-
"kind": "Function",
|
|
387
|
-
"canonicalReference": "@savvy-web/rslib-builder!collectDtsFiles:function(1)",
|
|
388
|
-
"docComment": "/**\n * Recursively collects all .d.ts and .d.ts.map files from a directory.\n *\n * @public\n */\n",
|
|
389
|
-
"excerptTokens": [
|
|
390
|
-
{
|
|
391
|
-
"kind": "Content",
|
|
392
|
-
"text": "export declare function collectDtsFiles(dir: "
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
"kind": "Content",
|
|
396
|
-
"text": "string"
|
|
397
|
-
},
|
|
398
|
-
{
|
|
399
|
-
"kind": "Content",
|
|
400
|
-
"text": ", baseDir?: "
|
|
401
|
-
},
|
|
402
|
-
{
|
|
403
|
-
"kind": "Content",
|
|
404
|
-
"text": "string"
|
|
405
|
-
},
|
|
406
|
-
{
|
|
407
|
-
"kind": "Content",
|
|
408
|
-
"text": "): "
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
"kind": "Reference",
|
|
412
|
-
"text": "Promise",
|
|
413
|
-
"canonicalReference": "!Promise:interface"
|
|
414
|
-
},
|
|
415
|
-
{
|
|
416
|
-
"kind": "Content",
|
|
417
|
-
"text": "<"
|
|
418
|
-
},
|
|
419
|
-
{
|
|
420
|
-
"kind": "Reference",
|
|
421
|
-
"text": "Array",
|
|
422
|
-
"canonicalReference": "!Array:interface"
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
"kind": "Content",
|
|
426
|
-
"text": "<{\n path: string;\n relativePath: string;\n}>>"
|
|
427
|
-
},
|
|
428
|
-
{
|
|
429
|
-
"kind": "Content",
|
|
430
|
-
"text": ";"
|
|
431
|
-
}
|
|
432
|
-
],
|
|
433
|
-
"fileUrlPath": "src/rslib/plugins/dts-plugin.ts",
|
|
434
|
-
"returnTypeTokenRange": {
|
|
435
|
-
"startIndex": 5,
|
|
436
|
-
"endIndex": 9
|
|
437
|
-
},
|
|
438
|
-
"releaseTag": "Public",
|
|
439
|
-
"overloadIndex": 1,
|
|
440
|
-
"parameters": [
|
|
441
|
-
{
|
|
442
|
-
"parameterName": "dir",
|
|
443
|
-
"parameterTypeTokenRange": {
|
|
444
|
-
"startIndex": 1,
|
|
445
|
-
"endIndex": 2
|
|
446
|
-
},
|
|
447
|
-
"isOptional": false
|
|
448
|
-
},
|
|
449
|
-
{
|
|
450
|
-
"parameterName": "baseDir",
|
|
451
|
-
"parameterTypeTokenRange": {
|
|
452
|
-
"startIndex": 3,
|
|
453
|
-
"endIndex": 4
|
|
454
|
-
},
|
|
455
|
-
"isOptional": true
|
|
456
|
-
}
|
|
457
|
-
],
|
|
458
|
-
"name": "collectDtsFiles"
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
"kind": "Function",
|
|
462
|
-
"canonicalReference": "@savvy-web/rslib-builder!DtsPlugin:function(1)",
|
|
463
|
-
"docComment": "/**\n * Plugin to generate TypeScript declaration files using tsgo and emit them through Rslib's asset pipeline.\n *\n * @remarks\n *\n * This plugin uses tsgo (@typescript/native-preview) for faster declaration file generation and integrates with Rslib's build system by emitting generated files as compilation assets.\n *\n * ## Features\n *\n * - Uses tsgo exclusively for .d.ts generation (faster than tsc) - Emits .d.ts and .d.ts.map files through Rslib's asset pipeline - Optional bundling with API Extractor for rollup mode - Supports watch mode - Integrates seamlessly with other Rslib plugins - Respects tsconfig.json settings\n *\n * ## Build Workflow\n *\n * 1. **Config Phase** (`modifyRsbuildConfig`): - Finds and loads tsconfig.json - Creates temp directory for .d.ts generation - Validates configuration\n *\n * 2. **Asset Processing Phase** (`processAssets`): - Cleans temp directory at start of build (to remove stale files) - Spawns tsgo to generate .d.ts files to temp directory - Recursively collects all generated .d.ts and .d.ts.map files - If bundling: uses API Extractor to bundle declarations per entry point - Emits files through compilation.emitAsset() - Adds .d.ts files (not .d.ts.map) to the files array for npm publishing - Preserves temp directory after build for API Extractor documentation generation\n *\n * @param options - Plugin configuration options\n *\n * @example\n * ```typescript\n * import { DtsPlugin } from \"@savvy-web/shared/rslib\";\n *\n * export default {\n * plugins: [\n * DtsPlugin({\n * abortOnError: true,\n * bundle: true,\n * bundledPackages: ['type-fest', '@commitlint/*']\n * })\n * ]\n * };\n * ```\n *\n * @public\n */\n",
|
|
464
|
-
"excerptTokens": [
|
|
465
|
-
{
|
|
466
|
-
"kind": "Content",
|
|
467
|
-
"text": "DtsPlugin: (options?: "
|
|
468
|
-
},
|
|
469
|
-
{
|
|
470
|
-
"kind": "Reference",
|
|
471
|
-
"text": "DtsPluginOptions",
|
|
472
|
-
"canonicalReference": "@savvy-web/rslib-builder!DtsPluginOptions:interface"
|
|
473
|
-
},
|
|
474
|
-
{
|
|
475
|
-
"kind": "Content",
|
|
476
|
-
"text": ") => "
|
|
477
|
-
},
|
|
478
|
-
{
|
|
479
|
-
"kind": "Reference",
|
|
480
|
-
"text": "RsbuildPlugin",
|
|
481
|
-
"canonicalReference": "@rsbuild/core!RsbuildPlugin:type"
|
|
482
|
-
}
|
|
483
|
-
],
|
|
484
|
-
"fileUrlPath": "src/rslib/plugins/dts-plugin.ts",
|
|
485
|
-
"returnTypeTokenRange": {
|
|
486
|
-
"startIndex": 3,
|
|
487
|
-
"endIndex": 4
|
|
488
|
-
},
|
|
489
|
-
"releaseTag": "Public",
|
|
490
|
-
"overloadIndex": 1,
|
|
491
|
-
"parameters": [
|
|
492
|
-
{
|
|
493
|
-
"parameterName": "options",
|
|
494
|
-
"parameterTypeTokenRange": {
|
|
495
|
-
"startIndex": 1,
|
|
496
|
-
"endIndex": 2
|
|
497
|
-
},
|
|
498
|
-
"isOptional": true
|
|
499
|
-
}
|
|
500
|
-
],
|
|
501
|
-
"name": "DtsPlugin"
|
|
502
|
-
},
|
|
503
|
-
{
|
|
504
|
-
"kind": "Interface",
|
|
505
|
-
"canonicalReference": "@savvy-web/rslib-builder!DtsPluginOptions:interface",
|
|
506
|
-
"docComment": "/**\n * Options for configuring the DTS plugin.\n *\n * @public\n */\n",
|
|
507
|
-
"excerptTokens": [
|
|
508
|
-
{
|
|
509
|
-
"kind": "Content",
|
|
510
|
-
"text": "export interface DtsPluginOptions "
|
|
511
|
-
}
|
|
512
|
-
],
|
|
513
|
-
"fileUrlPath": "src/rslib/plugins/dts-plugin.ts",
|
|
514
|
-
"releaseTag": "Public",
|
|
515
|
-
"name": "DtsPluginOptions",
|
|
516
|
-
"preserveMemberOrder": false,
|
|
517
|
-
"members": [
|
|
518
|
-
{
|
|
519
|
-
"kind": "PropertySignature",
|
|
520
|
-
"canonicalReference": "@savvy-web/rslib-builder!DtsPluginOptions#abortOnError:member",
|
|
521
|
-
"docComment": "/**\n * Whether to abort the build on TypeScript errors.\n *\n * @defaultValue true\n */\n",
|
|
522
|
-
"excerptTokens": [
|
|
523
|
-
{
|
|
524
|
-
"kind": "Content",
|
|
525
|
-
"text": "abortOnError?: "
|
|
526
|
-
},
|
|
527
|
-
{
|
|
528
|
-
"kind": "Content",
|
|
529
|
-
"text": "boolean"
|
|
530
|
-
},
|
|
531
|
-
{
|
|
532
|
-
"kind": "Content",
|
|
533
|
-
"text": ";"
|
|
534
|
-
}
|
|
535
|
-
],
|
|
536
|
-
"isReadonly": false,
|
|
537
|
-
"isOptional": true,
|
|
538
|
-
"releaseTag": "Public",
|
|
539
|
-
"name": "abortOnError",
|
|
540
|
-
"propertyTypeTokenRange": {
|
|
541
|
-
"startIndex": 1,
|
|
542
|
-
"endIndex": 2
|
|
543
|
-
}
|
|
544
|
-
},
|
|
545
|
-
{
|
|
546
|
-
"kind": "PropertySignature",
|
|
547
|
-
"canonicalReference": "@savvy-web/rslib-builder!DtsPluginOptions#apiModel:member",
|
|
548
|
-
"docComment": "/**\n * Options for API model generation. When enabled, generates an api.model.json file in the dist directory. Only applies when bundle is true.\n */\n",
|
|
549
|
-
"excerptTokens": [
|
|
550
|
-
{
|
|
551
|
-
"kind": "Content",
|
|
552
|
-
"text": "apiModel?: "
|
|
553
|
-
},
|
|
554
|
-
{
|
|
555
|
-
"kind": "Reference",
|
|
556
|
-
"text": "ApiModelOptions",
|
|
557
|
-
"canonicalReference": "@savvy-web/rslib-builder!ApiModelOptions:interface"
|
|
558
|
-
},
|
|
559
|
-
{
|
|
560
|
-
"kind": "Content",
|
|
561
|
-
"text": " | boolean"
|
|
562
|
-
},
|
|
563
|
-
{
|
|
564
|
-
"kind": "Content",
|
|
565
|
-
"text": ";"
|
|
566
|
-
}
|
|
567
|
-
],
|
|
568
|
-
"isReadonly": false,
|
|
569
|
-
"isOptional": true,
|
|
570
|
-
"releaseTag": "Public",
|
|
571
|
-
"name": "apiModel",
|
|
572
|
-
"propertyTypeTokenRange": {
|
|
573
|
-
"startIndex": 1,
|
|
574
|
-
"endIndex": 3
|
|
575
|
-
}
|
|
576
|
-
},
|
|
577
|
-
{
|
|
578
|
-
"kind": "PropertySignature",
|
|
579
|
-
"canonicalReference": "@savvy-web/rslib-builder!DtsPluginOptions#banner:member",
|
|
580
|
-
"docComment": "/**\n * Banner text to add at the top of bundled declaration files. Only applies when bundle is true.\n */\n",
|
|
581
|
-
"excerptTokens": [
|
|
582
|
-
{
|
|
583
|
-
"kind": "Content",
|
|
584
|
-
"text": "banner?: "
|
|
585
|
-
},
|
|
586
|
-
{
|
|
587
|
-
"kind": "Content",
|
|
588
|
-
"text": "string"
|
|
589
|
-
},
|
|
590
|
-
{
|
|
591
|
-
"kind": "Content",
|
|
592
|
-
"text": ";"
|
|
593
|
-
}
|
|
594
|
-
],
|
|
595
|
-
"isReadonly": false,
|
|
596
|
-
"isOptional": true,
|
|
597
|
-
"releaseTag": "Public",
|
|
598
|
-
"name": "banner",
|
|
599
|
-
"propertyTypeTokenRange": {
|
|
600
|
-
"startIndex": 1,
|
|
601
|
-
"endIndex": 2
|
|
602
|
-
}
|
|
603
|
-
},
|
|
604
|
-
{
|
|
605
|
-
"kind": "PropertySignature",
|
|
606
|
-
"canonicalReference": "@savvy-web/rslib-builder!DtsPluginOptions#buildTarget:member",
|
|
607
|
-
"docComment": "/**\n * Build target (dev, npm). Used to generate the correct temp tsconfig when tsconfigPath is not provided.\n */\n",
|
|
608
|
-
"excerptTokens": [
|
|
609
|
-
{
|
|
610
|
-
"kind": "Content",
|
|
611
|
-
"text": "buildTarget?: "
|
|
612
|
-
},
|
|
613
|
-
{
|
|
614
|
-
"kind": "Content",
|
|
615
|
-
"text": "\"dev\" | \"npm\""
|
|
616
|
-
},
|
|
617
|
-
{
|
|
618
|
-
"kind": "Content",
|
|
619
|
-
"text": ";"
|
|
620
|
-
}
|
|
621
|
-
],
|
|
622
|
-
"isReadonly": false,
|
|
623
|
-
"isOptional": true,
|
|
624
|
-
"releaseTag": "Public",
|
|
625
|
-
"name": "buildTarget",
|
|
626
|
-
"propertyTypeTokenRange": {
|
|
627
|
-
"startIndex": 1,
|
|
628
|
-
"endIndex": 2
|
|
629
|
-
}
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
"kind": "PropertySignature",
|
|
633
|
-
"canonicalReference": "@savvy-web/rslib-builder!DtsPluginOptions#bundle:member",
|
|
634
|
-
"docComment": "/**\n * Whether to bundle declaration files using API Extractor. When true, generates a single .d.ts file per entry point.\n *\n * @defaultValue false\n */\n",
|
|
635
|
-
"excerptTokens": [
|
|
636
|
-
{
|
|
637
|
-
"kind": "Content",
|
|
638
|
-
"text": "bundle?: "
|
|
639
|
-
},
|
|
640
|
-
{
|
|
641
|
-
"kind": "Content",
|
|
642
|
-
"text": "boolean"
|
|
643
|
-
},
|
|
644
|
-
{
|
|
645
|
-
"kind": "Content",
|
|
646
|
-
"text": ";"
|
|
647
|
-
}
|
|
648
|
-
],
|
|
649
|
-
"isReadonly": false,
|
|
650
|
-
"isOptional": true,
|
|
651
|
-
"releaseTag": "Public",
|
|
652
|
-
"name": "bundle",
|
|
653
|
-
"propertyTypeTokenRange": {
|
|
654
|
-
"startIndex": 1,
|
|
655
|
-
"endIndex": 2
|
|
656
|
-
}
|
|
657
|
-
},
|
|
658
|
-
{
|
|
659
|
-
"kind": "PropertySignature",
|
|
660
|
-
"canonicalReference": "@savvy-web/rslib-builder!DtsPluginOptions#bundledPackages:member",
|
|
661
|
-
"docComment": "/**\n * Packages whose types should be bundled (inlined) into the output .d.ts files. Only applies when bundle is true. Supports glob patterns (e.g., '@commitlint/*', 'type-fest')\n *\n * @defaultValue []\n */\n",
|
|
662
|
-
"excerptTokens": [
|
|
663
|
-
{
|
|
664
|
-
"kind": "Content",
|
|
665
|
-
"text": "bundledPackages?: "
|
|
666
|
-
},
|
|
667
|
-
{
|
|
668
|
-
"kind": "Content",
|
|
669
|
-
"text": "string[]"
|
|
670
|
-
},
|
|
671
|
-
{
|
|
672
|
-
"kind": "Content",
|
|
673
|
-
"text": ";"
|
|
674
|
-
}
|
|
675
|
-
],
|
|
676
|
-
"isReadonly": false,
|
|
677
|
-
"isOptional": true,
|
|
678
|
-
"releaseTag": "Public",
|
|
679
|
-
"name": "bundledPackages",
|
|
680
|
-
"propertyTypeTokenRange": {
|
|
681
|
-
"startIndex": 1,
|
|
682
|
-
"endIndex": 2
|
|
683
|
-
}
|
|
684
|
-
},
|
|
685
|
-
{
|
|
686
|
-
"kind": "PropertySignature",
|
|
687
|
-
"canonicalReference": "@savvy-web/rslib-builder!DtsPluginOptions#distPath:member",
|
|
688
|
-
"docComment": "/**\n * Custom output directory for declaration files relative to dist root. If not specified, uses the declarationDir from tsconfig.json or falls back to dist root.\n */\n",
|
|
689
|
-
"excerptTokens": [
|
|
690
|
-
{
|
|
691
|
-
"kind": "Content",
|
|
692
|
-
"text": "distPath?: "
|
|
693
|
-
},
|
|
694
|
-
{
|
|
695
|
-
"kind": "Content",
|
|
696
|
-
"text": "string"
|
|
697
|
-
},
|
|
698
|
-
{
|
|
699
|
-
"kind": "Content",
|
|
700
|
-
"text": ";"
|
|
701
|
-
}
|
|
702
|
-
],
|
|
703
|
-
"isReadonly": false,
|
|
704
|
-
"isOptional": true,
|
|
705
|
-
"releaseTag": "Public",
|
|
706
|
-
"name": "distPath",
|
|
707
|
-
"propertyTypeTokenRange": {
|
|
708
|
-
"startIndex": 1,
|
|
709
|
-
"endIndex": 2
|
|
710
|
-
}
|
|
711
|
-
},
|
|
712
|
-
{
|
|
713
|
-
"kind": "PropertySignature",
|
|
714
|
-
"canonicalReference": "@savvy-web/rslib-builder!DtsPluginOptions#dtsExtension:member",
|
|
715
|
-
"docComment": "/**\n * Custom file extension for declaration files.\n *\n * @defaultValue \".d.ts\"\n */\n",
|
|
716
|
-
"excerptTokens": [
|
|
717
|
-
{
|
|
718
|
-
"kind": "Content",
|
|
719
|
-
"text": "dtsExtension?: "
|
|
720
|
-
},
|
|
721
|
-
{
|
|
722
|
-
"kind": "Content",
|
|
723
|
-
"text": "string"
|
|
724
|
-
},
|
|
725
|
-
{
|
|
726
|
-
"kind": "Content",
|
|
727
|
-
"text": ";"
|
|
728
|
-
}
|
|
729
|
-
],
|
|
730
|
-
"isReadonly": false,
|
|
731
|
-
"isOptional": true,
|
|
732
|
-
"releaseTag": "Public",
|
|
733
|
-
"name": "dtsExtension",
|
|
734
|
-
"propertyTypeTokenRange": {
|
|
735
|
-
"startIndex": 1,
|
|
736
|
-
"endIndex": 2
|
|
737
|
-
}
|
|
738
|
-
},
|
|
739
|
-
{
|
|
740
|
-
"kind": "PropertySignature",
|
|
741
|
-
"canonicalReference": "@savvy-web/rslib-builder!DtsPluginOptions#footer:member",
|
|
742
|
-
"docComment": "/**\n * Footer text to add at the bottom of bundled declaration files. Only applies when bundle is true.\n */\n",
|
|
743
|
-
"excerptTokens": [
|
|
744
|
-
{
|
|
745
|
-
"kind": "Content",
|
|
746
|
-
"text": "footer?: "
|
|
747
|
-
},
|
|
748
|
-
{
|
|
749
|
-
"kind": "Content",
|
|
750
|
-
"text": "string"
|
|
751
|
-
},
|
|
752
|
-
{
|
|
753
|
-
"kind": "Content",
|
|
754
|
-
"text": ";"
|
|
755
|
-
}
|
|
756
|
-
],
|
|
757
|
-
"isReadonly": false,
|
|
758
|
-
"isOptional": true,
|
|
759
|
-
"releaseTag": "Public",
|
|
760
|
-
"name": "footer",
|
|
761
|
-
"propertyTypeTokenRange": {
|
|
762
|
-
"startIndex": 1,
|
|
763
|
-
"endIndex": 2
|
|
764
|
-
}
|
|
765
|
-
},
|
|
766
|
-
{
|
|
767
|
-
"kind": "PropertySignature",
|
|
768
|
-
"canonicalReference": "@savvy-web/rslib-builder!DtsPluginOptions#tsconfigPath:member",
|
|
769
|
-
"docComment": "/**\n * Path to TypeScript configuration file. If not specified, uses the tsconfigPath from Rsbuild config or searches for tsconfig.json.\n */\n",
|
|
770
|
-
"excerptTokens": [
|
|
771
|
-
{
|
|
772
|
-
"kind": "Content",
|
|
773
|
-
"text": "tsconfigPath?: "
|
|
774
|
-
},
|
|
775
|
-
{
|
|
776
|
-
"kind": "Content",
|
|
777
|
-
"text": "string"
|
|
778
|
-
},
|
|
779
|
-
{
|
|
780
|
-
"kind": "Content",
|
|
781
|
-
"text": ";"
|
|
782
|
-
}
|
|
783
|
-
],
|
|
784
|
-
"isReadonly": false,
|
|
785
|
-
"isOptional": true,
|
|
786
|
-
"releaseTag": "Public",
|
|
787
|
-
"name": "tsconfigPath",
|
|
788
|
-
"propertyTypeTokenRange": {
|
|
789
|
-
"startIndex": 1,
|
|
790
|
-
"endIndex": 2
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
],
|
|
794
|
-
"extendsTokenRanges": []
|
|
795
|
-
},
|
|
796
|
-
{
|
|
797
|
-
"kind": "Class",
|
|
798
|
-
"canonicalReference": "@savvy-web/rslib-builder!EntryExtractor:class",
|
|
799
|
-
"docComment": "/**\n * Extracts TypeScript entry points from package.json for build configuration.\n *\n * @remarks\n *\n * This class analyzes package.json export and bin configurations to identify TypeScript source files that need to be built. It handles various export formats and automatically maps JavaScript output paths back to their TypeScript source files.\n *\n * **Export Path Mapping:** - Converts export keys to entry names (e.g., \"./utils\" -> \"utils\") - Maps the root export \".\" to \"index\" entry - Replaces path separators with hyphens for nested exports (default) - When `exportsAsIndexes` is true, preserves path structure\n *\n * **Source Path Resolution:** - Prioritizes TypeScript files (.ts/.tsx) over JavaScript files - Maps /dist/ JavaScript paths back to /src/ TypeScript sources - Supports conditional exports (import, default, types fields)\n *\n * @example\n * ```typescript\n * const extractor = new EntryExtractor();\n *\n * const packageJson = {\n * exports: {\n * \".\": \"./src/index.ts\",\n * \"./utils\": \"./src/utils.ts\",\n * },\n * bin: {\n * \"my-cli\": \"./src/bin/cli.ts\"\n * }\n * };\n *\n * const result = extractor.extract(packageJson);\n * console.log(result.entries);\n * // {\n * // \"index\": \"./src/index.ts\",\n * // \"utils\": \"./src/utils.ts\",\n * // \"bin/my-cli\": \"./src/bin/cli.ts\"\n * // }\n * ```\n *\n * @public\n */\n",
|
|
800
|
-
"excerptTokens": [
|
|
801
|
-
{
|
|
802
|
-
"kind": "Content",
|
|
803
|
-
"text": "export declare class EntryExtractor "
|
|
804
|
-
}
|
|
805
|
-
],
|
|
806
|
-
"fileUrlPath": "src/rslib/plugins/utils/entry-extractor.ts",
|
|
807
|
-
"releaseTag": "Public",
|
|
808
|
-
"isAbstract": false,
|
|
809
|
-
"name": "EntryExtractor",
|
|
810
|
-
"preserveMemberOrder": false,
|
|
811
|
-
"members": [
|
|
812
|
-
{
|
|
813
|
-
"kind": "Constructor",
|
|
814
|
-
"canonicalReference": "@savvy-web/rslib-builder!EntryExtractor:constructor(1)",
|
|
815
|
-
"docComment": "/**\n * Constructs a new instance of the `EntryExtractor` class\n */\n",
|
|
816
|
-
"excerptTokens": [
|
|
817
|
-
{
|
|
818
|
-
"kind": "Content",
|
|
819
|
-
"text": "constructor(options?: "
|
|
820
|
-
},
|
|
821
|
-
{
|
|
822
|
-
"kind": "Reference",
|
|
823
|
-
"text": "EntryExtractorOptions",
|
|
824
|
-
"canonicalReference": "@savvy-web/rslib-builder!EntryExtractorOptions:interface"
|
|
825
|
-
},
|
|
826
|
-
{
|
|
827
|
-
"kind": "Content",
|
|
828
|
-
"text": ");"
|
|
829
|
-
}
|
|
830
|
-
],
|
|
831
|
-
"releaseTag": "Public",
|
|
832
|
-
"isProtected": false,
|
|
833
|
-
"overloadIndex": 1,
|
|
834
|
-
"parameters": [
|
|
835
|
-
{
|
|
836
|
-
"parameterName": "options",
|
|
837
|
-
"parameterTypeTokenRange": {
|
|
838
|
-
"startIndex": 1,
|
|
839
|
-
"endIndex": 2
|
|
840
|
-
},
|
|
841
|
-
"isOptional": true
|
|
842
|
-
}
|
|
843
|
-
]
|
|
844
|
-
},
|
|
845
|
-
{
|
|
846
|
-
"kind": "Method",
|
|
847
|
-
"canonicalReference": "@savvy-web/rslib-builder!EntryExtractor#extract:member(1)",
|
|
848
|
-
"docComment": "/**\n * Extracts entry points from package.json exports and bin fields.\n *\n * @param packageJson - The package.json to extract entries from\n *\n * @returns Object containing the extracted entries\n */\n",
|
|
849
|
-
"excerptTokens": [
|
|
850
|
-
{
|
|
851
|
-
"kind": "Content",
|
|
852
|
-
"text": "extract(packageJson: "
|
|
853
|
-
},
|
|
854
|
-
{
|
|
855
|
-
"kind": "Reference",
|
|
856
|
-
"text": "PackageJson",
|
|
857
|
-
"canonicalReference": "type-fest!PackageJson:type"
|
|
858
|
-
},
|
|
859
|
-
{
|
|
860
|
-
"kind": "Content",
|
|
861
|
-
"text": "): "
|
|
862
|
-
},
|
|
863
|
-
{
|
|
864
|
-
"kind": "Reference",
|
|
865
|
-
"text": "ExtractedEntries",
|
|
866
|
-
"canonicalReference": "@savvy-web/rslib-builder!ExtractedEntries:interface"
|
|
867
|
-
},
|
|
868
|
-
{
|
|
869
|
-
"kind": "Content",
|
|
870
|
-
"text": ";"
|
|
871
|
-
}
|
|
872
|
-
],
|
|
873
|
-
"isStatic": false,
|
|
874
|
-
"returnTypeTokenRange": {
|
|
875
|
-
"startIndex": 3,
|
|
876
|
-
"endIndex": 4
|
|
877
|
-
},
|
|
878
|
-
"releaseTag": "Public",
|
|
879
|
-
"isProtected": false,
|
|
880
|
-
"overloadIndex": 1,
|
|
881
|
-
"parameters": [
|
|
882
|
-
{
|
|
883
|
-
"parameterName": "packageJson",
|
|
884
|
-
"parameterTypeTokenRange": {
|
|
885
|
-
"startIndex": 1,
|
|
886
|
-
"endIndex": 2
|
|
887
|
-
},
|
|
888
|
-
"isOptional": false
|
|
889
|
-
}
|
|
890
|
-
],
|
|
891
|
-
"isOptional": false,
|
|
892
|
-
"isAbstract": false,
|
|
893
|
-
"name": "extract"
|
|
894
|
-
}
|
|
895
|
-
],
|
|
896
|
-
"implementsTokenRanges": []
|
|
897
|
-
},
|
|
898
|
-
{
|
|
899
|
-
"kind": "Interface",
|
|
900
|
-
"canonicalReference": "@savvy-web/rslib-builder!EntryExtractorOptions:interface",
|
|
901
|
-
"docComment": "/**\n * Options for entry extraction.\n *\n * @public\n */\n",
|
|
902
|
-
"excerptTokens": [
|
|
903
|
-
{
|
|
904
|
-
"kind": "Content",
|
|
905
|
-
"text": "export interface EntryExtractorOptions "
|
|
906
|
-
}
|
|
907
|
-
],
|
|
908
|
-
"fileUrlPath": "src/rslib/plugins/utils/entry-extractor.ts",
|
|
909
|
-
"releaseTag": "Public",
|
|
910
|
-
"name": "EntryExtractorOptions",
|
|
911
|
-
"preserveMemberOrder": false,
|
|
912
|
-
"members": [
|
|
913
|
-
{
|
|
914
|
-
"kind": "PropertySignature",
|
|
915
|
-
"canonicalReference": "@savvy-web/rslib-builder!EntryExtractorOptions#exportsAsIndexes:member",
|
|
916
|
-
"docComment": "/**\n * When true, export paths create index files in nested directories. \"./foo/bar\" becomes \"foo/bar/index\" instead of \"foo-bar\".\n */\n",
|
|
917
|
-
"excerptTokens": [
|
|
918
|
-
{
|
|
919
|
-
"kind": "Content",
|
|
920
|
-
"text": "exportsAsIndexes?: "
|
|
921
|
-
},
|
|
922
|
-
{
|
|
923
|
-
"kind": "Content",
|
|
924
|
-
"text": "boolean"
|
|
925
|
-
},
|
|
926
|
-
{
|
|
927
|
-
"kind": "Content",
|
|
928
|
-
"text": ";"
|
|
929
|
-
}
|
|
930
|
-
],
|
|
931
|
-
"isReadonly": false,
|
|
932
|
-
"isOptional": true,
|
|
933
|
-
"releaseTag": "Public",
|
|
934
|
-
"name": "exportsAsIndexes",
|
|
935
|
-
"propertyTypeTokenRange": {
|
|
936
|
-
"startIndex": 1,
|
|
937
|
-
"endIndex": 2
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
],
|
|
941
|
-
"extendsTokenRanges": []
|
|
942
|
-
},
|
|
943
|
-
{
|
|
944
|
-
"kind": "Interface",
|
|
945
|
-
"canonicalReference": "@savvy-web/rslib-builder!ExtractedEntries:interface",
|
|
946
|
-
"docComment": "/**\n * Result of entry extraction.\n *\n * @public\n */\n",
|
|
947
|
-
"excerptTokens": [
|
|
948
|
-
{
|
|
949
|
-
"kind": "Content",
|
|
950
|
-
"text": "export interface ExtractedEntries "
|
|
951
|
-
}
|
|
952
|
-
],
|
|
953
|
-
"fileUrlPath": "src/rslib/plugins/utils/entry-extractor.ts",
|
|
954
|
-
"releaseTag": "Public",
|
|
955
|
-
"name": "ExtractedEntries",
|
|
956
|
-
"preserveMemberOrder": false,
|
|
957
|
-
"members": [
|
|
958
|
-
{
|
|
959
|
-
"kind": "PropertySignature",
|
|
960
|
-
"canonicalReference": "@savvy-web/rslib-builder!ExtractedEntries#entries:member",
|
|
961
|
-
"docComment": "/**\n * Entry name to TypeScript source path mapping.\n */\n",
|
|
962
|
-
"excerptTokens": [
|
|
963
|
-
{
|
|
964
|
-
"kind": "Content",
|
|
965
|
-
"text": "entries: "
|
|
966
|
-
},
|
|
967
|
-
{
|
|
968
|
-
"kind": "Reference",
|
|
969
|
-
"text": "Record",
|
|
970
|
-
"canonicalReference": "!Record:type"
|
|
971
|
-
},
|
|
972
|
-
{
|
|
973
|
-
"kind": "Content",
|
|
974
|
-
"text": "<string, string>"
|
|
975
|
-
},
|
|
976
|
-
{
|
|
977
|
-
"kind": "Content",
|
|
978
|
-
"text": ";"
|
|
979
|
-
}
|
|
980
|
-
],
|
|
981
|
-
"isReadonly": false,
|
|
982
|
-
"isOptional": false,
|
|
983
|
-
"releaseTag": "Public",
|
|
984
|
-
"name": "entries",
|
|
985
|
-
"propertyTypeTokenRange": {
|
|
986
|
-
"startIndex": 1,
|
|
987
|
-
"endIndex": 3
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
],
|
|
991
|
-
"extendsTokenRanges": []
|
|
992
|
-
},
|
|
993
|
-
{
|
|
994
|
-
"kind": "Function",
|
|
995
|
-
"canonicalReference": "@savvy-web/rslib-builder!FilesArrayPlugin:function(1)",
|
|
996
|
-
"docComment": "/**\n * Plugin to manage the files array in package.json Adds essential files like package.json, README.md, LICENSE and compiled outputs Other plugins can use api.useExposed(\"files-array\") to add additional files\n *\n * @public\n */\n",
|
|
997
|
-
"excerptTokens": [
|
|
998
|
-
{
|
|
999
|
-
"kind": "Content",
|
|
1000
|
-
"text": "FilesArrayPlugin: <TTarget extends "
|
|
1001
|
-
},
|
|
1002
|
-
{
|
|
1003
|
-
"kind": "Content",
|
|
1004
|
-
"text": "string"
|
|
1005
|
-
},
|
|
1006
|
-
{
|
|
1007
|
-
"kind": "Content",
|
|
1008
|
-
"text": " = "
|
|
1009
|
-
},
|
|
1010
|
-
{
|
|
1011
|
-
"kind": "Content",
|
|
1012
|
-
"text": "string"
|
|
1013
|
-
},
|
|
1014
|
-
{
|
|
1015
|
-
"kind": "Content",
|
|
1016
|
-
"text": ">(options?: "
|
|
1017
|
-
},
|
|
1018
|
-
{
|
|
1019
|
-
"kind": "Reference",
|
|
1020
|
-
"text": "FilesArrayPluginOptions",
|
|
1021
|
-
"canonicalReference": "@savvy-web/rslib-builder!FilesArrayPluginOptions:interface"
|
|
1022
|
-
},
|
|
1023
|
-
{
|
|
1024
|
-
"kind": "Content",
|
|
1025
|
-
"text": "<TTarget> | undefined"
|
|
1026
|
-
},
|
|
1027
|
-
{
|
|
1028
|
-
"kind": "Content",
|
|
1029
|
-
"text": ") => "
|
|
1030
|
-
},
|
|
1031
|
-
{
|
|
1032
|
-
"kind": "Reference",
|
|
1033
|
-
"text": "RsbuildPlugin",
|
|
1034
|
-
"canonicalReference": "@rsbuild/core!RsbuildPlugin:type"
|
|
1035
|
-
}
|
|
1036
|
-
],
|
|
1037
|
-
"fileUrlPath": "src/rslib/plugins/files-array-plugin.ts",
|
|
1038
|
-
"returnTypeTokenRange": {
|
|
1039
|
-
"startIndex": 8,
|
|
1040
|
-
"endIndex": 9
|
|
1041
|
-
},
|
|
1042
|
-
"releaseTag": "Public",
|
|
1043
|
-
"overloadIndex": 1,
|
|
1044
|
-
"parameters": [
|
|
1045
|
-
{
|
|
1046
|
-
"parameterName": "options",
|
|
1047
|
-
"parameterTypeTokenRange": {
|
|
1048
|
-
"startIndex": 5,
|
|
1049
|
-
"endIndex": 7
|
|
1050
|
-
},
|
|
1051
|
-
"isOptional": true
|
|
1052
|
-
}
|
|
1053
|
-
],
|
|
1054
|
-
"typeParameters": [
|
|
1055
|
-
{
|
|
1056
|
-
"typeParameterName": "TTarget",
|
|
1057
|
-
"constraintTokenRange": {
|
|
1058
|
-
"startIndex": 1,
|
|
1059
|
-
"endIndex": 2
|
|
1060
|
-
},
|
|
1061
|
-
"defaultTypeTokenRange": {
|
|
1062
|
-
"startIndex": 3,
|
|
1063
|
-
"endIndex": 4
|
|
1064
|
-
}
|
|
1065
|
-
}
|
|
1066
|
-
],
|
|
1067
|
-
"name": "FilesArrayPlugin"
|
|
1068
|
-
},
|
|
1069
|
-
{
|
|
1070
|
-
"kind": "Interface",
|
|
1071
|
-
"canonicalReference": "@savvy-web/rslib-builder!FilesArrayPluginOptions:interface",
|
|
1072
|
-
"docComment": "/**\n * @public\n */\n",
|
|
1073
|
-
"excerptTokens": [
|
|
1074
|
-
{
|
|
1075
|
-
"kind": "Content",
|
|
1076
|
-
"text": "export interface FilesArrayPluginOptions<TTarget extends "
|
|
1077
|
-
},
|
|
1078
|
-
{
|
|
1079
|
-
"kind": "Content",
|
|
1080
|
-
"text": "string"
|
|
1081
|
-
},
|
|
1082
|
-
{
|
|
1083
|
-
"kind": "Content",
|
|
1084
|
-
"text": " = "
|
|
1085
|
-
},
|
|
1086
|
-
{
|
|
1087
|
-
"kind": "Content",
|
|
1088
|
-
"text": "string"
|
|
1089
|
-
},
|
|
1090
|
-
{
|
|
1091
|
-
"kind": "Content",
|
|
1092
|
-
"text": "> "
|
|
1093
|
-
}
|
|
1094
|
-
],
|
|
1095
|
-
"fileUrlPath": "src/rslib/plugins/files-array-plugin.ts",
|
|
1096
|
-
"releaseTag": "Public",
|
|
1097
|
-
"typeParameters": [
|
|
1098
|
-
{
|
|
1099
|
-
"typeParameterName": "TTarget",
|
|
1100
|
-
"constraintTokenRange": {
|
|
1101
|
-
"startIndex": 1,
|
|
1102
|
-
"endIndex": 2
|
|
1103
|
-
},
|
|
1104
|
-
"defaultTypeTokenRange": {
|
|
1105
|
-
"startIndex": 3,
|
|
1106
|
-
"endIndex": 4
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
],
|
|
1110
|
-
"name": "FilesArrayPluginOptions",
|
|
1111
|
-
"preserveMemberOrder": false,
|
|
1112
|
-
"members": [
|
|
1113
|
-
{
|
|
1114
|
-
"kind": "PropertySignature",
|
|
1115
|
-
"canonicalReference": "@savvy-web/rslib-builder!FilesArrayPluginOptions#target:member",
|
|
1116
|
-
"docComment": "/**\n * Build target (dev/npm/jsr)\n */\n",
|
|
1117
|
-
"excerptTokens": [
|
|
1118
|
-
{
|
|
1119
|
-
"kind": "Content",
|
|
1120
|
-
"text": "target: "
|
|
1121
|
-
},
|
|
1122
|
-
{
|
|
1123
|
-
"kind": "Content",
|
|
1124
|
-
"text": "TTarget"
|
|
1125
|
-
},
|
|
1126
|
-
{
|
|
1127
|
-
"kind": "Content",
|
|
1128
|
-
"text": ";"
|
|
1129
|
-
}
|
|
1130
|
-
],
|
|
1131
|
-
"isReadonly": false,
|
|
1132
|
-
"isOptional": false,
|
|
1133
|
-
"releaseTag": "Public",
|
|
1134
|
-
"name": "target",
|
|
1135
|
-
"propertyTypeTokenRange": {
|
|
1136
|
-
"startIndex": 1,
|
|
1137
|
-
"endIndex": 2
|
|
1138
|
-
}
|
|
1139
|
-
},
|
|
1140
|
-
{
|
|
1141
|
-
"kind": "PropertySignature",
|
|
1142
|
-
"canonicalReference": "@savvy-web/rslib-builder!FilesArrayPluginOptions#transformFiles:member",
|
|
1143
|
-
"docComment": "/**\n * Optional callback to transform files after they're built but before the files array is finalized. Called in the additional stage, after all assets are created.\n */\n",
|
|
1144
|
-
"excerptTokens": [
|
|
1145
|
-
{
|
|
1146
|
-
"kind": "Content",
|
|
1147
|
-
"text": "transformFiles?: "
|
|
1148
|
-
},
|
|
1149
|
-
{
|
|
1150
|
-
"kind": "Content",
|
|
1151
|
-
"text": "(context: {\n compilation: {\n assets: "
|
|
1152
|
-
},
|
|
1153
|
-
{
|
|
1154
|
-
"kind": "Reference",
|
|
1155
|
-
"text": "Record",
|
|
1156
|
-
"canonicalReference": "!Record:type"
|
|
1157
|
-
},
|
|
1158
|
-
{
|
|
1159
|
-
"kind": "Content",
|
|
1160
|
-
"text": "<string, unknown>;\n };\n filesArray: "
|
|
1161
|
-
},
|
|
1162
|
-
{
|
|
1163
|
-
"kind": "Reference",
|
|
1164
|
-
"text": "Set",
|
|
1165
|
-
"canonicalReference": "!Set:interface"
|
|
1166
|
-
},
|
|
1167
|
-
{
|
|
1168
|
-
"kind": "Content",
|
|
1169
|
-
"text": "<string>;\n target: TTarget;\n }) => void | "
|
|
1170
|
-
},
|
|
1171
|
-
{
|
|
1172
|
-
"kind": "Reference",
|
|
1173
|
-
"text": "Promise",
|
|
1174
|
-
"canonicalReference": "!Promise:interface"
|
|
1175
|
-
},
|
|
1176
|
-
{
|
|
1177
|
-
"kind": "Content",
|
|
1178
|
-
"text": "<void>"
|
|
1179
|
-
},
|
|
1180
|
-
{
|
|
1181
|
-
"kind": "Content",
|
|
1182
|
-
"text": ";"
|
|
1183
|
-
}
|
|
1184
|
-
],
|
|
1185
|
-
"isReadonly": false,
|
|
1186
|
-
"isOptional": true,
|
|
1187
|
-
"releaseTag": "Public",
|
|
1188
|
-
"name": "transformFiles",
|
|
1189
|
-
"propertyTypeTokenRange": {
|
|
1190
|
-
"startIndex": 1,
|
|
1191
|
-
"endIndex": 8
|
|
1192
|
-
}
|
|
1193
|
-
}
|
|
1194
|
-
],
|
|
1195
|
-
"extendsTokenRanges": []
|
|
1196
|
-
},
|
|
1197
|
-
{
|
|
1198
|
-
"kind": "Function",
|
|
1199
|
-
"canonicalReference": "@savvy-web/rslib-builder!generateTsgoArgs:function(1)",
|
|
1200
|
-
"docComment": "/**\n * Generates command-line arguments for tsgo.\n *\n * @public\n */\n",
|
|
1201
|
-
"excerptTokens": [
|
|
1202
|
-
{
|
|
1203
|
-
"kind": "Content",
|
|
1204
|
-
"text": "export declare function generateTsgoArgs(options: "
|
|
1205
|
-
},
|
|
1206
|
-
{
|
|
1207
|
-
"kind": "Content",
|
|
1208
|
-
"text": "{\n configPath: string;\n declarationDir: string;\n rootDir?: string;\n tsBuildInfoFile?: string;\n}"
|
|
1209
|
-
},
|
|
1210
|
-
{
|
|
1211
|
-
"kind": "Content",
|
|
1212
|
-
"text": "): "
|
|
1213
|
-
},
|
|
1214
|
-
{
|
|
1215
|
-
"kind": "Content",
|
|
1216
|
-
"text": "string[]"
|
|
1217
|
-
},
|
|
1218
|
-
{
|
|
1219
|
-
"kind": "Content",
|
|
1220
|
-
"text": ";"
|
|
1221
|
-
}
|
|
1222
|
-
],
|
|
1223
|
-
"fileUrlPath": "src/rslib/plugins/dts-plugin.ts",
|
|
1224
|
-
"returnTypeTokenRange": {
|
|
1225
|
-
"startIndex": 3,
|
|
1226
|
-
"endIndex": 4
|
|
1227
|
-
},
|
|
1228
|
-
"releaseTag": "Public",
|
|
1229
|
-
"overloadIndex": 1,
|
|
1230
|
-
"parameters": [
|
|
1231
|
-
{
|
|
1232
|
-
"parameterName": "options",
|
|
1233
|
-
"parameterTypeTokenRange": {
|
|
1234
|
-
"startIndex": 1,
|
|
1235
|
-
"endIndex": 2
|
|
1236
|
-
},
|
|
1237
|
-
"isOptional": false
|
|
1238
|
-
}
|
|
1239
|
-
],
|
|
1240
|
-
"name": "generateTsgoArgs"
|
|
1241
|
-
},
|
|
1242
|
-
{
|
|
1243
|
-
"kind": "Class",
|
|
1244
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilder:class",
|
|
1245
|
-
"docComment": "/**\n * Node library builder class\n *\n * @public\n */\n",
|
|
1246
|
-
"excerptTokens": [
|
|
1247
|
-
{
|
|
1248
|
-
"kind": "Content",
|
|
1249
|
-
"text": "export declare class NodeLibraryBuilder "
|
|
1250
|
-
}
|
|
1251
|
-
],
|
|
1252
|
-
"fileUrlPath": "src/rslib/builders/node-library-builder.ts",
|
|
1253
|
-
"releaseTag": "Public",
|
|
1254
|
-
"isAbstract": false,
|
|
1255
|
-
"name": "NodeLibraryBuilder",
|
|
1256
|
-
"preserveMemberOrder": false,
|
|
1257
|
-
"members": [
|
|
1258
|
-
{
|
|
1259
|
-
"kind": "Method",
|
|
1260
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilder.create:member(1)",
|
|
1261
|
-
"docComment": "/**\n * Creates an async RSLib configuration function that determines build target from envMode. This provides a clean API where users don't need to handle environment logic.\n */\n",
|
|
1262
|
-
"excerptTokens": [
|
|
1263
|
-
{
|
|
1264
|
-
"kind": "Content",
|
|
1265
|
-
"text": "static create(options?: "
|
|
1266
|
-
},
|
|
1267
|
-
{
|
|
1268
|
-
"kind": "Reference",
|
|
1269
|
-
"text": "Partial",
|
|
1270
|
-
"canonicalReference": "!Partial:type"
|
|
1271
|
-
},
|
|
1272
|
-
{
|
|
1273
|
-
"kind": "Content",
|
|
1274
|
-
"text": "<"
|
|
1275
|
-
},
|
|
1276
|
-
{
|
|
1277
|
-
"kind": "Reference",
|
|
1278
|
-
"text": "NodeLibraryBuilderOptions",
|
|
1279
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilderOptions:interface"
|
|
1280
|
-
},
|
|
1281
|
-
{
|
|
1282
|
-
"kind": "Content",
|
|
1283
|
-
"text": ">"
|
|
1284
|
-
},
|
|
1285
|
-
{
|
|
1286
|
-
"kind": "Content",
|
|
1287
|
-
"text": "): "
|
|
1288
|
-
},
|
|
1289
|
-
{
|
|
1290
|
-
"kind": "Reference",
|
|
1291
|
-
"text": "RslibConfigAsyncFn",
|
|
1292
|
-
"canonicalReference": "@savvy-web/rslib-builder!RslibConfigAsyncFn:type"
|
|
1293
|
-
},
|
|
1294
|
-
{
|
|
1295
|
-
"kind": "Content",
|
|
1296
|
-
"text": ";"
|
|
1297
|
-
}
|
|
1298
|
-
],
|
|
1299
|
-
"isStatic": true,
|
|
1300
|
-
"returnTypeTokenRange": {
|
|
1301
|
-
"startIndex": 6,
|
|
1302
|
-
"endIndex": 7
|
|
1303
|
-
},
|
|
1304
|
-
"releaseTag": "Public",
|
|
1305
|
-
"isProtected": false,
|
|
1306
|
-
"overloadIndex": 1,
|
|
1307
|
-
"parameters": [
|
|
1308
|
-
{
|
|
1309
|
-
"parameterName": "options",
|
|
1310
|
-
"parameterTypeTokenRange": {
|
|
1311
|
-
"startIndex": 1,
|
|
1312
|
-
"endIndex": 5
|
|
1313
|
-
},
|
|
1314
|
-
"isOptional": true
|
|
1315
|
-
}
|
|
1316
|
-
],
|
|
1317
|
-
"isOptional": false,
|
|
1318
|
-
"isAbstract": false,
|
|
1319
|
-
"name": "create"
|
|
1320
|
-
},
|
|
1321
|
-
{
|
|
1322
|
-
"kind": "Method",
|
|
1323
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilder.createSingleTarget:member(1)",
|
|
1324
|
-
"docComment": "/**\n * Creates a single-target build configuration. This allows proper plugin isolation per build target.\n */\n",
|
|
1325
|
-
"excerptTokens": [
|
|
1326
|
-
{
|
|
1327
|
-
"kind": "Content",
|
|
1328
|
-
"text": "static createSingleTarget(target: "
|
|
1329
|
-
},
|
|
1330
|
-
{
|
|
1331
|
-
"kind": "Reference",
|
|
1332
|
-
"text": "BuildTarget",
|
|
1333
|
-
"canonicalReference": "@savvy-web/rslib-builder!BuildTarget:type"
|
|
1334
|
-
},
|
|
1335
|
-
{
|
|
1336
|
-
"kind": "Content",
|
|
1337
|
-
"text": ", opts: "
|
|
1338
|
-
},
|
|
1339
|
-
{
|
|
1340
|
-
"kind": "Reference",
|
|
1341
|
-
"text": "NodeLibraryBuilderOptions",
|
|
1342
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilderOptions:interface"
|
|
1343
|
-
},
|
|
1344
|
-
{
|
|
1345
|
-
"kind": "Content",
|
|
1346
|
-
"text": "): "
|
|
1347
|
-
},
|
|
1348
|
-
{
|
|
1349
|
-
"kind": "Reference",
|
|
1350
|
-
"text": "Promise",
|
|
1351
|
-
"canonicalReference": "!Promise:interface"
|
|
1352
|
-
},
|
|
1353
|
-
{
|
|
1354
|
-
"kind": "Content",
|
|
1355
|
-
"text": "<"
|
|
1356
|
-
},
|
|
1357
|
-
{
|
|
1358
|
-
"kind": "Reference",
|
|
1359
|
-
"text": "RslibConfig",
|
|
1360
|
-
"canonicalReference": "@rslib/core!RslibConfig:interface"
|
|
1361
|
-
},
|
|
1362
|
-
{
|
|
1363
|
-
"kind": "Content",
|
|
1364
|
-
"text": ">"
|
|
1365
|
-
},
|
|
1366
|
-
{
|
|
1367
|
-
"kind": "Content",
|
|
1368
|
-
"text": ";"
|
|
1369
|
-
}
|
|
1370
|
-
],
|
|
1371
|
-
"isStatic": true,
|
|
1372
|
-
"returnTypeTokenRange": {
|
|
1373
|
-
"startIndex": 5,
|
|
1374
|
-
"endIndex": 9
|
|
1375
|
-
},
|
|
1376
|
-
"releaseTag": "Public",
|
|
1377
|
-
"isProtected": false,
|
|
1378
|
-
"overloadIndex": 1,
|
|
1379
|
-
"parameters": [
|
|
1380
|
-
{
|
|
1381
|
-
"parameterName": "target",
|
|
1382
|
-
"parameterTypeTokenRange": {
|
|
1383
|
-
"startIndex": 1,
|
|
1384
|
-
"endIndex": 2
|
|
1385
|
-
},
|
|
1386
|
-
"isOptional": false
|
|
1387
|
-
},
|
|
1388
|
-
{
|
|
1389
|
-
"parameterName": "opts",
|
|
1390
|
-
"parameterTypeTokenRange": {
|
|
1391
|
-
"startIndex": 3,
|
|
1392
|
-
"endIndex": 4
|
|
1393
|
-
},
|
|
1394
|
-
"isOptional": false
|
|
1395
|
-
}
|
|
1396
|
-
],
|
|
1397
|
-
"isOptional": false,
|
|
1398
|
-
"isAbstract": false,
|
|
1399
|
-
"name": "createSingleTarget"
|
|
1400
|
-
},
|
|
1401
|
-
{
|
|
1402
|
-
"kind": "Property",
|
|
1403
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilder.DEFAULT_OPTIONS:member",
|
|
1404
|
-
"docComment": "",
|
|
1405
|
-
"excerptTokens": [
|
|
1406
|
-
{
|
|
1407
|
-
"kind": "Content",
|
|
1408
|
-
"text": "static DEFAULT_OPTIONS: "
|
|
1409
|
-
},
|
|
1410
|
-
{
|
|
1411
|
-
"kind": "Reference",
|
|
1412
|
-
"text": "NodeLibraryBuilderOptions",
|
|
1413
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilderOptions:interface"
|
|
1414
|
-
},
|
|
1415
|
-
{
|
|
1416
|
-
"kind": "Content",
|
|
1417
|
-
"text": ";"
|
|
1418
|
-
}
|
|
1419
|
-
],
|
|
1420
|
-
"isReadonly": false,
|
|
1421
|
-
"isOptional": false,
|
|
1422
|
-
"releaseTag": "Public",
|
|
1423
|
-
"name": "DEFAULT_OPTIONS",
|
|
1424
|
-
"propertyTypeTokenRange": {
|
|
1425
|
-
"startIndex": 1,
|
|
1426
|
-
"endIndex": 2
|
|
1427
|
-
},
|
|
1428
|
-
"isStatic": true,
|
|
1429
|
-
"isProtected": false,
|
|
1430
|
-
"isAbstract": false
|
|
1431
|
-
},
|
|
1432
|
-
{
|
|
1433
|
-
"kind": "Method",
|
|
1434
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilder.mergeOptions:member(1)",
|
|
1435
|
-
"docComment": "",
|
|
1436
|
-
"excerptTokens": [
|
|
1437
|
-
{
|
|
1438
|
-
"kind": "Content",
|
|
1439
|
-
"text": "static mergeOptions(options?: "
|
|
1440
|
-
},
|
|
1441
|
-
{
|
|
1442
|
-
"kind": "Reference",
|
|
1443
|
-
"text": "Partial",
|
|
1444
|
-
"canonicalReference": "!Partial:type"
|
|
1445
|
-
},
|
|
1446
|
-
{
|
|
1447
|
-
"kind": "Content",
|
|
1448
|
-
"text": "<"
|
|
1449
|
-
},
|
|
1450
|
-
{
|
|
1451
|
-
"kind": "Reference",
|
|
1452
|
-
"text": "NodeLibraryBuilderOptions",
|
|
1453
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilderOptions:interface"
|
|
1454
|
-
},
|
|
1455
|
-
{
|
|
1456
|
-
"kind": "Content",
|
|
1457
|
-
"text": ">"
|
|
1458
|
-
},
|
|
1459
|
-
{
|
|
1460
|
-
"kind": "Content",
|
|
1461
|
-
"text": "): "
|
|
1462
|
-
},
|
|
1463
|
-
{
|
|
1464
|
-
"kind": "Reference",
|
|
1465
|
-
"text": "NodeLibraryBuilderOptions",
|
|
1466
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilderOptions:interface"
|
|
1467
|
-
},
|
|
1468
|
-
{
|
|
1469
|
-
"kind": "Content",
|
|
1470
|
-
"text": ";"
|
|
1471
|
-
}
|
|
1472
|
-
],
|
|
1473
|
-
"isStatic": true,
|
|
1474
|
-
"returnTypeTokenRange": {
|
|
1475
|
-
"startIndex": 6,
|
|
1476
|
-
"endIndex": 7
|
|
1477
|
-
},
|
|
1478
|
-
"releaseTag": "Public",
|
|
1479
|
-
"isProtected": false,
|
|
1480
|
-
"overloadIndex": 1,
|
|
1481
|
-
"parameters": [
|
|
1482
|
-
{
|
|
1483
|
-
"parameterName": "options",
|
|
1484
|
-
"parameterTypeTokenRange": {
|
|
1485
|
-
"startIndex": 1,
|
|
1486
|
-
"endIndex": 5
|
|
1487
|
-
},
|
|
1488
|
-
"isOptional": true
|
|
1489
|
-
}
|
|
1490
|
-
],
|
|
1491
|
-
"isOptional": false,
|
|
1492
|
-
"isAbstract": false,
|
|
1493
|
-
"name": "mergeOptions"
|
|
1494
|
-
}
|
|
1495
|
-
],
|
|
1496
|
-
"implementsTokenRanges": []
|
|
1497
|
-
},
|
|
1498
|
-
{
|
|
1499
|
-
"kind": "Interface",
|
|
1500
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilderOptions:interface",
|
|
1501
|
-
"docComment": "/**\n * @public\n */\n",
|
|
1502
|
-
"excerptTokens": [
|
|
1503
|
-
{
|
|
1504
|
-
"kind": "Content",
|
|
1505
|
-
"text": "export interface NodeLibraryBuilderOptions "
|
|
1506
|
-
}
|
|
1507
|
-
],
|
|
1508
|
-
"fileUrlPath": "src/rslib/builders/node-library-builder.ts",
|
|
1509
|
-
"releaseTag": "Public",
|
|
1510
|
-
"name": "NodeLibraryBuilderOptions",
|
|
1511
|
-
"preserveMemberOrder": false,
|
|
1512
|
-
"members": [
|
|
1513
|
-
{
|
|
1514
|
-
"kind": "PropertySignature",
|
|
1515
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilderOptions#apiModel:member",
|
|
1516
|
-
"docComment": "/**\n * Options for API model generation. When enabled, generates an api.model.json file in the dist directory. Only applies when target is \"npm\".\n *\n * @remarks\n *\n * The generated api.model.json file contains the full API documentation in a machine-readable format for use by documentation generators. A .npmignore file is also generated to exclude the API model from npm publish.\n *\n * @example\n * ```typescript\n * // Enable API model generation with defaults\n * NodeLibraryBuilder.create({\n * apiModel: true,\n * })\n *\n * // Enable with custom filename\n * NodeLibraryBuilder.create({\n * apiModel: {\n * enabled: true,\n * filename: \"my-package.api.json\",\n * },\n * })\n * ```\n *\n */\n",
|
|
1517
|
-
"excerptTokens": [
|
|
1518
|
-
{
|
|
1519
|
-
"kind": "Content",
|
|
1520
|
-
"text": "apiModel?: "
|
|
1521
|
-
},
|
|
1522
|
-
{
|
|
1523
|
-
"kind": "Reference",
|
|
1524
|
-
"text": "ApiModelOptions",
|
|
1525
|
-
"canonicalReference": "@savvy-web/rslib-builder!ApiModelOptions:interface"
|
|
1526
|
-
},
|
|
1527
|
-
{
|
|
1528
|
-
"kind": "Content",
|
|
1529
|
-
"text": " | boolean"
|
|
1530
|
-
},
|
|
1531
|
-
{
|
|
1532
|
-
"kind": "Content",
|
|
1533
|
-
"text": ";"
|
|
1534
|
-
}
|
|
1535
|
-
],
|
|
1536
|
-
"isReadonly": false,
|
|
1537
|
-
"isOptional": true,
|
|
1538
|
-
"releaseTag": "Public",
|
|
1539
|
-
"name": "apiModel",
|
|
1540
|
-
"propertyTypeTokenRange": {
|
|
1541
|
-
"startIndex": 1,
|
|
1542
|
-
"endIndex": 3
|
|
1543
|
-
}
|
|
1544
|
-
},
|
|
1545
|
-
{
|
|
1546
|
-
"kind": "PropertySignature",
|
|
1547
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilderOptions#copyPatterns:member",
|
|
1548
|
-
"docComment": "",
|
|
1549
|
-
"excerptTokens": [
|
|
1550
|
-
{
|
|
1551
|
-
"kind": "Content",
|
|
1552
|
-
"text": "copyPatterns: "
|
|
1553
|
-
},
|
|
1554
|
-
{
|
|
1555
|
-
"kind": "Content",
|
|
1556
|
-
"text": "(string | ("
|
|
1557
|
-
},
|
|
1558
|
-
{
|
|
1559
|
-
"kind": "Reference",
|
|
1560
|
-
"text": "Pick",
|
|
1561
|
-
"canonicalReference": "!Pick:type"
|
|
1562
|
-
},
|
|
1563
|
-
{
|
|
1564
|
-
"kind": "Content",
|
|
1565
|
-
"text": "<"
|
|
1566
|
-
},
|
|
1567
|
-
{
|
|
1568
|
-
"kind": "Reference",
|
|
1569
|
-
"text": "RawCopyPattern",
|
|
1570
|
-
"canonicalReference": "@rspack/binding!RawCopyPattern:interface"
|
|
1571
|
-
},
|
|
1572
|
-
{
|
|
1573
|
-
"kind": "Content",
|
|
1574
|
-
"text": ", \"from\"> & "
|
|
1575
|
-
},
|
|
1576
|
-
{
|
|
1577
|
-
"kind": "Reference",
|
|
1578
|
-
"text": "Partial",
|
|
1579
|
-
"canonicalReference": "!Partial:type"
|
|
1580
|
-
},
|
|
1581
|
-
{
|
|
1582
|
-
"kind": "Content",
|
|
1583
|
-
"text": "<"
|
|
1584
|
-
},
|
|
1585
|
-
{
|
|
1586
|
-
"kind": "Reference",
|
|
1587
|
-
"text": "Omit",
|
|
1588
|
-
"canonicalReference": "!Omit:type"
|
|
1589
|
-
},
|
|
1590
|
-
{
|
|
1591
|
-
"kind": "Content",
|
|
1592
|
-
"text": "<"
|
|
1593
|
-
},
|
|
1594
|
-
{
|
|
1595
|
-
"kind": "Reference",
|
|
1596
|
-
"text": "RawCopyPattern",
|
|
1597
|
-
"canonicalReference": "@rspack/binding!RawCopyPattern:interface"
|
|
1598
|
-
},
|
|
1599
|
-
{
|
|
1600
|
-
"kind": "Content",
|
|
1601
|
-
"text": ", \"from\">>))[]"
|
|
1602
|
-
},
|
|
1603
|
-
{
|
|
1604
|
-
"kind": "Content",
|
|
1605
|
-
"text": ";"
|
|
1606
|
-
}
|
|
1607
|
-
],
|
|
1608
|
-
"isReadonly": false,
|
|
1609
|
-
"isOptional": false,
|
|
1610
|
-
"releaseTag": "Public",
|
|
1611
|
-
"name": "copyPatterns",
|
|
1612
|
-
"propertyTypeTokenRange": {
|
|
1613
|
-
"startIndex": 1,
|
|
1614
|
-
"endIndex": 12
|
|
1615
|
-
}
|
|
1616
|
-
},
|
|
1617
|
-
{
|
|
1618
|
-
"kind": "PropertySignature",
|
|
1619
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilderOptions#define:member",
|
|
1620
|
-
"docComment": "",
|
|
1621
|
-
"excerptTokens": [
|
|
1622
|
-
{
|
|
1623
|
-
"kind": "Content",
|
|
1624
|
-
"text": "define: "
|
|
1625
|
-
},
|
|
1626
|
-
{
|
|
1627
|
-
"kind": "Reference",
|
|
1628
|
-
"text": "SourceConfig",
|
|
1629
|
-
"canonicalReference": "@rsbuild/core!SourceConfig:interface"
|
|
1630
|
-
},
|
|
1631
|
-
{
|
|
1632
|
-
"kind": "Content",
|
|
1633
|
-
"text": "[\"define\"]"
|
|
1634
|
-
},
|
|
1635
|
-
{
|
|
1636
|
-
"kind": "Content",
|
|
1637
|
-
"text": ";"
|
|
1638
|
-
}
|
|
1639
|
-
],
|
|
1640
|
-
"isReadonly": false,
|
|
1641
|
-
"isOptional": false,
|
|
1642
|
-
"releaseTag": "Public",
|
|
1643
|
-
"name": "define",
|
|
1644
|
-
"propertyTypeTokenRange": {
|
|
1645
|
-
"startIndex": 1,
|
|
1646
|
-
"endIndex": 3
|
|
1647
|
-
}
|
|
1648
|
-
},
|
|
1649
|
-
{
|
|
1650
|
-
"kind": "PropertySignature",
|
|
1651
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilderOptions#dtsBundledPackages:member",
|
|
1652
|
-
"docComment": "/**\n * Packages whose type declarations should be bundled into the output .d.ts files.\n *\n * @remarks\n *\n * By default, RSlib bundles types from packages in package.json. Use this to explicitly specify which packages (including transitive dependencies) should have their types bundled. This is particularly useful for ensuring devDependencies are fully inlined without external imports.\n *\n * Supports minimatch patterns (e.g., '@pnpm/**', 'picocolors')\n *\n * @example\n * ```typescript\n * NodeLibraryBuilder.create({\n * dtsBundledPackages: ['@pnpm/lockfile.types', '@pnpm/types', 'picocolors']\n * })\n * ```\n *\n */\n",
|
|
1653
|
-
"excerptTokens": [
|
|
1654
|
-
{
|
|
1655
|
-
"kind": "Content",
|
|
1656
|
-
"text": "dtsBundledPackages?: "
|
|
1657
|
-
},
|
|
1658
|
-
{
|
|
1659
|
-
"kind": "Content",
|
|
1660
|
-
"text": "string[]"
|
|
1661
|
-
},
|
|
1662
|
-
{
|
|
1663
|
-
"kind": "Content",
|
|
1664
|
-
"text": ";"
|
|
1665
|
-
}
|
|
1666
|
-
],
|
|
1667
|
-
"isReadonly": false,
|
|
1668
|
-
"isOptional": true,
|
|
1669
|
-
"releaseTag": "Public",
|
|
1670
|
-
"name": "dtsBundledPackages",
|
|
1671
|
-
"propertyTypeTokenRange": {
|
|
1672
|
-
"startIndex": 1,
|
|
1673
|
-
"endIndex": 2
|
|
1674
|
-
}
|
|
1675
|
-
},
|
|
1676
|
-
{
|
|
1677
|
-
"kind": "PropertySignature",
|
|
1678
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilderOptions#entry:member",
|
|
1679
|
-
"docComment": "/**\n * Override entry points (optional - will auto-detect from package.json)\n */\n",
|
|
1680
|
-
"excerptTokens": [
|
|
1681
|
-
{
|
|
1682
|
-
"kind": "Content",
|
|
1683
|
-
"text": "entry?: "
|
|
1684
|
-
},
|
|
1685
|
-
{
|
|
1686
|
-
"kind": "Reference",
|
|
1687
|
-
"text": "Record",
|
|
1688
|
-
"canonicalReference": "!Record:type"
|
|
1689
|
-
},
|
|
1690
|
-
{
|
|
1691
|
-
"kind": "Content",
|
|
1692
|
-
"text": "<string, string | string[]>"
|
|
1693
|
-
},
|
|
1694
|
-
{
|
|
1695
|
-
"kind": "Content",
|
|
1696
|
-
"text": ";"
|
|
1697
|
-
}
|
|
1698
|
-
],
|
|
1699
|
-
"isReadonly": false,
|
|
1700
|
-
"isOptional": true,
|
|
1701
|
-
"releaseTag": "Public",
|
|
1702
|
-
"name": "entry",
|
|
1703
|
-
"propertyTypeTokenRange": {
|
|
1704
|
-
"startIndex": 1,
|
|
1705
|
-
"endIndex": 3
|
|
1706
|
-
}
|
|
1707
|
-
},
|
|
1708
|
-
{
|
|
1709
|
-
"kind": "PropertySignature",
|
|
1710
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilderOptions#exportsAsIndexes:member",
|
|
1711
|
-
"docComment": "/**\n * When enabled, each export path will generate an index.js file in a directory structure matching the export path, rather than using the export name as the filename.\n *\n * @example\n *\n * When `exportsAsIndexes` is `true`, given this package.json configuration:\n * ```json\n * {\n * \"exports\": {\n * \".\": \"./src/entrypoint.ts\",\n * \"./foo/bar\": \"./src/foo/bar.ts\",\n * \"./foo/baz\": \"./src/foo/baz.ts\"\n * }\n * }\n * ```\n *\n * You would get this output file structure:\n * ```\n * dist/\n * index.js\n * foo/\n * bar/\n * index.js\n * baz/\n * index.js\n * ```\n *\n */\n",
|
|
1712
|
-
"excerptTokens": [
|
|
1713
|
-
{
|
|
1714
|
-
"kind": "Content",
|
|
1715
|
-
"text": "exportsAsIndexes?: "
|
|
1716
|
-
},
|
|
1717
|
-
{
|
|
1718
|
-
"kind": "Content",
|
|
1719
|
-
"text": "boolean"
|
|
1720
|
-
},
|
|
1721
|
-
{
|
|
1722
|
-
"kind": "Content",
|
|
1723
|
-
"text": ";"
|
|
1724
|
-
}
|
|
1725
|
-
],
|
|
1726
|
-
"isReadonly": false,
|
|
1727
|
-
"isOptional": true,
|
|
1728
|
-
"releaseTag": "Public",
|
|
1729
|
-
"name": "exportsAsIndexes",
|
|
1730
|
-
"propertyTypeTokenRange": {
|
|
1731
|
-
"startIndex": 1,
|
|
1732
|
-
"endIndex": 2
|
|
1733
|
-
}
|
|
1734
|
-
},
|
|
1735
|
-
{
|
|
1736
|
-
"kind": "PropertySignature",
|
|
1737
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilderOptions#externals:member",
|
|
1738
|
-
"docComment": "/**\n * External dependencies that should not be bundled. These modules will be imported at runtime instead of being included in the bundle.\n *\n * @remarks\n *\n * This is useful for dependencies that are in devDependencies but needed at runtime, such as build tools that the package uses to build other packages.\n *\n * @example\n * ```typescript\n * NodeLibraryBuilder.create({\n * externals: ['@rslib/core', '@rsbuild/core']\n * })\n * ```\n *\n */\n",
|
|
1739
|
-
"excerptTokens": [
|
|
1740
|
-
{
|
|
1741
|
-
"kind": "Content",
|
|
1742
|
-
"text": "externals?: "
|
|
1743
|
-
},
|
|
1744
|
-
{
|
|
1745
|
-
"kind": "Content",
|
|
1746
|
-
"text": "(string | "
|
|
1747
|
-
},
|
|
1748
|
-
{
|
|
1749
|
-
"kind": "Reference",
|
|
1750
|
-
"text": "RegExp",
|
|
1751
|
-
"canonicalReference": "!RegExp:interface"
|
|
1752
|
-
},
|
|
1753
|
-
{
|
|
1754
|
-
"kind": "Content",
|
|
1755
|
-
"text": ")[]"
|
|
1756
|
-
},
|
|
1757
|
-
{
|
|
1758
|
-
"kind": "Content",
|
|
1759
|
-
"text": ";"
|
|
1760
|
-
}
|
|
1761
|
-
],
|
|
1762
|
-
"isReadonly": false,
|
|
1763
|
-
"isOptional": true,
|
|
1764
|
-
"releaseTag": "Public",
|
|
1765
|
-
"name": "externals",
|
|
1766
|
-
"propertyTypeTokenRange": {
|
|
1767
|
-
"startIndex": 1,
|
|
1768
|
-
"endIndex": 4
|
|
1769
|
-
}
|
|
1770
|
-
},
|
|
1771
|
-
{
|
|
1772
|
-
"kind": "PropertySignature",
|
|
1773
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilderOptions#plugins:member",
|
|
1774
|
-
"docComment": "/**\n * Additional plugins\n */\n",
|
|
1775
|
-
"excerptTokens": [
|
|
1776
|
-
{
|
|
1777
|
-
"kind": "Content",
|
|
1778
|
-
"text": "plugins: "
|
|
1779
|
-
},
|
|
1780
|
-
{
|
|
1781
|
-
"kind": "Reference",
|
|
1782
|
-
"text": "RsbuildPlugin",
|
|
1783
|
-
"canonicalReference": "@rsbuild/core!RsbuildPlugin:type"
|
|
1784
|
-
},
|
|
1785
|
-
{
|
|
1786
|
-
"kind": "Content",
|
|
1787
|
-
"text": "[]"
|
|
1788
|
-
},
|
|
1789
|
-
{
|
|
1790
|
-
"kind": "Content",
|
|
1791
|
-
"text": ";"
|
|
1792
|
-
}
|
|
1793
|
-
],
|
|
1794
|
-
"isReadonly": false,
|
|
1795
|
-
"isOptional": false,
|
|
1796
|
-
"releaseTag": "Public",
|
|
1797
|
-
"name": "plugins",
|
|
1798
|
-
"propertyTypeTokenRange": {
|
|
1799
|
-
"startIndex": 1,
|
|
1800
|
-
"endIndex": 3
|
|
1801
|
-
}
|
|
1802
|
-
},
|
|
1803
|
-
{
|
|
1804
|
-
"kind": "PropertySignature",
|
|
1805
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilderOptions#targets:member",
|
|
1806
|
-
"docComment": "/**\n * Build targets to include (default: [\"dev\", \"npm\"])\n */\n",
|
|
1807
|
-
"excerptTokens": [
|
|
1808
|
-
{
|
|
1809
|
-
"kind": "Content",
|
|
1810
|
-
"text": "targets?: "
|
|
1811
|
-
},
|
|
1812
|
-
{
|
|
1813
|
-
"kind": "Reference",
|
|
1814
|
-
"text": "BuildTarget",
|
|
1815
|
-
"canonicalReference": "@savvy-web/rslib-builder!BuildTarget:type"
|
|
1816
|
-
},
|
|
1817
|
-
{
|
|
1818
|
-
"kind": "Content",
|
|
1819
|
-
"text": "[]"
|
|
1820
|
-
},
|
|
1821
|
-
{
|
|
1822
|
-
"kind": "Content",
|
|
1823
|
-
"text": ";"
|
|
1824
|
-
}
|
|
1825
|
-
],
|
|
1826
|
-
"isReadonly": false,
|
|
1827
|
-
"isOptional": true,
|
|
1828
|
-
"releaseTag": "Public",
|
|
1829
|
-
"name": "targets",
|
|
1830
|
-
"propertyTypeTokenRange": {
|
|
1831
|
-
"startIndex": 1,
|
|
1832
|
-
"endIndex": 3
|
|
1833
|
-
}
|
|
1834
|
-
},
|
|
1835
|
-
{
|
|
1836
|
-
"kind": "PropertySignature",
|
|
1837
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilderOptions#transform:member",
|
|
1838
|
-
"docComment": "/**\n * Optional transform function to modify package.json before it's saved. Called after all standard transformations are applied.\n *\n * @param context - Transform context containing the target and package.json\n *\n * @returns The modified package.json (mutations are also supported)\n *\n * @example\n * ```typescript\n * NodeLibraryBuilder.create({\n * transform({ target, pkg }) {\n * if (target === 'npm') {\n * // Mutation approach\n * delete pkg.devDependencies;\n * delete pkg.scripts;\n * }\n * return pkg;\n * }\n * })\n * ```\n *\n */\n",
|
|
1839
|
-
"excerptTokens": [
|
|
1840
|
-
{
|
|
1841
|
-
"kind": "Content",
|
|
1842
|
-
"text": "transform?: "
|
|
1843
|
-
},
|
|
1844
|
-
{
|
|
1845
|
-
"kind": "Reference",
|
|
1846
|
-
"text": "TransformPackageJsonFn",
|
|
1847
|
-
"canonicalReference": "@savvy-web/rslib-builder!TransformPackageJsonFn:type"
|
|
1848
|
-
},
|
|
1849
|
-
{
|
|
1850
|
-
"kind": "Content",
|
|
1851
|
-
"text": ";"
|
|
1852
|
-
}
|
|
1853
|
-
],
|
|
1854
|
-
"isReadonly": false,
|
|
1855
|
-
"isOptional": true,
|
|
1856
|
-
"releaseTag": "Public",
|
|
1857
|
-
"name": "transform",
|
|
1858
|
-
"propertyTypeTokenRange": {
|
|
1859
|
-
"startIndex": 1,
|
|
1860
|
-
"endIndex": 2
|
|
1861
|
-
}
|
|
1862
|
-
},
|
|
1863
|
-
{
|
|
1864
|
-
"kind": "PropertySignature",
|
|
1865
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilderOptions#transformFiles:member",
|
|
1866
|
-
"docComment": "/**\n * Optional callback to transform files after they're built but before the files array is finalized. Useful for copying/renaming files or adding additional files to the build output.\n *\n * @param context - Transform context containing compilation context and files set\n *\n * @param - context.compilation - Rspack compilation object with assets\n *\n * @param - context.filesArray - Set of files that will be included in package.json files field\n *\n * @param - context.target - Current build target (dev/npm/jsr)\n *\n * @example\n * ```typescript\n * NodeLibraryBuilder.create({\n * transformFiles({ compilation, filesArray, target }) {\n * // Copy index.cjs to .pnpmfile.cjs\n * const indexAsset = compilation.assets['index.cjs'];\n * if (indexAsset) {\n * compilation.assets['.pnpmfile.cjs'] = indexAsset;\n * filesArray.add('.pnpmfile.cjs');\n * }\n * }\n * })\n * ```\n *\n */\n",
|
|
1867
|
-
"excerptTokens": [
|
|
1868
|
-
{
|
|
1869
|
-
"kind": "Content",
|
|
1870
|
-
"text": "transformFiles?: "
|
|
1871
|
-
},
|
|
1872
|
-
{
|
|
1873
|
-
"kind": "Content",
|
|
1874
|
-
"text": "(context: {\n compilation: {\n assets: "
|
|
1875
|
-
},
|
|
1876
|
-
{
|
|
1877
|
-
"kind": "Reference",
|
|
1878
|
-
"text": "Record",
|
|
1879
|
-
"canonicalReference": "!Record:type"
|
|
1880
|
-
},
|
|
1881
|
-
{
|
|
1882
|
-
"kind": "Content",
|
|
1883
|
-
"text": "<string, unknown>;\n };\n filesArray: "
|
|
1884
|
-
},
|
|
1885
|
-
{
|
|
1886
|
-
"kind": "Reference",
|
|
1887
|
-
"text": "Set",
|
|
1888
|
-
"canonicalReference": "!Set:interface"
|
|
1889
|
-
},
|
|
1890
|
-
{
|
|
1891
|
-
"kind": "Content",
|
|
1892
|
-
"text": "<string>;\n target: "
|
|
1893
|
-
},
|
|
1894
|
-
{
|
|
1895
|
-
"kind": "Reference",
|
|
1896
|
-
"text": "BuildTarget",
|
|
1897
|
-
"canonicalReference": "@savvy-web/rslib-builder!BuildTarget:type"
|
|
1898
|
-
},
|
|
1899
|
-
{
|
|
1900
|
-
"kind": "Content",
|
|
1901
|
-
"text": ";\n }) => void | "
|
|
1902
|
-
},
|
|
1903
|
-
{
|
|
1904
|
-
"kind": "Reference",
|
|
1905
|
-
"text": "Promise",
|
|
1906
|
-
"canonicalReference": "!Promise:interface"
|
|
1907
|
-
},
|
|
1908
|
-
{
|
|
1909
|
-
"kind": "Content",
|
|
1910
|
-
"text": "<void>"
|
|
1911
|
-
},
|
|
1912
|
-
{
|
|
1913
|
-
"kind": "Content",
|
|
1914
|
-
"text": ";"
|
|
1915
|
-
}
|
|
1916
|
-
],
|
|
1917
|
-
"isReadonly": false,
|
|
1918
|
-
"isOptional": true,
|
|
1919
|
-
"releaseTag": "Public",
|
|
1920
|
-
"name": "transformFiles",
|
|
1921
|
-
"propertyTypeTokenRange": {
|
|
1922
|
-
"startIndex": 1,
|
|
1923
|
-
"endIndex": 10
|
|
1924
|
-
}
|
|
1925
|
-
},
|
|
1926
|
-
{
|
|
1927
|
-
"kind": "PropertySignature",
|
|
1928
|
-
"canonicalReference": "@savvy-web/rslib-builder!NodeLibraryBuilderOptions#tsconfigPath:member",
|
|
1929
|
-
"docComment": "/**\n * Path to tsconfig for build (default: ./tsconfig.build.json)\n */\n",
|
|
1930
|
-
"excerptTokens": [
|
|
1931
|
-
{
|
|
1932
|
-
"kind": "Content",
|
|
1933
|
-
"text": "tsconfigPath: "
|
|
1934
|
-
},
|
|
1935
|
-
{
|
|
1936
|
-
"kind": "Content",
|
|
1937
|
-
"text": "string | undefined"
|
|
1938
|
-
},
|
|
1939
|
-
{
|
|
1940
|
-
"kind": "Content",
|
|
1941
|
-
"text": ";"
|
|
1942
|
-
}
|
|
1943
|
-
],
|
|
1944
|
-
"isReadonly": false,
|
|
1945
|
-
"isOptional": false,
|
|
1946
|
-
"releaseTag": "Public",
|
|
1947
|
-
"name": "tsconfigPath",
|
|
1948
|
-
"propertyTypeTokenRange": {
|
|
1949
|
-
"startIndex": 1,
|
|
1950
|
-
"endIndex": 2
|
|
1951
|
-
}
|
|
1952
|
-
}
|
|
1953
|
-
],
|
|
1954
|
-
"extendsTokenRanges": []
|
|
1955
|
-
},
|
|
1956
|
-
{
|
|
1957
|
-
"kind": "Class",
|
|
1958
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformer:class",
|
|
1959
|
-
"docComment": "/**\n * Transforms package.json for build output and publishing.\n *\n * @remarks\n *\n * This class consolidates all package.json transformation logic including: - Path transformations (src/ -> dist/, .ts -> .js) - Export conditions generation (types, import, require) - Bin field transformations - PNPM catalog and workspace resolution - Field cleanup for publishing\n *\n * @example\n * ```typescript\n * const transformer = new PackageJsonTransformer({\n * processTSExports: true,\n * collapseIndex: true,\n * });\n *\n * // For production builds (resolves catalog: and workspace: references)\n * const prodPkg = await transformer.transform(packageJson, { isProduction: true });\n *\n * // For development builds (preserves workspace links)\n * const devPkg = await transformer.transform(packageJson, { isProduction: false });\n * ```\n *\n * @public\n */\n",
|
|
1960
|
-
"excerptTokens": [
|
|
1961
|
-
{
|
|
1962
|
-
"kind": "Content",
|
|
1963
|
-
"text": "export declare class PackageJsonTransformer "
|
|
1964
|
-
}
|
|
1965
|
-
],
|
|
1966
|
-
"fileUrlPath": "src/rslib/plugins/utils/package-json-transformer.ts",
|
|
1967
|
-
"releaseTag": "Public",
|
|
1968
|
-
"isAbstract": false,
|
|
1969
|
-
"name": "PackageJsonTransformer",
|
|
1970
|
-
"preserveMemberOrder": false,
|
|
1971
|
-
"members": [
|
|
1972
|
-
{
|
|
1973
|
-
"kind": "Constructor",
|
|
1974
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformer:constructor(1)",
|
|
1975
|
-
"docComment": "/**\n * Constructs a new instance of the `PackageJsonTransformer` class\n */\n",
|
|
1976
|
-
"excerptTokens": [
|
|
1977
|
-
{
|
|
1978
|
-
"kind": "Content",
|
|
1979
|
-
"text": "constructor(options?: "
|
|
1980
|
-
},
|
|
1981
|
-
{
|
|
1982
|
-
"kind": "Reference",
|
|
1983
|
-
"text": "PackageJsonTransformOptions",
|
|
1984
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformOptions:interface"
|
|
1985
|
-
},
|
|
1986
|
-
{
|
|
1987
|
-
"kind": "Content",
|
|
1988
|
-
"text": ");"
|
|
1989
|
-
}
|
|
1990
|
-
],
|
|
1991
|
-
"releaseTag": "Public",
|
|
1992
|
-
"isProtected": false,
|
|
1993
|
-
"overloadIndex": 1,
|
|
1994
|
-
"parameters": [
|
|
1995
|
-
{
|
|
1996
|
-
"parameterName": "options",
|
|
1997
|
-
"parameterTypeTokenRange": {
|
|
1998
|
-
"startIndex": 1,
|
|
1999
|
-
"endIndex": 2
|
|
2000
|
-
},
|
|
2001
|
-
"isOptional": true
|
|
2002
|
-
}
|
|
2003
|
-
]
|
|
2004
|
-
},
|
|
2005
|
-
{
|
|
2006
|
-
"kind": "Method",
|
|
2007
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformer#createTypePath:member(1)",
|
|
2008
|
-
"docComment": "/**\n * Creates a TypeScript declaration file path from a JavaScript file path.\n *\n * @param jsPath - The JavaScript file path\n *\n * @returns The corresponding .d.ts file path\n *\n * @example\n * ```typescript\n * transformer.createTypePath(\"./index.js\"); // \"./index.d.ts\"\n * transformer.createTypePath(\"./rslib/index.js\"); // \"./rslib.d.ts\" (bundled)\n * ```\n *\n */\n",
|
|
2009
|
-
"excerptTokens": [
|
|
2010
|
-
{
|
|
2011
|
-
"kind": "Content",
|
|
2012
|
-
"text": "createTypePath(jsPath: "
|
|
2013
|
-
},
|
|
2014
|
-
{
|
|
2015
|
-
"kind": "Content",
|
|
2016
|
-
"text": "string"
|
|
2017
|
-
},
|
|
2018
|
-
{
|
|
2019
|
-
"kind": "Content",
|
|
2020
|
-
"text": "): "
|
|
2021
|
-
},
|
|
2022
|
-
{
|
|
2023
|
-
"kind": "Content",
|
|
2024
|
-
"text": "string"
|
|
2025
|
-
},
|
|
2026
|
-
{
|
|
2027
|
-
"kind": "Content",
|
|
2028
|
-
"text": ";"
|
|
2029
|
-
}
|
|
2030
|
-
],
|
|
2031
|
-
"isStatic": false,
|
|
2032
|
-
"returnTypeTokenRange": {
|
|
2033
|
-
"startIndex": 3,
|
|
2034
|
-
"endIndex": 4
|
|
2035
|
-
},
|
|
2036
|
-
"releaseTag": "Public",
|
|
2037
|
-
"isProtected": false,
|
|
2038
|
-
"overloadIndex": 1,
|
|
2039
|
-
"parameters": [
|
|
2040
|
-
{
|
|
2041
|
-
"parameterName": "jsPath",
|
|
2042
|
-
"parameterTypeTokenRange": {
|
|
2043
|
-
"startIndex": 1,
|
|
2044
|
-
"endIndex": 2
|
|
2045
|
-
},
|
|
2046
|
-
"isOptional": false
|
|
2047
|
-
}
|
|
2048
|
-
],
|
|
2049
|
-
"isOptional": false,
|
|
2050
|
-
"isAbstract": false,
|
|
2051
|
-
"name": "createTypePath"
|
|
2052
|
-
},
|
|
2053
|
-
{
|
|
2054
|
-
"kind": "Method",
|
|
2055
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformer#transform:member(1)",
|
|
2056
|
-
"docComment": "/**\n * Performs the complete package.json transformation.\n *\n * @param packageJson - The source package.json\n *\n * @param context - Transform context\n *\n * @param - context.isProduction - Whether this is a production build\n *\n * @param - context.customTransform - Optional custom transform function\n *\n * @returns The transformed package.json\n */\n",
|
|
2057
|
-
"excerptTokens": [
|
|
2058
|
-
{
|
|
2059
|
-
"kind": "Content",
|
|
2060
|
-
"text": "transform(packageJson: "
|
|
2061
|
-
},
|
|
2062
|
-
{
|
|
2063
|
-
"kind": "Reference",
|
|
2064
|
-
"text": "PackageJson",
|
|
2065
|
-
"canonicalReference": "type-fest!PackageJson:type"
|
|
2066
|
-
},
|
|
2067
|
-
{
|
|
2068
|
-
"kind": "Content",
|
|
2069
|
-
"text": ", context?: "
|
|
2070
|
-
},
|
|
2071
|
-
{
|
|
2072
|
-
"kind": "Content",
|
|
2073
|
-
"text": "{\n isProduction?: boolean;\n customTransform?: (pkg: "
|
|
2074
|
-
},
|
|
2075
|
-
{
|
|
2076
|
-
"kind": "Reference",
|
|
2077
|
-
"text": "PackageJson",
|
|
2078
|
-
"canonicalReference": "type-fest!PackageJson:type"
|
|
2079
|
-
},
|
|
2080
|
-
{
|
|
2081
|
-
"kind": "Content",
|
|
2082
|
-
"text": ") => "
|
|
2083
|
-
},
|
|
2084
|
-
{
|
|
2085
|
-
"kind": "Reference",
|
|
2086
|
-
"text": "PackageJson",
|
|
2087
|
-
"canonicalReference": "type-fest!PackageJson:type"
|
|
2088
|
-
},
|
|
2089
|
-
{
|
|
2090
|
-
"kind": "Content",
|
|
2091
|
-
"text": ";\n }"
|
|
2092
|
-
},
|
|
2093
|
-
{
|
|
2094
|
-
"kind": "Content",
|
|
2095
|
-
"text": "): "
|
|
2096
|
-
},
|
|
2097
|
-
{
|
|
2098
|
-
"kind": "Reference",
|
|
2099
|
-
"text": "Promise",
|
|
2100
|
-
"canonicalReference": "!Promise:interface"
|
|
2101
|
-
},
|
|
2102
|
-
{
|
|
2103
|
-
"kind": "Content",
|
|
2104
|
-
"text": "<"
|
|
2105
|
-
},
|
|
2106
|
-
{
|
|
2107
|
-
"kind": "Reference",
|
|
2108
|
-
"text": "PackageJson",
|
|
2109
|
-
"canonicalReference": "type-fest!PackageJson:type"
|
|
2110
|
-
},
|
|
2111
|
-
{
|
|
2112
|
-
"kind": "Content",
|
|
2113
|
-
"text": ">"
|
|
2114
|
-
},
|
|
2115
|
-
{
|
|
2116
|
-
"kind": "Content",
|
|
2117
|
-
"text": ";"
|
|
2118
|
-
}
|
|
2119
|
-
],
|
|
2120
|
-
"isStatic": false,
|
|
2121
|
-
"returnTypeTokenRange": {
|
|
2122
|
-
"startIndex": 9,
|
|
2123
|
-
"endIndex": 13
|
|
2124
|
-
},
|
|
2125
|
-
"releaseTag": "Public",
|
|
2126
|
-
"isProtected": false,
|
|
2127
|
-
"overloadIndex": 1,
|
|
2128
|
-
"parameters": [
|
|
2129
|
-
{
|
|
2130
|
-
"parameterName": "packageJson",
|
|
2131
|
-
"parameterTypeTokenRange": {
|
|
2132
|
-
"startIndex": 1,
|
|
2133
|
-
"endIndex": 2
|
|
2134
|
-
},
|
|
2135
|
-
"isOptional": false
|
|
2136
|
-
},
|
|
2137
|
-
{
|
|
2138
|
-
"parameterName": "context",
|
|
2139
|
-
"parameterTypeTokenRange": {
|
|
2140
|
-
"startIndex": 3,
|
|
2141
|
-
"endIndex": 8
|
|
2142
|
-
},
|
|
2143
|
-
"isOptional": true
|
|
2144
|
-
}
|
|
2145
|
-
],
|
|
2146
|
-
"isOptional": false,
|
|
2147
|
-
"isAbstract": false,
|
|
2148
|
-
"name": "transform"
|
|
2149
|
-
},
|
|
2150
|
-
{
|
|
2151
|
-
"kind": "Method",
|
|
2152
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformer#transformBin:member(1)",
|
|
2153
|
-
"docComment": "/**\n * Transforms the bin field for build output.\n *\n * @param bin - The bin field from package.json\n *\n * @returns The transformed bin field\n */\n",
|
|
2154
|
-
"excerptTokens": [
|
|
2155
|
-
{
|
|
2156
|
-
"kind": "Content",
|
|
2157
|
-
"text": "transformBin(bin: "
|
|
2158
|
-
},
|
|
2159
|
-
{
|
|
2160
|
-
"kind": "Reference",
|
|
2161
|
-
"text": "PackageJson",
|
|
2162
|
-
"canonicalReference": "type-fest!PackageJson:type"
|
|
2163
|
-
},
|
|
2164
|
-
{
|
|
2165
|
-
"kind": "Content",
|
|
2166
|
-
"text": "[\"bin\"]"
|
|
2167
|
-
},
|
|
2168
|
-
{
|
|
2169
|
-
"kind": "Content",
|
|
2170
|
-
"text": "): "
|
|
2171
|
-
},
|
|
2172
|
-
{
|
|
2173
|
-
"kind": "Reference",
|
|
2174
|
-
"text": "PackageJson",
|
|
2175
|
-
"canonicalReference": "type-fest!PackageJson:type"
|
|
2176
|
-
},
|
|
2177
|
-
{
|
|
2178
|
-
"kind": "Content",
|
|
2179
|
-
"text": "[\"bin\"]"
|
|
2180
|
-
},
|
|
2181
|
-
{
|
|
2182
|
-
"kind": "Content",
|
|
2183
|
-
"text": ";"
|
|
2184
|
-
}
|
|
2185
|
-
],
|
|
2186
|
-
"isStatic": false,
|
|
2187
|
-
"returnTypeTokenRange": {
|
|
2188
|
-
"startIndex": 4,
|
|
2189
|
-
"endIndex": 6
|
|
2190
|
-
},
|
|
2191
|
-
"releaseTag": "Public",
|
|
2192
|
-
"isProtected": false,
|
|
2193
|
-
"overloadIndex": 1,
|
|
2194
|
-
"parameters": [
|
|
2195
|
-
{
|
|
2196
|
-
"parameterName": "bin",
|
|
2197
|
-
"parameterTypeTokenRange": {
|
|
2198
|
-
"startIndex": 1,
|
|
2199
|
-
"endIndex": 3
|
|
2200
|
-
},
|
|
2201
|
-
"isOptional": false
|
|
2202
|
-
}
|
|
2203
|
-
],
|
|
2204
|
-
"isOptional": false,
|
|
2205
|
-
"isAbstract": false,
|
|
2206
|
-
"name": "transformBin"
|
|
2207
|
-
},
|
|
2208
|
-
{
|
|
2209
|
-
"kind": "Method",
|
|
2210
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformer#transformExportPath:member(1)",
|
|
2211
|
-
"docComment": "/**\n * Transforms a single export path for RSLib compatibility.\n *\n * @remarks\n *\n * Performs several transformations: 1. Strips source directory prefixes (exports/, public/, src/) 2. Converts TypeScript extensions to JavaScript 3. Preserves bin/ prefix for executables\n *\n * @param path - The file path to transform\n *\n * @returns The transformed path\n *\n * @example\n * ```typescript\n * transformer.transformExportPath(\"./src/index.ts\"); // \"./index.js\"\n * transformer.transformExportPath(\"./bin/cli.ts\"); // \"./bin/cli.js\"\n * ```\n *\n */\n",
|
|
2212
|
-
"excerptTokens": [
|
|
2213
|
-
{
|
|
2214
|
-
"kind": "Content",
|
|
2215
|
-
"text": "transformExportPath(path: "
|
|
2216
|
-
},
|
|
2217
|
-
{
|
|
2218
|
-
"kind": "Content",
|
|
2219
|
-
"text": "string"
|
|
2220
|
-
},
|
|
2221
|
-
{
|
|
2222
|
-
"kind": "Content",
|
|
2223
|
-
"text": "): "
|
|
2224
|
-
},
|
|
2225
|
-
{
|
|
2226
|
-
"kind": "Content",
|
|
2227
|
-
"text": "string"
|
|
2228
|
-
},
|
|
2229
|
-
{
|
|
2230
|
-
"kind": "Content",
|
|
2231
|
-
"text": ";"
|
|
2232
|
-
}
|
|
2233
|
-
],
|
|
2234
|
-
"isStatic": false,
|
|
2235
|
-
"returnTypeTokenRange": {
|
|
2236
|
-
"startIndex": 3,
|
|
2237
|
-
"endIndex": 4
|
|
2238
|
-
},
|
|
2239
|
-
"releaseTag": "Public",
|
|
2240
|
-
"isProtected": false,
|
|
2241
|
-
"overloadIndex": 1,
|
|
2242
|
-
"parameters": [
|
|
2243
|
-
{
|
|
2244
|
-
"parameterName": "path",
|
|
2245
|
-
"parameterTypeTokenRange": {
|
|
2246
|
-
"startIndex": 1,
|
|
2247
|
-
"endIndex": 2
|
|
2248
|
-
},
|
|
2249
|
-
"isOptional": false
|
|
2250
|
-
}
|
|
2251
|
-
],
|
|
2252
|
-
"isOptional": false,
|
|
2253
|
-
"isAbstract": false,
|
|
2254
|
-
"name": "transformExportPath"
|
|
2255
|
-
},
|
|
2256
|
-
{
|
|
2257
|
-
"kind": "Method",
|
|
2258
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformer#transformExports:member(1)",
|
|
2259
|
-
"docComment": "/**\n * Transforms package.json exports field recursively.\n *\n * @param exports - The exports value to transform\n *\n * @param exportKey - The current export key for context\n *\n * @returns The transformed exports value\n */\n",
|
|
2260
|
-
"excerptTokens": [
|
|
2261
|
-
{
|
|
2262
|
-
"kind": "Content",
|
|
2263
|
-
"text": "transformExports(exports: "
|
|
2264
|
-
},
|
|
2265
|
-
{
|
|
2266
|
-
"kind": "Reference",
|
|
2267
|
-
"text": "FlexibleExports",
|
|
2268
|
-
"canonicalReference": "@savvy-web/rslib-builder!~FlexibleExports:type"
|
|
2269
|
-
},
|
|
2270
|
-
{
|
|
2271
|
-
"kind": "Content",
|
|
2272
|
-
"text": ", exportKey?: "
|
|
2273
|
-
},
|
|
2274
|
-
{
|
|
2275
|
-
"kind": "Content",
|
|
2276
|
-
"text": "string"
|
|
2277
|
-
},
|
|
2278
|
-
{
|
|
2279
|
-
"kind": "Content",
|
|
2280
|
-
"text": "): "
|
|
2281
|
-
},
|
|
2282
|
-
{
|
|
2283
|
-
"kind": "Reference",
|
|
2284
|
-
"text": "FlexibleExports",
|
|
2285
|
-
"canonicalReference": "@savvy-web/rslib-builder!~FlexibleExports:type"
|
|
2286
|
-
},
|
|
2287
|
-
{
|
|
2288
|
-
"kind": "Content",
|
|
2289
|
-
"text": ";"
|
|
2290
|
-
}
|
|
2291
|
-
],
|
|
2292
|
-
"isStatic": false,
|
|
2293
|
-
"returnTypeTokenRange": {
|
|
2294
|
-
"startIndex": 5,
|
|
2295
|
-
"endIndex": 6
|
|
2296
|
-
},
|
|
2297
|
-
"releaseTag": "Public",
|
|
2298
|
-
"isProtected": false,
|
|
2299
|
-
"overloadIndex": 1,
|
|
2300
|
-
"parameters": [
|
|
2301
|
-
{
|
|
2302
|
-
"parameterName": "exports",
|
|
2303
|
-
"parameterTypeTokenRange": {
|
|
2304
|
-
"startIndex": 1,
|
|
2305
|
-
"endIndex": 2
|
|
2306
|
-
},
|
|
2307
|
-
"isOptional": false
|
|
2308
|
-
},
|
|
2309
|
-
{
|
|
2310
|
-
"parameterName": "exportKey",
|
|
2311
|
-
"parameterTypeTokenRange": {
|
|
2312
|
-
"startIndex": 3,
|
|
2313
|
-
"endIndex": 4
|
|
2314
|
-
},
|
|
2315
|
-
"isOptional": true
|
|
2316
|
-
}
|
|
2317
|
-
],
|
|
2318
|
-
"isOptional": false,
|
|
2319
|
-
"isAbstract": false,
|
|
2320
|
-
"name": "transformExports"
|
|
2321
|
-
}
|
|
2322
|
-
],
|
|
2323
|
-
"implementsTokenRanges": []
|
|
2324
|
-
},
|
|
2325
|
-
{
|
|
2326
|
-
"kind": "Interface",
|
|
2327
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformOptions:interface",
|
|
2328
|
-
"docComment": "/**\n * Options for transforming package.json.\n *\n * @public\n */\n",
|
|
2329
|
-
"excerptTokens": [
|
|
2330
|
-
{
|
|
2331
|
-
"kind": "Content",
|
|
2332
|
-
"text": "export interface PackageJsonTransformOptions "
|
|
2333
|
-
}
|
|
2334
|
-
],
|
|
2335
|
-
"fileUrlPath": "src/rslib/plugins/utils/package-json-transformer.ts",
|
|
2336
|
-
"releaseTag": "Public",
|
|
2337
|
-
"name": "PackageJsonTransformOptions",
|
|
2338
|
-
"preserveMemberOrder": false,
|
|
2339
|
-
"members": [
|
|
2340
|
-
{
|
|
2341
|
-
"kind": "PropertySignature",
|
|
2342
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformOptions#collapseIndex:member",
|
|
2343
|
-
"docComment": "/**\n * Whether to collapse index files (./foo/index.ts -> ./foo.js). This is typically true for bundled builds.\n *\n * @defaultValue false\n */\n",
|
|
2344
|
-
"excerptTokens": [
|
|
2345
|
-
{
|
|
2346
|
-
"kind": "Content",
|
|
2347
|
-
"text": "collapseIndex?: "
|
|
2348
|
-
},
|
|
2349
|
-
{
|
|
2350
|
-
"kind": "Content",
|
|
2351
|
-
"text": "boolean"
|
|
2352
|
-
},
|
|
2353
|
-
{
|
|
2354
|
-
"kind": "Content",
|
|
2355
|
-
"text": ";"
|
|
2356
|
-
}
|
|
2357
|
-
],
|
|
2358
|
-
"isReadonly": false,
|
|
2359
|
-
"isOptional": true,
|
|
2360
|
-
"releaseTag": "Public",
|
|
2361
|
-
"name": "collapseIndex",
|
|
2362
|
-
"propertyTypeTokenRange": {
|
|
2363
|
-
"startIndex": 1,
|
|
2364
|
-
"endIndex": 2
|
|
2365
|
-
}
|
|
2366
|
-
},
|
|
2367
|
-
{
|
|
2368
|
-
"kind": "PropertySignature",
|
|
2369
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformOptions#entrypoints:member",
|
|
2370
|
-
"docComment": "/**\n * Map of export paths to entry files (from AutoEntryPlugin).\n */\n",
|
|
2371
|
-
"excerptTokens": [
|
|
2372
|
-
{
|
|
2373
|
-
"kind": "Content",
|
|
2374
|
-
"text": "entrypoints?: "
|
|
2375
|
-
},
|
|
2376
|
-
{
|
|
2377
|
-
"kind": "Reference",
|
|
2378
|
-
"text": "Map",
|
|
2379
|
-
"canonicalReference": "!Map:interface"
|
|
2380
|
-
},
|
|
2381
|
-
{
|
|
2382
|
-
"kind": "Content",
|
|
2383
|
-
"text": "<string, string>"
|
|
2384
|
-
},
|
|
2385
|
-
{
|
|
2386
|
-
"kind": "Content",
|
|
2387
|
-
"text": ";"
|
|
2388
|
-
}
|
|
2389
|
-
],
|
|
2390
|
-
"isReadonly": false,
|
|
2391
|
-
"isOptional": true,
|
|
2392
|
-
"releaseTag": "Public",
|
|
2393
|
-
"name": "entrypoints",
|
|
2394
|
-
"propertyTypeTokenRange": {
|
|
2395
|
-
"startIndex": 1,
|
|
2396
|
-
"endIndex": 3
|
|
2397
|
-
}
|
|
2398
|
-
},
|
|
2399
|
-
{
|
|
2400
|
-
"kind": "PropertySignature",
|
|
2401
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformOptions#exportToOutputMap:member",
|
|
2402
|
-
"docComment": "/**\n * Map of export paths to output files (for exportsAsIndexes mode).\n */\n",
|
|
2403
|
-
"excerptTokens": [
|
|
2404
|
-
{
|
|
2405
|
-
"kind": "Content",
|
|
2406
|
-
"text": "exportToOutputMap?: "
|
|
2407
|
-
},
|
|
2408
|
-
{
|
|
2409
|
-
"kind": "Reference",
|
|
2410
|
-
"text": "Map",
|
|
2411
|
-
"canonicalReference": "!Map:interface"
|
|
2412
|
-
},
|
|
2413
|
-
{
|
|
2414
|
-
"kind": "Content",
|
|
2415
|
-
"text": "<string, string>"
|
|
2416
|
-
},
|
|
2417
|
-
{
|
|
2418
|
-
"kind": "Content",
|
|
2419
|
-
"text": ";"
|
|
2420
|
-
}
|
|
2421
|
-
],
|
|
2422
|
-
"isReadonly": false,
|
|
2423
|
-
"isOptional": true,
|
|
2424
|
-
"releaseTag": "Public",
|
|
2425
|
-
"name": "exportToOutputMap",
|
|
2426
|
-
"propertyTypeTokenRange": {
|
|
2427
|
-
"startIndex": 1,
|
|
2428
|
-
"endIndex": 3
|
|
2429
|
-
}
|
|
2430
|
-
},
|
|
2431
|
-
{
|
|
2432
|
-
"kind": "PropertySignature",
|
|
2433
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformOptions#processTSExports:member",
|
|
2434
|
-
"docComment": "/**\n * Whether to process TypeScript exports (convert .ts to .js and add types field).\n *\n * @defaultValue true\n */\n",
|
|
2435
|
-
"excerptTokens": [
|
|
2436
|
-
{
|
|
2437
|
-
"kind": "Content",
|
|
2438
|
-
"text": "processTSExports?: "
|
|
2439
|
-
},
|
|
2440
|
-
{
|
|
2441
|
-
"kind": "Content",
|
|
2442
|
-
"text": "boolean"
|
|
2443
|
-
},
|
|
2444
|
-
{
|
|
2445
|
-
"kind": "Content",
|
|
2446
|
-
"text": ";"
|
|
2447
|
-
}
|
|
2448
|
-
],
|
|
2449
|
-
"isReadonly": false,
|
|
2450
|
-
"isOptional": true,
|
|
2451
|
-
"releaseTag": "Public",
|
|
2452
|
-
"name": "processTSExports",
|
|
2453
|
-
"propertyTypeTokenRange": {
|
|
2454
|
-
"startIndex": 1,
|
|
2455
|
-
"endIndex": 2
|
|
2456
|
-
}
|
|
2457
|
-
}
|
|
2458
|
-
],
|
|
2459
|
-
"extendsTokenRanges": []
|
|
2460
|
-
},
|
|
2461
|
-
{
|
|
2462
|
-
"kind": "Function",
|
|
2463
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformPlugin:function(1)",
|
|
2464
|
-
"docComment": "/**\n * Plugin to process package.json for distribution\n *\n * @public\n */\n",
|
|
2465
|
-
"excerptTokens": [
|
|
2466
|
-
{
|
|
2467
|
-
"kind": "Content",
|
|
2468
|
-
"text": "PackageJsonTransformPlugin: (options?: "
|
|
2469
|
-
},
|
|
2470
|
-
{
|
|
2471
|
-
"kind": "Reference",
|
|
2472
|
-
"text": "PackageJsonTransformPluginOptions",
|
|
2473
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformPluginOptions:interface"
|
|
2474
|
-
},
|
|
2475
|
-
{
|
|
2476
|
-
"kind": "Content",
|
|
2477
|
-
"text": ") => "
|
|
2478
|
-
},
|
|
2479
|
-
{
|
|
2480
|
-
"kind": "Reference",
|
|
2481
|
-
"text": "RsbuildPlugin",
|
|
2482
|
-
"canonicalReference": "@rsbuild/core!RsbuildPlugin:type"
|
|
2483
|
-
}
|
|
2484
|
-
],
|
|
2485
|
-
"fileUrlPath": "src/rslib/plugins/package-json-transform-plugin.ts",
|
|
2486
|
-
"returnTypeTokenRange": {
|
|
2487
|
-
"startIndex": 3,
|
|
2488
|
-
"endIndex": 4
|
|
2489
|
-
},
|
|
2490
|
-
"releaseTag": "Public",
|
|
2491
|
-
"overloadIndex": 1,
|
|
2492
|
-
"parameters": [
|
|
2493
|
-
{
|
|
2494
|
-
"parameterName": "options",
|
|
2495
|
-
"parameterTypeTokenRange": {
|
|
2496
|
-
"startIndex": 1,
|
|
2497
|
-
"endIndex": 2
|
|
2498
|
-
},
|
|
2499
|
-
"isOptional": true
|
|
2500
|
-
}
|
|
2501
|
-
],
|
|
2502
|
-
"name": "PackageJsonTransformPlugin"
|
|
2503
|
-
},
|
|
2504
|
-
{
|
|
2505
|
-
"kind": "Interface",
|
|
2506
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformPluginOptions:interface",
|
|
2507
|
-
"docComment": "/**\n * @public\n */\n",
|
|
2508
|
-
"excerptTokens": [
|
|
2509
|
-
{
|
|
2510
|
-
"kind": "Content",
|
|
2511
|
-
"text": "export interface PackageJsonTransformPluginOptions "
|
|
2512
|
-
}
|
|
2513
|
-
],
|
|
2514
|
-
"fileUrlPath": "src/rslib/plugins/package-json-transform-plugin.ts",
|
|
2515
|
-
"releaseTag": "Public",
|
|
2516
|
-
"name": "PackageJsonTransformPluginOptions",
|
|
2517
|
-
"preserveMemberOrder": false,
|
|
2518
|
-
"members": [
|
|
2519
|
-
{
|
|
2520
|
-
"kind": "PropertySignature",
|
|
2521
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformPluginOptions#bundle:member",
|
|
2522
|
-
"docComment": "/**\n * Whether the build is in bundle mode (affects export path transformation)\n */\n",
|
|
2523
|
-
"excerptTokens": [
|
|
2524
|
-
{
|
|
2525
|
-
"kind": "Content",
|
|
2526
|
-
"text": "bundle?: "
|
|
2527
|
-
},
|
|
2528
|
-
{
|
|
2529
|
-
"kind": "Content",
|
|
2530
|
-
"text": "boolean"
|
|
2531
|
-
},
|
|
2532
|
-
{
|
|
2533
|
-
"kind": "Content",
|
|
2534
|
-
"text": ";"
|
|
2535
|
-
}
|
|
2536
|
-
],
|
|
2537
|
-
"isReadonly": false,
|
|
2538
|
-
"isOptional": true,
|
|
2539
|
-
"releaseTag": "Public",
|
|
2540
|
-
"name": "bundle",
|
|
2541
|
-
"propertyTypeTokenRange": {
|
|
2542
|
-
"startIndex": 1,
|
|
2543
|
-
"endIndex": 2
|
|
2544
|
-
}
|
|
2545
|
-
},
|
|
2546
|
-
{
|
|
2547
|
-
"kind": "PropertySignature",
|
|
2548
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformPluginOptions#forcePrivate:member",
|
|
2549
|
-
"docComment": "/**\n * Whether to force include private packages (with \"private\": true) in the output\n */\n",
|
|
2550
|
-
"excerptTokens": [
|
|
2551
|
-
{
|
|
2552
|
-
"kind": "Content",
|
|
2553
|
-
"text": "forcePrivate?: "
|
|
2554
|
-
},
|
|
2555
|
-
{
|
|
2556
|
-
"kind": "Content",
|
|
2557
|
-
"text": "boolean"
|
|
2558
|
-
},
|
|
2559
|
-
{
|
|
2560
|
-
"kind": "Content",
|
|
2561
|
-
"text": ";"
|
|
2562
|
-
}
|
|
2563
|
-
],
|
|
2564
|
-
"isReadonly": false,
|
|
2565
|
-
"isOptional": true,
|
|
2566
|
-
"releaseTag": "Public",
|
|
2567
|
-
"name": "forcePrivate",
|
|
2568
|
-
"propertyTypeTokenRange": {
|
|
2569
|
-
"startIndex": 1,
|
|
2570
|
-
"endIndex": 2
|
|
2571
|
-
}
|
|
2572
|
-
},
|
|
2573
|
-
{
|
|
2574
|
-
"kind": "PropertySignature",
|
|
2575
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformPluginOptions#name:member",
|
|
2576
|
-
"docComment": "/**\n * Override the name property of the source package.json when building to a target\n */\n",
|
|
2577
|
-
"excerptTokens": [
|
|
2578
|
-
{
|
|
2579
|
-
"kind": "Content",
|
|
2580
|
-
"text": "name?: "
|
|
2581
|
-
},
|
|
2582
|
-
{
|
|
2583
|
-
"kind": "Content",
|
|
2584
|
-
"text": "string | true"
|
|
2585
|
-
},
|
|
2586
|
-
{
|
|
2587
|
-
"kind": "Content",
|
|
2588
|
-
"text": ";"
|
|
2589
|
-
}
|
|
2590
|
-
],
|
|
2591
|
-
"isReadonly": false,
|
|
2592
|
-
"isOptional": true,
|
|
2593
|
-
"releaseTag": "Public",
|
|
2594
|
-
"name": "name",
|
|
2595
|
-
"propertyTypeTokenRange": {
|
|
2596
|
-
"startIndex": 1,
|
|
2597
|
-
"endIndex": 2
|
|
2598
|
-
}
|
|
2599
|
-
},
|
|
2600
|
-
{
|
|
2601
|
-
"kind": "PropertySignature",
|
|
2602
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformPluginOptions#processTSExports:member",
|
|
2603
|
-
"docComment": "/**\n * Whether to process package.json exports of into\n */\n",
|
|
2604
|
-
"excerptTokens": [
|
|
2605
|
-
{
|
|
2606
|
-
"kind": "Content",
|
|
2607
|
-
"text": "processTSExports?: "
|
|
2608
|
-
},
|
|
2609
|
-
{
|
|
2610
|
-
"kind": "Content",
|
|
2611
|
-
"text": "boolean"
|
|
2612
|
-
},
|
|
2613
|
-
{
|
|
2614
|
-
"kind": "Content",
|
|
2615
|
-
"text": ";"
|
|
2616
|
-
}
|
|
2617
|
-
],
|
|
2618
|
-
"isReadonly": false,
|
|
2619
|
-
"isOptional": true,
|
|
2620
|
-
"releaseTag": "Public",
|
|
2621
|
-
"name": "processTSExports",
|
|
2622
|
-
"propertyTypeTokenRange": {
|
|
2623
|
-
"startIndex": 1,
|
|
2624
|
-
"endIndex": 2
|
|
2625
|
-
}
|
|
2626
|
-
},
|
|
2627
|
-
{
|
|
2628
|
-
"kind": "PropertySignature",
|
|
2629
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformPluginOptions#target:member",
|
|
2630
|
-
"docComment": "/**\n * Build target (dev, npm) - used for custom transformations\n */\n",
|
|
2631
|
-
"excerptTokens": [
|
|
2632
|
-
{
|
|
2633
|
-
"kind": "Content",
|
|
2634
|
-
"text": "target?: "
|
|
2635
|
-
},
|
|
2636
|
-
{
|
|
2637
|
-
"kind": "Content",
|
|
2638
|
-
"text": "string"
|
|
2639
|
-
},
|
|
2640
|
-
{
|
|
2641
|
-
"kind": "Content",
|
|
2642
|
-
"text": ";"
|
|
2643
|
-
}
|
|
2644
|
-
],
|
|
2645
|
-
"isReadonly": false,
|
|
2646
|
-
"isOptional": true,
|
|
2647
|
-
"releaseTag": "Public",
|
|
2648
|
-
"name": "target",
|
|
2649
|
-
"propertyTypeTokenRange": {
|
|
2650
|
-
"startIndex": 1,
|
|
2651
|
-
"endIndex": 2
|
|
2652
|
-
}
|
|
2653
|
-
},
|
|
2654
|
-
{
|
|
2655
|
-
"kind": "PropertySignature",
|
|
2656
|
-
"canonicalReference": "@savvy-web/rslib-builder!PackageJsonTransformPluginOptions#transform:member",
|
|
2657
|
-
"docComment": "/**\n * Optional transform function to modify package.json after standard transformations\n */\n",
|
|
2658
|
-
"excerptTokens": [
|
|
2659
|
-
{
|
|
2660
|
-
"kind": "Content",
|
|
2661
|
-
"text": "transform?: "
|
|
2662
|
-
},
|
|
2663
|
-
{
|
|
2664
|
-
"kind": "Content",
|
|
2665
|
-
"text": "(pkg: "
|
|
2666
|
-
},
|
|
2667
|
-
{
|
|
2668
|
-
"kind": "Reference",
|
|
2669
|
-
"text": "PackageJson",
|
|
2670
|
-
"canonicalReference": "type-fest!PackageJson:type"
|
|
2671
|
-
},
|
|
2672
|
-
{
|
|
2673
|
-
"kind": "Content",
|
|
2674
|
-
"text": ") => "
|
|
2675
|
-
},
|
|
2676
|
-
{
|
|
2677
|
-
"kind": "Reference",
|
|
2678
|
-
"text": "PackageJson",
|
|
2679
|
-
"canonicalReference": "type-fest!PackageJson:type"
|
|
2680
|
-
},
|
|
2681
|
-
{
|
|
2682
|
-
"kind": "Content",
|
|
2683
|
-
"text": ";"
|
|
2684
|
-
}
|
|
2685
|
-
],
|
|
2686
|
-
"isReadonly": false,
|
|
2687
|
-
"isOptional": true,
|
|
2688
|
-
"releaseTag": "Public",
|
|
2689
|
-
"name": "transform",
|
|
2690
|
-
"propertyTypeTokenRange": {
|
|
2691
|
-
"startIndex": 1,
|
|
2692
|
-
"endIndex": 5
|
|
2693
|
-
}
|
|
2694
|
-
}
|
|
2695
|
-
],
|
|
2696
|
-
"extendsTokenRanges": []
|
|
2697
|
-
},
|
|
2698
|
-
{
|
|
2699
|
-
"kind": "Class",
|
|
2700
|
-
"canonicalReference": "@savvy-web/rslib-builder!PnpmCatalog:class",
|
|
2701
|
-
"docComment": "/**\n * Manages PNPM catalog resolution with caching.\n *\n * @remarks\n *\n * This class handles the resolution of PNPM-specific dependency references: - `catalog:` references to centralized version definitions - `workspace:` references to local workspace packages\n *\n * The class caches the catalog data based on file modification time to avoid repeated filesystem operations during builds.\n *\n * @example\n * ```typescript\n * const catalog = new PnpmCatalog();\n *\n * // Get the catalog data\n * const versions = await catalog.getCatalog();\n * console.log(versions);\n * // { \"react\": \"^18.2.0\", \"typescript\": \"^5.0.0\" }\n *\n * // Resolve package.json dependencies\n * const resolved = await catalog.resolvePackageJson(packageJson);\n * ```\n *\n * @public\n */\n",
|
|
2702
|
-
"excerptTokens": [
|
|
2703
|
-
{
|
|
2704
|
-
"kind": "Content",
|
|
2705
|
-
"text": "export declare class PnpmCatalog "
|
|
2706
|
-
}
|
|
2707
|
-
],
|
|
2708
|
-
"fileUrlPath": "src/rslib/plugins/utils/pnpm-catalog.ts",
|
|
2709
|
-
"releaseTag": "Public",
|
|
2710
|
-
"isAbstract": false,
|
|
2711
|
-
"name": "PnpmCatalog",
|
|
2712
|
-
"preserveMemberOrder": false,
|
|
2713
|
-
"members": [
|
|
2714
|
-
{
|
|
2715
|
-
"kind": "Method",
|
|
2716
|
-
"canonicalReference": "@savvy-web/rslib-builder!PnpmCatalog#clearCache:member(1)",
|
|
2717
|
-
"docComment": "/**\n * Clears the cached catalog data.\n *\n * @remarks\n *\n * Useful in testing scenarios to ensure clean state between tests.\n */\n",
|
|
2718
|
-
"excerptTokens": [
|
|
2719
|
-
{
|
|
2720
|
-
"kind": "Content",
|
|
2721
|
-
"text": "clearCache(): "
|
|
2722
|
-
},
|
|
2723
|
-
{
|
|
2724
|
-
"kind": "Content",
|
|
2725
|
-
"text": "void"
|
|
2726
|
-
},
|
|
2727
|
-
{
|
|
2728
|
-
"kind": "Content",
|
|
2729
|
-
"text": ";"
|
|
2730
|
-
}
|
|
2731
|
-
],
|
|
2732
|
-
"isStatic": false,
|
|
2733
|
-
"returnTypeTokenRange": {
|
|
2734
|
-
"startIndex": 1,
|
|
2735
|
-
"endIndex": 2
|
|
2736
|
-
},
|
|
2737
|
-
"releaseTag": "Public",
|
|
2738
|
-
"isProtected": false,
|
|
2739
|
-
"overloadIndex": 1,
|
|
2740
|
-
"parameters": [],
|
|
2741
|
-
"isOptional": false,
|
|
2742
|
-
"isAbstract": false,
|
|
2743
|
-
"name": "clearCache"
|
|
2744
|
-
},
|
|
2745
|
-
{
|
|
2746
|
-
"kind": "Method",
|
|
2747
|
-
"canonicalReference": "@savvy-web/rslib-builder!PnpmCatalog#getCatalog:member(1)",
|
|
2748
|
-
"docComment": "/**\n * Gets the PNPM catalog from pnpm-workspace.yaml.\n *\n * @remarks\n *\n * The catalog is cached based on file modification time. If the file hasn't changed since the last read, the cached version is returned.\n *\n * @returns The catalog mapping dependency names to versions\n */\n",
|
|
2749
|
-
"excerptTokens": [
|
|
2750
|
-
{
|
|
2751
|
-
"kind": "Content",
|
|
2752
|
-
"text": "getCatalog(): "
|
|
2753
|
-
},
|
|
2754
|
-
{
|
|
2755
|
-
"kind": "Reference",
|
|
2756
|
-
"text": "Promise",
|
|
2757
|
-
"canonicalReference": "!Promise:interface"
|
|
2758
|
-
},
|
|
2759
|
-
{
|
|
2760
|
-
"kind": "Content",
|
|
2761
|
-
"text": "<"
|
|
2762
|
-
},
|
|
2763
|
-
{
|
|
2764
|
-
"kind": "Reference",
|
|
2765
|
-
"text": "Record",
|
|
2766
|
-
"canonicalReference": "!Record:type"
|
|
2767
|
-
},
|
|
2768
|
-
{
|
|
2769
|
-
"kind": "Content",
|
|
2770
|
-
"text": "<string, string>>"
|
|
2771
|
-
},
|
|
2772
|
-
{
|
|
2773
|
-
"kind": "Content",
|
|
2774
|
-
"text": ";"
|
|
2775
|
-
}
|
|
2776
|
-
],
|
|
2777
|
-
"isStatic": false,
|
|
2778
|
-
"returnTypeTokenRange": {
|
|
2779
|
-
"startIndex": 1,
|
|
2780
|
-
"endIndex": 5
|
|
2781
|
-
},
|
|
2782
|
-
"releaseTag": "Public",
|
|
2783
|
-
"isProtected": false,
|
|
2784
|
-
"overloadIndex": 1,
|
|
2785
|
-
"parameters": [],
|
|
2786
|
-
"isOptional": false,
|
|
2787
|
-
"isAbstract": false,
|
|
2788
|
-
"name": "getCatalog"
|
|
2789
|
-
},
|
|
2790
|
-
{
|
|
2791
|
-
"kind": "Method",
|
|
2792
|
-
"canonicalReference": "@savvy-web/rslib-builder!PnpmCatalog#resolvePackageJson:member(1)",
|
|
2793
|
-
"docComment": "/**\n * Resolves catalog: and workspace: references in a package.json.\n *\n * @param packageJson - The package.json to resolve\n *\n * @param dir - The directory containing the package (defaults to cwd)\n *\n * @returns The resolved package.json\n *\n * @throws\n *\n * {Error} When resolution fails for critical dependencies\n */\n",
|
|
2794
|
-
"excerptTokens": [
|
|
2795
|
-
{
|
|
2796
|
-
"kind": "Content",
|
|
2797
|
-
"text": "resolvePackageJson(packageJson: "
|
|
2798
|
-
},
|
|
2799
|
-
{
|
|
2800
|
-
"kind": "Reference",
|
|
2801
|
-
"text": "PackageJson",
|
|
2802
|
-
"canonicalReference": "type-fest!PackageJson:type"
|
|
2803
|
-
},
|
|
2804
|
-
{
|
|
2805
|
-
"kind": "Content",
|
|
2806
|
-
"text": ", dir?: "
|
|
2807
|
-
},
|
|
2808
|
-
{
|
|
2809
|
-
"kind": "Content",
|
|
2810
|
-
"text": "string"
|
|
2811
|
-
},
|
|
2812
|
-
{
|
|
2813
|
-
"kind": "Content",
|
|
2814
|
-
"text": "): "
|
|
2815
|
-
},
|
|
2816
|
-
{
|
|
2817
|
-
"kind": "Reference",
|
|
2818
|
-
"text": "Promise",
|
|
2819
|
-
"canonicalReference": "!Promise:interface"
|
|
2820
|
-
},
|
|
2821
|
-
{
|
|
2822
|
-
"kind": "Content",
|
|
2823
|
-
"text": "<"
|
|
2824
|
-
},
|
|
2825
|
-
{
|
|
2826
|
-
"kind": "Reference",
|
|
2827
|
-
"text": "PackageJson",
|
|
2828
|
-
"canonicalReference": "type-fest!PackageJson:type"
|
|
2829
|
-
},
|
|
2830
|
-
{
|
|
2831
|
-
"kind": "Content",
|
|
2832
|
-
"text": ">"
|
|
2833
|
-
},
|
|
2834
|
-
{
|
|
2835
|
-
"kind": "Content",
|
|
2836
|
-
"text": ";"
|
|
2837
|
-
}
|
|
2838
|
-
],
|
|
2839
|
-
"isStatic": false,
|
|
2840
|
-
"returnTypeTokenRange": {
|
|
2841
|
-
"startIndex": 5,
|
|
2842
|
-
"endIndex": 9
|
|
2843
|
-
},
|
|
2844
|
-
"releaseTag": "Public",
|
|
2845
|
-
"isProtected": false,
|
|
2846
|
-
"overloadIndex": 1,
|
|
2847
|
-
"parameters": [
|
|
2848
|
-
{
|
|
2849
|
-
"parameterName": "packageJson",
|
|
2850
|
-
"parameterTypeTokenRange": {
|
|
2851
|
-
"startIndex": 1,
|
|
2852
|
-
"endIndex": 2
|
|
2853
|
-
},
|
|
2854
|
-
"isOptional": false
|
|
2855
|
-
},
|
|
2856
|
-
{
|
|
2857
|
-
"parameterName": "dir",
|
|
2858
|
-
"parameterTypeTokenRange": {
|
|
2859
|
-
"startIndex": 3,
|
|
2860
|
-
"endIndex": 4
|
|
2861
|
-
},
|
|
2862
|
-
"isOptional": true
|
|
2863
|
-
}
|
|
2864
|
-
],
|
|
2865
|
-
"isOptional": false,
|
|
2866
|
-
"isAbstract": false,
|
|
2867
|
-
"name": "resolvePackageJson"
|
|
2868
|
-
}
|
|
2869
|
-
],
|
|
2870
|
-
"implementsTokenRanges": []
|
|
2871
|
-
},
|
|
2872
|
-
{
|
|
2873
|
-
"kind": "TypeAlias",
|
|
2874
|
-
"canonicalReference": "@savvy-web/rslib-builder!RslibConfigAsyncFn:type",
|
|
2875
|
-
"docComment": "/**\n * Async RSLib configuration function type.\n *\n * @public\n */\n",
|
|
2876
|
-
"excerptTokens": [
|
|
2877
|
-
{
|
|
2878
|
-
"kind": "Content",
|
|
2879
|
-
"text": "export type RslibConfigAsyncFn = "
|
|
2880
|
-
},
|
|
2881
|
-
{
|
|
2882
|
-
"kind": "Content",
|
|
2883
|
-
"text": "(env: "
|
|
2884
|
-
},
|
|
2885
|
-
{
|
|
2886
|
-
"kind": "Reference",
|
|
2887
|
-
"text": "ConfigParams",
|
|
2888
|
-
"canonicalReference": "@rslib/core!ConfigParams:type"
|
|
2889
|
-
},
|
|
2890
|
-
{
|
|
2891
|
-
"kind": "Content",
|
|
2892
|
-
"text": ") => "
|
|
2893
|
-
},
|
|
2894
|
-
{
|
|
2895
|
-
"kind": "Reference",
|
|
2896
|
-
"text": "Promise",
|
|
2897
|
-
"canonicalReference": "!Promise:interface"
|
|
2898
|
-
},
|
|
2899
|
-
{
|
|
2900
|
-
"kind": "Content",
|
|
2901
|
-
"text": "<"
|
|
2902
|
-
},
|
|
2903
|
-
{
|
|
2904
|
-
"kind": "Reference",
|
|
2905
|
-
"text": "RslibConfig",
|
|
2906
|
-
"canonicalReference": "@rslib/core!RslibConfig:interface"
|
|
2907
|
-
},
|
|
2908
|
-
{
|
|
2909
|
-
"kind": "Content",
|
|
2910
|
-
"text": ">"
|
|
2911
|
-
},
|
|
2912
|
-
{
|
|
2913
|
-
"kind": "Content",
|
|
2914
|
-
"text": ";"
|
|
2915
|
-
}
|
|
2916
|
-
],
|
|
2917
|
-
"fileUrlPath": "src/rslib/builders/node-library-builder.ts",
|
|
2918
|
-
"releaseTag": "Public",
|
|
2919
|
-
"name": "RslibConfigAsyncFn",
|
|
2920
|
-
"typeTokenRange": {
|
|
2921
|
-
"startIndex": 1,
|
|
2922
|
-
"endIndex": 8
|
|
2923
|
-
}
|
|
2924
|
-
},
|
|
2925
|
-
{
|
|
2926
|
-
"kind": "Function",
|
|
2927
|
-
"canonicalReference": "@savvy-web/rslib-builder!stripSourceMapComment:function(1)",
|
|
2928
|
-
"docComment": "/**\n * Strips sourceMappingURL comment from declaration file content. This removes comments like: `//# source` + `MappingURL=index.d.ts.map`\n *\n * @remarks\n *\n * Source maps are preserved in the temp directory for API Extractor documentation but are excluded from the final dist output to reduce package size.\n *\n * @public\n */\n",
|
|
2929
|
-
"excerptTokens": [
|
|
2930
|
-
{
|
|
2931
|
-
"kind": "Content",
|
|
2932
|
-
"text": "export declare function stripSourceMapComment(content: "
|
|
2933
|
-
},
|
|
2934
|
-
{
|
|
2935
|
-
"kind": "Content",
|
|
2936
|
-
"text": "string"
|
|
2937
|
-
},
|
|
2938
|
-
{
|
|
2939
|
-
"kind": "Content",
|
|
2940
|
-
"text": "): "
|
|
2941
|
-
},
|
|
2942
|
-
{
|
|
2943
|
-
"kind": "Content",
|
|
2944
|
-
"text": "string"
|
|
2945
|
-
},
|
|
2946
|
-
{
|
|
2947
|
-
"kind": "Content",
|
|
2948
|
-
"text": ";"
|
|
2949
|
-
}
|
|
2950
|
-
],
|
|
2951
|
-
"fileUrlPath": "src/rslib/plugins/dts-plugin.ts",
|
|
2952
|
-
"returnTypeTokenRange": {
|
|
2953
|
-
"startIndex": 3,
|
|
2954
|
-
"endIndex": 4
|
|
2955
|
-
},
|
|
2956
|
-
"releaseTag": "Public",
|
|
2957
|
-
"overloadIndex": 1,
|
|
2958
|
-
"parameters": [
|
|
2959
|
-
{
|
|
2960
|
-
"parameterName": "content",
|
|
2961
|
-
"parameterTypeTokenRange": {
|
|
2962
|
-
"startIndex": 1,
|
|
2963
|
-
"endIndex": 2
|
|
2964
|
-
},
|
|
2965
|
-
"isOptional": false
|
|
2966
|
-
}
|
|
2967
|
-
],
|
|
2968
|
-
"name": "stripSourceMapComment"
|
|
2969
|
-
},
|
|
2970
|
-
{
|
|
2971
|
-
"kind": "TypeAlias",
|
|
2972
|
-
"canonicalReference": "@savvy-web/rslib-builder!TransformPackageJsonFn:type",
|
|
2973
|
-
"docComment": "/**\n * @public\n */\n",
|
|
2974
|
-
"excerptTokens": [
|
|
2975
|
-
{
|
|
2976
|
-
"kind": "Content",
|
|
2977
|
-
"text": "export type TransformPackageJsonFn = "
|
|
2978
|
-
},
|
|
2979
|
-
{
|
|
2980
|
-
"kind": "Content",
|
|
2981
|
-
"text": "(context: {\n target: "
|
|
2982
|
-
},
|
|
2983
|
-
{
|
|
2984
|
-
"kind": "Reference",
|
|
2985
|
-
"text": "BuildTarget",
|
|
2986
|
-
"canonicalReference": "@savvy-web/rslib-builder!BuildTarget:type"
|
|
2987
|
-
},
|
|
2988
|
-
{
|
|
2989
|
-
"kind": "Content",
|
|
2990
|
-
"text": ";\n pkg: "
|
|
2991
|
-
},
|
|
2992
|
-
{
|
|
2993
|
-
"kind": "Reference",
|
|
2994
|
-
"text": "PackageJson",
|
|
2995
|
-
"canonicalReference": "type-fest!PackageJson:type"
|
|
2996
|
-
},
|
|
2997
|
-
{
|
|
2998
|
-
"kind": "Content",
|
|
2999
|
-
"text": ";\n}) => "
|
|
3000
|
-
},
|
|
3001
|
-
{
|
|
3002
|
-
"kind": "Reference",
|
|
3003
|
-
"text": "PackageJson",
|
|
3004
|
-
"canonicalReference": "type-fest!PackageJson:type"
|
|
3005
|
-
},
|
|
3006
|
-
{
|
|
3007
|
-
"kind": "Content",
|
|
3008
|
-
"text": ";"
|
|
3009
|
-
}
|
|
3010
|
-
],
|
|
3011
|
-
"fileUrlPath": "src/rslib/builders/node-library-builder.ts",
|
|
3012
|
-
"releaseTag": "Public",
|
|
3013
|
-
"name": "TransformPackageJsonFn",
|
|
3014
|
-
"typeTokenRange": {
|
|
3015
|
-
"startIndex": 1,
|
|
3016
|
-
"endIndex": 7
|
|
3017
|
-
}
|
|
3018
|
-
}
|
|
3019
|
-
]
|
|
3020
|
-
}
|
|
3021
|
-
]
|
|
3022
|
-
}
|