@devkong/cli-nx 0.0.67-alpha.22 → 0.0.67-alpha.24
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.
- package/package.json +1 -1
- package/src/generators/preset/files/kotlin/README.md +7 -0
- package/src/generators/preset/files/kotlin/gradle.properties +1 -1
- package/src/generators/preset/files/kotlin/src/main/kotlin/io/kong/extension/Main.kt +1 -1
- package/src/generators/preset/files/kotlin/src/main/kotlin/io/kong/extension/RegisterFrontend.kt +1 -1
- package/src/generators/preset/files/python/README.md +7 -0
- package/src/generators/preset/files/python/requirements.txt +1 -1
- package/src/generators/preset/files/python-advanced/src/frontend.py +1 -1
package/package.json
CHANGED
|
@@ -54,7 +54,14 @@ kong list-versions
|
|
|
54
54
|
You can assign an alias (e.g., stable, beta) to a specific version. This alias will appear in the UI as a separate step in the workflow. For example, to assign the alias stable to version 1, use:
|
|
55
55
|
|
|
56
56
|
```shell script
|
|
57
|
+
# send all traffic to version 1
|
|
57
58
|
kong set-alias stable 1
|
|
59
|
+
|
|
60
|
+
# split live traffic: 80% to version 1, 20% to version 2 (weights must add up to 100)
|
|
61
|
+
kong set-alias stable 1:80 2:20
|
|
62
|
+
|
|
63
|
+
# same split, plus mirror traffic to version 3 as a shadow (it serves no live traffic)
|
|
64
|
+
kong set-alias stable 1:80 2:20 3:shadow
|
|
58
65
|
```
|
|
59
66
|
|
|
60
67
|
### Using a Custom Profile
|
|
@@ -66,7 +66,7 @@ class Main : KongFunction<InputData>(InputData::class.java) {
|
|
|
66
66
|
|
|
67
67
|
// Example: resolve the credential the user selected for this step. It is optional here,
|
|
68
68
|
// so we use `find` (returns null when unset) instead of `get` (which throws). Cast
|
|
69
|
-
// `secret.data` to the type registered for "
|
|
69
|
+
// `secret.data` to the type registered for "<%=name%>-secret" in RegisterFrontend and use
|
|
70
70
|
// `(secret.data as MySecret).myKey` to authenticate outbound calls (never return it).
|
|
71
71
|
val secret = context.secret.find("primary")
|
|
72
72
|
if (secret != null) {
|
package/src/generators/preset/files/kotlin/src/main/kotlin/io/kong/extension/RegisterFrontend.kt
CHANGED
|
@@ -22,7 +22,7 @@ class RegisterFrontend {
|
|
|
22
22
|
@Produces
|
|
23
23
|
fun create(): KongFrontend =
|
|
24
24
|
KongFrontendBuilder()
|
|
25
|
-
.withSecretTypes("primary", "
|
|
25
|
+
.withSecretTypes("primary", "<%=name%>-secret" to MySecret::class.java)
|
|
26
26
|
.withForm()
|
|
27
27
|
.build(jsonMapper)
|
|
28
28
|
}
|
|
@@ -55,7 +55,14 @@ kong list-versions
|
|
|
55
55
|
You can assign an alias (e.g., stable, beta) to a specific version. This alias will appear in the UI as a separate step in the workflow. For example, to assign the alias stable to version 1, use:
|
|
56
56
|
|
|
57
57
|
```shell script
|
|
58
|
+
# send all traffic to version 1
|
|
58
59
|
kong set-alias stable 1
|
|
60
|
+
|
|
61
|
+
# split live traffic: 80% to version 1, 20% to version 2 (weights must add up to 100)
|
|
62
|
+
kong set-alias stable 1:80 2:20
|
|
63
|
+
|
|
64
|
+
# same split, plus mirror traffic to version 3 as a shadow (it serves no live traffic)
|
|
65
|
+
kong set-alias stable 1:80 2:20 3:shadow
|
|
59
66
|
```
|
|
60
67
|
|
|
61
68
|
### Using a Custom Profile
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
pydantic==2.13.4
|
|
2
|
-
kong-sdk==0.0.
|
|
2
|
+
kong-sdk==0.0.49
|