@kubb/studio 5.12.8 → 5.13.1
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/README.md +0 -1
- package/dist/index.cjs +1200 -1031
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -41
- package/dist/index.d.ts +3 -41
- package/dist/index.js +1199 -1030
- package/dist/index.js.map +1 -1
- package/dist/{protocol-C4loKcxw.d.ts → protocol-DQTwqmNO.d.cts} +127 -175
- package/dist/{protocol-C4loKcxw.d.cts → protocol-DQTwqmNO.d.ts} +127 -175
- package/dist/protocol-DQnAN8NE.js +118 -0
- package/dist/protocol-DQnAN8NE.js.map +1 -0
- package/dist/protocol-n7fVO3_7.cjs +183 -0
- package/dist/protocol-n7fVO3_7.cjs.map +1 -0
- package/dist/protocol.cjs +11 -121
- package/dist/protocol.d.cts +2 -2
- package/dist/protocol.d.ts +2 -2
- package/dist/protocol.js +1 -112
- package/package.json +16 -7
- package/dist/protocol.cjs.map +0 -1
- package/dist/protocol.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as SnapshotUploadMetadata, G as editConfig, K as editConfigFile, O as PublishedSnapshot, a as AgentConnectInfo, c as AgentPermissions, s as AgentPermission } from "./protocol-DQTwqmNO.cjs";
|
|
2
2
|
import { Config, Hookable, KubbHooks } from "@kubb/core";
|
|
3
3
|
//#region src/connect.d.ts
|
|
4
4
|
/**
|
|
@@ -45,7 +45,7 @@ declare global {
|
|
|
45
45
|
* A finished command and what it did, such as `applied 2/3 edits to kubb.config.ts`.
|
|
46
46
|
*/
|
|
47
47
|
'studio:command': [ctx: {
|
|
48
|
-
command: 'generate' | 'saveConfig' | 'installExtension' | 'updateExtensions' | 'readFiles' | 'readInput' | 'readDiff';
|
|
48
|
+
command: 'generate' | 'saveConfig' | 'installExtension' | 'updateExtensions' | 'removeExtension' | 'readFiles' | 'readInput' | 'readDiff';
|
|
49
49
|
info: string;
|
|
50
50
|
/**
|
|
51
51
|
* The Studio user who asked for the command, when Studio names one.
|
|
@@ -252,43 +252,5 @@ export declare function createSnapshot({ studioUrl, apiKey, config, hooks, signa
|
|
|
252
252
|
*/
|
|
253
253
|
export declare const defaultStudioUrl = "https://kubb.studio";
|
|
254
254
|
//#endregion
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Applies edits to a `kubb.config.ts` in place. Each edit rewrites only the text it targets, so
|
|
258
|
-
* comments, formatting, and hand-written code around the config survive.
|
|
259
|
-
*
|
|
260
|
-
* Edits are independent: one that cannot be applied is reported in `outcomes` and the rest still run.
|
|
261
|
-
*
|
|
262
|
-
* @example
|
|
263
|
-
* ```ts
|
|
264
|
-
* const { source, outcomes } = applyConfigEdits({
|
|
265
|
-
* source: current,
|
|
266
|
-
* edits: [{ operation: 'set', plugin: '@kubb/plugin-ts', path: ['enum', 'type'], value: 'enum' }],
|
|
267
|
-
* })
|
|
268
|
-
* ```
|
|
269
|
-
*/
|
|
270
|
-
export declare function applyConfigEdits({ source, edits, extensions }: {
|
|
271
|
-
source: string;
|
|
272
|
-
edits: Array<ConfigEdit>;
|
|
273
|
-
extensions?: InstalledExtensions;
|
|
274
|
-
}): {
|
|
275
|
-
source: string;
|
|
276
|
-
outcomes: Array<ConfigEditOutcome>;
|
|
277
|
-
changed: boolean;
|
|
278
|
-
};
|
|
279
|
-
/**
|
|
280
|
-
* Applies `edits` to the config file at `filePath`, writing it only when something changed.
|
|
281
|
-
* `add-plugin` accepts `@kubb/plugin-*` packages and the plugins in `extensions`.
|
|
282
|
-
*/
|
|
283
|
-
export declare function writeConfigEdits({ filePath, edits, extensions }: {
|
|
284
|
-
filePath: string;
|
|
285
|
-
edits: Array<ConfigEdit>;
|
|
286
|
-
extensions?: InstalledExtensions;
|
|
287
|
-
}): Promise<{
|
|
288
|
-
source: string;
|
|
289
|
-
outcomes: Array<ConfigEditOutcome>;
|
|
290
|
-
changed: boolean;
|
|
291
|
-
}>;
|
|
292
|
-
//#endregion
|
|
293
|
-
export type { ConnectAgentOptions, StudioConnectedContext };
|
|
255
|
+
export { type ConnectAgentOptions, type StudioConnectedContext, editConfig, editConfigFile };
|
|
294
256
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as SnapshotUploadMetadata, G as editConfig, K as editConfigFile, O as PublishedSnapshot, a as AgentConnectInfo, c as AgentPermissions, s as AgentPermission } from "./protocol-DQTwqmNO.js";
|
|
2
2
|
import { Config, Hookable, KubbHooks } from "@kubb/core";
|
|
3
3
|
//#region src/connect.d.ts
|
|
4
4
|
/**
|
|
@@ -45,7 +45,7 @@ declare global {
|
|
|
45
45
|
* A finished command and what it did, such as `applied 2/3 edits to kubb.config.ts`.
|
|
46
46
|
*/
|
|
47
47
|
'studio:command': [ctx: {
|
|
48
|
-
command: 'generate' | 'saveConfig' | 'installExtension' | 'updateExtensions' | 'readFiles' | 'readInput' | 'readDiff';
|
|
48
|
+
command: 'generate' | 'saveConfig' | 'installExtension' | 'updateExtensions' | 'removeExtension' | 'readFiles' | 'readInput' | 'readDiff';
|
|
49
49
|
info: string;
|
|
50
50
|
/**
|
|
51
51
|
* The Studio user who asked for the command, when Studio names one.
|
|
@@ -252,43 +252,5 @@ export declare function createSnapshot({ studioUrl, apiKey, config, hooks, signa
|
|
|
252
252
|
*/
|
|
253
253
|
export declare const defaultStudioUrl = "https://kubb.studio";
|
|
254
254
|
//#endregion
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Applies edits to a `kubb.config.ts` in place. Each edit rewrites only the text it targets, so
|
|
258
|
-
* comments, formatting, and hand-written code around the config survive.
|
|
259
|
-
*
|
|
260
|
-
* Edits are independent: one that cannot be applied is reported in `outcomes` and the rest still run.
|
|
261
|
-
*
|
|
262
|
-
* @example
|
|
263
|
-
* ```ts
|
|
264
|
-
* const { source, outcomes } = applyConfigEdits({
|
|
265
|
-
* source: current,
|
|
266
|
-
* edits: [{ operation: 'set', plugin: '@kubb/plugin-ts', path: ['enum', 'type'], value: 'enum' }],
|
|
267
|
-
* })
|
|
268
|
-
* ```
|
|
269
|
-
*/
|
|
270
|
-
export declare function applyConfigEdits({ source, edits, extensions }: {
|
|
271
|
-
source: string;
|
|
272
|
-
edits: Array<ConfigEdit>;
|
|
273
|
-
extensions?: InstalledExtensions;
|
|
274
|
-
}): {
|
|
275
|
-
source: string;
|
|
276
|
-
outcomes: Array<ConfigEditOutcome>;
|
|
277
|
-
changed: boolean;
|
|
278
|
-
};
|
|
279
|
-
/**
|
|
280
|
-
* Applies `edits` to the config file at `filePath`, writing it only when something changed.
|
|
281
|
-
* `add-plugin` accepts `@kubb/plugin-*` packages and the plugins in `extensions`.
|
|
282
|
-
*/
|
|
283
|
-
export declare function writeConfigEdits({ filePath, edits, extensions }: {
|
|
284
|
-
filePath: string;
|
|
285
|
-
edits: Array<ConfigEdit>;
|
|
286
|
-
extensions?: InstalledExtensions;
|
|
287
|
-
}): Promise<{
|
|
288
|
-
source: string;
|
|
289
|
-
outcomes: Array<ConfigEditOutcome>;
|
|
290
|
-
changed: boolean;
|
|
291
|
-
}>;
|
|
292
|
-
//#endregion
|
|
293
|
-
export type { ConnectAgentOptions, StudioConnectedContext };
|
|
255
|
+
export { type ConnectAgentOptions, type StudioConnectedContext, editConfig, editConfigFile };
|
|
294
256
|
//# sourceMappingURL=index.d.ts.map
|