nimblybase 0.1.9 → 0.1.10

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.
Files changed (3) hide show
  1. package/README.md +4 -1
  2. package/dist/index.js +15 -10
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -122,7 +122,10 @@ cannot be combined with `--authorize`.
122
122
  If approval is denied or fails, the project and link are retained. Retry
123
123
  `nimbly login` with the API printed by the CLI; do not recreate the project.
124
124
  A returning repository grant uses read endpoints for `nimbly init`, so it does
125
- not need workspace creation permission or another browser approval.
125
+ not need workspace creation permission or another browser approval. Its JSON
126
+ keeps the shared ready/provisioning/attention-required status and next actions;
127
+ paused projects direct the agent to diagnosis, and default provisioning waits
128
+ remain in effect.
126
129
 
127
130
  ## Scripting
128
131
 
package/dist/index.js CHANGED
@@ -378,7 +378,7 @@ function when(iso) {
378
378
 
379
379
  // src/api.ts
380
380
  var DEFAULT_API_URL = "https://api-uat.nimblybase.com";
381
- var VERSION = "0.1.9";
381
+ var VERSION = "0.1.10";
382
382
  function dashboardUrl(api) {
383
383
  const match = /^https:\/\/api(-[a-z0-9]+)?\.(.+)$/.exec(api);
384
384
  return match ? `https://app${match[1] ?? ""}.${match[2]}` : null;
@@ -7918,19 +7918,24 @@ async function init(flags, name) {
7918
7918
  await assertMayCreateLink(root, { relink: flags.relink });
7919
7919
  }
7920
7920
  if (ctx.credentialScope === "repository" && !name) {
7921
- const project = await resolveProject(ctx, explicitProject ?? linkedProject);
7921
+ const initial = await resolveProject(ctx, explicitProject ?? linkedProject);
7922
+ const project = flags.wait === false ? initial : await waitForActive(ctx, initial);
7922
7923
  const backend = await ctx.client.describeProject(project.id);
7924
+ const status4 = project.status === "active" ? "ready" : project.status === "provisioning" ? "provisioning" : "attention_required";
7925
+ const result2 = { status: status4, project, backend, nextActions: status4 === "ready" ? [
7926
+ { code: "inspect_backend", command: "nimbly describe", description: "Inspect available services before designing the backend." },
7927
+ { code: "plan_schema", command: "nimbly db status", description: "Inspect the schema before applying changes." }
7928
+ ] : status4 === "provisioning" ? [
7929
+ { code: "wait_for_project", command: `nimbly project ${project.slug}`, description: "Wait for the project to become active." }
7930
+ ] : [
7931
+ { code: "diagnose_project", command: `nimbly diagnose ${project.slug}`, description: `The project is ${project.status}; inspect before using it.` }
7932
+ ] };
7923
7933
  if (isJsonMode()) {
7924
- json({
7925
- status: project.status === "active" ? "ready" : project.status,
7926
- project,
7927
- backend,
7928
- linkedTo: ctx.link?.path ?? null,
7929
- authorization: { state: "authorized", projectId: project.id }
7930
- });
7934
+ json({ ...result2, linkedTo: ctx.link?.path ?? null, authorization: { state: "authorized", projectId: project.id } });
7931
7935
  } else {
7932
7936
  out(`${paint("green", "\u2713")} ${project.slug} is ${statusPaint(project.status)}`);
7933
- note("This repository is already authorized. Next: nimbly describe.");
7937
+ note("This repository is already authorized.");
7938
+ for (const action of result2.nextActions) note(`Next: ${action.command} \u2014 ${action.description}`);
7934
7939
  }
7935
7940
  return;
7936
7941
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nimblybase",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "The NimblyBase command line - projects, keys and backends from a terminal.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {