Skip to content

Commit

Permalink
Merge pull request #21 from kcl-lang/add-more-kcl-mod-files-for-lsp
Browse files Browse the repository at this point in the history
feat: add more kcl mod files for IDE lsp hints
  • Loading branch information
Peefy authored Aug 22, 2024
2 parents 57d993d + ef44f4c commit 5c755bf
Show file tree
Hide file tree
Showing 31 changed files with 301 additions and 1 deletion.
7 changes: 7 additions & 0 deletions examples/appops/extra-resources-example/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "nginx-example"
version = "0.0.1"

[dependencies]
konfig = { path = "../../../../konfig" }
k8s = "1.28"
13 changes: 13 additions & 0 deletions examples/appops/extra-resources-example/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.28"
version = "1.28"
sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q="
reg = "ghcr.io"
repo = "kcl-lang/k8s"
oci_tag = "1.28"
[dependencies.konfig]
name = "konfig"
full_name = "konfig_0.6.0"
version = "0.6.0"
7 changes: 7 additions & 0 deletions examples/appops/guestbook/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "nginx-example"
version = "0.0.1"

[dependencies]
konfig = { path = "../../../../konfig" }
k8s = "1.28"
13 changes: 13 additions & 0 deletions examples/appops/guestbook/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.28"
version = "1.28"
sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q="
reg = "ghcr.io"
repo = "kcl-lang/k8s"
oci_tag = "1.28"
[dependencies.konfig]
name = "konfig"
full_name = "konfig_0.6.0"
version = "0.6.0"
7 changes: 7 additions & 0 deletions examples/appops/http-echo/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "nginx-example"
version = "0.0.1"

[dependencies]
konfig = { path = "../../../../konfig" }
k8s = "1.28"
13 changes: 13 additions & 0 deletions examples/appops/http-echo/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.28"
version = "1.28"
sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q="
reg = "ghcr.io"
repo = "kcl-lang/k8s"
oci_tag = "1.28"
[dependencies.konfig]
name = "konfig"
full_name = "konfig_0.6.0"
version = "0.6.0"
7 changes: 7 additions & 0 deletions examples/appops/nginx-example/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "nginx-example"
version = "0.0.1"

[dependencies]
konfig = { path = "../../../../konfig" }
k8s = "1.28"
13 changes: 13 additions & 0 deletions examples/appops/nginx-example/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.28"
version = "1.28"
sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q="
reg = "ghcr.io"
repo = "kcl-lang/k8s"
oci_tag = "1.28"
[dependencies.konfig]
name = "konfig"
full_name = "konfig_0.6.0"
version = "0.6.0"
7 changes: 7 additions & 0 deletions examples/server/app_config_map/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "nginx-example"
version = "0.0.1"

[dependencies]
konfig = { path = "../../../../konfig" }
k8s = "1.28"
13 changes: 13 additions & 0 deletions examples/server/app_config_map/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.28"
version = "1.28"
sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q="
reg = "ghcr.io"
repo = "kcl-lang/k8s"
oci_tag = "1.28"
[dependencies.konfig]
name = "konfig"
full_name = "konfig_0.6.0"
version = "0.6.0"
7 changes: 7 additions & 0 deletions examples/server/app_label_selector/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "nginx-example"
version = "0.0.1"

[dependencies]
konfig = { path = "../../../../konfig" }
k8s = "1.28"
13 changes: 13 additions & 0 deletions examples/server/app_label_selector/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.28"
version = "1.28"
sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q="
reg = "ghcr.io"
repo = "kcl-lang/k8s"
oci_tag = "1.28"
[dependencies.konfig]
name = "konfig"
full_name = "konfig_0.6.0"
version = "0.6.0"
7 changes: 7 additions & 0 deletions examples/server/app_main_container/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "nginx-example"
version = "0.0.1"

[dependencies]
konfig = { path = "../../../../konfig" }
k8s = "1.28"
13 changes: 13 additions & 0 deletions examples/server/app_main_container/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.28"
version = "1.28"
sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q="
reg = "ghcr.io"
repo = "kcl-lang/k8s"
oci_tag = "1.28"
[dependencies.konfig]
name = "konfig"
full_name = "konfig_0.6.0"
version = "0.6.0"
7 changes: 7 additions & 0 deletions examples/server/app_need_namespace/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "nginx-example"
version = "0.0.1"

[dependencies]
konfig = { path = "../../../../konfig" }
k8s = "1.28"
13 changes: 13 additions & 0 deletions examples/server/app_need_namespace/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.28"
version = "1.28"
sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q="
reg = "ghcr.io"
repo = "kcl-lang/k8s"
oci_tag = "1.28"
[dependencies.konfig]
name = "konfig"
full_name = "konfig_0.6.0"
version = "0.6.0"
7 changes: 7 additions & 0 deletions examples/server/app_rbac/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "nginx-example"
version = "0.0.1"

[dependencies]
konfig = { path = "../../../../konfig" }
k8s = "1.28"
13 changes: 13 additions & 0 deletions examples/server/app_rbac/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.28"
version = "1.28"
sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q="
reg = "ghcr.io"
repo = "kcl-lang/k8s"
oci_tag = "1.28"
[dependencies.konfig]
name = "konfig"
full_name = "konfig_0.6.0"
version = "0.6.0"
7 changes: 7 additions & 0 deletions examples/server/app_scheduling_strategy/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "nginx-example"
version = "0.0.1"

[dependencies]
konfig = { path = "../../../../konfig" }
k8s = "1.28"
13 changes: 13 additions & 0 deletions examples/server/app_scheduling_strategy/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.28"
version = "1.28"
sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q="
reg = "ghcr.io"
repo = "kcl-lang/k8s"
oci_tag = "1.28"
[dependencies.konfig]
name = "konfig"
full_name = "konfig_0.6.0"
version = "0.6.0"
7 changes: 7 additions & 0 deletions examples/server/app_secret/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "nginx-example"
version = "0.0.1"

[dependencies]
konfig = { path = "../../../../konfig" }
k8s = "1.28"
13 changes: 13 additions & 0 deletions examples/server/app_secret/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.28"
version = "1.28"
sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q="
reg = "ghcr.io"
repo = "kcl-lang/k8s"
oci_tag = "1.28"
[dependencies.konfig]
name = "konfig"
full_name = "konfig_0.6.0"
version = "0.6.0"
7 changes: 7 additions & 0 deletions examples/server/app_service/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "nginx-example"
version = "0.0.1"

[dependencies]
konfig = { path = "../../../../konfig" }
k8s = "1.28"
13 changes: 13 additions & 0 deletions examples/server/app_service/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.28"
version = "1.28"
sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q="
reg = "ghcr.io"
repo = "kcl-lang/k8s"
oci_tag = "1.28"
[dependencies.konfig]
name = "konfig"
full_name = "konfig_0.6.0"
version = "0.6.0"
7 changes: 7 additions & 0 deletions examples/server/app_sidecar/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "nginx-example"
version = "0.0.1"

[dependencies]
konfig = { path = "../../../../konfig" }
k8s = "1.28"
13 changes: 13 additions & 0 deletions examples/server/app_sidecar/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.28"
version = "1.28"
sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q="
reg = "ghcr.io"
repo = "kcl-lang/k8s"
oci_tag = "1.28"
[dependencies.konfig]
name = "konfig"
full_name = "konfig_0.6.0"
version = "0.6.0"
7 changes: 7 additions & 0 deletions examples/server/app_stateful_set/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "nginx-example"
version = "0.0.1"

[dependencies]
konfig = { path = "../../../../konfig" }
k8s = "1.28"
13 changes: 13 additions & 0 deletions examples/server/app_stateful_set/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.28"
version = "1.28"
sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q="
reg = "ghcr.io"
repo = "kcl-lang/k8s"
oci_tag = "1.28"
[dependencies.konfig]
name = "konfig"
full_name = "konfig_0.6.0"
version = "0.6.0"
7 changes: 7 additions & 0 deletions examples/server/app_volume/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "nginx-example"
version = "0.0.1"

[dependencies]
konfig = { path = "../../../../konfig" }
k8s = "1.28"
13 changes: 13 additions & 0 deletions examples/server/app_volume/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.28"
version = "1.28"
sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q="
reg = "ghcr.io"
repo = "kcl-lang/k8s"
oci_tag = "1.28"
[dependencies.konfig]
name = "konfig"
full_name = "konfig_0.6.0"
version = "0.6.0"
2 changes: 1 addition & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

set -e

find ./examples -name "kcl.mod" -exec dirname {} \; | while read -r dir; do
find ./examples -name "main.k" -exec dirname {} \; | while read -r dir; do
if (cd "$dir" && kcl run); then
echo "\033[32mTest SUCCESSED - $dir\033[0m\n"
else
Expand Down

0 comments on commit 5c755bf

Please sign in to comment.