@metaplay/metaplay-auth 1.5.0 → 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,142 +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
+
3
21
  ## [1.5.0] - 2024-07-29
4
22
 
5
23
  ### Added
6
24
 
7
- * 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.
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.
8
26
 
9
27
  ### Changed
10
28
 
11
- * The published npm package is now bundled to significantly speed up the invocation of the tool.
12
- * 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.
13
- * Specifying the target environment as FQDN (eg, idler-develop.p1.metaplay.io) no longer supports `--stack-api`. Use the form `<organization>-<project>-<environment>` instead.
14
- * The `--organization`, `--project`, `--environment` options are deprecated and will be removed in a future version. Use the `<organization>-<project>-<environment>` syntax instead!
15
- * The output of `get-environment` is now printed as an indented multi-line object to make it easier to read.
16
- * The output of `show-tokens` is now printed as a valid JSON object to make it more easily consumed by other tools.
17
- * 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.
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.
18
36
 
19
37
  ### Fixed
20
38
 
21
- * Support overriding StackAPI base url with `--stack-api` in the commands `push-docker-image` and `check-server-status`.
22
- * The generated `kubeconfig` now remembers the `--stack-api` override, if specified when generating a `kubeconfig` for an environment.
23
- * The `get-kubeconfig` argument `--type <credentials-type>` is now properly respected.
24
- * 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.
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.
25
43
 
26
44
  ## [1.4.2] - 2024-04-24
27
45
 
28
46
  ### Added
29
47
 
30
- * 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`.
31
49
 
32
50
  ## [1.4.1] - 2024-04-24
33
51
 
34
52
  ### Added
35
53
 
36
- * 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.
37
- * New command `push-docker-image` which pushes the built docker image into the target environment's image repository.
38
- * New command `check-server-status [gameserver]` which replaces the old `check-deployment [namespace]`
39
- * 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`.
40
58
 
41
59
  ### Changed
42
60
 
43
- * 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.
44
- * 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.
45
63
 
46
64
  ### Fixed
47
65
 
48
- * 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.
49
67
 
50
68
  ## [1.3.0] - 2024-04-18
51
69
 
52
70
  ### Added
53
71
 
54
- * 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.
55
- * 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`.
56
74
 
57
75
  ### Changed
58
76
 
59
- * 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.
60
78
 
61
79
  ## [1.2.1] - 2024-04-05
62
80
 
63
81
  ### Changed
64
82
 
65
- * `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.
66
84
 
67
85
  ## [1.2.0] - 2024-03-20
68
86
 
69
87
  ### Added
70
88
 
71
- * 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.
72
90
 
73
91
  ## [1.1.7] - 2024-03-15
74
92
 
75
93
  ### Added
76
94
 
77
- * 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.
78
96
 
79
97
  ### Changed
80
98
 
81
- * The `show-tokens` command is changed back to print more human-friendly output and the `--format` flag is removed.
82
- * 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.
83
101
 
84
102
  ## [1.1.6] - 2024-03-12
85
103
 
86
104
  ### Added
87
105
 
88
- * Added experimental `check-deployment` command for checking the status of a game server after deploying it.
89
- * 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.
90
108
 
91
109
  ### Changed
92
110
 
93
- * 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.
94
112
 
95
113
  ## [1.1.5] - 2024-02-26
96
114
 
97
115
  ### Changed
98
116
 
99
- * Switched from express to H3 for a local web server.
100
- * 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.
101
119
 
102
120
  ## [1.1.4] - 2024-02-23
103
121
 
104
122
  ### Changed
105
123
 
106
- * Fixed URL escaping in the login link.
124
+ - Fixed URL escaping in the login link.
107
125
 
108
126
  ## [1.1.3] - 2024-02-23
109
127
 
110
128
  ### Changed
111
129
 
112
- * Updated outdated dependencies.
130
+ - Updated outdated dependencies.
113
131
 
114
132
  ## [1.1.2] - 2024-02-23
115
133
 
116
134
  ### Changed
117
135
 
118
- * Bumped version for package re-publishing test.
136
+ - Bumped version for package re-publishing test.
119
137
 
120
138
  ## [1.1.1] - 2024-02-23
121
139
 
122
140
  ### Changed
123
141
 
124
- * Bumped version for package re-publishing.
142
+ - Bumped version for package re-publishing.
125
143
 
126
144
  ## [1.1.0] - 2024-02-22
127
145
 
128
146
  ### Added
129
147
 
130
- * Added support for inexplicit token refresh flow.
148
+ - Added support for inexplicit token refresh flow.
131
149
 
132
150
  ## [1.0.1] - 2024-02-08
133
151
 
134
152
  ### Changed
135
153
 
136
- * Better error handling and reporting for the OAuth2 PKCE flow.
154
+ - Better error handling and reporting for the OAuth2 PKCE flow.
137
155
 
138
156
  ## [1.0.0] - 2024-01-17
139
157
 
140
158
  ### Added
141
159
 
142
- * Initial `metaplay-auth` version.
160
+ - Initial `metaplay-auth` version.