boltdocs 2.9.1 → 2.9.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.
Files changed (62) hide show
  1. package/dist/adapters-HVuXENAe.mjs +6 -0
  2. package/dist/adapters-uGz-UKQa.cjs +6 -0
  3. package/dist/client/index.cjs +2 -2
  4. package/dist/client/index.js +2 -2
  5. package/dist/client/mdx.cjs +1 -1
  6. package/dist/client/mdx.js +1 -1
  7. package/dist/client/primitives.cjs +1 -1
  8. package/dist/client/primitives.js +1 -1
  9. package/dist/config-BCqkPkjC.mjs +7 -0
  10. package/dist/{config-GPVEdeon.mjs → config-BPWGa2W3.mjs} +1 -1
  11. package/dist/{config-kIQOJHXC.cjs → config-CnmfjOE4.cjs} +1 -1
  12. package/dist/config-D7ERJhqe.cjs +7 -0
  13. package/dist/{csp-RJyh0nHV.mjs → csp-CUAEgrxR.mjs} +1 -1
  14. package/dist/{doctor-DzEgMMRo.cjs → doctor-A17UhTRn.cjs} +1 -1
  15. package/dist/{doctor-D8fl3Sbg.cjs → doctor-BL6c8x2Q.cjs} +1 -1
  16. package/dist/{doctor-C19DsI1e.mjs → doctor-hKOBLhBF.mjs} +1 -1
  17. package/dist/{headers-HD_qTVVW.mjs → headers-DBzZ9yC6.mjs} +1 -1
  18. package/dist/{image-CjYu9Eml.js → image-BCDyLHyD.js} +1 -4
  19. package/dist/{image-B9YA_oQ_.cjs → image-DWdmichO.cjs} +1 -4
  20. package/dist/index-ZqgZUvwp.d.mts +274 -0
  21. package/dist/index-aWC0KjDF.d.cts +274 -0
  22. package/dist/{mdx-WXjAMS8Y.cjs → mdx-9QJoSITt.cjs} +1 -1
  23. package/dist/{mdx-Cy_c2zio.js → mdx-DFbspTP9.js} +1 -1
  24. package/dist/node/cli-entry.cjs +3 -3
  25. package/dist/node/cli-entry.mjs +3 -3
  26. package/dist/node/index.cjs +1 -1
  27. package/dist/node/index.d.cts +1 -271
  28. package/dist/node/index.d.mts +2 -273
  29. package/dist/node/index.mjs +1 -1
  30. package/dist/node/routes/worker.cjs +1 -1
  31. package/dist/node/routes/worker.mjs +1 -1
  32. package/dist/node-B-I15rGR.cjs +105 -0
  33. package/dist/node-FkxzriO7.mjs +105 -0
  34. package/dist/{package-ByXh2JHp.cjs → package-CVw_u5VT.cjs} +1 -1
  35. package/dist/{package-DQBAV8uo.mjs → package-D6O7a8qA.mjs} +1 -1
  36. package/dist/{parser-IR9tfyGE.mjs → parser-8u0xHVc7.mjs} +1 -1
  37. package/dist/{parser-B8naUXl2.cjs → parser-CHsNUEhU.cjs} +1 -1
  38. package/dist/{plugin-BkquLpOI.mjs → plugin-CHa0IT49.mjs} +4 -4
  39. package/dist/plugin-Dqj9plKB.cjs +61 -0
  40. package/dist/{routes-DX8ryKjs.cjs → routes-B2joDAlC.cjs} +1 -1
  41. package/dist/{routes-DR13Y1em.mjs → routes-BTx0ngdX.mjs} +1 -1
  42. package/dist/{routes-TUSK5wD7.mjs → routes-Bm0CQvyL.mjs} +1 -1
  43. package/dist/{routes-DgTQxpZi.cjs → routes-CyKj3dzf.cjs} +1 -1
  44. package/dist/server/index.cjs +6 -0
  45. package/dist/server/index.d.cts +3 -0
  46. package/dist/server/index.d.mts +3 -0
  47. package/dist/server/index.mjs +6 -0
  48. package/package.json +6 -1
  49. package/dist/config-BqZUYono.cjs +0 -7
  50. package/dist/config-DBKBEj3j.mjs +0 -7
  51. package/dist/node-B7qbjtLl.mjs +0 -105
  52. package/dist/node-Dj3-2YYP.cjs +0 -105
  53. package/dist/plugin-CL1LsQXk.cjs +0 -61
  54. /package/dist/{csp-CBysWlAf.cjs → csp-DbbF3R9Q.cjs} +0 -0
  55. /package/dist/{generator-B6lrnDZ-.mjs → generator-BaSvGlxR.mjs} +0 -0
  56. /package/dist/{generator-DtUU3Cfk.cjs → generator-DsajVrDx.cjs} +0 -0
  57. /package/dist/{headers-BJ4jJAhU.cjs → headers-DuCAOgYX.cjs} +0 -0
  58. /package/dist/{meta-loader-CxAoQthW.mjs → meta-loader-CD3Yptr5.mjs} +0 -0
  59. /package/dist/{meta-loader-C9MKjAs0.cjs → meta-loader-CjphwtS7.cjs} +0 -0
  60. /package/dist/{parser-D4oEyuP-.cjs → parser-CLtGv_XH.cjs} +0 -0
  61. /package/dist/{worker-pool-m81xuM5v.cjs → worker-pool-CgOMozUz.cjs} +0 -0
  62. /package/dist/{worker-pool-C6r6V05j.mjs → worker-pool-v6tW2MDQ.mjs} +0 -0
@@ -0,0 +1,274 @@
1
+
2
+ import { VercelRequest, VercelResponse } from "@vercel/node";
3
+ import { HandlerEvent, HandlerResponse } from "@netlify/functions";
4
+ import { Writable } from "node:stream";
5
+
6
+ //#region src/node/feedback/adapters/vercel.d.ts
7
+ declare function handleVercelFeedback(req: VercelRequest, res: VercelResponse): Promise<VercelResponse | undefined>;
8
+ //#endregion
9
+ //#region src/node/feedback/adapters/netlify.d.ts
10
+ declare function handleNetlifyFeedback(event: HandlerEvent, env?: Record<string, string | undefined>): Promise<HandlerResponse>;
11
+ //#endregion
12
+ //#region src/node/feedback/adapters/web.d.ts
13
+ declare function handleWebFeedback(request: Request, env?: Record<string, string | undefined>): Promise<Response>;
14
+ //#endregion
15
+ //#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.161/node_modules/@types/aws-lambda/common/api-gateway.d.ts
16
+ // Default authorizer type, prefer using a specific type with the "...WithAuthorizer..." variant types.
17
+ // Note that this doesn't have to be a context from a custom lambda outhorizer, AWS also has a cognito
18
+ // authorizer type and could add more, so the property won't always be a string.
19
+ type APIGatewayEventDefaultAuthorizerContext = undefined | null | {
20
+ [name: string]: any;
21
+ };
22
+ // The requestContext property of both request authorizer and proxy integration events.
23
+ interface APIGatewayEventRequestContextWithAuthorizer<TAuthorizerContext> {
24
+ accountId: string;
25
+ apiId: string; // This one is a bit confusing: it is not actually present in authorizer calls
26
+ // and proxy calls without an authorizer. We model this by allowing undefined in the type,
27
+ // since it ends up the same and avoids breaking users that are testing the property.
28
+ // This lets us allow parameterizing the authorizer for proxy events that know what authorizer
29
+ // context values they have.
30
+ authorizer: TAuthorizerContext;
31
+ connectedAt?: number | undefined;
32
+ connectionId?: string | undefined;
33
+ domainName?: string | undefined;
34
+ domainPrefix?: string | undefined;
35
+ eventType?: string | undefined;
36
+ extendedRequestId?: string | undefined;
37
+ protocol: string;
38
+ httpMethod: string;
39
+ identity: APIGatewayEventIdentity;
40
+ messageDirection?: string | undefined;
41
+ messageId?: string | null | undefined;
42
+ path: string;
43
+ stage: string;
44
+ requestId: string;
45
+ requestTime?: string | undefined;
46
+ requestTimeEpoch: number;
47
+ resourceId: string;
48
+ resourcePath: string;
49
+ routeKey?: string | undefined;
50
+ }
51
+ interface APIGatewayEventClientCertificate {
52
+ clientCertPem: string;
53
+ serialNumber: string;
54
+ subjectDN: string;
55
+ issuerDN: string;
56
+ validity: {
57
+ notAfter: string;
58
+ notBefore: string;
59
+ };
60
+ }
61
+ interface APIGatewayEventIdentity {
62
+ accessKey: string | null;
63
+ accountId: string | null;
64
+ apiKey: string | null;
65
+ apiKeyId: string | null;
66
+ caller: string | null;
67
+ clientCert: APIGatewayEventClientCertificate | null;
68
+ cognitoAuthenticationProvider: string | null;
69
+ cognitoAuthenticationType: string | null;
70
+ cognitoIdentityId: string | null;
71
+ cognitoIdentityPoolId: string | null;
72
+ principalOrgId: string | null;
73
+ sourceIp: string;
74
+ user: string | null;
75
+ userAgent: string | null;
76
+ userArn: string | null;
77
+ vpcId?: string | undefined;
78
+ vpceId?: string | undefined;
79
+ }
80
+ //#endregion
81
+ //#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.161/node_modules/@types/aws-lambda/handler.d.ts
82
+ /**
83
+ * {@link Handler} context parameter.
84
+ * See {@link https://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html AWS documentation}.
85
+ */
86
+ interface Context {
87
+ callbackWaitsForEmptyEventLoop: boolean;
88
+ functionName: string;
89
+ functionVersion: string;
90
+ invokedFunctionArn: string;
91
+ memoryLimitInMB: string;
92
+ awsRequestId: string;
93
+ logGroupName: string;
94
+ logStreamName: string;
95
+ identity?: CognitoIdentity | undefined;
96
+ clientContext?: ClientContext | undefined;
97
+ tenantId?: string | undefined;
98
+ getRemainingTimeInMillis(): number; // Functions for compatibility with earlier Node.js Runtime v0.10.42
99
+ // No longer documented, so they are deprecated, but they still work
100
+ // as of the 12.x runtime, so they are not removed from the types.
101
+ /** @deprecated Use handler callback or promise result */
102
+ done(error?: Error, result?: any): void;
103
+ /** @deprecated Use handler callback with first argument or reject a promise result */
104
+ fail(error: Error | string): void;
105
+ /** @deprecated Use handler callback with second argument or resolve a promise result */
106
+ succeed(messageOrObject: any): void; // Unclear what behavior this is supposed to have, I couldn't find any still extant reference,
107
+ // and it behaves like the above, ignoring the object parameter.
108
+ /** @deprecated Use handler callback or promise result */
109
+ succeed(message: string, object: any): void;
110
+ }
111
+ interface CognitoIdentity {
112
+ cognitoIdentityId: string;
113
+ cognitoIdentityPoolId: string;
114
+ }
115
+ interface ClientContext {
116
+ client: ClientContextClient;
117
+ custom?: any;
118
+ env: ClientContextEnv;
119
+ }
120
+ interface ClientContextClient {
121
+ installationId: string;
122
+ appTitle: string;
123
+ appVersionName: string;
124
+ appVersionCode: string;
125
+ appPackageName: string;
126
+ }
127
+ interface ClientContextEnv {
128
+ platformVersion: string;
129
+ platform: string;
130
+ make: string;
131
+ model: string;
132
+ locale: string;
133
+ }
134
+ /**
135
+ * Interface for using response streaming from AWS Lambda.
136
+ * To indicate to the runtime that Lambda should stream your function’s responses, you must wrap your function handler with the `awslambda.streamifyResponse()` decorator.
137
+ *
138
+ * The `streamifyResponse` decorator accepts the following additional parameter, `responseStream`, besides the default node handler parameters, `event`, and `context`.
139
+ * The new `responseStream` object provides a stream object that your function can write data to. Data written to this stream is sent immediately to the client. You can optionally set the Content-Type header of the response to pass additional metadata to your client about the contents of the stream.
140
+ *
141
+ * {@link https://aws.amazon.com/blogs/compute/introducing-aws-lambda-response-streaming/ AWS blog post}
142
+ * {@link https://docs.aws.amazon.com/lambda/latest/dg/config-rs-write-functions.html AWS documentation}
143
+ *
144
+ * @example <caption>Writing to the response stream</caption>
145
+ * import 'aws-lambda';
146
+ *
147
+ * export const handler = awslambda.streamifyResponse(
148
+ * async (event, responseStream, context) => {
149
+ * responseStream.setContentType("text/plain");
150
+ * responseStream.write("Hello, world!");
151
+ * responseStream.end();
152
+ * }
153
+ * );
154
+ *
155
+ * @example <caption>Using pipeline</caption>
156
+ * import 'aws-lambda';
157
+ * import { Readable } from 'stream';
158
+ * import { pipeline } from 'stream/promises';
159
+ * import zlib from 'zlib';
160
+ *
161
+ * export const handler = awslambda.streamifyResponse(
162
+ * async (event, responseStream, context) => {
163
+ * // As an example, convert event to a readable stream.
164
+ * const requestStream = Readable.from(Buffer.from(JSON.stringify(event)));
165
+ *
166
+ * await pipeline(requestStream, zlib.createGzip(), responseStream);
167
+ * }
168
+ * );
169
+ */
170
+ type StreamifyHandler<TEvent = any, TResult = any> = (event: TEvent, responseStream: awslambda.HttpResponseStream, context: Context) => TResult | Promise<TResult>;
171
+ declare global {
172
+ namespace awslambda {
173
+ class HttpResponseStream extends Writable {
174
+ static from(writable: Writable, metadata: Record<string, unknown>): HttpResponseStream;
175
+ setContentType: (contentType: string) => void;
176
+ }
177
+ /**
178
+ * Decorator for using response streaming from AWS Lambda.
179
+ * To indicate to the runtime that Lambda should stream your function’s responses, you must wrap your function handler with the `awslambda.streamifyResponse()` decorator.
180
+ *
181
+ * The `streamifyResponse` decorator accepts the following additional parameter, `responseStream`, besides the default node handler parameters, `event`, and `context`.
182
+ * The new `responseStream` object provides a stream object that your function can write data to. Data written to this stream is sent immediately to the client. You can optionally set the Content-Type header of the response to pass additional metadata to your client about the contents of the stream.
183
+ *
184
+ * {@link https://aws.amazon.com/blogs/compute/introducing-aws-lambda-response-streaming/ AWS blog post}
185
+ * {@link https://docs.aws.amazon.com/lambda/latest/dg/config-rs-write-functions.html AWS documentation}
186
+ *
187
+ * @example <caption>Writing to the response stream</caption>
188
+ * import 'aws-lambda';
189
+ *
190
+ * export const handler = awslambda.streamifyResponse(
191
+ * async (event, responseStream, context) => {
192
+ * responseStream.setContentType("text/plain");
193
+ * responseStream.write("Hello, world!");
194
+ * responseStream.end();
195
+ * }
196
+ * );
197
+ *
198
+ * @example <caption>Using pipeline</caption>
199
+ * import 'aws-lambda';
200
+ * import { Readable } from 'stream';
201
+ * import { pipeline } from 'stream/promises';
202
+ * import zlib from 'zlib';
203
+ *
204
+ * export const handler = awslambda.streamifyResponse(
205
+ * async (event, responseStream, context) => {
206
+ * // As an example, convert event to a readable stream.
207
+ * const requestStream = Readable.from(Buffer.from(JSON.stringify(event)));
208
+ *
209
+ * await pipeline(requestStream, zlib.createGzip(), responseStream);
210
+ * }
211
+ * );
212
+ */
213
+ function streamifyResponse<TEvent = any, TResult = void>(handler: StreamifyHandler<TEvent, TResult>): StreamifyHandler<TEvent, TResult>;
214
+ }
215
+ }
216
+ //#endregion
217
+ //#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.161/node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts
218
+ /**
219
+ * Works with Lambda Proxy Integration for Rest API or HTTP API integration Payload Format version 1.0
220
+ * @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
221
+ */
222
+ type APIGatewayProxyEvent = APIGatewayProxyEventBase<APIGatewayEventDefaultAuthorizerContext>;
223
+ interface APIGatewayProxyEventHeaders {
224
+ [name: string]: string | undefined;
225
+ }
226
+ interface APIGatewayProxyEventMultiValueHeaders {
227
+ [name: string]: string[] | undefined;
228
+ }
229
+ interface APIGatewayProxyEventPathParameters {
230
+ [name: string]: string | undefined;
231
+ }
232
+ interface APIGatewayProxyEventQueryStringParameters {
233
+ [name: string]: string | undefined;
234
+ }
235
+ interface APIGatewayProxyEventMultiValueQueryStringParameters {
236
+ [name: string]: string[] | undefined;
237
+ }
238
+ interface APIGatewayProxyEventStageVariables {
239
+ [name: string]: string | undefined;
240
+ }
241
+ interface APIGatewayProxyEventBase<TAuthorizerContext> {
242
+ body: string | null;
243
+ headers: APIGatewayProxyEventHeaders;
244
+ multiValueHeaders: APIGatewayProxyEventMultiValueHeaders;
245
+ httpMethod: string;
246
+ isBase64Encoded: boolean;
247
+ path: string;
248
+ pathParameters: APIGatewayProxyEventPathParameters | null;
249
+ queryStringParameters: APIGatewayProxyEventQueryStringParameters | null;
250
+ multiValueQueryStringParameters: APIGatewayProxyEventMultiValueQueryStringParameters | null;
251
+ stageVariables: APIGatewayProxyEventStageVariables | null;
252
+ requestContext: APIGatewayEventRequestContextWithAuthorizer<TAuthorizerContext>;
253
+ resource: string;
254
+ }
255
+ /**
256
+ * Works with Lambda Proxy Integration for Rest API or HTTP API integration Payload Format version 1.0
257
+ * @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
258
+ */
259
+ interface APIGatewayProxyResult {
260
+ statusCode: number;
261
+ headers?: {
262
+ [header: string]: boolean | number | string;
263
+ } | undefined;
264
+ multiValueHeaders?: {
265
+ [header: string]: Array<boolean | number | string>;
266
+ } | undefined;
267
+ body: string;
268
+ isBase64Encoded?: boolean | undefined;
269
+ }
270
+ //#endregion
271
+ //#region src/node/feedback/adapters/aws.d.ts
272
+ declare function handleAwsFeedback(event: APIGatewayProxyEvent, env?: Record<string, string | undefined>): Promise<APIGatewayProxyResult>;
273
+ //#endregion
274
+ export { handleVercelFeedback as i, handleWebFeedback as n, handleNetlifyFeedback as r, handleAwsFeedback as t };
@@ -0,0 +1,274 @@
1
+
2
+ import { VercelRequest, VercelResponse } from "@vercel/node";
3
+ import { HandlerEvent, HandlerResponse } from "@netlify/functions";
4
+ import { Writable } from "node:stream";
5
+
6
+ //#region src/node/feedback/adapters/vercel.d.ts
7
+ declare function handleVercelFeedback(req: VercelRequest, res: VercelResponse): Promise<VercelResponse | undefined>;
8
+ //#endregion
9
+ //#region src/node/feedback/adapters/netlify.d.ts
10
+ declare function handleNetlifyFeedback(event: HandlerEvent, env?: Record<string, string | undefined>): Promise<HandlerResponse>;
11
+ //#endregion
12
+ //#region src/node/feedback/adapters/web.d.ts
13
+ declare function handleWebFeedback(request: Request, env?: Record<string, string | undefined>): Promise<Response>;
14
+ //#endregion
15
+ //#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.161/node_modules/@types/aws-lambda/common/api-gateway.d.ts
16
+ // Default authorizer type, prefer using a specific type with the "...WithAuthorizer..." variant types.
17
+ // Note that this doesn't have to be a context from a custom lambda outhorizer, AWS also has a cognito
18
+ // authorizer type and could add more, so the property won't always be a string.
19
+ type APIGatewayEventDefaultAuthorizerContext = undefined | null | {
20
+ [name: string]: any;
21
+ };
22
+ // The requestContext property of both request authorizer and proxy integration events.
23
+ interface APIGatewayEventRequestContextWithAuthorizer<TAuthorizerContext> {
24
+ accountId: string;
25
+ apiId: string; // This one is a bit confusing: it is not actually present in authorizer calls
26
+ // and proxy calls without an authorizer. We model this by allowing undefined in the type,
27
+ // since it ends up the same and avoids breaking users that are testing the property.
28
+ // This lets us allow parameterizing the authorizer for proxy events that know what authorizer
29
+ // context values they have.
30
+ authorizer: TAuthorizerContext;
31
+ connectedAt?: number | undefined;
32
+ connectionId?: string | undefined;
33
+ domainName?: string | undefined;
34
+ domainPrefix?: string | undefined;
35
+ eventType?: string | undefined;
36
+ extendedRequestId?: string | undefined;
37
+ protocol: string;
38
+ httpMethod: string;
39
+ identity: APIGatewayEventIdentity;
40
+ messageDirection?: string | undefined;
41
+ messageId?: string | null | undefined;
42
+ path: string;
43
+ stage: string;
44
+ requestId: string;
45
+ requestTime?: string | undefined;
46
+ requestTimeEpoch: number;
47
+ resourceId: string;
48
+ resourcePath: string;
49
+ routeKey?: string | undefined;
50
+ }
51
+ interface APIGatewayEventClientCertificate {
52
+ clientCertPem: string;
53
+ serialNumber: string;
54
+ subjectDN: string;
55
+ issuerDN: string;
56
+ validity: {
57
+ notAfter: string;
58
+ notBefore: string;
59
+ };
60
+ }
61
+ interface APIGatewayEventIdentity {
62
+ accessKey: string | null;
63
+ accountId: string | null;
64
+ apiKey: string | null;
65
+ apiKeyId: string | null;
66
+ caller: string | null;
67
+ clientCert: APIGatewayEventClientCertificate | null;
68
+ cognitoAuthenticationProvider: string | null;
69
+ cognitoAuthenticationType: string | null;
70
+ cognitoIdentityId: string | null;
71
+ cognitoIdentityPoolId: string | null;
72
+ principalOrgId: string | null;
73
+ sourceIp: string;
74
+ user: string | null;
75
+ userAgent: string | null;
76
+ userArn: string | null;
77
+ vpcId?: string | undefined;
78
+ vpceId?: string | undefined;
79
+ }
80
+ //#endregion
81
+ //#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.161/node_modules/@types/aws-lambda/handler.d.ts
82
+ /**
83
+ * {@link Handler} context parameter.
84
+ * See {@link https://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html AWS documentation}.
85
+ */
86
+ interface Context {
87
+ callbackWaitsForEmptyEventLoop: boolean;
88
+ functionName: string;
89
+ functionVersion: string;
90
+ invokedFunctionArn: string;
91
+ memoryLimitInMB: string;
92
+ awsRequestId: string;
93
+ logGroupName: string;
94
+ logStreamName: string;
95
+ identity?: CognitoIdentity | undefined;
96
+ clientContext?: ClientContext | undefined;
97
+ tenantId?: string | undefined;
98
+ getRemainingTimeInMillis(): number; // Functions for compatibility with earlier Node.js Runtime v0.10.42
99
+ // No longer documented, so they are deprecated, but they still work
100
+ // as of the 12.x runtime, so they are not removed from the types.
101
+ /** @deprecated Use handler callback or promise result */
102
+ done(error?: Error, result?: any): void;
103
+ /** @deprecated Use handler callback with first argument or reject a promise result */
104
+ fail(error: Error | string): void;
105
+ /** @deprecated Use handler callback with second argument or resolve a promise result */
106
+ succeed(messageOrObject: any): void; // Unclear what behavior this is supposed to have, I couldn't find any still extant reference,
107
+ // and it behaves like the above, ignoring the object parameter.
108
+ /** @deprecated Use handler callback or promise result */
109
+ succeed(message: string, object: any): void;
110
+ }
111
+ interface CognitoIdentity {
112
+ cognitoIdentityId: string;
113
+ cognitoIdentityPoolId: string;
114
+ }
115
+ interface ClientContext {
116
+ client: ClientContextClient;
117
+ custom?: any;
118
+ env: ClientContextEnv;
119
+ }
120
+ interface ClientContextClient {
121
+ installationId: string;
122
+ appTitle: string;
123
+ appVersionName: string;
124
+ appVersionCode: string;
125
+ appPackageName: string;
126
+ }
127
+ interface ClientContextEnv {
128
+ platformVersion: string;
129
+ platform: string;
130
+ make: string;
131
+ model: string;
132
+ locale: string;
133
+ }
134
+ /**
135
+ * Interface for using response streaming from AWS Lambda.
136
+ * To indicate to the runtime that Lambda should stream your function’s responses, you must wrap your function handler with the `awslambda.streamifyResponse()` decorator.
137
+ *
138
+ * The `streamifyResponse` decorator accepts the following additional parameter, `responseStream`, besides the default node handler parameters, `event`, and `context`.
139
+ * The new `responseStream` object provides a stream object that your function can write data to. Data written to this stream is sent immediately to the client. You can optionally set the Content-Type header of the response to pass additional metadata to your client about the contents of the stream.
140
+ *
141
+ * {@link https://aws.amazon.com/blogs/compute/introducing-aws-lambda-response-streaming/ AWS blog post}
142
+ * {@link https://docs.aws.amazon.com/lambda/latest/dg/config-rs-write-functions.html AWS documentation}
143
+ *
144
+ * @example <caption>Writing to the response stream</caption>
145
+ * import 'aws-lambda';
146
+ *
147
+ * export const handler = awslambda.streamifyResponse(
148
+ * async (event, responseStream, context) => {
149
+ * responseStream.setContentType("text/plain");
150
+ * responseStream.write("Hello, world!");
151
+ * responseStream.end();
152
+ * }
153
+ * );
154
+ *
155
+ * @example <caption>Using pipeline</caption>
156
+ * import 'aws-lambda';
157
+ * import { Readable } from 'stream';
158
+ * import { pipeline } from 'stream/promises';
159
+ * import zlib from 'zlib';
160
+ *
161
+ * export const handler = awslambda.streamifyResponse(
162
+ * async (event, responseStream, context) => {
163
+ * // As an example, convert event to a readable stream.
164
+ * const requestStream = Readable.from(Buffer.from(JSON.stringify(event)));
165
+ *
166
+ * await pipeline(requestStream, zlib.createGzip(), responseStream);
167
+ * }
168
+ * );
169
+ */
170
+ type StreamifyHandler<TEvent = any, TResult = any> = (event: TEvent, responseStream: awslambda.HttpResponseStream, context: Context) => TResult | Promise<TResult>;
171
+ declare global {
172
+ namespace awslambda {
173
+ class HttpResponseStream extends Writable {
174
+ static from(writable: Writable, metadata: Record<string, unknown>): HttpResponseStream;
175
+ setContentType: (contentType: string) => void;
176
+ }
177
+ /**
178
+ * Decorator for using response streaming from AWS Lambda.
179
+ * To indicate to the runtime that Lambda should stream your function’s responses, you must wrap your function handler with the `awslambda.streamifyResponse()` decorator.
180
+ *
181
+ * The `streamifyResponse` decorator accepts the following additional parameter, `responseStream`, besides the default node handler parameters, `event`, and `context`.
182
+ * The new `responseStream` object provides a stream object that your function can write data to. Data written to this stream is sent immediately to the client. You can optionally set the Content-Type header of the response to pass additional metadata to your client about the contents of the stream.
183
+ *
184
+ * {@link https://aws.amazon.com/blogs/compute/introducing-aws-lambda-response-streaming/ AWS blog post}
185
+ * {@link https://docs.aws.amazon.com/lambda/latest/dg/config-rs-write-functions.html AWS documentation}
186
+ *
187
+ * @example <caption>Writing to the response stream</caption>
188
+ * import 'aws-lambda';
189
+ *
190
+ * export const handler = awslambda.streamifyResponse(
191
+ * async (event, responseStream, context) => {
192
+ * responseStream.setContentType("text/plain");
193
+ * responseStream.write("Hello, world!");
194
+ * responseStream.end();
195
+ * }
196
+ * );
197
+ *
198
+ * @example <caption>Using pipeline</caption>
199
+ * import 'aws-lambda';
200
+ * import { Readable } from 'stream';
201
+ * import { pipeline } from 'stream/promises';
202
+ * import zlib from 'zlib';
203
+ *
204
+ * export const handler = awslambda.streamifyResponse(
205
+ * async (event, responseStream, context) => {
206
+ * // As an example, convert event to a readable stream.
207
+ * const requestStream = Readable.from(Buffer.from(JSON.stringify(event)));
208
+ *
209
+ * await pipeline(requestStream, zlib.createGzip(), responseStream);
210
+ * }
211
+ * );
212
+ */
213
+ function streamifyResponse<TEvent = any, TResult = void>(handler: StreamifyHandler<TEvent, TResult>): StreamifyHandler<TEvent, TResult>;
214
+ }
215
+ }
216
+ //#endregion
217
+ //#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.161/node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts
218
+ /**
219
+ * Works with Lambda Proxy Integration for Rest API or HTTP API integration Payload Format version 1.0
220
+ * @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
221
+ */
222
+ type APIGatewayProxyEvent = APIGatewayProxyEventBase<APIGatewayEventDefaultAuthorizerContext>;
223
+ interface APIGatewayProxyEventHeaders {
224
+ [name: string]: string | undefined;
225
+ }
226
+ interface APIGatewayProxyEventMultiValueHeaders {
227
+ [name: string]: string[] | undefined;
228
+ }
229
+ interface APIGatewayProxyEventPathParameters {
230
+ [name: string]: string | undefined;
231
+ }
232
+ interface APIGatewayProxyEventQueryStringParameters {
233
+ [name: string]: string | undefined;
234
+ }
235
+ interface APIGatewayProxyEventMultiValueQueryStringParameters {
236
+ [name: string]: string[] | undefined;
237
+ }
238
+ interface APIGatewayProxyEventStageVariables {
239
+ [name: string]: string | undefined;
240
+ }
241
+ interface APIGatewayProxyEventBase<TAuthorizerContext> {
242
+ body: string | null;
243
+ headers: APIGatewayProxyEventHeaders;
244
+ multiValueHeaders: APIGatewayProxyEventMultiValueHeaders;
245
+ httpMethod: string;
246
+ isBase64Encoded: boolean;
247
+ path: string;
248
+ pathParameters: APIGatewayProxyEventPathParameters | null;
249
+ queryStringParameters: APIGatewayProxyEventQueryStringParameters | null;
250
+ multiValueQueryStringParameters: APIGatewayProxyEventMultiValueQueryStringParameters | null;
251
+ stageVariables: APIGatewayProxyEventStageVariables | null;
252
+ requestContext: APIGatewayEventRequestContextWithAuthorizer<TAuthorizerContext>;
253
+ resource: string;
254
+ }
255
+ /**
256
+ * Works with Lambda Proxy Integration for Rest API or HTTP API integration Payload Format version 1.0
257
+ * @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
258
+ */
259
+ interface APIGatewayProxyResult {
260
+ statusCode: number;
261
+ headers?: {
262
+ [header: string]: boolean | number | string;
263
+ } | undefined;
264
+ multiValueHeaders?: {
265
+ [header: string]: Array<boolean | number | string>;
266
+ } | undefined;
267
+ body: string;
268
+ isBase64Encoded?: boolean | undefined;
269
+ }
270
+ //#endregion
271
+ //#region src/node/feedback/adapters/aws.d.ts
272
+ declare function handleAwsFeedback(event: APIGatewayProxyEvent, env?: Record<string, string | undefined>): Promise<APIGatewayProxyResult>;
273
+ //#endregion
274
+ export { handleVercelFeedback as i, handleWebFeedback as n, handleNetlifyFeedback as r, handleAwsFeedback as t };
@@ -4,7 +4,7 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  const require_icons_dev = require('./icons-dev-BryEFkJu.cjs');
7
- const require_image = require('./image-B9YA_oQ_.cjs');
7
+ const require_image = require('./image-DWdmichO.cjs');
8
8
  let react = require("react");
9
9
  let react_jsx_runtime = require("react/jsx-runtime");
10
10
  let react_aria_components = require("react-aria-components");
@@ -4,7 +4,7 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  import { D as Check, H as Info, M as Copy, R as File, T as AlertTriangle, W as Lightbulb, _ as Link, a as Csv, c as JavaScript, d as React$1, f as Rust, g as Yaml, i as Css, l as Json, m as TypeScript, n as BracketsOrange, p as Shell, r as BracketsRed, rt as useConfig, u as Markdown, w as AlertCircle, y as cn } from "./icons-dev-kJyGWNeg.js";
7
- import { a as CodeBlockGroup, i as CodeBlockContent, l as useTheme, n as Tooltip, o as CodeBlockHeader, r as CodeBlock$1, s as Heading$1, t as Image$1 } from "./image-CjYu9Eml.js";
7
+ import { a as CodeBlockGroup, i as CodeBlockContent, l as useTheme, n as Tooltip, o as CodeBlockHeader, r as CodeBlock$1, s as Heading$1, t as Image$1 } from "./image-BCDyLHyD.js";
8
8
  import { useCallback, useEffect, useRef, useState } from "react";
9
9
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
10
  import { Button } from "react-aria-components";
@@ -4,12 +4,12 @@
4
4
  * Copyright (c) 2026 Jesus Alcala
5
5
  * Licensed under the MIT License.
6
6
  */
7
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../chunk-Ds5LZdWN.cjs`),t=require(`../node-Dj3-2YYP.cjs`),n=require(`../config-BqZUYono.cjs`),r=require(`../cache-B19MLTpN.cjs`);let i=require(`node:path`);i=e.n(i);let a=require(`node:fs`);a=e.n(a);let o=require(`@bdocs/dui`),s=require(`vite`),c=require(`node:module`),l=require(`node:fs/promises`);l=e.n(l);let u=require(`@bdocs/ssg/node`),d=require(`cac`);d=e.n(d);let f=require(`node:os`);f=e.n(f);let p=require(`node:url`);function m(e){let t=e;for(;t&&t!==i.default.dirname(t);){if(a.default.existsSync(i.default.join(t,`.git`))||a.default.existsSync(i.default.join(t,`pnpm-workspace.yaml`)))return t;t=i.default.dirname(t)}t=e;let n=e;for(;t&&t!==i.default.dirname(t);)a.default.existsSync(i.default.join(t,`package.json`))&&(n=t),t=i.default.dirname(t);return n}let h=m(process.cwd());function g(e){if(!e)return;let t;if(typeof e==`string`)t=e;else if(e instanceof URL){if(e.protocol!==`file:`)return;t=e.pathname}else if(Buffer.isBuffer(e))t=e.toString();else return;let n=i.default.resolve(h,t),r=i.default.relative(h,n),a=r.startsWith(`..`)||i.default.isAbsolute(r),o=n.split(i.default.sep),s=o.some(e=>e.startsWith(`.env`)),c=o.some((e,t)=>{if(e===`node_modules`){let e=o[t+1];return!e||!e.startsWith(`.`)}return!1});if(a||s||c)throw Error(`[Boltdocs Security] Write/delete operation blocked on path: "${n}". Modifications are restricted to the project root, and cannot access .env or non-cache node_modules folders.`)}function _(e){return e==null?!1:typeof e==`number`?e!==0:typeof e==`string`?e.includes(`w`)||e.includes(`a`)||e.includes(`+`):!0}function v(){let e=a.default.writeFile;a.default.writeFile=((t,...n)=>{try{g(t)}catch(e){let t=n[n.length-1];if(typeof t==`function`){process.nextTick(()=>t(e));return}throw e}return e.call(a.default,t,...n)});let t=a.default.writeFileSync;a.default.writeFileSync=(e,...n)=>(g(e),t.call(a.default,e,...n));let n=a.default.rm;a.default.rm=((e,...t)=>{try{g(e)}catch(e){let n=t[t.length-1];if(typeof n==`function`){process.nextTick(()=>n(e));return}throw e}return n.call(a.default,e,...t)});let r=a.default.rmSync;a.default.rmSync=(e,...t)=>(g(e),r.call(a.default,e,...t));let i=a.default.unlink;a.default.unlink=((e,...t)=>{try{g(e)}catch(e){let n=t[t.length-1];if(typeof n==`function`){process.nextTick(()=>n(e));return}throw e}return i.call(a.default,e,...t)});let o=a.default.unlinkSync;a.default.unlinkSync=(e,...t)=>(g(e),o.call(a.default,e,...t));let s=a.default.mkdir;a.default.mkdir=((e,...t)=>{try{g(e)}catch(e){let n=t[t.length-1];if(typeof n==`function`){process.nextTick(()=>n(e));return}throw e}return s.call(a.default,e,...t)});let c=a.default.mkdirSync;a.default.mkdirSync=(e,...t)=>(g(e),c.call(a.default,e,...t));let u=a.default.rmdir;a.default.rmdir=((e,...t)=>{try{g(e)}catch(e){let n=t[t.length-1];if(typeof n==`function`){process.nextTick(()=>n(e));return}throw e}return u.call(a.default,e,...t)});let d=a.default.rmdirSync;a.default.rmdirSync=(e,...t)=>(g(e),d.call(a.default,e,...t));let f=a.default.appendFile;a.default.appendFile=((e,...t)=>{try{g(e)}catch(e){let n=t[t.length-1];if(typeof n==`function`){process.nextTick(()=>n(e));return}throw e}return f.call(a.default,e,...t)});let p=a.default.appendFileSync;a.default.appendFileSync=(e,...t)=>(g(e),p.call(a.default,e,...t));let m=a.default.copyFile;a.default.copyFile=((e,t,...n)=>{try{g(e),g(t)}catch(e){let t=n[n.length-1];if(typeof t==`function`){process.nextTick(()=>t(e));return}throw e}return m.call(a.default,e,t,...n)});let h=a.default.copyFileSync;a.default.copyFileSync=(e,t,...n)=>(g(e),g(t),h.call(a.default,e,t,...n));let v=a.default.rename;a.default.rename=((e,t,...n)=>{try{g(e),g(t)}catch(e){let t=n[n.length-1];if(typeof t==`function`){process.nextTick(()=>t(e));return}throw e}return v.call(a.default,e,t,...n)});let y=a.default.renameSync;a.default.renameSync=(e,t,...n)=>(g(e),g(t),y.call(a.default,e,t,...n));let b=a.default.createWriteStream;a.default.createWriteStream=(e,...t)=>(g(e),b.call(a.default,e,...t));let x=a.default.open;a.default.open=((e,t,...n)=>{if(_(typeof t==`function`?void 0:t))try{g(e)}catch(e){let r=n[n.length-1],i=typeof t==`function`?t:typeof r==`function`?r:void 0;if(i){process.nextTick(()=>i(e));return}throw e}return x.call(a.default,e,t,...n)});let S=a.default.openSync;a.default.openSync=(e,t,...n)=>(_(t)&&g(e),S.call(a.default,e,t,...n));let C=e=>{if(!e)return;let t=e.writeFile;t&&(e.writeFile=async(n,...r)=>(g(n),t.call(e,n,...r)));let n=e.rm;n&&(e.rm=async(t,...r)=>(g(t),n.call(e,t,...r)));let r=e.mkdir;r&&(e.mkdir=async(t,...n)=>(g(t),r.call(e,t,...n)));let i=e.rmdir;i&&(e.rmdir=async(t,...n)=>(g(t),i.call(e,t,...n)));let a=e.unlink;a&&(e.unlink=async(t,...n)=>(g(t),a.call(e,t,...n)));let o=e.appendFile;o&&(e.appendFile=async(t,...n)=>(g(t),o.call(e,t,...n)));let s=e.copyFile;s&&(e.copyFile=async(t,n,...r)=>(g(t),g(n),s.call(e,t,n,...r)));let c=e.rename;c&&(e.rename=async(t,n,...r)=>(g(t),g(n),c.call(e,t,n,...r)));let l=e.open;l&&(e.open=async(t,n,...r)=>(_(n)&&g(t),l.call(e,t,n,...r)))};C(a.default.promises),C(l.default)}function y(e,t){let n=t?` ${o.colors.green(`➜`)} ${o.colors.green(`Network:`)} ${o.colors.cyan(t)}`:` ${o.colors.green(`➜`)} ${o.colors.green(`Network:`)} ${o.colors.gray(`use --host to expose`)}`;return`
7
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../chunk-Ds5LZdWN.cjs`),t=require(`../node-B-I15rGR.cjs`),n=require(`../config-D7ERJhqe.cjs`),r=require(`../cache-B19MLTpN.cjs`);let i=require(`node:path`);i=e.n(i);let a=require(`node:fs`);a=e.n(a);let o=require(`@bdocs/dui`),s=require(`node:module`),c=require(`node:fs/promises`);c=e.n(c);let l=require(`@bdocs/ssg/node`),u=require(`cac`);u=e.n(u);let d=require(`node:os`);d=e.n(d);let f=require(`node:url`),p=require(`vite`);function m(e){let t=e;for(;t&&t!==i.default.dirname(t);){if(a.default.existsSync(i.default.join(t,`.git`))||a.default.existsSync(i.default.join(t,`pnpm-workspace.yaml`)))return t;t=i.default.dirname(t)}t=e;let n=e;for(;t&&t!==i.default.dirname(t);)a.default.existsSync(i.default.join(t,`package.json`))&&(n=t),t=i.default.dirname(t);return n}let h=m(process.cwd());function g(e){if(!e)return;let t;if(typeof e==`string`)t=e;else if(e instanceof URL){if(e.protocol!==`file:`)return;t=e.pathname}else if(Buffer.isBuffer(e))t=e.toString();else return;let n=i.default.resolve(h,t),r=i.default.relative(h,n),a=r.startsWith(`..`)||i.default.isAbsolute(r),o=n.split(i.default.sep),s=o.some(e=>e.startsWith(`.env`)),c=o.some((e,t)=>{if(e===`node_modules`){let e=o[t+1];return!e||!e.startsWith(`.`)}return!1});if(a||s||c)throw Error(`[Boltdocs Security] Write/delete operation blocked on path: "${n}". Modifications are restricted to the project root, and cannot access .env or non-cache node_modules folders.`)}function _(e){return e==null?!1:typeof e==`number`?e!==0:typeof e==`string`?e.includes(`w`)||e.includes(`a`)||e.includes(`+`):!0}function v(){let e=a.default.writeFile;a.default.writeFile=((t,...n)=>{try{g(t)}catch(e){let t=n[n.length-1];if(typeof t==`function`){process.nextTick(()=>t(e));return}throw e}return e.call(a.default,t,...n)});let t=a.default.writeFileSync;a.default.writeFileSync=(e,...n)=>(g(e),t.call(a.default,e,...n));let n=a.default.rm;a.default.rm=((e,...t)=>{try{g(e)}catch(e){let n=t[t.length-1];if(typeof n==`function`){process.nextTick(()=>n(e));return}throw e}return n.call(a.default,e,...t)});let r=a.default.rmSync;a.default.rmSync=(e,...t)=>(g(e),r.call(a.default,e,...t));let i=a.default.unlink;a.default.unlink=((e,...t)=>{try{g(e)}catch(e){let n=t[t.length-1];if(typeof n==`function`){process.nextTick(()=>n(e));return}throw e}return i.call(a.default,e,...t)});let o=a.default.unlinkSync;a.default.unlinkSync=(e,...t)=>(g(e),o.call(a.default,e,...t));let s=a.default.mkdir;a.default.mkdir=((e,...t)=>{try{g(e)}catch(e){let n=t[t.length-1];if(typeof n==`function`){process.nextTick(()=>n(e));return}throw e}return s.call(a.default,e,...t)});let l=a.default.mkdirSync;a.default.mkdirSync=(e,...t)=>(g(e),l.call(a.default,e,...t));let u=a.default.rmdir;a.default.rmdir=((e,...t)=>{try{g(e)}catch(e){let n=t[t.length-1];if(typeof n==`function`){process.nextTick(()=>n(e));return}throw e}return u.call(a.default,e,...t)});let d=a.default.rmdirSync;a.default.rmdirSync=(e,...t)=>(g(e),d.call(a.default,e,...t));let f=a.default.appendFile;a.default.appendFile=((e,...t)=>{try{g(e)}catch(e){let n=t[t.length-1];if(typeof n==`function`){process.nextTick(()=>n(e));return}throw e}return f.call(a.default,e,...t)});let p=a.default.appendFileSync;a.default.appendFileSync=(e,...t)=>(g(e),p.call(a.default,e,...t));let m=a.default.copyFile;a.default.copyFile=((e,t,...n)=>{try{g(e),g(t)}catch(e){let t=n[n.length-1];if(typeof t==`function`){process.nextTick(()=>t(e));return}throw e}return m.call(a.default,e,t,...n)});let h=a.default.copyFileSync;a.default.copyFileSync=(e,t,...n)=>(g(e),g(t),h.call(a.default,e,t,...n));let v=a.default.rename;a.default.rename=((e,t,...n)=>{try{g(e),g(t)}catch(e){let t=n[n.length-1];if(typeof t==`function`){process.nextTick(()=>t(e));return}throw e}return v.call(a.default,e,t,...n)});let y=a.default.renameSync;a.default.renameSync=(e,t,...n)=>(g(e),g(t),y.call(a.default,e,t,...n));let b=a.default.createWriteStream;a.default.createWriteStream=(e,...t)=>(g(e),b.call(a.default,e,...t));let x=a.default.open;a.default.open=((e,t,...n)=>{if(_(typeof t==`function`?void 0:t))try{g(e)}catch(e){let r=n[n.length-1],i=typeof t==`function`?t:typeof r==`function`?r:void 0;if(i){process.nextTick(()=>i(e));return}throw e}return x.call(a.default,e,t,...n)});let S=a.default.openSync;a.default.openSync=(e,t,...n)=>(_(t)&&g(e),S.call(a.default,e,t,...n));let C=e=>{if(!e)return;let t=e.writeFile;t&&(e.writeFile=async(n,...r)=>(g(n),t.call(e,n,...r)));let n=e.rm;n&&(e.rm=async(t,...r)=>(g(t),n.call(e,t,...r)));let r=e.mkdir;r&&(e.mkdir=async(t,...n)=>(g(t),r.call(e,t,...n)));let i=e.rmdir;i&&(e.rmdir=async(t,...n)=>(g(t),i.call(e,t,...n)));let a=e.unlink;a&&(e.unlink=async(t,...n)=>(g(t),a.call(e,t,...n)));let o=e.appendFile;o&&(e.appendFile=async(t,...n)=>(g(t),o.call(e,t,...n)));let s=e.copyFile;s&&(e.copyFile=async(t,n,...r)=>(g(t),g(n),s.call(e,t,n,...r)));let c=e.rename;c&&(e.rename=async(t,n,...r)=>(g(t),g(n),c.call(e,t,n,...r)));let l=e.open;l&&(e.open=async(t,n,...r)=>(_(n)&&g(t),l.call(e,t,n,...r)))};C(a.default.promises),C(c.default)}function y(e,t){let n=t?` ${o.colors.green(`➜`)} ${o.colors.green(`Network:`)} ${o.colors.cyan(t)}`:` ${o.colors.green(`➜`)} ${o.colors.green(`Network:`)} ${o.colors.gray(`use --host to expose`)}`;return`
8
8
  `+(0,o.double)([` ${o.colors.green(`➜`)} ${o.colors.green(`Local:`)} ${o.colors.cyan(e)}`,n,``,` ${o.colors.dim(`press h + enter for help`)}`],{title:`boltdocs dev server`})+`
9
9
  `}function b(e,t){let n=t?` ${o.colors.green(`➜`)} ${o.colors.green(`Network:`)} ${o.colors.cyan(t)}`:` ${o.colors.green(`➜`)} ${o.colors.green(`Network:`)} ${o.colors.gray(`use --host to expose`)}`;return`
10
10
  `+(0,o.double)([` ${o.colors.green(`➜`)} ${o.colors.green(`Local:`)} ${o.colors.cyan(e)}`,n],{title:`boltdocs preview server`})+`
11
11
  `}function x(e,t){return`
12
12
  `+(0,o.double)([(0,o.padCenter)(`🚀 Update available!`,50),``,` ${o.colors.dim(`Current:`)} ${o.colors.red(e)} ${o.colors.gray(`→`)} ${o.colors.green(t)}`,``,` ${o.colors.dim(`Run:`)} ${o.colors.bold(`npm install boltdocs@latest`)}`])+`
13
- `}const S=(0,c.createRequire)(require(`url`).pathToFileURL(__filename).href);function C(e,t){let n=e.split(`-`)[0].split(`.`).map(Number),r=t.split(`-`)[0].split(`.`).map(Number);for(let e=0;e<Math.max(n.length,r.length);e++){let t=n[e]??0,i=r[e]??0;if(Number.isNaN(t)||Number.isNaN(i))return!1;if(t!==i)return t>i}return!1}async function w(){try{let e=new AbortController,t=setTimeout(()=>e.abort(),2e3),n=await fetch(`https://registry.npmjs.org/boltdocs/latest`,{signal:e.signal,headers:{Accept:`application/vnd.npm.install-v1+json`}});return clearTimeout(t),n.ok?(await n.json()).version??null:null}catch{return null}}async function T(){try{let e=(0,p.fileURLToPath)(require(`url`).pathToFileURL(__filename).href),t=i.default.dirname(e);for(let e=0;e<5;e++){let e=i.default.join(t,`package.json`);if(a.default.existsSync(e)){let t=JSON.parse(a.default.readFileSync(e,`utf-8`));if(t.name===`boltdocs`)return t.version}t=i.default.dirname(t)}}catch{}try{return S(`boltdocs/package.json`).version}catch{return`0.0.0`}}async function E(){let e=``;try{e=i.default.join(f.default.homedir(),`.boltdocs`,`update-check.json`)}catch{return}let t=0;try{if(a.default.existsSync(e)){let n=JSON.parse(a.default.readFileSync(e,`utf-8`));t=Number(n.lastCheck)||0}}catch{}let n=Date.now();if(n-t<864e5)return;try{a.default.mkdirSync(i.default.dirname(e),{recursive:!0}),a.default.writeFileSync(e,JSON.stringify({lastCheck:n}),`utf-8`)}catch{}let r=await T();if(r===`0.0.0`)return;let o=await w();o&&C(o,r)&&console.log(x(r,o))}let D=!1;async function O(e=process.cwd(),r={}){if(D)return;D=!0,E();let a;try{a=await n.n(i.default.resolve(e,`docs`),e),t.w(a,e)}catch{}try{let n=await t.n(e,`development`,a);n.logLevel=`warn`,n.clearScreen=!1,r.port!==void 0&&(n.server=n.server||{},n.server.port=Number(r.port)),r.host!==void 0&&(n.server=n.server||{},n.server.host=r.host),r.force&&(n.optimizeDeps=n.optimizeDeps||{},n.optimizeDeps.force=!0);let i=await(0,u.createServer)(n);await i.listen();let o=i.resolvedUrls;console.log(y(o?.local?.[0]??`http://localhost:${r.port??5173}`,o?.network?.[0]??null)),i.bindCLIShortcuts({print:!1})}catch(e){(0,o.error)(`Failed to start dev server:`,e),process.exit(1)}}async function k(e=process.cwd()){E();try{let n=await t.S().run({root:e,timing:{}});n.success||((0,o.error)(`Build failed at step "${n.failedStep}":`,n.error),await r.a(),process.exit(1)),console.log((0,o.double)([`SSG build completed in ${(Math.round(n.timing.total)/1e3).toFixed(1)}s`,``,`${o.colors.cyan(`boltdocs`)} documentation is ready at ${o.colors.green(`dist/`)}`])),await r.a(),process.exit(0)}catch(e){(0,o.error)(`Build failed:`,e),await r.a(),process.exit(1)}}async function A(e=process.cwd(),n={}){try{let r=await t.n(e,`production`);r.logLevel=`warn`,r.clearScreen=!1,n.port!==void 0&&(r.preview=r.preview||{},r.preview.port=Number(n.port)),n.host!==void 0&&(r.preview=r.preview||{},r.preview.host=n.host);let i=(await(0,s.preview)(r)).resolvedUrls;console.log(b(i?.local?.[0]??`http://localhost:${n.port??4173}`,i?.network?.[0]??null))}catch(e){(0,o.error)(`Failed to start preview server:`,e),process.exit(1)}}function j(e){let t=[];if(!a.default.existsSync(e))return t;try{let n=a.default.readdirSync(e);for(let r of n){let n=i.default.join(e,r);a.default.statSync(n).isDirectory()?r!==`node_modules`&&r!==`.git`&&r!==`dist`&&r!==`coverage`&&t.push(...j(n)):/\.(js|mjs|cjs|ts|tsx|jsx)$/.test(r)&&t.push(n)}}catch{}return t}async function M(e=process.cwd()){(0,o.info)(`Starting static security audit of Boltdocs plugins...`);let t;try{t=await n.n(i.default.resolve(e,`docs`),e)}catch(e){(0,o.error)(`Failed to load Boltdocs configuration for audit:`,e),process.exit(1)}let r=t.plugins||[];if(r.length===0){(0,o.success)(`No plugins configured. Nothing to audit.`);return}let s=[];for(let t of r){if(!t.name)continue;let n=null;try{let{createRequire:r}=await import(`node:module`),a=r(i.default.resolve(e,`package.json`)).resolve(`${t.name}/package.json`);n=i.default.dirname(a)}catch{let r=i.default.resolve(e,`node_modules`,t.name);a.default.existsSync(r)&&(n=r)}if(!n){s.push({name:o.colors.cyan(t.name),status:o.colors.red(`❓ Unresolved`),details:`Could not locate plugin files in node_modules.`});continue}let r=j(n),c=[];for(let e of r)try{let t=a.default.readFileSync(e,`utf-8`);t.includes(`fetch(`)&&c.push(`fetch`),t.includes(`axios`)&&c.push(`axios`),t.includes(`http.request`)&&c.push(`http.request`),t.includes(`https.request`)&&c.push(`https.request`),t.includes(`process.env`)&&c.push(`process.env`)}catch{}let l=Array.from(new Set(c));l.length>0?s.push({name:o.colors.cyan(t.name),status:o.colors.yellow(`⚠️ Warning`),details:`Contains network/env accesses: ${o.colors.bold(l.join(`, `))}. Ensure you trust the author.`}):s.push({name:o.colors.cyan(t.name),status:o.colors.green(`✅ Clean`),details:`No external network calls or env accesses detected.`})}let c=[`Plugin`,`Status`,`Audit Notes`],l=s.map(e=>[e.name,e.status,e.details]);console.log(`
13
+ `}const S=(0,s.createRequire)(require(`url`).pathToFileURL(__filename).href);function C(e,t){let n=e.split(`-`)[0].split(`.`).map(Number),r=t.split(`-`)[0].split(`.`).map(Number);for(let e=0;e<Math.max(n.length,r.length);e++){let t=n[e]??0,i=r[e]??0;if(Number.isNaN(t)||Number.isNaN(i))return!1;if(t!==i)return t>i}return!1}async function w(){try{let e=new AbortController,t=setTimeout(()=>e.abort(),2e3),n=await fetch(`https://registry.npmjs.org/boltdocs/latest`,{signal:e.signal,headers:{Accept:`application/vnd.npm.install-v1+json`}});return clearTimeout(t),n.ok?(await n.json()).version??null:null}catch{return null}}async function T(){try{let e=(0,f.fileURLToPath)(require(`url`).pathToFileURL(__filename).href),t=i.default.dirname(e);for(let e=0;e<5;e++){let e=i.default.join(t,`package.json`);if(a.default.existsSync(e)){let t=JSON.parse(a.default.readFileSync(e,`utf-8`));if(t.name===`boltdocs`)return t.version}t=i.default.dirname(t)}}catch{}try{return S(`boltdocs/package.json`).version}catch{return`0.0.0`}}async function E(){let e=``;try{e=i.default.join(d.default.homedir(),`.boltdocs`,`update-check.json`)}catch{return}let t=0;try{if(a.default.existsSync(e)){let n=JSON.parse(a.default.readFileSync(e,`utf-8`));t=Number(n.lastCheck)||0}}catch{}let n=Date.now();if(n-t<864e5)return;try{a.default.mkdirSync(i.default.dirname(e),{recursive:!0}),a.default.writeFileSync(e,JSON.stringify({lastCheck:n}),`utf-8`)}catch{}let r=await T();if(r===`0.0.0`)return;let o=await w();o&&C(o,r)&&console.log(x(r,o))}let D=!1;async function O(e=process.cwd(),r={}){if(D)return;D=!0,E();let a;try{a=await n.n(i.default.resolve(e,`docs`),e),t.b(a,e)}catch{}try{let n=await t.n(e,`development`,a);n.logLevel=`warn`,n.clearScreen=!1,r.port!==void 0&&(n.server=n.server||{},n.server.port=Number(r.port)),r.host!==void 0&&(n.server=n.server||{},n.server.host=r.host),r.force&&(n.optimizeDeps=n.optimizeDeps||{},n.optimizeDeps.force=!0);let i=await(0,l.createServer)(n);await i.listen();let o=i.resolvedUrls;console.log(y(o?.local?.[0]??`http://localhost:${r.port??5173}`,o?.network?.[0]??null)),i.bindCLIShortcuts({print:!1})}catch(e){(0,o.error)(`Failed to start dev server:`,e),process.exit(1)}}async function k(e=process.cwd()){E();try{let n=await t.v().run({root:e,timing:{}});n.success||((0,o.error)(`Build failed at step "${n.failedStep}":`,n.error),await r.a(),process.exit(1)),console.log((0,o.double)([`SSG build completed in ${(Math.round(n.timing.total)/1e3).toFixed(1)}s`,``,`${o.colors.cyan(`boltdocs`)} documentation is ready at ${o.colors.green(`dist/`)}`])),await r.a(),process.exit(0)}catch(e){(0,o.error)(`Build failed:`,e),await r.a(),process.exit(1)}}async function A(e=process.cwd(),n={}){try{let r=await t.n(e,`production`);r.logLevel=`warn`,r.clearScreen=!1,n.port!==void 0&&(r.preview=r.preview||{},r.preview.port=Number(n.port)),n.host!==void 0&&(r.preview=r.preview||{},r.preview.host=n.host);let i=(await(0,p.preview)(r)).resolvedUrls;console.log(b(i?.local?.[0]??`http://localhost:${n.port??4173}`,i?.network?.[0]??null))}catch(e){(0,o.error)(`Failed to start preview server:`,e),process.exit(1)}}function j(e){let t=[];if(!a.default.existsSync(e))return t;try{let n=a.default.readdirSync(e);for(let r of n){let n=i.default.join(e,r);a.default.statSync(n).isDirectory()?r!==`node_modules`&&r!==`.git`&&r!==`dist`&&r!==`coverage`&&t.push(...j(n)):/\.(js|mjs|cjs|ts|tsx|jsx)$/.test(r)&&t.push(n)}}catch{}return t}async function M(e=process.cwd()){(0,o.info)(`Starting static security audit of Boltdocs plugins...`);let t;try{t=await n.n(i.default.resolve(e,`docs`),e)}catch(e){(0,o.error)(`Failed to load Boltdocs configuration for audit:`,e),process.exit(1)}let r=t.plugins||[];if(r.length===0){(0,o.success)(`No plugins configured. Nothing to audit.`);return}let s=[];for(let t of r){if(!t.name)continue;let n=null;try{let{createRequire:r}=await import(`node:module`),a=r(i.default.resolve(e,`package.json`)).resolve(`${t.name}/package.json`);n=i.default.dirname(a)}catch{let r=i.default.resolve(e,`node_modules`,t.name);a.default.existsSync(r)&&(n=r)}if(!n){s.push({name:o.colors.cyan(t.name),status:o.colors.red(`❓ Unresolved`),details:`Could not locate plugin files in node_modules.`});continue}let r=j(n),c=[];for(let e of r)try{let t=a.default.readFileSync(e,`utf-8`);t.includes(`fetch(`)&&c.push(`fetch`),t.includes(`axios`)&&c.push(`axios`),t.includes(`http.request`)&&c.push(`http.request`),t.includes(`https.request`)&&c.push(`https.request`),t.includes(`process.env`)&&c.push(`process.env`)}catch{}let l=Array.from(new Set(c));l.length>0?s.push({name:o.colors.cyan(t.name),status:o.colors.yellow(`⚠️ Warning`),details:`Contains network/env accesses: ${o.colors.bold(l.join(`, `))}. Ensure you trust the author.`}):s.push({name:o.colors.cyan(t.name),status:o.colors.green(`✅ Clean`),details:`No external network calls or env accesses detected.`})}let c=[`Plugin`,`Status`,`Audit Notes`],l=s.map(e=>[e.name,e.status,e.details]);console.log(`
14
14
  `+(0,o.table)(c,l)+`
15
- `),s.some(e=>e.status.includes(`Warning`))?(0,o.warn)(`⚠️ One or more plugins have security warnings. Review the flags above.`):(0,o.success)(`✓ All plugins passed the static security check!`)}const{emitWarning:N}=process;process.emitWarning=function(e,...t){if(!(e&&typeof e==`object`&&e.code===`DEP0205`)&&!(typeof e==`string`&&t.includes(`DEP0205`)))return Reflect.apply(N,process,[e,...t])},v(),(0,o.configure)({prefix:`boltdocs`});const P=(0,d.default)(`boltdocs`);P.command(`dev [root]`,`Start development server`).option(`--port <port>`,`Port to listen on`).option(`--host [host]`,`Host to bind to`).option(`--force`,`Force Vite to re-optimize dependencies`).action(O),P.command(`[root]`,`Start development server`).option(`--port <port>`,`Port to listen on`).option(`--host [host]`,`Host to bind to`).option(`--force`,`Force Vite to re-optimize dependencies`).action(O),P.command(`build [root]`,`Build for production`).action(k),P.command(`preview [root]`,`Preview production build`).option(`--port <port>`,`Port to listen on`).option(`--host [host]`,`Host to bind to`).action(A),P.command(`audit [root]`,`Audit configured plugins for security warnings`).action(M),P.command(`doctor [root]`,`Check the health of your documentation`).option(`--fix`,`Automatically fix broken internal links and sync translations`).option(`--check-external`,`Verify external links (slower)`).option(`--init`,`Initialize doctor.json with default configuration`).option(`--budget`,`Check build performance against configured budgets`).action(async(e,t)=>{let{doctorAction:n}=await Promise.resolve().then(()=>require(`../doctor-D8fl3Sbg.cjs`));await n(e,t)}),P.command(`generate-changelog <file>`,`Generate changelog documentation from CHANGELOG.md`).option(`-o, --output <path>`,`Output folder (default: docs/changelog)`,{default:`docs/changelog`}).option(`-t, --title <text>`,`Title for changelog pages`,{default:`Changelog`}).option(`--infer-tab`,`Infer tab from folder name (default: true)`,{default:!0}).option(`-l, --limit <number>`,`Limit number of versions to generate`).action(async(e,t)=>{let{generateChangelog:n}=await Promise.resolve().then(()=>require(`../generator-DtUU3Cfk.cjs`));await n(e,{output:t.output,title:t.title,inferTab:t.inferTab,limit:t.limit?parseInt(String(t.limit),10):void 0})}),P.help(),P.version(`2.0.0`),P.parse(),exports.t=E;
15
+ `),s.some(e=>e.status.includes(`Warning`))?(0,o.warn)(`⚠️ One or more plugins have security warnings. Review the flags above.`):(0,o.success)(`✓ All plugins passed the static security check!`)}const{emitWarning:N}=process;process.emitWarning=function(e,...t){if(!(e&&typeof e==`object`&&e.code===`DEP0205`)&&!(typeof e==`string`&&t.includes(`DEP0205`)))return Reflect.apply(N,process,[e,...t])},v(),(0,o.configure)({prefix:`boltdocs`});const P=(0,u.default)(`boltdocs`);P.command(`dev [root]`,`Start development server`).option(`--port <port>`,`Port to listen on`).option(`--host [host]`,`Host to bind to`).option(`--force`,`Force Vite to re-optimize dependencies`).action(O),P.command(`[root]`,`Start development server`).option(`--port <port>`,`Port to listen on`).option(`--host [host]`,`Host to bind to`).option(`--force`,`Force Vite to re-optimize dependencies`).action(O),P.command(`build [root]`,`Build for production`).action(k),P.command(`preview [root]`,`Preview production build`).option(`--port <port>`,`Port to listen on`).option(`--host [host]`,`Host to bind to`).action(A),P.command(`audit [root]`,`Audit configured plugins for security warnings`).action(M),P.command(`doctor [root]`,`Check the health of your documentation`).option(`--fix`,`Automatically fix broken internal links and sync translations`).option(`--check-external`,`Verify external links (slower)`).option(`--init`,`Initialize doctor.json with default configuration`).option(`--budget`,`Check build performance against configured budgets`).action(async(e,t)=>{let{doctorAction:n}=await Promise.resolve().then(()=>require(`../doctor-BL6c8x2Q.cjs`));await n(e,t)}),P.command(`generate-changelog <file>`,`Generate changelog documentation from CHANGELOG.md`).option(`-o, --output <path>`,`Output folder (default: docs/changelog)`,{default:`docs/changelog`}).option(`-t, --title <text>`,`Title for changelog pages`,{default:`Changelog`}).option(`--infer-tab`,`Infer tab from folder name (default: true)`,{default:!0}).option(`-l, --limit <number>`,`Limit number of versions to generate`).action(async(e,t)=>{let{generateChangelog:n}=await Promise.resolve().then(()=>require(`../generator-DsajVrDx.cjs`));await n(e,{output:t.output,title:t.title,inferTab:t.inferTab,limit:t.limit?parseInt(String(t.limit),10):void 0})}),P.help(),P.version(`2.0.0`),P.parse(),exports.t=E;