@meshagent/meshagent-ts-auth 0.45.7 → 0.46.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 CHANGED
@@ -1,3 +1,14 @@
1
+ ## [0.46.0]
2
+ - Stability
3
+
4
+ ## [0.45.9]
5
+ - The TypeScript services client now exposes `list()` with typed `ServiceRuntimeState`, `ServiceRuntimeStatus`, and `ServicePortRuntimeState`, including per-port liveness.
6
+ - The React dev services view now shows a Ports column with readiness indicators for each exposed port.
7
+ - Breaking change: `SecretVersion.encryption_key_id` was removed from the generated TypeScript client model.
8
+
9
+ ## [0.45.8]
10
+ - Stability
11
+
1
12
  ## [0.45.7]
2
13
  - Updated JS/TS SDK dependency versions, including `typescript`, `mocha`, `esbuild`, `jose`, `ws`, `yjs`, and `apache-arrow`.
3
14
 
@@ -44837,6 +44837,9 @@ ${newlined}
44837
44837
  function isRecord(value) {
44838
44838
  return typeof value === "object" && value !== null && !Array.isArray(value);
44839
44839
  }
44840
+ function isStringArray(value) {
44841
+ return Array.isArray(value) && value.every((item) => typeof item === "string");
44842
+ }
44840
44843
  function bytesToBase64(bytes) {
44841
44844
  if (globalScope.Buffer) {
44842
44845
  return globalScope.Buffer.from(bytes).toString("base64");
@@ -45045,6 +45048,12 @@ ${newlined}
45045
45048
  async createTableFromData(params) {
45046
45049
  return this.client.createTableFromData({ ...params, database: this.database, namespace: this.namespace });
45047
45050
  }
45051
+ async createTableFromArrowTable(params) {
45052
+ return this.client.createTableFromArrowTable({ ...params, database: this.database, namespace: this.namespace });
45053
+ }
45054
+ async createTableFromArrowBatches(params) {
45055
+ return this.client.createTableFromArrowBatches({ ...params, database: this.database, namespace: this.namespace });
45056
+ }
45048
45057
  async dropTable(params) {
45049
45058
  return this.client.dropTable({ ...params, database: this.database, namespace: this.namespace });
45050
45059
  }
@@ -45057,12 +45066,18 @@ ${newlined}
45057
45066
  async addColumns(params) {
45058
45067
  return this.client.addColumns({ ...params, database: this.database, namespace: this.namespace });
45059
45068
  }
45069
+ async addColumnsWithSchema(params) {
45070
+ return this.client.addColumnsWithSchema({ ...params, database: this.database, namespace: this.namespace });
45071
+ }
45060
45072
  async dropColumns(params) {
45061
45073
  return this.client.dropColumns({ ...params, database: this.database, namespace: this.namespace });
45062
45074
  }
45063
45075
  async insert(params) {
45064
45076
  return this.client.insert({ ...params, database: this.database, namespace: this.namespace });
45065
45077
  }
45078
+ async insertTable(params) {
45079
+ return this.client.insertTable({ ...params, database: this.database, namespace: this.namespace });
45080
+ }
45066
45081
  async update(params) {
45067
45082
  return this.client.update({ ...params, database: this.database, namespace: this.namespace });
45068
45083
  }
@@ -45166,7 +45181,7 @@ ${newlined}
45166
45181
  }
45167
45182
  async listDatabases({ namespace } = {}) {
45168
45183
  const response = await this.invoke("list_databases", { namespace: namespace ?? null });
45169
- if (!(response instanceof response_js_1.JsonContent) || !Array.isArray(response.json.databases)) {
45184
+ if (!(response instanceof response_js_1.JsonContent) || !isStringArray(response.json.databases)) {
45170
45185
  throw this.unexpectedResponseError("list_databases");
45171
45186
  }
45172
45187
  return response.json.databases;
@@ -45197,7 +45212,7 @@ ${newlined}
45197
45212
  }
45198
45213
  async listTables({ database, namespace }) {
45199
45214
  const response = await this.invoke("list_tables", { database, namespace: namespace ?? null });
45200
- if (!(response instanceof response_js_1.JsonContent) || !Array.isArray(response.json.tables)) {
45215
+ if (!(response instanceof response_js_1.JsonContent) || !isStringArray(response.json.tables)) {
45201
45216
  throw this.unexpectedResponseError("list_tables");
45202
45217
  }
45203
45218
  return response.json.tables;
@@ -45231,6 +45246,12 @@ ${newlined}
45231
45246
  namespace
45232
45247
  });
45233
45248
  }
45249
+ async createTableFromArrowTable({ database, name, table, mode = "create", namespace }) {
45250
+ return this.createTableWithSchema({ database, name, schema: table.schema, data: table, mode, namespace });
45251
+ }
45252
+ async createTableFromArrowBatches({ database, name, batches, mode = "create", namespace }) {
45253
+ return this.createTable({ database, name, data: batches, mode, namespace });
45254
+ }
45234
45255
  async dropTable({ database, name, ignoreMissing = false, namespace }) {
45235
45256
  const response = await this.invoke("drop_table", { database, name, ignore_missing: ignoreMissing, namespace: namespace ?? null });
45236
45257
  if (!(response instanceof response_js_1.EmptyContent)) {
@@ -45264,6 +45285,9 @@ ${newlined}
45264
45285
  throw this.unexpectedResponseError("add_columns");
45265
45286
  }
45266
45287
  }
45288
+ async addColumnsWithSchema({ database, table, schema, namespace }) {
45289
+ return this.addColumns({ database, table, newColumns: schema, namespace });
45290
+ }
45267
45291
  async dropColumns({ database, table, columns, namespace }) {
45268
45292
  const response = await this.invoke("drop_columns", { database, table, columns, namespace: namespace ?? null });
45269
45293
  if (!(response instanceof response_js_1.EmptyContent)) {
@@ -45273,6 +45297,9 @@ ${newlined}
45273
45297
  async insert({ database, table, records, namespace }) {
45274
45298
  await this.insertStream({ database, table, chunks: [records], namespace });
45275
45299
  }
45300
+ async insertTable({ database, table, records, namespace }) {
45301
+ await this.insert({ database, table, records, namespace });
45302
+ }
45276
45303
  async insertStream({ database, table, chunks, namespace }) {
45277
45304
  const input = new SqliteArrowWriteInputStream({
45278
45305
  kind: "start",
@@ -45456,6 +45483,34 @@ ${newlined}
45456
45483
  function toOptionalInteger(value) {
45457
45484
  return typeof value === "number" && Number.isInteger(value) ? value : void 0;
45458
45485
  }
45486
+ function parseServiceRuntimeStatus(value) {
45487
+ if (!isRecord(value)) {
45488
+ return { ports: [] };
45489
+ }
45490
+ const portsRaw = value["ports"];
45491
+ return {
45492
+ ports: Array.isArray(portsRaw) ? portsRaw.map((port) => parseServicePortRuntimeState(port)) : []
45493
+ };
45494
+ }
45495
+ function parseServicePortRuntimeState(value) {
45496
+ if (!isRecord(value)) {
45497
+ throw new room_server_client_js_1.RoomServerException("unexpected return type from services.list");
45498
+ }
45499
+ const num = value["num"];
45500
+ if (num !== "*" && typeof num !== "number") {
45501
+ throw new room_server_client_js_1.RoomServerException("unexpected return type from services.list");
45502
+ }
45503
+ const liveness = value["liveness"];
45504
+ const livenessStatus = value["liveness_status"];
45505
+ const lastError = value["last_error"];
45506
+ return {
45507
+ num,
45508
+ liveness: typeof liveness === "string" ? liveness : void 0,
45509
+ livenessStatus: livenessStatus === "not_ready" || livenessStatus === "ready" ? livenessStatus : "not_configured",
45510
+ lastCheckedAt: toOptionalNumber(value["last_checked_at"]),
45511
+ lastError: typeof lastError === "string" ? lastError : void 0
45512
+ };
45513
+ }
45459
45514
  function parseServiceRuntimeState(value) {
45460
45515
  if (!isRecord(value) || typeof value["service_id"] !== "string") {
45461
45516
  throw new room_server_client_js_1.RoomServerException("unexpected return type from services.list");
@@ -45474,6 +45529,7 @@ ${newlined}
45474
45529
  lastExitAt: toOptionalNumber(value["last_exit_at"]),
45475
45530
  lastStartError: typeof value["last_start_error"] === "string" ? value["last_start_error"] : void 0,
45476
45531
  lastStartErrorAt: toOptionalNumber(value["last_start_error_at"]),
45532
+ status: parseServiceRuntimeStatus(value["status"]),
45477
45533
  events: Array.isArray(eventsRaw) ? eventsRaw.map((event) => parseServiceRuntimeEvent(event)) : []
45478
45534
  };
45479
45535
  }
@@ -45511,9 +45567,6 @@ ${newlined}
45511
45567
  return new room_server_client_js_1.RoomServerException(`unexpected return type from services.${operation}`);
45512
45568
  }
45513
45569
  async list() {
45514
- return (await this.listWithState()).services;
45515
- }
45516
- async listWithState() {
45517
45570
  const response = await this.room.invokeContent({
45518
45571
  toolkit: "services",
45519
45572
  tool: "list",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshagent/meshagent-ts-auth",
3
- "version": "0.45.7",
3
+ "version": "0.46.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.45.7",
42
+ "@meshagent/meshagent": "^0.46.0",
43
43
  "typescript": "^5.8.3"
44
44
  },
45
45
  "devDependencies": {