@intentius/chant-lexicon-docker 0.124.97 → 0.124.99
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/codegen/docs-cli.d.ts +0 -1
- package/dist/codegen/docs.d.ts +0 -1
- package/dist/codegen/generate-cli.d.ts +0 -1
- package/dist/codegen/generate-compose.d.ts +0 -1
- package/dist/codegen/generate-dockerfile.d.ts +0 -1
- package/dist/codegen/generate.d.ts +0 -1
- package/dist/codegen/naming.d.ts +0 -1
- package/dist/codegen/package.d.ts +0 -1
- package/dist/codegen/patches.d.ts +0 -1
- package/dist/codegen/versions.d.ts +0 -1
- package/dist/compose-key.d.ts +0 -1
- package/dist/composites/catalog.d.ts +0 -1
- package/dist/composites/docker-otel-collector.d.ts +0 -1
- package/dist/composites/docker-web-service.d.ts +0 -1
- package/dist/composites/index.d.ts +0 -1
- package/dist/coverage.d.ts +0 -1
- package/dist/default-labels.d.ts +0 -1
- package/dist/detect.d.ts +0 -1
- package/dist/dockerfile-order.d.ts +0 -1
- package/dist/export-resources.d.ts +0 -1
- package/dist/generated/index.d.ts +0 -1
- package/dist/generated/runtime.d.ts +0 -1
- package/dist/import/adapter.d.ts +0 -1
- package/dist/import/adapter.js +4 -2
- package/dist/import/embedded.d.ts +0 -1
- package/dist/import/engine.d.ts +0 -1
- package/dist/import/generator.d.ts +9 -2
- package/dist/import/generator.js +23 -1
- package/dist/import/live-export.d.ts +0 -1
- package/dist/import/parser.d.ts +0 -1
- package/dist/import/testdata/tar.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/integrity.json +2 -2
- package/dist/interpolation.d.ts +0 -1
- package/dist/lint/audit-catalog.d.ts +0 -1
- package/dist/lint/audit-lineage.d.ts +0 -1
- package/dist/lint/post-synth/add-url-checksum.d.ts +0 -1
- package/dist/lint/post-synth/apt-no-recommends.d.ts +0 -1
- package/dist/lint/post-synth/apt-update-alone.d.ts +0 -1
- package/dist/lint/post-synth/cache-busting-copy.d.ts +0 -1
- package/dist/lint/post-synth/copy-from-stage.d.ts +0 -1
- package/dist/lint/post-synth/docker-helpers.d.ts +0 -1
- package/dist/lint/post-synth/index.d.ts +0 -1
- package/dist/lint/post-synth/no-latest-image.d.ts +0 -1
- package/dist/lint/post-synth/no-root-user.d.ts +0 -1
- package/dist/lint/post-synth/prefer-copy.d.ts +0 -1
- package/dist/lint/post-synth/relative-workdir.d.ts +0 -1
- package/dist/lint/post-synth/repeated-cmd.d.ts +0 -1
- package/dist/lint/post-synth/root-after-user.d.ts +0 -1
- package/dist/lint/post-synth/ssh-port-exposed.d.ts +0 -1
- package/dist/lint/post-synth/unused-global-arg.d.ts +0 -1
- package/dist/lint/post-synth/unused-volume.d.ts +0 -1
- package/dist/lint/rules/data/deprecated-images.d.ts +0 -1
- package/dist/lint/rules/data/known-base-images.d.ts +0 -1
- package/dist/lint/rules/index.d.ts +0 -1
- package/dist/lint/rules/no-latest-tag.d.ts +0 -1
- package/dist/lint/rules/per-kind-order.d.ts +0 -1
- package/dist/list-artifacts.d.ts +0 -1
- package/dist/lsp/completions.d.ts +0 -1
- package/dist/lsp/hover.d.ts +0 -1
- package/dist/manifest.json +1 -1
- package/dist/package-cli.d.ts +0 -1
- package/dist/plugin.d.ts +0 -1
- package/dist/serializer.d.ts +0 -1
- package/dist/spec/fetch-compose.d.ts +0 -1
- package/dist/spec/fetch-engine.d.ts +0 -1
- package/dist/spec/parse-compose.d.ts +0 -1
- package/dist/spec/parse-engine.d.ts +0 -1
- package/dist/validate-cli.d.ts +0 -1
- package/dist/validate.d.ts +0 -1
- package/dist/variables.d.ts +0 -1
- package/package.json +4 -5
- package/dist/codegen/docs-cli.d.ts.map +0 -1
- package/dist/codegen/docs.d.ts.map +0 -1
- package/dist/codegen/generate-cli.d.ts.map +0 -1
- package/dist/codegen/generate-compose.d.ts.map +0 -1
- package/dist/codegen/generate-dockerfile.d.ts.map +0 -1
- package/dist/codegen/generate.d.ts.map +0 -1
- package/dist/codegen/naming.d.ts.map +0 -1
- package/dist/codegen/package.d.ts.map +0 -1
- package/dist/codegen/patches.d.ts.map +0 -1
- package/dist/codegen/versions.d.ts.map +0 -1
- package/dist/compose-key.d.ts.map +0 -1
- package/dist/composites/catalog.d.ts.map +0 -1
- package/dist/composites/docker-otel-collector.d.ts.map +0 -1
- package/dist/composites/docker-web-service.d.ts.map +0 -1
- package/dist/composites/index.d.ts.map +0 -1
- package/dist/coverage.d.ts.map +0 -1
- package/dist/default-labels.d.ts.map +0 -1
- package/dist/detect.d.ts.map +0 -1
- package/dist/dockerfile-order.d.ts.map +0 -1
- package/dist/export-resources.d.ts.map +0 -1
- package/dist/generated/index.d.ts.map +0 -1
- package/dist/generated/runtime.d.ts.map +0 -1
- package/dist/import/adapter.d.ts.map +0 -1
- package/dist/import/embedded.d.ts.map +0 -1
- package/dist/import/engine.d.ts.map +0 -1
- package/dist/import/generator.d.ts.map +0 -1
- package/dist/import/live-export.d.ts.map +0 -1
- package/dist/import/parser.d.ts.map +0 -1
- package/dist/import/testdata/tar.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/interpolation.d.ts.map +0 -1
- package/dist/lint/audit-catalog.d.ts.map +0 -1
- package/dist/lint/audit-lineage.d.ts.map +0 -1
- package/dist/lint/post-synth/add-url-checksum.d.ts.map +0 -1
- package/dist/lint/post-synth/apt-no-recommends.d.ts.map +0 -1
- package/dist/lint/post-synth/apt-update-alone.d.ts.map +0 -1
- package/dist/lint/post-synth/cache-busting-copy.d.ts.map +0 -1
- package/dist/lint/post-synth/copy-from-stage.d.ts.map +0 -1
- package/dist/lint/post-synth/docker-helpers.d.ts.map +0 -1
- package/dist/lint/post-synth/index.d.ts.map +0 -1
- package/dist/lint/post-synth/no-latest-image.d.ts.map +0 -1
- package/dist/lint/post-synth/no-root-user.d.ts.map +0 -1
- package/dist/lint/post-synth/prefer-copy.d.ts.map +0 -1
- package/dist/lint/post-synth/relative-workdir.d.ts.map +0 -1
- package/dist/lint/post-synth/repeated-cmd.d.ts.map +0 -1
- package/dist/lint/post-synth/root-after-user.d.ts.map +0 -1
- package/dist/lint/post-synth/ssh-port-exposed.d.ts.map +0 -1
- package/dist/lint/post-synth/unused-global-arg.d.ts.map +0 -1
- package/dist/lint/post-synth/unused-volume.d.ts.map +0 -1
- package/dist/lint/rules/data/deprecated-images.d.ts.map +0 -1
- package/dist/lint/rules/data/known-base-images.d.ts.map +0 -1
- package/dist/lint/rules/index.d.ts.map +0 -1
- package/dist/lint/rules/no-latest-tag.d.ts.map +0 -1
- package/dist/lint/rules/per-kind-order.d.ts.map +0 -1
- package/dist/list-artifacts.d.ts.map +0 -1
- package/dist/lsp/completions.d.ts.map +0 -1
- package/dist/lsp/hover.d.ts.map +0 -1
- package/dist/package-cli.d.ts.map +0 -1
- package/dist/plugin.d.ts.map +0 -1
- package/dist/serializer.d.ts.map +0 -1
- package/dist/spec/fetch-compose.d.ts.map +0 -1
- package/dist/spec/fetch-engine.d.ts.map +0 -1
- package/dist/spec/parse-compose.d.ts.map +0 -1
- package/dist/spec/parse-engine.d.ts.map +0 -1
- package/dist/validate-cli.d.ts.map +0 -1
- package/dist/validate.d.ts.map +0 -1
- package/dist/variables.d.ts.map +0 -1
- package/src/codegen/__snapshots__/okf.test.ts.snap +0 -555
- package/src/codegen/docs-cli.ts +0 -10
- package/src/codegen/docs.ts +0 -171
- package/src/codegen/generate-cli.ts +0 -36
- package/src/codegen/generate-compose.ts +0 -21
- package/src/codegen/generate-dockerfile.ts +0 -21
- package/src/codegen/generate.test.ts +0 -115
- package/src/codegen/generate.ts +0 -258
- package/src/codegen/naming.test.ts +0 -81
- package/src/codegen/naming.ts +0 -54
- package/src/codegen/okf.test.ts +0 -36
- package/src/codegen/package.ts +0 -59
- package/src/codegen/patches.ts +0 -42
- package/src/codegen/versions.ts +0 -46
- package/src/compose-key.ts +0 -31
- package/src/composites/catalog.test.ts +0 -39
- package/src/composites/catalog.ts +0 -118
- package/src/composites/docker-otel-collector.ts +0 -83
- package/src/composites/docker-web-service.test.ts +0 -34
- package/src/composites/docker-web-service.ts +0 -75
- package/src/composites/index.ts +0 -9
- package/src/coverage.test.ts +0 -33
- package/src/coverage.ts +0 -54
- package/src/default-labels.test.ts +0 -85
- package/src/default-labels.ts +0 -72
- package/src/detect.ts +0 -7
- package/src/dockerfile-order.ts +0 -20
- package/src/docs-examples.test.ts +0 -141
- package/src/export-resources.ts +0 -90
- package/src/generated/index.d.ts +0 -407
- package/src/generated/index.ts +0 -410
- package/src/generated/runtime.ts +0 -4
- package/src/import/adapter.ts +0 -99
- package/src/import/embedded-live.test.ts +0 -248
- package/src/import/embedded.ts +0 -83
- package/src/import/engine.ts +0 -107
- package/src/import/generator.test.ts +0 -134
- package/src/import/generator.ts +0 -202
- package/src/import/live-export.test.ts +0 -271
- package/src/import/live-export.ts +0 -359
- package/src/import/parser.test.ts +0 -137
- package/src/import/parser.ts +0 -269
- package/src/import/roundtrip.test.ts +0 -257
- package/src/import/testdata/configs-secrets.yaml +0 -15
- package/src/import/testdata/full.yaml +0 -43
- package/src/import/testdata/names-and-fields.yaml +0 -44
- package/src/import/testdata/simple.yaml +0 -9
- package/src/import/testdata/tar.ts +0 -24
- package/src/import/testdata/webapp.yaml +0 -41
- package/src/index.ts +0 -32
- package/src/interpolation.test.ts +0 -41
- package/src/interpolation.ts +0 -76
- package/src/lint/audit-catalog.ts +0 -28
- package/src/lint/audit-lineage.ts +0 -48
- package/src/lint/post-synth/add-url-checksum.ts +0 -38
- package/src/lint/post-synth/apt-no-recommends.ts +0 -43
- package/src/lint/post-synth/apt-update-alone.ts +0 -39
- package/src/lint/post-synth/cache-busting-copy.ts +0 -65
- package/src/lint/post-synth/copy-from-stage.ts +0 -54
- package/src/lint/post-synth/docker-helpers.ts +0 -194
- package/src/lint/post-synth/index.ts +0 -33
- package/src/lint/post-synth/no-latest-image.ts +0 -36
- package/src/lint/post-synth/no-root-user.ts +0 -38
- package/src/lint/post-synth/post-synth.test.ts +0 -330
- package/src/lint/post-synth/prefer-copy.ts +0 -53
- package/src/lint/post-synth/relative-workdir.ts +0 -38
- package/src/lint/post-synth/repeated-cmd.ts +0 -35
- package/src/lint/post-synth/root-after-user.ts +0 -44
- package/src/lint/post-synth/ssh-port-exposed.ts +0 -68
- package/src/lint/post-synth/unused-global-arg.ts +0 -38
- package/src/lint/post-synth/unused-volume.ts +0 -49
- package/src/lint/rules/data/deprecated-images.ts +0 -28
- package/src/lint/rules/data/known-base-images.ts +0 -20
- package/src/lint/rules/index.ts +0 -6
- package/src/lint/rules/no-latest-tag.ts +0 -63
- package/src/lint/rules/per-kind-order.ts +0 -130
- package/src/lint/rules/rules.test.ts +0 -170
- package/src/list-artifacts.test.ts +0 -141
- package/src/list-artifacts.ts +0 -164
- package/src/lsp/completions.test.ts +0 -40
- package/src/lsp/completions.ts +0 -21
- package/src/lsp/hover.test.ts +0 -35
- package/src/lsp/hover.ts +0 -39
- package/src/package-cli.ts +0 -25
- package/src/plugin.test.ts +0 -121
- package/src/plugin.ts +0 -268
- package/src/serializer.test.ts +0 -545
- package/src/serializer.ts +0 -444
- package/src/skills/chant-docker-patterns.md +0 -222
- package/src/skills/chant-docker.md +0 -156
- package/src/spec/fetch-compose.ts +0 -35
- package/src/spec/fetch-engine.ts +0 -25
- package/src/spec/parse-compose.ts +0 -195
- package/src/spec/parse-engine.ts +0 -59
- package/src/typecheck.e2e.test.ts +0 -125
- package/src/typed-props.test.ts +0 -60
- package/src/validate-cli.ts +0 -19
- package/src/validate.test.ts +0 -16
- package/src/validate.ts +0 -44
- package/src/variables.test.ts +0 -32
- package/src/variables.ts +0 -47
- /package/{src → dist}/generated/lexicon-docker.json +0 -0
package/src/validate.test.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { describe, test, expect } from "vitest";
|
|
2
|
-
import { validate } from "./validate";
|
|
3
|
-
|
|
4
|
-
describe("validate", () => {
|
|
5
|
-
test("is an async function", () => {
|
|
6
|
-
expect(typeof validate).toBe("function");
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
test("returns failure when generated dir does not exist", async () => {
|
|
10
|
-
const result = await validate({ basePath: "/tmp/nonexistent-docker-lexicon-test" });
|
|
11
|
-
expect(result.success).toBe(false);
|
|
12
|
-
expect(result.checks.length).toBeGreaterThanOrEqual(1);
|
|
13
|
-
const failedCheck = result.checks.find((c) => !c.ok);
|
|
14
|
-
expect(failedCheck).toBeDefined();
|
|
15
|
-
});
|
|
16
|
-
});
|
package/src/validate.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Validate generated lexicon-docker artifacts.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { dirname, join } from "path";
|
|
6
|
-
import { existsSync } from "fs";
|
|
7
|
-
import { fileURLToPath } from "url";
|
|
8
|
-
import { validateLexiconArtifacts, type ValidateResult } from "@intentius/chant/codegen/validate";
|
|
9
|
-
|
|
10
|
-
export type { ValidateCheck, ValidateResult } from "@intentius/chant/codegen/validate";
|
|
11
|
-
|
|
12
|
-
const REQUIRED_NAMES = [
|
|
13
|
-
"Service",
|
|
14
|
-
"Volume",
|
|
15
|
-
"Network",
|
|
16
|
-
"DockerConfig",
|
|
17
|
-
"DockerSecret",
|
|
18
|
-
"Dockerfile",
|
|
19
|
-
];
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Validate the generated lexicon-docker artifacts.
|
|
23
|
-
*/
|
|
24
|
-
export async function validate(opts?: { basePath?: string }): Promise<ValidateResult> {
|
|
25
|
-
const basePath = opts?.basePath ?? dirname(dirname(fileURLToPath(import.meta.url)));
|
|
26
|
-
const generatedDir = join(basePath, "src", "generated");
|
|
27
|
-
|
|
28
|
-
if (!existsSync(generatedDir)) {
|
|
29
|
-
return {
|
|
30
|
-
success: false,
|
|
31
|
-
checks: [{
|
|
32
|
-
name: "generated-dir",
|
|
33
|
-
ok: false,
|
|
34
|
-
error: 'src/generated/ not found — run "chant dev generate" first',
|
|
35
|
-
}],
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return validateLexiconArtifacts({
|
|
40
|
-
lexiconJsonFilename: "lexicon-docker.json",
|
|
41
|
-
requiredNames: REQUIRED_NAMES,
|
|
42
|
-
basePath,
|
|
43
|
-
});
|
|
44
|
-
}
|
package/src/variables.test.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { describe, test, expect } from "vitest";
|
|
2
|
-
import { DOCKER_VARS, COMPOSE_VARS } from "./variables";
|
|
3
|
-
|
|
4
|
-
describe("DOCKER_VARS", () => {
|
|
5
|
-
test("exposes DOCKER_BUILDKIT", () => {
|
|
6
|
-
expect(DOCKER_VARS.DOCKER_BUILDKIT).toBe("DOCKER_BUILDKIT");
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
test("exposes DOCKER_HOST", () => {
|
|
10
|
-
expect(DOCKER_VARS.DOCKER_HOST).toBe("DOCKER_HOST");
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
test("is a const object", () => {
|
|
14
|
-
expect(typeof DOCKER_VARS).toBe("object");
|
|
15
|
-
expect(Object.keys(DOCKER_VARS).length).toBeGreaterThan(0);
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
describe("COMPOSE_VARS", () => {
|
|
20
|
-
test("exposes COMPOSE_PROJECT_NAME", () => {
|
|
21
|
-
expect(COMPOSE_VARS.COMPOSE_PROJECT_NAME).toBe("COMPOSE_PROJECT_NAME");
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
test("exposes COMPOSE_FILE", () => {
|
|
25
|
-
expect(COMPOSE_VARS.COMPOSE_FILE).toBe("COMPOSE_FILE");
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
test("is a const object", () => {
|
|
29
|
-
expect(typeof COMPOSE_VARS).toBe("object");
|
|
30
|
-
expect(Object.keys(COMPOSE_VARS).length).toBeGreaterThan(0);
|
|
31
|
-
});
|
|
32
|
-
});
|
package/src/variables.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Well-known Docker and Docker Compose environment variable names.
|
|
3
|
-
*
|
|
4
|
-
* Use with the env() intrinsic for type-safe interpolation.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* import { env, DOCKER_VARS } from "@intentius/chant-lexicon-docker";
|
|
8
|
-
*
|
|
9
|
-
* export const api = new Service({
|
|
10
|
-
* environment: {
|
|
11
|
-
* BUILDKIT_ENABLED: env(DOCKER_VARS.DOCKER_BUILDKIT),
|
|
12
|
-
* },
|
|
13
|
-
* });
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/** Docker daemon and client environment variables */
|
|
17
|
-
export const DOCKER_VARS = {
|
|
18
|
-
/** Enable Docker BuildKit: DOCKER_BUILDKIT=1 */
|
|
19
|
-
DOCKER_BUILDKIT: "DOCKER_BUILDKIT",
|
|
20
|
-
/** Docker host socket/address */
|
|
21
|
-
DOCKER_HOST: "DOCKER_HOST",
|
|
22
|
-
/** Docker TLS verify */
|
|
23
|
-
DOCKER_TLS_VERIFY: "DOCKER_TLS_VERIFY",
|
|
24
|
-
/** Docker config directory */
|
|
25
|
-
DOCKER_CONFIG: "DOCKER_CONFIG",
|
|
26
|
-
/** Docker content trust */
|
|
27
|
-
DOCKER_CONTENT_TRUST: "DOCKER_CONTENT_TRUST",
|
|
28
|
-
} as const;
|
|
29
|
-
|
|
30
|
-
/** Docker Compose specific environment variables */
|
|
31
|
-
export const COMPOSE_VARS = {
|
|
32
|
-
/** Override project name: COMPOSE_PROJECT_NAME */
|
|
33
|
-
COMPOSE_PROJECT_NAME: "COMPOSE_PROJECT_NAME",
|
|
34
|
-
/** Override compose file: COMPOSE_FILE */
|
|
35
|
-
COMPOSE_FILE: "COMPOSE_FILE",
|
|
36
|
-
/** Path separator for COMPOSE_FILE */
|
|
37
|
-
COMPOSE_PATH_SEPARATOR: "COMPOSE_PATH_SEPARATOR",
|
|
38
|
-
/** Docker compose profiles to enable */
|
|
39
|
-
COMPOSE_PROFILES: "COMPOSE_PROFILES",
|
|
40
|
-
/** Compose conversion flag */
|
|
41
|
-
COMPOSE_CONVERT_WINDOWS_PATHS: "COMPOSE_CONVERT_WINDOWS_PATHS",
|
|
42
|
-
/** Docker host for compose */
|
|
43
|
-
DOCKER_DEFAULT_PLATFORM: "DOCKER_DEFAULT_PLATFORM",
|
|
44
|
-
} as const;
|
|
45
|
-
|
|
46
|
-
export type DockerVar = (typeof DOCKER_VARS)[keyof typeof DOCKER_VARS];
|
|
47
|
-
export type ComposeVar = (typeof COMPOSE_VARS)[keyof typeof COMPOSE_VARS];
|
|
File without changes
|