create-orqevio 1.0.0-rc.2 → 1.0.0-rc.3
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/cli.js +330 -46
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -25,15 +25,15 @@ function loadOrqevio(from = import.meta.url) {
|
|
|
25
25
|
const base = JSON.parse(readFileSync(path.join(dir, "dist/wrangler.json"), "utf8"));
|
|
26
26
|
return { dir: path.join(dir, "dist"), version, base };
|
|
27
27
|
}
|
|
28
|
-
function copyConfig(base, distDir, name, install = "cli") {
|
|
28
|
+
function copyConfig(base, distDir, name, install = "cli", bucket = bucketName(name)) {
|
|
29
29
|
return {
|
|
30
30
|
...base,
|
|
31
31
|
name,
|
|
32
32
|
// Other variables set in the dashboard are kept (keep_vars below).
|
|
33
|
-
vars: { ...base.vars, ORQEVIO_INSTALL: install, ORQEVIO_COPY_NAME: name },
|
|
33
|
+
vars: { ...base.vars, ORQEVIO_INSTALL: install, ORQEVIO_COPY_NAME: name, ORQEVIO_BUCKET: bucket },
|
|
34
34
|
main: path.join(distDir, base.main),
|
|
35
35
|
assets: { ...base.assets, directory: path.join(distDir, base.assets.directory) },
|
|
36
|
-
r2_buckets: base.r2_buckets.map((
|
|
36
|
+
r2_buckets: base.r2_buckets.map((binding) => binding.binding === "UPLOADS" ? { ...binding, bucket_name: bucket } : binding),
|
|
37
37
|
// Variables the owner set in the Cloudflare dashboard (APP_URL, MAX_UPLOAD_MB) survive updates.
|
|
38
38
|
keep_vars: true
|
|
39
39
|
};
|
|
@@ -75,6 +75,7 @@ Verwendung:
|
|
|
75
75
|
npx create-orqevio Installiert eine neue Instanz
|
|
76
76
|
npx create-orqevio@latest update Aktualisiert deine Instanz auf die neueste Version (deine Daten bleiben erhalten)
|
|
77
77
|
npx create-orqevio@latest recover Erzeugt einen neuen Code, mit dem du deinen Zugang wiederherstellst
|
|
78
|
+
npx create-orqevio@latest uninstall L\xF6scht deine Instanz mit allem, was darin ist
|
|
78
79
|
|
|
79
80
|
Optionen:
|
|
80
81
|
--name <name> Name der Instanz (standardm\xE4\xDFig ${defaultName}). Er wird Teil ihrer Adresse.
|
|
@@ -97,7 +98,7 @@ sich dein Browser, damit du dich anmelden kannst.`,
|
|
|
97
98
|
askName: (defaultName) => `Name der Instanz (${defaultName}): `,
|
|
98
99
|
badName: (name) => `\u201E${name}\u201C kann nicht als Name verwendet werden.`,
|
|
99
100
|
nameRule: "Verwende 1 bis 50 Kleinbuchstaben, Ziffern oder Bindestriche (kein Bindestrich am Anfang oder Ende).",
|
|
100
|
-
heading: (action, version, name) => `Orqevio ${version} \xB7 ${{ install: `Instanz \u201E${name}\u201C wird installiert`, update: `Instanz \u201E${name}\u201C wird aktualisiert`, recover: `Zugang zur Instanz \u201E${name}\u201C wird wiederhergestellt` }[action]}`,
|
|
101
|
+
heading: (action, version, name) => `Orqevio ${version} \xB7 ${{ install: `Instanz \u201E${name}\u201C wird installiert`, update: `Instanz \u201E${name}\u201C wird aktualisiert`, recover: `Zugang zur Instanz \u201E${name}\u201C wird wiederhergestellt`, uninstall: `Instanz \u201E${name}\u201C wird deinstalliert` }[action]}`,
|
|
101
102
|
accountUnreachable: "Dein Cloudflare-Konto konnte nicht gepr\xFCft werden. Versuch es in ein paar Minuten noch einmal.",
|
|
102
103
|
askUpdate: (name) => `Du hast bereits eine Instanz namens \u201E${name}\u201C. Auf diese Version aktualisieren? Deine Daten bleiben erhalten.`,
|
|
103
104
|
nothingChanged: "Es wurde nichts ge\xE4ndert. F\xFCr eine weitere Instanz nimm einen anderen Namen: npx create-orqevio --name <name>",
|
|
@@ -108,8 +109,8 @@ sich dein Browser, damit du dich anmelden kannst.`,
|
|
|
108
109
|
"Die enthaltene Nutzung ist kostenlos (10 GB Speicherplatz pro Monat), Cloudflare fragt aber eventuell nach einer Zahlungsmethode.",
|
|
109
110
|
`F\xFChre danach erneut aus: ${retryCommand}`
|
|
110
111
|
].join("\n"),
|
|
111
|
-
signInPrompt: "Melde dich in dem Browserfenster, das sich gleich \xF6ffnet, bei Cloudflare an\u2026\n",
|
|
112
|
-
signInFailed:
|
|
112
|
+
signInPrompt: "Melde dich in dem Browserfenster, das sich gleich \xF6ffnet, bei Cloudflare an. Falls es sich nicht \xF6ffnet, \xF6ffne den Link unten selbst\u2026\n",
|
|
113
|
+
signInFailed: (command) => `Die Anmeldung bei Cloudflare wurde nicht abgeschlossen. Falls sich der Browser nicht ge\xF6ffnet hat, melde dich separat mit ${command} an, \xF6ffne den angezeigten Link und f\xFChre diesen Befehl erneut aus.`,
|
|
113
114
|
noAccessToAccount: (account, accounts) => `Diese Sitzung hat keinen Zugriff auf das Konto \u201E${account}\u201C. Verf\xFCgbare Konten:
|
|
114
115
|
${accounts}`,
|
|
115
116
|
noAccounts: "In deiner Cloudflare-Sitzung ist kein Konto verf\xFCgbar.",
|
|
@@ -146,7 +147,32 @@ Deine Instanz l\xE4uft jetzt mit Orqevio ${version}: ${address}`,
|
|
|
146
147
|
"",
|
|
147
148
|
"\xD6ffne deine Instanz, w\xE4hle \u201ESchl\xFCssel verloren?\u201C und gib diesen Code ein, um einen neuen",
|
|
148
149
|
"Zugangsschl\xFCssel zu bekommen. Alle Sitzungen werden abgemeldet; deine Daten und dein",
|
|
149
|
-
"Tresor bleiben unver\xE4ndert."
|
|
150
|
+
"Tresor bleiben unver\xE4ndert.",
|
|
151
|
+
"Falls jemand anderes den Schl\xFCssel gehabt haben k\xF6nnte, antworte \u201EJemand anderes k\xF6nnte ihn haben\u201C, um auch deine Agenten zu trennen."
|
|
152
|
+
].join("\n"),
|
|
153
|
+
uninstallNeedsTerminal: "Zum Deinstallieren gibst du den Namen der Instanz ein: F\xFChre diesen Befehl in einem Terminal aus.",
|
|
154
|
+
nothingToUninstall: (name) => `In diesem Konto gibt es keine Instanz namens \u201E${name}\u201C, also gibt es nichts zu l\xF6schen.`,
|
|
155
|
+
uninstallWarning: (name, bucket) => [
|
|
156
|
+
`Damit wird die Instanz \u201E${name}\u201C endg\xFCltig gel\xF6scht, mit allem, was darin ist:`,
|
|
157
|
+
" \xB7 ihr Worker, mit deinen Arbeitsbereichen, Dokumenten, deinem Tresor und deinen Agenten;",
|
|
158
|
+
` \xB7 ihr Bucket \u201E${bucket}\u201C, mit den Anh\xE4ngen.`,
|
|
159
|
+
"Das l\xE4sst sich nicht r\xFCckg\xE4ngig machen. Wenn du deinen Tresor behalten willst, exportiere vorher eine verschl\xFCsselte Kopie daraus.",
|
|
160
|
+
""
|
|
161
|
+
].join("\n"),
|
|
162
|
+
askUninstallName: (name) => `Gib \u201E${name}\u201C ein, um zu best\xE4tigen: `,
|
|
163
|
+
nothingDeleted: "Es wurde nichts gel\xF6scht.",
|
|
164
|
+
bucketNotEmpty: (bucket, retryCommand) => [
|
|
165
|
+
"",
|
|
166
|
+
`Der Bucket \u201E${bucket}\u201C enth\xE4lt noch Anh\xE4nge, und Cloudflare l\xF6scht nur leere Buckets. Es wurde nichts gel\xF6scht.`,
|
|
167
|
+
`Leere ihn auf eine dieser beiden Arten und f\xFChre dann ${retryCommand} noch einmal aus:`,
|
|
168
|
+
" \xB7 in deiner Instanz: Einstellungen \u2192 Orqevio deinstallieren, was auch die \xFCbrigen Daten l\xF6scht;",
|
|
169
|
+
` \xB7 im Cloudflare-Dashboard: R2 \u2192 ${bucket} \u2192 Settings \u2192 Empty Bucket.`
|
|
170
|
+
].join("\n"),
|
|
171
|
+
uninstallFailed: "\nDie Deinstallation wurde nicht abgeschlossen. Sieh dir die Meldung von Wrangler oben an; du kannst den Befehl noch einmal ausf\xFChren.",
|
|
172
|
+
uninstalled: (name, logoutCommand) => [
|
|
173
|
+
"",
|
|
174
|
+
`Die Instanz \u201E${name}\u201C ist deinstalliert: Ihr Worker und ihr Bucket sind aus deinem Cloudflare-Konto entfernt.`,
|
|
175
|
+
`Wenn du Wrangler sonst nicht nutzt, melde dich mit ${logoutCommand} ab.`
|
|
150
176
|
].join("\n")
|
|
151
177
|
};
|
|
152
178
|
|
|
@@ -158,6 +184,7 @@ Usage:
|
|
|
158
184
|
npx create-orqevio Install a new copy
|
|
159
185
|
npx create-orqevio@latest update Update your copy to the latest version (your data is kept)
|
|
160
186
|
npx create-orqevio@latest recover Get a new code to recover your access
|
|
187
|
+
npx create-orqevio@latest uninstall Delete your copy and everything in it
|
|
161
188
|
|
|
162
189
|
Options:
|
|
163
190
|
--name <name> Name of the copy (${defaultName} by default). It becomes part of its address.
|
|
@@ -180,7 +207,7 @@ opens so you can sign in.`,
|
|
|
180
207
|
askName: (defaultName) => `Name of the copy (${defaultName}): `,
|
|
181
208
|
badName: (name) => `\u201C${name}\u201D can\u2019t be used as a name.`,
|
|
182
209
|
nameRule: "Use 1 to 50 lowercase letters, numbers or hyphens (no hyphen at the start or end).",
|
|
183
|
-
heading: (action, version, name) => `Orqevio ${version} \xB7 ${{ install: "Installing", update: "Updating", recover: "Recovering access to" }[action]} the copy \u201C${name}\u201D`,
|
|
210
|
+
heading: (action, version, name) => `Orqevio ${version} \xB7 ${{ install: "Installing", update: "Updating", recover: "Recovering access to", uninstall: "Uninstalling" }[action]} the copy \u201C${name}\u201D`,
|
|
184
211
|
accountUnreachable: "Couldn\u2019t check your Cloudflare account. Try again in a few minutes.",
|
|
185
212
|
askUpdate: (name) => `You already have a copy called \u201C${name}\u201D. Update it to this version? Your data is kept.`,
|
|
186
213
|
nothingChanged: "Nothing has changed. For another copy, use another name: npx create-orqevio --name <name>",
|
|
@@ -191,8 +218,8 @@ opens so you can sign in.`,
|
|
|
191
218
|
"The included usage is free (10 GB of storage a month), although Cloudflare may ask for a payment method.",
|
|
192
219
|
`Then run again: ${retryCommand}`
|
|
193
220
|
].join("\n"),
|
|
194
|
-
signInPrompt: "Sign in to Cloudflare in the browser that\u2019s about to open\u2026\n",
|
|
195
|
-
signInFailed:
|
|
221
|
+
signInPrompt: "Sign in to Cloudflare in the browser that\u2019s about to open. If it doesn\u2019t open, open the link below yourself\u2026\n",
|
|
222
|
+
signInFailed: (command) => `Signing in to Cloudflare wasn\u2019t completed. If the browser didn\u2019t open, sign in on its own with ${command}, open the link it shows and run this command again.`,
|
|
196
223
|
noAccessToAccount: (account, accounts) => `This session has no access to the account \u201C${account}\u201D. Available accounts:
|
|
197
224
|
${accounts}`,
|
|
198
225
|
noAccounts: "Your Cloudflare session has no account available.",
|
|
@@ -228,7 +255,32 @@ Your copy is updated to Orqevio ${version}: ${address}`,
|
|
|
228
255
|
`New setup code: ${setupCode}`,
|
|
229
256
|
"",
|
|
230
257
|
"Open your copy, choose \u201CLost your key?\u201D and enter this code to get a new access key.",
|
|
231
|
-
"Every session is signed out; your data and your vault don\u2019t change."
|
|
258
|
+
"Every session is signed out; your data and your vault don\u2019t change.",
|
|
259
|
+
"If someone else may have had the key, answer \u201CSomeone else may have it\u201D to disconnect your agents too."
|
|
260
|
+
].join("\n"),
|
|
261
|
+
uninstallNeedsTerminal: "To uninstall, you type the copy\u2019s name to confirm: run this command in a terminal.",
|
|
262
|
+
nothingToUninstall: (name) => `There\u2019s no copy called \u201C${name}\u201D in this account, so there\u2019s nothing to delete.`,
|
|
263
|
+
uninstallWarning: (name, bucket) => [
|
|
264
|
+
`This deletes the copy \u201C${name}\u201D for good, with everything in it:`,
|
|
265
|
+
" \xB7 its Worker, with your workspaces, documents, vault and agents;",
|
|
266
|
+
` \xB7 its bucket \u201C${bucket}\u201D, with the attachments.`,
|
|
267
|
+
"It can\u2019t be undone. To keep your vault, export an encrypted copy from it first.",
|
|
268
|
+
""
|
|
269
|
+
].join("\n"),
|
|
270
|
+
askUninstallName: (name) => `Type \u201C${name}\u201D to confirm: `,
|
|
271
|
+
nothingDeleted: "Nothing was deleted.",
|
|
272
|
+
bucketNotEmpty: (bucket, retryCommand) => [
|
|
273
|
+
"",
|
|
274
|
+
`The bucket \u201C${bucket}\u201D still holds attachments, and Cloudflare only deletes empty buckets. Nothing was deleted.`,
|
|
275
|
+
`Empty it in one of these two ways, then run ${retryCommand} again:`,
|
|
276
|
+
" \xB7 in your copy: Settings \u2192 Uninstall Orqevio, which also deletes the rest of its data;",
|
|
277
|
+
` \xB7 in the Cloudflare dashboard: R2 \u2192 ${bucket} \u2192 Settings \u2192 Empty Bucket.`
|
|
278
|
+
].join("\n"),
|
|
279
|
+
uninstallFailed: "\nThe uninstall didn\u2019t finish. Check Wrangler\u2019s message above; you can run the command again.",
|
|
280
|
+
uninstalled: (name, logoutCommand) => [
|
|
281
|
+
"",
|
|
282
|
+
`The copy \u201C${name}\u201D is uninstalled: its Worker and its bucket are gone from your Cloudflare account.`,
|
|
283
|
+
`If you don\u2019t use Wrangler for anything else, sign out with ${logoutCommand}.`
|
|
232
284
|
].join("\n")
|
|
233
285
|
};
|
|
234
286
|
|
|
@@ -240,6 +292,7 @@ Uso:
|
|
|
240
292
|
npx create-orqevio Instala una copia nueva
|
|
241
293
|
npx create-orqevio@latest update Actualiza tu copia a la \xFAltima versi\xF3n (tus datos se conservan)
|
|
242
294
|
npx create-orqevio@latest recover Genera un c\xF3digo nuevo para recuperar el acceso
|
|
295
|
+
npx create-orqevio@latest uninstall Borra tu copia y todo lo que contiene
|
|
243
296
|
|
|
244
297
|
Opciones:
|
|
245
298
|
--name <nombre> Nombre de la copia (por defecto, ${defaultName}). Forma parte de su direcci\xF3n.
|
|
@@ -262,7 +315,7 @@ navegador para que inicies sesi\xF3n.`,
|
|
|
262
315
|
askName: (defaultName) => `Nombre de la copia (${defaultName}): `,
|
|
263
316
|
badName: (name) => `\xAB${name}\xBB no vale como nombre.`,
|
|
264
317
|
nameRule: "Usa de 1 a 50 letras min\xFAsculas, n\xFAmeros o guiones (sin guion al principio ni al final).",
|
|
265
|
-
heading: (action, version, name) => `Orqevio ${version} \xB7 ${{ install: "instalar la copia", update: "actualizar la copia", recover: "recuperar el acceso a la copia" }[action]} \xAB${name}\xBB`,
|
|
318
|
+
heading: (action, version, name) => `Orqevio ${version} \xB7 ${{ install: "instalar la copia", update: "actualizar la copia", recover: "recuperar el acceso a la copia", uninstall: "desinstalar la copia" }[action]} \xAB${name}\xBB`,
|
|
266
319
|
accountUnreachable: "No he podido consultar tu cuenta de Cloudflare. Vuelve a intentarlo en unos minutos.",
|
|
267
320
|
askUpdate: (name) => `Ya tienes una copia llamada \xAB${name}\xBB. \xBFLa actualizo a esta versi\xF3n? Tus datos se conservan.`,
|
|
268
321
|
nothingChanged: "No he cambiado nada. Para otra copia, usa otro nombre: npx create-orqevio --name <nombre>",
|
|
@@ -273,8 +326,8 @@ navegador para que inicies sesi\xF3n.`,
|
|
|
273
326
|
"El uso incluido es gratis (10 GB de almacenamiento al mes), aunque Cloudflare puede pedirte un m\xE9todo de pago.",
|
|
274
327
|
`Despu\xE9s, repite: ${retryCommand}`
|
|
275
328
|
].join("\n"),
|
|
276
|
-
signInPrompt: "Inicia sesi\xF3n en Cloudflare en el navegador que se va a abrir\u2026\n",
|
|
277
|
-
signInFailed:
|
|
329
|
+
signInPrompt: "Inicia sesi\xF3n en Cloudflare en el navegador que se va a abrir. Si no se abre, abre t\xFA el enlace que aparece abajo\u2026\n",
|
|
330
|
+
signInFailed: (command) => `No se ha completado el inicio de sesi\xF3n en Cloudflare. Si el navegador no se ha abierto, inicia sesi\xF3n aparte con ${command}, abre el enlace que muestra y vuelve a ejecutar esta orden.`,
|
|
278
331
|
noAccessToAccount: (account, accounts) => `Esta sesi\xF3n no tiene acceso a la cuenta \xAB${account}\xBB. Cuentas disponibles:
|
|
279
332
|
${accounts}`,
|
|
280
333
|
noAccounts: "Tu sesi\xF3n de Cloudflare no tiene ninguna cuenta disponible.",
|
|
@@ -310,7 +363,32 @@ Tu copia est\xE1 actualizada a Orqevio ${version}: ${address}`,
|
|
|
310
363
|
`Nuevo c\xF3digo de configuraci\xF3n: ${setupCode}`,
|
|
311
364
|
"",
|
|
312
365
|
"Abre tu copia, pulsa \xAB\xBFHas perdido la clave?\xBB y escribe este c\xF3digo para recibir una",
|
|
313
|
-
"clave de acceso nueva. Se cerrar\xE1n todas las sesiones; tus datos y tu b\xF3veda no cambian."
|
|
366
|
+
"clave de acceso nueva. Se cerrar\xE1n todas las sesiones; tus datos y tu b\xF3veda no cambian.",
|
|
367
|
+
"Si alguien m\xE1s pudo tener la clave, responde \xABPuede que alguien la tenga\xBB para desconectar tambi\xE9n a tus agentes."
|
|
368
|
+
].join("\n"),
|
|
369
|
+
uninstallNeedsTerminal: "Para desinstalar tienes que escribir el nombre de la copia: ejecuta este comando en una terminal.",
|
|
370
|
+
nothingToUninstall: (name) => `No hay ninguna copia llamada \xAB${name}\xBB en esta cuenta: no hay nada que borrar.`,
|
|
371
|
+
uninstallWarning: (name, bucket) => [
|
|
372
|
+
`Esto borra para siempre la copia \xAB${name}\xBB con todo lo que contiene:`,
|
|
373
|
+
" \xB7 su Worker, con tus espacios, documentos, b\xF3veda y agentes;",
|
|
374
|
+
` \xB7 su bucket \xAB${bucket}\xBB, con los adjuntos.`,
|
|
375
|
+
"No se puede deshacer. Si quieres conservar la b\xF3veda, exporta antes una copia cifrada desde ella.",
|
|
376
|
+
""
|
|
377
|
+
].join("\n"),
|
|
378
|
+
askUninstallName: (name) => `Escribe \xAB${name}\xBB para confirmar: `,
|
|
379
|
+
nothingDeleted: "No se ha borrado nada.",
|
|
380
|
+
bucketNotEmpty: (bucket, retryCommand) => [
|
|
381
|
+
"",
|
|
382
|
+
`El bucket \xAB${bucket}\xBB todav\xEDa guarda adjuntos, y Cloudflare solo borra buckets vac\xEDos. No se ha borrado nada.`,
|
|
383
|
+
`Vac\xEDalo de una de estas dos formas y vuelve a ejecutar ${retryCommand}:`,
|
|
384
|
+
" \xB7 en tu copia: Ajustes \u2192 Desinstalar Orqevio, que adem\xE1s borra el resto de sus datos;",
|
|
385
|
+
` \xB7 en el panel de Cloudflare: R2 \u2192 ${bucket} \u2192 Settings \u2192 Empty Bucket.`
|
|
386
|
+
].join("\n"),
|
|
387
|
+
uninstallFailed: "\nLa desinstalaci\xF3n no ha terminado. Revisa el mensaje de Wrangler de arriba; puedes volver a ejecutar el comando.",
|
|
388
|
+
uninstalled: (name, logoutCommand) => [
|
|
389
|
+
"",
|
|
390
|
+
`La copia \xAB${name}\xBB est\xE1 desinstalada: su Worker y su bucket ya no est\xE1n en tu cuenta de Cloudflare.`,
|
|
391
|
+
`Si no usas Wrangler para nada m\xE1s, cierra la sesi\xF3n con ${logoutCommand}.`
|
|
314
392
|
].join("\n")
|
|
315
393
|
};
|
|
316
394
|
|
|
@@ -322,6 +400,7 @@ Utilisation :
|
|
|
322
400
|
npx create-orqevio Installe une nouvelle copie
|
|
323
401
|
npx create-orqevio@latest update Passe votre copie \xE0 la derni\xE8re version (vos donn\xE9es sont conserv\xE9es)
|
|
324
402
|
npx create-orqevio@latest recover G\xE9n\xE8re un nouveau code pour r\xE9cup\xE9rer votre acc\xE8s
|
|
403
|
+
npx create-orqevio@latest uninstall Supprime votre copie et tout son contenu
|
|
325
404
|
|
|
326
405
|
Options :
|
|
327
406
|
--name <nom> Nom de la copie (${defaultName} par d\xE9faut). Il fait partie de son adresse.
|
|
@@ -344,7 +423,7 @@ navigateur s\u2019ouvre pour que vous puissiez vous connecter.`,
|
|
|
344
423
|
askName: (defaultName) => `Nom de la copie (${defaultName}) : `,
|
|
345
424
|
badName: (name) => `\xAB ${name} \xBB ne peut pas servir de nom.`,
|
|
346
425
|
nameRule: "Utilisez de 1 \xE0 50 lettres minuscules, chiffres ou tirets (sans tiret au d\xE9but ni \xE0 la fin).",
|
|
347
|
-
heading: (action, version, name) => `Orqevio ${version} \xB7 ${{ install: "Installation de la copie", update: "Mise \xE0 jour de la copie", recover: "R\xE9cup\xE9ration de l\u2019acc\xE8s \xE0 la copie" }[action]} \xAB ${name} \xBB`,
|
|
426
|
+
heading: (action, version, name) => `Orqevio ${version} \xB7 ${{ install: "Installation de la copie", update: "Mise \xE0 jour de la copie", recover: "R\xE9cup\xE9ration de l\u2019acc\xE8s \xE0 la copie", uninstall: "D\xE9sinstallation de la copie" }[action]} \xAB ${name} \xBB`,
|
|
348
427
|
accountUnreachable: "Impossible de v\xE9rifier votre compte Cloudflare. R\xE9essayez dans quelques minutes.",
|
|
349
428
|
askUpdate: (name) => `Vous avez d\xE9j\xE0 une copie nomm\xE9e \xAB ${name} \xBB. La mettre \xE0 jour vers cette version ? Vos donn\xE9es sont conserv\xE9es.`,
|
|
350
429
|
nothingChanged: "Rien n\u2019a \xE9t\xE9 modifi\xE9. Pour une autre copie, choisissez un autre nom : npx create-orqevio --name <nom>",
|
|
@@ -355,8 +434,8 @@ navigateur s\u2019ouvre pour que vous puissiez vous connecter.`,
|
|
|
355
434
|
"L\u2019utilisation incluse est gratuite (10 Go de stockage par mois), m\xEAme si Cloudflare peut vous demander un moyen de paiement.",
|
|
356
435
|
`Relancez ensuite : ${retryCommand}`
|
|
357
436
|
].join("\n"),
|
|
358
|
-
signInPrompt: "Connectez-vous \xE0 Cloudflare dans le navigateur qui va s\u2019ouvrir\u2026\n",
|
|
359
|
-
signInFailed:
|
|
437
|
+
signInPrompt: "Connectez-vous \xE0 Cloudflare dans le navigateur qui va s\u2019ouvrir. S\u2019il ne s\u2019ouvre pas, ouvrez vous-m\xEAme le lien affich\xE9 ci-dessous\u2026\n",
|
|
438
|
+
signInFailed: (command) => `La connexion \xE0 Cloudflare n\u2019a pas abouti. Si le navigateur ne s\u2019est pas ouvert, connectez-vous s\xE9par\xE9ment avec ${command}, ouvrez le lien affich\xE9, puis relancez cette commande.`,
|
|
360
439
|
noAccessToAccount: (account, accounts) => `Cette session n\u2019a pas acc\xE8s au compte \xAB ${account} \xBB. Comptes disponibles :
|
|
361
440
|
${accounts}`,
|
|
362
441
|
noAccounts: "Votre session Cloudflare n\u2019a acc\xE8s \xE0 aucun compte.",
|
|
@@ -393,7 +472,32 @@ Votre copie est pass\xE9e \xE0 Orqevio ${version} : ${address}`,
|
|
|
393
472
|
"",
|
|
394
473
|
"Ouvrez votre copie, choisissez \xAB Cl\xE9 perdue ? \xBB et saisissez ce code pour obtenir",
|
|
395
474
|
"une nouvelle cl\xE9 d\u2019acc\xE8s. Toutes les sessions seront d\xE9connect\xE9es ; vos donn\xE9es",
|
|
396
|
-
"et votre coffre-fort ne changent pas."
|
|
475
|
+
"et votre coffre-fort ne changent pas.",
|
|
476
|
+
"Si quelqu\u2019un d\u2019autre a pu avoir la cl\xE9, r\xE9pondez \xAB Quelqu\u2019un d\u2019autre l\u2019a peut-\xEAtre \xBB pour d\xE9connecter aussi vos agents."
|
|
477
|
+
].join("\n"),
|
|
478
|
+
uninstallNeedsTerminal: "Pour d\xE9sinstaller, vous devez saisir le nom de la copie : lancez cette commande dans un terminal.",
|
|
479
|
+
nothingToUninstall: (name) => `Ce compte n\u2019a aucune copie nomm\xE9e \xAB ${name} \xBB : il n\u2019y a rien \xE0 supprimer.`,
|
|
480
|
+
uninstallWarning: (name, bucket) => [
|
|
481
|
+
`Ceci supprime d\xE9finitivement la copie \xAB ${name} \xBB et tout son contenu :`,
|
|
482
|
+
" \xB7 son Worker, avec vos espaces, documents, coffre-fort et agents ;",
|
|
483
|
+
` \xB7 son bucket \xAB ${bucket} \xBB, avec les pi\xE8ces jointes.`,
|
|
484
|
+
"C\u2019est irr\xE9versible. Pour conserver votre coffre-fort, exportez-en d\u2019abord une copie chiffr\xE9e.",
|
|
485
|
+
""
|
|
486
|
+
].join("\n"),
|
|
487
|
+
askUninstallName: (name) => `Saisissez \xAB ${name} \xBB pour confirmer : `,
|
|
488
|
+
nothingDeleted: "Rien n\u2019a \xE9t\xE9 supprim\xE9.",
|
|
489
|
+
bucketNotEmpty: (bucket, retryCommand) => [
|
|
490
|
+
"",
|
|
491
|
+
`Le bucket \xAB ${bucket} \xBB contient encore des pi\xE8ces jointes, et Cloudflare ne supprime que les buckets vides. Rien n\u2019a \xE9t\xE9 supprim\xE9.`,
|
|
492
|
+
`Videz-le de l\u2019une de ces deux fa\xE7ons, puis relancez ${retryCommand} :`,
|
|
493
|
+
" \xB7 dans votre copie : Param\xE8tres \u2192 D\xE9sinstaller Orqevio, qui supprime aussi le reste de ses donn\xE9es ;",
|
|
494
|
+
` \xB7 dans le tableau de bord Cloudflare : R2 \u2192 ${bucket} \u2192 Settings \u2192 Empty Bucket.`
|
|
495
|
+
].join("\n"),
|
|
496
|
+
uninstallFailed: "\nLa d\xE9sinstallation n\u2019est pas all\xE9e au bout. Lisez le message de Wrangler ci-dessus ; vous pouvez relancer la commande.",
|
|
497
|
+
uninstalled: (name, logoutCommand) => [
|
|
498
|
+
"",
|
|
499
|
+
`La copie \xAB ${name} \xBB est d\xE9sinstall\xE9e : son Worker et son bucket ont disparu de votre compte Cloudflare.`,
|
|
500
|
+
`Si vous n\u2019utilisez Wrangler pour rien d\u2019autre, d\xE9connectez-vous avec ${logoutCommand}.`
|
|
397
501
|
].join("\n")
|
|
398
502
|
};
|
|
399
503
|
|
|
@@ -405,6 +509,7 @@ Uso:
|
|
|
405
509
|
npx create-orqevio Installa una nuova copia
|
|
406
510
|
npx create-orqevio@latest update Aggiorna la tua copia all\u2019ultima versione (senza perdere i dati)
|
|
407
511
|
npx create-orqevio@latest recover Genera un nuovo codice per recuperare l\u2019accesso
|
|
512
|
+
npx create-orqevio@latest uninstall Elimina la tua copia e tutto ci\xF2 che contiene
|
|
408
513
|
|
|
409
514
|
Opzioni:
|
|
410
515
|
--name <nome> Nome della copia (predefinito: ${defaultName}). Diventa parte del suo indirizzo.
|
|
@@ -427,7 +532,7 @@ per farti accedere.`,
|
|
|
427
532
|
askName: (defaultName) => `Nome della copia (${defaultName}): `,
|
|
428
533
|
badName: (name) => `\xAB${name}\xBB non si pu\xF2 usare come nome.`,
|
|
429
534
|
nameRule: "Usa da 1 a 50 lettere minuscole, numeri o trattini (senza trattino all\u2019inizio o alla fine).",
|
|
430
|
-
heading: (action, version, name) => `Orqevio ${version} \xB7 ${{ install: "Installazione della copia", update: "Aggiornamento della copia", recover: "Recupero dell\u2019accesso alla copia" }[action]} \xAB${name}\xBB`,
|
|
535
|
+
heading: (action, version, name) => `Orqevio ${version} \xB7 ${{ install: "Installazione della copia", update: "Aggiornamento della copia", recover: "Recupero dell\u2019accesso alla copia", uninstall: "Disinstallazione della copia" }[action]} \xAB${name}\xBB`,
|
|
431
536
|
accountUnreachable: "Non sono riuscito a controllare il tuo account Cloudflare. Riprova tra qualche minuto.",
|
|
432
537
|
askUpdate: (name) => `Hai gi\xE0 una copia chiamata \xAB${name}\xBB. Vuoi aggiornarla a questa versione? I tuoi dati vengono mantenuti.`,
|
|
433
538
|
nothingChanged: "Non ho cambiato nulla. Per un\u2019altra copia, usa un altro nome: npx create-orqevio --name <nome>",
|
|
@@ -438,8 +543,8 @@ per farti accedere.`,
|
|
|
438
543
|
"L\u2019utilizzo incluso \xE8 gratuito (10 GB di spazio al mese), anche se Cloudflare potrebbe chiederti un metodo di pagamento.",
|
|
439
544
|
`Poi esegui di nuovo: ${retryCommand}`
|
|
440
545
|
].join("\n"),
|
|
441
|
-
signInPrompt: "Accedi a Cloudflare nel browser che sta per aprirsi\u2026\n",
|
|
442
|
-
signInFailed:
|
|
546
|
+
signInPrompt: "Accedi a Cloudflare nel browser che sta per aprirsi. Se non si apre, apri tu il link che compare qui sotto\u2026\n",
|
|
547
|
+
signInFailed: (command) => `L\u2019accesso a Cloudflare non \xE8 stato completato. Se il browser non si \xE8 aperto, accedi a parte con ${command}, apri il link che mostra ed esegui di nuovo questo comando.`,
|
|
443
548
|
noAccessToAccount: (account, accounts) => `Questa sessione non ha accesso all\u2019account \xAB${account}\xBB. Account disponibili:
|
|
444
549
|
${accounts}`,
|
|
445
550
|
noAccounts: "La tua sessione Cloudflare non ha nessun account disponibile.",
|
|
@@ -476,7 +581,32 @@ La tua copia \xE8 stata aggiornata a Orqevio ${version}: ${address}`,
|
|
|
476
581
|
"",
|
|
477
582
|
"Apri la tua copia, scegli \xABHai perso la chiave?\xBB e inserisci questo codice per ricevere",
|
|
478
583
|
"una nuova chiave di accesso. Tutte le sessioni verranno chiuse; i tuoi dati e la tua",
|
|
479
|
-
"cassaforte non cambiano."
|
|
584
|
+
"cassaforte non cambiano.",
|
|
585
|
+
"Se qualcun altro potrebbe aver avuto la chiave, rispondi \xABQualcun altro potrebbe averla\xBB per disconnettere anche i tuoi agenti."
|
|
586
|
+
].join("\n"),
|
|
587
|
+
uninstallNeedsTerminal: "Per disinstallare devi scrivere il nome della copia: esegui questo comando in un terminale.",
|
|
588
|
+
nothingToUninstall: (name) => `In questo account non c\u2019\xE8 nessuna copia chiamata \xAB${name}\xBB: non c\u2019\xE8 niente da eliminare.`,
|
|
589
|
+
uninstallWarning: (name, bucket) => [
|
|
590
|
+
`Questo elimina per sempre la copia \xAB${name}\xBB con tutto ci\xF2 che contiene:`,
|
|
591
|
+
" \xB7 il suo Worker, con i tuoi spazi, documenti, cassaforte e agenti;",
|
|
592
|
+
` \xB7 il suo bucket \xAB${bucket}\xBB, con gli allegati.`,
|
|
593
|
+
"Non si pu\xF2 annullare. Per conservare la cassaforte, esportane prima una copia cifrata.",
|
|
594
|
+
""
|
|
595
|
+
].join("\n"),
|
|
596
|
+
askUninstallName: (name) => `Scrivi \xAB${name}\xBB per confermare: `,
|
|
597
|
+
nothingDeleted: "Non \xE8 stato eliminato niente.",
|
|
598
|
+
bucketNotEmpty: (bucket, retryCommand) => [
|
|
599
|
+
"",
|
|
600
|
+
`Il bucket \xAB${bucket}\xBB contiene ancora degli allegati, e Cloudflare elimina solo i bucket vuoti. Non \xE8 stato eliminato niente.`,
|
|
601
|
+
`Svuotalo in uno di questi due modi, poi esegui di nuovo ${retryCommand}:`,
|
|
602
|
+
" \xB7 nella tua copia: Impostazioni \u2192 Disinstallare Orqevio, che elimina anche il resto dei suoi dati;",
|
|
603
|
+
` \xB7 nella dashboard di Cloudflare: R2 \u2192 ${bucket} \u2192 Settings \u2192 Empty Bucket.`
|
|
604
|
+
].join("\n"),
|
|
605
|
+
uninstallFailed: "\nLa disinstallazione non \xE8 andata a buon fine. Controlla il messaggio di Wrangler qui sopra; puoi eseguire di nuovo il comando.",
|
|
606
|
+
uninstalled: (name, logoutCommand) => [
|
|
607
|
+
"",
|
|
608
|
+
`La copia \xAB${name}\xBB \xE8 disinstallata: il suo Worker e il suo bucket non sono pi\xF9 nel tuo account Cloudflare.`,
|
|
609
|
+
`Se non usi Wrangler per nient\u2019altro, esci con ${logoutCommand}.`
|
|
480
610
|
].join("\n")
|
|
481
611
|
};
|
|
482
612
|
|
|
@@ -488,6 +618,7 @@ var ja = {
|
|
|
488
618
|
npx create-orqevio \u65B0\u3057\u3044Orqevio\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB
|
|
489
619
|
npx create-orqevio@latest update \u6700\u65B0\u30D0\u30FC\u30B8\u30E7\u30F3\u306B\u66F4\u65B0\uFF08\u30C7\u30FC\u30BF\u306F\u305D\u306E\u307E\u307E\u6B8B\u308A\u307E\u3059\uFF09
|
|
490
620
|
npx create-orqevio@latest recover \u30A2\u30AF\u30BB\u30B9\u3092\u56DE\u5FA9\u3059\u308B\u305F\u3081\u306E\u65B0\u3057\u3044\u30B3\u30FC\u30C9\u3092\u767A\u884C
|
|
621
|
+
npx create-orqevio@latest uninstall Orqevio\u3068\u305D\u306E\u4E2D\u8EAB\u3092\u3059\u3079\u3066\u524A\u9664
|
|
491
622
|
|
|
492
623
|
\u30AA\u30D7\u30B7\u30E7\u30F3\uFF1A
|
|
493
624
|
--name <\u540D\u524D> Orqevio\u306E\u540D\u524D\uFF08\u65E2\u5B9A\u306F${defaultName}\uFF09\u3002\u30A2\u30C9\u30EC\u30B9\u306E\u4E00\u90E8\u306B\u306A\u308A\u307E\u3059\u3002
|
|
@@ -511,7 +642,7 @@ Cloudflare\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u5FC5\u8981\u3067\u3059\uFF08\u71
|
|
|
511
642
|
askName: (defaultName) => `Orqevio\u306E\u540D\u524D\uFF08${defaultName}\uFF09\uFF1A`,
|
|
512
643
|
badName: (name) => `\u300C${name}\u300D\u306F\u540D\u524D\u3068\u3057\u3066\u4F7F\u3048\u307E\u305B\u3093\u3002`,
|
|
513
644
|
nameRule: "\u82F1\u5C0F\u6587\u5B57\u3001\u6570\u5B57\u3001\u30CF\u30A4\u30D5\u30F3\u30921\u301C50\u6587\u5B57\u3067\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\uFF08\u5148\u982D\u3068\u672B\u5C3E\u306B\u30CF\u30A4\u30D5\u30F3\u306F\u4F7F\u3048\u307E\u305B\u3093\uFF09\u3002",
|
|
514
|
-
heading: (action, version, name) => `Orqevio ${version} \xB7 ${{ install: `\u300C${name}\u300D\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u4E2D`, update: `\u300C${name}\u300D\u3092\u66F4\u65B0\u4E2D`, recover: `\u300C${name}\u300D\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u3092\u56DE\u5FA9\u4E2D` }[action]}`,
|
|
645
|
+
heading: (action, version, name) => `Orqevio ${version} \xB7 ${{ install: `\u300C${name}\u300D\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u4E2D`, update: `\u300C${name}\u300D\u3092\u66F4\u65B0\u4E2D`, recover: `\u300C${name}\u300D\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u3092\u56DE\u5FA9\u4E2D`, uninstall: `\u300C${name}\u300D\u3092\u30A2\u30F3\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u4E2D` }[action]}`,
|
|
515
646
|
accountUnreachable: "Cloudflare\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u6570\u5206\u5F8C\u306B\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002",
|
|
516
647
|
askUpdate: (name) => `\u300C${name}\u300D\u3068\u3044\u3046\u540D\u524D\u306EOrqevio\u304C\u3059\u3067\u306B\u3042\u308A\u307E\u3059\u3002\u3053\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306B\u66F4\u65B0\u3057\u307E\u3059\u304B\uFF1F\u30C7\u30FC\u30BF\u306F\u305D\u306E\u307E\u307E\u6B8B\u308A\u307E\u3059\u3002`,
|
|
517
648
|
nothingChanged: "\u4F55\u3082\u5909\u66F4\u3057\u3066\u3044\u307E\u305B\u3093\u3002\u5225\u306EOrqevio\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3059\u308B\u306B\u306F\u3001\u5225\u306E\u540D\u524D\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\uFF1Anpx create-orqevio --name <\u540D\u524D>",
|
|
@@ -522,8 +653,8 @@ Cloudflare\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u5FC5\u8981\u3067\u3059\uFF08\u71
|
|
|
522
653
|
"\u7121\u6599\u67A0\uFF08\u30B9\u30C8\u30EC\u30FC\u30B8\u306F\u670810 GB\u307E\u3067\uFF09\u306A\u3089\u6599\u91D1\u306F\u304B\u304B\u308A\u307E\u305B\u3093\u304C\u3001Cloudflare\u304B\u3089\u652F\u6255\u3044\u65B9\u6CD5\u306E\u767B\u9332\u3092\u6C42\u3081\u3089\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002",
|
|
523
654
|
`\u305D\u306E\u5F8C\u3001\u3082\u3046\u4E00\u5EA6\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\uFF1A${retryCommand}`
|
|
524
655
|
].join("\n"),
|
|
525
|
-
signInPrompt: "\u3053\u308C\u304B\u3089\u958B\u304F\u30D6\u30E9\u30A6\u30B6\u3067\u3001Cloudflare\u306B\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u304F\u3060\u3055\u3044\u2026\n",
|
|
526
|
-
signInFailed:
|
|
656
|
+
signInPrompt: "\u3053\u308C\u304B\u3089\u958B\u304F\u30D6\u30E9\u30A6\u30B6\u3067\u3001Cloudflare\u306B\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u958B\u304B\u306A\u3044\u5834\u5408\u306F\u3001\u4E0B\u306B\u8868\u793A\u3055\u308C\u308B\u30EA\u30F3\u30AF\u3092\u81EA\u5206\u3067\u958B\u3044\u3066\u304F\u3060\u3055\u3044\u2026\n",
|
|
657
|
+
signInFailed: (command) => `Cloudflare\u3078\u306E\u30ED\u30B0\u30A4\u30F3\u304C\u5B8C\u4E86\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30D6\u30E9\u30A6\u30B6\u304C\u958B\u304B\u306A\u304B\u3063\u305F\u5834\u5408\u306F\u3001${command} \u3067\u5225\u9014\u30ED\u30B0\u30A4\u30F3\u3057\u3001\u8868\u793A\u3055\u308C\u305F\u30EA\u30F3\u30AF\u3092\u958B\u3044\u3066\u304B\u3089\u3001\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u3092\u3082\u3046\u4E00\u5EA6\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,
|
|
527
658
|
noAccessToAccount: (account, accounts) => `\u3053\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u3067\u306F\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u300C${account}\u300D\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\u3002\u5229\u7528\u3067\u304D\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\uFF1A
|
|
528
659
|
${accounts}`,
|
|
529
660
|
noAccounts: "\u3053\u306ECloudflare\u30BB\u30C3\u30B7\u30E7\u30F3\u3067\u5229\u7528\u3067\u304D\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u3042\u308A\u307E\u305B\u3093\u3002",
|
|
@@ -560,7 +691,32 @@ Orqevio ${version}\u3078\u306E\u66F4\u65B0\u304C\u5B8C\u4E86\u3057\u307E\u3057\u
|
|
|
560
691
|
"",
|
|
561
692
|
"Orqevio\u3092\u958B\u3044\u3066\u300C\u30AD\u30FC\u3092\u7D1B\u5931\u3057\u305F\u5834\u5408\u300D\u3092\u9078\u3073\u3001\u3053\u306E\u30B3\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
562
693
|
"\u65B0\u3057\u3044\u30A2\u30AF\u30BB\u30B9\u30AD\u30FC\u304C\u767A\u884C\u3055\u308C\u3001\u3059\u3079\u3066\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u306F\u30ED\u30B0\u30A2\u30A6\u30C8\u3055\u308C\u307E\u3059\u3002",
|
|
563
|
-
"\u30C7\u30FC\u30BF\u3068\u4FDD\u7BA1\u5EAB\u306F\u305D\u306E\u307E\u307E\u5909\u308F\u308A\u307E\u305B\u3093\u3002"
|
|
694
|
+
"\u30C7\u30FC\u30BF\u3068\u4FDD\u7BA1\u5EAB\u306F\u305D\u306E\u307E\u307E\u5909\u308F\u308A\u307E\u305B\u3093\u3002",
|
|
695
|
+
"\u307B\u304B\u306E\u4EBA\u304C\u30AD\u30FC\u3092\u6301\u3063\u3066\u3044\u305F\u53EF\u80FD\u6027\u304C\u3042\u308B\u5834\u5408\u306F\u3001\u300C\u307B\u304B\u306E\u4EBA\u304C\u6301\u3063\u3066\u3044\u308B\u304B\u3082\u3057\u308C\u306A\u3044\u300D\u3092\u9078\u3076\u3068\u3001\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u306E\u63A5\u7D9A\u3082\u89E3\u9664\u3055\u308C\u307E\u3059\u3002"
|
|
696
|
+
].join("\n"),
|
|
697
|
+
uninstallNeedsTerminal: "\u30A2\u30F3\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3067\u306F\u78BA\u8A8D\u306E\u305F\u3081\u306BOrqevio\u306E\u540D\u524D\u3092\u5165\u529B\u3057\u307E\u3059\u3002\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u306F\u30BF\u30FC\u30DF\u30CA\u30EB\u3067\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
698
|
+
nothingToUninstall: (name) => `\u3053\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u300C${name}\u300D\u3068\u3044\u3046\u540D\u524D\u306EOrqevio\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u524A\u9664\u3059\u308B\u3082\u306E\u306F\u3042\u308A\u307E\u305B\u3093\u3002`,
|
|
699
|
+
uninstallWarning: (name, bucket) => [
|
|
700
|
+
`\u300C${name}\u300D\u3068\u305D\u306E\u4E2D\u8EAB\u3092\u3059\u3079\u3066\u5B8C\u5168\u306B\u524A\u9664\u3057\u307E\u3059\uFF1A`,
|
|
701
|
+
" \u30FBWorker\uFF08\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u3001\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3001\u4FDD\u7BA1\u5EAB\u3001\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u542B\u3080\uFF09",
|
|
702
|
+
` \u30FB\u30D0\u30B1\u30C3\u30C8\u300C${bucket}\u300D\uFF08\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u3092\u542B\u3080\uFF09`,
|
|
703
|
+
"\u5143\u306B\u623B\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002\u4FDD\u7BA1\u5EAB\u3092\u6B8B\u3057\u305F\u3044\u5834\u5408\u306F\u3001\u5148\u306B\u4FDD\u7BA1\u5EAB\u304B\u3089\u6697\u53F7\u5316\u3055\u308C\u305F\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3092\u4F5C\u6210\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
704
|
+
""
|
|
705
|
+
].join("\n"),
|
|
706
|
+
askUninstallName: (name) => `\u78BA\u8A8D\u306E\u305F\u3081\u300C${name}\u300D\u3068\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\uFF1A`,
|
|
707
|
+
nothingDeleted: "\u4F55\u3082\u524A\u9664\u3057\u3066\u3044\u307E\u305B\u3093\u3002",
|
|
708
|
+
bucketNotEmpty: (bucket, retryCommand) => [
|
|
709
|
+
"",
|
|
710
|
+
`\u30D0\u30B1\u30C3\u30C8\u300C${bucket}\u300D\u306B\u306F\u307E\u3060\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u304C\u3042\u308A\u3001Cloudflare\u306F\u7A7A\u306E\u30D0\u30B1\u30C3\u30C8\u3057\u304B\u524A\u9664\u3067\u304D\u307E\u305B\u3093\u3002\u4F55\u3082\u524A\u9664\u3057\u3066\u3044\u307E\u305B\u3093\u3002`,
|
|
711
|
+
`\u6B21\u306E\u3044\u305A\u308C\u304B\u306E\u65B9\u6CD5\u3067\u7A7A\u306B\u3057\u3066\u304B\u3089\u3001\u3082\u3046\u4E00\u5EA6 ${retryCommand} \u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\uFF1A`,
|
|
712
|
+
" \u30FBOrqevio\u3067\uFF1A\u8A2D\u5B9A \u2192 Orqevio\u306E\u30A2\u30F3\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\uFF08\u6B8B\u308A\u306E\u30C7\u30FC\u30BF\u3082\u524A\u9664\u3055\u308C\u307E\u3059\uFF09",
|
|
713
|
+
` \u30FBCloudflare\u306E\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u3067\uFF1AR2 \u2192 ${bucket} \u2192 Settings \u2192 Empty Bucket`
|
|
714
|
+
].join("\n"),
|
|
715
|
+
uninstallFailed: "\n\u30A2\u30F3\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u304C\u5B8C\u4E86\u3057\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\u30B3\u30DE\u30F3\u30C9\u306F\u3082\u3046\u4E00\u5EA6\u5B9F\u884C\u3067\u304D\u307E\u3059\u3002",
|
|
716
|
+
uninstalled: (name, logoutCommand) => [
|
|
717
|
+
"",
|
|
718
|
+
`\u300C${name}\u300D\u3092\u30A2\u30F3\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u307E\u3057\u305F\u3002Worker\u3068\u30D0\u30B1\u30C3\u30C8\u306FCloudflare\u30A2\u30AB\u30A6\u30F3\u30C8\u304B\u3089\u524A\u9664\u3055\u308C\u307E\u3057\u305F\u3002`,
|
|
719
|
+
`\u307B\u304B\u306BWrangler\u3092\u4F7F\u3063\u3066\u3044\u306A\u3051\u308C\u3070\u3001${logoutCommand} \u3067\u30ED\u30B0\u30A2\u30A6\u30C8\u3057\u3066\u304F\u3060\u3055\u3044\u3002`
|
|
564
720
|
].join("\n")
|
|
565
721
|
};
|
|
566
722
|
|
|
@@ -572,6 +728,7 @@ Gebruik:
|
|
|
572
728
|
npx create-orqevio Een nieuwe installatie opzetten
|
|
573
729
|
npx create-orqevio@latest update Bijwerken naar de nieuwste versie (je gegevens blijven behouden)
|
|
574
730
|
npx create-orqevio@latest recover Een nieuwe code krijgen om je toegang te herstellen
|
|
731
|
+
npx create-orqevio@latest uninstall Je installatie met alles erin verwijderen
|
|
575
732
|
|
|
576
733
|
Opties:
|
|
577
734
|
--name <naam> Naam van de installatie (standaard ${defaultName}). Wordt onderdeel van het adres.
|
|
@@ -594,7 +751,7 @@ opent je browser, zodat je kunt inloggen.`,
|
|
|
594
751
|
askName: (defaultName) => `Naam van de installatie (${defaultName}): `,
|
|
595
752
|
badName: (name) => `\u2018${name}\u2019 kan niet als naam worden gebruikt.`,
|
|
596
753
|
nameRule: "Gebruik 1 tot 50 kleine letters, cijfers of koppeltekens (geen koppelteken aan het begin of eind).",
|
|
597
|
-
heading: (action, version, name) => `Orqevio ${version} \xB7 ${{ install: `Installatie \u2018${name}\u2019 opzetten`, update: `Installatie \u2018${name}\u2019 bijwerken`, recover: `Toegang tot installatie \u2018${name}\u2019 herstellen` }[action]}`,
|
|
754
|
+
heading: (action, version, name) => `Orqevio ${version} \xB7 ${{ install: `Installatie \u2018${name}\u2019 opzetten`, update: `Installatie \u2018${name}\u2019 bijwerken`, recover: `Toegang tot installatie \u2018${name}\u2019 herstellen`, uninstall: `Installatie \u2018${name}\u2019 verwijderen` }[action]}`,
|
|
598
755
|
accountUnreachable: "Je Cloudflare-account kon niet worden gecontroleerd. Probeer het over een paar minuten opnieuw.",
|
|
599
756
|
askUpdate: (name) => `Je hebt al een installatie met de naam \u2018${name}\u2019. Bijwerken naar deze versie? Je gegevens blijven behouden.`,
|
|
600
757
|
nothingChanged: "Er is niets gewijzigd. Voor een extra installatie kies je een andere naam: npx create-orqevio --name <naam>",
|
|
@@ -605,8 +762,8 @@ opent je browser, zodat je kunt inloggen.`,
|
|
|
605
762
|
"Het inbegrepen gebruik is gratis (10 GB opslag per maand), al kan Cloudflare om een betaalmethode vragen.",
|
|
606
763
|
`Voer daarna opnieuw uit: ${retryCommand}`
|
|
607
764
|
].join("\n"),
|
|
608
|
-
signInPrompt: "Log in bij Cloudflare in de browser die zo meteen opent\u2026\n",
|
|
609
|
-
signInFailed:
|
|
765
|
+
signInPrompt: "Log in bij Cloudflare in de browser die zo meteen opent. Opent hij niet, open dan zelf de link hieronder\u2026\n",
|
|
766
|
+
signInFailed: (command) => `Het inloggen bij Cloudflare is niet afgerond. Is de browser niet geopend, log dan apart in met ${command}, open de link die verschijnt en voer deze opdracht opnieuw uit.`,
|
|
610
767
|
noAccessToAccount: (account, accounts) => `Deze sessie heeft geen toegang tot het account \u2018${account}\u2019. Beschikbare accounts:
|
|
611
768
|
${accounts}`,
|
|
612
769
|
noAccounts: "Er is geen account beschikbaar in je Cloudflare-sessie.",
|
|
@@ -642,7 +799,32 @@ Je installatie is bijgewerkt naar Orqevio ${version}: ${address}`,
|
|
|
642
799
|
`Nieuwe installatiecode: ${setupCode}`,
|
|
643
800
|
"",
|
|
644
801
|
"Open je installatie, kies \u2018Sleutel kwijt?\u2019 en voer deze code in. Je krijgt dan een nieuwe",
|
|
645
|
-
"toegangssleutel. Alle sessies worden uitgelogd; je gegevens en je kluis blijven ongewijzigd."
|
|
802
|
+
"toegangssleutel. Alle sessies worden uitgelogd; je gegevens en je kluis blijven ongewijzigd.",
|
|
803
|
+
"Kan iemand anders de sleutel hebben gehad, antwoord dan \u2018Iemand anders heeft hem misschien\u2019 om ook je agents los te koppelen."
|
|
804
|
+
].join("\n"),
|
|
805
|
+
uninstallNeedsTerminal: "Om te verwijderen typ je de naam van de installatie: voer deze opdracht uit in een terminal.",
|
|
806
|
+
nothingToUninstall: (name) => `Er staat geen installatie met de naam \u2018${name}\u2019 in dit account, dus er is niets te verwijderen.`,
|
|
807
|
+
uninstallWarning: (name, bucket) => [
|
|
808
|
+
`Hiermee verwijder je de installatie \u2018${name}\u2019 definitief, met alles erin:`,
|
|
809
|
+
" \xB7 de Worker, met je werkruimtes, documenten, kluis en agents;",
|
|
810
|
+
` \xB7 de bucket \u2018${bucket}\u2019, met de bijlagen.`,
|
|
811
|
+
"Dit kan niet ongedaan worden gemaakt. Wil je je kluis bewaren, exporteer daar dan eerst een versleutelde kopie van.",
|
|
812
|
+
""
|
|
813
|
+
].join("\n"),
|
|
814
|
+
askUninstallName: (name) => `Typ \u2018${name}\u2019 om te bevestigen: `,
|
|
815
|
+
nothingDeleted: "Er is niets verwijderd.",
|
|
816
|
+
bucketNotEmpty: (bucket, retryCommand) => [
|
|
817
|
+
"",
|
|
818
|
+
`De bucket \u2018${bucket}\u2019 bevat nog bijlagen, en Cloudflare verwijdert alleen lege buckets. Er is niets verwijderd.`,
|
|
819
|
+
`Maak hem op een van deze twee manieren leeg en voer daarna ${retryCommand} opnieuw uit:`,
|
|
820
|
+
" \xB7 in je installatie: Instellingen \u2192 Orqevio verwijderen, waarmee ook de rest van de gegevens verdwijnt;",
|
|
821
|
+
` \xB7 in het Cloudflare-dashboard: R2 \u2192 ${bucket} \u2192 Settings \u2192 Empty Bucket.`
|
|
822
|
+
].join("\n"),
|
|
823
|
+
uninstallFailed: "\nHet verwijderen is niet afgerond. Bekijk de melding van Wrangler hierboven; je kunt de opdracht opnieuw uitvoeren.",
|
|
824
|
+
uninstalled: (name, logoutCommand) => [
|
|
825
|
+
"",
|
|
826
|
+
`De installatie \u2018${name}\u2019 is verwijderd: de Worker en de bucket staan niet meer in je Cloudflare-account.`,
|
|
827
|
+
`Gebruik je Wrangler verder nergens voor, meld je dan af met ${logoutCommand}.`
|
|
646
828
|
].join("\n")
|
|
647
829
|
};
|
|
648
830
|
|
|
@@ -654,6 +836,7 @@ Uso:
|
|
|
654
836
|
npx create-orqevio Instala uma nova c\xF3pia
|
|
655
837
|
npx create-orqevio@latest update Atualiza sua c\xF3pia para a vers\xE3o mais recente (seus dados s\xE3o mantidos)
|
|
656
838
|
npx create-orqevio@latest recover Gera um novo c\xF3digo para recuperar seu acesso
|
|
839
|
+
npx create-orqevio@latest uninstall Apaga sua c\xF3pia e tudo o que ela cont\xE9m
|
|
657
840
|
|
|
658
841
|
Op\xE7\xF5es:
|
|
659
842
|
--name <nome> Nome da c\xF3pia (${defaultName} por padr\xE3o). Ele passa a fazer parte do endere\xE7o.
|
|
@@ -676,7 +859,7 @@ navegador abre para voc\xEA fazer login.`,
|
|
|
676
859
|
askName: (defaultName) => `Nome da c\xF3pia (${defaultName}): `,
|
|
677
860
|
badName: (name) => `\u201C${name}\u201D n\xE3o pode ser usado como nome.`,
|
|
678
861
|
nameRule: "Use de 1 a 50 letras min\xFAsculas, n\xFAmeros ou hifens (sem h\xEDfen no in\xEDcio nem no fim).",
|
|
679
|
-
heading: (action, version, name) => `Orqevio ${version} \xB7 ${{ install: "Instalando a c\xF3pia", update: "Atualizando a c\xF3pia", recover: "Recuperando o acesso \xE0 c\xF3pia" }[action]} \u201C${name}\u201D`,
|
|
862
|
+
heading: (action, version, name) => `Orqevio ${version} \xB7 ${{ install: "Instalando a c\xF3pia", update: "Atualizando a c\xF3pia", recover: "Recuperando o acesso \xE0 c\xF3pia", uninstall: "Desinstalando a c\xF3pia" }[action]} \u201C${name}\u201D`,
|
|
680
863
|
accountUnreachable: "N\xE3o foi poss\xEDvel verificar sua conta da Cloudflare. Tente de novo em alguns minutos.",
|
|
681
864
|
askUpdate: (name) => `Voc\xEA j\xE1 tem uma c\xF3pia chamada \u201C${name}\u201D. Quer atualiz\xE1-la para esta vers\xE3o? Seus dados s\xE3o mantidos.`,
|
|
682
865
|
nothingChanged: "Nada foi alterado. Para outra c\xF3pia, use outro nome: npx create-orqevio --name <nome>",
|
|
@@ -687,8 +870,8 @@ navegador abre para voc\xEA fazer login.`,
|
|
|
687
870
|
"O uso inclu\xEDdo \xE9 gratuito (10 GB de armazenamento por m\xEAs), embora a Cloudflare possa pedir uma forma de pagamento.",
|
|
688
871
|
`Depois, execute de novo: ${retryCommand}`
|
|
689
872
|
].join("\n"),
|
|
690
|
-
signInPrompt: "Fa\xE7a login na Cloudflare no navegador que vai se abrir\u2026\n",
|
|
691
|
-
signInFailed:
|
|
873
|
+
signInPrompt: "Fa\xE7a login na Cloudflare no navegador que vai se abrir. Se ele n\xE3o abrir, abra voc\xEA mesmo o link que aparece abaixo\u2026\n",
|
|
874
|
+
signInFailed: (command) => `O login na Cloudflare n\xE3o foi conclu\xEDdo. Se o navegador n\xE3o abriu, fa\xE7a login separadamente com ${command}, abra o link que ele mostrar e execute este comando de novo.`,
|
|
692
875
|
noAccessToAccount: (account, accounts) => `Esta sess\xE3o n\xE3o tem acesso \xE0 conta \u201C${account}\u201D. Contas dispon\xEDveis:
|
|
693
876
|
${accounts}`,
|
|
694
877
|
noAccounts: "Sua sess\xE3o da Cloudflare n\xE3o tem nenhuma conta dispon\xEDvel.",
|
|
@@ -724,7 +907,32 @@ Sua c\xF3pia foi atualizada para o Orqevio ${version}: ${address}`,
|
|
|
724
907
|
`Novo c\xF3digo de configura\xE7\xE3o: ${setupCode}`,
|
|
725
908
|
"",
|
|
726
909
|
"Abra sua c\xF3pia, escolha \u201CPerdeu sua chave?\u201D e digite este c\xF3digo para receber uma nova",
|
|
727
|
-
"chave de acesso. Todas as sess\xF5es s\xE3o encerradas; seus dados e seu cofre n\xE3o mudam."
|
|
910
|
+
"chave de acesso. Todas as sess\xF5es s\xE3o encerradas; seus dados e seu cofre n\xE3o mudam.",
|
|
911
|
+
"Se outra pessoa pode ter tido a chave, responda \u201CTalvez outra pessoa a tenha\u201D para desconectar tamb\xE9m seus agentes."
|
|
912
|
+
].join("\n"),
|
|
913
|
+
uninstallNeedsTerminal: "Para desinstalar, voc\xEA precisa digitar o nome da c\xF3pia: execute este comando em um terminal.",
|
|
914
|
+
nothingToUninstall: (name) => `N\xE3o h\xE1 nenhuma c\xF3pia chamada \u201C${name}\u201D nesta conta: n\xE3o h\xE1 nada para apagar.`,
|
|
915
|
+
uninstallWarning: (name, bucket) => [
|
|
916
|
+
`Isto apaga para sempre a c\xF3pia \u201C${name}\u201D, com tudo o que ela cont\xE9m:`,
|
|
917
|
+
" \xB7 o Worker dela, com seus espa\xE7os, documentos, cofre e agentes;",
|
|
918
|
+
` \xB7 o bucket \u201C${bucket}\u201D, com os anexos.`,
|
|
919
|
+
"N\xE3o pode ser desfeito. Para manter o cofre, exporte antes uma c\xF3pia criptografada dele.",
|
|
920
|
+
""
|
|
921
|
+
].join("\n"),
|
|
922
|
+
askUninstallName: (name) => `Digite \u201C${name}\u201D para confirmar: `,
|
|
923
|
+
nothingDeleted: "Nada foi apagado.",
|
|
924
|
+
bucketNotEmpty: (bucket, retryCommand) => [
|
|
925
|
+
"",
|
|
926
|
+
`O bucket \u201C${bucket}\u201D ainda guarda anexos, e a Cloudflare s\xF3 apaga buckets vazios. Nada foi apagado.`,
|
|
927
|
+
`Esvazie-o de uma destas duas formas e execute ${retryCommand} de novo:`,
|
|
928
|
+
" \xB7 na sua c\xF3pia: Configura\xE7\xF5es \u2192 Desinstalar o Orqevio, que tamb\xE9m apaga o resto dos dados dela;",
|
|
929
|
+
` \xB7 no painel da Cloudflare: R2 \u2192 ${bucket} \u2192 Settings \u2192 Empty Bucket.`
|
|
930
|
+
].join("\n"),
|
|
931
|
+
uninstallFailed: "\nA desinstala\xE7\xE3o n\xE3o terminou. Confira a mensagem do Wrangler acima; voc\xEA pode executar o comando de novo.",
|
|
932
|
+
uninstalled: (name, logoutCommand) => [
|
|
933
|
+
"",
|
|
934
|
+
`A c\xF3pia \u201C${name}\u201D foi desinstalada: o Worker e o bucket dela n\xE3o est\xE3o mais na sua conta da Cloudflare.`,
|
|
935
|
+
`Se voc\xEA n\xE3o usa o Wrangler para mais nada, saia da sess\xE3o com ${logoutCommand}.`
|
|
728
936
|
].join("\n")
|
|
729
937
|
};
|
|
730
938
|
|
|
@@ -760,8 +968,20 @@ function generateSetupCode(bytes = randomBytes(10)) {
|
|
|
760
968
|
return out.match(/.{1,4}/g).join("-");
|
|
761
969
|
}
|
|
762
970
|
|
|
763
|
-
// src/
|
|
971
|
+
// src/browser.ts
|
|
764
972
|
import { spawn } from "node:child_process";
|
|
973
|
+
function openOnWindows(url) {
|
|
974
|
+
try {
|
|
975
|
+
const child = spawn("explorer.exe", [url], { stdio: "ignore", detached: true, windowsHide: true });
|
|
976
|
+
child.on("error", () => {
|
|
977
|
+
});
|
|
978
|
+
child.unref();
|
|
979
|
+
} catch {
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
// src/wrangler.ts
|
|
984
|
+
import { spawn as spawn2 } from "node:child_process";
|
|
765
985
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
766
986
|
import { createRequire as createRequire2 } from "node:module";
|
|
767
987
|
import { tmpdir } from "node:os";
|
|
@@ -776,15 +996,20 @@ function wranglerScript() {
|
|
|
776
996
|
}
|
|
777
997
|
function runWrangler(args, options = {}) {
|
|
778
998
|
return new Promise((resolve, reject) => {
|
|
779
|
-
const child =
|
|
999
|
+
const child = spawn2(process.execPath, [wranglerScript(), ...args], {
|
|
780
1000
|
cwd: options.cwd ?? tmpdir(),
|
|
781
1001
|
// Wrangler's anonymous telemetry stays off unless the user turned it on themselves.
|
|
782
1002
|
env: { WRANGLER_SEND_METRICS: "false", ...process.env, ...options.env },
|
|
783
|
-
stdio: [options.input !== void 0 ? "pipe" : "inherit", options.capture ? "pipe" : "inherit", options.capture ? "pipe" : "inherit"]
|
|
1003
|
+
stdio: [options.input !== void 0 ? "pipe" : "inherit", options.capture || options.onOutput ? "pipe" : "inherit", options.capture ? "pipe" : "inherit"]
|
|
784
1004
|
});
|
|
785
1005
|
let stdout = "";
|
|
786
1006
|
let stderr = "";
|
|
787
|
-
child.stdout?.on("data", (chunk) =>
|
|
1007
|
+
child.stdout?.on("data", (chunk) => {
|
|
1008
|
+
if (options.onOutput) {
|
|
1009
|
+
process.stdout.write(chunk);
|
|
1010
|
+
options.onOutput(String(chunk));
|
|
1011
|
+
} else stdout += chunk;
|
|
1012
|
+
});
|
|
788
1013
|
child.stderr?.on("data", (chunk) => stderr += chunk);
|
|
789
1014
|
if (options.input !== void 0) child.stdin.end(options.input);
|
|
790
1015
|
child.on("error", reject);
|
|
@@ -812,6 +1037,7 @@ function deployedUrls(outputFile) {
|
|
|
812
1037
|
|
|
813
1038
|
// src/main.ts
|
|
814
1039
|
var MIN_NODE = [22, 12];
|
|
1040
|
+
var MANUAL_SIGN_IN = "npx wrangler login --browser=false";
|
|
815
1041
|
var R2_DASHBOARD = "https://dash.cloudflare.com/?to=/:account/r2/overview";
|
|
816
1042
|
async function main(argv, io = terminalIo(), deps = {}) {
|
|
817
1043
|
const asked = requestedLanguage(argv);
|
|
@@ -860,10 +1086,14 @@ ${m.help(DEFAULT_NAME)}`);
|
|
|
860
1086
|
io.out(JSON.stringify(copyConfig(orqevio.base, orqevio.dir, name), null, 2));
|
|
861
1087
|
return 0;
|
|
862
1088
|
}
|
|
1089
|
+
if (command === "uninstall" && !io.ask) {
|
|
1090
|
+
io.err(m.uninstallNeedsTerminal);
|
|
1091
|
+
return 1;
|
|
1092
|
+
}
|
|
863
1093
|
io.out(`
|
|
864
1094
|
${m.heading(command, orqevio.version, name)}
|
|
865
1095
|
`);
|
|
866
|
-
const accounts = await signIn(io, m);
|
|
1096
|
+
const accounts = await signIn(io, m, deps);
|
|
867
1097
|
if (!accounts) return 1;
|
|
868
1098
|
const account = await chooseAccount(accounts, givenAccount ?? process.env.CLOUDFLARE_ACCOUNT_ID, io, m);
|
|
869
1099
|
if (!account) return 1;
|
|
@@ -873,6 +1103,7 @@ ${m.heading(command, orqevio.version, name)}
|
|
|
873
1103
|
io.err(m.accountUnreachable);
|
|
874
1104
|
return 1;
|
|
875
1105
|
}
|
|
1106
|
+
if (command === "uninstall") return uninstall(name, exists, env, io, m);
|
|
876
1107
|
let mode = command;
|
|
877
1108
|
if (command === "install" && exists) {
|
|
878
1109
|
const answer = io.ask ? (await io.ask(`${m.askUpdate(name)} ${m.yesNo} `)).trim() : "n";
|
|
@@ -929,7 +1160,7 @@ function parse(argv, m) {
|
|
|
929
1160
|
const { values, positionals } = args;
|
|
930
1161
|
if (positionals.length > 1) throw new Error(m.extraArgument(positionals[1]));
|
|
931
1162
|
const command = positionals[0] ?? "install";
|
|
932
|
-
if (!["install", "update", "recover", "config", "deploy-repo"].includes(command)) throw new Error(m.unknownCommand(command));
|
|
1163
|
+
if (!["install", "update", "recover", "uninstall", "config", "deploy-repo"].includes(command)) throw new Error(m.unknownCommand(command));
|
|
933
1164
|
if (values["dry-run"] && command !== "deploy-repo") throw new Error(m.dryRunOnlyForDeployRepo);
|
|
934
1165
|
return {
|
|
935
1166
|
command,
|
|
@@ -942,15 +1173,32 @@ function parse(argv, m) {
|
|
|
942
1173
|
};
|
|
943
1174
|
}
|
|
944
1175
|
var nameFlag = (name) => name === DEFAULT_NAME ? "" : ` --name ${name}`;
|
|
945
|
-
async function signIn(io, m) {
|
|
1176
|
+
async function signIn(io, m, deps) {
|
|
946
1177
|
let accounts = await whoami();
|
|
947
1178
|
if (!accounts) {
|
|
948
1179
|
io.out(m.signInPrompt);
|
|
949
|
-
if ((await
|
|
1180
|
+
if ((await login(deps)).code === 0) accounts = await whoami();
|
|
950
1181
|
}
|
|
951
|
-
if (!accounts) io.err(m.signInFailed);
|
|
1182
|
+
if (!accounts) io.err(m.signInFailed(MANUAL_SIGN_IN));
|
|
952
1183
|
return accounts;
|
|
953
1184
|
}
|
|
1185
|
+
function login(deps) {
|
|
1186
|
+
if ((deps.platform ?? process.platform) !== "win32") return runWrangler(["login"]);
|
|
1187
|
+
const open = deps.openOnWindows ?? openOnWindows;
|
|
1188
|
+
let seen = "";
|
|
1189
|
+
let opened = false;
|
|
1190
|
+
return runWrangler(["login", "--browser=false"], {
|
|
1191
|
+
onOutput: (text) => {
|
|
1192
|
+
if (opened) return;
|
|
1193
|
+
seen += text;
|
|
1194
|
+
const url = /Visit this link to authenticate: (https:\/\/\S+)\s/.exec(seen)?.[1];
|
|
1195
|
+
if (url) {
|
|
1196
|
+
opened = true;
|
|
1197
|
+
open(url);
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
});
|
|
1201
|
+
}
|
|
954
1202
|
async function whoami() {
|
|
955
1203
|
const { stdout } = await runWrangler(["whoami", "--json"], { capture: true });
|
|
956
1204
|
try {
|
|
@@ -1060,9 +1308,8 @@ async function deployRepo(orqevio, dryRun, io, m) {
|
|
|
1060
1308
|
io.err(`${m.badRepoName(name)} ${m.nameRule}`);
|
|
1061
1309
|
return 1;
|
|
1062
1310
|
}
|
|
1063
|
-
const config = copyConfig(orqevio.base, orqevio.dir, name, "button");
|
|
1064
1311
|
const bucket = repo.r2_buckets?.find((b) => b.binding === "UPLOADS")?.bucket_name;
|
|
1065
|
-
|
|
1312
|
+
const config = copyConfig(orqevio.base, orqevio.dir, name, "button", bucket || void 0);
|
|
1066
1313
|
return withWorkspace(async (dir) => {
|
|
1067
1314
|
const configFile = path3.join(dir, "wrangler.json");
|
|
1068
1315
|
await writeFile(configFile, JSON.stringify(config, null, 2));
|
|
@@ -1082,6 +1329,43 @@ async function recover(name, env, io, m) {
|
|
|
1082
1329
|
io.out(m.recovered(setupCode));
|
|
1083
1330
|
return 0;
|
|
1084
1331
|
}
|
|
1332
|
+
async function uninstall(name, workerFound, env, io, m) {
|
|
1333
|
+
const bucket = bucketName(name);
|
|
1334
|
+
const bucketFound = await bucketExists(bucket, env);
|
|
1335
|
+
if (!workerFound && bucketFound === false) {
|
|
1336
|
+
io.err(m.nothingToUninstall(name));
|
|
1337
|
+
return 1;
|
|
1338
|
+
}
|
|
1339
|
+
io.out(m.uninstallWarning(name, bucket));
|
|
1340
|
+
if ((await io.ask(m.askUninstallName(name))).trim() !== name) {
|
|
1341
|
+
io.err(m.nothingDeleted);
|
|
1342
|
+
return 1;
|
|
1343
|
+
}
|
|
1344
|
+
if (bucketFound !== false) {
|
|
1345
|
+
const run = await runWrangler(["r2", "bucket", "delete", bucket], { capture: true, env });
|
|
1346
|
+
const output = run.stdout + run.stderr;
|
|
1347
|
+
if (run.code !== 0 && /\b10008\b/.test(output)) {
|
|
1348
|
+
io.err(m.bucketNotEmpty(bucket, `npx create-orqevio@latest uninstall${nameFlag(name)}`));
|
|
1349
|
+
return 1;
|
|
1350
|
+
}
|
|
1351
|
+
if (run.code !== 0 && !/\b10006\b/.test(output)) {
|
|
1352
|
+
io.err(output.trim());
|
|
1353
|
+
io.err(m.uninstallFailed);
|
|
1354
|
+
return 1;
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
if (workerFound && (await runWrangler(["delete", "--name", name, "--force"], { env })).code !== 0) {
|
|
1358
|
+
io.err(m.uninstallFailed);
|
|
1359
|
+
return 1;
|
|
1360
|
+
}
|
|
1361
|
+
io.out(m.uninstalled(name, "npx wrangler logout"));
|
|
1362
|
+
return 0;
|
|
1363
|
+
}
|
|
1364
|
+
async function bucketExists(bucket, env) {
|
|
1365
|
+
const run = await runWrangler(["r2", "bucket", "info", bucket, "--json"], { capture: true, env });
|
|
1366
|
+
if (run.code === 0) return true;
|
|
1367
|
+
return /\b10006\b/.test(run.stdout + run.stderr) ? false : null;
|
|
1368
|
+
}
|
|
1085
1369
|
function terminalIo() {
|
|
1086
1370
|
return {
|
|
1087
1371
|
out: (text) => process.stdout.write(`${text}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-orqevio",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.3",
|
|
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-rc.
|
|
24
|
+
"orqevio": "1.0.0-rc.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^22.20.5",
|