turnzero 0.21.1 → 0.21.2-next.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.
@@ -4863,11 +4863,11 @@ var LIBRARY_CREDENTIAL = Object.freeze({
4863
4863
  var LIBRARY_READS = `no standard input: a minted token from ${MINTED_TOKEN_VARIABLE} where it is set, and otherwise this computer's token for the platform's address from its credential file, which ${LOGIN_SUBCOMMAND} and ${AUTHORIZE_SUBCOMMAND} write, sent only to that address; with neither, it prints the variable route first and then, where the address is admitted, the login route`;
4864
4864
  var TAKE_AFTER_LOGIN = `Once ${LOGIN_SUBCOMMAND} has printed authorized:, run this take line again. ${NOTHING_WRITTEN2}`;
4865
4865
  var takeRedirectedLine = (status) => `${LIBRARY_READ_ACTION} was answered ${status >= 100 ? `${answeredHow(status)}, a redirect` : answeredHow(status)}, which the command never follows, so the credential was sent to no second address. ${NOTHING_WRITTEN2}`;
4866
- async function readTakeCredential(io2, named, afterLogin) {
4866
+ async function readTakeCredential(io2, named, afterLogin, why) {
4867
4867
  const line = { named, closing: NOTHING_WRITTEN2 };
4868
4868
  const read2 = await readCredential(io2, LIBRARY_CREDENTIAL, "", line);
4869
4869
  if ("unauthorized" in read2) {
4870
- const lines = [noTokenSentence(read2.unauthorized.origin, read2.unauthorized.expiredAt), VARIABLE_ROUTE_SENTENCES];
4870
+ const lines = [noTokenSentence(read2.unauthorized.origin, read2.unauthorized.expiredAt), ...why !== void 0 ? [why] : [], VARIABLE_ROUTE_SENTENCES];
4871
4871
  const origin = authorizationOriginOf(io2.env, named, NOTHING_WRITTEN2);
4872
4872
  if ("refusal" in origin) return { lines: [...lines, origin.refusal] };
4873
4873
  const unwritable = loginRouteRefusalOf(io2, NOTHING_WRITTEN2);
@@ -8690,7 +8690,7 @@ async function scaffold(call, io2) {
8690
8690
  if ("lines" in found) return refuse(...found.lines);
8691
8691
  held = found;
8692
8692
  } else {
8693
- const credential = await readTakeCredential(io2, call.named[SCAFFOLD_OPTION.origin], SCAFFOLD_AFTER_LOGIN);
8693
+ const credential = await readTakeCredential(io2, call.named[SCAFFOLD_OPTION.origin], SCAFFOLD_AFTER_LOGIN, SCAFFOLD_SIGN_IN_WHY);
8694
8694
  if ("lines" in credential) return refuse(...credential.lines);
8695
8695
  lineOrigin = credential.origin;
8696
8696
  takeLines = takeLinesFor(lineOrigin);
@@ -8783,6 +8783,7 @@ async function installAndTest(io2, app, template, taken, origin, left) {
8783
8783
  var SCAFFOLD_CREDENTIAL = LIBRARY_CREDENTIAL;
8784
8784
  var SCAFFOLD_READS = `under a template that takes library entries what library take reads, ${LIBRARY_READS}; and under a template that takes none, no credential`;
8785
8785
  var SCAFFOLD_AFTER_LOGIN = `Once ${LOGIN_SUBCOMMAND} has printed authorized:, run this scaffold line again. ${NOTHING_WRITTEN2}`;
8786
+ var SCAFFOLD_SIGN_IN_WHY = `A template that takes library entries needs a sign-in, since the library's reads are under a credential; ${SCAFFOLD_DEFAULT_TEMPLATE}, which takes none, runs without one.`;
8786
8787
  var SCAFFOLD_ROW = Object.freeze({
8787
8788
  name: SCAFFOLD_SUBCOMMAND,
8788
8789
  summary: `Writes a new service from a template into a project, ${SCAFFOLD_DEFAULT_TEMPLATE} where the line names no ${SCAFFOLD_OPTION.template}. A template that takes library entries, as database-service takes the Database entry and web-app takes three, takes each as library take does, under the credential library take reads, checking each file's SHA-256 and each entry's closure hash before it writes anything. It then writes the template's files under app/, the manifest's packages member filled from the library folder's rows, runs npm install and npm test there, and prints the next steps. It starts a new application and writes over none. A template that takes no entry reads no credential.`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turnzero",
3
- "version": "0.21.1",
3
+ "version": "0.21.2-next.1",
4
4
  "type": "module",
5
5
  "description": "The Turn Zero Cloud command, which an AI coding tool runs on your machine to deploy an application, store a secret, upload a file, download an export, take a library entry, write a local run's settings, start the application locally, and scaffold a new service from a template.",
6
6
  "license": "Apache-2.0",