@intentius/chant-lexicon-k3d 0.0.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 +26 -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 +6 -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 +57 -0
- package/dist/codegen/parse.d.ts.map +1 -0
- package/dist/describe-resources.d.ts +34 -0
- package/dist/describe-resources.d.ts.map +1 -0
- package/dist/generated/index.d.ts +22 -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 +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/integrity.json +9 -0
- package/dist/lint/audit-catalog.d.ts +9 -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/k3d101.d.ts +19 -0
- package/dist/lint/post-synth/k3d101.d.ts.map +1 -0
- package/dist/lint/post-synth/k3d102.d.ts +12 -0
- package/dist/lint/post-synth/k3d102.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/registry-proxy-password.d.ts +17 -0
- package/dist/lint/rules/registry-proxy-password.d.ts.map +1 -0
- package/dist/lint/rules/sample.d.ts +8 -0
- package/dist/lint/rules/sample.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 +184 -0
- package/dist/op/activities/index.d.ts +17 -0
- package/dist/op/activities/index.d.ts.map +1 -0
- package/dist/op/activities/k3d.d.ts +93 -0
- package/dist/op/activities/k3d.d.ts.map +1 -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 +35 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/spec/fetch.d.ts +39 -0
- package/dist/spec/fetch.d.ts.map +1 -0
- package/dist/testdata/load-fixtures.d.ts +16 -0
- package/dist/testdata/load-fixtures.d.ts.map +1 -0
- package/dist/types/index.d.ts +189 -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 +58 -0
- package/src/codegen/docs.ts +25 -0
- package/src/codegen/generate-cli.ts +36 -0
- package/src/codegen/generate-lexicon.ts +58 -0
- package/src/codegen/generate-typescript.ts +102 -0
- package/src/codegen/generate.test.ts +154 -0
- package/src/codegen/generate.ts +139 -0
- package/src/codegen/naming.ts +56 -0
- package/src/codegen/package.ts +27 -0
- package/src/codegen/parse.ts +359 -0
- package/src/describe-resources.test.ts +142 -0
- package/src/describe-resources.ts +144 -0
- package/src/generated/.gitkeep +0 -0
- package/src/generated/index.d.ts +189 -0
- package/src/generated/index.ts +27 -0
- package/src/generated/lexicon-k3d.json +184 -0
- package/src/generated/runtime.ts +4 -0
- package/src/index.ts +8 -0
- package/src/lint/audit-catalog.ts +26 -0
- package/src/lint/post-synth/index.ts +9 -0
- package/src/lint/post-synth/k3d101.ts +87 -0
- package/src/lint/post-synth/k3d102.ts +40 -0
- package/src/lint/post-synth/post-synth.test.ts +76 -0
- package/src/lint/rules/index.ts +7 -0
- package/src/lint/rules/registry-proxy-password.test.ts +53 -0
- package/src/lint/rules/registry-proxy-password.ts +93 -0
- package/src/lsp/completions.test.ts +10 -0
- package/src/lsp/completions.ts +21 -0
- package/src/lsp/hover.test.ts +10 -0
- package/src/lsp/hover.ts +39 -0
- package/src/op/activities/index.ts +24 -0
- package/src/op/activities/k3d.test.ts +168 -0
- package/src/op/activities/k3d.ts +183 -0
- package/src/package-cli.ts +41 -0
- package/src/plugin.test.ts +17 -0
- package/src/plugin.ts +114 -0
- package/src/serializer.acceptance.test.ts +94 -0
- package/src/serializer.test.ts +189 -0
- package/src/serializer.ts +202 -0
- package/src/spec/fetch.ts +66 -0
- package/src/testdata/k3d-schema-fixture.json +431 -0
- package/src/testdata/load-fixtures.ts +27 -0
- package/src/validate-cli.ts +5 -0
- package/src/validate.ts +28 -0
package/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# @intentius/chant-lexicon-k3d
|
|
2
|
+
|
|
3
|
+
k3d lexicon plugin for [chant](https://github.com/intentius/chant).
|
|
4
|
+
|
|
5
|
+
## Getting started
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Generate types from upstream spec
|
|
9
|
+
just generate
|
|
10
|
+
|
|
11
|
+
# Validate generated artifacts
|
|
12
|
+
just validate
|
|
13
|
+
|
|
14
|
+
# Generate documentation
|
|
15
|
+
just docs
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Project structure
|
|
19
|
+
|
|
20
|
+
- `src/plugin.ts` — LexiconPlugin with all lifecycle methods
|
|
21
|
+
- `src/serializer.ts` — Build output serializer
|
|
22
|
+
- `src/codegen/` — Code generation pipeline
|
|
23
|
+
- `src/spec/` — Upstream schema fetching and parsing
|
|
24
|
+
- `src/lint/rules/` — Lint rules
|
|
25
|
+
- `src/lsp/` — LSP completions and hover
|
|
26
|
+
- `src/generated/` — Generated artifacts (do not edit)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/codegen/docs.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAsB,YAAY,CAAC,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBjF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-cli.d.ts","sourceRoot":"","sources":["../../src/codegen/generate-cli.ts"],"names":[],"mappings":";AACA;;GAEG"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lexicon JSON generator — produces lexicon-k3d.json with metadata
|
|
3
|
+
* for all k3d entities.
|
|
4
|
+
*/
|
|
5
|
+
import type { PropertyConstraints } from "@intentius/chant/codegen/json-schema";
|
|
6
|
+
import type { K3dParseResult } from "./parse.js";
|
|
7
|
+
import type { NamingStrategy } from "./naming.js";
|
|
8
|
+
export interface LexiconEntry {
|
|
9
|
+
resourceType: string;
|
|
10
|
+
kind: "resource" | "property";
|
|
11
|
+
lexicon: "k3d";
|
|
12
|
+
deprecatedProperties?: string[];
|
|
13
|
+
constraints?: Record<string, PropertyConstraints>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Generate the lexicon-k3d.json content.
|
|
17
|
+
*/
|
|
18
|
+
export declare function generateLexiconJSON(results: K3dParseResult[], naming: NamingStrategy): string;
|
|
19
|
+
//# sourceMappingURL=generate-lexicon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-lexicon.d.ts","sourceRoot":"","sources":["../../src/codegen/generate-lexicon.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAO/C,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;IAC9B,OAAO,EAAE,KAAK,CAAC;IACf,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;CACnD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,cAAc,EAAE,EACzB,MAAM,EAAE,cAAc,GACrB,MAAM,CA4BR"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript declaration file generator — produces index.d.ts with all
|
|
3
|
+
* k3d entity classes.
|
|
4
|
+
*/
|
|
5
|
+
import type { K3dParseResult } from "./parse.js";
|
|
6
|
+
import type { NamingStrategy } from "./naming.js";
|
|
7
|
+
/**
|
|
8
|
+
* Generate the complete .d.ts file content.
|
|
9
|
+
*/
|
|
10
|
+
export declare function generateTypeScriptDeclarations(results: K3dParseResult[], naming: NamingStrategy): string;
|
|
11
|
+
//# sourceMappingURL=generate-typescript.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-typescript.d.ts","sourceRoot":"","sources":["../../src/codegen/generate-typescript.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAqB/C;;GAEG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,cAAc,EAAE,EACzB,MAAM,EAAE,cAAc,GACrB,MAAM,CAmER"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* k3d generation pipeline — uses core generatePipeline with k3d-specific
|
|
3
|
+
* fetch, parse, naming, and generation callbacks.
|
|
4
|
+
*/
|
|
5
|
+
import { type GenerateOptions, type GenerateResult } from "@intentius/chant/codegen/generate";
|
|
6
|
+
export type { GenerateResult };
|
|
7
|
+
/**
|
|
8
|
+
* Run the full k3d generation pipeline.
|
|
9
|
+
*/
|
|
10
|
+
export declare function generate(opts?: GenerateOptions): Promise<GenerateResult>;
|
|
11
|
+
/**
|
|
12
|
+
* Write generated artifacts to disk.
|
|
13
|
+
*/
|
|
14
|
+
export declare function writeGeneratedFiles(result: GenerateResult, pkgDir?: string): void;
|
|
15
|
+
//# sourceMappingURL=generate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/codegen/generate.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,cAAc,EAEpB,MAAM,mCAAmC,CAAC;AAc3C,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B;;GAEG;AACH,wBAAsB,QAAQ,CAAC,IAAI,GAAE,eAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,CAyClF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAWjF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* k3d naming strategy — flat namespace, one short name per entity.
|
|
3
|
+
*/
|
|
4
|
+
import { NamingStrategy as CoreNamingStrategy } from "@intentius/chant/codegen/naming";
|
|
5
|
+
import { type K3dParseResult } from "./parse.js";
|
|
6
|
+
export { propertyTypeName, extractDefName } from "@intentius/chant/codegen/naming";
|
|
7
|
+
/**
|
|
8
|
+
* k3d naming strategy.
|
|
9
|
+
*/
|
|
10
|
+
export declare class NamingStrategy extends CoreNamingStrategy {
|
|
11
|
+
constructor(results: K3dParseResult[]);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=naming.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"naming.d.ts","sourceRoot":"","sources":["../../src/codegen/naming.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,cAAc,IAAI,kBAAkB,EAGrC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAgC,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAE5E,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAiCnF;;GAEG;AACH,qBAAa,cAAe,SAAQ,kBAAkB;gBACxC,OAAO,EAAE,cAAc,EAAE;CAOtC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package the k3d lexicon for distribution.
|
|
3
|
+
*/
|
|
4
|
+
export declare function packageLexicon(options?: {
|
|
5
|
+
verbose?: boolean;
|
|
6
|
+
force?: boolean;
|
|
7
|
+
}): Promise<{
|
|
8
|
+
spec: import("packages/core/src").BundleSpec;
|
|
9
|
+
stats: {
|
|
10
|
+
resources: number;
|
|
11
|
+
properties: number;
|
|
12
|
+
enums: number;
|
|
13
|
+
ruleCount: number;
|
|
14
|
+
skillCount: number;
|
|
15
|
+
};
|
|
16
|
+
}>;
|
|
17
|
+
//# sourceMappingURL=package.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/codegen/package.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,wBAAsB,cAAc,CAAC,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE;;;;;;;;;GAiBpF"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* k3d SimpleConfig JSON Schema parser.
|
|
3
|
+
*
|
|
4
|
+
* Parses the single v1alpha5 schema into multiple entity results — the
|
|
5
|
+
* Cluster resource plus one property entity per nested config object
|
|
6
|
+
* (Metadata, Volume, Registries, Options, etc.).
|
|
7
|
+
*/
|
|
8
|
+
import type { PropertyConstraints } from "@intentius/chant/codegen/json-schema";
|
|
9
|
+
import { constraintsIsEmpty as coreConstraintsIsEmpty } from "@intentius/chant/codegen/json-schema";
|
|
10
|
+
export type { PropertyConstraints };
|
|
11
|
+
export { coreConstraintsIsEmpty as constraintsIsEmpty };
|
|
12
|
+
export interface ParsedProperty {
|
|
13
|
+
name: string;
|
|
14
|
+
tsType: string;
|
|
15
|
+
required: boolean;
|
|
16
|
+
description?: string;
|
|
17
|
+
enum?: string[];
|
|
18
|
+
constraints: PropertyConstraints;
|
|
19
|
+
}
|
|
20
|
+
export interface ParsedPropertyType {
|
|
21
|
+
name: string;
|
|
22
|
+
defType: string;
|
|
23
|
+
properties: ParsedProperty[];
|
|
24
|
+
}
|
|
25
|
+
export interface ParsedEnum {
|
|
26
|
+
name: string;
|
|
27
|
+
values: string[];
|
|
28
|
+
}
|
|
29
|
+
export interface ParsedResource {
|
|
30
|
+
typeName: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
properties: ParsedProperty[];
|
|
33
|
+
attributes: Array<{
|
|
34
|
+
name: string;
|
|
35
|
+
tsType: string;
|
|
36
|
+
}>;
|
|
37
|
+
deprecatedProperties: string[];
|
|
38
|
+
}
|
|
39
|
+
export interface K3dParseResult {
|
|
40
|
+
resource: ParsedResource;
|
|
41
|
+
propertyTypes: ParsedPropertyType[];
|
|
42
|
+
enums: ParsedEnum[];
|
|
43
|
+
isProperty?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Parse the k3d SimpleConfig JSON Schema into multiple entity results.
|
|
47
|
+
*/
|
|
48
|
+
export declare function parseConfigSchema(data: string | Buffer): K3dParseResult[];
|
|
49
|
+
/**
|
|
50
|
+
* Extract short name: "K3d::Cluster" → "Cluster"
|
|
51
|
+
*/
|
|
52
|
+
export declare function k3dShortName(typeName: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* Extract service name: always "K3d" — the lexicon is a single flat service.
|
|
55
|
+
*/
|
|
56
|
+
export declare function k3dServiceName(_typeName: string): string;
|
|
57
|
+
//# sourceMappingURL=parse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/codegen/parse.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAEL,kBAAkB,IAAI,sBAAsB,EAG7C,MAAM,sCAAsC,CAAC;AAI9C,YAAY,EAAE,mBAAmB,EAAE,CAAC;AACpC,OAAO,EAAE,sBAAsB,IAAI,kBAAkB,EAAE,CAAC;AAExD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,EAAE,mBAAmB,CAAC;CAClC;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,cAAc,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,UAAU,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpD,oBAAoB,EAAE,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,cAAc,CAAC;IACzB,aAAa,EAAE,kBAAkB,EAAE,CAAC;IACpC,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA+ED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,cAAc,EAAE,CAkBzE;AA+LD;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGrD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAExD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live observation for declared k3d clusters (#1412).
|
|
3
|
+
*
|
|
4
|
+
* The read is two commands: `k3d cluster list -o json` for presence and
|
|
5
|
+
* running state, and `docker inspect` on the cluster's first server node for
|
|
6
|
+
* the ownership marker — k3d's list output carries a `runtimeLabels` field
|
|
7
|
+
* but only k3d's own `k3d.*` labels appear in it, so the custom labels the
|
|
8
|
+
* serializer stamps via `options.runtime.labels` are only visible to Docker.
|
|
9
|
+
* Verified live before this was written; see #1412.
|
|
10
|
+
*
|
|
11
|
+
* The tri-state is the whole report (#1089): a declared cluster is present,
|
|
12
|
+
* absent, or not-observed-with-a-reason. k3d or Docker being unavailable is
|
|
13
|
+
* `read-failed` for everything — never absence, because proposing to create
|
|
14
|
+
* a cluster while Docker is stopped is the false finding the contract
|
|
15
|
+
* exists to prevent. There is no property-level drift here on purpose: the
|
|
16
|
+
* declared config is an input to creation, not a spec k3d reconciles
|
|
17
|
+
* against, so node counts diverging is not "drift" anyone can act on.
|
|
18
|
+
*/
|
|
19
|
+
import type { DescribeResourcesResult } from "@intentius/chant/lexicon";
|
|
20
|
+
import { type DeclaredEntity } from "@intentius/chant/observation";
|
|
21
|
+
/** The two commands the observer runs, injectable for tests. */
|
|
22
|
+
export type ExecFn = (command: string) => Promise<{
|
|
23
|
+
stdout: string;
|
|
24
|
+
}>;
|
|
25
|
+
/** The cluster name a declaration resolves to: metadata.name, else the entity name. */
|
|
26
|
+
export declare function declaredClusterName(entity: DeclaredEntity): string;
|
|
27
|
+
export declare function describeResources(options: {
|
|
28
|
+
entityNames: string[];
|
|
29
|
+
entities: Map<string, {
|
|
30
|
+
entityType: string;
|
|
31
|
+
props: Record<string, unknown>;
|
|
32
|
+
}>;
|
|
33
|
+
}, execFn?: ExecFn): Promise<DescribeResourcesResult>;
|
|
34
|
+
//# sourceMappingURL=describe-resources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describe-resources.d.ts","sourceRoot":"","sources":["../src/describe-resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAEL,KAAK,cAAc,EAGpB,MAAM,8BAA8B,CAAC;AAOtC,gEAAgE;AAChE,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAiBtE,uFAAuF;AACvF,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAIlE;AAqED,wBAAsB,iBAAiB,CACrC,OAAO,EAAE;IACP,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;CAC/E,EACD,MAAM,GAAE,MAAkB,GACzB,OAAO,CAAC,uBAAuB,CAAC,CAWlC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const Cluster: new (props: Record<string, unknown>, attributes?: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, string>;
|
|
2
|
+
export declare const EnvVar: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
3
|
+
export declare const File: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
4
|
+
export declare const HostAlias: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
5
|
+
export declare const K3dOptions: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
6
|
+
export declare const K3sExtraArg: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
7
|
+
export declare const K3sOptions: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
8
|
+
export declare const KubeAPI: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
9
|
+
export declare const KubeconfigOptions: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
10
|
+
export declare const LoadbalancerOptions: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
11
|
+
export declare const Metadata: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
12
|
+
export declare const NodeLabel: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
13
|
+
export declare const Options: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
14
|
+
export declare const Port: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
15
|
+
export declare const Registries: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
16
|
+
export declare const RegistryCreate: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
17
|
+
export declare const RegistryProxy: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
18
|
+
export declare const RuntimeLabel: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
19
|
+
export declare const RuntimeOptions: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
20
|
+
export declare const Ulimit: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
21
|
+
export declare const Volume: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,+IAA4C,CAAC;AAEjE,eAAO,MAAM,MAAM,0GAAuC,CAAC;AAC3D,eAAO,MAAM,IAAI,0GAAqC,CAAC;AACvD,eAAO,MAAM,SAAS,0GAA0C,CAAC;AACjE,eAAO,MAAM,UAAU,0GAA2C,CAAC;AACnE,eAAO,MAAM,WAAW,0GAA4C,CAAC;AACrE,eAAO,MAAM,UAAU,0GAA2C,CAAC;AACnE,eAAO,MAAM,OAAO,0GAAwC,CAAC;AAC7D,eAAO,MAAM,iBAAiB,0GAAkD,CAAC;AACjF,eAAO,MAAM,mBAAmB,0GAAoD,CAAC;AACrF,eAAO,MAAM,QAAQ,0GAAyC,CAAC;AAC/D,eAAO,MAAM,SAAS,0GAA0C,CAAC;AACjE,eAAO,MAAM,OAAO,0GAAwC,CAAC;AAC7D,eAAO,MAAM,IAAI,0GAAqC,CAAC;AACvD,eAAO,MAAM,UAAU,0GAA2C,CAAC;AACnE,eAAO,MAAM,cAAc,0GAA+C,CAAC;AAC3E,eAAO,MAAM,aAAa,0GAA8C,CAAC;AACzE,eAAO,MAAM,YAAY,0GAA6C,CAAC;AACvE,eAAO,MAAM,cAAc,0GAA+C,CAAC;AAC3E,eAAO,MAAM,MAAM,0GAAuC,CAAC;AAC3D,eAAO,MAAM,MAAM,0GAAuC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/generated/runtime.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"algorithm": "sha256",
|
|
3
|
+
"artifacts": {
|
|
4
|
+
"manifest.json": "74c46070129060da51012b19a3198faeffeb329e34a526020a27604e053241e2",
|
|
5
|
+
"meta.json": "b6171c6e55d4ed0a1e3674b73cb5871150cc9b76cfc4b6b1c51811a9b1ddc9f7",
|
|
6
|
+
"types/index.d.ts": "6f1058bac9d8899ee2095e100dd561d4b54055c522184c6c4fa5d75b0f5c19d8"
|
|
7
|
+
},
|
|
8
|
+
"composite": "4298f1cf12c3ce533748f5ea0a11d259d25ad9605839264261e309c45ccbde22"
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The k3d lexicon's chant audit catalog — metadata for its post-synth
|
|
3
|
+
* checks, contributed via k3dPlugin.auditCatalog() (#687, #1346). Every
|
|
4
|
+
* post-synth check has an entry, or the check contributes nothing to
|
|
5
|
+
* `chant audit`, silently.
|
|
6
|
+
*/
|
|
7
|
+
import { type RuleMeta } from "@intentius/chant/audit/catalog";
|
|
8
|
+
export declare const k3dAuditCatalog: Record<string, RuleMeta>;
|
|
9
|
+
//# sourceMappingURL=audit-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-catalog.d.ts","sourceRoot":"","sources":["../../src/lint/audit-catalog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE1E,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAiBpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAIvE,eAAO,MAAM,eAAe,EAAE,cAAc,EAG3C,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* K3D101: malformed nodeFilters.
|
|
3
|
+
*
|
|
4
|
+
* `nodeFilters` are k3d's own selector syntax and the schema types them as
|
|
5
|
+
* bare strings, so a typo validates, applies to nothing, and reports
|
|
6
|
+
* nothing — the port mapping or volume silently lands nowhere. This is the
|
|
7
|
+
* silent-at-create failure worth an error.
|
|
8
|
+
*
|
|
9
|
+
* Valid forms (k3d v5): `all`, `loadbalancer`, or `server`/`agent` with an
|
|
10
|
+
* optional `:<index>` / `:*`, and for port mappings an optional trailing
|
|
11
|
+
* `:direct` / `:proxy`.
|
|
12
|
+
*/
|
|
13
|
+
import type { PostSynthCheck, PostSynthContext } from "@intentius/chant/lint/post-synth";
|
|
14
|
+
export declare function k3dDocuments(ctx: PostSynthContext): Array<{
|
|
15
|
+
source: string;
|
|
16
|
+
doc: unknown;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const k3d101: PostSynthCheck;
|
|
19
|
+
//# sourceMappingURL=k3d101.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"k3d101.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/k3d101.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAuB,MAAM,kCAAkC,CAAC;AAK9G,wBAAgB,YAAY,CAAC,GAAG,EAAE,gBAAgB,GAAG,KAAK,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,OAAO,CAAA;CAAE,CAAC,CAwB3F;AAmBD,eAAO,MAAM,MAAM,EAAE,cAwBpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* K3D102: registry proxy credential in the emitted config.
|
|
3
|
+
*
|
|
4
|
+
* The other half of K3D001: the lint rule sees literals in source, this
|
|
5
|
+
* sees what actually landed in the artifact — a value that arrived through
|
|
6
|
+
* a variable, a helper, or anything else the AST rule cannot follow. The
|
|
7
|
+
* emitted config is the file people commit, attach to issues and copy to
|
|
8
|
+
* other machines, which is exactly where a registry credential must not be.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
export declare const k3d102: PostSynthCheck;
|
|
12
|
+
//# sourceMappingURL=k3d102.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"k3d102.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/k3d102.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,MAAM,EAAE,cA0BpB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { LintRule } from "@intentius/chant/lint/rule";
|
|
2
|
+
export { registryProxyPasswordRule } from "./registry-proxy-password.js";
|
|
3
|
+
/** All lint rules provided by this lexicon (imported by plugin.ts's lintRules()). */
|
|
4
|
+
export declare const rules: LintRule[];
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,qFAAqF;AACrF,eAAO,MAAM,KAAK,EAAE,QAAQ,EAAgC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { LintRule } from "@intentius/chant/lint/rule";
|
|
2
|
+
/**
|
|
3
|
+
* K3D001: literal registry proxy password in source.
|
|
4
|
+
*
|
|
5
|
+
* The v1alpha5 schema types `registries.create.proxy.password` as a plain
|
|
6
|
+
* string, so nothing upstream stops a declaration from carrying the registry
|
|
7
|
+
* credential verbatim — and a cluster config is exactly the kind of file
|
|
8
|
+
* that gets committed. A literal here is a credential in source, which is
|
|
9
|
+
* the line chant does not cross anywhere else (FTN001, WK8005).
|
|
10
|
+
*
|
|
11
|
+
* Flags a string-literal `password` when it is unambiguously the k3d proxy
|
|
12
|
+
* one: inside a `RegistryProxy(...)` construction, or inside an object
|
|
13
|
+
* assigned to a `proxy` property. A bare `password:` elsewhere in the file
|
|
14
|
+
* is someone else's business.
|
|
15
|
+
*/
|
|
16
|
+
export declare const registryProxyPasswordRule: LintRule;
|
|
17
|
+
//# sourceMappingURL=registry-proxy-password.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-proxy-password.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/registry-proxy-password.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,4BAA4B,CAAC;AAExF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,yBAAyB,EAAE,QA2EvC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sample.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/sample.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,4BAA4B,CAAC;AAExF;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,QAUxB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CompletionContext, CompletionItem } from "@intentius/chant/lsp/types";
|
|
2
|
+
/**
|
|
3
|
+
* Provide k3d completions based on context — Cluster and its property
|
|
4
|
+
* entities, from the generated registry.
|
|
5
|
+
*/
|
|
6
|
+
export declare function completions(ctx: CompletionContext): CompletionItem[];
|
|
7
|
+
//# sourceMappingURL=completions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../../src/lsp/completions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAapF;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,iBAAiB,GAAG,cAAc,EAAE,CAEpE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover.d.ts","sourceRoot":"","sources":["../../src/lsp/hover.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAa1E;;GAEG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,YAAY,GAAG,SAAS,GAAG,SAAS,CAE9D"}
|