@rebasepro/cli 0.11.0 → 0.11.1-canary.gf2b0ff7

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.
@@ -35,6 +35,26 @@ export declare function describeStorageState(state: StorageState | undefined): s
35
35
  * type; the verdict appears once there is one.
36
36
  */
37
37
  export declare function describeDatabaseState(db: Record<string, unknown> | undefined): string | undefined;
38
+ /**
39
+ * One line describing what engine is serving this project.
40
+ *
41
+ * Three numbers are in play and they are easy to conflate — I have watched it
42
+ * happen. The **runtime version** (`1.2.0`) is the contract line a bundle's
43
+ * range resolves against; its major IS the contract major. The **framework
44
+ * version** (`0.11.0`) is the `@rebasepro` release the runtime image ships. They
45
+ * move independently on purpose: tying the contract line to the framework would
46
+ * make `^1` become `^0.11`, and pre-1.0 caret is restrictive, so every framework
47
+ * minor would fall outside every project's range and force a rebuild to receive
48
+ * an engine upgrade — the opposite of what the bundle/runtime split is for.
49
+ *
50
+ * So both are printed, rather than leaving anyone to infer one from a Docker tag.
51
+ */
52
+ export declare function describeRuntime(project: {
53
+ runtimeMode?: string | null;
54
+ runtimeVersion?: string | null;
55
+ runtimeFrameworkVersion?: string | null;
56
+ runtimeVersionPin?: string | null;
57
+ }): string;
38
58
  export declare function statusCommand(rawArgs: string[]): Promise<void>;
39
59
  export declare function metricsCommand(rawArgs: string[]): Promise<void>;
40
60
  export declare function webhooksCommand(subcommand: string | undefined, rawArgs: string[]): Promise<void>;
package/dist/index.es.js CHANGED
@@ -8346,6 +8346,27 @@ function describeDatabaseState(db) {
8346
8346
  if (connection === "connected" || connection === "failed") return `${type} (${colorStatus(connection)})`;
8347
8347
  return `${type} ${chalk.gray("· not tested (`rebase cloud db test`)")}`;
8348
8348
  }
8349
+ /**
8350
+ * One line describing what engine is serving this project.
8351
+ *
8352
+ * Three numbers are in play and they are easy to conflate — I have watched it
8353
+ * happen. The **runtime version** (`1.2.0`) is the contract line a bundle's
8354
+ * range resolves against; its major IS the contract major. The **framework
8355
+ * version** (`0.11.0`) is the `@rebasepro` release the runtime image ships. They
8356
+ * move independently on purpose: tying the contract line to the framework would
8357
+ * make `^1` become `^0.11`, and pre-1.0 caret is restrictive, so every framework
8358
+ * minor would fall outside every project's range and force a rebuild to receive
8359
+ * an engine upgrade — the opposite of what the bundle/runtime split is for.
8360
+ *
8361
+ * So both are printed, rather than leaving anyone to infer one from a Docker tag.
8362
+ */
8363
+ function describeRuntime(project) {
8364
+ if (project.runtimeMode !== "managed") return `custom ${chalk.gray("· your own image")}`;
8365
+ const version = project.runtimeVersion ?? "unknown";
8366
+ const framework = project.runtimeFrameworkVersion;
8367
+ const pin = project.runtimeVersionPin ? chalk.gray(` · pinned to ${project.runtimeVersionPin}`) : "";
8368
+ return `managed ${version}${framework ? chalk.gray(` · framework ${framework}`) : ""}${pin}`;
8369
+ }
8349
8370
  async function statusCommand(rawArgs) {
8350
8371
  const { client, url } = await requireClient(rawArgs);
8351
8372
  const projectId = await requireProject(rawArgs, client);
@@ -8371,6 +8392,7 @@ async function statusCommand(rawArgs) {
8371
8392
  ["URL", projectHost(project, baseDomain)],
8372
8393
  ["Branch", project.gitBranch],
8373
8394
  ["Last deploy", deploy ? `${colorStatus(deploy.status)} · ${fmtDate(deploy.createdAt)}` : "never"],
8395
+ ["Runtime", describeRuntime(project)],
8374
8396
  ["Database", databaseLine],
8375
8397
  ["Storage", storageLine]
8376
8398
  ]);
@@ -8387,6 +8409,14 @@ async function statusCommand(rawArgs) {
8387
8409
  status: deploy.status ?? null,
8388
8410
  createdAt: deploy.createdAt ?? null
8389
8411
  } : null,
8412
+ runtime: {
8413
+ mode: project.runtimeMode ?? "custom",
8414
+ version: project.runtimeVersion ?? null,
8415
+ frameworkVersion: project.runtimeFrameworkVersion ?? null,
8416
+ contract: project.runtimeContract ?? null,
8417
+ range: project.runtimeRange ?? null,
8418
+ pin: project.runtimeVersionPin ?? null
8419
+ },
8390
8420
  database: db ? {
8391
8421
  type: db.type ?? null,
8392
8422
  connectionStatus: db.connectionStatus ?? null