@meshagent/meshagent-ts-auth 0.41.9 → 0.42.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.
- package/CHANGELOG.md +9 -0
- package/dist/browser/ma-auth.global.js +18 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## [0.42.0]
|
|
2
|
+
- Added project lookup by key.
|
|
3
|
+
- Container and room APIs now return structured `containerPort`/`hostPort` entries instead of integer port lists, which is a breaking response-shape change.
|
|
4
|
+
- `ContainerSpec`, `PortSpec`, and `RoutePathSpec` now support `template`, `host_port`, and `stripPrefix`, and room service URL resolution uses `host_port` when available.
|
|
5
|
+
- `createRoom` now serializes typed permissions, and container creation now accepts a `template` option.
|
|
6
|
+
|
|
7
|
+
## [0.41.10]
|
|
8
|
+
- Stability
|
|
9
|
+
|
|
1
10
|
## [0.41.9]
|
|
2
11
|
- Stability
|
|
3
12
|
|
|
@@ -15958,6 +15958,7 @@ ${err.toString()}`);
|
|
|
15958
15958
|
credentials: toCredentials(params.credentials ?? []),
|
|
15959
15959
|
name: params.name,
|
|
15960
15960
|
mounts: params.mounts,
|
|
15961
|
+
template: params.template,
|
|
15961
15962
|
writable_root_fs: params.writableRootFs,
|
|
15962
15963
|
private: params.private
|
|
15963
15964
|
});
|
|
@@ -16329,14 +16330,23 @@ ${err.toString()}`);
|
|
|
16329
16330
|
const nameRaw = entry["name"];
|
|
16330
16331
|
const portsRaw = entry["ports"];
|
|
16331
16332
|
const serviceIdRaw = entry["service_id"];
|
|
16332
|
-
if (!Array.isArray(portsRaw) || !portsRaw.every((port) =>
|
|
16333
|
+
if (!Array.isArray(portsRaw) || !portsRaw.every((port) => {
|
|
16334
|
+
if (!isRecord(port)) {
|
|
16335
|
+
return false;
|
|
16336
|
+
}
|
|
16337
|
+
return typeof port["container_port"] === "number" && Number.isInteger(port["container_port"]) && typeof port["host_port"] === "number" && Number.isInteger(port["host_port"]);
|
|
16338
|
+
})) {
|
|
16333
16339
|
throw this.unexpectedResponseError("list");
|
|
16334
16340
|
}
|
|
16341
|
+
const ports = portsRaw.map((port) => ({
|
|
16342
|
+
containerPort: port["container_port"],
|
|
16343
|
+
hostPort: port["host_port"]
|
|
16344
|
+
}));
|
|
16335
16345
|
items.push({
|
|
16336
16346
|
id,
|
|
16337
16347
|
image,
|
|
16338
16348
|
name: typeof nameRaw === "string" ? nameRaw : void 0,
|
|
16339
|
-
ports
|
|
16349
|
+
ports,
|
|
16340
16350
|
startedBy: {
|
|
16341
16351
|
id: startedById,
|
|
16342
16352
|
name: startedByName
|
|
@@ -42135,6 +42145,11 @@ ${newlined}
|
|
|
42135
42145
|
action: "get project"
|
|
42136
42146
|
});
|
|
42137
42147
|
}
|
|
42148
|
+
async getProjectByKey(projectKey) {
|
|
42149
|
+
return await this.request(`/accounts/projects/by-key/${encodeURIComponent(projectKey)}`, {
|
|
42150
|
+
action: "get project by key"
|
|
42151
|
+
});
|
|
42152
|
+
}
|
|
42138
42153
|
async createApiKey(projectId, name, description) {
|
|
42139
42154
|
return await this.request(`/accounts/projects/${projectId}/api-keys`, {
|
|
42140
42155
|
method: "POST",
|
|
@@ -47354,7 +47369,7 @@ ${newlined}
|
|
|
47354
47369
|
}
|
|
47355
47370
|
function roomServiceMcpServerUrl({ service, port, endpoint }) {
|
|
47356
47371
|
const endpointPath = normalizeEndpointPath(endpoint.path);
|
|
47357
|
-
const portValue = typeof port.num === "number" ? port.num : null;
|
|
47372
|
+
const portValue = port.host_port ?? (typeof port.num === "number" ? port.num : null);
|
|
47358
47373
|
if (service.external == null) {
|
|
47359
47374
|
if (portValue == null) {
|
|
47360
47375
|
return `http://localhost${endpointPath}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshagent/meshagent-ts-auth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"description": "Meshagent Typescript Auth",
|
|
5
5
|
"homepage": "https://github.com/meshagent/meshagent-ts-auth",
|
|
6
6
|
"scripts": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"CHANGELOG.md"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@meshagent/meshagent": "^0.
|
|
42
|
+
"@meshagent/meshagent": "^0.42.0",
|
|
43
43
|
"typescript": "^5.8.3"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|