turnzero 0.26.0 → 0.27.0
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 +50 -26
- package/package.json +1 -1
package/dist/turnzero-cloud.mjs
CHANGED
|
@@ -1354,7 +1354,7 @@ var AUTHORIZE_CREDENTIAL = Object.freeze({
|
|
|
1354
1354
|
bare: `with nothing piped, it keeps a verifier and prints the challenge and the ${MINT_TOKEN_ACTION} call that authorize this computer`
|
|
1355
1355
|
});
|
|
1356
1356
|
var AUTHORIZATION_ORIGIN_VARIABLE_LINE = `the platform's address the authorization reaches where the line names no ${DEPLOY_OPTION.origin}, and the one address beside ${DEFAULT_COMMAND_ORIGIN} and ${DEVELOPMENT_COMMAND_ORIGIN} a ${DEPLOY_OPTION.origin} may name, an address of this machine only where it names it.`;
|
|
1357
|
-
var CREDENTIAL_FILE_WORDS = `${CREDENTIAL_FILE_NAME} in a folder ${CREDENTIAL_FOLDER_NAME} under ${CONFIG_HOME_VARIABLE}, or under .config in your home folder where that is unset, readable by you alone
|
|
1357
|
+
var CREDENTIAL_FILE_WORDS = `${CREDENTIAL_FILE_NAME} in a folder ${CREDENTIAL_FOLDER_NAME} under ${CONFIG_HOME_VARIABLE}, or under .config in your home folder where that is unset, readable by you alone. On Windows it is in a folder ${WINDOWS_CREDENTIAL_FOLDER_NAME} under your profile folder, ${PROFILE_VARIABLE}. A file under ${LOCAL_APP_DATA_VARIABLE} from an older version is moved there once`;
|
|
1358
1358
|
var AUTHORIZE_AFTER_OWN_ERROR = "a token code the line carried may not have been presented, and it is live until it expires and mints nothing without this computer's verifier; where a token was minted, list_tokens from your tool shows it by its label, and revoke_token ends it";
|
|
1359
1359
|
async function authorize(call, io2) {
|
|
1360
1360
|
const origin = authorizationOriginOf(io2.env, call.named[DEPLOY_OPTION.origin], NOTHING_SENT);
|
|
@@ -1383,7 +1383,8 @@ async function authorize(call, io2) {
|
|
|
1383
1383
|
}
|
|
1384
1384
|
var AUTHORIZE_ROW = Object.freeze({
|
|
1385
1385
|
name: AUTHORIZE_SUBCOMMAND,
|
|
1386
|
-
summary: `Authorizes this computer at the platform's address in two acts around one ${MINT_TOKEN_ACTION} call your tool makes. Run with nothing piped, it keeps a verifier in this computer's credential file and prints the challenge and the call. Run with the token code the call's line pipes in, it presents the code with the verifier
|
|
1386
|
+
summary: `Authorizes this computer at the platform's address, in two acts around one ${MINT_TOKEN_ACTION} call your tool makes. Run with nothing piped, it keeps a verifier in this computer's credential file, and prints the challenge and the call. Run with the token code the call's line pipes in, it presents the code with the verifier. It then keeps the token the platform mints in the credential file, and prints authorized:. It prints no token, code, or verifier.`,
|
|
1387
|
+
example: AUTHORIZE_SUBCOMMAND,
|
|
1387
1388
|
options: AUTHORIZE_OPTIONS,
|
|
1388
1389
|
credential: AUTHORIZE_CREDENTIAL,
|
|
1389
1390
|
statuses: {
|
|
@@ -2190,7 +2191,8 @@ var EXPORT_AFTER_OWN_ERROR = `the files written so far stand under the folder, a
|
|
|
2190
2191
|
var EXPORT_DOWNLOAD_ROW = Object.freeze({
|
|
2191
2192
|
name: EXPORT_SUBCOMMAND,
|
|
2192
2193
|
acts: EXPORT_ACTS,
|
|
2193
|
-
summary: `Downloads every file of a completed export
|
|
2194
|
+
summary: `Downloads every file of a completed export: its manifest, each table's CSV, and each stored file. It runs under the download grant the ${DOWNLOAD_GRANT_ACTION} call answered. It checks each file against the length that answer states and the version the manifest names.`,
|
|
2195
|
+
example: `${EXPORT_SUBCOMMAND} ${EXPORT_ACTS[0]} ${EXPORT_OPTION.export} <application id>/<export id> ${EXPORT_OPTION.path} <folder>`,
|
|
2194
2196
|
options: EXPORT_DOWNLOAD_OPTIONS,
|
|
2195
2197
|
credential: EXPORT_DOWNLOAD_CREDENTIAL,
|
|
2196
2198
|
statuses: {
|
|
@@ -3985,7 +3987,8 @@ async function deploy(named, io2, flags = /* @__PURE__ */ new Set()) {
|
|
|
3985
3987
|
var DEPLOY_AFTER_OWN_ERROR = "the deploy may or may not have started: call read_status from your tool first, make the start-only retry a pending upload it answers carries, and run the line again only where it shows neither";
|
|
3986
3988
|
var DEPLOY_ROW = Object.freeze({
|
|
3987
3989
|
name: DEPLOY_SUBCOMMAND,
|
|
3988
|
-
summary: "
|
|
3990
|
+
summary: "Deploys the application folder, or a .zip file. It zips the folder, makes the preparing deploy call, uploads the zip under the upload grant that call answers, starts the deploy, and waits for it, printing each step and the outcome. It runs under this computer's token. A tool connected by a minted token, or a job with no tool, runs it under a minted token. With no credential, it sends nothing and prints the two routes to one: the minted token's variables first, then, where the address is admitted, the login route.",
|
|
3991
|
+
example: `${DEPLOY_SUBCOMMAND} ${DEPLOY_OPTION.application} <application id> ${DEPLOY_OPTION.path} <folder>`,
|
|
3989
3992
|
options: DEPLOY_OPTIONS,
|
|
3990
3993
|
credential: DEPLOY_CREDENTIAL,
|
|
3991
3994
|
reads: DEPLOY_READS,
|
|
@@ -4242,7 +4245,8 @@ async function check(named, io2) {
|
|
|
4242
4245
|
var CHECK_AFTER_OWN_ERROR = "a check uploads nothing and starts nothing, so run the line again";
|
|
4243
4246
|
var CHECK_ROW = Object.freeze({
|
|
4244
4247
|
name: CHECK_SUBCOMMAND,
|
|
4245
|
-
summary: `Checks a deploy before it is made,
|
|
4248
|
+
summary: `Checks a deploy before it is made, and uploads nothing. It zips the application folder as ${DEPLOY_SUBCOMMAND} does, or takes a .zip file. It asks the platform which checks of the application's state would refuse a deploy now. It also runs the deploy's own checks of the zip on this computer. It prints one refused: line for each refusal, then a last checked: line. It reads the credential ${DEPLOY_SUBCOMMAND} reads. With no credential, it sends nothing and prints the two routes to one, as ${DEPLOY_SUBCOMMAND} does.`,
|
|
4249
|
+
example: `${CHECK_SUBCOMMAND} ${CHECK_OPTION.application} <application id> ${CHECK_OPTION.path} <folder>`,
|
|
4246
4250
|
options: CHECK_OPTIONS,
|
|
4247
4251
|
credential: CHECK_CREDENTIAL,
|
|
4248
4252
|
reads: CHECK_READS,
|
|
@@ -4298,7 +4302,8 @@ async function hash(named, io2, flags = /* @__PURE__ */ new Set()) {
|
|
|
4298
4302
|
}
|
|
4299
4303
|
var HASH_ROW = Object.freeze({
|
|
4300
4304
|
name: HASH_SUBCOMMAND,
|
|
4301
|
-
summary: `Prints
|
|
4305
|
+
summary: `Prints the SHA-256 of the zip a deploy from the folder would upload, or of a .zip file's bytes. It prints ${HASH_LINE_HEAD}<hash> on the line after the version line, and no deploy needs it first. Further lines name the paths the zip left out, and any warnings. A warning flags a .zip file or a local run's output at the folder's root, or a file that looks like a key or a credential. It also flags a source file that writes inside the folder, and a manifest.json health path that no file names, not counting package files and documentation. With ${HASH_OPTION.list}, it prints one line for each file in the zip. It reads no grant and sends nothing, so a ${HASH_OPTION.origin} on the line is checked, then set aside.`,
|
|
4306
|
+
example: `${HASH_SUBCOMMAND} ${HASH_OPTION.path} <folder> ${HASH_OPTION.list}`,
|
|
4302
4307
|
options: HASH_OPTIONS,
|
|
4303
4308
|
credential: null,
|
|
4304
4309
|
statuses: { done: "the hash printed", nothing_started: "no hash was printed" },
|
|
@@ -4631,7 +4636,8 @@ async function secret(call, io2) {
|
|
|
4631
4636
|
var SECRET_ROW = Object.freeze({
|
|
4632
4637
|
name: SECRET_SUBCOMMAND,
|
|
4633
4638
|
acts: SECRET_ACTS,
|
|
4634
|
-
summary: "Stores a secret under a name, or rotates the value a name holds
|
|
4639
|
+
summary: "Stores a secret under a name, or rotates the value a name holds. It reads the value from a file, from an environment variable it names, or from a prompt at the terminal. It sends the value once to the platform, and never prints it. It runs under the secret grant the store_secret or rotate_secret call answered. With no grant piped, it runs under this computer's token.",
|
|
4640
|
+
example: `${SECRET_SUBCOMMAND} ${SECRET_ACTS[0]} ${SECRET_OPTION.name} <name> ${SECRET_OPTION.application} <application id> ${SECRET_OPTION.environment} development ${SECRET_OPTION.valueFile} <file>`,
|
|
4635
4641
|
options: SECRET_OPTIONS,
|
|
4636
4642
|
credential: SECRET_CREDENTIAL,
|
|
4637
4643
|
statuses: {
|
|
@@ -4779,7 +4785,8 @@ async function put(call, io2) {
|
|
|
4779
4785
|
}
|
|
4780
4786
|
var PUT_ROW = Object.freeze({
|
|
4781
4787
|
name: PUT_SUBCOMMAND,
|
|
4782
|
-
summary: "Uploads one file to
|
|
4788
|
+
summary: "Uploads one file to one of the application's storage areas, and prints the file as the area holds it. It runs under the upload grant the mint_upload_grant call answered.",
|
|
4789
|
+
example: `${PUT_SUBCOMMAND} ${PUT_OPTION.area} <area> ${PUT_OPTION.name} <name> ${PUT_OPTION.path} <file>`,
|
|
4783
4790
|
options: PUT_OPTIONS,
|
|
4784
4791
|
credential: PUT_CREDENTIAL,
|
|
4785
4792
|
statuses: {
|
|
@@ -5019,7 +5026,8 @@ async function localRun(call, io2) {
|
|
|
5019
5026
|
}
|
|
5020
5027
|
var RUN_ROW = Object.freeze({
|
|
5021
5028
|
name: RUN_SUBCOMMAND,
|
|
5022
|
-
summary: `Starts the application on this machine as the platform starts it
|
|
5029
|
+
summary: `Starts the application on this machine with npm start, as the platform starts it. The application gets the shell's environment, with each setting of the environment file laid over it, the file's line winning. It passes the application's output through. In it, the value of a credential setting, and a connection string that holds a password, are replaced by the setting's name between angle brackets. A value under ${RETIRED_PLATFORM_CREDENTIAL_SETTING}, the platform credential's earlier name, is replaced by <${LOCAL_RUN_SETTING.platformCredential}>. It reads no credential and sends nothing. ${RUN_BACKGROUND_SENTENCE}`,
|
|
5030
|
+
example: `${RUN_SUBCOMMAND} ${RUN_OPTION.path} <folder>`,
|
|
5023
5031
|
options: RUN_OPTIONS,
|
|
5024
5032
|
credential: null,
|
|
5025
5033
|
statuses: {
|
|
@@ -5668,7 +5676,8 @@ async function libraryTake(call, io2) {
|
|
|
5668
5676
|
var LIBRARY_ROW = Object.freeze({
|
|
5669
5677
|
name: LIBRARY_SUBCOMMAND,
|
|
5670
5678
|
acts: LIBRARY_ACTS,
|
|
5671
|
-
summary: "Takes a library entry into the project
|
|
5679
|
+
summary: "Takes a library entry into the project. It reads the entry's files from the library, and checks each file's SHA-256 and the entry's closure hash. It then writes the entry's row in the library folder's manifest.json, and replaces the entry's folder there whole. For an entry with compiled modules, it copies the entry's package.json and lib/ into the application's folder. It declares the copy where it is not declared, and runs npm install there. It reads the credential check reads. With no credential, it sends nothing and prints the two routes to one, as check does.",
|
|
5680
|
+
example: `${LIBRARY_SUBCOMMAND} ${LIBRARY_ACTS[0]} ${LIBRARY_OPTION.entry} <name> ${LIBRARY_OPTION.path} <project root>`,
|
|
5672
5681
|
options: LIBRARY_TAKE_OPTIONS,
|
|
5673
5682
|
credential: LIBRARY_CREDENTIAL,
|
|
5674
5683
|
reads: LIBRARY_READS,
|
|
@@ -5931,7 +5940,8 @@ var LOGIN_OPTIONS = Object.freeze([
|
|
|
5931
5940
|
var LOGIN_AFTER_OWN_ERROR = "the login may not have completed; where a token was minted, list_tokens from your tool shows it by its label, and revoke_token ends it; run login again to log this computer in";
|
|
5932
5941
|
var LOGIN_ROW = Object.freeze({
|
|
5933
5942
|
name: LOGIN_SUBCOMMAND,
|
|
5934
|
-
summary: `Logs this computer in at the platform's address
|
|
5943
|
+
summary: `Logs this computer in at the platform's address. It opens the platform's computer login page (${COMPUTER_LOGIN_PATH}) in your default browser, where you approve the login under your sign-in. It keeps the token the platform mints in this computer's credential file. It then reads the account the token acts as, and prints authorized: with the address, the account's sign-in address (or its id where it has none), the token's label, and its expiry. Where the browser cannot answer, it asks for the code the page shows. It prints no token, code, or verifier.`,
|
|
5944
|
+
example: LOGIN_SUBCOMMAND,
|
|
5935
5945
|
options: LOGIN_OPTIONS,
|
|
5936
5946
|
credential: null,
|
|
5937
5947
|
reads: "nothing from standard input; with the browser it waits for the page to answer on a port of this computer, and with --no-browser it reads the code the page shows from the terminal, hidden; once the token is kept, it reads the account through read_account under it",
|
|
@@ -6027,7 +6037,8 @@ async function logout(call, io2) {
|
|
|
6027
6037
|
}
|
|
6028
6038
|
var LOGOUT_ROW = Object.freeze({
|
|
6029
6039
|
name: LOGOUT_SUBCOMMAND,
|
|
6030
|
-
summary: "Ends this computer's authorization at the platform's address
|
|
6040
|
+
summary: "Ends this computer's authorization at the platform's address. It revokes the token the credential file keeps for that address, under the token itself. It removes the token and any pending request from the file, and prints logged out: with the address and the token's id. Where the platform cannot be reached or refuses, it still removes both, and names revoke_token with the id.",
|
|
6041
|
+
example: LOGOUT_SUBCOMMAND,
|
|
6031
6042
|
options: LOGOUT_OPTIONS,
|
|
6032
6043
|
credential: null,
|
|
6033
6044
|
reads: "this computer's token for the origin from its credential file, and sends it only to that origin",
|
|
@@ -6115,7 +6126,8 @@ async function whoami(call, io2) {
|
|
|
6115
6126
|
}
|
|
6116
6127
|
var WHOAMI_ROW = Object.freeze({
|
|
6117
6128
|
name: WHOAMI_SUBCOMMAND,
|
|
6118
|
-
summary: `Names the account this computer's token acts as at the platform's address
|
|
6129
|
+
summary: `Names the account this computer's token acts as at the platform's address. It reads the token the credential file keeps for the address, and makes one ${READ_ACCOUNT_ACTION} call under it. It prints the address, the account's sign-in address and id, and the token's label and expiry. With no token for the address, it sends nothing. It names the ways on with no login (deploy_files, ${AUTHORIZE_SUBCOMMAND}, and ${PROVISION_SUBCOMMAND}), then prints the login route. It prints no token.`,
|
|
6130
|
+
example: WHOAMI_SUBCOMMAND,
|
|
6119
6131
|
options: WHOAMI_OPTIONS,
|
|
6120
6132
|
credential: null,
|
|
6121
6133
|
reads: "this computer's token for the origin from its credential file, never a minted token from TURNZERO_CLOUD_MINTED_TOKEN, and sends it only to that origin",
|
|
@@ -6701,14 +6713,15 @@ async function remintAndWrite(io2, { application, envFile, origin }, userAgent,
|
|
|
6701
6713
|
}
|
|
6702
6714
|
var PROVISION_ROW = Object.freeze({
|
|
6703
6715
|
name: PROVISION_SUBCOMMAND,
|
|
6704
|
-
summary: `Re-mints an application's development platform credential, and its development database credential where
|
|
6716
|
+
summary: `Re-mints an application's development platform credential, and its development database credential where it has a development database. It then writes the local run's settings into the environment file: ${[
|
|
6705
6717
|
LOCAL_RUN_SETTING.databaseConnection,
|
|
6706
6718
|
LOCAL_RUN_SETTING.databaseConnectionLimit,
|
|
6707
6719
|
LOCAL_RUN_SETTING.platformCredential,
|
|
6708
6720
|
LOCAL_RUN_SETTING.environment,
|
|
6709
6721
|
LOCAL_RUN_SETTING.api,
|
|
6710
6722
|
LOCAL_RUN_SETTING.gatewayUrl
|
|
6711
|
-
].join(", ")}, and ${LOCAL_RUN_SETTING.application}
|
|
6723
|
+
].join(", ")}, and ${LOCAL_RUN_SETTING.application}. It writes the first two only where the application has a development database. It removes a ${RETIRED_PLATFORM_CREDENTIAL_SETTING} line, the platform credential's earlier name. It prints no credential value.`,
|
|
6724
|
+
example: `${PROVISION_SUBCOMMAND} ${PROVISION_OPTION.application} <application id>`,
|
|
6712
6725
|
options: PROVISION_OPTIONS,
|
|
6713
6726
|
credential: PROVISION_CREDENTIAL,
|
|
6714
6727
|
reads: PROVISION_READS,
|
|
@@ -6747,7 +6760,7 @@ var SCAFFOLD_TEMPLATE_FILES = Object.freeze({
|
|
|
6747
6760
|
"",
|
|
6748
6761
|
"Turn Zero Cloud serves its rules to a coding tool through its MCP server, `turnzero-cloud`, and they change with the platform, so none is repeated here.",
|
|
6749
6762
|
"",
|
|
6750
|
-
`- Where the server is not connected, connect it first. The platform's page "Connect
|
|
6763
|
+
`- Where the server is not connected, connect it first. The platform's page "Connect your AI tool" says how.`,
|
|
6751
6764
|
"- Before you change or deploy this service, read the server's `deploy` skill.",
|
|
6752
6765
|
"",
|
|
6753
6766
|
"## What you run here",
|
|
@@ -7021,7 +7034,7 @@ var SCAFFOLD_TEMPLATE_FILES = Object.freeze({
|
|
|
7021
7034
|
"",
|
|
7022
7035
|
"Turn Zero Cloud serves its rules to a coding tool through its MCP server, `turnzero-cloud`, and they change with the platform, so none is repeated here.",
|
|
7023
7036
|
"",
|
|
7024
|
-
`- Where the server is not connected, connect it first. The platform's page "Connect
|
|
7037
|
+
`- Where the server is not connected, connect it first. The platform's page "Connect your AI tool" says how.`,
|
|
7025
7038
|
"- Before you change or deploy this service, read the server's `deploy` skill.",
|
|
7026
7039
|
"",
|
|
7027
7040
|
"## What you run here",
|
|
@@ -7140,7 +7153,7 @@ var SCAFFOLD_TEMPLATE_FILES = Object.freeze({
|
|
|
7140
7153
|
"",
|
|
7141
7154
|
"Turn Zero Cloud serves its rules to a coding tool through its MCP server, `turnzero-cloud`, and they change with the platform, so none is repeated here.",
|
|
7142
7155
|
"",
|
|
7143
|
-
`- Where the server is not connected, connect it first. The platform's page "Connect
|
|
7156
|
+
`- Where the server is not connected, connect it first. The platform's page "Connect your AI tool" says how.`,
|
|
7144
7157
|
"- Before you change or deploy this service, read the server's `deploy` skill, and before you change its schedule, the server's `schedule` skill.",
|
|
7145
7158
|
"",
|
|
7146
7159
|
"## What you run here",
|
|
@@ -7346,7 +7359,7 @@ var SCAFFOLD_TEMPLATE_FILES = Object.freeze({
|
|
|
7346
7359
|
"",
|
|
7347
7360
|
"Turn Zero Cloud serves its rules to a coding tool through its MCP server, `turnzero-cloud`, and they change with the platform, so none is repeated here.",
|
|
7348
7361
|
"",
|
|
7349
|
-
`- Where the server is not connected, connect it first. The platform's page "Connect
|
|
7362
|
+
`- Where the server is not connected, connect it first. The platform's page "Connect your AI tool" says how.`,
|
|
7350
7363
|
"- Before you change or deploy this service, read the server's `deploy` skill, and before you change its sign-in or its AI call, the server's `add-sign-in` or `use-ai-allowance` skill.",
|
|
7351
7364
|
"",
|
|
7352
7365
|
"## What you run here",
|
|
@@ -9118,7 +9131,8 @@ var SCAFFOLD_AFTER_LOGIN = `Once ${LOGIN_SUBCOMMAND} has printed authorized:, ru
|
|
|
9118
9131
|
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.`;
|
|
9119
9132
|
var SCAFFOLD_ROW = Object.freeze({
|
|
9120
9133
|
name: SCAFFOLD_SUBCOMMAND,
|
|
9121
|
-
summary: `Writes a new service from a template into a project, ${SCAFFOLD_DEFAULT_TEMPLATE} where the line names no ${SCAFFOLD_OPTION.template}.
|
|
9134
|
+
summary: `Writes a new service from a template into a project, ${SCAFFOLD_DEFAULT_TEMPLATE} where the line names no ${SCAFFOLD_OPTION.template}. It writes the template's files under app/, runs npm install and npm test there, and prints the next steps. It starts a new application, and writes over no file. Some templates take library entries: database-service takes the Database entry, and web-app takes three. Such a template takes each entry as library take does, under the same credential and with the same checks, before it writes anything. It fills the manifest's packages member from the library folder's rows. With no credential, it writes nothing, and prints the login route and this line to run again once you are signed in. A template that takes no entry reads no credential.`,
|
|
9135
|
+
example: `${SCAFFOLD_SUBCOMMAND} ${SCAFFOLD_OPTION.template} database-service ${SCAFFOLD_OPTION.path} <project root>`,
|
|
9122
9136
|
options: SCAFFOLD_OPTIONS,
|
|
9123
9137
|
credential: SCAFFOLD_CREDENTIAL,
|
|
9124
9138
|
reads: SCAFFOLD_READS,
|
|
@@ -9442,7 +9456,8 @@ async function session(call, io2) {
|
|
|
9442
9456
|
}
|
|
9443
9457
|
var SESSION_ROW = Object.freeze({
|
|
9444
9458
|
name: SESSION_SUBCOMMAND,
|
|
9445
|
-
summary: `Signs a test end user in and writes the session's cookie into a file curl -b reads
|
|
9459
|
+
summary: `Signs a test end user in, and writes the session's cookie into a file curl -b reads. It makes one ${SIGN_IN_TEST_END_USER_ACTION} call under the credential ${DEPLOY_SUBCOMMAND} reads. It prints one line naming the hostname, the end user, the expiry, and the file, never the cookie's value. With no credential, it sends nothing and prints the two routes to one.`,
|
|
9460
|
+
example: `${SESSION_SUBCOMMAND} ${SESSION_OPTION.application} <application id> ${SESSION_OPTION.environment} development ${SESSION_OPTION.endUser} <end user id or label> ${SESSION_OPTION.out} <path>`,
|
|
9446
9461
|
options: SESSION_OPTIONS,
|
|
9447
9462
|
credential: SESSION_CREDENTIAL,
|
|
9448
9463
|
reads: SESSION_READS,
|
|
@@ -9516,7 +9531,8 @@ async function token(call, io2) {
|
|
|
9516
9531
|
var TOKEN_ROW = Object.freeze({
|
|
9517
9532
|
name: TOKEN_SUBCOMMAND,
|
|
9518
9533
|
acts: TOKEN_ACTS,
|
|
9519
|
-
summary: `Mints a token that is not this computer's, its value
|
|
9534
|
+
summary: `Mints a token that is not this computer's, keeping its value out of the chat, in two acts around one ${MINT_TOKEN_ACTION} call your tool makes. ${TOKEN_ACTS[0]} keeps a verifier in this computer's credential file, and prints the challenge and the call. You run ${TOKEN_ACTS[1]} yourself, in a terminal outside the AI coding tool, with the token code the call's line pipes in. It presents the code with the verifier, and prints the token's value once to standard output. Every other line goes to standard error.`,
|
|
9535
|
+
example: `${TOKEN_SUBCOMMAND} ${TOKEN_ACTS[0]}`,
|
|
9520
9536
|
options: TOKEN_OPTIONS,
|
|
9521
9537
|
credential: TOKEN_CREDENTIAL,
|
|
9522
9538
|
statuses: {
|
|
@@ -9892,9 +9908,17 @@ var usageHeadOf = (version) => `${TURNZERO_CLOUD_PACKAGE} ${version}: the Turn Z
|
|
|
9892
9908
|
var unreadNames = () => SUBCOMMANDS.filter((subcommand) => subcommand.credential === null && subcommand.reads === void 0).map((subcommand) => subcommand.name);
|
|
9893
9909
|
var unattendedNames = () => SUBCOMMANDS.filter((subcommand) => subcommand.credential?.mintedToken === true).map((subcommand) => subcommand.name);
|
|
9894
9910
|
var computerOnlyNames = () => SUBCOMMANDS.filter((subcommand) => subcommand.credential?.computerToken === true).map((subcommand) => subcommand.name);
|
|
9911
|
+
var exampleLineOf = (subcommand) => {
|
|
9912
|
+
const credential = subcommand.credential;
|
|
9913
|
+
const mustPipe = credential !== null && credential.piped !== false && credential.bare === void 0 && credential.computerToken !== true;
|
|
9914
|
+
return `${mustPipe ? `echo <${credential.grant}> | ` : ""}${SERVED} ${subcommand.example}`;
|
|
9915
|
+
};
|
|
9895
9916
|
var sectionLinesOf = (subcommand) => [
|
|
9896
9917
|
`${namedWithActs(subcommand)}: ${subcommand.summary}`,
|
|
9897
9918
|
"",
|
|
9919
|
+
"Example:",
|
|
9920
|
+
` ${exampleLineOf(subcommand)}`,
|
|
9921
|
+
"",
|
|
9898
9922
|
"Options:",
|
|
9899
9923
|
...subcommand.options.flatMap((option) => [` ${shown(option)}${option.required ? " (required)" : ""}`, ` ${option.description}`]),
|
|
9900
9924
|
""
|
|
@@ -9911,7 +9935,7 @@ var noCredentialLine = () => {
|
|
|
9911
9935
|
const unread = unreadNames();
|
|
9912
9936
|
return ` The command takes no credential in its arguments, and ${listed(unread)} ${unread.length === 1 ? "reads" : "read"} none.`;
|
|
9913
9937
|
};
|
|
9914
|
-
var mintedTokenVariableLine = () => ` ${MINTED_TOKEN_VARIABLE} under ${listed(unattendedNames())}, a minted token for a tool connected by a minted token or an unattended run
|
|
9938
|
+
var mintedTokenVariableLine = () => ` ${MINTED_TOKEN_VARIABLE} under ${listed(unattendedNames())}, a minted token for a tool connected by a minted token, or for an unattended run. Set it for the one line, from where the tool keeps it or from your CI's secret store. Where it is set, it wins over this computer's credential file.`;
|
|
9915
9939
|
var originVariableLine = () => {
|
|
9916
9940
|
const computerOnly = computerOnlyNames();
|
|
9917
9941
|
return ` ${ORIGIN_VARIABLE} under ${listed(unattendedNames())}, in an unattended run, the platform's address the minted token is sent to where the line names no ${DEPLOY_OPTION.origin}. Under the token, a ${DEPLOY_OPTION.origin} the line names must be that address, or ${DEFAULT_COMMAND_ORIGIN} where this variable is unset. Where ${MINTED_TOKEN_VARIABLE} is not set and the line names no ${DEPLOY_OPTION.origin}, this variable names the address whose token the command reads from this computer's credential file${computerOnly.length > 0 ? `, under ${listed(computerOnly)} too where no grant is piped` : ""}. A run under a grant does not read it.`;
|
|
@@ -9928,7 +9952,7 @@ var usageBlockOf = (subcommandHelp) => [
|
|
|
9928
9952
|
...subcommandHelp ? [` ${SERVED} <subcommand> --help`] : []
|
|
9929
9953
|
];
|
|
9930
9954
|
var sharedSentenceLines = () => [WINDOWS_SENTENCE, "", NPX_FORM_SENTENCE, "", QUOTED_PATH_SENTENCE];
|
|
9931
|
-
var SUBCOMMAND_HELP_SENTENCE = `Run ${SERVED} <subcommand> --help for that subcommand's options, credential, variables, statuses, and notes.`;
|
|
9955
|
+
var SUBCOMMAND_HELP_SENTENCE = `Run ${SERVED} <subcommand> --help for that subcommand's example, options, credential, variables, statuses, and notes.`;
|
|
9932
9956
|
var SHARED_HELP_SENTENCE = `Run ${SERVED} --help for every subcommand and the sentences they share: a line's Windows form, its npx form, and a path between double quotes.`;
|
|
9933
9957
|
var shortUsageText = (version = commandVersion()) => [
|
|
9934
9958
|
usageHeadOf(version),
|
|
@@ -9962,8 +9986,8 @@ var subcommandHelpText = (name, version = commandVersion()) => {
|
|
|
9962
9986
|
const subcommand = SUBCOMMANDS.find((entry) => entry.name === name);
|
|
9963
9987
|
return subcommand === void 0 ? null : subcommandHelpOf(subcommand, version);
|
|
9964
9988
|
};
|
|
9965
|
-
var grantArgumentSentence = () => "An argument holds a grant
|
|
9966
|
-
var tokenArgumentSentence = () => `An argument holds a minted token
|
|
9989
|
+
var grantArgumentSentence = () => "An argument holds a grant. The command never takes a grant from its arguments: it reads the grant from standard input, as the line your tool's call answers pipes it in. Run the line the call answered as given. Nothing was sent and nothing was started.";
|
|
9990
|
+
var tokenArgumentSentence = () => `An argument holds a minted token. The command never takes a credential from its arguments: it reads a minted token from ${MINTED_TOKEN_VARIABLE} alone. A tool connected by a minted token, or an unattended run, sets that variable for the one line, from where the tool keeps the token or from your CI's secret store. Nothing was sent and nothing was started.`;
|
|
9967
9991
|
var NOTHING_STARTED2 = "Nothing was started.";
|
|
9968
9992
|
var unquoted = (value) => value.length >= 2 && value.startsWith('"') && value.endsWith('"') ? value.slice(1, -1) : value;
|
|
9969
9993
|
var quoteInPathSentence = (name) => `${name} names a path, and its value holds a double quote, which no path on Windows holds. The usual cause is a path written with a backslash before its closing quote, which cmd and Windows PowerShell 5.1 read as keeping the quote, joining the arguments after it into the value. Write the path with no backslash at its end. ${NOTHING_STARTED2}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "turnzero",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
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",
|