typekro 0.27.0 → 0.28.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.
Files changed (211) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/core/containers/build.d.ts +2 -46
  3. package/dist/core/containers/build.d.ts.map +1 -1
  4. package/dist/core/containers/build.js +219 -134
  5. package/dist/core/containers/build.js.map +1 -1
  6. package/dist/core/containers/errors.d.ts +4 -0
  7. package/dist/core/containers/errors.d.ts.map +1 -1
  8. package/dist/core/containers/errors.js +14 -1
  9. package/dist/core/containers/errors.js.map +1 -1
  10. package/dist/core/containers/exec.d.ts +6 -23
  11. package/dist/core/containers/exec.d.ts.map +1 -1
  12. package/dist/core/containers/exec.js +94 -78
  13. package/dist/core/containers/exec.js.map +1 -1
  14. package/dist/core/containers/image.d.ts +11 -7
  15. package/dist/core/containers/image.d.ts.map +1 -1
  16. package/dist/core/containers/image.js +102 -13
  17. package/dist/core/containers/image.js.map +1 -1
  18. package/dist/core/containers/index.d.ts +5 -1
  19. package/dist/core/containers/index.d.ts.map +1 -1
  20. package/dist/core/containers/index.js +3 -0
  21. package/dist/core/containers/index.js.map +1 -1
  22. package/dist/core/containers/registries/credentials.d.ts +30 -0
  23. package/dist/core/containers/registries/credentials.d.ts.map +1 -0
  24. package/dist/core/containers/registries/credentials.js +87 -0
  25. package/dist/core/containers/registries/credentials.js.map +1 -0
  26. package/dist/core/containers/registries/docker-session.d.ts +14 -0
  27. package/dist/core/containers/registries/docker-session.d.ts.map +1 -0
  28. package/dist/core/containers/registries/docker-session.js +164 -0
  29. package/dist/core/containers/registries/docker-session.js.map +1 -0
  30. package/dist/core/containers/registries/ecr.d.ts +2 -3
  31. package/dist/core/containers/registries/ecr.d.ts.map +1 -1
  32. package/dist/core/containers/registries/ecr.js +13 -22
  33. package/dist/core/containers/registries/ecr.js.map +1 -1
  34. package/dist/core/containers/registries/harbor.d.ts +7 -0
  35. package/dist/core/containers/registries/harbor.d.ts.map +1 -0
  36. package/dist/core/containers/registries/harbor.js +9 -0
  37. package/dist/core/containers/registries/harbor.js.map +1 -0
  38. package/dist/core/containers/registries/index.d.ts.map +1 -1
  39. package/dist/core/containers/registries/index.js +5 -0
  40. package/dist/core/containers/registries/index.js.map +1 -1
  41. package/dist/core/containers/registries/oci.d.ts +13 -0
  42. package/dist/core/containers/registries/oci.d.ts.map +1 -0
  43. package/dist/core/containers/registries/oci.js +68 -0
  44. package/dist/core/containers/registries/oci.js.map +1 -0
  45. package/dist/core/containers/registries/orbstack.d.ts +2 -3
  46. package/dist/core/containers/registries/orbstack.d.ts.map +1 -1
  47. package/dist/core/containers/registries/orbstack.js +8 -8
  48. package/dist/core/containers/registries/orbstack.js.map +1 -1
  49. package/dist/core/containers/registries/types.d.ts +75 -49
  50. package/dist/core/containers/registries/types.d.ts.map +1 -1
  51. package/dist/core/containers/registries/types.js +1 -9
  52. package/dist/core/containers/registries/types.js.map +1 -1
  53. package/dist/core/deployment/direct-factory.d.ts.map +1 -1
  54. package/dist/core/deployment/direct-factory.js +15 -8
  55. package/dist/core/deployment/direct-factory.js.map +1 -1
  56. package/dist/core/deployment/engine.d.ts.map +1 -1
  57. package/dist/core/deployment/engine.js +46 -5
  58. package/dist/core/deployment/engine.js.map +1 -1
  59. package/dist/core/deployment/kro-factory.d.ts +7 -7
  60. package/dist/core/deployment/kro-factory.d.ts.map +1 -1
  61. package/dist/core/deployment/kro-factory.js +148 -60
  62. package/dist/core/deployment/kro-factory.js.map +1 -1
  63. package/dist/core/deployment/kro-instance-safety.d.ts +7 -0
  64. package/dist/core/deployment/kro-instance-safety.d.ts.map +1 -1
  65. package/dist/core/deployment/kro-instance-safety.js +15 -0
  66. package/dist/core/deployment/kro-instance-safety.js.map +1 -1
  67. package/dist/core/deployment/kro-namespace-teardown.d.ts +7 -5
  68. package/dist/core/deployment/kro-namespace-teardown.d.ts.map +1 -1
  69. package/dist/core/deployment/kro-namespace-teardown.js +29 -10
  70. package/dist/core/deployment/kro-namespace-teardown.js.map +1 -1
  71. package/dist/core/deployment/kro-readiness.d.ts +1 -0
  72. package/dist/core/deployment/kro-readiness.d.ts.map +1 -1
  73. package/dist/core/deployment/kro-readiness.js +22 -1
  74. package/dist/core/deployment/kro-readiness.js.map +1 -1
  75. package/dist/core/deployment/rollback-manager.d.ts +13 -0
  76. package/dist/core/deployment/rollback-manager.d.ts.map +1 -1
  77. package/dist/core/deployment/rollback-manager.js +8 -0
  78. package/dist/core/deployment/rollback-manager.js.map +1 -1
  79. package/dist/core/serialization/core.js +3 -1
  80. package/dist/core/serialization/core.js.map +1 -1
  81. package/dist/core/serialization/schema.d.ts +2 -2
  82. package/dist/core/serialization/schema.d.ts.map +1 -1
  83. package/dist/core/serialization/schema.js +57 -4
  84. package/dist/core/serialization/schema.js.map +1 -1
  85. package/dist/core/types/serialization.d.ts +9 -0
  86. package/dist/core/types/serialization.d.ts.map +1 -1
  87. package/dist/factories/apisix/types.js +11 -11
  88. package/dist/factories/apisix/types.js.map +1 -1
  89. package/dist/factories/caddy/types.js +2 -2
  90. package/dist/factories/caddy/types.js.map +1 -1
  91. package/dist/factories/cert-manager/types.js +6 -6
  92. package/dist/factories/cert-manager/types.js.map +1 -1
  93. package/dist/factories/cilium/compositions/cilium-bootstrap.js +6 -6
  94. package/dist/factories/cilium/compositions/cilium-bootstrap.js.map +1 -1
  95. package/dist/factories/clickhouse/compositions/clickhouse-cluster.js +1 -1
  96. package/dist/factories/clickhouse/compositions/clickhouse-cluster.js.map +1 -1
  97. package/dist/factories/clickhouse/types.js +8 -8
  98. package/dist/factories/clickhouse/types.js.map +1 -1
  99. package/dist/factories/clickstack/types.js +5 -5
  100. package/dist/factories/clickstack/types.js.map +1 -1
  101. package/dist/factories/cnpg/types.js +6 -6
  102. package/dist/factories/cnpg/types.js.map +1 -1
  103. package/dist/factories/dagster/types.js +14 -14
  104. package/dist/factories/dagster/types.js.map +1 -1
  105. package/dist/factories/external-dns/types.js +3 -3
  106. package/dist/factories/external-dns/types.js.map +1 -1
  107. package/dist/factories/harbor/compositions/harbor-installation.d.ts +610 -0
  108. package/dist/factories/harbor/compositions/harbor-installation.d.ts.map +1 -0
  109. package/dist/factories/harbor/compositions/harbor-installation.js +348 -0
  110. package/dist/factories/harbor/compositions/harbor-installation.js.map +1 -0
  111. package/dist/factories/harbor/compositions/index.d.ts +2 -0
  112. package/dist/factories/harbor/compositions/index.d.ts.map +1 -0
  113. package/dist/factories/harbor/compositions/index.js +2 -0
  114. package/dist/factories/harbor/compositions/index.js.map +1 -0
  115. package/dist/factories/harbor/index.d.ts +7 -0
  116. package/dist/factories/harbor/index.d.ts.map +1 -0
  117. package/dist/factories/harbor/index.js +7 -0
  118. package/dist/factories/harbor/index.js.map +1 -0
  119. package/dist/factories/harbor/provider/harbor-api.d.ts +123 -0
  120. package/dist/factories/harbor/provider/harbor-api.d.ts.map +1 -0
  121. package/dist/factories/harbor/provider/harbor-api.js +595 -0
  122. package/dist/factories/harbor/provider/harbor-api.js.map +1 -0
  123. package/dist/factories/harbor/provider/index.d.ts +4 -0
  124. package/dist/factories/harbor/provider/index.d.ts.map +1 -0
  125. package/dist/factories/harbor/provider/index.js +4 -0
  126. package/dist/factories/harbor/provider/index.js.map +1 -0
  127. package/dist/factories/harbor/provider/kubernetes-secret-store.d.ts +12 -0
  128. package/dist/factories/harbor/provider/kubernetes-secret-store.d.ts.map +1 -0
  129. package/dist/factories/harbor/provider/kubernetes-secret-store.js +81 -0
  130. package/dist/factories/harbor/provider/kubernetes-secret-store.js.map +1 -0
  131. package/dist/factories/harbor/provider/rook-s3-binding.d.ts +30 -0
  132. package/dist/factories/harbor/provider/rook-s3-binding.d.ts.map +1 -0
  133. package/dist/factories/harbor/provider/rook-s3-binding.js +74 -0
  134. package/dist/factories/harbor/provider/rook-s3-binding.js.map +1 -0
  135. package/dist/factories/harbor/resources/helm.d.ts +12 -0
  136. package/dist/factories/harbor/resources/helm.d.ts.map +1 -0
  137. package/dist/factories/harbor/resources/helm.js +46 -0
  138. package/dist/factories/harbor/resources/helm.js.map +1 -0
  139. package/dist/factories/harbor/resources/index.d.ts +2 -0
  140. package/dist/factories/harbor/resources/index.d.ts.map +1 -0
  141. package/dist/factories/harbor/resources/index.js +2 -0
  142. package/dist/factories/harbor/resources/index.js.map +1 -0
  143. package/dist/factories/harbor/types.d.ts +319 -0
  144. package/dist/factories/harbor/types.d.ts.map +1 -0
  145. package/dist/factories/harbor/types.js +252 -0
  146. package/dist/factories/harbor/types.js.map +1 -0
  147. package/dist/factories/harbor/utils/helm-values-mapper.d.ts +8 -0
  148. package/dist/factories/harbor/utils/helm-values-mapper.d.ts.map +1 -0
  149. package/dist/factories/harbor/utils/helm-values-mapper.js +322 -0
  150. package/dist/factories/harbor/utils/helm-values-mapper.js.map +1 -0
  151. package/dist/factories/harbor/utils/index.d.ts +2 -0
  152. package/dist/factories/harbor/utils/index.d.ts.map +1 -0
  153. package/dist/factories/harbor/utils/index.js +2 -0
  154. package/dist/factories/harbor/utils/index.js.map +1 -0
  155. package/dist/factories/helm/helm-release.d.ts +10 -0
  156. package/dist/factories/helm/helm-release.d.ts.map +1 -1
  157. package/dist/factories/helm/helm-release.js +30 -2
  158. package/dist/factories/helm/helm-release.js.map +1 -1
  159. package/dist/factories/helm/readiness-evaluators.d.ts.map +1 -1
  160. package/dist/factories/helm/readiness-evaluators.js +26 -1
  161. package/dist/factories/helm/readiness-evaluators.js.map +1 -1
  162. package/dist/factories/helm/types.d.ts +5 -0
  163. package/dist/factories/helm/types.d.ts.map +1 -1
  164. package/dist/factories/index.d.ts +1 -0
  165. package/dist/factories/index.d.ts.map +1 -1
  166. package/dist/factories/index.js +4 -0
  167. package/dist/factories/index.js.map +1 -1
  168. package/dist/factories/inngest/types.js +8 -8
  169. package/dist/factories/inngest/types.js.map +1 -1
  170. package/dist/factories/kubernetes/networking/network-policy.d.ts.map +1 -1
  171. package/dist/factories/kubernetes/networking/network-policy.js +34 -1
  172. package/dist/factories/kubernetes/networking/network-policy.js.map +1 -1
  173. package/dist/factories/ory/types.js +40 -40
  174. package/dist/factories/ory/types.js.map +1 -1
  175. package/dist/factories/rook/compositions/index.d.ts +1 -0
  176. package/dist/factories/rook/compositions/index.d.ts.map +1 -1
  177. package/dist/factories/rook/compositions/index.js +1 -0
  178. package/dist/factories/rook/compositions/index.js.map +1 -1
  179. package/dist/factories/rook/compositions/rook-ceph-operator-installation.d.ts +2 -0
  180. package/dist/factories/rook/compositions/rook-ceph-operator-installation.d.ts.map +1 -1
  181. package/dist/factories/rook/compositions/rook-ceph-operator-installation.js +17 -0
  182. package/dist/factories/rook/compositions/rook-ceph-operator-installation.js.map +1 -1
  183. package/dist/factories/rook/compositions/rook-ceph-platform.d.ts +181 -0
  184. package/dist/factories/rook/compositions/rook-ceph-platform.d.ts.map +1 -0
  185. package/dist/factories/rook/compositions/rook-ceph-platform.js +388 -0
  186. package/dist/factories/rook/compositions/rook-ceph-platform.js.map +1 -0
  187. package/dist/factories/rook/resources/bucket-storage-class.d.ts.map +1 -1
  188. package/dist/factories/rook/resources/bucket-storage-class.js +4 -1
  189. package/dist/factories/rook/resources/bucket-storage-class.js.map +1 -1
  190. package/dist/factories/rook/resources/ceph-object-store.d.ts.map +1 -1
  191. package/dist/factories/rook/resources/ceph-object-store.js +2 -0
  192. package/dist/factories/rook/resources/ceph-object-store.js.map +1 -1
  193. package/dist/factories/rook/resources/helm.d.ts +4 -0
  194. package/dist/factories/rook/resources/helm.d.ts.map +1 -1
  195. package/dist/factories/rook/resources/helm.js +22 -0
  196. package/dist/factories/rook/resources/helm.js.map +1 -1
  197. package/dist/factories/rook/types.d.ts +180 -1
  198. package/dist/factories/rook/types.d.ts.map +1 -1
  199. package/dist/factories/rook/types.js +100 -9
  200. package/dist/factories/rook/types.js.map +1 -1
  201. package/dist/factories/rook/utils/helm-values-mapper.d.ts +34 -1
  202. package/dist/factories/rook/utils/helm-values-mapper.d.ts.map +1 -1
  203. package/dist/factories/rook/utils/helm-values-mapper.js +207 -0
  204. package/dist/factories/rook/utils/helm-values-mapper.js.map +1 -1
  205. package/dist/factories/searxng/types.js +2 -2
  206. package/dist/factories/searxng/types.js.map +1 -1
  207. package/dist/factories/valkey/types.js +4 -4
  208. package/dist/factories/valkey/types.js.map +1 -1
  209. package/dist/factories/webapp/types.js +8 -8
  210. package/dist/factories/webapp/types.js.map +1 -1
  211. package/package.json +6 -1
@@ -0,0 +1,12 @@
1
+ import type { V1ConfigMap, V1Secret } from '@kubernetes/client-node';
2
+ import { type KubernetesClientConfig } from '../../../core/kubernetes/client-provider.js';
3
+ /** Narrow Kubernetes boundary used by Harbor preparation and straightforward to fake in tests. */
4
+ export interface HarborKubernetesStore {
5
+ readSecret(namespace: string, name: string): Promise<V1Secret | undefined>;
6
+ readConfigMap(namespace: string, name: string): Promise<V1ConfigMap | undefined>;
7
+ upsertSecret(secret: V1Secret): Promise<void>;
8
+ deleteSecret(namespace: string, name: string): Promise<void>;
9
+ }
10
+ /** Create a deployment-scoped Kubernetes store for one selected context. */
11
+ export declare function createHarborKubernetesStore(config?: KubernetesClientConfig): HarborKubernetesStore;
12
+ //# sourceMappingURL=kubernetes-secret-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kubernetes-secret-store.d.ts","sourceRoot":"","sources":["../../../../src/factories/harbor/provider/kubernetes-secret-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,6CAA6C,CAAC;AAErD,kGAAkG;AAClG,MAAM,WAAW,qBAAqB;IACpC,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;IAC3E,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC;IACjF,YAAY,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9D;AAED,4EAA4E;AAC5E,wBAAgB,2BAA2B,CACzC,MAAM,GAAE,sBAA2B,GAClC,qBAAqB,CAsDvB"}
@@ -0,0 +1,81 @@
1
+ import { createKubernetesClientProvider, } from '../../../core/kubernetes/client-provider.js';
2
+ /** Create a deployment-scoped Kubernetes store for one selected context. */
3
+ export function createHarborKubernetesStore(config = {}) {
4
+ const api = createKubernetesClientProvider(config).getCoreV1Api();
5
+ return {
6
+ async readSecret(namespace, name) {
7
+ try {
8
+ return await api.readNamespacedSecret({ namespace, name });
9
+ }
10
+ catch (error) {
11
+ if (isNotFound(error))
12
+ return undefined;
13
+ throw error;
14
+ }
15
+ },
16
+ async readConfigMap(namespace, name) {
17
+ try {
18
+ return await api.readNamespacedConfigMap({ namespace, name });
19
+ }
20
+ catch (error) {
21
+ if (isNotFound(error))
22
+ return undefined;
23
+ throw error;
24
+ }
25
+ },
26
+ async upsertSecret(secret) {
27
+ const namespace = requiredMetadata(secret.metadata?.namespace, 'Secret namespace');
28
+ const name = requiredMetadata(secret.metadata?.name, 'Secret name');
29
+ let existing;
30
+ try {
31
+ existing = await api.readNamespacedSecret({ namespace, name });
32
+ }
33
+ catch (error) {
34
+ if (!isNotFound(error))
35
+ throw error;
36
+ }
37
+ if (!existing) {
38
+ await api.createNamespacedSecret({ namespace, body: secret });
39
+ return;
40
+ }
41
+ await api.replaceNamespacedSecret({
42
+ namespace,
43
+ name,
44
+ body: {
45
+ ...secret,
46
+ metadata: {
47
+ ...secret.metadata,
48
+ ...(existing.metadata?.resourceVersion
49
+ ? { resourceVersion: existing.metadata.resourceVersion }
50
+ : {}),
51
+ },
52
+ },
53
+ });
54
+ },
55
+ async deleteSecret(namespace, name) {
56
+ try {
57
+ await api.deleteNamespacedSecret({ namespace, name });
58
+ }
59
+ catch (error) {
60
+ if (!isNotFound(error))
61
+ throw error;
62
+ }
63
+ },
64
+ };
65
+ }
66
+ function requiredMetadata(value, label) {
67
+ if (!value)
68
+ throw new Error(`${label} is required.`);
69
+ return value;
70
+ }
71
+ function isNotFound(error) {
72
+ if (!error || typeof error !== 'object')
73
+ return false;
74
+ const candidate = error;
75
+ return (candidate.code === 404 ||
76
+ candidate.statusCode === 404 ||
77
+ candidate.response?.statusCode === 404 ||
78
+ candidate.response?.status === 404 ||
79
+ candidate.body?.code === 404);
80
+ }
81
+ //# sourceMappingURL=kubernetes-secret-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kubernetes-secret-store.js","sourceRoot":"","sources":["../../../../src/factories/harbor/provider/kubernetes-secret-store.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,30 @@
1
+ import type { KubernetesClientConfig } from '../../../core/kubernetes/client-provider.js';
2
+ import { type HarborKubernetesStore } from './kubernetes-secret-store.js';
3
+ export interface PrepareHarborRookS3BindingOptions {
4
+ sourceNamespace: string;
5
+ claimName: string;
6
+ targetNamespace: string;
7
+ targetSecretName: string;
8
+ secure?: boolean;
9
+ endpointOverride?: string;
10
+ regionOverride?: string;
11
+ rootDirectory?: string;
12
+ kubeConfig?: KubernetesClientConfig;
13
+ store?: HarborKubernetesStore;
14
+ }
15
+ export interface PreparedHarborRookS3Binding {
16
+ bucket: string;
17
+ region: string;
18
+ regionEndpoint: string;
19
+ existingSecret: string;
20
+ secure: boolean;
21
+ rootDirectory?: string;
22
+ }
23
+ /**
24
+ * Adapt a bound Rook OBC Secret to Harbor's official S3 Secret contract.
25
+ *
26
+ * Encoded credential bytes are copied directly between Kubernetes Secrets. They are never decoded,
27
+ * returned, logged, or inserted into a TypeKro graph.
28
+ */
29
+ export declare function prepareHarborRookS3Binding(options: PrepareHarborRookS3BindingOptions): Promise<PreparedHarborRookS3Binding>;
30
+ //# sourceMappingURL=rook-s3-binding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rook-s3-binding.d.ts","sourceRoot":"","sources":["../../../../src/factories/harbor/provider/rook-s3-binding.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAC1F,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAC;AAEtC,MAAM,WAAW,iCAAiC;IAChD,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC,KAAK,CAAC,EAAE,qBAAqB,CAAC;CAC/B;AAED,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,iCAAiC,GACzC,OAAO,CAAC,2BAA2B,CAAC,CA4DtC"}
@@ -0,0 +1,74 @@
1
+ import { createHarborKubernetesStore, } from './kubernetes-secret-store.js';
2
+ /**
3
+ * Adapt a bound Rook OBC Secret to Harbor's official S3 Secret contract.
4
+ *
5
+ * Encoded credential bytes are copied directly between Kubernetes Secrets. They are never decoded,
6
+ * returned, logged, or inserted into a TypeKro graph.
7
+ */
8
+ export async function prepareHarborRookS3Binding(options) {
9
+ const store = options.store ?? createHarborKubernetesStore(options.kubeConfig);
10
+ const [credentials, connection] = await Promise.all([
11
+ store.readSecret(options.sourceNamespace, options.claimName),
12
+ store.readConfigMap(options.sourceNamespace, options.claimName),
13
+ ]);
14
+ if (!credentials) {
15
+ throw new Error(`Rook OBC credential Secret ${options.sourceNamespace}/${options.claimName} is not available.`);
16
+ }
17
+ if (!connection) {
18
+ throw new Error(`Rook OBC connection ConfigMap ${options.sourceNamespace}/${options.claimName} is not available.`);
19
+ }
20
+ const accessKey = requiredSecretKey(credentials, 'AWS_ACCESS_KEY_ID');
21
+ const secretKey = requiredSecretKey(credentials, 'AWS_SECRET_ACCESS_KEY');
22
+ const bucket = requiredConfig(connection.data, 'BUCKET_NAME');
23
+ const secure = options.secure ?? false;
24
+ const host = requiredConfig(connection.data, 'BUCKET_HOST');
25
+ const port = connection.data?.BUCKET_PORT;
26
+ const regionEndpoint = options.endpointOverride ?? `${secure ? 'https' : 'http'}://${host}${port ? `:${port}` : ''}`;
27
+ const configuredRegion = options.regionOverride ?? connection.data?.BUCKET_REGION;
28
+ // Rook emits BUCKET_REGION as an empty string for RGW installations without
29
+ // an explicit zonegroup region. Harbor's distribution registry rejects an
30
+ // empty region, so normalize both missing and blank provider values to the
31
+ // conventional S3 default.
32
+ const region = configuredRegion?.trim() || 'us-east-1';
33
+ const adapted = {
34
+ apiVersion: 'v1',
35
+ kind: 'Secret',
36
+ metadata: {
37
+ name: options.targetSecretName,
38
+ namespace: options.targetNamespace,
39
+ labels: {
40
+ 'app.kubernetes.io/name': 'harbor',
41
+ 'app.kubernetes.io/component': 'registry-storage',
42
+ 'app.kubernetes.io/managed-by': 'typekro',
43
+ 'typekro.dev/source-obc': options.claimName,
44
+ },
45
+ },
46
+ type: 'Opaque',
47
+ data: {
48
+ REGISTRY_STORAGE_S3_ACCESSKEY: accessKey,
49
+ REGISTRY_STORAGE_S3_SECRETKEY: secretKey,
50
+ },
51
+ };
52
+ await store.upsertSecret(adapted);
53
+ return {
54
+ bucket,
55
+ region,
56
+ regionEndpoint,
57
+ existingSecret: options.targetSecretName,
58
+ secure,
59
+ ...(options.rootDirectory ? { rootDirectory: options.rootDirectory } : {}),
60
+ };
61
+ }
62
+ function requiredSecretKey(secret, key) {
63
+ const value = secret.data?.[key];
64
+ if (!value)
65
+ throw new Error(`Rook OBC credential Secret is missing required key ${key}.`);
66
+ return value;
67
+ }
68
+ function requiredConfig(data, key) {
69
+ const value = data?.[key];
70
+ if (!value)
71
+ throw new Error(`Rook OBC connection ConfigMap is missing required key ${key}.`);
72
+ return value;
73
+ }
74
+ //# sourceMappingURL=rook-s3-binding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rook-s3-binding.js","sourceRoot":"","sources":["../../../../src/factories/harbor/provider/rook-s3-binding.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,12 @@
1
+ import type { Composable, Enhanced } from '../../../core/types/index.js';
2
+ import { type HelmRepositorySpec, type HelmRepositoryStatus } from '../../helm/helm-repository.js';
3
+ import type { HelmReleaseSpec, HelmReleaseStatus } from '../../helm/types.js';
4
+ import type { HarborHelmReleaseConfig, HarborHelmRepositoryConfig } from '../types.js';
5
+ export declare const DEFAULT_HARBOR_REPOSITORY_URL = "https://helm.goharbor.io";
6
+ export declare const DEFAULT_HARBOR_REPOSITORY_NAME = "harbor";
7
+ export declare const HARBOR_CHART_NAME = "harbor";
8
+ export declare const DEFAULT_HARBOR_CHART_VERSION = "1.19.1";
9
+ export declare const DEFAULT_HARBOR_VERSION = "v2.15.1";
10
+ export declare function harborHelmRepository(config: Composable<HarborHelmRepositoryConfig>): Enhanced<HelmRepositorySpec, HelmRepositoryStatus>;
11
+ export declare function harborHelmRelease(config: Composable<HarborHelmReleaseConfig>): Enhanced<HelmReleaseSpec, HelmReleaseStatus>;
12
+ //# sourceMappingURL=helm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helm.d.ts","sourceRoot":"","sources":["../../../../src/factories/harbor/resources/helm.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAEzE,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAE1B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAEvF,eAAO,MAAM,6BAA6B,6BAA6B,CAAC;AACxE,eAAO,MAAM,8BAA8B,WAAW,CAAC;AACvD,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,4BAA4B,WAAW,CAAC;AACrD,eAAO,MAAM,sBAAsB,YAAY,CAAC;AAEhD,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,UAAU,CAAC,0BAA0B,CAAC,GAC7C,QAAQ,CAAC,kBAAkB,EAAE,oBAAoB,CAAC,CAWpD;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,UAAU,CAAC,uBAAuB,CAAC,GAC1C,QAAQ,CAAC,eAAe,EAAE,iBAAiB,CAAC,CA6B9C"}
@@ -0,0 +1,46 @@
1
+ import { DEFAULT_FLUX_NAMESPACE } from '../../../core/config/defaults.js';
2
+ import { helmRelease } from '../../helm/helm-release.js';
3
+ import { createHelmRepositoryReadinessEvaluator, helmRepository, } from '../../helm/helm-repository.js';
4
+ import { createLabeledHelmReleaseEvaluator } from '../../helm/readiness-evaluators.js';
5
+ export const DEFAULT_HARBOR_REPOSITORY_URL = 'https://helm.goharbor.io';
6
+ export const DEFAULT_HARBOR_REPOSITORY_NAME = 'harbor';
7
+ export const HARBOR_CHART_NAME = 'harbor';
8
+ export const DEFAULT_HARBOR_CHART_VERSION = '1.19.1';
9
+ export const DEFAULT_HARBOR_VERSION = 'v2.15.1';
10
+ export function harborHelmRepository(config) {
11
+ return helmRepository({
12
+ name: config.name ?? DEFAULT_HARBOR_REPOSITORY_NAME,
13
+ namespace: config.namespace ?? DEFAULT_FLUX_NAMESPACE,
14
+ url: config.url ?? DEFAULT_HARBOR_REPOSITORY_URL,
15
+ interval: config.interval ?? '5m',
16
+ ...(config.id && { id: config.id }),
17
+ }).withReadinessEvaluator(createHelmRepositoryReadinessEvaluator('Harbor'));
18
+ }
19
+ export function harborHelmRelease(config) {
20
+ return helmRelease({
21
+ name: config.name,
22
+ namespace: config.namespace ?? 'harbor-system',
23
+ chart: {
24
+ repository: config.repositoryUrl ?? DEFAULT_HARBOR_REPOSITORY_URL,
25
+ name: HARBOR_CHART_NAME,
26
+ version: config.version ?? DEFAULT_HARBOR_CHART_VERSION,
27
+ },
28
+ sourceRef: {
29
+ name: config.repositoryName ?? DEFAULT_HARBOR_REPOSITORY_NAME,
30
+ namespace: config.repositoryNamespace ?? DEFAULT_FLUX_NAMESPACE,
31
+ kind: 'HelmRepository',
32
+ },
33
+ driftDetection: { mode: 'enabled' },
34
+ install: { timeout: '20m', remediation: { retries: 3 } },
35
+ // Harbor may migrate its external database during an upgrade. Retrying the
36
+ // same revision is bounded, but an automatic rollback to an older chart is
37
+ // not universally safe once that migration has committed.
38
+ upgrade: {
39
+ timeout: '20m',
40
+ remediation: { retries: 0, remediateLastFailure: false },
41
+ },
42
+ values: config.values ?? {},
43
+ ...(config.id && { id: config.id }),
44
+ }).withReadinessEvaluator(createLabeledHelmReleaseEvaluator('Harbor'));
45
+ }
46
+ //# sourceMappingURL=helm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helm.js","sourceRoot":"","sources":["../../../../src/factories/harbor/resources/helm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EACL,sCAAsC,EAGtC,cAAc,GACf,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AAIvF,MAAM,CAAC,MAAM,6BAA6B,GAAG,0BAA0B,CAAC;AACxE,MAAM,CAAC,MAAM,8BAA8B,GAAG,QAAQ,CAAC;AACvD,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAC1C,MAAM,CAAC,MAAM,4BAA4B,GAAG,QAAQ,CAAC;AACrD,MAAM,CAAC,MAAM,sBAAsB,GAAG,SAAS,CAAC;AAEhD,MAAM,UAAU,oBAAoB,CAClC,MAA8C;IAE9C,OAAO,cAAc,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,8BAA8B;QACnD,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,sBAAsB;QACrD,GAAG,EAAE,MAAM,CAAC,GAAG,IAAI,6BAA6B;QAChD,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,IAAI;QACjC,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;KACpC,CAAC,CAAC,sBAAsB,CAAC,sCAAsC,CAAC,QAAQ,CAAC,CAGzE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,MAA2C;IAE3C,OAAO,WAAW,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,eAAe;QAC9C,KAAK,EAAE;YACL,UAAU,EAAE,MAAM,CAAC,aAAa,IAAI,6BAA6B;YACjE,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,4BAA4B;SACxD;QACD,SAAS,EAAE;YACT,IAAI,EAAE,MAAM,CAAC,cAAc,IAAI,8BAA8B;YAC7D,SAAS,EAAE,MAAM,CAAC,mBAAmB,IAAI,sBAAsB;YAC/D,IAAI,EAAE,gBAAgB;SACvB;QACD,cAAc,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;QACnC,OAAO,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE;QACxD,2EAA2E;QAC3E,2EAA2E;QAC3E,0DAA0D;QAC1D,OAAO,EAAE;YACP,OAAO,EAAE,KAAK;YACd,WAAW,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,oBAAoB,EAAE,KAAK,EAAE;SACzD;QACD,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE;QAC3B,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;KACpC,CAAC,CAAC,sBAAsB,CAAC,iCAAiC,CAAC,QAAQ,CAAC,CAGpE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './helm.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/factories/harbor/resources/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './helm.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/factories/harbor/resources/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -0,0 +1,319 @@
1
+ import type { TypeKroChartValue } from '../../core/types/common.js';
2
+ /** Local Harbor profile. Internal DB/cache are explicit development conveniences. */
3
+ export declare const HarborLocalInstallationConfigSchema: import("arktype/internal/variants/object.ts").ObjectType<{
4
+ profile: "local-development";
5
+ name: string;
6
+ exposure: {
7
+ type: "ingress" | "loadBalancer" | "clusterIP" | "nodePort";
8
+ externalUrl: string;
9
+ tls: {
10
+ enabled: boolean;
11
+ source: "auto" | "secret" | "none" | "cert-manager";
12
+ secretName?: string;
13
+ };
14
+ ingress?: {
15
+ host: string;
16
+ className?: string;
17
+ annotations?: Record<string, string>;
18
+ };
19
+ nodePort?: {
20
+ http?: number;
21
+ https?: number;
22
+ };
23
+ };
24
+ storage: {
25
+ bucket: string;
26
+ region: string;
27
+ regionEndpoint: string;
28
+ existingSecret: string;
29
+ rootDirectory?: string;
30
+ secure?: boolean;
31
+ skipVerify?: boolean;
32
+ disableRedirect?: boolean;
33
+ caBundleSecretName?: string;
34
+ };
35
+ adminPasswordSecret: {
36
+ name: string;
37
+ key?: string;
38
+ };
39
+ componentSecrets: {
40
+ encryptionKey: string;
41
+ core: string;
42
+ jobservice: string;
43
+ registry: string;
44
+ registryCredentials: string;
45
+ xsrf?: string;
46
+ };
47
+ database?: {
48
+ host: string;
49
+ username: string;
50
+ database: string;
51
+ existingSecret: string;
52
+ port?: number;
53
+ sslMode?: "require" | "disable" | "verify-ca" | "verify-full";
54
+ };
55
+ cache?: {
56
+ address: string;
57
+ existingSecret: string;
58
+ username?: string;
59
+ tls?: {
60
+ enabled: boolean;
61
+ caBundleSecretName?: string;
62
+ };
63
+ };
64
+ networkPolicy?: {
65
+ enabled: boolean;
66
+ ingressNamespaceLabels?: Record<string, string>;
67
+ egressNamespaceLabels?: Record<string, string>[];
68
+ egressCidrs?: string[];
69
+ };
70
+ namespace?: string;
71
+ chartVersion?: string;
72
+ harborVersion?: string;
73
+ repositoryName?: string;
74
+ repositoryNamespace?: string;
75
+ repositoryNamespaceOwnership?: "external" | "owned";
76
+ repositoryUrl?: string;
77
+ namespaceOwnership?: "external" | "owned";
78
+ certificate?: {
79
+ secretName: string;
80
+ issuerRef: {
81
+ name: string;
82
+ kind?: "Issuer" | "ClusterIssuer";
83
+ group?: string;
84
+ };
85
+ duration?: string;
86
+ renewBefore?: string;
87
+ };
88
+ internalTls?: {
89
+ enabled: boolean;
90
+ certSource?: "auto" | "secret";
91
+ caBundleSecretName?: string;
92
+ coreSecretName?: string;
93
+ jobserviceSecretName?: string;
94
+ registrySecretName?: string;
95
+ portalSecretName?: string;
96
+ trivySecretName?: string;
97
+ };
98
+ caBundleSecretName?: string;
99
+ pvcStorageClassName?: string;
100
+ trivyEnabled?: boolean;
101
+ metricsEnabled?: boolean;
102
+ values?: Record<string, unknown>;
103
+ }, {}>;
104
+ export type HarborLocalInstallationConfig = typeof HarborLocalInstallationConfigSchema.infer;
105
+ /** Production Harbor profile requiring external durable database and cache providers. */
106
+ export declare const HarborProductionInstallationConfigSchema: import("arktype/internal/variants/object.ts").ObjectType<{
107
+ profile: "production";
108
+ exposure: {
109
+ tls: {
110
+ enabled: true;
111
+ source: "auto" | "secret" | "cert-manager";
112
+ secretName?: string;
113
+ };
114
+ type: "ingress" | "loadBalancer" | "clusterIP" | "nodePort";
115
+ externalUrl: string;
116
+ ingress?: {
117
+ host: string;
118
+ className?: string;
119
+ annotations?: Record<string, string>;
120
+ };
121
+ nodePort?: {
122
+ http?: number;
123
+ https?: number;
124
+ };
125
+ };
126
+ certificate: {
127
+ secretName: string;
128
+ issuerRef: {
129
+ name: string;
130
+ kind?: "Issuer" | "ClusterIssuer";
131
+ group?: string;
132
+ };
133
+ duration?: string;
134
+ renewBefore?: string;
135
+ };
136
+ storage: {
137
+ secure: true;
138
+ skipVerify: false;
139
+ bucket: string;
140
+ region: string;
141
+ regionEndpoint: string;
142
+ existingSecret: string;
143
+ rootDirectory?: string;
144
+ disableRedirect?: boolean;
145
+ caBundleSecretName?: string;
146
+ };
147
+ database: {
148
+ host: string;
149
+ username: string;
150
+ database: string;
151
+ existingSecret: string;
152
+ port?: number;
153
+ sslMode?: "require" | "disable" | "verify-ca" | "verify-full";
154
+ };
155
+ cache: {
156
+ address: string;
157
+ existingSecret: string;
158
+ username?: string;
159
+ tls?: {
160
+ enabled: boolean;
161
+ caBundleSecretName?: string;
162
+ };
163
+ };
164
+ networkPolicy: {
165
+ enabled: true;
166
+ ingressNamespaceLabels: Record<string, string>;
167
+ egressNamespaceLabels: Record<string, string>[];
168
+ egressCidrs?: string[];
169
+ };
170
+ replicas: {
171
+ core: number;
172
+ portal: number;
173
+ registry: number;
174
+ jobservice: number;
175
+ exporter: number;
176
+ };
177
+ resources: {
178
+ core: {
179
+ requests?: {
180
+ cpu?: string;
181
+ memory?: string;
182
+ };
183
+ limits?: {
184
+ cpu?: string;
185
+ memory?: string;
186
+ };
187
+ };
188
+ portal: {
189
+ requests?: {
190
+ cpu?: string;
191
+ memory?: string;
192
+ };
193
+ limits?: {
194
+ cpu?: string;
195
+ memory?: string;
196
+ };
197
+ };
198
+ registry: {
199
+ requests?: {
200
+ cpu?: string;
201
+ memory?: string;
202
+ };
203
+ limits?: {
204
+ cpu?: string;
205
+ memory?: string;
206
+ };
207
+ };
208
+ jobservice: {
209
+ requests?: {
210
+ cpu?: string;
211
+ memory?: string;
212
+ };
213
+ limits?: {
214
+ cpu?: string;
215
+ memory?: string;
216
+ };
217
+ };
218
+ exporter: {
219
+ requests?: {
220
+ cpu?: string;
221
+ memory?: string;
222
+ };
223
+ limits?: {
224
+ cpu?: string;
225
+ memory?: string;
226
+ };
227
+ };
228
+ };
229
+ name: string;
230
+ adminPasswordSecret: {
231
+ name: string;
232
+ key?: string;
233
+ };
234
+ componentSecrets: {
235
+ encryptionKey: string;
236
+ core: string;
237
+ jobservice: string;
238
+ registry: string;
239
+ registryCredentials: string;
240
+ xsrf?: string;
241
+ };
242
+ namespace?: string;
243
+ chartVersion?: string;
244
+ harborVersion?: string;
245
+ repositoryName?: string;
246
+ repositoryNamespace?: string;
247
+ repositoryNamespaceOwnership?: "external" | "owned";
248
+ repositoryUrl?: string;
249
+ namespaceOwnership?: "external" | "owned";
250
+ internalTls?: {
251
+ enabled: boolean;
252
+ certSource?: "auto" | "secret";
253
+ caBundleSecretName?: string;
254
+ coreSecretName?: string;
255
+ jobserviceSecretName?: string;
256
+ registrySecretName?: string;
257
+ portalSecretName?: string;
258
+ trivySecretName?: string;
259
+ };
260
+ caBundleSecretName?: string;
261
+ pvcStorageClassName?: string;
262
+ trivyEnabled?: boolean;
263
+ metricsEnabled?: boolean;
264
+ values?: Record<string, unknown>;
265
+ }, {}>;
266
+ export type HarborProductionInstallationConfig = typeof HarborProductionInstallationConfigSchema.infer;
267
+ export declare const HarborInstallationStatusSchema: import("arktype/internal/variants/object.ts").ObjectType<{
268
+ ready: boolean;
269
+ failed: boolean;
270
+ phase: "Ready" | "Failed" | "Installing";
271
+ endpoint: string;
272
+ chartVersion: string;
273
+ harborVersion: string;
274
+ profile: "production" | "local-development";
275
+ observedGeneration: number;
276
+ tlsEnabled: boolean;
277
+ storageReady: boolean;
278
+ databaseReady: boolean;
279
+ cacheReady: boolean;
280
+ networkPolicyReady: boolean;
281
+ conditions: {
282
+ type: string;
283
+ status: string;
284
+ reason?: string;
285
+ message?: string;
286
+ observedGeneration?: number;
287
+ }[];
288
+ }, {}>;
289
+ export type HarborInstallationStatus = typeof HarborInstallationStatusSchema.infer;
290
+ export declare const HarborHelmRepositoryConfigSchema: import("arktype/internal/variants/object.ts").ObjectType<{
291
+ name?: string;
292
+ namespace?: string;
293
+ url?: string;
294
+ interval?: string;
295
+ id?: string;
296
+ }, {}>;
297
+ export type HarborHelmRepositoryConfig = typeof HarborHelmRepositoryConfigSchema.infer;
298
+ export declare const HarborHelmReleaseConfigSchema: import("arktype/internal/variants/object.ts").ObjectType<{
299
+ name: string;
300
+ namespace?: string;
301
+ version?: string;
302
+ repositoryName?: string;
303
+ repositoryNamespace?: string;
304
+ repositoryUrl?: string;
305
+ values?: Record<string, unknown>;
306
+ id?: string;
307
+ }, {}>;
308
+ export type HarborHelmReleaseConfig = Omit<typeof HarborHelmReleaseConfigSchema.infer, 'values'> & {
309
+ values?: TypeKroChartValue<Record<string, unknown>>;
310
+ };
311
+ export interface HarborS3StorageBinding {
312
+ bucket: string;
313
+ region: string;
314
+ regionEndpoint: string;
315
+ existingSecret: string;
316
+ secure: boolean;
317
+ skipVerify: boolean;
318
+ }
319
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/factories/harbor/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAuJpE,qFAAqF;AACrF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAW9C,CAAC;AACH,MAAM,MAAM,6BAA6B,GAAG,OAAO,mCAAmC,CAAC,KAAK,CAAC;AAS7F,yFAAyF;AACzF,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA4BnD,CAAC;AACH,MAAM,MAAM,kCAAkC,GAC5C,OAAO,wCAAwC,CAAC,KAAK,CAAC;AAExD,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;MAsBzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,8BAA8B,CAAC,KAAK,CAAC;AAEnF,eAAO,MAAM,gCAAgC;;;;;;MAM3C,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,OAAO,gCAAgC,CAAC,KAAK,CAAC;AAEvF,eAAO,MAAM,6BAA6B;;;;;;;;;MASxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,OAAO,6BAA6B,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG;IACjG,MAAM,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACrD,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;CACrB"}