@intentius/chant-lexicon-k3s 0.44.3
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 +36 -0
- package/dist/codegen/docs.d.ts +7 -0
- package/dist/codegen/docs.d.ts.map +1 -0
- package/dist/codegen/generate-cli.d.ts +3 -0
- package/dist/codegen/generate-cli.d.ts.map +1 -0
- package/dist/codegen/generate-lexicon.d.ts +19 -0
- package/dist/codegen/generate-lexicon.d.ts.map +1 -0
- package/dist/codegen/generate-typescript.d.ts +11 -0
- package/dist/codegen/generate-typescript.d.ts.map +1 -0
- package/dist/codegen/generate.d.ts +15 -0
- package/dist/codegen/generate.d.ts.map +1 -0
- package/dist/codegen/naming.d.ts +13 -0
- package/dist/codegen/naming.d.ts.map +1 -0
- package/dist/codegen/package.d.ts +17 -0
- package/dist/codegen/package.d.ts.map +1 -0
- package/dist/codegen/parse.d.ts +93 -0
- package/dist/codegen/parse.d.ts.map +1 -0
- package/dist/generated/index.d.ts +8 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/runtime.d.ts +5 -0
- package/dist/generated/runtime.d.ts.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/integrity.json +10 -0
- package/dist/lint/audit-catalog.d.ts +13 -0
- package/dist/lint/audit-catalog.d.ts.map +1 -0
- package/dist/lint/post-synth/index.d.ts +3 -0
- package/dist/lint/post-synth/index.d.ts.map +1 -0
- package/dist/lint/post-synth/k3s-helpers.d.ts +19 -0
- package/dist/lint/post-synth/k3s-helpers.d.ts.map +1 -0
- package/dist/lint/post-synth/k3s101.d.ts +13 -0
- package/dist/lint/post-synth/k3s101.d.ts.map +1 -0
- package/dist/lint/post-synth/k3s102.d.ts +11 -0
- package/dist/lint/post-synth/k3s102.d.ts.map +1 -0
- package/dist/lint/post-synth/k3s103.d.ts +11 -0
- package/dist/lint/post-synth/k3s103.d.ts.map +1 -0
- package/dist/lint/post-synth/k3s104.d.ts +12 -0
- package/dist/lint/post-synth/k3s104.d.ts.map +1 -0
- package/dist/lint/post-synth/k3s105.d.ts +11 -0
- package/dist/lint/post-synth/k3s105.d.ts.map +1 -0
- package/dist/lint/rules/index.d.ts +5 -0
- package/dist/lint/rules/index.d.ts.map +1 -0
- package/dist/lint/rules/token-literal.d.ts +17 -0
- package/dist/lint/rules/token-literal.d.ts.map +1 -0
- package/dist/lsp/completions.d.ts +7 -0
- package/dist/lsp/completions.d.ts.map +1 -0
- package/dist/lsp/hover.d.ts +6 -0
- package/dist/lsp/hover.d.ts.map +1 -0
- package/dist/manifest.json +6 -0
- package/dist/meta.json +37 -0
- package/dist/okf/index.md +9 -0
- package/dist/okf/types/Agent.md +55 -0
- package/dist/okf/types/Registries.md +14 -0
- package/dist/okf/types/Server.md +122 -0
- package/dist/package-cli.d.ts +3 -0
- package/dist/package-cli.d.ts.map +1 -0
- package/dist/plugin.d.ts +8 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/serializer.d.ts +37 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/skills/chant-k3s.md +90 -0
- package/dist/spec/fetch.d.ts +39 -0
- package/dist/spec/fetch.d.ts.map +1 -0
- package/dist/types/index.d.ts +370 -0
- package/dist/validate-cli.d.ts +3 -0
- package/dist/validate-cli.d.ts.map +1 -0
- package/dist/validate.d.ts +15 -0
- package/dist/validate.d.ts.map +1 -0
- package/package.json +68 -0
- package/src/codegen/docs.ts +25 -0
- package/src/codegen/generate-cli.ts +8 -0
- package/src/codegen/generate-lexicon.ts +58 -0
- package/src/codegen/generate-typescript.ts +63 -0
- package/src/codegen/generate.test.ts +157 -0
- package/src/codegen/generate.ts +116 -0
- package/src/codegen/naming.ts +42 -0
- package/src/codegen/package.ts +28 -0
- package/src/codegen/parse.ts +386 -0
- package/src/generated/.gitkeep +0 -0
- package/src/generated/index.d.ts +370 -0
- package/src/generated/index.ts +13 -0
- package/src/generated/lexicon-k3s.json +37 -0
- package/src/generated/runtime.ts +4 -0
- package/src/index.ts +11 -0
- package/src/lint/audit-catalog.ts +53 -0
- package/src/lint/post-synth/index.ts +15 -0
- package/src/lint/post-synth/k3s-helpers.ts +34 -0
- package/src/lint/post-synth/k3s101.ts +58 -0
- package/src/lint/post-synth/k3s102.ts +59 -0
- package/src/lint/post-synth/k3s103.ts +38 -0
- package/src/lint/post-synth/k3s104.ts +44 -0
- package/src/lint/post-synth/k3s105.ts +52 -0
- package/src/lint/post-synth/post-synth.test.ts +137 -0
- package/src/lint/rules/index.ts +7 -0
- package/src/lint/rules/token-literal.test.ts +53 -0
- package/src/lint/rules/token-literal.ts +87 -0
- package/src/lsp/completions.test.ts +10 -0
- package/src/lsp/completions.ts +25 -0
- package/src/lsp/hover.test.ts +10 -0
- package/src/lsp/hover.ts +43 -0
- package/src/package-cli.ts +24 -0
- package/src/plugin.test.ts +17 -0
- package/src/plugin.ts +129 -0
- package/src/serializer.acceptance.test.ts +137 -0
- package/src/serializer.test.ts +172 -0
- package/src/serializer.ts +191 -0
- package/src/skills/chant-k3s.md +90 -0
- package/src/spec/fetch.ts +80 -0
- package/src/validate-cli.ts +5 -0
- package/src/validate.ts +41 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { describe, expect, test } from "vitest";
|
|
2
|
+
import { extractFlagLiterals, extractFlagList, parseSpecFiles } from "./parse";
|
|
3
|
+
|
|
4
|
+
const SERVER_GO = `package cmds
|
|
5
|
+
|
|
6
|
+
import "github.com/urfave/cli/v2"
|
|
7
|
+
|
|
8
|
+
var ServerFlags = []cli.Flag{
|
|
9
|
+
ConfigFlag,
|
|
10
|
+
DebugFlag,
|
|
11
|
+
&cli.IntFlag{
|
|
12
|
+
Name: "https-listen-port",
|
|
13
|
+
Usage: "(listener) HTTPS listen port",
|
|
14
|
+
Value: 6443,
|
|
15
|
+
Destination: &ServerConfig.HTTPSPort,
|
|
16
|
+
},
|
|
17
|
+
&cli.StringFlag{
|
|
18
|
+
Name: "token",
|
|
19
|
+
Aliases: []string{"t"},
|
|
20
|
+
Usage: "(cluster) Shared secret used to join a server or agent to a cluster",
|
|
21
|
+
EnvVars: []string{"K3S_TOKEN"},
|
|
22
|
+
},
|
|
23
|
+
&cli.StringFlag{
|
|
24
|
+
Name: "token-file",
|
|
25
|
+
Usage: "(cluster) File containing the token",
|
|
26
|
+
},
|
|
27
|
+
&cli.StringSliceFlag{
|
|
28
|
+
Name: "tls-san",
|
|
29
|
+
Usage: "(listener) Add additional hostnames or IPv4/IPv6 addresses as Subject Alternative Names on the server TLS cert",
|
|
30
|
+
},
|
|
31
|
+
&cli.BoolFlag{
|
|
32
|
+
Name: "secret-thing",
|
|
33
|
+
Usage: "internal",
|
|
34
|
+
Hidden: true,
|
|
35
|
+
},
|
|
36
|
+
&cli.StringFlag{
|
|
37
|
+
Name: "old-thing",
|
|
38
|
+
Usage: "(deprecated) do not use",
|
|
39
|
+
},
|
|
40
|
+
UnknownSharedFlag,
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
|
|
44
|
+
const AGENT_GO = `package cmds
|
|
45
|
+
|
|
46
|
+
import "github.com/urfave/cli/v2"
|
|
47
|
+
|
|
48
|
+
var (
|
|
49
|
+
NodeNameFlag = &cli.StringFlag{
|
|
50
|
+
Name: "node-name",
|
|
51
|
+
Usage: "(agent/node) Node name",
|
|
52
|
+
EnvVars: []string{"K3S_NODE_NAME"},
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
func NewAgentCommand() *cli.Command {
|
|
57
|
+
return &cli.Command{
|
|
58
|
+
Name: "agent",
|
|
59
|
+
Flags: []cli.Flag{
|
|
60
|
+
ConfigFlag,
|
|
61
|
+
NodeNameFlag,
|
|
62
|
+
&cli.StringFlag{
|
|
63
|
+
Name: "server",
|
|
64
|
+
Usage: "(cluster) Server to connect to",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
`;
|
|
70
|
+
|
|
71
|
+
const CONFIG_GO = `package cmds
|
|
72
|
+
|
|
73
|
+
var (
|
|
74
|
+
ConfigFlag = &cli.StringFlag{
|
|
75
|
+
Name: "config",
|
|
76
|
+
Usage: "(config) Load configuration from FILE",
|
|
77
|
+
Value: "/etc/rancher/k3s/config.yaml",
|
|
78
|
+
}
|
|
79
|
+
DebugFlag = &cli.BoolFlag{
|
|
80
|
+
Name: "debug",
|
|
81
|
+
Usage: "(logging) Turn on debug logs",
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
`;
|
|
85
|
+
|
|
86
|
+
function envelope(): string {
|
|
87
|
+
return JSON.stringify({ "server.go": SERVER_GO, "agent.go": AGENT_GO, "config.go": CONFIG_GO });
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
describe("k3s flag parser", () => {
|
|
91
|
+
test("extracts named flag vars with type, usage and default", () => {
|
|
92
|
+
const { byVar } = extractFlagLiterals(CONFIG_GO);
|
|
93
|
+
const debug = byVar.get("DebugFlag");
|
|
94
|
+
expect(debug?.flagType).toBe("Bool");
|
|
95
|
+
expect(debug?.name).toBe("debug");
|
|
96
|
+
expect(debug?.usage).toContain("debug logs");
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
test("extracts a flag list mixing references and inline literals in order", () => {
|
|
100
|
+
const items = extractFlagList(SERVER_GO, "var ServerFlags = []cli.Flag{");
|
|
101
|
+
expect(items[0]).toBe("ConfigFlag");
|
|
102
|
+
expect(items[1]).toBe("DebugFlag");
|
|
103
|
+
expect(typeof items[2]).toBe("object");
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
test("parses the envelope into Server, Agent and the registries entities", () => {
|
|
107
|
+
const results = parseSpecFiles(envelope());
|
|
108
|
+
const names = results.map((r) => r.resource.typeName);
|
|
109
|
+
expect(names).toEqual([
|
|
110
|
+
"K3s::Server",
|
|
111
|
+
"K3s::Agent",
|
|
112
|
+
"K3s::Registries",
|
|
113
|
+
"K3s::Mirror",
|
|
114
|
+
"K3s::RegistryConfig",
|
|
115
|
+
"K3s::RegistryAuth",
|
|
116
|
+
"K3s::RegistryTLS",
|
|
117
|
+
]);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
test("drops secrets, hidden, deprecated and the config flag itself; keeps the rest", () => {
|
|
121
|
+
const server = parseSpecFiles(envelope())[0].resource;
|
|
122
|
+
const names = server.properties.map((p) => p.name);
|
|
123
|
+
expect(names).not.toContain("token");
|
|
124
|
+
expect(names).not.toContain("config");
|
|
125
|
+
expect(names).not.toContain("secret-thing");
|
|
126
|
+
expect(names).not.toContain("old-thing");
|
|
127
|
+
expect(names).toContain("token-file");
|
|
128
|
+
expect(names).toContain("debug");
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
test("maps flag types to TS types, slices accepting single-or-list", () => {
|
|
132
|
+
const server = parseSpecFiles(envelope())[0].resource;
|
|
133
|
+
const byName = new Map(server.properties.map((p) => [p.name, p]));
|
|
134
|
+
expect(byName.get("https-listen-port")?.tsType).toBe("number");
|
|
135
|
+
expect(byName.get("tls-san")?.tsType).toBe("string | string[]");
|
|
136
|
+
expect(byName.get("debug")?.tsType).toBe("boolean");
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
test("carries the default into the description", () => {
|
|
140
|
+
const server = parseSpecFiles(envelope())[0].resource;
|
|
141
|
+
const port = server.properties.find((p) => p.name === "https-listen-port");
|
|
142
|
+
expect(port?.description).toContain("(default: 6443)");
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
test("requires server on the agent, and only there", () => {
|
|
146
|
+
const results = parseSpecFiles(envelope());
|
|
147
|
+
const agent = results[1].resource;
|
|
148
|
+
expect(agent.properties.find((p) => p.name === "server")?.required).toBe(true);
|
|
149
|
+
const server = results[0].resource;
|
|
150
|
+
expect(server.properties.every((p) => !p.required)).toBe(true);
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
test("surfaces unresolved references as warnings instead of dropping them silently", () => {
|
|
154
|
+
const results = parseSpecFiles(envelope());
|
|
155
|
+
expect(results[0].warnings).toEqual(["ServerFlags: unresolved flag reference UnknownSharedFlag"]);
|
|
156
|
+
});
|
|
157
|
+
});
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* k3s generation pipeline — uses core generatePipeline with k3s-specific
|
|
3
|
+
* fetch, parse, naming, and generation callbacks.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
generatePipeline,
|
|
8
|
+
writeGeneratedArtifacts,
|
|
9
|
+
type GenerateOptions,
|
|
10
|
+
type GenerateResult,
|
|
11
|
+
type GeneratePipelineConfig,
|
|
12
|
+
} from "@intentius/chant/codegen/generate";
|
|
13
|
+
import { dirname } from "path";
|
|
14
|
+
import { fileURLToPath } from "url";
|
|
15
|
+
import { fetchSchemas } from "../spec/fetch";
|
|
16
|
+
import { parseSpecFiles, type K3sParseResult } from "./parse";
|
|
17
|
+
import { NamingStrategy } from "./naming";
|
|
18
|
+
import { generateLexiconJSON } from "./generate-lexicon";
|
|
19
|
+
import { generateTypeScriptDeclarations } from "./generate-typescript";
|
|
20
|
+
import {
|
|
21
|
+
generateRuntimeIndex as coreGenerateRuntimeIndex,
|
|
22
|
+
type RuntimeIndexEntry,
|
|
23
|
+
type RuntimeIndexPropertyEntry,
|
|
24
|
+
} from "@intentius/chant/codegen/generate-runtime-index";
|
|
25
|
+
|
|
26
|
+
export type { GenerateResult };
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Run the full k3s generation pipeline.
|
|
30
|
+
*/
|
|
31
|
+
export async function generate(opts: GenerateOptions = {}): Promise<GenerateResult> {
|
|
32
|
+
let pendingResults: K3sParseResult[] = [];
|
|
33
|
+
|
|
34
|
+
const config: GeneratePipelineConfig<K3sParseResult> = {
|
|
35
|
+
fetchSchemas: async (fetchOpts) => {
|
|
36
|
+
return fetchSchemas(fetchOpts.force);
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
parseSchema: (_typeName, data) => {
|
|
40
|
+
const results = parseSpecFiles(data);
|
|
41
|
+
if (results.length === 0) return null;
|
|
42
|
+
pendingResults = results.slice(1);
|
|
43
|
+
return results[0];
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
createNaming: (results) => new NamingStrategy(results),
|
|
47
|
+
|
|
48
|
+
augmentResults: (results, _opts, log) => {
|
|
49
|
+
if (pendingResults.length > 0) {
|
|
50
|
+
results.push(...pendingResults);
|
|
51
|
+
log(`Added ${pendingResults.length} additional entities from single spec`);
|
|
52
|
+
pendingResults = [];
|
|
53
|
+
}
|
|
54
|
+
for (const r of results) {
|
|
55
|
+
for (const w of r.warnings ?? []) log(`warning: ${w}`);
|
|
56
|
+
}
|
|
57
|
+
const props = results.map((r) => `${r.resource.typeName}(${r.resource.properties.length})`);
|
|
58
|
+
log(`Total: ${results.length} k3s entities — ${props.join(", ")}`);
|
|
59
|
+
return { results };
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
generateRegistry: (results, naming) => {
|
|
63
|
+
return generateLexiconJSON(results, naming as NamingStrategy);
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
generateTypes: (results, naming) => {
|
|
67
|
+
return generateTypeScriptDeclarations(results, naming as NamingStrategy);
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
generateRuntimeIndex: (results, naming) => {
|
|
71
|
+
return generateRuntimeIndex(results, naming as NamingStrategy);
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
return generatePipeline(config, opts);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Write generated artifacts to disk.
|
|
80
|
+
*/
|
|
81
|
+
export function writeGeneratedFiles(result: GenerateResult, pkgDir?: string): void {
|
|
82
|
+
const baseDir = pkgDir ?? dirname(dirname(dirname(fileURLToPath(import.meta.url))));
|
|
83
|
+
writeGeneratedArtifacts({
|
|
84
|
+
baseDir,
|
|
85
|
+
files: {
|
|
86
|
+
"lexicon-k3s.json": result.lexiconJSON,
|
|
87
|
+
"index.d.ts": result.typesDTS,
|
|
88
|
+
"index.ts": result.indexTS,
|
|
89
|
+
"runtime.ts": `/**\n * Runtime factory constructors — re-exported from core.\n */\nexport { createResource, createProperty } from "@intentius/chant/runtime";\n`,
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Generate the runtime index.ts with factory constructor exports.
|
|
96
|
+
*/
|
|
97
|
+
function generateRuntimeIndex(results: K3sParseResult[], naming: NamingStrategy): string {
|
|
98
|
+
const resourceEntries: RuntimeIndexEntry[] = [];
|
|
99
|
+
const propertyEntries: RuntimeIndexPropertyEntry[] = [];
|
|
100
|
+
|
|
101
|
+
for (const r of results) {
|
|
102
|
+
const typeName = r.resource.typeName;
|
|
103
|
+
const tsName = naming.resolve(typeName);
|
|
104
|
+
if (!tsName) continue;
|
|
105
|
+
|
|
106
|
+
if (r.isProperty) {
|
|
107
|
+
propertyEntries.push({ tsName, resourceType: typeName });
|
|
108
|
+
} else {
|
|
109
|
+
resourceEntries.push({ tsName, resourceType: typeName, attrs: {} });
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return coreGenerateRuntimeIndex(resourceEntries, propertyEntries, {
|
|
114
|
+
lexiconName: "k3s",
|
|
115
|
+
});
|
|
116
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* k3s naming strategy — flat namespace, one short name per entity.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
NamingStrategy as CoreNamingStrategy,
|
|
7
|
+
type NamingConfig,
|
|
8
|
+
type NamingInput,
|
|
9
|
+
} from "@intentius/chant/codegen/naming";
|
|
10
|
+
import { k3sShortName, k3sServiceName, type K3sParseResult } from "./parse";
|
|
11
|
+
|
|
12
|
+
export { propertyTypeName, extractDefName } from "@intentius/chant/codegen/naming";
|
|
13
|
+
|
|
14
|
+
const k3sNamingConfig: NamingConfig = {
|
|
15
|
+
priorityNames: {
|
|
16
|
+
"K3s::Server": "Server",
|
|
17
|
+
"K3s::Agent": "Agent",
|
|
18
|
+
"K3s::Registries": "Registries",
|
|
19
|
+
"K3s::Mirror": "Mirror",
|
|
20
|
+
"K3s::RegistryConfig": "RegistryConfig",
|
|
21
|
+
"K3s::RegistryAuth": "RegistryAuth",
|
|
22
|
+
"K3s::RegistryTLS": "RegistryTLS",
|
|
23
|
+
},
|
|
24
|
+
priorityAliases: {},
|
|
25
|
+
priorityPropertyAliases: {},
|
|
26
|
+
serviceAbbreviations: {},
|
|
27
|
+
shortName: k3sShortName,
|
|
28
|
+
serviceName: k3sServiceName,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* k3s naming strategy.
|
|
33
|
+
*/
|
|
34
|
+
export class NamingStrategy extends CoreNamingStrategy {
|
|
35
|
+
constructor(results: K3sParseResult[]) {
|
|
36
|
+
const inputs: NamingInput[] = results.map((r) => ({
|
|
37
|
+
typeName: r.resource.typeName,
|
|
38
|
+
propertyTypes: r.propertyTypes,
|
|
39
|
+
}));
|
|
40
|
+
super(inputs, k3sNamingConfig);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { packagePipeline, collectSkills } from "@intentius/chant/codegen/package";
|
|
2
|
+
import type { PackagePipelineConfig } from "@intentius/chant/codegen/package";
|
|
3
|
+
import { k3sPlugin } from "../plugin";
|
|
4
|
+
import { generate } from "./generate";
|
|
5
|
+
import { dirname } from "path";
|
|
6
|
+
import { fileURLToPath } from "url";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Package the k3s lexicon for distribution.
|
|
10
|
+
*/
|
|
11
|
+
export async function packageLexicon(options?: { verbose?: boolean; force?: boolean }) {
|
|
12
|
+
const srcDir = dirname(fileURLToPath(import.meta.url));
|
|
13
|
+
|
|
14
|
+
const { spec, stats } = await packagePipeline({
|
|
15
|
+
generate: (opts) => generate({ verbose: opts?.verbose, force: opts?.force }),
|
|
16
|
+
buildManifest: () => ({
|
|
17
|
+
name: "k3s",
|
|
18
|
+
version: "0.0.1",
|
|
19
|
+
chantVersion: ">=0.1.0",
|
|
20
|
+
namespace: "K3s",
|
|
21
|
+
}),
|
|
22
|
+
srcDir,
|
|
23
|
+
collectSkills: () => collectSkills(k3sPlugin.skills?.() ?? []),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
console.error(`Packaged ${stats.resources} resources, ${stats.ruleCount} rules`);
|
|
27
|
+
return { spec, stats };
|
|
28
|
+
}
|