@kubb/studio 5.5.5 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{configFile-BTVeov27.cjs → configFile-dJtYeqX1.cjs} +27 -45
- package/dist/configFile-dJtYeqX1.cjs.map +1 -0
- package/dist/{configFile-BymXUi9P.js → configFile-zhp5DQIe.js} +25 -43
- package/dist/configFile-zhp5DQIe.js.map +1 -0
- package/dist/index.cjs +290 -669
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +54 -62
- package/dist/index.js +292 -670
- package/dist/index.js.map +1 -1
- package/dist/{resolveConfig-D7I3Nj60.cjs → resolveConfig-CjF6j-3y.cjs} +49 -10
- package/dist/resolveConfig-CjF6j-3y.cjs.map +1 -0
- package/dist/{resolveConfig-DMIG_MH-.js → resolveConfig-DOUv_Tid.js} +38 -11
- package/dist/resolveConfig-DOUv_Tid.js.map +1 -0
- package/dist/{snapshotPackage-BwM3LFmZ.cjs → snapshotPackage-BFjiRhGd.cjs} +4 -3
- package/dist/snapshotPackage-BFjiRhGd.cjs.map +1 -0
- package/dist/{snapshotPackage-I8bt8KTR.js → snapshotPackage-BwZ8IJX-.js} +4 -3
- package/dist/snapshotPackage-BwZ8IJX-.js.map +1 -0
- package/dist/url-DC87bYiU.cjs +19 -0
- package/dist/url-DC87bYiU.cjs.map +1 -0
- package/dist/url-DhFfJpxp.js +14 -0
- package/dist/url-DhFfJpxp.js.map +1 -0
- package/package.json +5 -8
- package/dist/configFile-BTVeov27.cjs.map +0 -1
- package/dist/configFile-BymXUi9P.js.map +0 -1
- package/dist/resolveConfig-D7I3Nj60.cjs.map +0 -1
- package/dist/resolveConfig-DMIG_MH-.js.map +0 -1
- package/dist/snapshotPackage-BwM3LFmZ.cjs.map +0 -1
- package/dist/snapshotPackage-I8bt8KTR.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -275,16 +275,6 @@ type Client = {
|
|
|
275
275
|
export declare function createClient({ onAuthRequired, ...options }: ClientOptions): Client;
|
|
276
276
|
//#endregion
|
|
277
277
|
//#region src/operations/hooks.d.ts
|
|
278
|
-
/**
|
|
279
|
-
* Events a host emits about its Kubb Studio session, as opposed to a generation. `kubb:` stays
|
|
280
|
-
* reserved for generation lifecycle.
|
|
281
|
-
*/
|
|
282
|
-
type StudioConnectingContext = {
|
|
283
|
-
/**
|
|
284
|
-
* The Studio instance this session is opening against.
|
|
285
|
-
*/
|
|
286
|
-
url: string;
|
|
287
|
-
};
|
|
288
278
|
type StudioConnectedContext = {
|
|
289
279
|
/**
|
|
290
280
|
* The Studio instance this session attached to.
|
|
@@ -319,63 +309,65 @@ type StudioConnectedContext = {
|
|
|
319
309
|
organizationSlug?: string;
|
|
320
310
|
};
|
|
321
311
|
/**
|
|
322
|
-
*
|
|
323
|
-
*
|
|
312
|
+
* Events a host emits about its Kubb Studio session, as opposed to a generation. `kubb:` stays
|
|
313
|
+
* reserved for generation lifecycle.
|
|
324
314
|
*/
|
|
325
|
-
type StudioReadyContext = Record<string, never>;
|
|
326
|
-
type StudioDisconnectedContext = {
|
|
327
|
-
/**
|
|
328
|
-
* Why Studio ended the session.
|
|
329
|
-
*/
|
|
330
|
-
reason: string;
|
|
331
|
-
};
|
|
332
|
-
type StudioReconnectingContext = {
|
|
333
|
-
/** Milliseconds until the next connection attempt. */
|
|
334
|
-
delayMs: number;
|
|
335
|
-
};
|
|
336
|
-
type StudioCommandStartContext = {
|
|
337
|
-
/**
|
|
338
|
-
* The command Studio sent, without its `studio:` prefix: `generate`, `connect` or `save`.
|
|
339
|
-
*/
|
|
340
|
-
command: string;
|
|
341
|
-
};
|
|
342
|
-
type StudioCommandEndContext = {
|
|
343
|
-
/**
|
|
344
|
-
* The command that finished, without its `studio:` prefix.
|
|
345
|
-
*/
|
|
346
|
-
command: string;
|
|
347
|
-
/**
|
|
348
|
-
* What the command did, when there is something to report: `applied 2/3 edits to kubb.config.ts`.
|
|
349
|
-
*/
|
|
350
|
-
info?: string;
|
|
351
|
-
};
|
|
352
|
-
type StudioWarnContext = {
|
|
353
|
-
/**
|
|
354
|
-
* What was refused or ignored.
|
|
355
|
-
*/
|
|
356
|
-
message: string;
|
|
357
|
-
/** The missing permission, if that is why, so the host can append its own remedy. */
|
|
358
|
-
permission?: keyof AgentPermissions;
|
|
359
|
-
};
|
|
360
|
-
type StudioErrorContext = {
|
|
361
|
-
/**
|
|
362
|
-
* The failure, for the host's own output. One Studio needs to hear about goes over the socket
|
|
363
|
-
* through the `kubb:error` generation hook instead.
|
|
364
|
-
*/
|
|
365
|
-
error: Error;
|
|
366
|
-
};
|
|
367
315
|
declare global {
|
|
368
316
|
namespace Kubb {
|
|
369
317
|
interface KubbHooksRegistry {
|
|
370
|
-
|
|
318
|
+
/**
|
|
319
|
+
* The Studio instance this session is opening against.
|
|
320
|
+
*/
|
|
321
|
+
'studio:connecting': [ctx: {
|
|
322
|
+
url: string;
|
|
323
|
+
}];
|
|
371
324
|
'studio:connected': [ctx: StudioConnectedContext];
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
'studio:
|
|
377
|
-
|
|
378
|
-
|
|
325
|
+
/**
|
|
326
|
+
* Fired once Studio confirms the `agent:connect` handshake was received and the session is
|
|
327
|
+
* fully registered. Distinct from `studio:connected`, which only means the socket is open.
|
|
328
|
+
*/
|
|
329
|
+
'studio:ready': [ctx: Record<string, never>];
|
|
330
|
+
/**
|
|
331
|
+
* Why Studio ended the session.
|
|
332
|
+
*/
|
|
333
|
+
'studio:disconnected': [ctx: {
|
|
334
|
+
reason: string;
|
|
335
|
+
}];
|
|
336
|
+
/**
|
|
337
|
+
* Milliseconds until the next connection attempt.
|
|
338
|
+
*/
|
|
339
|
+
'studio:reconnecting': [ctx: {
|
|
340
|
+
delayMs: number;
|
|
341
|
+
}];
|
|
342
|
+
/**
|
|
343
|
+
* The command Studio sent, without its `studio:` prefix: `generate`, `connect` or `save`.
|
|
344
|
+
*/
|
|
345
|
+
'studio:command:start': [ctx: {
|
|
346
|
+
command: string;
|
|
347
|
+
}];
|
|
348
|
+
/**
|
|
349
|
+
* The command that finished, with what it did when there is something to report:
|
|
350
|
+
* `applied 2/3 edits to kubb.config.ts`.
|
|
351
|
+
*/
|
|
352
|
+
'studio:command:end': [ctx: {
|
|
353
|
+
command: string;
|
|
354
|
+
info?: string;
|
|
355
|
+
}];
|
|
356
|
+
/**
|
|
357
|
+
* What was refused or ignored, and the missing permission if that is why, so the host can
|
|
358
|
+
* append its own remedy.
|
|
359
|
+
*/
|
|
360
|
+
'studio:warn': [ctx: {
|
|
361
|
+
message: string;
|
|
362
|
+
permission?: keyof AgentPermissions;
|
|
363
|
+
}];
|
|
364
|
+
/**
|
|
365
|
+
* The failure, for the host's own output. One Studio needs to hear about goes over the
|
|
366
|
+
* socket through the `kubb:error` generation hook instead.
|
|
367
|
+
*/
|
|
368
|
+
'studio:error': [ctx: {
|
|
369
|
+
error: Error;
|
|
370
|
+
}];
|
|
379
371
|
}
|
|
380
372
|
}
|
|
381
373
|
}
|