k8ts 0.4.18 → 0.4.20

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.
Files changed (128) hide show
  1. package/dist/file/exports.d.ts +4 -5
  2. package/dist/file/exports.d.ts.map +1 -1
  3. package/dist/file/exports.js +1 -0
  4. package/dist/file/exports.js.map +1 -1
  5. package/dist/file/factory.d.ts +1 -1
  6. package/dist/file/factory.d.ts.map +1 -1
  7. package/dist/file/file.d.ts +6 -7
  8. package/dist/file/file.d.ts.map +1 -1
  9. package/dist/file/file.js.map +1 -1
  10. package/dist/file/origin.d.ts +3 -3
  11. package/dist/file/origin.d.ts.map +1 -1
  12. package/dist/file/origin.js.map +1 -1
  13. package/dist/kind-map.d.ts +4 -3
  14. package/dist/kind-map.d.ts.map +1 -1
  15. package/dist/kind-map.js +2 -1
  16. package/dist/kind-map.js.map +1 -1
  17. package/dist/kinds.d.ts +91 -0
  18. package/dist/kinds.d.ts.map +1 -0
  19. package/dist/kinds.js +71 -0
  20. package/dist/kinds.js.map +1 -0
  21. package/dist/node/abs-resource.d.ts +6 -6
  22. package/dist/node/abs-resource.d.ts.map +1 -1
  23. package/dist/node/abs-resource.js.map +1 -1
  24. package/dist/node/equiv-cdk8s.d.ts +4 -5
  25. package/dist/node/equiv-cdk8s.d.ts.map +1 -1
  26. package/dist/node/equiv-cdk8s.js.map +1 -1
  27. package/dist/node/manifest-resource.d.ts +4 -0
  28. package/dist/node/manifest-resource.d.ts.map +1 -1
  29. package/dist/node/manifest-resource.js.map +1 -1
  30. package/dist/node/sub-resource.d.ts +2 -2
  31. package/dist/node/sub-resource.d.ts.map +1 -1
  32. package/dist/node/sub-resource.js.map +1 -1
  33. package/dist/resources/configmap/configmap.d.ts.map +1 -1
  34. package/dist/resources/configmap/configmap.js +3 -4
  35. package/dist/resources/configmap/configmap.js.map +1 -1
  36. package/dist/resources/deployment/deployment.d.ts +6 -1
  37. package/dist/resources/deployment/deployment.d.ts.map +1 -1
  38. package/dist/resources/deployment/deployment.js +4 -4
  39. package/dist/resources/deployment/deployment.js.map +1 -1
  40. package/dist/resources/http-route/http-route.d.ts +4 -5
  41. package/dist/resources/http-route/http-route.d.ts.map +1 -1
  42. package/dist/resources/http-route/http-route.js +3 -5
  43. package/dist/resources/http-route/http-route.js.map +1 -1
  44. package/dist/resources/namespace/namespace.d.ts.map +1 -1
  45. package/dist/resources/namespace/namespace.js +3 -4
  46. package/dist/resources/namespace/namespace.js.map +1 -1
  47. package/dist/resources/persistent/claim/pvc.d.ts +3 -2
  48. package/dist/resources/persistent/claim/pvc.d.ts.map +1 -1
  49. package/dist/resources/persistent/claim/pvc.js +7 -5
  50. package/dist/resources/persistent/claim/pvc.js.map +1 -1
  51. package/dist/resources/persistent/volume/pv.d.ts +10 -7
  52. package/dist/resources/persistent/volume/pv.d.ts.map +1 -1
  53. package/dist/resources/persistent/volume/pv.js +4 -3
  54. package/dist/resources/persistent/volume/pv.js.map +1 -1
  55. package/dist/resources/pod/container/container.d.ts +15 -11
  56. package/dist/resources/pod/container/container.d.ts.map +1 -1
  57. package/dist/resources/pod/container/container.js +10 -8
  58. package/dist/resources/pod/container/container.js.map +1 -1
  59. package/dist/resources/pod/container/mounts.d.ts +14 -9
  60. package/dist/resources/pod/container/mounts.d.ts.map +1 -1
  61. package/dist/resources/pod/container/mounts.js +14 -13
  62. package/dist/resources/pod/container/mounts.js.map +1 -1
  63. package/dist/resources/pod/pod-template.d.ts +19 -14
  64. package/dist/resources/pod/pod-template.d.ts.map +1 -1
  65. package/dist/resources/pod/pod-template.js +10 -7
  66. package/dist/resources/pod/pod-template.js.map +1 -1
  67. package/dist/resources/pod/volume/devices.d.ts +1 -1
  68. package/dist/resources/pod/volume/devices.d.ts.map +1 -1
  69. package/dist/resources/pod/volume/devices.js +7 -5
  70. package/dist/resources/pod/volume/devices.js.map +1 -1
  71. package/dist/resources/pod/volume/volumes.d.ts +2 -2
  72. package/dist/resources/pod/volume/volumes.d.ts.map +1 -1
  73. package/dist/resources/pod/volume/volumes.js +8 -5
  74. package/dist/resources/pod/volume/volumes.js.map +1 -1
  75. package/dist/resources/secret/secret.d.ts +1 -1
  76. package/dist/resources/secret/secret.d.ts.map +1 -1
  77. package/dist/resources/secret/secret.js +3 -4
  78. package/dist/resources/secret/secret.js.map +1 -1
  79. package/dist/resources/service/service-port.d.ts +6 -6
  80. package/dist/resources/service/service-port.d.ts.map +1 -1
  81. package/dist/resources/service/service-port.js +10 -8
  82. package/dist/resources/service/service-port.js.map +1 -1
  83. package/dist/resources/service/service.d.ts +12 -6
  84. package/dist/resources/service/service.d.ts.map +1 -1
  85. package/dist/resources/service/service.js +14 -8
  86. package/dist/resources/service/service.js.map +1 -1
  87. package/dist/runner/exporter/serializer.js +1 -1
  88. package/dist/runner/exporter/serializer.js.map +1 -1
  89. package/dist/runner/exporter/validator.d.ts.map +1 -1
  90. package/dist/runner/exporter/validator.js +1 -2
  91. package/dist/runner/exporter/validator.js.map +1 -1
  92. package/dist/src.tsbuildinfo +1 -1
  93. package/dist/world/world.d.ts +2 -3
  94. package/dist/world/world.d.ts.map +1 -1
  95. package/dist/world/world.js.map +1 -1
  96. package/package.json +10 -10
  97. package/src/file/exports.ts +6 -5
  98. package/src/file/factory.ts +1 -1
  99. package/src/file/file.ts +6 -7
  100. package/src/file/origin.ts +3 -3
  101. package/src/kind-map.ts +6 -3
  102. package/src/kinds.ts +127 -0
  103. package/src/node/abs-resource.ts +7 -6
  104. package/src/node/equiv-cdk8s.ts +4 -5
  105. package/src/node/manifest-resource.ts +4 -0
  106. package/src/node/sub-resource.ts +2 -2
  107. package/src/resources/configmap/configmap.ts +3 -4
  108. package/src/resources/deployment/deployment.ts +9 -6
  109. package/src/resources/http-route/http-route.ts +4 -6
  110. package/src/resources/namespace/namespace.ts +3 -4
  111. package/src/resources/persistent/claim/pvc.ts +9 -6
  112. package/src/resources/persistent/volume/pv.ts +8 -7
  113. package/src/resources/pod/container/container.ts +20 -12
  114. package/src/resources/pod/container/mounts.ts +20 -15
  115. package/src/resources/pod/pod-template.ts +20 -20
  116. package/src/resources/pod/volume/devices.ts +7 -4
  117. package/src/resources/pod/volume/volumes.ts +10 -5
  118. package/src/resources/secret/secret.ts +3 -4
  119. package/src/resources/service/service-port.ts +12 -8
  120. package/src/resources/service/service.ts +30 -20
  121. package/src/runner/exporter/serializer.ts +1 -1
  122. package/src/runner/exporter/validator.ts +1 -2
  123. package/src/world/world.ts +4 -5
  124. package/dist/api-versions.d.ts +0 -5
  125. package/dist/api-versions.d.ts.map +0 -1
  126. package/dist/api-versions.js +0 -8
  127. package/dist/api-versions.js.map +0 -1
  128. package/src/api-versions.ts +0 -5
@@ -1,27 +1,28 @@
1
1
  import type { CDK } from "../../../_imports"
2
+ import { api } from "../../../kinds"
3
+ import { Volume } from "../volume"
2
4
  import type { Device } from "../volume/devices"
3
- import type { Volume } from "../volume/volumes"
4
5
  export type Mount = Mount.ContainerVolumeMount | Mount.ContainerDeviceMount
5
6
  export namespace Mount {
6
7
  type Path_Rooted = `/${string}`
7
8
  export type Path = `${"" | "." | ".."}${Path_Rooted}`
8
9
 
9
- export interface Options {
10
+ export interface Props {
10
11
  readOnly?: boolean
11
12
  subPath?: string
13
+ volume: Volume
12
14
  }
13
15
  export class ContainerVolumeMount {
14
- get kind() {
15
- return this.parent.kind.parent.subkind("ContainerVolumeMount")
16
- }
17
- constructor(
18
- readonly parent: Volume.PodVolume,
19
- readonly props: Options
20
- ) {}
16
+ readonly kind = api.v1_.Pod_.VolumeMount
17
+
18
+ constructor(readonly props: Props) {}
21
19
 
20
+ get volume() {
21
+ return this.props.volume
22
+ }
22
23
  submanifest(mountPath: string): CDK.VolumeMount {
23
24
  return {
24
- name: this.parent.name,
25
+ name: this.props.volume.name,
25
26
  mountPath: mountPath,
26
27
  readOnly: this.props.readOnly,
27
28
  subPath: this.props.subPath
@@ -29,16 +30,20 @@ export namespace Mount {
29
30
  }
30
31
  }
31
32
 
33
+ export interface DeviceMountProps {
34
+ device: Device
35
+ }
36
+
32
37
  export class ContainerDeviceMount {
33
- get kind() {
34
- return this.parent.kind.parent.subkind("ContainerDeviceMount")
38
+ kind = api.v1_.Pod_.DeviceMount
39
+ get volume() {
40
+ return this.props.device
35
41
  }
36
- constructor(readonly parent: Device.PodDevice) {}
37
-
42
+ constructor(readonly props: DeviceMountProps) {}
38
43
  submanifest(devicePath: string): CDK.VolumeDevice {
39
44
  return {
40
45
  devicePath: devicePath,
41
- name: this.parent.name
46
+ name: this.props.device.name
42
47
  }
43
48
  }
44
49
  }
@@ -1,24 +1,23 @@
1
- import { manifest, Producer, relations } from "@k8ts/instruments"
1
+ import { Kinded, manifest, Producer, relations } from "@k8ts/instruments"
2
2
  import { seq } from "doddle"
3
3
  import { omit } from "lodash"
4
4
  import { CDK } from "../../_imports"
5
- import { apps_v1 } from "../../api-versions"
6
5
  import { k8ts } from "../../kind-map"
6
+ import { api } from "../../kinds"
7
7
  import { ManifestResource } from "../../node/manifest-resource"
8
8
  import { Container } from "./container"
9
9
  import { Device, Volume } from "./volume"
10
- export type PodTemplate<Ports extends string> = PodTemplate.PodTemplate<Ports>
10
+ export type PodTemplate<Ports extends string = string> = PodTemplate.PodTemplate<Ports>
11
11
  export namespace PodTemplate {
12
12
  export type PodProps = Omit<CDK.PodSpec, "containers" | "initContainers" | "volumes">
13
- export type PodContainerProducer<Ports extends string> = Producer<
14
- PodScope,
15
- Container.Container<Ports>
16
- >
17
- export type Props<Ports extends string = never> = PodProps & {
13
+ type AbsContainer<Ports extends string> = Kinded<api.v1_.Pod_.Container> & {
14
+ __PORTS__: Ports
15
+ }
16
+ export type PodContainerProducer<Ports extends string> = Producer<PodScope, AbsContainer<Ports>>
17
+ export type Props<Ports extends string> = PodProps & {
18
18
  POD: PodContainerProducer<Ports>
19
19
  }
20
- const ident = apps_v1.kind("PodTemplate")
21
- @k8ts(ident)
20
+ @k8ts(api.v1_.PodTemplate)
22
21
  @relations({
23
22
  kids: s => [...s.containers, ...s.volumes]
24
23
  })
@@ -47,8 +46,12 @@ export namespace PodTemplate {
47
46
  }
48
47
  })
49
48
  export class PodTemplate<Ports extends string = string> extends ManifestResource<Props<Ports>> {
50
- kind = ident
51
- readonly containers = seq(() => this.props.POD(new PodScope(this))).cache()
49
+ readonly kind = api.v1_.PodTemplate
50
+ readonly containers = seq(() => this.props.POD(new PodScope(this)))
51
+ .map(x => {
52
+ return x as Container<Ports>
53
+ })
54
+ .cache()
52
55
  readonly mounts = seq(() => this.containers.concatMap(x => x.mounts)).cache()
53
56
  readonly volumes = seq(() => this.containers.concatMap(x => x.volumes)).uniq()
54
57
  readonly ports = seq(() => this.containers.map(x => x.ports)).reduce((a, b) => a.union(b))
@@ -56,19 +59,16 @@ export namespace PodTemplate {
56
59
 
57
60
  export class PodScope {
58
61
  constructor(private readonly _parent: PodTemplate) {}
59
- Container<Ports extends string>(
60
- name: string,
61
- options: Container.Props<Ports>
62
- ): Container<Ports> {
63
- return Container.make(this._parent, name, "main", options)
62
+ Container<Ports extends string>(name: string, options: Container.Props<Ports>) {
63
+ return new Container.Container(this._parent, name, "main", options)
64
64
  }
65
- InitContainer(name: string, options: Container.Props<never>): Container<never> {
66
- return Container.make(this._parent, name, "init", options)
65
+ InitContainer(name: string, options: Container.K8tsProps<never>) {
66
+ return new Container.Container(this._parent, name, "init", options)
67
67
  }
68
68
  Volume(name: string, options: Volume.Backend) {
69
69
  return Volume.make(this._parent, name, options)
70
70
  }
71
- Device(name: string, options: Device.Backend): Device {
71
+ Device(name: string, options: Device.Backend) {
72
72
  return Device.make(this._parent, name, options)
73
73
  }
74
74
  }
@@ -1,5 +1,7 @@
1
1
  import { relations } from "@k8ts/instruments"
2
2
  import type { CDK } from "../../../_imports"
3
+ import { k8ts } from "../../../kind-map"
4
+ import { api } from "../../../kinds"
3
5
  import type { ManifestResource } from "../../../node"
4
6
  import { SubResource } from "../../../node/sub-resource"
5
7
  import { Pvc } from "../../persistent"
@@ -12,15 +14,14 @@ export namespace Device {
12
14
  }
13
15
 
14
16
  export type Backend = PodDevice_Backend_Pvc
17
+ @k8ts(api.v1_.Pod_.Device)
15
18
  @relations({
16
19
  needs: self => ({
17
20
  backend: self.backend.backend
18
21
  })
19
22
  })
20
23
  export class PodDevice extends SubResource<PodDevice_Backend_Pvc> {
21
- get kind() {
22
- return this.parent.kind.subkind("Device")
23
- }
24
+ readonly kind = api.v1_.Pod_.Device
24
25
  constructor(
25
26
  parent: ManifestResource,
26
27
  name: string,
@@ -40,7 +41,9 @@ export namespace Device {
40
41
  }
41
42
 
42
43
  Mount() {
43
- return new Mount.ContainerDeviceMount(this)
44
+ return new Mount.ContainerDeviceMount({
45
+ device: this
46
+ })
44
47
  }
45
48
  }
46
49
 
@@ -1,6 +1,8 @@
1
1
  import type { CDK } from "../../../_imports"
2
2
 
3
3
  import { relations } from "@k8ts/instruments"
4
+ import { k8ts } from "../../../kind-map"
5
+ import { api } from "../../../kinds"
4
6
  import type { ManifestResource } from "../../../node"
5
7
  import { SubResource } from "../../../node/sub-resource"
6
8
  import type { ConfigMap } from "../../configmap"
@@ -24,20 +26,23 @@ export namespace Volume {
24
26
  | PodVolume_Backend_Pvc
25
27
  | PodVolume_Backend_ConfigMap
26
28
  | PodVolume_Backend_Secret
29
+
30
+ @k8ts(api.v1_.Pod_.Volume)
27
31
  @relations({
28
32
  needs: self => ({
29
33
  backend: self.props.backend
30
34
  })
31
35
  })
32
36
  export abstract class PodVolume<Props extends Backend = Backend> extends SubResource<Props> {
33
- get kind() {
34
- return this.parent.kind.subkind("Volume")
35
- }
37
+ readonly kind = api.v1_.Pod_.Volume
36
38
 
37
39
  abstract submanifest(): CDK.Volume
38
40
 
39
- Mount(options?: Mount.Options) {
40
- return new Mount.ContainerVolumeMount(this as any, options ?? {})
41
+ Mount(options?: Omit<Mount.Props, "volume">) {
42
+ return new Mount.ContainerVolumeMount({
43
+ volume: this,
44
+ ...options
45
+ })
41
46
  }
42
47
  }
43
48
 
@@ -1,7 +1,7 @@
1
1
  import { manifest, relations } from "@k8ts/instruments"
2
2
  import { CDK } from "../../_imports"
3
- import { v1 } from "../../api-versions"
4
3
  import { k8ts } from "../../kind-map"
4
+ import { api } from "../../kinds"
5
5
  import { equiv_cdk8s } from "../../node/equiv-cdk8s"
6
6
  import { ManifestResource } from "../../node/manifest-resource"
7
7
 
@@ -10,8 +10,7 @@ export interface Props {
10
10
  stringData: Record<string, string>
11
11
  }
12
12
 
13
- const ident = v1.kind("Secret")
14
- @k8ts(ident)
13
+ @k8ts(api.v1_.Secret)
15
14
  @equiv_cdk8s(CDK.KubeSecret)
16
15
  @relations("none")
17
16
  @manifest({
@@ -23,5 +22,5 @@ const ident = v1.kind("Secret")
23
22
  }
24
23
  })
25
24
  export class Secret extends ManifestResource<Props> {
26
- kind = ident
25
+ readonly kind = api.v1_.Secret
27
26
  }
@@ -4,23 +4,27 @@ import type { Service } from "./service"
4
4
  export type Port<Port extends string> = Port.Port<Port>
5
5
  export namespace Port {
6
6
  export interface Props<Port extends string> {
7
- service: Service<Port, Port>
8
- port: Port
7
+ service: Service.AbsService<Port>
8
+ name: Port
9
9
  }
10
10
 
11
11
  export class Port<Port extends string> {
12
- constructor(
13
- readonly service: Service<Port, Port>,
14
- readonly portName: Port,
15
- readonly port: number
16
- ) {}
12
+ constructor(readonly props: Props<Port>) {}
13
+
14
+ get service() {
15
+ return this.props.service as Service<Port>
16
+ }
17
+
18
+ get port() {
19
+ return this.props
20
+ }
17
21
 
18
22
  ref(): CDK.HttpRouteSpecRulesBackendRefs {
19
23
  return {
20
24
  kind: "Service",
21
25
  namespace: this.service.meta.tryGet("namespace"),
22
26
  name: this.service.meta.get("name"),
23
- port: this.port
27
+ port: this.service.ports.get(this.props.name).frontend
24
28
  }
25
29
  }
26
30
  }
@@ -1,32 +1,36 @@
1
- import { manifest, relations, type InputPortMapping } from "@k8ts/instruments"
1
+ import {
2
+ manifest,
3
+ Refable,
4
+ relations,
5
+ ResourceEntity,
6
+ type InputPortMapping
7
+ } from "@k8ts/instruments"
2
8
  import { Map } from "immutable"
3
9
  import { CDK } from "../../_imports"
4
- import { v1 } from "../../api-versions"
5
10
  import { k8ts } from "../../kind-map"
11
+ import { api } from "../../kinds"
6
12
  import { ManifestResource } from "../../node"
7
13
  import { equiv_cdk8s } from "../../node/equiv-cdk8s"
8
- import type { Deployment } from "../deployment/deployment"
14
+ import { Deployment } from "../deployment"
9
15
  import { toServicePorts } from "../utils/adapters"
10
16
  import { Frontend as Frontend_ } from "./frontend"
11
17
  import { Port as Port_ } from "./service-port"
12
- export type Service<DeployPorts extends string, ExposedPorts extends DeployPorts> = Service.Service<
13
- DeployPorts,
14
- ExposedPorts
15
- >
18
+ export type Service<ExposedPorts extends string = string> = Service.Service<ExposedPorts>
16
19
  export namespace Service {
17
20
  export import Port = Port_
18
21
  export import Frontend = Frontend_
19
22
  export interface Props<DeployPorts extends string, ExposedPorts extends DeployPorts> {
20
23
  ports: InputPortMapping<ExposedPorts>
21
- backend: Deployment.Deployment<DeployPorts>
24
+ backend: Deployment.AbsDeployment<DeployPorts>
22
25
  frontend: Frontend
23
26
  }
24
-
25
- const ident = v1.kind("Service")
26
- @k8ts(ident)
27
+ export type AbsService<ExposedPorts extends string> = Refable<api.v1_.Service> & {
28
+ __PORTS__: ExposedPorts
29
+ }
30
+ @k8ts(api.v1_.Service)
27
31
  @relations({
28
32
  needs: self => ({
29
- backend: self.props.backend
33
+ backend: self.backend as ResourceEntity
30
34
  })
31
35
  })
32
36
  @equiv_cdk8s(CDK.KubeService)
@@ -50,14 +54,17 @@ export namespace Service {
50
54
  }
51
55
  }
52
56
  })
53
- export class Service<
54
- DeployPorts extends string = string,
55
- ExposedPorts extends DeployPorts = DeployPorts
56
- > extends ManifestResource<Props<DeployPorts, ExposedPorts>> {
57
- kind = ident
57
+ export class Service<ExposedPorts extends string = string> extends ManifestResource<
58
+ Props<string, ExposedPorts>
59
+ > {
60
+ __PORTS__!: ExposedPorts
61
+ kind = api.v1_.Service
58
62
 
63
+ private get backend() {
64
+ return this.props.backend as Deployment<ExposedPorts>
65
+ }
59
66
  get ports() {
60
- const srcPorts = this.props.backend.ports.pull()
67
+ const srcPorts = this.backend.ports.pull()
61
68
  const knownPorts = Map(this.props.ports)
62
69
  .filter(x => x !== undefined)
63
70
  .keySeq()
@@ -66,8 +73,11 @@ export namespace Service {
66
73
  return svcPorts
67
74
  }
68
75
 
69
- portRef(port: ExposedPorts) {
70
- return new Port.Port(this, port, this.ports.get(port).frontend)
76
+ portRef(name: ExposedPorts) {
77
+ return new Port.Port({
78
+ service: this,
79
+ name: name
80
+ })
71
81
  }
72
82
  }
73
83
  }
@@ -41,7 +41,7 @@ export class YamlSerializer extends Emittery<YamlSerializerEventsTable> {
41
41
  return result
42
42
  } catch (err) {
43
43
  const resource = ManifestSourceEmbedder.get(input)
44
- throw new MakeError(`Failed to serialize manifest ${resource?.shortFqn ?? "???"}`, {
44
+ throw new MakeError(`Failed to serialize manifest ${resource}`, {
45
45
  cause: err
46
46
  })
47
47
  }
@@ -16,11 +16,10 @@ export class NodeGraphValidator {
16
16
  const app = new App()
17
17
  const rootChart = new Chart(app, "root_chart")
18
18
  for (const fileNode of collection) {
19
- const fileChart = new Chart(rootChart, fileNode.file.name)
20
19
  for (const nodeManifest of fileNode.resources) {
21
20
  const equiv = EquivCdk8s.get(nodeManifest.node._entity as ManifestResource)
22
21
  const fullFqn = nodeManifest.node.fullFqn.replaceAll("/", "_").replaceAll(".", "-")
23
- const cdk8sNode = new equiv(fileChart, fullFqn, nodeManifest.manifest)
22
+ const cdk8sNode = new equiv(rootChart, fullFqn, nodeManifest.manifest)
24
23
  }
25
24
  }
26
25
  app.synthYaml()
@@ -1,4 +1,4 @@
1
- import { BaseOriginEntity, KindMap, Origin, type Kind } from "@k8ts/instruments"
1
+ import { BaseOriginEntity, KindMap, LiveRefable, Origin, type Kind } from "@k8ts/instruments"
2
2
  import { Meta } from "@k8ts/metadata"
3
3
  import { assign } from "lodash"
4
4
  import { External } from "../external"
@@ -7,7 +7,6 @@ import { FileExports } from "../file/exports"
7
7
  import { FileOrigin } from "../file/origin"
8
8
  import { k8tsBuildKind } from "../k8ts-sys-kind"
9
9
  import { K8tsRootOrigin } from "../kind-map"
10
- import type { ManifestResource } from "../node"
11
10
  export type ManifestFileName = `${string}.yaml`
12
11
  export namespace World {
13
12
  export interface Props {
@@ -19,7 +18,7 @@ export namespace World {
19
18
  const ident = k8tsBuildKind.kind("World")
20
19
  export type DefineScopedFile<Scope extends FileOrigin.Scope> = {
21
20
  metadata(input: Meta.Input): DefineScopedFile<Scope>
22
- Resources<const Produced extends ManifestResource>(
21
+ Resources<const Produced extends LiveRefable>(
23
22
  producer: FileExports.Producer<Scope, Produced>
24
23
  ): File<Produced>
25
24
  }
@@ -49,7 +48,7 @@ export namespace World {
49
48
  })
50
49
  return self
51
50
  },
52
- Resources<const Produced extends ManifestResource>(
51
+ Resources<const Produced extends LiveRefable>(
53
52
  producer: FileExports.Producer<Scope, Produced>
54
53
  ): File<Produced> {
55
54
  return builder._File(name, {
@@ -64,7 +63,7 @@ export namespace World {
64
63
  }
65
64
  }
66
65
 
67
- private _File<T extends ManifestResource>(
66
+ private _File<T extends LiveRefable>(
68
67
  name: ManifestFileName,
69
68
  props: File.Props<any, T>
70
69
  ): File<T> {
@@ -1,5 +0,0 @@
1
- import { Kind } from "@k8ts/instruments";
2
- export declare const v1: Kind.Version<"v1", Kind.Group<"">>;
3
- export declare const apps_v1: Kind.Version<"v1", Kind.Group<"apps">>;
4
- export declare const gateway_v1: Kind.Version<"v1", Kind.Group<"gateway.networking.k8s.io">>;
5
- //# sourceMappingURL=api-versions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-versions.d.ts","sourceRoot":"","sources":["../src/api-versions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAExC,eAAO,MAAM,EAAE,oCAA+B,CAAA;AAC9C,eAAO,MAAM,OAAO,wCAAmC,CAAA;AACvD,eAAO,MAAM,UAAU,6DAAwD,CAAA"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.gateway_v1 = exports.apps_v1 = exports.v1 = void 0;
4
- const instruments_1 = require("@k8ts/instruments");
5
- exports.v1 = instruments_1.Kind.group("").version("v1");
6
- exports.apps_v1 = instruments_1.Kind.group("apps").version("v1");
7
- exports.gateway_v1 = instruments_1.Kind.group("gateway.networking.k8s.io").version("v1");
8
- //# sourceMappingURL=api-versions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-versions.js","sourceRoot":"","sources":["../src/api-versions.ts"],"names":[],"mappings":";;;AAAA,mDAAwC;AAE3B,QAAA,EAAE,GAAG,kBAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;AACjC,QAAA,OAAO,GAAG,kBAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;AAC1C,QAAA,UAAU,GAAG,kBAAI,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- import { Kind } from "@k8ts/instruments"
2
-
3
- export const v1 = Kind.group("").version("v1")
4
- export const apps_v1 = Kind.group("apps").version("v1")
5
- export const gateway_v1 = Kind.group("gateway.networking.k8s.io").version("v1")