@devkong/cli-nx 0.0.67-alpha.22 → 0.0.67-alpha.23

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devkong/cli-nx",
3
- "version": "0.0.67-alpha.22",
3
+ "version": "0.0.67-alpha.23",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./src/index.d.ts",
@@ -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 "my-secret" in RegisterFrontend and use
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) {
@@ -22,7 +22,7 @@ class RegisterFrontend {
22
22
  @Produces
23
23
  fun create(): KongFrontend =
24
24
  KongFrontendBuilder()
25
- .withSecretTypes("primary", "my-secret" to MySecret::class.java)
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
@@ -11,7 +11,7 @@ class MySecret(BaseModel):
11
11
 
12
12
  frontend: KongFrontend = (
13
13
  KongFrontendBuilder()
14
- .with_secret_types("primary", {"my-secret": MySecret})
14
+ .with_secret_types("primary", {"<%=name%>-secret": MySecret})
15
15
  .with_form()
16
16
  .build()
17
17
  )