@cardelli/ambit 0.2.2 → 0.2.3

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.
@@ -75,8 +75,7 @@ const stageTailscaleConfig = async (out, opts) => {
75
75
  .text(` you're a part of in the Tailscale dashboard:`)
76
76
  .link(" https://login.tailscale.com/admin/acls/visual/tags")
77
77
  .blank()
78
- .dim(" Or you can do it manually in the JSON editor:")
79
- .link(" https://login.tailscale.com/admin/acls/file")
78
+ .dim(" Or you can do it manually with this JSON config:")
80
79
  .dim(` "tagOwners": { "${opts.tag}": ["autogroup:admin"] }`)
81
80
  .blank();
82
81
  return out.die(`Set Up ${opts.tag} in Tailscale, Then Try Again`);
@@ -88,15 +87,15 @@ const stageTailscaleConfig = async (out, opts) => {
88
87
  if (!hasApprover) {
89
88
  approverSpinner.fail(`Auto-approve Not Configured for ${opts.tag}`);
90
89
  out.blank()
91
- .text(" In JSON mode, ambit can't interactively approve subnet routes.")
92
- .text(` Add an autoApprovers rule so Tailscale automatically trusts`)
93
- .text(` routes advertised by ${opts.tag}:`)
94
- .blank()
95
- .dim(" https://login.tailscale.com/admin/acls/file")
90
+ .text(" In JSON mode, ambit can't interactively approve the router's")
91
+ .text(` network connections. You can set this up from the Tailscale dashboard:`)
92
+ .link(" https://login.tailscale.com/admin/acls/visual/auto-approvers")
93
+ .dim(` Route: ${FLY_PRIVATE_SUBNET} Owner: ${opts.tag}`)
96
94
  .blank()
95
+ .dim(" Or you can do it manually with this JSON config:")
97
96
  .dim(` "autoApprovers": { "routes": { "${FLY_PRIVATE_SUBNET}": ["${opts.tag}"] } }`)
98
97
  .blank();
99
- return out.die(`Add autoApprovers for ${opts.tag} to Use --json`);
98
+ return out.die(`Set Up Auto-approve for ${opts.tag} to Use --json`);
100
99
  }
101
100
  approverSpinner.success(`Auto-approve Configured for ${opts.tag}`);
102
101
  }
@@ -184,7 +183,6 @@ const stageSummary = async (out, fly, tailscale, ctx, opts) => {
184
183
  .dim(` Route: ${ctx.subnet} Owner: ${opts.tag}`)
185
184
  .blank()
186
185
  .dim(" Or you can do it manually with this JSON config:")
187
- .link(" https://login.tailscale.com/admin/acls/file")
188
186
  .dim(` "autoApprovers": { "routes": { "${ctx.subnet}": ["${opts.tag}"] } }`);
189
187
  if (opts.shouldApprove) {
190
188
  out.blank().dim(" Traffic Was Allowed via API for This Session.");
@@ -199,7 +197,6 @@ const stageSummary = async (out, fly, tailscale, ctx, opts) => {
199
197
  .dim(` Source: group:YOUR_GROUP Destination: ${opts.tag}:*`)
200
198
  .blank()
201
199
  .dim(" Or you can do it manually with this JSON config:")
202
- .link(" https://login.tailscale.com/admin/acls/file")
203
200
  .dim(` {"action": "accept", "src": ["group:YOUR_GROUP"], "dst": ["${opts.tag}:53"]}`)
204
201
  .dim(` {"action": "accept", "src": ["group:YOUR_GROUP"], "dst": ["${ctx.subnet}:*"]}`)
205
202
  .blank();
@@ -1 +1 @@
1
- {"version":3,"file":"machine.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/create/machine.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAQhD,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,2BAA2B,CAAC;AASnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAOrE,MAAM,MAAM,WAAW,GACnB,YAAY,GACZ,eAAe,GACf,cAAc,GACd,gBAAgB,GAChB,eAAe,GACf,eAAe,GACf,UAAU,CAAC;AAMf,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IACxD,MAA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eAAe,GACf,eAAe,GACf,UAAU,CAAC;AAMf,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IACxD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,WAAW,CAAC;IACjB,SAAS,EAAE,iBAAiB,CAAC;IAC7B,GAAG,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAeD,eAAO,MAAM,aAAa,GACxB,KAAK,MAAM,CAAC,YAAY,CAAC,EACzB,YAAY,WAAW,SAMxB,CAAC;AAMF,eAAO,MAAM,aAAa,GACxB,KAAK,SAAS,KACb,OAAO,CAAC,WAAW,CA4BrB,CAAC;AAMF,eAAO,MAAM,gBAAgB,GAC3B,OAAO,WAAW,EAClB,KAAK,SAAS,KACb,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAgH7B,CAAC"}
@@ -83,19 +83,21 @@ export const createTransition = async (phase, ctx) => {
83
83
  [SECRET_ROUTER_ID]: ctx.routerId,
84
84
  }, { stage: true }));
85
85
  const dockerDir = ROUTER_DOCKER_DIR;
86
+ const deploySpinner = ctx.out.spinner("Deploying Router to Fly.io");
86
87
  try {
87
88
  await ctx.fly.deploy.router(ctx.appName, dockerDir, {
88
89
  region: ctx.region,
89
90
  });
90
91
  }
91
92
  catch (e) {
93
+ deploySpinner.fail("Router Deploy Failed");
92
94
  if (e instanceof FlyDeployError) {
93
95
  ctx.out.dim(` ${e.detail}`);
94
96
  return Result.err(e.message);
95
97
  }
96
98
  throw e;
97
99
  }
98
- ctx.out.ok("Router Deployed");
100
+ deploySpinner.success("Router Deployed");
99
101
  const machines = await ctx.fly.machines.list(ctx.appName);
100
102
  const m = machines.find((m) => m.private_ip);
101
103
  if (m?.private_ip)
@@ -1 +1 @@
1
- {"version":3,"file":"machine.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/deploy/machine.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACvB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM/C,MAAM,MAAM,WAAW,GACnB,YAAY,GACZ,WAAW,GACX,QAAQ,GACR,OAAO,GACP,UAAU,CAAC;AAMf,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE;QACL,mBAAmB,EAAE,MAAM,CAAC;QAC5B,aAAa,EAAE,MAAM,CAAC;QACtB,mBAAmB,EAAE,KAAK,CAAC;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QACjE,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;IACF,SAAS,EAAE;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;CACH,CAAC;AAEF,MAAM,WAAW,SAAS;IACxB,GAA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AC;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QACjE,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;CACH;AAaD,eAAO,MAAM,mBAAmB,GAC9B,KAAK,MAAM,CAAC,YAAY,CAAC,EACzB,YAAY,WAAW,SAMxB,CAAC;AAMF,eAAO,MAAM,aAAa,GACxB,KAAK,SAAS,KACb,OAAO,CAAC,WAAW,CAMrB,CAAC;AAMF,eAAO,MAAM,gBAAgB,GAC3B,OAAO,WAAW,EAClB,KAAK,SAAS,KACb,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CA2G7B,CAAC"}
@@ -67,11 +67,13 @@ export const deployTransition = async (phase, ctx) => {
67
67
  return Result.ok("deploy");
68
68
  }
69
69
  case "deploy": {
70
- ctx.out.blank().dim("Deploying with --no-public-ips --flycast ...");
70
+ ctx.out.blank();
71
+ const deploySpinner = ctx.out.spinner("Deploying to Fly.io");
71
72
  try {
72
73
  await ctx.fly.deploy.app(ctx.app, ctx.deployOptions);
73
74
  }
74
75
  catch (e) {
76
+ deploySpinner.fail("Deploy Failed");
75
77
  if (e instanceof FlyDeployError) {
76
78
  ctx.out.dim(` ${e.detail}`);
77
79
  return Result.err(e.message);
@@ -88,7 +90,7 @@ export const deployTransition = async (phase, ctx) => {
88
90
  }
89
91
  }
90
92
  }
91
- ctx.out.ok("Deploy Succeeded");
93
+ deploySpinner.success("Deploy Succeeded");
92
94
  return Result.ok("audit");
93
95
  }
94
96
  case "audit": {
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "@cardelli/ambit",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Deploy apps to the cloud that only you and your AI agents can reach",
5
5
  "license": "MIT",
6
6
  "tasks": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cardelli/ambit",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Deploy apps to the cloud that only you and your AI agents can reach",
5
5
  "license": "MIT",
6
6
  "scripts": {},