@secondlayer/cli 0.2.4 → 0.3.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/cli.js +309 -5781
- package/dist/cli.js.map +7 -45
- package/dist/index.d.ts +80 -5
- package/dist/index.js +2590 -11
- package/dist/index.js.map +15 -4
- package/dist/plugin-manager.js +7 -7
- package/dist/plugin-manager.js.map +2 -2
- package/package.json +2 -3
package/dist/index.d.ts
CHANGED
|
@@ -49,7 +49,6 @@ interface ResolvedContract {
|
|
|
49
49
|
abi: any;
|
|
50
50
|
source: "api" | "local";
|
|
51
51
|
}
|
|
52
|
-
type ConfigDefiner = (config: StacksConfig) => StacksConfig;
|
|
53
52
|
/**
|
|
54
53
|
* Core plugin interface that all plugins must implement
|
|
55
54
|
*/
|
|
@@ -208,9 +207,6 @@ interface HookResult<T = any> {
|
|
|
208
207
|
/** Plugin that executed the hook */
|
|
209
208
|
plugin: string;
|
|
210
209
|
}
|
|
211
|
-
declare function defineConfig(config: StacksConfig): StacksConfig;
|
|
212
|
-
declare function defineConfig(definer: ConfigDefiner): ConfigDefiner;
|
|
213
|
-
import { ClarityContract, ClarityFunction, ClarityType, ContractCallParams, ReadOnlyCallParams } from "@secondlayer/clarity-types";
|
|
214
210
|
/**
|
|
215
211
|
* Core plugin manager that orchestrates plugin execution
|
|
216
212
|
*/
|
|
@@ -273,4 +269,83 @@ declare class PluginManager {
|
|
|
273
269
|
*/
|
|
274
270
|
private createUtils;
|
|
275
271
|
}
|
|
276
|
-
|
|
272
|
+
interface ClarinetPluginOptions {
|
|
273
|
+
/** Path to Clarinet.toml file */
|
|
274
|
+
path?: string;
|
|
275
|
+
/** Include only specific contracts */
|
|
276
|
+
include?: string[];
|
|
277
|
+
/** Exclude specific contracts */
|
|
278
|
+
exclude?: string[];
|
|
279
|
+
/** Enable debug output */
|
|
280
|
+
debug?: boolean;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Clarinet plugin factory
|
|
284
|
+
*/
|
|
285
|
+
declare const clarinet: PluginFactory<ClarinetPluginOptions>;
|
|
286
|
+
/**
|
|
287
|
+
* Utility function to check if a Clarinet project exists
|
|
288
|
+
*/
|
|
289
|
+
declare function hasClarinetProject(path?: string): Promise<boolean>;
|
|
290
|
+
interface ActionsPluginOptions {
|
|
291
|
+
/** Include only specific contracts */
|
|
292
|
+
include?: string[];
|
|
293
|
+
/** Exclude specific contracts */
|
|
294
|
+
exclude?: string[];
|
|
295
|
+
/** Include only specific functions */
|
|
296
|
+
includeFunctions?: string[];
|
|
297
|
+
/** Exclude specific functions */
|
|
298
|
+
excludeFunctions?: string[];
|
|
299
|
+
/** Enable debug output */
|
|
300
|
+
debug?: boolean;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Actions plugin factory
|
|
304
|
+
*/
|
|
305
|
+
declare const actions: PluginFactory<ActionsPluginOptions>;
|
|
306
|
+
/**
|
|
307
|
+
* React plugin configuration options
|
|
308
|
+
*/
|
|
309
|
+
interface ReactPluginOptions extends PluginOptions {
|
|
310
|
+
/**
|
|
311
|
+
* Hooks to exclude from generation (both generic and contract-specific)
|
|
312
|
+
* By default, all hooks are generated
|
|
313
|
+
*/
|
|
314
|
+
exclude?: string[];
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* React plugin factory
|
|
318
|
+
*/
|
|
319
|
+
declare const react: PluginFactory<ReactPluginOptions>;
|
|
320
|
+
interface TestingPluginOptions {
|
|
321
|
+
/** Include only specific contracts */
|
|
322
|
+
include?: string[];
|
|
323
|
+
/** Exclude specific contracts */
|
|
324
|
+
exclude?: string[];
|
|
325
|
+
/** Output path for generated testing helpers (default: ./src/generated/testing.ts) */
|
|
326
|
+
out?: string;
|
|
327
|
+
/** Include private function helpers (default: false) */
|
|
328
|
+
includePrivate?: boolean;
|
|
329
|
+
/** Enable debug output */
|
|
330
|
+
debug?: boolean;
|
|
331
|
+
}
|
|
332
|
+
declare const testing: PluginFactory<TestingPluginOptions>;
|
|
333
|
+
interface BasePluginOptions {
|
|
334
|
+
/** Include only specific contracts/functions */
|
|
335
|
+
include?: string[];
|
|
336
|
+
/** Exclude specific contracts/functions */
|
|
337
|
+
exclude?: string[];
|
|
338
|
+
/** Enable debug output */
|
|
339
|
+
debug?: boolean;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Utility function to filter contracts/functions based on include/exclude options
|
|
343
|
+
*/
|
|
344
|
+
declare function filterByOptions<T extends {
|
|
345
|
+
name: string
|
|
346
|
+
}>(items: T[], options?: BasePluginOptions): T[];
|
|
347
|
+
/**
|
|
348
|
+
* Utility function to create a simple plugin
|
|
349
|
+
*/
|
|
350
|
+
declare function createPlugin(name: string, version: string, implementation: Partial<StacksCodegenPlugin>): StacksCodegenPlugin;
|
|
351
|
+
export { testing, react, hasClarinetProject, filterByOptions, createPlugin, clarinet, actions, TestingPluginOptions, StacksCodegenPlugin, ReactPluginOptions, PluginUtils, PluginOptions, PluginManager, PluginFactory, PluginContext, Logger, GenerateContext, ClarinetPluginOptions, BasePluginOptions, ActionsPluginOptions };
|