@metaplay/metaplay-auth 1.4.2 → 1.6.0

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.
@@ -0,0 +1,2 @@
1
+ dist
2
+ src/version.ts
package/CHANGELOG.md CHANGED
@@ -1,119 +1,160 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.6.0] - 2024-09-06
4
+
5
+ ### Added
6
+
7
+ - New command `build-image` for building the docker image locally. It wraps the raw docker build command while giving more helpful error messages about incorrect paths and other issues.
8
+ - The `deploy-server` now supports specifying a semver range for the Helm chart version, e.g., `--helm-chart-version=^0.6.4`. We strongly recommend pinning the Helm chart version exactly to avoid surprises!
9
+
10
+ ### Changed
11
+
12
+ - The generated `kubeconfig`s now bake in the stable humanId of the target environment to skip the lookup from the portal when used.
13
+ - Resolve the target environment information from the portal to better support changing slugs of organizations, projects, and environments.
14
+ - Add warning about not specifying the Helm chart version explicitly. The docker image label -based versions are deprecated and will eventually be removed.
15
+
16
+ ### Fixed
17
+
18
+ - Fix `kubectl` potential hang when interrupted using Ctrl-C as it was invoking `metaplay-auth` to query the Kubernetes access credentials.
19
+ - Improve the error reporting during deployment when a server pod ends up in the `Unschedulable` state for any reason.
20
+
21
+ ## [1.5.0] - 2024-07-29
22
+
23
+ ### Added
24
+
25
+ - New command `debug-server` allows attaching an ephemeral debug container to a running game server pod. Note: requires `kubectl` to be installed on your machine.
26
+
27
+ ### Changed
28
+
29
+ - The published npm package is now bundled to significantly speed up the invocation of the tool.
30
+ - In generated kubeconfig, use `npx @metaplay/metaplay-auth@latest` to launch the credential helper (instead of assuming globally installed `metaplay-auth`) when the `kubeconfig` was generated with `npx @metaplay/metaplay-auth get-kubeconfig`. Thus, the `metaplay-auth` does not need to be installed on the machine.
31
+ - Specifying the target environment as FQDN (eg, idler-develop.p1.metaplay.io) no longer supports `--stack-api`. Use the form `<organization>-<project>-<environment>` instead.
32
+ - The `--organization`, `--project`, `--environment` options are deprecated and will be removed in a future version. Use the `<organization>-<project>-<environment>` syntax instead!
33
+ - The output of `get-environment` is now printed as an indented multi-line object to make it easier to read.
34
+ - The output of `show-tokens` is now printed as a valid JSON object to make it more easily consumed by other tools.
35
+ - The `get-docker-login` is deprecated and will be removed in a later version. You should use the `push-docker-image` instead which handles the login automatically.
36
+
37
+ ### Fixed
38
+
39
+ - Support overriding StackAPI base url with `--stack-api` in the commands `push-docker-image` and `check-server-status`.
40
+ - The generated `kubeconfig` now remembers the `--stack-api` override, if specified when generating a `kubeconfig` for an environment.
41
+ - The `get-kubeconfig` argument `--type <credentials-type>` is now properly respected.
42
+ - The `deploy-server` server status check now checks that the image tag is the expected one, to avoid mistaking ready pods from the previous deployment as the current deployment's pods.
43
+
3
44
  ## [1.4.2] - 2024-04-24
4
45
 
5
46
  ### Added
6
47
 
7
- * Support deploying docker images directly from the target environment's registry in `deploy-server`.
48
+ - Support deploying docker images directly from the target environment's registry in `deploy-server`.
8
49
 
9
50
  ## [1.4.1] - 2024-04-24
10
51
 
11
52
  ### Added
12
53
 
13
- * New command `deploy-server` which deploys a given docker image to the target environment, including support for auto-detecting default Helm chart repository and version from the built image's labels.
14
- * New command `push-docker-image` which pushes the built docker image into the target environment's image repository.
15
- * New command `check-server-status [gameserver]` which replaces the old `check-deployment [namespace]`
16
- * Allow writing the kubeconfig from `get-kubeconfig` command directly into a file with `metaplay-auth get-kubeconfig --output /path/to/kubeconfig`.
54
+ - New command `deploy-server` which deploys a given docker image to the target environment, including support for auto-detecting default Helm chart repository and version from the built image's labels.
55
+ - New command `push-docker-image` which pushes the built docker image into the target environment's image repository.
56
+ - New command `check-server-status [gameserver]` which replaces the old `check-deployment [namespace]`
57
+ - Allow writing the kubeconfig from `get-kubeconfig` command directly into a file with `metaplay-auth get-kubeconfig --output /path/to/kubeconfig`.
17
58
 
18
59
  ### Changed
19
60
 
20
- * The `get-kubeconfig` command now defaults to generating a dynamic `kubeconfig` for human users. This means that the credentials are resolved on each time the `kubeconfig` is used. Thus, the `kubeconfig` stays valid as long as the `metaplay-auth` session is valid. Machine users still default to a static `kubeconfig` with the secret embedded.
21
- * The `check-deployment` command is now considered deprecated. Use the `check-server-status [gameserver]` instead.
61
+ - The `get-kubeconfig` command now defaults to generating a dynamic `kubeconfig` for human users. This means that the credentials are resolved on each time the `kubeconfig` is used. Thus, the `kubeconfig` stays valid as long as the `metaplay-auth` session is valid. Machine users still default to a static `kubeconfig` with the secret embedded.
62
+ - The `check-deployment` command is now considered deprecated. Use the `check-server-status [gameserver]` instead.
22
63
 
23
64
  ### Fixed
24
65
 
25
- * Many improvements to the game server status check logic: support multi-pod deployments, fix multiple bugs, make progress reporting less noisy and improve error messages.
66
+ - Many improvements to the game server status check logic: support multi-pod deployments, fix multiple bugs, make progress reporting less noisy and improve error messages.
26
67
 
27
68
  ## [1.3.0] - 2024-04-18
28
69
 
29
70
  ### Added
30
71
 
31
- * Introduce new option `-t dynamic` for `metaplay-auth get-kubeconfig` that generates a `kubeconfig` which invokes the `metaplay-auth` itself to get the credentials. This way, the `kubeconfig` is longer-lived and no longer contains the sensitive access token.
32
- * Support specifying target environment/gameserver address using the format '\<organization\>-\<project\>-\<environment\>', e.g., `metaplay-auth get-environment metaplay-idler-develop`.
72
+ - Introduce new option `-t dynamic` for `metaplay-auth get-kubeconfig` that generates a `kubeconfig` which invokes the `metaplay-auth` itself to get the credentials. This way, the `kubeconfig` is longer-lived and no longer contains the sensitive access token.
73
+ - Support specifying target environment/gameserver address using the format '\<organization\>-\<project\>-\<environment\>', e.g., `metaplay-auth get-environment metaplay-idler-develop`.
33
74
 
34
75
  ### Changed
35
76
 
36
- * The `kubeconfig` files generated default to the environment's namespace so it doesn't need to be specified manually. The cluster, user, and context names were changed to be more meaningful.
77
+ - The `kubeconfig` files generated default to the environment's namespace so it doesn't need to be specified manually. The cluster, user, and context names were changed to be more meaningful.
37
78
 
38
79
  ## [1.2.1] - 2024-04-05
39
80
 
40
81
  ### Changed
41
82
 
42
- * `Upgraded @kubernetes/client-node dependency to 1.0.0-rc4. This removes transitive dependencies on various deprecated libraries.
83
+ - `Upgraded @kubernetes/client-node dependency to 1.0.0-rc4. This removes transitive dependencies on various deprecated libraries.
43
84
 
44
85
  ## [1.2.0] - 2024-03-20
45
86
 
46
87
  ### Added
47
88
 
48
- * Introduce `get-docker-login` command that allows simpler CI flows. It outputs `DOCKER_REPO`, `DOCKER_USERNAME` and `DOCKER_PASSWORD` env variables that can be used to login with docker.
89
+ - Introduce `get-docker-login` command that allows simpler CI flows. It outputs `DOCKER_REPO`, `DOCKER_USERNAME` and `DOCKER_PASSWORD` env variables that can be used to login with docker.
49
90
 
50
91
  ## [1.1.7] - 2024-03-15
51
92
 
52
93
  ### Added
53
94
 
54
- * The `machine-login` command now works with machine user credentials in the `METAPLAY_CREDENTIALS` environment variable. You can get the credentials from the developer portal.
95
+ - The `machine-login` command now works with machine user credentials in the `METAPLAY_CREDENTIALS` environment variable. You can get the credentials from the developer portal.
55
96
 
56
97
  ### Changed
57
98
 
58
- * The `show-tokens` command is changed back to print more human-friendly output and the `--format` flag is removed.
59
- * Improve `check-deployment` error checking and clean up logging.
99
+ - The `show-tokens` command is changed back to print more human-friendly output and the `--format` flag is removed.
100
+ - Improve `check-deployment` error checking and clean up logging.
60
101
 
61
102
  ## [1.1.6] - 2024-03-12
62
103
 
63
104
  ### Added
64
105
 
65
- * Added experimental `check-deployment` command for checking the status of a game server after deploying it.
66
- * Added experimental `machine-login` command to login using machine credentials.
106
+ - Added experimental `check-deployment` command for checking the status of a game server after deploying it.
107
+ - Added experimental `machine-login` command to login using machine credentials.
67
108
 
68
109
  ### Changed
69
110
 
70
- * The `show-tokens` now outputs the values by default in JSON, you can use `metaplay-auth show-tokens -f pretty` to get the old formatting.
111
+ - The `show-tokens` now outputs the values by default in JSON, you can use `metaplay-auth show-tokens -f pretty` to get the old formatting.
71
112
 
72
113
  ## [1.1.5] - 2024-02-26
73
114
 
74
115
  ### Changed
75
116
 
76
- * Switched from express to H3 for a local web server.
77
- * Introduced native support of node:http for local server creation.
117
+ - Switched from express to H3 for a local web server.
118
+ - Introduced native support of node:http for local server creation.
78
119
 
79
120
  ## [1.1.4] - 2024-02-23
80
121
 
81
122
  ### Changed
82
123
 
83
- * Fixed URL escaping in the login link.
124
+ - Fixed URL escaping in the login link.
84
125
 
85
126
  ## [1.1.3] - 2024-02-23
86
127
 
87
128
  ### Changed
88
129
 
89
- * Updated outdated dependencies.
130
+ - Updated outdated dependencies.
90
131
 
91
132
  ## [1.1.2] - 2024-02-23
92
133
 
93
134
  ### Changed
94
135
 
95
- * Bumped version for package re-publishing test.
136
+ - Bumped version for package re-publishing test.
96
137
 
97
138
  ## [1.1.1] - 2024-02-23
98
139
 
99
140
  ### Changed
100
141
 
101
- * Bumped version for package re-publishing.
142
+ - Bumped version for package re-publishing.
102
143
 
103
144
  ## [1.1.0] - 2024-02-22
104
145
 
105
146
  ### Added
106
147
 
107
- * Added support for inexplicit token refresh flow.
148
+ - Added support for inexplicit token refresh flow.
108
149
 
109
150
  ## [1.0.1] - 2024-02-08
110
151
 
111
152
  ### Changed
112
153
 
113
- * Better error handling and reporting for the OAuth2 PKCE flow.
154
+ - Better error handling and reporting for the OAuth2 PKCE flow.
114
155
 
115
156
  ## [1.0.0] - 2024-01-17
116
157
 
117
158
  ### Added
118
159
 
119
- * Initial `metaplay-auth` version.
160
+ - Initial `metaplay-auth` version.