turnzero 0.42.0 → 0.43.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.
@@ -4027,7 +4027,6 @@ var prepareRedirected = (status) => {
4027
4027
  var prepareNotThePlatform = (status) => `The preparing call was answered HTTP ${status}, not by the platform.`;
4028
4028
  var prepareNoUpload = (status) => `The preparing call was answered HTTP ${status} with no upload the command can use: an upload id, an upload grant, an expiry, and an environment, each in its form. Nothing of the answer was printed or used.`;
4029
4029
  var PREPARE_RATE_CAPPED_UNDER_TOKEN = "Nothing was started. Run the line again after the wait the answer names.";
4030
- var GRANT_IN_LINE = new RegExp(`(?<=^|\\s)${UPLOAD_GRANT_PREFIX}[A-Za-z0-9_-]{43}(?=\\s|$)`, "g");
4031
4030
  var INSTANT_FORM3 = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,9})?Z$/;
4032
4031
  var RECORDED_HEALTH_PATH_MEMBER = "recorded_health_path";
4033
4032
  var SERVED_VERSION_MEMBER = "served_version";
@@ -4040,16 +4039,8 @@ var preparedUploadOf = (answer) => {
4040
4039
  const upload = answer.upload;
4041
4040
  if (upload === null || typeof upload !== "object" || Array.isArray(upload)) return null;
4042
4041
  if (typeof upload.id !== "string" || !UPLOAD_ID.test(upload.id)) return null;
4043
- let grant;
4044
- if (upload.grant !== void 0) {
4045
- if (typeof upload.grant !== "string" || !UPLOAD_GRANT_FORM.test(upload.grant)) return null;
4046
- grant = upload.grant;
4047
- } else {
4048
- if (typeof upload.command !== "string") return null;
4049
- const grants = upload.command.match(GRANT_IN_LINE) ?? [];
4050
- if (grants.length !== 1 || !UPLOAD_GRANT_FORM.test(grants[0])) return null;
4051
- grant = grants[0];
4052
- }
4042
+ if (typeof upload.grant !== "string" || !UPLOAD_GRANT_FORM.test(upload.grant)) return null;
4043
+ const grant = upload.grant;
4053
4044
  if (typeof upload.expires_at !== "string" || !INSTANT_FORM3.test(upload.expires_at)) return null;
4054
4045
  const environment = COMMAND_ENVIRONMENTS.find((name) => name === answer.environment);
4055
4046
  if (environment === void 0) return null;
@@ -8661,7 +8652,7 @@ var SCAFFOLD_TEMPLATE_FILES = Object.freeze({
8661
8652
  "",
8662
8653
  "// Why the AI model gave no answer, by the error the route answers with 503.",
8663
8654
  "const UNANSWERED = {",
8664
- ` allowance_drawn: "This month's AI allowance is drawn, so the model gives no answer until it resets.",`,
8655
+ ` allowance_drawn: "This month's AI allowance has been used up. Try again after it resets.",`,
8665
8656
  " allowance_unavailable: 'The platform holds no key for the AI allowance yet, so the model gives no answer now.',",
8666
8657
  " upstream_quota: 'The AI model is out of capacity now: ask again in a while.',",
8667
8658
  "};",
@@ -8682,7 +8673,7 @@ var SCAFFOLD_TEMPLATE_FILES = Object.freeze({
8682
8673
  " const response = await fetch('/__account/me');",
8683
8674
  " if (response.status === 200) return (await response.json()).user;",
8684
8675
  " if (response.status === 404) {",
8685
- ` byId('who').textContent = "This address serves no sign-in. A local run started with --sign-in and the application's hostname serves it here; otherwise sign in on the application's deployed address.";`,
8676
+ ` byId('who').textContent = "Sign-in is unavailable at this address. For a local run, start with --sign-in and the application's hostname. Otherwise sign in at the application's deployed address.";`,
8686
8677
  " return undefined;",
8687
8678
  " }",
8688
8679
  " return null;",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turnzero",
3
- "version": "0.42.0",
3
+ "version": "0.43.0",
4
4
  "type": "module",
5
5
  "description": "Deploy and run AI-built apps with Turn Zero Cloud hosting and backend services.",
6
6
  "license": "Apache-2.0",