Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kahirokunn committed Mar 19, 2024
1 parent ede1207 commit 475b03b
Show file tree
Hide file tree
Showing 53 changed files with 29 additions and 310 deletions.
3 changes: 0 additions & 3 deletions CODE_OF_CONDUCT.md

This file was deleted.

49 changes: 0 additions & 49 deletions CONTRIBUTING.md

This file was deleted.

2 changes: 1 addition & 1 deletion examples/generate-all-k8s-client/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ generate-code:
sleep 20

deno run --allow-write --allow-read --allow-env --allow-run --allow-net=deno.land ./scripts/codegen.ts
npx prettier -w ./tmp/api/openapi-spec/ ./generate-all-k8s-client
npx prettier -w ./tmp/api/openapi-spec/

delete-cluster:
kind delete cluster --name openapi
Expand Down
4 changes: 2 additions & 2 deletions examples/generate-all-k8s-client/scripts/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const genK8sClientCodegenConfigSourceCode = (
apiFile: string,
outputFilePath: string
) =>
`import type { ConfigFile } from 'kubernetes-typescript-client-codegen-openapi'
`import type { ConfigFile } from 'kubernetes-ts'
const config: ConfigFile = {
schemaFile: '${swaggerFilePath}',
Expand Down Expand Up @@ -91,6 +91,6 @@ await Promise.all(
path.relative(k8sClientCodegenConfigDirectoryPath, k8sClientFilePath)
)
)
await $`npx kubernetes-typescript-client-codegen-openapi ${k8sClientCodegenConfigFilePath}`
await $`npx kubernetes-ts ${k8sClientCodegenConfigFilePath}`
})
)
20 changes: 17 additions & 3 deletions examples/generate-all-k8s-client/tests/crud.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
createCoreV1NamespacedPod,
deleteCoreV1NamespacedPod,
listCoreV1NamespacedPod,
listCoreV1PodForAllNamespaces,
patchCoreV1NamespacedPod,
patchCoreV1NamespacedPodStatus,
readCoreV1NamespacedPod,
Expand All @@ -23,9 +23,20 @@ import {
// restartPolicy: Never

async function main() {
await listCoreV1NamespacedPod({
namespace: 'default',
await listCoreV1PodForAllNamespaces(
{
// namespace: 'cert-manager',
watch: true,
},
{
watchEventHandler: console.log,
}
)
await listCoreV1PodForAllNamespaces({
// namespace: 'cert-manager',
watch: false,
})

await createCoreV1NamespacedPod({
namespace: 'default',
body: {
Expand All @@ -43,6 +54,7 @@ async function main() {
},
},
})

await patchCoreV1NamespacedPod({
namespace: 'default',
name: 'test',
Expand Down Expand Up @@ -145,6 +157,8 @@ async function main() {
namespace: 'default',
body: {},
})

console.info('Successfully')
}
main()

Expand Down
224 changes: 0 additions & 224 deletions examples/generate-vercel-client/api-client/client.ts

This file was deleted.

9 changes: 0 additions & 9 deletions examples/generate-vercel-client/justfile

This file was deleted.

10 changes: 0 additions & 10 deletions examples/generate-vercel-client/vercel.config.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "kubernetes-typescript-client-codegen-openapi",
"version": "0.0.20",
"name": "kubernetes-ts",
"version": "0.0.1",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"author": "kahirokunn",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/kahirokunn/kubernetes-typescript-client-codegen-openapi.git"
"url": "git+https://github.com/appthrust/kubernetes-ts.git"
},
"bugs": {
"url": "https://github.com/kahirokunn/kubernetes-typescript-client-codegen-openapi/issues"
"url": "https://github.com/appthrust/kubernetes-ts/issues"
},
"homepage": "https://github.com/kahirokunn/kubernetes-typescript-client-codegen-openapi",
"homepage": "https://github.com/appthrust/kubernetes-ts",
"bin": "lib/bin/cli.js",
"scripts": {
"build": "tsc",
Expand Down
Loading

0 comments on commit 475b03b

Please sign in to comment.