Commit Graph

4 Commits

Author SHA1 Message Date
Dimitri Mitropoulos
ed3aad6046
tsconfig cleanup (#4908) 2022-06-27 12:57:50 -04:00
Dimitri Mitropoulos
3ba7b880b6
[o2k] all Kong entities have should tags (#3428) 2021-06-02 08:55:31 -04:00
Dimitri Mitropoulos
8fb789f14d
[o2k] fix: kubernetes TLS implementation is (very) wrong (#3410)
* updates Kubernetes types to actually match Kuberenetes Ingress/v1beta1 API

* checks type of result in tests

among other cosmetic changes

* enables strict mode in o2k (but leaves bug it uncovered that this PR fixes)

I really do need this to complete the task at hand.  For example, there was an existing error in `ingressDocWithOverride`:

```
Type 'string | null | undefined' is not assignable to type 'string | undefined'.
  Type 'null' is not assignable to type 'string | undefined'.ts(2322)
kubernetes-config.ts(36, 3): The expected type comes from property 'path' which is declared here on type 'K8sHTTPIngressPath'
```

That is caught only by strict mode.  This is literally what I am fixing in this PR, so it seems like as good a time as any.  Thankfully, only took me ~30 minutes to do because it was already super close.

* fixtures for `kong-for-kubernetes`

* index exporters for actual exports

when I made these files, I didn't understand that the lower-level helpers are not actually exported by the library, therefore there's no reason to have these index.ts files.

Furthermore, the types file could use it's own for the same reason, because those types _are_ actually exported.

* fixes bug: TLS is now an array and a child of K8sIngress.spec

* updates 'yaml'

for some reason I cannot explain, suddenly the CI is failing constantly because of this package.  https://github.com/Kong/insomnia/runs/2639615988

The only `yaml` exports we use in`o2k` are `parse` and `stringify` and we don't re-export it in any way.  Therefore, we should be safe to update it (many other projects in the monorepo are on different versions anyway).  This recent version is written purely in TypeScript, so we don't need the types packages anymore.

* adds a few more docs
2021-05-24 08:23:51 -04:00
Dimitri Mitropoulos
5f4c19da35
[TypeScript] Phase 1 & 2 (#3370)
Co-authored-by: Opender Singh <opender.singh@konghq.com>
2021-05-12 18:35:00 +12:00