create-orqevio 1.0.0-rc.2 → 1.0.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/cli.js +545 -54
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/main.ts
|
|
4
|
+
import { randomBytes as randomBytes2 } from "node:crypto";
|
|
4
5
|
import { rmSync } from "node:fs";
|
|
5
6
|
import { mkdtemp, writeFile } from "node:fs/promises";
|
|
6
7
|
import { tmpdir as tmpdir2 } from "node:os";
|
|
@@ -25,15 +26,15 @@ function loadOrqevio(from = import.meta.url) {
|
|
|
25
26
|
const base = JSON.parse(readFileSync(path.join(dir, "dist/wrangler.json"), "utf8"));
|
|
26
27
|
return { dir: path.join(dir, "dist"), version, base };
|
|
27
28
|
}
|
|
28
|
-
function copyConfig(base, distDir, name, install = "cli") {
|
|
29
|
+
function copyConfig(base, distDir, name, install = "cli", bucket = bucketName(name)) {
|
|
29
30
|
return {
|
|
30
31
|
...base,
|
|
31
32
|
name,
|
|
32
33
|
// Other variables set in the dashboard are kept (keep_vars below).
|
|
33
|
-
vars: { ...base.vars, ORQEVIO_INSTALL: install, ORQEVIO_COPY_NAME: name },
|
|
34
|
+
vars: { ...base.vars, ORQEVIO_INSTALL: install, ORQEVIO_COPY_NAME: name, ORQEVIO_BUCKET: bucket },
|
|
34
35
|
main: path.join(distDir, base.main),
|
|
35
36
|
assets: { ...base.assets, directory: path.join(distDir, base.assets.directory) },
|
|
36
|
-
r2_buckets: base.r2_buckets.map((
|
|
37
|
+
r2_buckets: base.r2_buckets.map((binding) => binding.binding === "UPLOADS" ? { ...binding, bucket_name: bucket } : binding),
|
|
37
38
|
// Variables the owner set in the Cloudflare dashboard (APP_URL, MAX_UPLOAD_MB) survive updates.
|
|
38
39
|
keep_vars: true
|
|
39
40
|
};
|
|
@@ -75,6 +76,7 @@ Verwendung:
|
|
|
75
76
|
npx create-orqevio Installiert eine neue Instanz
|
|
76
77
|
npx create-orqevio@latest update Aktualisiert deine Instanz auf die neueste Version (deine Daten bleiben erhalten)
|
|
77
78
|
npx create-orqevio@latest recover Erzeugt einen neuen Code, mit dem du deinen Zugang wiederherstellst
|
|
79
|
+
npx create-orqevio@latest uninstall L\xF6scht deine Instanz mit allem, was darin ist
|
|
78
80
|
|
|
79
81
|
Optionen:
|
|
80
82
|
--name <name> Name der Instanz (standardm\xE4\xDFig ${defaultName}). Er wird Teil ihrer Adresse.
|
|
@@ -97,7 +99,7 @@ sich dein Browser, damit du dich anmelden kannst.`,
|
|
|
97
99
|
askName: (defaultName) => `Name der Instanz (${defaultName}): `,
|
|
98
100
|
badName: (name) => `\u201E${name}\u201C kann nicht als Name verwendet werden.`,
|
|
99
101
|
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]}`,
|
|
102
|
+
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
103
|
accountUnreachable: "Dein Cloudflare-Konto konnte nicht gepr\xFCft werden. Versuch es in ein paar Minuten noch einmal.",
|
|
102
104
|
askUpdate: (name) => `Du hast bereits eine Instanz namens \u201E${name}\u201C. Auf diese Version aktualisieren? Deine Daten bleiben erhalten.`,
|
|
103
105
|
nothingChanged: "Es wurde nichts ge\xE4ndert. F\xFCr eine weitere Instanz nimm einen anderen Namen: npx create-orqevio --name <name>",
|
|
@@ -108,8 +110,8 @@ sich dein Browser, damit du dich anmelden kannst.`,
|
|
|
108
110
|
"Die enthaltene Nutzung ist kostenlos (10 GB Speicherplatz pro Monat), Cloudflare fragt aber eventuell nach einer Zahlungsmethode.",
|
|
109
111
|
`F\xFChre danach erneut aus: ${retryCommand}`
|
|
110
112
|
].join("\n"),
|
|
111
|
-
signInPrompt: "Melde dich in dem Browserfenster, das sich gleich \xF6ffnet, bei Cloudflare an\u2026\n",
|
|
112
|
-
signInFailed:
|
|
113
|
+
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",
|
|
114
|
+
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
115
|
noAccessToAccount: (account, accounts) => `Diese Sitzung hat keinen Zugriff auf das Konto \u201E${account}\u201C. Verf\xFCgbare Konten:
|
|
114
116
|
${accounts}`,
|
|
115
117
|
noAccounts: "In deiner Cloudflare-Sitzung ist kein Konto verf\xFCgbar.",
|
|
@@ -146,8 +148,48 @@ Deine Instanz l\xE4uft jetzt mit Orqevio ${version}: ${address}`,
|
|
|
146
148
|
"",
|
|
147
149
|
"\xD6ffne deine Instanz, w\xE4hle \u201ESchl\xFCssel verloren?\u201C und gib diesen Code ein, um einen neuen",
|
|
148
150
|
"Zugangsschl\xFCssel zu bekommen. Alle Sitzungen werden abgemeldet; deine Daten und dein",
|
|
149
|
-
"Tresor bleiben unver\xE4ndert."
|
|
150
|
-
|
|
151
|
+
"Tresor bleiben unver\xE4ndert.",
|
|
152
|
+
"Falls jemand anderes den Schl\xFCssel gehabt haben k\xF6nnte, antworte \u201EJemand anderes k\xF6nnte ihn haben\u201C, um auch deine Agenten zu trennen."
|
|
153
|
+
].join("\n"),
|
|
154
|
+
uninstallNeedsTerminal: "Zum Deinstallieren gibst du den Namen der Instanz ein: F\xFChre diesen Befehl in einem Terminal aus.",
|
|
155
|
+
nothingToUninstall: (name) => `In diesem Konto gibt es keine Instanz namens \u201E${name}\u201C, also gibt es nichts zu l\xF6schen.`,
|
|
156
|
+
uninstallWarning: (name, bucket) => [
|
|
157
|
+
`Damit wird die Instanz \u201E${name}\u201C endg\xFCltig gel\xF6scht, mit allem, was darin ist:`,
|
|
158
|
+
" \xB7 ihr Worker, mit deinen Arbeitsbereichen, Dokumenten, deinem Tresor und deinen Agenten;",
|
|
159
|
+
` \xB7 ihr Bucket \u201E${bucket}\u201C, mit den Anh\xE4ngen.`,
|
|
160
|
+
"Das l\xE4sst sich nicht r\xFCckg\xE4ngig machen. Wenn du deinen Tresor behalten willst, exportiere vorher eine verschl\xFCsselte Kopie daraus.",
|
|
161
|
+
""
|
|
162
|
+
].join("\n"),
|
|
163
|
+
askUninstallName: (name) => `Gib \u201E${name}\u201C ein, um zu best\xE4tigen: `,
|
|
164
|
+
nothingDeleted: "Es wurde nichts gel\xF6scht.",
|
|
165
|
+
bucketNotEmpty: (bucket, retryCommand) => [
|
|
166
|
+
"",
|
|
167
|
+
`Der Bucket \u201E${bucket}\u201C enth\xE4lt noch Anh\xE4nge, und Cloudflare l\xF6scht nur leere Buckets. Es wurde nichts gel\xF6scht.`,
|
|
168
|
+
`Leere ihn auf eine dieser beiden Arten und f\xFChre dann ${retryCommand} noch einmal aus:`,
|
|
169
|
+
" \xB7 in deiner Instanz: Einstellungen \u2192 Orqevio deinstallieren, was auch die \xFCbrigen Daten l\xF6scht;",
|
|
170
|
+
` \xB7 im Cloudflare-Dashboard: R2 \u2192 ${bucket} \u2192 Settings \u2192 Empty Bucket.`
|
|
171
|
+
].join("\n"),
|
|
172
|
+
uninstallFailed: "\nDie Deinstallation wurde nicht abgeschlossen. Sieh dir die Meldung von Wrangler oben an; du kannst den Befehl noch einmal ausf\xFChren.",
|
|
173
|
+
uninstalled: (name, logoutCommand) => [
|
|
174
|
+
"",
|
|
175
|
+
`Die Instanz \u201E${name}\u201C ist deinstalliert: Ihr Worker und ihr Bucket sind aus deinem Cloudflare-Konto entfernt.`,
|
|
176
|
+
`Wenn du Wrangler sonst nicht nutzt, melde dich mit ${logoutCommand} ab.`
|
|
177
|
+
].join("\n"),
|
|
178
|
+
emptyingThroughCopy: (bucket) => [
|
|
179
|
+
"",
|
|
180
|
+
`Der Bucket \u201E${bucket}\u201C enth\xE4lt noch Anh\xE4nge, und Cloudflare l\xF6scht nur leere Buckets.`,
|
|
181
|
+
"Der Installer kann deine Instanz die Anh\xE4nge l\xF6schen lassen: Er autorisiert sie \xFCber dein Cloudflare-Konto, ohne deinen Zugangsschl\xFCssel.",
|
|
182
|
+
"Lass die Antwort leer, wenn du es anders machen willst."
|
|
183
|
+
].join("\n"),
|
|
184
|
+
askAddress: (name) => `Adresse deiner Instanz (zum Beispiel https://${name}.<deine-subdomain>.workers.dev): `,
|
|
185
|
+
badAddress: (address) => `\u201E${address}\u201C ist keine Adresse: Nimm die, die du im Browser \xF6ffnest.`,
|
|
186
|
+
notOrqevio: (origin) => `Unter ${origin} antwortet keine Orqevio-Instanz.`,
|
|
187
|
+
otherCopy: (origin, other, name) => `${origin} ist die Instanz \u201E${other}\u201C, nicht \u201E${name}\u201C.`,
|
|
188
|
+
copyUnreachable: (origin, detail) => `Deine Instanz unter ${origin} war nicht erreichbar (${detail}). Es wurde nichts gel\xF6scht.`,
|
|
189
|
+
authorizingCopy: "Deine Instanz wird \xFCber dein Cloudflare-Konto autorisiert; warte auf ihre Antwort (ein paar Sekunden) \u2026",
|
|
190
|
+
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
|
+
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
|
+
copyEmptied: "Deine Instanz hat ihre Daten und Anh\xE4nge gel\xF6scht."
|
|
151
193
|
};
|
|
152
194
|
|
|
153
195
|
// src/messages/en.ts
|
|
@@ -158,6 +200,7 @@ Usage:
|
|
|
158
200
|
npx create-orqevio Install a new copy
|
|
159
201
|
npx create-orqevio@latest update Update your copy to the latest version (your data is kept)
|
|
160
202
|
npx create-orqevio@latest recover Get a new code to recover your access
|
|
203
|
+
npx create-orqevio@latest uninstall Delete your copy and everything in it
|
|
161
204
|
|
|
162
205
|
Options:
|
|
163
206
|
--name <name> Name of the copy (${defaultName} by default). It becomes part of its address.
|
|
@@ -180,7 +223,7 @@ opens so you can sign in.`,
|
|
|
180
223
|
askName: (defaultName) => `Name of the copy (${defaultName}): `,
|
|
181
224
|
badName: (name) => `\u201C${name}\u201D can\u2019t be used as a name.`,
|
|
182
225
|
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`,
|
|
226
|
+
heading: (action, version, name) => `Orqevio ${version} \xB7 ${{ install: "Installing", update: "Updating", recover: "Recovering access to", uninstall: "Uninstalling" }[action]} the copy \u201C${name}\u201D`,
|
|
184
227
|
accountUnreachable: "Couldn\u2019t check your Cloudflare account. Try again in a few minutes.",
|
|
185
228
|
askUpdate: (name) => `You already have a copy called \u201C${name}\u201D. Update it to this version? Your data is kept.`,
|
|
186
229
|
nothingChanged: "Nothing has changed. For another copy, use another name: npx create-orqevio --name <name>",
|
|
@@ -191,8 +234,8 @@ opens so you can sign in.`,
|
|
|
191
234
|
"The included usage is free (10 GB of storage a month), although Cloudflare may ask for a payment method.",
|
|
192
235
|
`Then run again: ${retryCommand}`
|
|
193
236
|
].join("\n"),
|
|
194
|
-
signInPrompt: "Sign in to Cloudflare in the browser that\u2019s about to open\u2026\n",
|
|
195
|
-
signInFailed:
|
|
237
|
+
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",
|
|
238
|
+
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
239
|
noAccessToAccount: (account, accounts) => `This session has no access to the account \u201C${account}\u201D. Available accounts:
|
|
197
240
|
${accounts}`,
|
|
198
241
|
noAccounts: "Your Cloudflare session has no account available.",
|
|
@@ -228,8 +271,48 @@ Your copy is updated to Orqevio ${version}: ${address}`,
|
|
|
228
271
|
`New setup code: ${setupCode}`,
|
|
229
272
|
"",
|
|
230
273
|
"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."
|
|
232
|
-
|
|
274
|
+
"Every session is signed out; your data and your vault don\u2019t change.",
|
|
275
|
+
"If someone else may have had the key, answer \u201CSomeone else may have it\u201D to disconnect your agents too."
|
|
276
|
+
].join("\n"),
|
|
277
|
+
uninstallNeedsTerminal: "To uninstall, you type the copy\u2019s name to confirm: run this command in a terminal.",
|
|
278
|
+
nothingToUninstall: (name) => `There\u2019s no copy called \u201C${name}\u201D in this account, so there\u2019s nothing to delete.`,
|
|
279
|
+
uninstallWarning: (name, bucket) => [
|
|
280
|
+
`This deletes the copy \u201C${name}\u201D for good, with everything in it:`,
|
|
281
|
+
" \xB7 its Worker, with your workspaces, documents, vault and agents;",
|
|
282
|
+
` \xB7 its bucket \u201C${bucket}\u201D, with the attachments.`,
|
|
283
|
+
"It can\u2019t be undone. To keep your vault, export an encrypted copy from it first.",
|
|
284
|
+
""
|
|
285
|
+
].join("\n"),
|
|
286
|
+
askUninstallName: (name) => `Type \u201C${name}\u201D to confirm: `,
|
|
287
|
+
nothingDeleted: "Nothing was deleted.",
|
|
288
|
+
bucketNotEmpty: (bucket, retryCommand) => [
|
|
289
|
+
"",
|
|
290
|
+
`The bucket \u201C${bucket}\u201D still holds attachments, and Cloudflare only deletes empty buckets. Nothing was deleted.`,
|
|
291
|
+
`Empty it in one of these two ways, then run ${retryCommand} again:`,
|
|
292
|
+
" \xB7 in your copy: Settings \u2192 Uninstall Orqevio, which also deletes the rest of its data;",
|
|
293
|
+
` \xB7 in the Cloudflare dashboard: R2 \u2192 ${bucket} \u2192 Settings \u2192 Empty Bucket.`
|
|
294
|
+
].join("\n"),
|
|
295
|
+
uninstallFailed: "\nThe uninstall didn\u2019t finish. Check Wrangler\u2019s message above; you can run the command again.",
|
|
296
|
+
uninstalled: (name, logoutCommand) => [
|
|
297
|
+
"",
|
|
298
|
+
`The copy \u201C${name}\u201D is uninstalled: its Worker and its bucket are gone from your Cloudflare account.`,
|
|
299
|
+
`If you don\u2019t use Wrangler for anything else, sign out with ${logoutCommand}.`
|
|
300
|
+
].join("\n"),
|
|
301
|
+
emptyingThroughCopy: (bucket) => [
|
|
302
|
+
"",
|
|
303
|
+
`The bucket \u201C${bucket}\u201D still holds attachments, and Cloudflare only deletes empty buckets.`,
|
|
304
|
+
"The installer can have your copy delete them: it authorizes the copy from your Cloudflare account, with no need for your access key.",
|
|
305
|
+
"Leave the answer blank to do it another way."
|
|
306
|
+
].join("\n"),
|
|
307
|
+
askAddress: (name) => `Address of your copy (for example https://${name}.<your-subdomain>.workers.dev): `,
|
|
308
|
+
badAddress: (address) => `\u201C${address}\u201D isn\u2019t an address: use the one you open in the browser.`,
|
|
309
|
+
notOrqevio: (origin) => `There\u2019s no copy of Orqevio answering at ${origin}.`,
|
|
310
|
+
otherCopy: (origin, other, name) => `${origin} is the copy \u201C${other}\u201D, not \u201C${name}\u201D.`,
|
|
311
|
+
copyUnreachable: (origin, detail) => `Couldn\u2019t reach your copy at ${origin} (${detail}). Nothing was deleted.`,
|
|
312
|
+
authorizingCopy: "Authorizing your copy from your Cloudflare account and waiting for it to answer (a few seconds)\u2026",
|
|
313
|
+
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
|
+
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
|
+
copyEmptied: "Your copy deleted its data and its attachments."
|
|
233
316
|
};
|
|
234
317
|
|
|
235
318
|
// src/messages/es.ts
|
|
@@ -240,6 +323,7 @@ Uso:
|
|
|
240
323
|
npx create-orqevio Instala una copia nueva
|
|
241
324
|
npx create-orqevio@latest update Actualiza tu copia a la \xFAltima versi\xF3n (tus datos se conservan)
|
|
242
325
|
npx create-orqevio@latest recover Genera un c\xF3digo nuevo para recuperar el acceso
|
|
326
|
+
npx create-orqevio@latest uninstall Borra tu copia y todo lo que contiene
|
|
243
327
|
|
|
244
328
|
Opciones:
|
|
245
329
|
--name <nombre> Nombre de la copia (por defecto, ${defaultName}). Forma parte de su direcci\xF3n.
|
|
@@ -262,7 +346,7 @@ navegador para que inicies sesi\xF3n.`,
|
|
|
262
346
|
askName: (defaultName) => `Nombre de la copia (${defaultName}): `,
|
|
263
347
|
badName: (name) => `\xAB${name}\xBB no vale como nombre.`,
|
|
264
348
|
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`,
|
|
349
|
+
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
350
|
accountUnreachable: "No he podido consultar tu cuenta de Cloudflare. Vuelve a intentarlo en unos minutos.",
|
|
267
351
|
askUpdate: (name) => `Ya tienes una copia llamada \xAB${name}\xBB. \xBFLa actualizo a esta versi\xF3n? Tus datos se conservan.`,
|
|
268
352
|
nothingChanged: "No he cambiado nada. Para otra copia, usa otro nombre: npx create-orqevio --name <nombre>",
|
|
@@ -273,8 +357,8 @@ navegador para que inicies sesi\xF3n.`,
|
|
|
273
357
|
"El uso incluido es gratis (10 GB de almacenamiento al mes), aunque Cloudflare puede pedirte un m\xE9todo de pago.",
|
|
274
358
|
`Despu\xE9s, repite: ${retryCommand}`
|
|
275
359
|
].join("\n"),
|
|
276
|
-
signInPrompt: "Inicia sesi\xF3n en Cloudflare en el navegador que se va a abrir\u2026\n",
|
|
277
|
-
signInFailed:
|
|
360
|
+
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",
|
|
361
|
+
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
362
|
noAccessToAccount: (account, accounts) => `Esta sesi\xF3n no tiene acceso a la cuenta \xAB${account}\xBB. Cuentas disponibles:
|
|
279
363
|
${accounts}`,
|
|
280
364
|
noAccounts: "Tu sesi\xF3n de Cloudflare no tiene ninguna cuenta disponible.",
|
|
@@ -310,8 +394,48 @@ Tu copia est\xE1 actualizada a Orqevio ${version}: ${address}`,
|
|
|
310
394
|
`Nuevo c\xF3digo de configuraci\xF3n: ${setupCode}`,
|
|
311
395
|
"",
|
|
312
396
|
"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."
|
|
314
|
-
|
|
397
|
+
"clave de acceso nueva. Se cerrar\xE1n todas las sesiones; tus datos y tu b\xF3veda no cambian.",
|
|
398
|
+
"Si alguien m\xE1s pudo tener la clave, responde \xABPuede que alguien la tenga\xBB para desconectar tambi\xE9n a tus agentes."
|
|
399
|
+
].join("\n"),
|
|
400
|
+
uninstallNeedsTerminal: "Para desinstalar tienes que escribir el nombre de la copia: ejecuta este comando en una terminal.",
|
|
401
|
+
nothingToUninstall: (name) => `No hay ninguna copia llamada \xAB${name}\xBB en esta cuenta: no hay nada que borrar.`,
|
|
402
|
+
uninstallWarning: (name, bucket) => [
|
|
403
|
+
`Esto borra para siempre la copia \xAB${name}\xBB con todo lo que contiene:`,
|
|
404
|
+
" \xB7 su Worker, con tus espacios, documentos, b\xF3veda y agentes;",
|
|
405
|
+
` \xB7 su bucket \xAB${bucket}\xBB, con los adjuntos.`,
|
|
406
|
+
"No se puede deshacer. Si quieres conservar la b\xF3veda, exporta antes una copia cifrada desde ella.",
|
|
407
|
+
""
|
|
408
|
+
].join("\n"),
|
|
409
|
+
askUninstallName: (name) => `Escribe \xAB${name}\xBB para confirmar: `,
|
|
410
|
+
nothingDeleted: "No se ha borrado nada.",
|
|
411
|
+
bucketNotEmpty: (bucket, retryCommand) => [
|
|
412
|
+
"",
|
|
413
|
+
`El bucket \xAB${bucket}\xBB todav\xEDa guarda adjuntos, y Cloudflare solo borra buckets vac\xEDos. No se ha borrado nada.`,
|
|
414
|
+
`Vac\xEDalo de una de estas dos formas y vuelve a ejecutar ${retryCommand}:`,
|
|
415
|
+
" \xB7 en tu copia: Ajustes \u2192 Desinstalar Orqevio, que adem\xE1s borra el resto de sus datos;",
|
|
416
|
+
` \xB7 en el panel de Cloudflare: R2 \u2192 ${bucket} \u2192 Settings \u2192 Empty Bucket.`
|
|
417
|
+
].join("\n"),
|
|
418
|
+
uninstallFailed: "\nLa desinstalaci\xF3n no ha terminado. Revisa el mensaje de Wrangler de arriba; puedes volver a ejecutar el comando.",
|
|
419
|
+
uninstalled: (name, logoutCommand) => [
|
|
420
|
+
"",
|
|
421
|
+
`La copia \xAB${name}\xBB est\xE1 desinstalada: su Worker y su bucket ya no est\xE1n en tu cuenta de Cloudflare.`,
|
|
422
|
+
`Si no usas Wrangler para nada m\xE1s, cierra la sesi\xF3n con ${logoutCommand}.`
|
|
423
|
+
].join("\n"),
|
|
424
|
+
emptyingThroughCopy: (bucket) => [
|
|
425
|
+
"",
|
|
426
|
+
`El bucket \xAB${bucket}\xBB todav\xEDa guarda adjuntos, y Cloudflare solo borra buckets vac\xEDos.`,
|
|
427
|
+
"El instalador puede pedirle a tu copia que los borre: la autoriza desde tu cuenta de Cloudflare, sin necesidad de tu clave de acceso.",
|
|
428
|
+
"Deja la respuesta en blanco si prefieres hacerlo de otra forma."
|
|
429
|
+
].join("\n"),
|
|
430
|
+
askAddress: (name) => `Direcci\xF3n de tu copia (por ejemplo, https://${name}.<tu-subdominio>.workers.dev): `,
|
|
431
|
+
badAddress: (address) => `\xAB${address}\xBB no es una direcci\xF3n: usa la que abres en el navegador.`,
|
|
432
|
+
notOrqevio: (origin) => `En ${origin} no responde ninguna copia de Orqevio.`,
|
|
433
|
+
otherCopy: (origin, other, name) => `${origin} es la copia \xAB${other}\xBB, no \xAB${name}\xBB.`,
|
|
434
|
+
copyUnreachable: (origin, detail) => `No he podido conectar con tu copia en ${origin} (${detail}). No se ha borrado nada.`,
|
|
435
|
+
authorizingCopy: "Autorizando a tu copia desde tu cuenta de Cloudflare y esperando su respuesta (unos segundos)\u2026",
|
|
436
|
+
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
|
+
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
|
+
copyEmptied: "Tu copia ha borrado sus datos y sus adjuntos."
|
|
315
439
|
};
|
|
316
440
|
|
|
317
441
|
// src/messages/fr.ts
|
|
@@ -322,6 +446,7 @@ Utilisation :
|
|
|
322
446
|
npx create-orqevio Installe une nouvelle copie
|
|
323
447
|
npx create-orqevio@latest update Passe votre copie \xE0 la derni\xE8re version (vos donn\xE9es sont conserv\xE9es)
|
|
324
448
|
npx create-orqevio@latest recover G\xE9n\xE8re un nouveau code pour r\xE9cup\xE9rer votre acc\xE8s
|
|
449
|
+
npx create-orqevio@latest uninstall Supprime votre copie et tout son contenu
|
|
325
450
|
|
|
326
451
|
Options :
|
|
327
452
|
--name <nom> Nom de la copie (${defaultName} par d\xE9faut). Il fait partie de son adresse.
|
|
@@ -344,7 +469,7 @@ navigateur s\u2019ouvre pour que vous puissiez vous connecter.`,
|
|
|
344
469
|
askName: (defaultName) => `Nom de la copie (${defaultName}) : `,
|
|
345
470
|
badName: (name) => `\xAB ${name} \xBB ne peut pas servir de nom.`,
|
|
346
471
|
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`,
|
|
472
|
+
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
473
|
accountUnreachable: "Impossible de v\xE9rifier votre compte Cloudflare. R\xE9essayez dans quelques minutes.",
|
|
349
474
|
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
475
|
nothingChanged: "Rien n\u2019a \xE9t\xE9 modifi\xE9. Pour une autre copie, choisissez un autre nom : npx create-orqevio --name <nom>",
|
|
@@ -355,8 +480,8 @@ navigateur s\u2019ouvre pour que vous puissiez vous connecter.`,
|
|
|
355
480
|
"L\u2019utilisation incluse est gratuite (10 Go de stockage par mois), m\xEAme si Cloudflare peut vous demander un moyen de paiement.",
|
|
356
481
|
`Relancez ensuite : ${retryCommand}`
|
|
357
482
|
].join("\n"),
|
|
358
|
-
signInPrompt: "Connectez-vous \xE0 Cloudflare dans le navigateur qui va s\u2019ouvrir\u2026\n",
|
|
359
|
-
signInFailed:
|
|
483
|
+
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",
|
|
484
|
+
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
485
|
noAccessToAccount: (account, accounts) => `Cette session n\u2019a pas acc\xE8s au compte \xAB ${account} \xBB. Comptes disponibles :
|
|
361
486
|
${accounts}`,
|
|
362
487
|
noAccounts: "Votre session Cloudflare n\u2019a acc\xE8s \xE0 aucun compte.",
|
|
@@ -393,8 +518,48 @@ Votre copie est pass\xE9e \xE0 Orqevio ${version} : ${address}`,
|
|
|
393
518
|
"",
|
|
394
519
|
"Ouvrez votre copie, choisissez \xAB Cl\xE9 perdue ? \xBB et saisissez ce code pour obtenir",
|
|
395
520
|
"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."
|
|
397
|
-
|
|
521
|
+
"et votre coffre-fort ne changent pas.",
|
|
522
|
+
"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."
|
|
523
|
+
].join("\n"),
|
|
524
|
+
uninstallNeedsTerminal: "Pour d\xE9sinstaller, vous devez saisir le nom de la copie : lancez cette commande dans un terminal.",
|
|
525
|
+
nothingToUninstall: (name) => `Ce compte n\u2019a aucune copie nomm\xE9e \xAB ${name} \xBB : il n\u2019y a rien \xE0 supprimer.`,
|
|
526
|
+
uninstallWarning: (name, bucket) => [
|
|
527
|
+
`Ceci supprime d\xE9finitivement la copie \xAB ${name} \xBB et tout son contenu :`,
|
|
528
|
+
" \xB7 son Worker, avec vos espaces, documents, coffre-fort et agents ;",
|
|
529
|
+
` \xB7 son bucket \xAB ${bucket} \xBB, avec les pi\xE8ces jointes.`,
|
|
530
|
+
"C\u2019est irr\xE9versible. Pour conserver votre coffre-fort, exportez-en d\u2019abord une copie chiffr\xE9e.",
|
|
531
|
+
""
|
|
532
|
+
].join("\n"),
|
|
533
|
+
askUninstallName: (name) => `Saisissez \xAB ${name} \xBB pour confirmer : `,
|
|
534
|
+
nothingDeleted: "Rien n\u2019a \xE9t\xE9 supprim\xE9.",
|
|
535
|
+
bucketNotEmpty: (bucket, retryCommand) => [
|
|
536
|
+
"",
|
|
537
|
+
`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.`,
|
|
538
|
+
`Videz-le de l\u2019une de ces deux fa\xE7ons, puis relancez ${retryCommand} :`,
|
|
539
|
+
" \xB7 dans votre copie : Param\xE8tres \u2192 D\xE9sinstaller Orqevio, qui supprime aussi le reste de ses donn\xE9es ;",
|
|
540
|
+
` \xB7 dans le tableau de bord Cloudflare : R2 \u2192 ${bucket} \u2192 Settings \u2192 Empty Bucket.`
|
|
541
|
+
].join("\n"),
|
|
542
|
+
uninstallFailed: "\nLa d\xE9sinstallation n\u2019est pas all\xE9e au bout. Lisez le message de Wrangler ci-dessus ; vous pouvez relancer la commande.",
|
|
543
|
+
uninstalled: (name, logoutCommand) => [
|
|
544
|
+
"",
|
|
545
|
+
`La copie \xAB ${name} \xBB est d\xE9sinstall\xE9e : son Worker et son bucket ont disparu de votre compte Cloudflare.`,
|
|
546
|
+
`Si vous n\u2019utilisez Wrangler pour rien d\u2019autre, d\xE9connectez-vous avec ${logoutCommand}.`
|
|
547
|
+
].join("\n"),
|
|
548
|
+
emptyingThroughCopy: (bucket) => [
|
|
549
|
+
"",
|
|
550
|
+
`Le bucket \xAB ${bucket} \xBB contient encore des pi\xE8ces jointes, et Cloudflare ne supprime que les buckets vides.`,
|
|
551
|
+
"L\u2019installateur peut demander \xE0 votre copie de les supprimer : il l\u2019y autorise depuis votre compte Cloudflare, sans votre cl\xE9 d\u2019acc\xE8s.",
|
|
552
|
+
"Laissez la r\xE9ponse vide pour proc\xE9der autrement."
|
|
553
|
+
].join("\n"),
|
|
554
|
+
askAddress: (name) => `Adresse de votre copie (par exemple https://${name}.<votre-sous-domaine>.workers.dev) : `,
|
|
555
|
+
badAddress: (address) => `\xAB ${address} \xBB n\u2019est pas une adresse : utilisez celle que vous ouvrez dans le navigateur.`,
|
|
556
|
+
notOrqevio: (origin) => `Aucune copie d\u2019Orqevio ne r\xE9pond \xE0 ${origin}.`,
|
|
557
|
+
otherCopy: (origin, other, name) => `${origin} est la copie \xAB ${other} \xBB, pas \xAB ${name} \xBB.`,
|
|
558
|
+
copyUnreachable: (origin, detail) => `Impossible de joindre votre copie \xE0 ${origin} (${detail}). Rien n\u2019a \xE9t\xE9 supprim\xE9.`,
|
|
559
|
+
authorizingCopy: "Autorisation de votre copie depuis votre compte Cloudflare, en attente de sa r\xE9ponse (quelques secondes)\u2026",
|
|
560
|
+
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
|
+
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
|
+
copyEmptied: "Votre copie a supprim\xE9 ses donn\xE9es et ses pi\xE8ces jointes."
|
|
398
563
|
};
|
|
399
564
|
|
|
400
565
|
// src/messages/it.ts
|
|
@@ -405,6 +570,7 @@ Uso:
|
|
|
405
570
|
npx create-orqevio Installa una nuova copia
|
|
406
571
|
npx create-orqevio@latest update Aggiorna la tua copia all\u2019ultima versione (senza perdere i dati)
|
|
407
572
|
npx create-orqevio@latest recover Genera un nuovo codice per recuperare l\u2019accesso
|
|
573
|
+
npx create-orqevio@latest uninstall Elimina la tua copia e tutto ci\xF2 che contiene
|
|
408
574
|
|
|
409
575
|
Opzioni:
|
|
410
576
|
--name <nome> Nome della copia (predefinito: ${defaultName}). Diventa parte del suo indirizzo.
|
|
@@ -427,7 +593,7 @@ per farti accedere.`,
|
|
|
427
593
|
askName: (defaultName) => `Nome della copia (${defaultName}): `,
|
|
428
594
|
badName: (name) => `\xAB${name}\xBB non si pu\xF2 usare come nome.`,
|
|
429
595
|
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`,
|
|
596
|
+
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
597
|
accountUnreachable: "Non sono riuscito a controllare il tuo account Cloudflare. Riprova tra qualche minuto.",
|
|
432
598
|
askUpdate: (name) => `Hai gi\xE0 una copia chiamata \xAB${name}\xBB. Vuoi aggiornarla a questa versione? I tuoi dati vengono mantenuti.`,
|
|
433
599
|
nothingChanged: "Non ho cambiato nulla. Per un\u2019altra copia, usa un altro nome: npx create-orqevio --name <nome>",
|
|
@@ -438,8 +604,8 @@ per farti accedere.`,
|
|
|
438
604
|
"L\u2019utilizzo incluso \xE8 gratuito (10 GB di spazio al mese), anche se Cloudflare potrebbe chiederti un metodo di pagamento.",
|
|
439
605
|
`Poi esegui di nuovo: ${retryCommand}`
|
|
440
606
|
].join("\n"),
|
|
441
|
-
signInPrompt: "Accedi a Cloudflare nel browser che sta per aprirsi\u2026\n",
|
|
442
|
-
signInFailed:
|
|
607
|
+
signInPrompt: "Accedi a Cloudflare nel browser che sta per aprirsi. Se non si apre, apri tu il link che compare qui sotto\u2026\n",
|
|
608
|
+
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
609
|
noAccessToAccount: (account, accounts) => `Questa sessione non ha accesso all\u2019account \xAB${account}\xBB. Account disponibili:
|
|
444
610
|
${accounts}`,
|
|
445
611
|
noAccounts: "La tua sessione Cloudflare non ha nessun account disponibile.",
|
|
@@ -476,8 +642,48 @@ La tua copia \xE8 stata aggiornata a Orqevio ${version}: ${address}`,
|
|
|
476
642
|
"",
|
|
477
643
|
"Apri la tua copia, scegli \xABHai perso la chiave?\xBB e inserisci questo codice per ricevere",
|
|
478
644
|
"una nuova chiave di accesso. Tutte le sessioni verranno chiuse; i tuoi dati e la tua",
|
|
479
|
-
"cassaforte non cambiano."
|
|
480
|
-
|
|
645
|
+
"cassaforte non cambiano.",
|
|
646
|
+
"Se qualcun altro potrebbe aver avuto la chiave, rispondi \xABQualcun altro potrebbe averla\xBB per disconnettere anche i tuoi agenti."
|
|
647
|
+
].join("\n"),
|
|
648
|
+
uninstallNeedsTerminal: "Per disinstallare devi scrivere il nome della copia: esegui questo comando in un terminale.",
|
|
649
|
+
nothingToUninstall: (name) => `In questo account non c\u2019\xE8 nessuna copia chiamata \xAB${name}\xBB: non c\u2019\xE8 niente da eliminare.`,
|
|
650
|
+
uninstallWarning: (name, bucket) => [
|
|
651
|
+
`Questo elimina per sempre la copia \xAB${name}\xBB con tutto ci\xF2 che contiene:`,
|
|
652
|
+
" \xB7 il suo Worker, con i tuoi spazi, documenti, cassaforte e agenti;",
|
|
653
|
+
` \xB7 il suo bucket \xAB${bucket}\xBB, con gli allegati.`,
|
|
654
|
+
"Non si pu\xF2 annullare. Per conservare la cassaforte, esportane prima una copia cifrata.",
|
|
655
|
+
""
|
|
656
|
+
].join("\n"),
|
|
657
|
+
askUninstallName: (name) => `Scrivi \xAB${name}\xBB per confermare: `,
|
|
658
|
+
nothingDeleted: "Non \xE8 stato eliminato niente.",
|
|
659
|
+
bucketNotEmpty: (bucket, retryCommand) => [
|
|
660
|
+
"",
|
|
661
|
+
`Il bucket \xAB${bucket}\xBB contiene ancora degli allegati, e Cloudflare elimina solo i bucket vuoti. Non \xE8 stato eliminato niente.`,
|
|
662
|
+
`Svuotalo in uno di questi due modi, poi esegui di nuovo ${retryCommand}:`,
|
|
663
|
+
" \xB7 nella tua copia: Impostazioni \u2192 Disinstallare Orqevio, che elimina anche il resto dei suoi dati;",
|
|
664
|
+
` \xB7 nella dashboard di Cloudflare: R2 \u2192 ${bucket} \u2192 Settings \u2192 Empty Bucket.`
|
|
665
|
+
].join("\n"),
|
|
666
|
+
uninstallFailed: "\nLa disinstallazione non \xE8 andata a buon fine. Controlla il messaggio di Wrangler qui sopra; puoi eseguire di nuovo il comando.",
|
|
667
|
+
uninstalled: (name, logoutCommand) => [
|
|
668
|
+
"",
|
|
669
|
+
`La copia \xAB${name}\xBB \xE8 disinstallata: il suo Worker e il suo bucket non sono pi\xF9 nel tuo account Cloudflare.`,
|
|
670
|
+
`Se non usi Wrangler per nient\u2019altro, esci con ${logoutCommand}.`
|
|
671
|
+
].join("\n"),
|
|
672
|
+
emptyingThroughCopy: (bucket) => [
|
|
673
|
+
"",
|
|
674
|
+
`Il bucket \xAB${bucket}\xBB contiene ancora degli allegati, e Cloudflare elimina solo i bucket vuoti.`,
|
|
675
|
+
"L\u2019installer pu\xF2 chiedere alla tua copia di eliminarli: la autorizza dal tuo account Cloudflare, senza bisogno della tua chiave di accesso.",
|
|
676
|
+
"Lascia la risposta vuota se preferisci farlo in un altro modo."
|
|
677
|
+
].join("\n"),
|
|
678
|
+
askAddress: (name) => `Indirizzo della tua copia (per esempio https://${name}.<tuo-sottodominio>.workers.dev): `,
|
|
679
|
+
badAddress: (address) => `\xAB${address}\xBB non \xE8 un indirizzo: usa quello che apri nel browser.`,
|
|
680
|
+
notOrqevio: (origin) => `Nessuna copia di Orqevio risponde a ${origin}.`,
|
|
681
|
+
otherCopy: (origin, other, name) => `${origin} \xE8 la copia \xAB${other}\xBB, non \xAB${name}\xBB.`,
|
|
682
|
+
copyUnreachable: (origin, detail) => `Non riesco a raggiungere la tua copia a ${origin} (${detail}). Non \xE8 stato eliminato niente.`,
|
|
683
|
+
authorizingCopy: "Autorizzo la tua copia dal tuo account Cloudflare e aspetto la sua risposta (qualche secondo)\u2026",
|
|
684
|
+
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
|
+
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
|
+
copyEmptied: "La tua copia ha eliminato i suoi dati e i suoi allegati."
|
|
481
687
|
};
|
|
482
688
|
|
|
483
689
|
// src/messages/ja.ts
|
|
@@ -488,6 +694,7 @@ var ja = {
|
|
|
488
694
|
npx create-orqevio \u65B0\u3057\u3044Orqevio\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB
|
|
489
695
|
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
696
|
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
|
|
697
|
+
npx create-orqevio@latest uninstall Orqevio\u3068\u305D\u306E\u4E2D\u8EAB\u3092\u3059\u3079\u3066\u524A\u9664
|
|
491
698
|
|
|
492
699
|
\u30AA\u30D7\u30B7\u30E7\u30F3\uFF1A
|
|
493
700
|
--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 +718,7 @@ Cloudflare\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u5FC5\u8981\u3067\u3059\uFF08\u71
|
|
|
511
718
|
askName: (defaultName) => `Orqevio\u306E\u540D\u524D\uFF08${defaultName}\uFF09\uFF1A`,
|
|
512
719
|
badName: (name) => `\u300C${name}\u300D\u306F\u540D\u524D\u3068\u3057\u3066\u4F7F\u3048\u307E\u305B\u3093\u3002`,
|
|
513
720
|
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]}`,
|
|
721
|
+
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
722
|
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
723
|
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
724
|
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 +729,8 @@ Cloudflare\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u5FC5\u8981\u3067\u3059\uFF08\u71
|
|
|
522
729
|
"\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
730
|
`\u305D\u306E\u5F8C\u3001\u3082\u3046\u4E00\u5EA6\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\uFF1A${retryCommand}`
|
|
524
731
|
].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:
|
|
732
|
+
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",
|
|
733
|
+
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
734
|
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
735
|
${accounts}`,
|
|
529
736
|
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,8 +767,48 @@ Orqevio ${version}\u3078\u306E\u66F4\u65B0\u304C\u5B8C\u4E86\u3057\u307E\u3057\u
|
|
|
560
767
|
"",
|
|
561
768
|
"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
769
|
"\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"
|
|
564
|
-
|
|
770
|
+
"\u30C7\u30FC\u30BF\u3068\u4FDD\u7BA1\u5EAB\u306F\u305D\u306E\u307E\u307E\u5909\u308F\u308A\u307E\u305B\u3093\u3002",
|
|
771
|
+
"\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"
|
|
772
|
+
].join("\n"),
|
|
773
|
+
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",
|
|
774
|
+
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`,
|
|
775
|
+
uninstallWarning: (name, bucket) => [
|
|
776
|
+
`\u300C${name}\u300D\u3068\u305D\u306E\u4E2D\u8EAB\u3092\u3059\u3079\u3066\u5B8C\u5168\u306B\u524A\u9664\u3057\u307E\u3059\uFF1A`,
|
|
777
|
+
" \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",
|
|
778
|
+
` \u30FB\u30D0\u30B1\u30C3\u30C8\u300C${bucket}\u300D\uFF08\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u3092\u542B\u3080\uFF09`,
|
|
779
|
+
"\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",
|
|
780
|
+
""
|
|
781
|
+
].join("\n"),
|
|
782
|
+
askUninstallName: (name) => `\u78BA\u8A8D\u306E\u305F\u3081\u300C${name}\u300D\u3068\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\uFF1A`,
|
|
783
|
+
nothingDeleted: "\u4F55\u3082\u524A\u9664\u3057\u3066\u3044\u307E\u305B\u3093\u3002",
|
|
784
|
+
bucketNotEmpty: (bucket, retryCommand) => [
|
|
785
|
+
"",
|
|
786
|
+
`\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`,
|
|
787
|
+
`\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`,
|
|
788
|
+
" \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",
|
|
789
|
+
` \u30FBCloudflare\u306E\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u3067\uFF1AR2 \u2192 ${bucket} \u2192 Settings \u2192 Empty Bucket`
|
|
790
|
+
].join("\n"),
|
|
791
|
+
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",
|
|
792
|
+
uninstalled: (name, logoutCommand) => [
|
|
793
|
+
"",
|
|
794
|
+
`\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`,
|
|
795
|
+
`\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`
|
|
796
|
+
].join("\n"),
|
|
797
|
+
emptyingThroughCopy: (bucket) => [
|
|
798
|
+
"",
|
|
799
|
+
`\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`,
|
|
800
|
+
"\u30A4\u30F3\u30B9\u30C8\u30FC\u30E9\u30FC\u304CCloudflare\u30A2\u30AB\u30A6\u30F3\u30C8\u304B\u3089Orqevio\u306B\u8A31\u53EF\u3092\u4E0E\u3048\u3001\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u3092\u524A\u9664\u3055\u305B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u30A2\u30AF\u30BB\u30B9\u30AD\u30FC\u306F\u4E0D\u8981\u3067\u3059\u3002",
|
|
801
|
+
"\u5225\u306E\u65B9\u6CD5\u3067\u884C\u3046\u5834\u5408\u306F\u3001\u4F55\u3082\u5165\u529B\u305B\u305A\u306BEnter\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044\u3002"
|
|
802
|
+
].join("\n"),
|
|
803
|
+
askAddress: (name) => `Orqevio\u306E\u30A2\u30C9\u30EC\u30B9\uFF08\u4F8B\uFF1Ahttps://${name}.<\u30B5\u30D6\u30C9\u30E1\u30A4\u30F3>.workers.dev\uFF09\uFF1A`,
|
|
804
|
+
badAddress: (address) => `\u300C${address}\u300D\u306F\u30A2\u30C9\u30EC\u30B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u30D6\u30E9\u30A6\u30B6\u30FC\u3067\u958B\u3044\u3066\u3044\u308B\u30A2\u30C9\u30EC\u30B9\u3092\u4F7F\u3063\u3066\u304F\u3060\u3055\u3044\u3002`,
|
|
805
|
+
notOrqevio: (origin) => `${origin}\u3067\u306FOrqevio\u304C\u5FDC\u7B54\u3057\u307E\u305B\u3093\u3002`,
|
|
806
|
+
otherCopy: (origin, other, name) => `${origin}\u306F\u300C${other}\u300D\u3067\u3001\u300C${name}\u300D\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002`,
|
|
807
|
+
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
|
+
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",
|
|
809
|
+
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
|
+
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
|
+
copyEmptied: "Orqevio\u304C\u30C7\u30FC\u30BF\u3068\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u3092\u524A\u9664\u3057\u307E\u3057\u305F\u3002"
|
|
565
812
|
};
|
|
566
813
|
|
|
567
814
|
// src/messages/nl.ts
|
|
@@ -572,6 +819,7 @@ Gebruik:
|
|
|
572
819
|
npx create-orqevio Een nieuwe installatie opzetten
|
|
573
820
|
npx create-orqevio@latest update Bijwerken naar de nieuwste versie (je gegevens blijven behouden)
|
|
574
821
|
npx create-orqevio@latest recover Een nieuwe code krijgen om je toegang te herstellen
|
|
822
|
+
npx create-orqevio@latest uninstall Je installatie met alles erin verwijderen
|
|
575
823
|
|
|
576
824
|
Opties:
|
|
577
825
|
--name <naam> Naam van de installatie (standaard ${defaultName}). Wordt onderdeel van het adres.
|
|
@@ -594,7 +842,7 @@ opent je browser, zodat je kunt inloggen.`,
|
|
|
594
842
|
askName: (defaultName) => `Naam van de installatie (${defaultName}): `,
|
|
595
843
|
badName: (name) => `\u2018${name}\u2019 kan niet als naam worden gebruikt.`,
|
|
596
844
|
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]}`,
|
|
845
|
+
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
846
|
accountUnreachable: "Je Cloudflare-account kon niet worden gecontroleerd. Probeer het over een paar minuten opnieuw.",
|
|
599
847
|
askUpdate: (name) => `Je hebt al een installatie met de naam \u2018${name}\u2019. Bijwerken naar deze versie? Je gegevens blijven behouden.`,
|
|
600
848
|
nothingChanged: "Er is niets gewijzigd. Voor een extra installatie kies je een andere naam: npx create-orqevio --name <naam>",
|
|
@@ -605,8 +853,8 @@ opent je browser, zodat je kunt inloggen.`,
|
|
|
605
853
|
"Het inbegrepen gebruik is gratis (10 GB opslag per maand), al kan Cloudflare om een betaalmethode vragen.",
|
|
606
854
|
`Voer daarna opnieuw uit: ${retryCommand}`
|
|
607
855
|
].join("\n"),
|
|
608
|
-
signInPrompt: "Log in bij Cloudflare in de browser die zo meteen opent\u2026\n",
|
|
609
|
-
signInFailed:
|
|
856
|
+
signInPrompt: "Log in bij Cloudflare in de browser die zo meteen opent. Opent hij niet, open dan zelf de link hieronder\u2026\n",
|
|
857
|
+
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
858
|
noAccessToAccount: (account, accounts) => `Deze sessie heeft geen toegang tot het account \u2018${account}\u2019. Beschikbare accounts:
|
|
611
859
|
${accounts}`,
|
|
612
860
|
noAccounts: "Er is geen account beschikbaar in je Cloudflare-sessie.",
|
|
@@ -642,8 +890,48 @@ Je installatie is bijgewerkt naar Orqevio ${version}: ${address}`,
|
|
|
642
890
|
`Nieuwe installatiecode: ${setupCode}`,
|
|
643
891
|
"",
|
|
644
892
|
"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."
|
|
646
|
-
|
|
893
|
+
"toegangssleutel. Alle sessies worden uitgelogd; je gegevens en je kluis blijven ongewijzigd.",
|
|
894
|
+
"Kan iemand anders de sleutel hebben gehad, antwoord dan \u2018Iemand anders heeft hem misschien\u2019 om ook je agents los te koppelen."
|
|
895
|
+
].join("\n"),
|
|
896
|
+
uninstallNeedsTerminal: "Om te verwijderen typ je de naam van de installatie: voer deze opdracht uit in een terminal.",
|
|
897
|
+
nothingToUninstall: (name) => `Er staat geen installatie met de naam \u2018${name}\u2019 in dit account, dus er is niets te verwijderen.`,
|
|
898
|
+
uninstallWarning: (name, bucket) => [
|
|
899
|
+
`Hiermee verwijder je de installatie \u2018${name}\u2019 definitief, met alles erin:`,
|
|
900
|
+
" \xB7 de Worker, met je werkruimtes, documenten, kluis en agents;",
|
|
901
|
+
` \xB7 de bucket \u2018${bucket}\u2019, met de bijlagen.`,
|
|
902
|
+
"Dit kan niet ongedaan worden gemaakt. Wil je je kluis bewaren, exporteer daar dan eerst een versleutelde kopie van.",
|
|
903
|
+
""
|
|
904
|
+
].join("\n"),
|
|
905
|
+
askUninstallName: (name) => `Typ \u2018${name}\u2019 om te bevestigen: `,
|
|
906
|
+
nothingDeleted: "Er is niets verwijderd.",
|
|
907
|
+
bucketNotEmpty: (bucket, retryCommand) => [
|
|
908
|
+
"",
|
|
909
|
+
`De bucket \u2018${bucket}\u2019 bevat nog bijlagen, en Cloudflare verwijdert alleen lege buckets. Er is niets verwijderd.`,
|
|
910
|
+
`Maak hem op een van deze twee manieren leeg en voer daarna ${retryCommand} opnieuw uit:`,
|
|
911
|
+
" \xB7 in je installatie: Instellingen \u2192 Orqevio verwijderen, waarmee ook de rest van de gegevens verdwijnt;",
|
|
912
|
+
` \xB7 in het Cloudflare-dashboard: R2 \u2192 ${bucket} \u2192 Settings \u2192 Empty Bucket.`
|
|
913
|
+
].join("\n"),
|
|
914
|
+
uninstallFailed: "\nHet verwijderen is niet afgerond. Bekijk de melding van Wrangler hierboven; je kunt de opdracht opnieuw uitvoeren.",
|
|
915
|
+
uninstalled: (name, logoutCommand) => [
|
|
916
|
+
"",
|
|
917
|
+
`De installatie \u2018${name}\u2019 is verwijderd: de Worker en de bucket staan niet meer in je Cloudflare-account.`,
|
|
918
|
+
`Gebruik je Wrangler verder nergens voor, meld je dan af met ${logoutCommand}.`
|
|
919
|
+
].join("\n"),
|
|
920
|
+
emptyingThroughCopy: (bucket) => [
|
|
921
|
+
"",
|
|
922
|
+
`De bucket \u2018${bucket}\u2019 bevat nog bijlagen, en Cloudflare verwijdert alleen lege buckets.`,
|
|
923
|
+
"Het installatieprogramma kan je installatie de bijlagen laten verwijderen: het geeft toestemming via je Cloudflare-account, zonder je toegangssleutel.",
|
|
924
|
+
"Laat het antwoord leeg als je het liever anders doet."
|
|
925
|
+
].join("\n"),
|
|
926
|
+
askAddress: (name) => `Adres van je installatie (bijvoorbeeld https://${name}.<je-subdomein>.workers.dev): `,
|
|
927
|
+
badAddress: (address) => `\u2018${address}\u2019 is geen adres: gebruik het adres dat je in de browser opent.`,
|
|
928
|
+
notOrqevio: (origin) => `Op ${origin} reageert geen Orqevio-installatie.`,
|
|
929
|
+
otherCopy: (origin, other, name) => `${origin} is de installatie \u2018${other}\u2019, niet \u2018${name}\u2019.`,
|
|
930
|
+
copyUnreachable: (origin, detail) => `Je installatie op ${origin} is niet bereikbaar (${detail}). Er is niets verwijderd.`,
|
|
931
|
+
authorizingCopy: "Je installatie krijgt toestemming via je Cloudflare-account; wachten op antwoord (een paar seconden)\u2026",
|
|
932
|
+
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
|
+
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
|
+
copyEmptied: "Je installatie heeft haar gegevens en bijlagen verwijderd."
|
|
647
935
|
};
|
|
648
936
|
|
|
649
937
|
// src/messages/pt.ts
|
|
@@ -654,6 +942,7 @@ Uso:
|
|
|
654
942
|
npx create-orqevio Instala uma nova c\xF3pia
|
|
655
943
|
npx create-orqevio@latest update Atualiza sua c\xF3pia para a vers\xE3o mais recente (seus dados s\xE3o mantidos)
|
|
656
944
|
npx create-orqevio@latest recover Gera um novo c\xF3digo para recuperar seu acesso
|
|
945
|
+
npx create-orqevio@latest uninstall Apaga sua c\xF3pia e tudo o que ela cont\xE9m
|
|
657
946
|
|
|
658
947
|
Op\xE7\xF5es:
|
|
659
948
|
--name <nome> Nome da c\xF3pia (${defaultName} por padr\xE3o). Ele passa a fazer parte do endere\xE7o.
|
|
@@ -676,7 +965,7 @@ navegador abre para voc\xEA fazer login.`,
|
|
|
676
965
|
askName: (defaultName) => `Nome da c\xF3pia (${defaultName}): `,
|
|
677
966
|
badName: (name) => `\u201C${name}\u201D n\xE3o pode ser usado como nome.`,
|
|
678
967
|
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`,
|
|
968
|
+
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
969
|
accountUnreachable: "N\xE3o foi poss\xEDvel verificar sua conta da Cloudflare. Tente de novo em alguns minutos.",
|
|
681
970
|
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
971
|
nothingChanged: "Nada foi alterado. Para outra c\xF3pia, use outro nome: npx create-orqevio --name <nome>",
|
|
@@ -687,8 +976,8 @@ navegador abre para voc\xEA fazer login.`,
|
|
|
687
976
|
"O uso inclu\xEDdo \xE9 gratuito (10 GB de armazenamento por m\xEAs), embora a Cloudflare possa pedir uma forma de pagamento.",
|
|
688
977
|
`Depois, execute de novo: ${retryCommand}`
|
|
689
978
|
].join("\n"),
|
|
690
|
-
signInPrompt: "Fa\xE7a login na Cloudflare no navegador que vai se abrir\u2026\n",
|
|
691
|
-
signInFailed:
|
|
979
|
+
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",
|
|
980
|
+
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
981
|
noAccessToAccount: (account, accounts) => `Esta sess\xE3o n\xE3o tem acesso \xE0 conta \u201C${account}\u201D. Contas dispon\xEDveis:
|
|
693
982
|
${accounts}`,
|
|
694
983
|
noAccounts: "Sua sess\xE3o da Cloudflare n\xE3o tem nenhuma conta dispon\xEDvel.",
|
|
@@ -724,8 +1013,48 @@ Sua c\xF3pia foi atualizada para o Orqevio ${version}: ${address}`,
|
|
|
724
1013
|
`Novo c\xF3digo de configura\xE7\xE3o: ${setupCode}`,
|
|
725
1014
|
"",
|
|
726
1015
|
"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."
|
|
728
|
-
|
|
1016
|
+
"chave de acesso. Todas as sess\xF5es s\xE3o encerradas; seus dados e seu cofre n\xE3o mudam.",
|
|
1017
|
+
"Se outra pessoa pode ter tido a chave, responda \u201CTalvez outra pessoa a tenha\u201D para desconectar tamb\xE9m seus agentes."
|
|
1018
|
+
].join("\n"),
|
|
1019
|
+
uninstallNeedsTerminal: "Para desinstalar, voc\xEA precisa digitar o nome da c\xF3pia: execute este comando em um terminal.",
|
|
1020
|
+
nothingToUninstall: (name) => `N\xE3o h\xE1 nenhuma c\xF3pia chamada \u201C${name}\u201D nesta conta: n\xE3o h\xE1 nada para apagar.`,
|
|
1021
|
+
uninstallWarning: (name, bucket) => [
|
|
1022
|
+
`Isto apaga para sempre a c\xF3pia \u201C${name}\u201D, com tudo o que ela cont\xE9m:`,
|
|
1023
|
+
" \xB7 o Worker dela, com seus espa\xE7os, documentos, cofre e agentes;",
|
|
1024
|
+
` \xB7 o bucket \u201C${bucket}\u201D, com os anexos.`,
|
|
1025
|
+
"N\xE3o pode ser desfeito. Para manter o cofre, exporte antes uma c\xF3pia criptografada dele.",
|
|
1026
|
+
""
|
|
1027
|
+
].join("\n"),
|
|
1028
|
+
askUninstallName: (name) => `Digite \u201C${name}\u201D para confirmar: `,
|
|
1029
|
+
nothingDeleted: "Nada foi apagado.",
|
|
1030
|
+
bucketNotEmpty: (bucket, retryCommand) => [
|
|
1031
|
+
"",
|
|
1032
|
+
`O bucket \u201C${bucket}\u201D ainda guarda anexos, e a Cloudflare s\xF3 apaga buckets vazios. Nada foi apagado.`,
|
|
1033
|
+
`Esvazie-o de uma destas duas formas e execute ${retryCommand} de novo:`,
|
|
1034
|
+
" \xB7 na sua c\xF3pia: Configura\xE7\xF5es \u2192 Desinstalar o Orqevio, que tamb\xE9m apaga o resto dos dados dela;",
|
|
1035
|
+
` \xB7 no painel da Cloudflare: R2 \u2192 ${bucket} \u2192 Settings \u2192 Empty Bucket.`
|
|
1036
|
+
].join("\n"),
|
|
1037
|
+
uninstallFailed: "\nA desinstala\xE7\xE3o n\xE3o terminou. Confira a mensagem do Wrangler acima; voc\xEA pode executar o comando de novo.",
|
|
1038
|
+
uninstalled: (name, logoutCommand) => [
|
|
1039
|
+
"",
|
|
1040
|
+
`A c\xF3pia \u201C${name}\u201D foi desinstalada: o Worker e o bucket dela n\xE3o est\xE3o mais na sua conta da Cloudflare.`,
|
|
1041
|
+
`Se voc\xEA n\xE3o usa o Wrangler para mais nada, saia da sess\xE3o com ${logoutCommand}.`
|
|
1042
|
+
].join("\n"),
|
|
1043
|
+
emptyingThroughCopy: (bucket) => [
|
|
1044
|
+
"",
|
|
1045
|
+
`O bucket \u201C${bucket}\u201D ainda guarda anexos, e a Cloudflare s\xF3 apaga buckets vazios.`,
|
|
1046
|
+
"O instalador pode pedir que a sua c\xF3pia os apague: ele a autoriza pela sua conta da Cloudflare, sem precisar da sua chave de acesso.",
|
|
1047
|
+
"Deixe a resposta em branco se preferir fazer de outra forma."
|
|
1048
|
+
].join("\n"),
|
|
1049
|
+
askAddress: (name) => `Endere\xE7o da sua c\xF3pia (por exemplo, https://${name}.<seu-subdominio>.workers.dev): `,
|
|
1050
|
+
badAddress: (address) => `\u201C${address}\u201D n\xE3o \xE9 um endere\xE7o: use o que voc\xEA abre no navegador.`,
|
|
1051
|
+
notOrqevio: (origin) => `Nenhuma c\xF3pia do Orqevio responde em ${origin}.`,
|
|
1052
|
+
otherCopy: (origin, other, name) => `${origin} \xE9 a c\xF3pia \u201C${other}\u201D, n\xE3o \u201C${name}\u201D.`,
|
|
1053
|
+
copyUnreachable: (origin, detail) => `N\xE3o foi poss\xEDvel falar com a sua c\xF3pia em ${origin} (${detail}). Nada foi apagado.`,
|
|
1054
|
+
authorizingCopy: "Autorizando a sua c\xF3pia pela sua conta da Cloudflare e esperando a resposta dela (alguns segundos)\u2026",
|
|
1055
|
+
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
|
+
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
|
+
copyEmptied: "Sua c\xF3pia apagou os dados e os anexos."
|
|
729
1058
|
};
|
|
730
1059
|
|
|
731
1060
|
// src/messages/index.ts
|
|
@@ -760,8 +1089,56 @@ function generateSetupCode(bytes = randomBytes(10)) {
|
|
|
760
1089
|
return out.match(/.{1,4}/g).join("-");
|
|
761
1090
|
}
|
|
762
1091
|
|
|
763
|
-
// src/
|
|
1092
|
+
// src/browser.ts
|
|
764
1093
|
import { spawn } from "node:child_process";
|
|
1094
|
+
function openOnWindows(url) {
|
|
1095
|
+
try {
|
|
1096
|
+
const child = spawn("explorer.exe", [url], { stdio: "ignore", detached: true, windowsHide: true });
|
|
1097
|
+
child.on("error", () => {
|
|
1098
|
+
});
|
|
1099
|
+
child.unref();
|
|
1100
|
+
} catch {
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
// src/copy.ts
|
|
1105
|
+
function copyOrigin(address) {
|
|
1106
|
+
const value = address.trim();
|
|
1107
|
+
try {
|
|
1108
|
+
const url = new URL(/^[a-z][a-z0-9+.-]*:\/\//i.test(value) ? value : `https://${value}`);
|
|
1109
|
+
const local = url.hostname === "localhost" || url.hostname === "127.0.0.1";
|
|
1110
|
+
return url.protocol === "https:" || local && url.protocol === "http:" ? url.origin : null;
|
|
1111
|
+
} catch {
|
|
1112
|
+
return null;
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
async function emptyCopy(origin, name, token, fetchImpl = fetch) {
|
|
1116
|
+
const call = async (path4, init = {}) => {
|
|
1117
|
+
try {
|
|
1118
|
+
const res = await fetchImpl(`${origin}${path4}`, { ...init, headers: { Accept: "application/json", ...init.headers }, signal: AbortSignal.timeout(6e4) });
|
|
1119
|
+
const body = await res.json().catch(() => null);
|
|
1120
|
+
return { res, body };
|
|
1121
|
+
} catch (error) {
|
|
1122
|
+
return { error: error.message };
|
|
1123
|
+
}
|
|
1124
|
+
};
|
|
1125
|
+
const session = await call("/api/auth/session");
|
|
1126
|
+
if ("error" in session) return { ok: false, reason: "unreachable", detail: session.error };
|
|
1127
|
+
const state = session.body;
|
|
1128
|
+
if (!session.res.ok || !state || !("claimed" in state || "user" in state)) return { ok: false, reason: "not-orqevio" };
|
|
1129
|
+
if (typeof state.copyName === "string" && state.copyName !== name) return { ok: false, reason: "other-copy", detail: state.copyName };
|
|
1130
|
+
if (state.uninstalled) return { ok: true, already: true };
|
|
1131
|
+
const uninstall2 = await call("/api/uninstall", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ token }) });
|
|
1132
|
+
if ("error" in uninstall2) return { ok: false, reason: "unreachable", detail: uninstall2.error };
|
|
1133
|
+
if (uninstall2.res.ok) return { ok: true, already: false };
|
|
1134
|
+
if (uninstall2.res.status === 410) return { ok: true, already: true };
|
|
1135
|
+
if (uninstall2.res.status === 404) return { ok: false, reason: "too-old" };
|
|
1136
|
+
if (uninstall2.res.status === 403) return { ok: false, reason: "not-authorized" };
|
|
1137
|
+
return { ok: false, reason: "unreachable", detail: `HTTP ${uninstall2.res.status}` };
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
// src/wrangler.ts
|
|
1141
|
+
import { spawn as spawn2 } from "node:child_process";
|
|
765
1142
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
766
1143
|
import { createRequire as createRequire2 } from "node:module";
|
|
767
1144
|
import { tmpdir } from "node:os";
|
|
@@ -776,15 +1153,20 @@ function wranglerScript() {
|
|
|
776
1153
|
}
|
|
777
1154
|
function runWrangler(args, options = {}) {
|
|
778
1155
|
return new Promise((resolve, reject) => {
|
|
779
|
-
const child =
|
|
1156
|
+
const child = spawn2(process.execPath, [wranglerScript(), ...args], {
|
|
780
1157
|
cwd: options.cwd ?? tmpdir(),
|
|
781
1158
|
// Wrangler's anonymous telemetry stays off unless the user turned it on themselves.
|
|
782
1159
|
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"]
|
|
1160
|
+
stdio: [options.input !== void 0 ? "pipe" : "inherit", options.capture || options.onOutput ? "pipe" : "inherit", options.capture ? "pipe" : "inherit"]
|
|
784
1161
|
});
|
|
785
1162
|
let stdout = "";
|
|
786
1163
|
let stderr = "";
|
|
787
|
-
child.stdout?.on("data", (chunk) =>
|
|
1164
|
+
child.stdout?.on("data", (chunk) => {
|
|
1165
|
+
if (options.onOutput) {
|
|
1166
|
+
process.stdout.write(chunk);
|
|
1167
|
+
options.onOutput(String(chunk));
|
|
1168
|
+
} else stdout += chunk;
|
|
1169
|
+
});
|
|
788
1170
|
child.stderr?.on("data", (chunk) => stderr += chunk);
|
|
789
1171
|
if (options.input !== void 0) child.stdin.end(options.input);
|
|
790
1172
|
child.on("error", reject);
|
|
@@ -812,6 +1194,7 @@ function deployedUrls(outputFile) {
|
|
|
812
1194
|
|
|
813
1195
|
// src/main.ts
|
|
814
1196
|
var MIN_NODE = [22, 12];
|
|
1197
|
+
var MANUAL_SIGN_IN = "npx wrangler login --browser=false";
|
|
815
1198
|
var R2_DASHBOARD = "https://dash.cloudflare.com/?to=/:account/r2/overview";
|
|
816
1199
|
async function main(argv, io = terminalIo(), deps = {}) {
|
|
817
1200
|
const asked = requestedLanguage(argv);
|
|
@@ -860,10 +1243,14 @@ ${m.help(DEFAULT_NAME)}`);
|
|
|
860
1243
|
io.out(JSON.stringify(copyConfig(orqevio.base, orqevio.dir, name), null, 2));
|
|
861
1244
|
return 0;
|
|
862
1245
|
}
|
|
1246
|
+
if (command === "uninstall" && !io.ask) {
|
|
1247
|
+
io.err(m.uninstallNeedsTerminal);
|
|
1248
|
+
return 1;
|
|
1249
|
+
}
|
|
863
1250
|
io.out(`
|
|
864
1251
|
${m.heading(command, orqevio.version, name)}
|
|
865
1252
|
`);
|
|
866
|
-
const accounts = await signIn(io, m);
|
|
1253
|
+
const accounts = await signIn(io, m, deps);
|
|
867
1254
|
if (!accounts) return 1;
|
|
868
1255
|
const account = await chooseAccount(accounts, givenAccount ?? process.env.CLOUDFLARE_ACCOUNT_ID, io, m);
|
|
869
1256
|
if (!account) return 1;
|
|
@@ -873,6 +1260,7 @@ ${m.heading(command, orqevio.version, name)}
|
|
|
873
1260
|
io.err(m.accountUnreachable);
|
|
874
1261
|
return 1;
|
|
875
1262
|
}
|
|
1263
|
+
if (command === "uninstall") return uninstall(name, exists, env, io, m, deps);
|
|
876
1264
|
let mode = command;
|
|
877
1265
|
if (command === "install" && exists) {
|
|
878
1266
|
const answer = io.ask ? (await io.ask(`${m.askUpdate(name)} ${m.yesNo} `)).trim() : "n";
|
|
@@ -929,7 +1317,7 @@ function parse(argv, m) {
|
|
|
929
1317
|
const { values, positionals } = args;
|
|
930
1318
|
if (positionals.length > 1) throw new Error(m.extraArgument(positionals[1]));
|
|
931
1319
|
const command = positionals[0] ?? "install";
|
|
932
|
-
if (!["install", "update", "recover", "config", "deploy-repo"].includes(command)) throw new Error(m.unknownCommand(command));
|
|
1320
|
+
if (!["install", "update", "recover", "uninstall", "config", "deploy-repo"].includes(command)) throw new Error(m.unknownCommand(command));
|
|
933
1321
|
if (values["dry-run"] && command !== "deploy-repo") throw new Error(m.dryRunOnlyForDeployRepo);
|
|
934
1322
|
return {
|
|
935
1323
|
command,
|
|
@@ -942,15 +1330,32 @@ function parse(argv, m) {
|
|
|
942
1330
|
};
|
|
943
1331
|
}
|
|
944
1332
|
var nameFlag = (name) => name === DEFAULT_NAME ? "" : ` --name ${name}`;
|
|
945
|
-
async function signIn(io, m) {
|
|
1333
|
+
async function signIn(io, m, deps) {
|
|
946
1334
|
let accounts = await whoami();
|
|
947
1335
|
if (!accounts) {
|
|
948
1336
|
io.out(m.signInPrompt);
|
|
949
|
-
if ((await
|
|
1337
|
+
if ((await login(deps)).code === 0) accounts = await whoami();
|
|
950
1338
|
}
|
|
951
|
-
if (!accounts) io.err(m.signInFailed);
|
|
1339
|
+
if (!accounts) io.err(m.signInFailed(MANUAL_SIGN_IN));
|
|
952
1340
|
return accounts;
|
|
953
1341
|
}
|
|
1342
|
+
function login(deps) {
|
|
1343
|
+
if ((deps.platform ?? process.platform) !== "win32") return runWrangler(["login"]);
|
|
1344
|
+
const open = deps.openOnWindows ?? openOnWindows;
|
|
1345
|
+
let seen = "";
|
|
1346
|
+
let opened = false;
|
|
1347
|
+
return runWrangler(["login", "--browser=false"], {
|
|
1348
|
+
onOutput: (text) => {
|
|
1349
|
+
if (opened) return;
|
|
1350
|
+
seen += text;
|
|
1351
|
+
const url = /Visit this link to authenticate: (https:\/\/\S+)\s/.exec(seen)?.[1];
|
|
1352
|
+
if (url) {
|
|
1353
|
+
opened = true;
|
|
1354
|
+
open(url);
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
});
|
|
1358
|
+
}
|
|
954
1359
|
async function whoami() {
|
|
955
1360
|
const { stdout } = await runWrangler(["whoami", "--json"], { capture: true });
|
|
956
1361
|
try {
|
|
@@ -1060,9 +1465,8 @@ async function deployRepo(orqevio, dryRun, io, m) {
|
|
|
1060
1465
|
io.err(`${m.badRepoName(name)} ${m.nameRule}`);
|
|
1061
1466
|
return 1;
|
|
1062
1467
|
}
|
|
1063
|
-
const config = copyConfig(orqevio.base, orqevio.dir, name, "button");
|
|
1064
1468
|
const bucket = repo.r2_buckets?.find((b) => b.binding === "UPLOADS")?.bucket_name;
|
|
1065
|
-
|
|
1469
|
+
const config = copyConfig(orqevio.base, orqevio.dir, name, "button", bucket || void 0);
|
|
1066
1470
|
return withWorkspace(async (dir) => {
|
|
1067
1471
|
const configFile = path3.join(dir, "wrangler.json");
|
|
1068
1472
|
await writeFile(configFile, JSON.stringify(config, null, 2));
|
|
@@ -1082,6 +1486,93 @@ async function recover(name, env, io, m) {
|
|
|
1082
1486
|
io.out(m.recovered(setupCode));
|
|
1083
1487
|
return 0;
|
|
1084
1488
|
}
|
|
1489
|
+
async function uninstall(name, workerFound, env, io, m, deps) {
|
|
1490
|
+
const bucket = bucketName(name);
|
|
1491
|
+
const bucketFound = await bucketExists(bucket, env);
|
|
1492
|
+
if (!workerFound && bucketFound === false) {
|
|
1493
|
+
io.err(m.nothingToUninstall(name));
|
|
1494
|
+
return 1;
|
|
1495
|
+
}
|
|
1496
|
+
io.out(m.uninstallWarning(name, bucket));
|
|
1497
|
+
if ((await io.ask(m.askUninstallName(name))).trim() !== name) {
|
|
1498
|
+
io.err(m.nothingDeleted);
|
|
1499
|
+
return 1;
|
|
1500
|
+
}
|
|
1501
|
+
const retryCommand = `npx create-orqevio@latest uninstall${nameFlag(name)}`;
|
|
1502
|
+
if (bucketFound !== false) {
|
|
1503
|
+
let bucketDeleted = await deleteBucket(bucket, env, io);
|
|
1504
|
+
if (bucketDeleted === "not-empty" && workerFound && await emptyThroughCopy(name, bucket, env, io, m, deps)) {
|
|
1505
|
+
bucketDeleted = await deleteBucket(bucket, env, io);
|
|
1506
|
+
}
|
|
1507
|
+
if (bucketDeleted === "not-empty") {
|
|
1508
|
+
io.err(m.bucketNotEmpty(bucket, retryCommand));
|
|
1509
|
+
return 1;
|
|
1510
|
+
}
|
|
1511
|
+
if (bucketDeleted === "failed") {
|
|
1512
|
+
io.err(m.uninstallFailed);
|
|
1513
|
+
return 1;
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
if (workerFound && (await runWrangler(["delete", "--name", name, "--force"], { env })).code !== 0) {
|
|
1517
|
+
io.err(m.uninstallFailed);
|
|
1518
|
+
return 1;
|
|
1519
|
+
}
|
|
1520
|
+
io.out(m.uninstalled(name, "npx wrangler logout"));
|
|
1521
|
+
return 0;
|
|
1522
|
+
}
|
|
1523
|
+
async function deleteBucket(bucket, env, io) {
|
|
1524
|
+
const run = await runWrangler(["r2", "bucket", "delete", bucket], { capture: true, env });
|
|
1525
|
+
const output = run.stdout + run.stderr;
|
|
1526
|
+
if (run.code === 0 || /\b10006\b/.test(output)) return "deleted";
|
|
1527
|
+
if (/\b10008\b/.test(output)) return "not-empty";
|
|
1528
|
+
io.err(output.trim());
|
|
1529
|
+
return "failed";
|
|
1530
|
+
}
|
|
1531
|
+
async function emptyThroughCopy(name, bucket, env, io, m, deps) {
|
|
1532
|
+
const { intervalMs, timeoutMs } = deps.uninstallWait ?? { intervalMs: 3e3, timeoutMs: 9e4 };
|
|
1533
|
+
io.out(m.emptyingThroughCopy(bucket));
|
|
1534
|
+
for (let attempt = 0; attempt < 3; attempt++) {
|
|
1535
|
+
const address = (await io.ask(m.askAddress(name))).trim();
|
|
1536
|
+
if (!address) return false;
|
|
1537
|
+
const origin = copyOrigin(address);
|
|
1538
|
+
if (!origin) {
|
|
1539
|
+
io.err(m.badAddress(address));
|
|
1540
|
+
continue;
|
|
1541
|
+
}
|
|
1542
|
+
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());
|
|
1546
|
+
io.err(m.uninstallFailed);
|
|
1547
|
+
return false;
|
|
1548
|
+
}
|
|
1549
|
+
io.out(m.authorizingCopy);
|
|
1550
|
+
const deadline = Date.now() + timeoutMs;
|
|
1551
|
+
for (; ; ) {
|
|
1552
|
+
const result = await emptyCopy(origin, name, token, deps.fetch);
|
|
1553
|
+
if (result.ok) {
|
|
1554
|
+
io.out(m.copyEmptied);
|
|
1555
|
+
return true;
|
|
1556
|
+
}
|
|
1557
|
+
if (result.reason === "not-authorized" && Date.now() < deadline) {
|
|
1558
|
+
await new Promise((resolve) => setTimeout(resolve, intervalMs));
|
|
1559
|
+
continue;
|
|
1560
|
+
}
|
|
1561
|
+
if (result.reason === "not-authorized") io.err(m.notThisAccount(origin, name));
|
|
1562
|
+
else if (result.reason === "too-old") io.err(m.copyTooOld(`npx create-orqevio@latest update${nameFlag(name)}`));
|
|
1563
|
+
else if (result.reason === "unreachable") io.err(m.copyUnreachable(origin, result.detail ?? ""));
|
|
1564
|
+
else io.err(result.reason === "other-copy" ? m.otherCopy(origin, result.detail ?? "", name) : m.notOrqevio(origin));
|
|
1565
|
+
if (result.reason === "other-copy" || result.reason === "not-orqevio") break;
|
|
1566
|
+
return false;
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
return false;
|
|
1570
|
+
}
|
|
1571
|
+
async function bucketExists(bucket, env) {
|
|
1572
|
+
const run = await runWrangler(["r2", "bucket", "info", bucket, "--json"], { capture: true, env });
|
|
1573
|
+
if (run.code === 0) return true;
|
|
1574
|
+
return /\b10006\b/.test(run.stdout + run.stderr) ? false : null;
|
|
1575
|
+
}
|
|
1085
1576
|
function terminalIo() {
|
|
1086
1577
|
return {
|
|
1087
1578
|
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
|
|
3
|
+
"version": "1.0.0",
|
|
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.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^22.20.5",
|