create-orqevio 1.0.0 → 1.0.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.
Files changed (2) hide show
  1. package/dist/cli.js +47 -9
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -141,6 +141,7 @@ Deine Instanz l\xE4uft jetzt mit Orqevio ${version}: ${address}`,
141
141
  ].join("\n"),
142
142
  cannotReadRepoConfig: (detail) => `Die Datei wrangler.jsonc in diesem Ordner kann nicht gelesen werden: ${detail}`,
143
143
  badRepoName: (name) => `Der Worker-Name in wrangler.jsonc (\u201E${name}\u201C) kann nicht verwendet werden.`,
144
+ settingSetupCode: "Ein neuer Einrichtungscode wird in deiner Instanz gespeichert \u2026",
144
145
  setupCodeFailed: "\nDer Code konnte nicht ge\xE4ndert werden. Sieh dir die Meldung von Wrangler oben an.",
145
146
  recovered: (setupCode) => [
146
147
  "",
@@ -187,6 +188,7 @@ Deine Instanz l\xE4uft jetzt mit Orqevio ${version}: ${address}`,
187
188
  otherCopy: (origin, other, name) => `${origin} ist die Instanz \u201E${other}\u201C, nicht \u201E${name}\u201C.`,
188
189
  copyUnreachable: (origin, detail) => `Deine Instanz unter ${origin} war nicht erreichbar (${detail}). Es wurde nichts gel\xF6scht.`,
189
190
  authorizingCopy: "Deine Instanz wird \xFCber dein Cloudflare-Konto autorisiert; warte auf ihre Antwort (ein paar Sekunden) \u2026",
191
+ waitingForCopy: (minutes) => `Deine Instanz hat die Autorisierung noch nicht erhalten: Manchmal braucht Cloudflare ein paar Minuten. Ich warte weiter (bis zu ${minutes} Minuten); bisher wurde nichts gel\xF6scht.`,
190
192
  notThisAccount: (origin, name) => `${origin} ist nicht die Instanz \u201E${name}\u201C dieses Cloudflare-Kontos: Sie hat die Autorisierung nicht erhalten. Es wurde nichts gel\xF6scht.`,
191
193
  copyTooOld: (updateCommand) => `Deine Instanz hat eine \xE4ltere Version, die das noch nicht kann. Aktualisiere sie mit ${updateCommand} und f\xFChre diesen Befehl noch einmal aus, oder leere den Bucket in der App oder im Dashboard.`,
192
194
  copyEmptied: "Deine Instanz hat ihre Daten und Anh\xE4nge gel\xF6scht."
@@ -265,6 +267,7 @@ Your copy is updated to Orqevio ${version}: ${address}`,
265
267
  ].join("\n"),
266
268
  cannotReadRepoConfig: (detail) => `Can\u2019t read wrangler.jsonc in this folder: ${detail}`,
267
269
  badRepoName: (name) => `The Worker name in wrangler.jsonc (\u201C${name}\u201D) can\u2019t be used.`,
270
+ settingSetupCode: "Saving a new setup code in your copy\u2026",
268
271
  setupCodeFailed: "\nThe code couldn\u2019t be changed. Check Wrangler\u2019s message above.",
269
272
  recovered: (setupCode) => [
270
273
  "",
@@ -310,6 +313,7 @@ Your copy is updated to Orqevio ${version}: ${address}`,
310
313
  otherCopy: (origin, other, name) => `${origin} is the copy \u201C${other}\u201D, not \u201C${name}\u201D.`,
311
314
  copyUnreachable: (origin, detail) => `Couldn\u2019t reach your copy at ${origin} (${detail}). Nothing was deleted.`,
312
315
  authorizingCopy: "Authorizing your copy from your Cloudflare account and waiting for it to answer (a few seconds)\u2026",
316
+ waitingForCopy: (minutes) => `Your copy hasn\u2019t received the authorization yet: Cloudflare sometimes takes a few minutes. Still waiting (up to ${minutes} minutes); nothing has been deleted yet.`,
313
317
  notThisAccount: (origin, name) => `${origin} isn\u2019t the copy \u201C${name}\u201D of this Cloudflare account: it didn\u2019t receive the authorization. Nothing was deleted.`,
314
318
  copyTooOld: (updateCommand) => `Your copy is from an earlier version that can\u2019t do this. Update it with ${updateCommand} and run this command again, or empty the bucket from the app or the dashboard.`,
315
319
  copyEmptied: "Your copy deleted its data and its attachments."
@@ -388,6 +392,7 @@ Tu copia est\xE1 actualizada a Orqevio ${version}: ${address}`,
388
392
  ].join("\n"),
389
393
  cannotReadRepoConfig: (detail) => `No puedo leer wrangler.jsonc en esta carpeta: ${detail}`,
390
394
  badRepoName: (name) => `El nombre del Worker en wrangler.jsonc (\xAB${name}\xBB) no vale.`,
395
+ settingSetupCode: "Guardando un c\xF3digo de configuraci\xF3n nuevo en tu copia\u2026",
391
396
  setupCodeFailed: "\nNo se ha podido cambiar el c\xF3digo. Revisa el mensaje de Wrangler de arriba.",
392
397
  recovered: (setupCode) => [
393
398
  "",
@@ -433,6 +438,7 @@ Tu copia est\xE1 actualizada a Orqevio ${version}: ${address}`,
433
438
  otherCopy: (origin, other, name) => `${origin} es la copia \xAB${other}\xBB, no \xAB${name}\xBB.`,
434
439
  copyUnreachable: (origin, detail) => `No he podido conectar con tu copia en ${origin} (${detail}). No se ha borrado nada.`,
435
440
  authorizingCopy: "Autorizando a tu copia desde tu cuenta de Cloudflare y esperando su respuesta (unos segundos)\u2026",
441
+ waitingForCopy: (minutes) => `Tu copia todav\xEDa no ha recibido la autorizaci\xF3n: a veces Cloudflare tarda unos minutos. Sigo esperando (hasta ${minutes} minutos); no se ha borrado nada todav\xEDa.`,
436
442
  notThisAccount: (origin, name) => `${origin} no es la copia \xAB${name}\xBB de esta cuenta de Cloudflare: no ha recibido la autorizaci\xF3n. No se ha borrado nada.`,
437
443
  copyTooOld: (updateCommand) => `Tu copia es de una versi\xF3n anterior que no sabe hacer esto. Actual\xEDzala con ${updateCommand} y vuelve a ejecutar este comando, o vac\xEDa el bucket desde la app o desde el panel.`,
438
444
  copyEmptied: "Tu copia ha borrado sus datos y sus adjuntos."
@@ -511,6 +517,7 @@ Votre copie est pass\xE9e \xE0 Orqevio ${version} : ${address}`,
511
517
  ].join("\n"),
512
518
  cannotReadRepoConfig: (detail) => `Impossible de lire wrangler.jsonc dans ce dossier : ${detail}`,
513
519
  badRepoName: (name) => `Le nom du Worker dans wrangler.jsonc (\xAB ${name} \xBB) n\u2019est pas utilisable.`,
520
+ settingSetupCode: "Enregistrement d\u2019un nouveau code de configuration dans votre copie\u2026",
514
521
  setupCodeFailed: "\nImpossible de modifier le code. Lisez le message de Wrangler ci-dessus.",
515
522
  recovered: (setupCode) => [
516
523
  "",
@@ -557,6 +564,7 @@ Votre copie est pass\xE9e \xE0 Orqevio ${version} : ${address}`,
557
564
  otherCopy: (origin, other, name) => `${origin} est la copie \xAB ${other} \xBB, pas \xAB ${name} \xBB.`,
558
565
  copyUnreachable: (origin, detail) => `Impossible de joindre votre copie \xE0 ${origin} (${detail}). Rien n\u2019a \xE9t\xE9 supprim\xE9.`,
559
566
  authorizingCopy: "Autorisation de votre copie depuis votre compte Cloudflare, en attente de sa r\xE9ponse (quelques secondes)\u2026",
567
+ waitingForCopy: (minutes) => `Votre copie n\u2019a pas encore re\xE7u l\u2019autorisation : Cloudflare met parfois quelques minutes. Toujours en attente (jusqu\u2019\xE0 ${minutes} minutes) ; rien n\u2019a encore \xE9t\xE9 supprim\xE9.`,
560
568
  notThisAccount: (origin, name) => `${origin} n\u2019est pas la copie \xAB ${name} \xBB de ce compte Cloudflare : elle n\u2019a pas re\xE7u l\u2019autorisation. Rien n\u2019a \xE9t\xE9 supprim\xE9.`,
561
569
  copyTooOld: (updateCommand) => `Votre copie est d\u2019une version ant\xE9rieure qui ne sait pas le faire. Mettez-la \xE0 jour avec ${updateCommand} puis relancez cette commande, ou videz le bucket depuis l\u2019app ou le tableau de bord.`,
562
570
  copyEmptied: "Votre copie a supprim\xE9 ses donn\xE9es et ses pi\xE8ces jointes."
@@ -635,6 +643,7 @@ La tua copia \xE8 stata aggiornata a Orqevio ${version}: ${address}`,
635
643
  ].join("\n"),
636
644
  cannotReadRepoConfig: (detail) => `Non riesco a leggere wrangler.jsonc in questa cartella: ${detail}`,
637
645
  badRepoName: (name) => `Il nome del Worker in wrangler.jsonc (\xAB${name}\xBB) non si pu\xF2 usare.`,
646
+ settingSetupCode: "Salvo un nuovo codice di configurazione nella tua copia\u2026",
638
647
  setupCodeFailed: "\nNon \xE8 stato possibile cambiare il codice. Controlla il messaggio di Wrangler qui sopra.",
639
648
  recovered: (setupCode) => [
640
649
  "",
@@ -681,6 +690,7 @@ La tua copia \xE8 stata aggiornata a Orqevio ${version}: ${address}`,
681
690
  otherCopy: (origin, other, name) => `${origin} \xE8 la copia \xAB${other}\xBB, non \xAB${name}\xBB.`,
682
691
  copyUnreachable: (origin, detail) => `Non riesco a raggiungere la tua copia a ${origin} (${detail}). Non \xE8 stato eliminato niente.`,
683
692
  authorizingCopy: "Autorizzo la tua copia dal tuo account Cloudflare e aspetto la sua risposta (qualche secondo)\u2026",
693
+ waitingForCopy: (minutes) => `La tua copia non ha ancora ricevuto l\u2019autorizzazione: a volte Cloudflare impiega qualche minuto. Continuo ad aspettare (fino a ${minutes} minuti); non \xE8 stato ancora eliminato niente.`,
684
694
  notThisAccount: (origin, name) => `${origin} non \xE8 la copia \xAB${name}\xBB di questo account Cloudflare: non ha ricevuto l\u2019autorizzazione. Non \xE8 stato eliminato niente.`,
685
695
  copyTooOld: (updateCommand) => `La tua copia \xE8 di una versione precedente che non sa farlo. Aggiornala con ${updateCommand} ed esegui di nuovo questo comando, oppure svuota il bucket dall\u2019app o dalla dashboard.`,
686
696
  copyEmptied: "La tua copia ha eliminato i suoi dati e i suoi allegati."
@@ -760,6 +770,7 @@ Orqevio ${version}\u3078\u306E\u66F4\u65B0\u304C\u5B8C\u4E86\u3057\u307E\u3057\u
760
770
  ].join("\n"),
761
771
  cannotReadRepoConfig: (detail) => `\u3053\u306E\u30D5\u30A9\u30EB\u30C0\u30FC\u306Ewrangler.jsonc\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\uFF1A${detail}`,
762
772
  badRepoName: (name) => `wrangler.jsonc\u306EWorker\u540D\uFF08\u300C${name}\u300D\uFF09\u306F\u4F7F\u3048\u307E\u305B\u3093\u3002`,
773
+ settingSetupCode: "\u65B0\u3057\u3044\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u30B3\u30FC\u30C9\u3092Orqevio\u306B\u4FDD\u5B58\u3057\u3066\u3044\u307E\u3059\u2026",
763
774
  setupCodeFailed: "\n\u30B3\u30FC\u30C9\u3092\u5909\u66F4\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u4E0A\u306B\u8868\u793A\u3055\u308C\u305FWrangler\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
764
775
  recovered: (setupCode) => [
765
776
  "",
@@ -806,6 +817,7 @@ Orqevio ${version}\u3078\u306E\u66F4\u65B0\u304C\u5B8C\u4E86\u3057\u307E\u3057\u
806
817
  otherCopy: (origin, other, name) => `${origin}\u306F\u300C${other}\u300D\u3067\u3001\u300C${name}\u300D\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002`,
807
818
  copyUnreachable: (origin, detail) => `${origin}\u306EOrqevio\u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\uFF08${detail}\uFF09\u3002\u4F55\u3082\u524A\u9664\u3057\u3066\u3044\u307E\u305B\u3093\u3002`,
808
819
  authorizingCopy: "Cloudflare\u30A2\u30AB\u30A6\u30F3\u30C8\u304B\u3089Orqevio\u306B\u8A31\u53EF\u3092\u4E0E\u3048\u3001\u5FDC\u7B54\u3092\u5F85\u3063\u3066\u3044\u307E\u3059\uFF08\u6570\u79D2\u304B\u304B\u308A\u307E\u3059\uFF09\u2026",
820
+ waitingForCopy: (minutes) => `Orqevio\u306B\u307E\u3060\u8A31\u53EF\u304C\u5C4A\u3044\u3066\u3044\u307E\u305B\u3093\u3002Cloudflare\u3067\u306F\u6570\u5206\u304B\u304B\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002\u6700\u5927${minutes}\u5206\u307E\u3067\u5F85\u3061\u307E\u3059\u3002\u307E\u3060\u4F55\u3082\u524A\u9664\u3057\u3066\u3044\u307E\u305B\u3093\u3002`,
809
821
  notThisAccount: (origin, name) => `${origin}\u306F\u3053\u306ECloudflare\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u300C${name}\u300D\u3067\u306F\u3042\u308A\u307E\u305B\u3093\uFF08\u8A31\u53EF\u304C\u5C4A\u304D\u307E\u305B\u3093\u3067\u3057\u305F\uFF09\u3002\u4F55\u3082\u524A\u9664\u3057\u3066\u3044\u307E\u305B\u3093\u3002`,
810
822
  copyTooOld: (updateCommand) => `\u304A\u4F7F\u3044\u306EOrqevio\u306F\u4EE5\u524D\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u305F\u3081\u3001\u3053\u306E\u64CD\u4F5C\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093\u3002${updateCommand}\u3067\u66F4\u65B0\u3057\u3066\u304B\u3089\u3082\u3046\u4E00\u5EA6\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u3092\u5B9F\u884C\u3059\u308B\u304B\u3001\u30A2\u30D7\u30EA\u307E\u305F\u306F\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u3067\u30D0\u30B1\u30C3\u30C8\u3092\u7A7A\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,
811
823
  copyEmptied: "Orqevio\u304C\u30C7\u30FC\u30BF\u3068\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u3092\u524A\u9664\u3057\u307E\u3057\u305F\u3002"
@@ -884,6 +896,7 @@ Je installatie is bijgewerkt naar Orqevio ${version}: ${address}`,
884
896
  ].join("\n"),
885
897
  cannotReadRepoConfig: (detail) => `Kan wrangler.jsonc in deze map niet lezen: ${detail}`,
886
898
  badRepoName: (name) => `De naam van de Worker in wrangler.jsonc (\u2018${name}\u2019) kan niet worden gebruikt.`,
899
+ settingSetupCode: "Een nieuwe installatiecode wordt in je installatie opgeslagen\u2026",
887
900
  setupCodeFailed: "\nDe code kon niet worden gewijzigd. Bekijk de melding van Wrangler hierboven.",
888
901
  recovered: (setupCode) => [
889
902
  "",
@@ -929,6 +942,7 @@ Je installatie is bijgewerkt naar Orqevio ${version}: ${address}`,
929
942
  otherCopy: (origin, other, name) => `${origin} is de installatie \u2018${other}\u2019, niet \u2018${name}\u2019.`,
930
943
  copyUnreachable: (origin, detail) => `Je installatie op ${origin} is niet bereikbaar (${detail}). Er is niets verwijderd.`,
931
944
  authorizingCopy: "Je installatie krijgt toestemming via je Cloudflare-account; wachten op antwoord (een paar seconden)\u2026",
945
+ waitingForCopy: (minutes) => `Je installatie heeft de toestemming nog niet ontvangen: soms duurt het bij Cloudflare een paar minuten. Ik wacht nog even (tot ${minutes} minuten); er is nog niets verwijderd.`,
932
946
  notThisAccount: (origin, name) => `${origin} is niet de installatie \u2018${name}\u2019 van dit Cloudflare-account: die heeft de toestemming niet gekregen. Er is niets verwijderd.`,
933
947
  copyTooOld: (updateCommand) => `Je installatie heeft een oudere versie die dit nog niet kan. Werk haar bij met ${updateCommand} en voer deze opdracht opnieuw uit, of maak de bucket leeg via de app of het dashboard.`,
934
948
  copyEmptied: "Je installatie heeft haar gegevens en bijlagen verwijderd."
@@ -1007,6 +1021,7 @@ Sua c\xF3pia foi atualizada para o Orqevio ${version}: ${address}`,
1007
1021
  ].join("\n"),
1008
1022
  cannotReadRepoConfig: (detail) => `N\xE3o foi poss\xEDvel ler o wrangler.jsonc nesta pasta: ${detail}`,
1009
1023
  badRepoName: (name) => `O nome do Worker no wrangler.jsonc (\u201C${name}\u201D) n\xE3o pode ser usado.`,
1024
+ settingSetupCode: "Salvando um novo c\xF3digo de configura\xE7\xE3o na sua c\xF3pia\u2026",
1010
1025
  setupCodeFailed: "\nN\xE3o foi poss\xEDvel alterar o c\xF3digo. Confira a mensagem do Wrangler acima.",
1011
1026
  recovered: (setupCode) => [
1012
1027
  "",
@@ -1052,6 +1067,7 @@ Sua c\xF3pia foi atualizada para o Orqevio ${version}: ${address}`,
1052
1067
  otherCopy: (origin, other, name) => `${origin} \xE9 a c\xF3pia \u201C${other}\u201D, n\xE3o \u201C${name}\u201D.`,
1053
1068
  copyUnreachable: (origin, detail) => `N\xE3o foi poss\xEDvel falar com a sua c\xF3pia em ${origin} (${detail}). Nada foi apagado.`,
1054
1069
  authorizingCopy: "Autorizando a sua c\xF3pia pela sua conta da Cloudflare e esperando a resposta dela (alguns segundos)\u2026",
1070
+ waitingForCopy: (minutes) => `Sua c\xF3pia ainda n\xE3o recebeu a autoriza\xE7\xE3o: \xE0s vezes a Cloudflare leva alguns minutos. Continuo esperando (at\xE9 ${minutes} minutos); nada foi apagado ainda.`,
1055
1071
  notThisAccount: (origin, name) => `${origin} n\xE3o \xE9 a c\xF3pia \u201C${name}\u201D desta conta da Cloudflare: ela n\xE3o recebeu a autoriza\xE7\xE3o. Nada foi apagado.`,
1056
1072
  copyTooOld: (updateCommand) => `Sua c\xF3pia \xE9 de uma vers\xE3o anterior que n\xE3o sabe fazer isso. Atualize-a com ${updateCommand} e execute este comando de novo, ou esvazie o bucket pelo app ou pelo painel.`,
1057
1073
  copyEmptied: "Sua c\xF3pia apagou os dados e os anexos."
@@ -1194,6 +1210,7 @@ function deployedUrls(outputFile) {
1194
1210
 
1195
1211
  // src/main.ts
1196
1212
  var MIN_NODE = [22, 12];
1213
+ var UNINSTALL_WAIT = { fastMs: 3e3, slowAfterMs: 3e4, slowMs: 15e3, timeoutMs: 6 * 6e4 };
1197
1214
  var MANUAL_SIGN_IN = "npx wrangler login --browser=false";
1198
1215
  var R2_DASHBOARD = "https://dash.cloudflare.com/?to=/:account/r2/overview";
1199
1216
  async function main(argv, io = terminalIo(), deps = {}) {
@@ -1478,14 +1495,28 @@ async function deployRepo(orqevio, dryRun, io, m) {
1478
1495
  }
1479
1496
  async function recover(name, env, io, m) {
1480
1497
  const setupCode = generateSetupCode();
1481
- const run = await runWrangler(["secret", "put", "SETUP_CODE", "--name", name], { input: setupCode, env });
1482
- if (run.code !== 0) {
1498
+ io.out(m.settingSetupCode);
1499
+ const failure = await putSecret(name, "SETUP_CODE", setupCode, env);
1500
+ if (failure !== null) {
1501
+ io.err(failure);
1483
1502
  io.err(m.setupCodeFailed);
1484
1503
  return 1;
1485
1504
  }
1486
1505
  io.out(m.recovered(setupCode));
1487
1506
  return 0;
1488
1507
  }
1508
+ async function putSecret(name, key, value, env) {
1509
+ const message = `create-orqevio: ${key}`;
1510
+ const created = await runWrangler(["versions", "secret", "put", key, "--name", name, "--message", message], { input: value, env, capture: true });
1511
+ const output = `${created.stdout}${created.stderr}`;
1512
+ const version = /Created version ([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i.exec(output)?.[1];
1513
+ if (created.code !== 0 || !version) return output.trim();
1514
+ const deployed = await runWrangler(
1515
+ ["versions", "deploy", `${version}@100%`, "--name", name, "--yes", "--durable-objects-code-update-mode", "immediate", "--message", message],
1516
+ { env, capture: true }
1517
+ );
1518
+ return deployed.code === 0 ? null : `${deployed.stdout}${deployed.stderr}`.trim();
1519
+ }
1489
1520
  async function uninstall(name, workerFound, env, io, m, deps) {
1490
1521
  const bucket = bucketName(name);
1491
1522
  const bucketFound = await bucketExists(bucket, env);
@@ -1529,7 +1560,7 @@ async function deleteBucket(bucket, env, io) {
1529
1560
  return "failed";
1530
1561
  }
1531
1562
  async function emptyThroughCopy(name, bucket, env, io, m, deps) {
1532
- const { intervalMs, timeoutMs } = deps.uninstallWait ?? { intervalMs: 3e3, timeoutMs: 9e4 };
1563
+ const wait = deps.uninstallWait ?? UNINSTALL_WAIT;
1533
1564
  io.out(m.emptyingThroughCopy(bucket));
1534
1565
  for (let attempt = 0; attempt < 3; attempt++) {
1535
1566
  const address = (await io.ask(m.askAddress(name))).trim();
@@ -1540,22 +1571,29 @@ async function emptyThroughCopy(name, bucket, env, io, m, deps) {
1540
1571
  continue;
1541
1572
  }
1542
1573
  const token = `${Date.now() + 15 * 6e4}.${randomBytes2(32).toString("base64url")}`;
1543
- const set = await runWrangler(["secret", "put", "ORQEVIO_UNINSTALL_TOKEN", "--name", name], { input: token, env, capture: true });
1544
- if (set.code !== 0) {
1545
- io.err((set.stderr || set.stdout).trim());
1574
+ const failure = await putSecret(name, "ORQEVIO_UNINSTALL_TOKEN", token, env);
1575
+ if (failure !== null) {
1576
+ io.err(failure);
1546
1577
  io.err(m.uninstallFailed);
1547
1578
  return false;
1548
1579
  }
1549
1580
  io.out(m.authorizingCopy);
1550
- const deadline = Date.now() + timeoutMs;
1581
+ const started = Date.now();
1582
+ let saidWaiting = false;
1551
1583
  for (; ; ) {
1552
1584
  const result = await emptyCopy(origin, name, token, deps.fetch);
1553
1585
  if (result.ok) {
1554
1586
  io.out(m.copyEmptied);
1555
1587
  return true;
1556
1588
  }
1557
- if (result.reason === "not-authorized" && Date.now() < deadline) {
1558
- await new Promise((resolve) => setTimeout(resolve, intervalMs));
1589
+ const elapsed = Date.now() - started;
1590
+ if (result.reason === "not-authorized" && elapsed < wait.timeoutMs) {
1591
+ const slow = elapsed >= wait.slowAfterMs;
1592
+ if (slow && !saidWaiting) {
1593
+ io.out(m.waitingForCopy(Math.ceil(wait.timeoutMs / 6e4)));
1594
+ saidWaiting = true;
1595
+ }
1596
+ await new Promise((resolve) => setTimeout(resolve, slow ? wait.slowMs : wait.fastMs));
1559
1597
  continue;
1560
1598
  }
1561
1599
  if (result.reason === "not-authorized") io.err(m.notThisAccount(origin, name));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-orqevio",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Install your own copy of Orqevio on your Cloudflare account with one command.",
5
5
  "license": "FSL-1.1-ALv2",
6
6
  "repository": {
@@ -21,7 +21,7 @@
21
21
  ],
22
22
  "dependencies": {
23
23
  "wrangler": "4.161.0",
24
- "orqevio": "1.0.0"
24
+ "orqevio": "1.0.1"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "^22.20.5",