@kimchi-dev/kimchictl 0.0.7 → 0.0.9

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.
@@ -323,11 +323,11 @@ describe("kimchictl workspace list", () => {
323
323
  expect(code).toBe(0)
324
324
  // formatTable prints the whole table as one console call.
325
325
  const table = lines[0]?.split("\n") ?? []
326
- expect(table[0]).toMatch(/^NAME\s+STATUS\s+CLUSTER\s+AGE\s+CPU\s+RAM\s+PVC\s+URI$/)
326
+ expect(table[0]).toMatch(/^NAME\s+STATUS\s+CLUSTER\s+TEMPLATE\s+AGE\s+CPU\s+RAM\s+PVC\s+URI$/)
327
327
  expect(table[1]).toMatch(
328
- /^bright-oak-otter\s+active\s+krep-us\s+3h\s+2\s+4Gi\s+20Gi\s+bright-oak-otter\.remote\.kimchi\.dev$/,
328
+ /^bright-oak-otter\s+active\s+krep-us\s+-\s+3h\s+2\s+4Gi\s+20Gi\s+bright-oak-otter\.remote\.kimchi\.dev$/,
329
329
  )
330
- expect(table[2]).toMatch(/^demo\s+suspended\s+krep-us\s+2d\s+-\s+-\s+-\s+demo\.remote\.kimchi\.dev$/)
330
+ expect(table[2]).toMatch(/^demo\s+suspended\s+krep-us\s+-\s+2d\s+-\s+-\s+-\s+demo\.remote\.kimchi\.dev$/)
331
331
  expect(table).toHaveLength(3)
332
332
  })
333
333
 
@@ -338,7 +338,7 @@ describe("kimchictl workspace list", () => {
338
338
  expect(JSON.parse(jsonRun.lines.join(""))).toEqual([])
339
339
 
340
340
  const tableRun = await run(["list"], fetch)
341
- expect(tableRun.lines).toEqual(["NAME STATUS CLUSTER AGE CPU RAM PVC URI"])
341
+ expect(tableRun.lines).toEqual(["NAME STATUS CLUSTER TEMPLATE AGE CPU RAM PVC URI"])
342
342
  })
343
343
 
344
344
  it("rejects an unsupported output flavor", async () => {
@@ -263,13 +263,14 @@ async function runList(args: string[], deps: WorkspaceDeps): Promise<number> {
263
263
  w.alias,
264
264
  w.status,
265
265
  w.cluster,
266
+ w.templateName || "-",
266
267
  formatAge(w.createdAt, now),
267
268
  formatMillicores(w.cpuMillicores),
268
269
  formatBytes(w.ramBytes),
269
270
  formatBytes(w.pvcSizeBytes),
270
271
  w.uri ?? "",
271
272
  ])
272
- console.log(formatTable(["NAME", "STATUS", "CLUSTER", "AGE", "CPU", "RAM", "PVC", "URI"], rows))
273
+ console.log(formatTable(["NAME", "STATUS", "CLUSTER", "TEMPLATE", "AGE", "CPU", "RAM", "PVC", "URI"], rows))
273
274
  return 0
274
275
  }
275
276
 
@@ -371,6 +372,7 @@ function renderWorkspaceCard(
371
372
  const meta = [
372
373
  workspace.cluster ? `cluster ${workspace.cluster}` : "",
373
374
  workspace.clientType,
375
+ workspace.templateName ? `from ${workspace.templateName}` : "",
374
376
  `created ${formatAge(workspace.createdAt, now)} ago`,
375
377
  ].filter(Boolean)
376
378
  if (meta.length > 0) lines.push(dim(` ${meta.join(" · ")}`, color))
@@ -404,6 +406,7 @@ function serializeWorkspace(w: Workspace): Record<string, unknown> {
404
406
  status: w.status,
405
407
  ...(w.cluster ? { cluster: w.cluster } : {}),
406
408
  ...(w.clientType ? { clientType: w.clientType } : {}),
409
+ ...(w.templateName ? { templateName: w.templateName } : {}),
407
410
  ...(w.uri ? { uri: w.uri } : {}),
408
411
  createdAt: w.createdAt.getTime() > 0 ? w.createdAt.toISOString() : undefined,
409
412
  resources: {
package/src/version.ts CHANGED
@@ -3,4 +3,4 @@
3
3
  * version over this constant at build time; the committed value stays a
4
4
  * sentinel so source checkouts are recognizable.
5
5
  */
6
- export const VERSION = "0.0.7"
6
+ export const VERSION = "0.0.9"