@scenerok/cli 2.4.0 → 2.5.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/commands/plugin.d.ts +89 -0
- package/dist/commands/plugin.d.ts.map +1 -0
- package/dist/commands/plugin.js +651 -0
- package/dist/index.js +7 -0
- package/dist/lib/api.d.ts +150 -0
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/lib/api.js +34 -0
- package/dist/lib/plugin-checks.bundle.mjs +5206 -0
- package/dist/lib/plugin-checks.d.ts +97 -0
- package/dist/lib/plugin-checks.d.ts.map +1 -0
- package/dist/lib/plugin-checks.js +215 -0
- package/dist/lib/plugin-scaffold.d.ts +29 -0
- package/dist/lib/plugin-scaffold.d.ts.map +1 -0
- package/dist/lib/plugin-scaffold.js +194 -0
- package/package.json +7 -5
- package/skills/scenerok/SKILL.md +17 -0
- package/skills/scenerok/references/catalog-index.json +1 -1
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `scenerok plugin` — marketplace authoring commands (#122).
|
|
3
|
+
*
|
|
4
|
+
* init scaffold an RFC §4.1 package
|
|
5
|
+
* validate run the *server's* static checks locally (no network, no auth)
|
|
6
|
+
* publish validate, build the canonical tarball, upload, queue a build
|
|
7
|
+
* status show one build's stage, checks and resulting version
|
|
8
|
+
*
|
|
9
|
+
* `validate` and `publish` share `src/lib/plugins/cli-checks-entry.ts` with the
|
|
10
|
+
* server and the `plugin-builder` service, bundled into the CLI at build time
|
|
11
|
+
* (`scripts/build-cli-plugin-checks.mjs`). A local pass is therefore the same
|
|
12
|
+
* result the builder will produce — not an approximation.
|
|
13
|
+
*
|
|
14
|
+
* Exit codes: `0` success, `1` checks failed / build failed, `2` usage error.
|
|
15
|
+
*/
|
|
16
|
+
import { Command } from 'commander';
|
|
17
|
+
/** Where output goes; tests pass a sink. */
|
|
18
|
+
type Write = (line: string) => void;
|
|
19
|
+
/** `My Plugin` → `my-plugin`, for a helpful "did you mean" on a bad slug. */
|
|
20
|
+
export declare function slugify(name: string): string;
|
|
21
|
+
export interface PluginInitOptions {
|
|
22
|
+
dir?: string;
|
|
23
|
+
kind?: string;
|
|
24
|
+
slug?: string;
|
|
25
|
+
namespace?: string;
|
|
26
|
+
title?: string;
|
|
27
|
+
summary?: string;
|
|
28
|
+
/** Write into a directory that already has files; existing files are kept. */
|
|
29
|
+
force?: boolean;
|
|
30
|
+
write?: Write;
|
|
31
|
+
}
|
|
32
|
+
export declare function runPluginInit(options?: PluginInitOptions): Promise<number>;
|
|
33
|
+
export interface PluginValidateOptions {
|
|
34
|
+
dir?: string;
|
|
35
|
+
json?: boolean;
|
|
36
|
+
verbose?: boolean;
|
|
37
|
+
quiet?: boolean;
|
|
38
|
+
write?: Write;
|
|
39
|
+
}
|
|
40
|
+
export declare function runPluginValidate(options?: PluginValidateOptions): Promise<number>;
|
|
41
|
+
export interface PluginPublishOptions {
|
|
42
|
+
dir?: string;
|
|
43
|
+
watch?: boolean;
|
|
44
|
+
json?: boolean;
|
|
45
|
+
write?: Write;
|
|
46
|
+
/** Poll interval for --watch (ms); tests shorten it. */
|
|
47
|
+
pollIntervalMs?: number;
|
|
48
|
+
/** Stop watching after this long (ms). */
|
|
49
|
+
watchTimeoutMs?: number;
|
|
50
|
+
}
|
|
51
|
+
export declare function runPluginPublish(options?: PluginPublishOptions): Promise<number>;
|
|
52
|
+
export interface PluginStatusOptions {
|
|
53
|
+
buildId: string;
|
|
54
|
+
json?: boolean;
|
|
55
|
+
verbose?: boolean;
|
|
56
|
+
watch?: boolean;
|
|
57
|
+
write?: Write;
|
|
58
|
+
pollIntervalMs?: number;
|
|
59
|
+
watchTimeoutMs?: number;
|
|
60
|
+
}
|
|
61
|
+
export declare function runPluginStatus(options: PluginStatusOptions): Promise<number>;
|
|
62
|
+
export interface PluginSearchOptions {
|
|
63
|
+
q?: string;
|
|
64
|
+
category?: string;
|
|
65
|
+
kind?: string;
|
|
66
|
+
limit?: number;
|
|
67
|
+
json?: boolean;
|
|
68
|
+
write?: Write;
|
|
69
|
+
}
|
|
70
|
+
export interface PluginShowOptions {
|
|
71
|
+
ref: string;
|
|
72
|
+
json?: boolean;
|
|
73
|
+
write?: Write;
|
|
74
|
+
}
|
|
75
|
+
export interface PluginRunOptions {
|
|
76
|
+
ref: string;
|
|
77
|
+
input?: string;
|
|
78
|
+
set?: string[];
|
|
79
|
+
maxTokens?: string | number;
|
|
80
|
+
dryRun?: boolean;
|
|
81
|
+
json?: boolean;
|
|
82
|
+
write?: Write;
|
|
83
|
+
}
|
|
84
|
+
export declare function runPluginSearch(options?: PluginSearchOptions): Promise<number>;
|
|
85
|
+
export declare function runPluginShow(options: PluginShowOptions): Promise<number>;
|
|
86
|
+
export declare function runPluginRunCommand(options: PluginRunOptions): Promise<number>;
|
|
87
|
+
export declare const pluginCommand: Command;
|
|
88
|
+
export {};
|
|
89
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/commands/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8BpC,4CAA4C;AAC5C,KAAK,KAAK,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAmBpC,6EAA6E;AAC7E,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM5C;AAMD,MAAM,WAAW,iBAAiB;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,K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