turnzero 0.34.0 → 0.34.1
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/dist/turnzero-cloud.mjs +14 -2
- package/package.json +1 -1
package/dist/turnzero-cloud.mjs
CHANGED
|
@@ -6479,7 +6479,19 @@ var whoamiLinesOf = (origin, account, entry) => [
|
|
|
6479
6479
|
`${WHOAMI_LINE_HEADS.token}label ${entry.label !== null ? JSON.stringify(entry.label) : "none"}, expiring ${entry.expires_at !== null ? `at ${entry.expires_at}` : "never"}`
|
|
6480
6480
|
];
|
|
6481
6481
|
var noComputerTokenSentence = (origin, expiredAt) => expiredAt === null ? `This computer's credential file holds no token for ${origin}, so nothing was sent.` : `This computer's token for ${origin} in its credential file expired at ${expiredAt}, so nothing was sent.`;
|
|
6482
|
-
var
|
|
6482
|
+
var ROUTE_NEEDS = Object.freeze({ connection: "Needs a signed-in connection", nothing: "Needs nothing in your tool" });
|
|
6483
|
+
var ROUTE_LINE_INDENT = " ";
|
|
6484
|
+
var noLoginRoutesLines = (origin) => [
|
|
6485
|
+
"With no signed-in Turn Zero connection in your AI coding tool, only the last route below works: the person's login.",
|
|
6486
|
+
"Your tool's own sign-in is not this computer's credential. The routes, each opening with what it needs:",
|
|
6487
|
+
...[
|
|
6488
|
+
`${ROUTE_NEEDS.connection}, for regular use where this command works: authorize this computer with ${AUTHORIZE_SUBCOMMAND}${originWordsOf(origin)}.`,
|
|
6489
|
+
`${ROUTE_NEEDS.connection}, for a first simple test or where this command cannot work: deploy through deploy_files, within its caps.`,
|
|
6490
|
+
`${ROUTE_NEEDS.connection}, past deploy_files' caps or for a file it cannot carry, where this command cannot run: upload a zip with mint_upload_grant, then name it as deploy's artifact.`,
|
|
6491
|
+
`${ROUTE_NEEDS.connection}, to set up a local run: ${PROVISION_SUBCOMMAND}${originWordsOf(origin)} run with nothing piped prints the call that answers its line.`,
|
|
6492
|
+
`${ROUTE_NEEDS.nothing}: the person's login, below.`
|
|
6493
|
+
].map((line) => `${ROUTE_LINE_INDENT}${line}`)
|
|
6494
|
+
];
|
|
6483
6495
|
var whoamiAfterLoginSentence = (whoami2) => `Once login has printed authorized:, run ${whoami2} again.`;
|
|
6484
6496
|
async function whoami(call, io2) {
|
|
6485
6497
|
const origin = entryOriginOf(io2.env, call.named[DEPLOY_OPTION.origin], NOTHING_SENT_OR_READ);
|
|
@@ -6503,12 +6515,12 @@ async function whoami(call, io2) {
|
|
|
6503
6515
|
const expired2 = entry !== void 0 && entry.expires_at !== null && Date.parse(entry.expires_at) <= io2.clock().getTime();
|
|
6504
6516
|
if (entry === void 0 || expired2) {
|
|
6505
6517
|
io2.print(noComputerTokenSentence(origin.origin, entry === void 0 ? null : entry.expires_at));
|
|
6506
|
-
io2.print(noLoginRoutesSentence(origin.origin));
|
|
6507
6518
|
const reached = authorizationOriginOf(io2.env, call.named[DEPLOY_OPTION.origin], NOTHING_SENT_OR_READ);
|
|
6508
6519
|
if ("refusal" in reached) {
|
|
6509
6520
|
io2.print(reached.refusal);
|
|
6510
6521
|
return COMMAND_STATUS.nothing_started;
|
|
6511
6522
|
}
|
|
6523
|
+
for (const line of noLoginRoutesLines(origin.origin)) io2.print(line);
|
|
6512
6524
|
io2.print(LOGIN_ROUTE_OPENER);
|
|
6513
6525
|
for (const line of loginLinesFor(io2, reached.origin)) io2.print(line);
|
|
6514
6526
|
io2.print(HAND_OVER_SENTENCE);
|