create-orqevio 0.0.0-stage → 1.0.0-rc.2
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/LICENSE.md +105 -0
- package/dist/cli.js +1109 -0
- package/package.json +35 -3
- package/README.md +0 -3
package/LICENSE.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
2
|
+
|
|
3
|
+
## Abbreviation
|
|
4
|
+
|
|
5
|
+
FSL-1.1-ALv2
|
|
6
|
+
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 HSY Labs
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,1109 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/main.ts
|
|
4
|
+
import { rmSync } from "node:fs";
|
|
5
|
+
import { mkdtemp, writeFile } from "node:fs/promises";
|
|
6
|
+
import { tmpdir as tmpdir2 } from "node:os";
|
|
7
|
+
import path3 from "node:path";
|
|
8
|
+
import { createInterface } from "node:readline/promises";
|
|
9
|
+
import { parseArgs } from "node:util";
|
|
10
|
+
import { readFileSync as readFileSync3 } from "node:fs";
|
|
11
|
+
|
|
12
|
+
// src/config.ts
|
|
13
|
+
import { readFileSync } from "node:fs";
|
|
14
|
+
import { createRequire } from "node:module";
|
|
15
|
+
import path from "node:path";
|
|
16
|
+
var DEFAULT_NAME = "orqevio";
|
|
17
|
+
var NAME = /^[a-z0-9](?:[a-z0-9-]{0,48}[a-z0-9])?$/;
|
|
18
|
+
var isValidName = (name) => NAME.test(name);
|
|
19
|
+
var bucketName = (name) => `${name}-uploads`;
|
|
20
|
+
function loadOrqevio(from = import.meta.url) {
|
|
21
|
+
const require2 = createRequire(from);
|
|
22
|
+
const manifest = require2.resolve("orqevio/package.json");
|
|
23
|
+
const dir = path.dirname(manifest);
|
|
24
|
+
const version = JSON.parse(readFileSync(manifest, "utf8")).version;
|
|
25
|
+
const base = JSON.parse(readFileSync(path.join(dir, "dist/wrangler.json"), "utf8"));
|
|
26
|
+
return { dir: path.join(dir, "dist"), version, base };
|
|
27
|
+
}
|
|
28
|
+
function copyConfig(base, distDir, name, install = "cli") {
|
|
29
|
+
return {
|
|
30
|
+
...base,
|
|
31
|
+
name,
|
|
32
|
+
// Other variables set in the dashboard are kept (keep_vars below).
|
|
33
|
+
vars: { ...base.vars, ORQEVIO_INSTALL: install, ORQEVIO_COPY_NAME: name },
|
|
34
|
+
main: path.join(distDir, base.main),
|
|
35
|
+
assets: { ...base.assets, directory: path.join(distDir, base.assets.directory) },
|
|
36
|
+
r2_buckets: base.r2_buckets.map((bucket) => bucket.binding === "UPLOADS" ? { ...bucket, bucket_name: bucketName(name) } : bucket),
|
|
37
|
+
// Variables the owner set in the Cloudflare dashboard (APP_URL, MAX_UPLOAD_MB) survive updates.
|
|
38
|
+
keep_vars: true
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// src/jsonc.ts
|
|
43
|
+
function parseJsonc(text) {
|
|
44
|
+
let json = "";
|
|
45
|
+
for (let i = 0; i < text.length; i++) {
|
|
46
|
+
const ch = text[i];
|
|
47
|
+
if (ch === '"') {
|
|
48
|
+
const end = stringEnd(text, i);
|
|
49
|
+
json += text.slice(i, end + 1);
|
|
50
|
+
i = end;
|
|
51
|
+
} else if (ch === "/" && text[i + 1] === "/") {
|
|
52
|
+
while (i < text.length && text[i] !== "\n") i++;
|
|
53
|
+
json += "\n";
|
|
54
|
+
} else if (ch === "/" && text[i + 1] === "*") {
|
|
55
|
+
const end = text.indexOf("*/", i + 2);
|
|
56
|
+
if (end === -1) throw new Error("Unterminated comment");
|
|
57
|
+
i = end + 1;
|
|
58
|
+
} else json += ch;
|
|
59
|
+
}
|
|
60
|
+
return JSON.parse(json.replace(/,(\s*[}\]])/g, "$1"));
|
|
61
|
+
}
|
|
62
|
+
function stringEnd(text, start) {
|
|
63
|
+
for (let i = start + 1; i < text.length; i++) {
|
|
64
|
+
if (text[i] === "\\") i++;
|
|
65
|
+
else if (text[i] === '"') return i;
|
|
66
|
+
}
|
|
67
|
+
throw new Error("Unterminated string");
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// src/messages/de.ts
|
|
71
|
+
var de = {
|
|
72
|
+
help: (defaultName) => `Installiert deine eigene Orqevio-Instanz in deinem Cloudflare-Konto.
|
|
73
|
+
|
|
74
|
+
Verwendung:
|
|
75
|
+
npx create-orqevio Installiert eine neue Instanz
|
|
76
|
+
npx create-orqevio@latest update Aktualisiert deine Instanz auf die neueste Version (deine Daten bleiben erhalten)
|
|
77
|
+
npx create-orqevio@latest recover Erzeugt einen neuen Code, mit dem du deinen Zugang wiederherstellst
|
|
78
|
+
|
|
79
|
+
Optionen:
|
|
80
|
+
--name <name> Name der Instanz (standardm\xE4\xDFig ${defaultName}). Er wird Teil ihrer Adresse.
|
|
81
|
+
--account <id> Zu verwendendes Cloudflare-Konto, falls du mehrere hast (oder CLOUDFLARE_ACCOUNT_ID)
|
|
82
|
+
--lang <code> Sprache dieser Meldungen: en, es, fr, pt, it, de, nl oder ja
|
|
83
|
+
-h, --help Zeigt diese Hilfe an
|
|
84
|
+
-v, --version Zeigt die Orqevio-Version an, die installiert wird
|
|
85
|
+
|
|
86
|
+
Du brauchst ein Cloudflare-Konto (der kostenlose Plan reicht aus). Beim ersten Mal \xF6ffnet
|
|
87
|
+
sich dein Browser, damit du dich anmelden kannst.`,
|
|
88
|
+
no: /^n/i,
|
|
89
|
+
yesNo: "[J/n]",
|
|
90
|
+
extraArgument: (arg) => `Unerwartetes Argument \u201E${arg}\u201C.`,
|
|
91
|
+
unknownOption: (option) => `Unbekannte Option \u201E${option}\u201C.`,
|
|
92
|
+
missingValue: (option) => `Die Option \u201E${option}\u201C braucht einen Wert.`,
|
|
93
|
+
unknownCommand: (command) => `Unbekannter Befehl \u201E${command}\u201C.`,
|
|
94
|
+
dryRunOnlyForDeployRepo: "--dry-run funktioniert nur mit deploy-repo.",
|
|
95
|
+
unknownLanguage: (language, available) => `Unbekannte Sprache \u201E${language}\u201C. Verf\xFCgbar sind: ${available}.`,
|
|
96
|
+
needsNode: (minimum, current) => `Du brauchst Node ${minimum} oder neuer (du hast ${current}). Du bekommst es unter https://nodejs.org.`,
|
|
97
|
+
askName: (defaultName) => `Name der Instanz (${defaultName}): `,
|
|
98
|
+
badName: (name) => `\u201E${name}\u201C kann nicht als Name verwendet werden.`,
|
|
99
|
+
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
|
+
accountUnreachable: "Dein Cloudflare-Konto konnte nicht gepr\xFCft werden. Versuch es in ein paar Minuten noch einmal.",
|
|
102
|
+
askUpdate: (name) => `Du hast bereits eine Instanz namens \u201E${name}\u201C. Auf diese Version aktualisieren? Deine Daten bleiben erhalten.`,
|
|
103
|
+
nothingChanged: "Es wurde nichts ge\xE4ndert. F\xFCr eine weitere Instanz nimm einen anderen Namen: npx create-orqevio --name <name>",
|
|
104
|
+
copyNotFound: (name, installCommand) => `In diesem Konto gibt es keine Instanz namens \u201E${name}\u201C. So installierst du sie: ${installCommand}`,
|
|
105
|
+
r2Disabled: (dashboardUrl, retryCommand) => [
|
|
106
|
+
"In deinem Cloudflare-Konto ist R2 noch nicht aktiviert, und deine Instanz braucht es, um Anh\xE4nge zu speichern.",
|
|
107
|
+
`Aktiviere es im Dashboard unter R2 \u2192 Overview: ${dashboardUrl}`,
|
|
108
|
+
"Die enthaltene Nutzung ist kostenlos (10 GB Speicherplatz pro Monat), Cloudflare fragt aber eventuell nach einer Zahlungsmethode.",
|
|
109
|
+
`F\xFChre danach erneut aus: ${retryCommand}`
|
|
110
|
+
].join("\n"),
|
|
111
|
+
signInPrompt: "Melde dich in dem Browserfenster, das sich gleich \xF6ffnet, bei Cloudflare an\u2026\n",
|
|
112
|
+
signInFailed: "Die Anmeldung bei Cloudflare wurde nicht abgeschlossen.",
|
|
113
|
+
noAccessToAccount: (account, accounts) => `Diese Sitzung hat keinen Zugriff auf das Konto \u201E${account}\u201C. Verf\xFCgbare Konten:
|
|
114
|
+
${accounts}`,
|
|
115
|
+
noAccounts: "In deiner Cloudflare-Sitzung ist kein Konto verf\xFCgbar.",
|
|
116
|
+
chooseAccountWithFlag: (accounts) => `Du hast mehrere Cloudflare-Konten. W\xE4hle eines mit --account <id> aus:
|
|
117
|
+
${accounts}`,
|
|
118
|
+
severalAccounts: (accounts) => `Du hast mehrere Cloudflare-Konten:
|
|
119
|
+
${accounts}`,
|
|
120
|
+
whichAccount: (count) => `Welches soll ich verwenden? (1-${count}): `,
|
|
121
|
+
deployFailed: "\nDie Bereitstellung ist fehlgeschlagen. Sieh dir die Meldung von Wrangler oben an; du kannst den Befehl erneut ausf\xFChren, ohne etwas zu verlieren.",
|
|
122
|
+
workerAddress: (name) => `die Adresse deines Workers \u201E${name}\u201C (Cloudflare-Dashboard \u2192 Workers & Pages)`,
|
|
123
|
+
updated: (version, address) => `
|
|
124
|
+
Deine Instanz l\xE4uft jetzt mit Orqevio ${version}: ${address}`,
|
|
125
|
+
installed: ({ address, setupCode, updateCommand, recoverCommand }) => [
|
|
126
|
+
"",
|
|
127
|
+
"Deine Orqevio-Instanz ist startklar.",
|
|
128
|
+
"",
|
|
129
|
+
` Adresse ${address}`,
|
|
130
|
+
` Einrichtungscode ${setupCode}`,
|
|
131
|
+
"",
|
|
132
|
+
"\xD6ffne sie und gib den Code und deinen Namen ein. Orqevio gibt dir dann deinen",
|
|
133
|
+
"Zugangsschl\xFCssel. Speichere ihn in deinem Passwort-Manager, denn mehr brauchst du zum",
|
|
134
|
+
"Anmelden nicht. Der Code funktioniert nicht mehr, sobald du die Instanz eingerichtet hast.",
|
|
135
|
+
"",
|
|
136
|
+
"F\xFCr sp\xE4ter:",
|
|
137
|
+
` ${updateCommand} aktualisiert deine Instanz (deine Daten bleiben erhalten)`,
|
|
138
|
+
` ${recoverCommand} gibt dir einen neuen Code, falls du den Schl\xFCssel verlierst`
|
|
139
|
+
].join("\n"),
|
|
140
|
+
cannotReadRepoConfig: (detail) => `Die Datei wrangler.jsonc in diesem Ordner kann nicht gelesen werden: ${detail}`,
|
|
141
|
+
badRepoName: (name) => `Der Worker-Name in wrangler.jsonc (\u201E${name}\u201C) kann nicht verwendet werden.`,
|
|
142
|
+
setupCodeFailed: "\nDer Code konnte nicht ge\xE4ndert werden. Sieh dir die Meldung von Wrangler oben an.",
|
|
143
|
+
recovered: (setupCode) => [
|
|
144
|
+
"",
|
|
145
|
+
`Neuer Einrichtungscode: ${setupCode}`,
|
|
146
|
+
"",
|
|
147
|
+
"\xD6ffne deine Instanz, w\xE4hle \u201ESchl\xFCssel verloren?\u201C und gib diesen Code ein, um einen neuen",
|
|
148
|
+
"Zugangsschl\xFCssel zu bekommen. Alle Sitzungen werden abgemeldet; deine Daten und dein",
|
|
149
|
+
"Tresor bleiben unver\xE4ndert."
|
|
150
|
+
].join("\n")
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
// src/messages/en.ts
|
|
154
|
+
var en = {
|
|
155
|
+
help: (defaultName) => `Installs your own copy of Orqevio on your Cloudflare account.
|
|
156
|
+
|
|
157
|
+
Usage:
|
|
158
|
+
npx create-orqevio Install a new copy
|
|
159
|
+
npx create-orqevio@latest update Update your copy to the latest version (your data is kept)
|
|
160
|
+
npx create-orqevio@latest recover Get a new code to recover your access
|
|
161
|
+
|
|
162
|
+
Options:
|
|
163
|
+
--name <name> Name of the copy (${defaultName} by default). It becomes part of its address.
|
|
164
|
+
--account <id> Cloudflare account to use, if you have several (or CLOUDFLARE_ACCOUNT_ID)
|
|
165
|
+
--lang <code> Language of these messages: en, es, fr, pt, it, de, nl or ja
|
|
166
|
+
-h, --help Show this help
|
|
167
|
+
-v, --version Show the version of Orqevio it installs
|
|
168
|
+
|
|
169
|
+
You need a Cloudflare account (the free plan is enough). The first time, your browser
|
|
170
|
+
opens so you can sign in.`,
|
|
171
|
+
no: /^n/i,
|
|
172
|
+
yesNo: "[Y/n]",
|
|
173
|
+
extraArgument: (arg) => `Unexpected \u201C${arg}\u201D.`,
|
|
174
|
+
unknownOption: (option) => `Unknown option \u201C${option}\u201D.`,
|
|
175
|
+
missingValue: (option) => `\u201C${option}\u201D needs a value.`,
|
|
176
|
+
unknownCommand: (command) => `Unknown command \u201C${command}\u201D.`,
|
|
177
|
+
dryRunOnlyForDeployRepo: "--dry-run only works with deploy-repo.",
|
|
178
|
+
unknownLanguage: (language, available) => `Unknown language \u201C${language}\u201D. Use one of: ${available}.`,
|
|
179
|
+
needsNode: (minimum, current) => `You need Node ${minimum} or later (you have ${current}). Get it at https://nodejs.org.`,
|
|
180
|
+
askName: (defaultName) => `Name of the copy (${defaultName}): `,
|
|
181
|
+
badName: (name) => `\u201C${name}\u201D can\u2019t be used as a name.`,
|
|
182
|
+
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`,
|
|
184
|
+
accountUnreachable: "Couldn\u2019t check your Cloudflare account. Try again in a few minutes.",
|
|
185
|
+
askUpdate: (name) => `You already have a copy called \u201C${name}\u201D. Update it to this version? Your data is kept.`,
|
|
186
|
+
nothingChanged: "Nothing has changed. For another copy, use another name: npx create-orqevio --name <name>",
|
|
187
|
+
copyNotFound: (name, installCommand) => `There\u2019s no copy called \u201C${name}\u201D in this account. To install it: ${installCommand}`,
|
|
188
|
+
r2Disabled: (dashboardUrl, retryCommand) => [
|
|
189
|
+
"Your Cloudflare account doesn\u2019t have R2 enabled yet, and your copy needs it to store attachments.",
|
|
190
|
+
`Enable it in the dashboard, under R2 \u2192 Overview: ${dashboardUrl}`,
|
|
191
|
+
"The included usage is free (10 GB of storage a month), although Cloudflare may ask for a payment method.",
|
|
192
|
+
`Then run again: ${retryCommand}`
|
|
193
|
+
].join("\n"),
|
|
194
|
+
signInPrompt: "Sign in to Cloudflare in the browser that\u2019s about to open\u2026\n",
|
|
195
|
+
signInFailed: "Signing in to Cloudflare wasn\u2019t completed.",
|
|
196
|
+
noAccessToAccount: (account, accounts) => `This session has no access to the account \u201C${account}\u201D. Available accounts:
|
|
197
|
+
${accounts}`,
|
|
198
|
+
noAccounts: "Your Cloudflare session has no account available.",
|
|
199
|
+
chooseAccountWithFlag: (accounts) => `You have several Cloudflare accounts. Choose one with --account <id>:
|
|
200
|
+
${accounts}`,
|
|
201
|
+
severalAccounts: (accounts) => `You have several Cloudflare accounts:
|
|
202
|
+
${accounts}`,
|
|
203
|
+
whichAccount: (count) => `Which one should I use? (1-${count}): `,
|
|
204
|
+
deployFailed: "\nThe deploy failed. Check Wrangler\u2019s message above; you can run the command again without losing anything.",
|
|
205
|
+
workerAddress: (name) => `the address of your Worker \u201C${name}\u201D (Cloudflare dashboard \u2192 Workers & Pages)`,
|
|
206
|
+
updated: (version, address) => `
|
|
207
|
+
Your copy is updated to Orqevio ${version}: ${address}`,
|
|
208
|
+
installed: ({ address, setupCode, updateCommand, recoverCommand }) => [
|
|
209
|
+
"",
|
|
210
|
+
"Your copy of Orqevio is up and running.",
|
|
211
|
+
"",
|
|
212
|
+
` Address ${address}`,
|
|
213
|
+
` Setup code ${setupCode}`,
|
|
214
|
+
"",
|
|
215
|
+
"Open it and enter the code and your name. Orqevio then gives you your access key:",
|
|
216
|
+
"save it in your password manager, because it\u2019s all you need to sign in.",
|
|
217
|
+
"The code stops working as soon as you claim the copy.",
|
|
218
|
+
"",
|
|
219
|
+
"Later on:",
|
|
220
|
+
` ${updateCommand} updates your copy (your data is kept)`,
|
|
221
|
+
` ${recoverCommand} gives you a new code if you lose the key`
|
|
222
|
+
].join("\n"),
|
|
223
|
+
cannotReadRepoConfig: (detail) => `Can\u2019t read wrangler.jsonc in this folder: ${detail}`,
|
|
224
|
+
badRepoName: (name) => `The Worker name in wrangler.jsonc (\u201C${name}\u201D) can\u2019t be used.`,
|
|
225
|
+
setupCodeFailed: "\nThe code couldn\u2019t be changed. Check Wrangler\u2019s message above.",
|
|
226
|
+
recovered: (setupCode) => [
|
|
227
|
+
"",
|
|
228
|
+
`New setup code: ${setupCode}`,
|
|
229
|
+
"",
|
|
230
|
+
"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
|
+
].join("\n")
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
// src/messages/es.ts
|
|
236
|
+
var es = {
|
|
237
|
+
help: (defaultName) => `Instala tu propia copia de Orqevio en tu cuenta de Cloudflare.
|
|
238
|
+
|
|
239
|
+
Uso:
|
|
240
|
+
npx create-orqevio Instala una copia nueva
|
|
241
|
+
npx create-orqevio@latest update Actualiza tu copia a la \xFAltima versi\xF3n (tus datos se conservan)
|
|
242
|
+
npx create-orqevio@latest recover Genera un c\xF3digo nuevo para recuperar el acceso
|
|
243
|
+
|
|
244
|
+
Opciones:
|
|
245
|
+
--name <nombre> Nombre de la copia (por defecto, ${defaultName}). Forma parte de su direcci\xF3n.
|
|
246
|
+
--account <id> Cuenta de Cloudflare que usar, si tienes varias (o CLOUDFLARE_ACCOUNT_ID)
|
|
247
|
+
--lang <c\xF3digo> Idioma de estos mensajes: en, es, fr, pt, it, de, nl o ja
|
|
248
|
+
-h, --help Muestra esta ayuda
|
|
249
|
+
-v, --version Muestra la versi\xF3n de Orqevio que se instala
|
|
250
|
+
|
|
251
|
+
Necesitas una cuenta de Cloudflare (el plan gratuito basta). La primera vez se abrir\xE1 el
|
|
252
|
+
navegador para que inicies sesi\xF3n.`,
|
|
253
|
+
no: /^n/i,
|
|
254
|
+
yesNo: "[S/n]",
|
|
255
|
+
extraArgument: (arg) => `Sobra \xAB${arg}\xBB.`,
|
|
256
|
+
unknownOption: (option) => `No conozco la opci\xF3n \xAB${option}\xBB.`,
|
|
257
|
+
missingValue: (option) => `\xAB${option}\xBB necesita un valor.`,
|
|
258
|
+
unknownCommand: (command) => `No conozco la orden \xAB${command}\xBB.`,
|
|
259
|
+
dryRunOnlyForDeployRepo: "--dry-run solo vale con deploy-repo.",
|
|
260
|
+
unknownLanguage: (language, available) => `No conozco el idioma \xAB${language}\xBB. Usa uno de estos: ${available}.`,
|
|
261
|
+
needsNode: (minimum, current) => `Necesitas Node ${minimum} o superior (tienes ${current}). Desc\xE1rgalo en https://nodejs.org.`,
|
|
262
|
+
askName: (defaultName) => `Nombre de la copia (${defaultName}): `,
|
|
263
|
+
badName: (name) => `\xAB${name}\xBB no vale como nombre.`,
|
|
264
|
+
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`,
|
|
266
|
+
accountUnreachable: "No he podido consultar tu cuenta de Cloudflare. Vuelve a intentarlo en unos minutos.",
|
|
267
|
+
askUpdate: (name) => `Ya tienes una copia llamada \xAB${name}\xBB. \xBFLa actualizo a esta versi\xF3n? Tus datos se conservan.`,
|
|
268
|
+
nothingChanged: "No he cambiado nada. Para otra copia, usa otro nombre: npx create-orqevio --name <nombre>",
|
|
269
|
+
copyNotFound: (name, installCommand) => `No encuentro una copia llamada \xAB${name}\xBB en esta cuenta. Para instalarla: ${installCommand}`,
|
|
270
|
+
r2Disabled: (dashboardUrl, retryCommand) => [
|
|
271
|
+
"Tu cuenta de Cloudflare todav\xEDa no tiene R2 activado, y tu copia lo necesita para guardar los adjuntos.",
|
|
272
|
+
`Act\xEDvalo en el panel, en R2 \u2192 Overview: ${dashboardUrl}`,
|
|
273
|
+
"El uso incluido es gratis (10 GB de almacenamiento al mes), aunque Cloudflare puede pedirte un m\xE9todo de pago.",
|
|
274
|
+
`Despu\xE9s, repite: ${retryCommand}`
|
|
275
|
+
].join("\n"),
|
|
276
|
+
signInPrompt: "Inicia sesi\xF3n en Cloudflare en el navegador que se va a abrir\u2026\n",
|
|
277
|
+
signInFailed: "No se ha completado el inicio de sesi\xF3n en Cloudflare.",
|
|
278
|
+
noAccessToAccount: (account, accounts) => `Esta sesi\xF3n no tiene acceso a la cuenta \xAB${account}\xBB. Cuentas disponibles:
|
|
279
|
+
${accounts}`,
|
|
280
|
+
noAccounts: "Tu sesi\xF3n de Cloudflare no tiene ninguna cuenta disponible.",
|
|
281
|
+
chooseAccountWithFlag: (accounts) => `Tienes varias cuentas de Cloudflare. Elige una con --account <id>:
|
|
282
|
+
${accounts}`,
|
|
283
|
+
severalAccounts: (accounts) => `Tienes varias cuentas de Cloudflare:
|
|
284
|
+
${accounts}`,
|
|
285
|
+
whichAccount: (count) => `\xBFCu\xE1l uso? (1-${count}): `,
|
|
286
|
+
deployFailed: "\nNo se ha podido desplegar. Revisa el mensaje de Wrangler de arriba; puedes repetir la orden sin perder nada.",
|
|
287
|
+
workerAddress: (name) => `la direcci\xF3n de tu Worker \xAB${name}\xBB (panel de Cloudflare \u2192 Workers y Pages)`,
|
|
288
|
+
updated: (version, address) => `
|
|
289
|
+
Tu copia est\xE1 actualizada a Orqevio ${version}: ${address}`,
|
|
290
|
+
installed: ({ address, setupCode, updateCommand, recoverCommand }) => [
|
|
291
|
+
"",
|
|
292
|
+
"Tu copia de Orqevio est\xE1 en marcha.",
|
|
293
|
+
"",
|
|
294
|
+
` Direcci\xF3n ${address}`,
|
|
295
|
+
` C\xF3digo de configuraci\xF3n ${setupCode}`,
|
|
296
|
+
"",
|
|
297
|
+
"\xC1brela, escribe el c\xF3digo y tu nombre. Orqevio te dar\xE1 entonces tu clave de acceso:",
|
|
298
|
+
"gu\xE1rdala en tu gestor de contrase\xF1as, porque es lo \xFAnico que necesitas para entrar.",
|
|
299
|
+
"El c\xF3digo deja de servir en cuanto reclames la copia.",
|
|
300
|
+
"",
|
|
301
|
+
"M\xE1s adelante:",
|
|
302
|
+
` ${updateCommand} actualiza tu copia (tus datos se conservan)`,
|
|
303
|
+
` ${recoverCommand} te da un c\xF3digo nuevo si pierdes la clave`
|
|
304
|
+
].join("\n"),
|
|
305
|
+
cannotReadRepoConfig: (detail) => `No puedo leer wrangler.jsonc en esta carpeta: ${detail}`,
|
|
306
|
+
badRepoName: (name) => `El nombre del Worker en wrangler.jsonc (\xAB${name}\xBB) no vale.`,
|
|
307
|
+
setupCodeFailed: "\nNo se ha podido cambiar el c\xF3digo. Revisa el mensaje de Wrangler de arriba.",
|
|
308
|
+
recovered: (setupCode) => [
|
|
309
|
+
"",
|
|
310
|
+
`Nuevo c\xF3digo de configuraci\xF3n: ${setupCode}`,
|
|
311
|
+
"",
|
|
312
|
+
"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
|
+
].join("\n")
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
// src/messages/fr.ts
|
|
318
|
+
var fr = {
|
|
319
|
+
help: (defaultName) => `Installe votre propre copie d\u2019Orqevio sur votre compte Cloudflare.
|
|
320
|
+
|
|
321
|
+
Utilisation :
|
|
322
|
+
npx create-orqevio Installe une nouvelle copie
|
|
323
|
+
npx create-orqevio@latest update Passe votre copie \xE0 la derni\xE8re version (vos donn\xE9es sont conserv\xE9es)
|
|
324
|
+
npx create-orqevio@latest recover G\xE9n\xE8re un nouveau code pour r\xE9cup\xE9rer votre acc\xE8s
|
|
325
|
+
|
|
326
|
+
Options :
|
|
327
|
+
--name <nom> Nom de la copie (${defaultName} par d\xE9faut). Il fait partie de son adresse.
|
|
328
|
+
--account <id> Compte Cloudflare \xE0 utiliser, si vous en avez plusieurs (ou CLOUDFLARE_ACCOUNT_ID)
|
|
329
|
+
--lang <code> Langue de ces messages : en, es, fr, pt, it, de, nl ou ja
|
|
330
|
+
-h, --help Affiche cette aide
|
|
331
|
+
-v, --version Affiche la version d\u2019Orqevio install\xE9e
|
|
332
|
+
|
|
333
|
+
Il vous faut un compte Cloudflare (l\u2019offre gratuite suffit). La premi\xE8re fois, votre
|
|
334
|
+
navigateur s\u2019ouvre pour que vous puissiez vous connecter.`,
|
|
335
|
+
no: /^n/i,
|
|
336
|
+
yesNo: "[O/n]",
|
|
337
|
+
extraArgument: (arg) => `Argument inattendu : \xAB ${arg} \xBB.`,
|
|
338
|
+
unknownOption: (option) => `Option inconnue : \xAB ${option} \xBB.`,
|
|
339
|
+
missingValue: (option) => `L\u2019option \xAB ${option} \xBB attend une valeur.`,
|
|
340
|
+
unknownCommand: (command) => `Commande inconnue : \xAB ${command} \xBB.`,
|
|
341
|
+
dryRunOnlyForDeployRepo: "--dry-run ne fonctionne qu\u2019avec deploy-repo.",
|
|
342
|
+
unknownLanguage: (language, available) => `Langue inconnue : \xAB ${language} \xBB. Utilisez l\u2019une de celles-ci : ${available}.`,
|
|
343
|
+
needsNode: (minimum, current) => `Il vous faut Node ${minimum} ou une version plus r\xE9cente (vous avez la ${current}). T\xE9l\xE9chargez-le sur https://nodejs.org.`,
|
|
344
|
+
askName: (defaultName) => `Nom de la copie (${defaultName}) : `,
|
|
345
|
+
badName: (name) => `\xAB ${name} \xBB ne peut pas servir de nom.`,
|
|
346
|
+
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`,
|
|
348
|
+
accountUnreachable: "Impossible de v\xE9rifier votre compte Cloudflare. R\xE9essayez dans quelques minutes.",
|
|
349
|
+
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
|
+
nothingChanged: "Rien n\u2019a \xE9t\xE9 modifi\xE9. Pour une autre copie, choisissez un autre nom : npx create-orqevio --name <nom>",
|
|
351
|
+
copyNotFound: (name, installCommand) => `Ce compte n\u2019a aucune copie nomm\xE9e \xAB ${name} \xBB. Pour l\u2019installer : ${installCommand}`,
|
|
352
|
+
r2Disabled: (dashboardUrl, retryCommand) => [
|
|
353
|
+
"R2 n\u2019est pas encore activ\xE9 sur votre compte Cloudflare, et votre copie en a besoin pour stocker les pi\xE8ces jointes.",
|
|
354
|
+
`Activez-le dans le tableau de bord, sous R2 \u2192 Overview : ${dashboardUrl}`,
|
|
355
|
+
"L\u2019utilisation incluse est gratuite (10 Go de stockage par mois), m\xEAme si Cloudflare peut vous demander un moyen de paiement.",
|
|
356
|
+
`Relancez ensuite : ${retryCommand}`
|
|
357
|
+
].join("\n"),
|
|
358
|
+
signInPrompt: "Connectez-vous \xE0 Cloudflare dans le navigateur qui va s\u2019ouvrir\u2026\n",
|
|
359
|
+
signInFailed: "La connexion \xE0 Cloudflare n\u2019a pas abouti.",
|
|
360
|
+
noAccessToAccount: (account, accounts) => `Cette session n\u2019a pas acc\xE8s au compte \xAB ${account} \xBB. Comptes disponibles :
|
|
361
|
+
${accounts}`,
|
|
362
|
+
noAccounts: "Votre session Cloudflare n\u2019a acc\xE8s \xE0 aucun compte.",
|
|
363
|
+
chooseAccountWithFlag: (accounts) => `Vous avez plusieurs comptes Cloudflare. Choisissez-en un avec --account <id> :
|
|
364
|
+
${accounts}`,
|
|
365
|
+
severalAccounts: (accounts) => `Vous avez plusieurs comptes Cloudflare :
|
|
366
|
+
${accounts}`,
|
|
367
|
+
whichAccount: (count) => `Lequel dois-je utiliser ? (1-${count}) : `,
|
|
368
|
+
deployFailed: "\nLe d\xE9ploiement a \xE9chou\xE9. Lisez le message de Wrangler ci-dessus ; vous pouvez relancer la commande sans rien perdre.",
|
|
369
|
+
workerAddress: (name) => `l\u2019adresse de votre Worker \xAB ${name} \xBB (tableau de bord Cloudflare \u2192 Workers et Pages)`,
|
|
370
|
+
updated: (version, address) => `
|
|
371
|
+
Votre copie est pass\xE9e \xE0 Orqevio ${version} : ${address}`,
|
|
372
|
+
installed: ({ address, setupCode, updateCommand, recoverCommand }) => [
|
|
373
|
+
"",
|
|
374
|
+
"Votre copie d\u2019Orqevio est en ligne.",
|
|
375
|
+
"",
|
|
376
|
+
` Adresse ${address}`,
|
|
377
|
+
` Code de configuration ${setupCode}`,
|
|
378
|
+
"",
|
|
379
|
+
"Ouvrez-la et saisissez le code et votre nom pour recevoir votre cl\xE9 d\u2019acc\xE8s.",
|
|
380
|
+
"Enregistrez-la dans votre gestionnaire de mots de passe : elle suffit pour vous connecter.",
|
|
381
|
+
"Le code cesse de fonctionner d\xE8s que vous prenez possession de la copie.",
|
|
382
|
+
"",
|
|
383
|
+
"Plus tard :",
|
|
384
|
+
` ${updateCommand} met \xE0 jour votre copie (vos donn\xE9es sont conserv\xE9es)`,
|
|
385
|
+
` ${recoverCommand} vous donne un nouveau code si vous perdez la cl\xE9`
|
|
386
|
+
].join("\n"),
|
|
387
|
+
cannotReadRepoConfig: (detail) => `Impossible de lire wrangler.jsonc dans ce dossier : ${detail}`,
|
|
388
|
+
badRepoName: (name) => `Le nom du Worker dans wrangler.jsonc (\xAB ${name} \xBB) n\u2019est pas utilisable.`,
|
|
389
|
+
setupCodeFailed: "\nImpossible de modifier le code. Lisez le message de Wrangler ci-dessus.",
|
|
390
|
+
recovered: (setupCode) => [
|
|
391
|
+
"",
|
|
392
|
+
`Nouveau code de configuration : ${setupCode}`,
|
|
393
|
+
"",
|
|
394
|
+
"Ouvrez votre copie, choisissez \xAB Cl\xE9 perdue ? \xBB et saisissez ce code pour obtenir",
|
|
395
|
+
"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
|
+
].join("\n")
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
// src/messages/it.ts
|
|
401
|
+
var it = {
|
|
402
|
+
help: (defaultName) => `Installa la tua copia personale di Orqevio nel tuo account Cloudflare.
|
|
403
|
+
|
|
404
|
+
Uso:
|
|
405
|
+
npx create-orqevio Installa una nuova copia
|
|
406
|
+
npx create-orqevio@latest update Aggiorna la tua copia all\u2019ultima versione (senza perdere i dati)
|
|
407
|
+
npx create-orqevio@latest recover Genera un nuovo codice per recuperare l\u2019accesso
|
|
408
|
+
|
|
409
|
+
Opzioni:
|
|
410
|
+
--name <nome> Nome della copia (predefinito: ${defaultName}). Diventa parte del suo indirizzo.
|
|
411
|
+
--account <id> Account Cloudflare da usare, se ne hai pi\xF9 di uno (o CLOUDFLARE_ACCOUNT_ID)
|
|
412
|
+
--lang <codice> Lingua di questi messaggi: en, es, fr, pt, it, de, nl o ja
|
|
413
|
+
-h, --help Mostra questo aiuto
|
|
414
|
+
-v, --version Mostra la versione di Orqevio che viene installata
|
|
415
|
+
|
|
416
|
+
Ti serve un account Cloudflare (basta il piano gratuito). La prima volta si apre il browser
|
|
417
|
+
per farti accedere.`,
|
|
418
|
+
no: /^n/i,
|
|
419
|
+
yesNo: "[S/n]",
|
|
420
|
+
extraArgument: (arg) => `Argomento inatteso: \xAB${arg}\xBB.`,
|
|
421
|
+
unknownOption: (option) => `Opzione sconosciuta: \xAB${option}\xBB.`,
|
|
422
|
+
missingValue: (option) => `L\u2019opzione \xAB${option}\xBB richiede un valore.`,
|
|
423
|
+
unknownCommand: (command) => `Comando sconosciuto: \xAB${command}\xBB.`,
|
|
424
|
+
dryRunOnlyForDeployRepo: "--dry-run funziona solo con deploy-repo.",
|
|
425
|
+
unknownLanguage: (language, available) => `Lingua sconosciuta: \xAB${language}\xBB. Usa una di queste: ${available}.`,
|
|
426
|
+
needsNode: (minimum, current) => `Ti serve Node ${minimum} o successivo (hai la ${current}). Scaricalo da https://nodejs.org.`,
|
|
427
|
+
askName: (defaultName) => `Nome della copia (${defaultName}): `,
|
|
428
|
+
badName: (name) => `\xAB${name}\xBB non si pu\xF2 usare come nome.`,
|
|
429
|
+
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`,
|
|
431
|
+
accountUnreachable: "Non sono riuscito a controllare il tuo account Cloudflare. Riprova tra qualche minuto.",
|
|
432
|
+
askUpdate: (name) => `Hai gi\xE0 una copia chiamata \xAB${name}\xBB. Vuoi aggiornarla a questa versione? I tuoi dati vengono mantenuti.`,
|
|
433
|
+
nothingChanged: "Non ho cambiato nulla. Per un\u2019altra copia, usa un altro nome: npx create-orqevio --name <nome>",
|
|
434
|
+
copyNotFound: (name, installCommand) => `In questo account non c\u2019\xE8 nessuna copia chiamata \xAB${name}\xBB. Per installarla: ${installCommand}`,
|
|
435
|
+
r2Disabled: (dashboardUrl, retryCommand) => [
|
|
436
|
+
"Nel tuo account Cloudflare R2 non \xE8 ancora attivo, e alla tua copia serve per salvare gli allegati.",
|
|
437
|
+
`Attivalo nella dashboard, in R2 \u2192 Overview: ${dashboardUrl}`,
|
|
438
|
+
"L\u2019utilizzo incluso \xE8 gratuito (10 GB di spazio al mese), anche se Cloudflare potrebbe chiederti un metodo di pagamento.",
|
|
439
|
+
`Poi esegui di nuovo: ${retryCommand}`
|
|
440
|
+
].join("\n"),
|
|
441
|
+
signInPrompt: "Accedi a Cloudflare nel browser che sta per aprirsi\u2026\n",
|
|
442
|
+
signInFailed: "L\u2019accesso a Cloudflare non \xE8 stato completato.",
|
|
443
|
+
noAccessToAccount: (account, accounts) => `Questa sessione non ha accesso all\u2019account \xAB${account}\xBB. Account disponibili:
|
|
444
|
+
${accounts}`,
|
|
445
|
+
noAccounts: "La tua sessione Cloudflare non ha nessun account disponibile.",
|
|
446
|
+
chooseAccountWithFlag: (accounts) => `Hai pi\xF9 account Cloudflare. Scegline uno con --account <id>:
|
|
447
|
+
${accounts}`,
|
|
448
|
+
severalAccounts: (accounts) => `Hai pi\xF9 account Cloudflare:
|
|
449
|
+
${accounts}`,
|
|
450
|
+
whichAccount: (count) => `Quale devo usare? (1-${count}): `,
|
|
451
|
+
deployFailed: "\nIl deploy non \xE8 riuscito. Controlla il messaggio di Wrangler qui sopra; puoi eseguire di nuovo il comando senza perdere nulla.",
|
|
452
|
+
workerAddress: (name) => `l\u2019indirizzo del tuo Worker \xAB${name}\xBB (dashboard di Cloudflare \u2192 Workers e Pages)`,
|
|
453
|
+
updated: (version, address) => `
|
|
454
|
+
La tua copia \xE8 stata aggiornata a Orqevio ${version}: ${address}`,
|
|
455
|
+
installed: ({ address, setupCode, updateCommand, recoverCommand }) => [
|
|
456
|
+
"",
|
|
457
|
+
"La tua copia di Orqevio \xE8 attiva e funzionante.",
|
|
458
|
+
"",
|
|
459
|
+
` Indirizzo ${address}`,
|
|
460
|
+
` Codice di configurazione ${setupCode}`,
|
|
461
|
+
"",
|
|
462
|
+
"Aprila e inserisci il codice e il tuo nome. Orqevio ti dar\xE0 la tua chiave di accesso:",
|
|
463
|
+
"salvala nel tuo gestore di password, perch\xE9 \xE8 tutto ci\xF2 che ti serve per accedere.",
|
|
464
|
+
"Il codice smette di funzionare non appena prendi possesso della copia.",
|
|
465
|
+
"",
|
|
466
|
+
"Pi\xF9 avanti:",
|
|
467
|
+
` ${updateCommand} aggiorna la tua copia (senza perdere i dati)`,
|
|
468
|
+
` ${recoverCommand} ti d\xE0 un nuovo codice se perdi la chiave`
|
|
469
|
+
].join("\n"),
|
|
470
|
+
cannotReadRepoConfig: (detail) => `Non riesco a leggere wrangler.jsonc in questa cartella: ${detail}`,
|
|
471
|
+
badRepoName: (name) => `Il nome del Worker in wrangler.jsonc (\xAB${name}\xBB) non si pu\xF2 usare.`,
|
|
472
|
+
setupCodeFailed: "\nNon \xE8 stato possibile cambiare il codice. Controlla il messaggio di Wrangler qui sopra.",
|
|
473
|
+
recovered: (setupCode) => [
|
|
474
|
+
"",
|
|
475
|
+
`Nuovo codice di configurazione: ${setupCode}`,
|
|
476
|
+
"",
|
|
477
|
+
"Apri la tua copia, scegli \xABHai perso la chiave?\xBB e inserisci questo codice per ricevere",
|
|
478
|
+
"una nuova chiave di accesso. Tutte le sessioni verranno chiuse; i tuoi dati e la tua",
|
|
479
|
+
"cassaforte non cambiano."
|
|
480
|
+
].join("\n")
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
// src/messages/ja.ts
|
|
484
|
+
var ja = {
|
|
485
|
+
help: (defaultName) => `\u3042\u306A\u305F\u5C02\u7528\u306EOrqevio\u3092\u3001\u304A\u4F7F\u3044\u306ECloudflare\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u307E\u3059\u3002
|
|
486
|
+
|
|
487
|
+
\u4F7F\u3044\u65B9\uFF1A
|
|
488
|
+
npx create-orqevio \u65B0\u3057\u3044Orqevio\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB
|
|
489
|
+
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
|
+
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
|
|
491
|
+
|
|
492
|
+
\u30AA\u30D7\u30B7\u30E7\u30F3\uFF1A
|
|
493
|
+
--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
|
|
494
|
+
--account <id> \u4F7F\u7528\u3059\u308BCloudflare\u30A2\u30AB\u30A6\u30F3\u30C8\uFF08\u8907\u6570\u3042\u308B\u5834\u5408\u3002CLOUDFLARE_ACCOUNT_ID\u3067\u3082\u6307\u5B9A\u53EF\uFF09
|
|
495
|
+
--lang <\u30B3\u30FC\u30C9> \u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u8A00\u8A9E\uFF1Aen\u3001es\u3001fr\u3001pt\u3001it\u3001de\u3001nl\u3001ja
|
|
496
|
+
-h, --help \u3053\u306E\u30D8\u30EB\u30D7\u3092\u8868\u793A
|
|
497
|
+
-v, --version \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u308BOrqevio\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u8868\u793A
|
|
498
|
+
|
|
499
|
+
Cloudflare\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u5FC5\u8981\u3067\u3059\uFF08\u7121\u6599\u30D7\u30E9\u30F3\u3067\u5341\u5206\u3067\u3059\uFF09\u3002\u521D\u56DE\u306F\u30D6\u30E9\u30A6\u30B6\u304C\u958B\u304F\u306E\u3067\u3001
|
|
500
|
+
\u305D\u3053\u3067\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,
|
|
501
|
+
// n, no, いいえ, and the full-width n that a Japanese input method may type.
|
|
502
|
+
no: /^(n|n|いいえ)/i,
|
|
503
|
+
yesNo: "[Y/n]",
|
|
504
|
+
extraArgument: (arg) => `\u4E88\u671F\u3057\u306A\u3044\u5F15\u6570\u300C${arg}\u300D\u304C\u3042\u308A\u307E\u3059\u3002`,
|
|
505
|
+
unknownOption: (option) => `\u4E0D\u660E\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u300C${option}\u300D\u3067\u3059\u3002`,
|
|
506
|
+
missingValue: (option) => `\u30AA\u30D7\u30B7\u30E7\u30F3\u300C${option}\u300D\u306B\u306F\u5024\u304C\u5FC5\u8981\u3067\u3059\u3002`,
|
|
507
|
+
unknownCommand: (command) => `\u300C${command}\u300D\u306F\u4E0D\u660E\u306A\u30B3\u30DE\u30F3\u30C9\u3067\u3059\u3002`,
|
|
508
|
+
dryRunOnlyForDeployRepo: "--dry-run\u306Fdeploy-repo\u3067\u306E\u307F\u4F7F\u3048\u307E\u3059\u3002",
|
|
509
|
+
unknownLanguage: (language, available) => `\u300C${language}\u300D\u306F\u4E0D\u660E\u306A\u8A00\u8A9E\u3067\u3059\u3002\u6B21\u306E\u3044\u305A\u308C\u304B\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\uFF1A${available}\u3002`,
|
|
510
|
+
needsNode: (minimum, current) => `Node ${minimum}\u4EE5\u964D\u304C\u5FC5\u8981\u3067\u3059\uFF08\u73FE\u5728\u306F${current}\uFF09\u3002https://nodejs.org \u304B\u3089\u5165\u624B\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,
|
|
511
|
+
askName: (defaultName) => `Orqevio\u306E\u540D\u524D\uFF08${defaultName}\uFF09\uFF1A`,
|
|
512
|
+
badName: (name) => `\u300C${name}\u300D\u306F\u540D\u524D\u3068\u3057\u3066\u4F7F\u3048\u307E\u305B\u3093\u3002`,
|
|
513
|
+
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]}`,
|
|
515
|
+
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
|
+
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
|
+
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>",
|
|
518
|
+
copyNotFound: (name, installCommand) => `\u3053\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u300C${name}\u300D\u3068\u3044\u3046\u540D\u524D\u306EOrqevio\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3059\u308B\u306B\u306F\uFF1A${installCommand}`,
|
|
519
|
+
r2Disabled: (dashboardUrl, retryCommand) => [
|
|
520
|
+
"\u304A\u4F7F\u3044\u306ECloudflare\u30A2\u30AB\u30A6\u30F3\u30C8\u3067\u306F\u3001\u307E\u3060R2\u304C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u307E\u305B\u3093\u3002Orqevio\u306F\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u306E\u4FDD\u5B58\u306BR2\u3092\u4F7F\u3044\u307E\u3059\u3002",
|
|
521
|
+
`\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u306E\u300CR2 \u2192 Overview\u300D\u3067\u6709\u52B9\u306B\u3057\u3066\u304F\u3060\u3055\u3044\uFF1A${dashboardUrl}`,
|
|
522
|
+
"\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
|
+
`\u305D\u306E\u5F8C\u3001\u3082\u3046\u4E00\u5EA6\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\uFF1A${retryCommand}`
|
|
524
|
+
].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: "Cloudflare\u3078\u306E\u30ED\u30B0\u30A4\u30F3\u304C\u5B8C\u4E86\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
|
|
527
|
+
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
|
+
${accounts}`,
|
|
529
|
+
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",
|
|
530
|
+
chooseAccountWithFlag: (accounts) => `Cloudflare\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u8907\u6570\u3042\u308A\u307E\u3059\u3002--account <id>\u30671\u3064\u9078\u3093\u3067\u304F\u3060\u3055\u3044\uFF1A
|
|
531
|
+
${accounts}`,
|
|
532
|
+
severalAccounts: (accounts) => `Cloudflare\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u8907\u6570\u3042\u308A\u307E\u3059\uFF1A
|
|
533
|
+
${accounts}`,
|
|
534
|
+
whichAccount: (count) => `\u3069\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F7F\u3044\u307E\u3059\u304B\uFF1F\uFF081\u301C${count}\uFF09\uFF1A`,
|
|
535
|
+
deployFailed: "\n\u30C7\u30D7\u30ED\u30A4\u306B\u5931\u6557\u3057\u307E\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\u4F55\u3082\u5931\u308F\u308C\u306A\u3044\u306E\u3067\u3001\u30B3\u30DE\u30F3\u30C9\u306F\u3082\u3046\u4E00\u5EA6\u5B9F\u884C\u3067\u304D\u307E\u3059\u3002",
|
|
536
|
+
workerAddress: (name) => `Worker\u300C${name}\u300D\u306E\u30A2\u30C9\u30EC\u30B9\uFF08Cloudflare\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9 \u2192 Workers & Pages\uFF09`,
|
|
537
|
+
updated: (version, address) => `
|
|
538
|
+
Orqevio ${version}\u3078\u306E\u66F4\u65B0\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F\uFF1A${address}`,
|
|
539
|
+
installed: ({ address, setupCode, updateCommand, recoverCommand }) => [
|
|
540
|
+
"",
|
|
541
|
+
"\u3042\u306A\u305F\u306EOrqevio\u304C\u52D5\u304D\u59CB\u3081\u307E\u3057\u305F\u3002",
|
|
542
|
+
"",
|
|
543
|
+
` \u30A2\u30C9\u30EC\u30B9 ${address}`,
|
|
544
|
+
` \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u30B3\u30FC\u30C9 ${setupCode}`,
|
|
545
|
+
"",
|
|
546
|
+
"\u30A2\u30C9\u30EC\u30B9\u3092\u958B\u3044\u3066\u3001\u30B3\u30FC\u30C9\u3068\u540D\u524D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002Orqevio\u304C\u30A2\u30AF\u30BB\u30B9\u30AD\u30FC\u3092\u767A\u884C\u3057\u307E\u3059\u3002",
|
|
547
|
+
"\u30ED\u30B0\u30A4\u30F3\u306B\u5FC5\u8981\u306A\u306E\u306F\u3053\u306E\u30AD\u30FC\u3060\u3051\u306A\u306E\u3067\u3001\u30D1\u30B9\u30EF\u30FC\u30C9\u30DE\u30CD\u30FC\u30B8\u30E3\u30FC\u306B\u4FDD\u5B58\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
548
|
+
"\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u304C\u6E08\u3080\u3068\u3001\u30B3\u30FC\u30C9\u306F\u3059\u3050\u306B\u4F7F\u3048\u306A\u304F\u306A\u308A\u307E\u3059\u3002",
|
|
549
|
+
"",
|
|
550
|
+
"\u4ECA\u5F8C\u306E\u64CD\u4F5C\uFF1A",
|
|
551
|
+
` ${updateCommand} Orqevio\u3092\u66F4\u65B0\u3057\u307E\u3059\uFF08\u30C7\u30FC\u30BF\u306F\u305D\u306E\u307E\u307E\u6B8B\u308A\u307E\u3059\uFF09`,
|
|
552
|
+
` ${recoverCommand} \u30AD\u30FC\u3092\u7D1B\u5931\u3057\u305F\u3068\u304D\u306B\u3001\u65B0\u3057\u3044\u30B3\u30FC\u30C9\u3092\u767A\u884C\u3057\u307E\u3059`
|
|
553
|
+
].join("\n"),
|
|
554
|
+
cannotReadRepoConfig: (detail) => `\u3053\u306E\u30D5\u30A9\u30EB\u30C0\u30FC\u306Ewrangler.jsonc\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\uFF1A${detail}`,
|
|
555
|
+
badRepoName: (name) => `wrangler.jsonc\u306EWorker\u540D\uFF08\u300C${name}\u300D\uFF09\u306F\u4F7F\u3048\u307E\u305B\u3093\u3002`,
|
|
556
|
+
setupCodeFailed: "\n\u30B3\u30FC\u30C9\u3092\u5909\u66F4\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u4E0A\u306B\u8868\u793A\u3055\u308C\u305FWrangler\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
557
|
+
recovered: (setupCode) => [
|
|
558
|
+
"",
|
|
559
|
+
`\u65B0\u3057\u3044\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u30B3\u30FC\u30C9\uFF1A${setupCode}`,
|
|
560
|
+
"",
|
|
561
|
+
"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
|
+
"\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
|
+
].join("\n")
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
// src/messages/nl.ts
|
|
568
|
+
var nl = {
|
|
569
|
+
help: (defaultName) => `Zet je eigen installatie van Orqevio op in je Cloudflare-account.
|
|
570
|
+
|
|
571
|
+
Gebruik:
|
|
572
|
+
npx create-orqevio Een nieuwe installatie opzetten
|
|
573
|
+
npx create-orqevio@latest update Bijwerken naar de nieuwste versie (je gegevens blijven behouden)
|
|
574
|
+
npx create-orqevio@latest recover Een nieuwe code krijgen om je toegang te herstellen
|
|
575
|
+
|
|
576
|
+
Opties:
|
|
577
|
+
--name <naam> Naam van de installatie (standaard ${defaultName}). Wordt onderdeel van het adres.
|
|
578
|
+
--account <id> Te gebruiken Cloudflare-account, als je er meerdere hebt (of CLOUDFLARE_ACCOUNT_ID)
|
|
579
|
+
--lang <code> Taal van deze berichten: en, es, fr, pt, it, de, nl of ja
|
|
580
|
+
-h, --help Deze hulp tonen
|
|
581
|
+
-v, --version De versie van Orqevio tonen die wordt ge\xEFnstalleerd
|
|
582
|
+
|
|
583
|
+
Je hebt een Cloudflare-account nodig (het gratis abonnement is genoeg). De eerste keer
|
|
584
|
+
opent je browser, zodat je kunt inloggen.`,
|
|
585
|
+
no: /^n/i,
|
|
586
|
+
yesNo: "[J/n]",
|
|
587
|
+
extraArgument: (arg) => `Onverwacht argument \u2018${arg}\u2019.`,
|
|
588
|
+
unknownOption: (option) => `Onbekende optie \u2018${option}\u2019.`,
|
|
589
|
+
missingValue: (option) => `De optie \u2018${option}\u2019 heeft een waarde nodig.`,
|
|
590
|
+
unknownCommand: (command) => `Onbekende opdracht \u2018${command}\u2019.`,
|
|
591
|
+
dryRunOnlyForDeployRepo: "--dry-run werkt alleen met deploy-repo.",
|
|
592
|
+
unknownLanguage: (language, available) => `Onbekende taal \u2018${language}\u2019. Kies een van deze: ${available}.`,
|
|
593
|
+
needsNode: (minimum, current) => `Je hebt Node ${minimum} of nieuwer nodig (je gebruikt nu ${current}). Je vindt het op https://nodejs.org.`,
|
|
594
|
+
askName: (defaultName) => `Naam van de installatie (${defaultName}): `,
|
|
595
|
+
badName: (name) => `\u2018${name}\u2019 kan niet als naam worden gebruikt.`,
|
|
596
|
+
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]}`,
|
|
598
|
+
accountUnreachable: "Je Cloudflare-account kon niet worden gecontroleerd. Probeer het over een paar minuten opnieuw.",
|
|
599
|
+
askUpdate: (name) => `Je hebt al een installatie met de naam \u2018${name}\u2019. Bijwerken naar deze versie? Je gegevens blijven behouden.`,
|
|
600
|
+
nothingChanged: "Er is niets gewijzigd. Voor een extra installatie kies je een andere naam: npx create-orqevio --name <naam>",
|
|
601
|
+
copyNotFound: (name, installCommand) => `Er staat geen installatie met de naam \u2018${name}\u2019 in dit account. Zo zet je die op: ${installCommand}`,
|
|
602
|
+
r2Disabled: (dashboardUrl, retryCommand) => [
|
|
603
|
+
"R2 is nog niet ingeschakeld in je Cloudflare-account, en je installatie heeft het nodig om bijlagen op te slaan.",
|
|
604
|
+
`Schakel het in via het dashboard, onder R2 \u2192 Overview: ${dashboardUrl}`,
|
|
605
|
+
"Het inbegrepen gebruik is gratis (10 GB opslag per maand), al kan Cloudflare om een betaalmethode vragen.",
|
|
606
|
+
`Voer daarna opnieuw uit: ${retryCommand}`
|
|
607
|
+
].join("\n"),
|
|
608
|
+
signInPrompt: "Log in bij Cloudflare in de browser die zo meteen opent\u2026\n",
|
|
609
|
+
signInFailed: "Het inloggen bij Cloudflare is niet afgerond.",
|
|
610
|
+
noAccessToAccount: (account, accounts) => `Deze sessie heeft geen toegang tot het account \u2018${account}\u2019. Beschikbare accounts:
|
|
611
|
+
${accounts}`,
|
|
612
|
+
noAccounts: "Er is geen account beschikbaar in je Cloudflare-sessie.",
|
|
613
|
+
chooseAccountWithFlag: (accounts) => `Je hebt meerdere Cloudflare-accounts. Kies er een met --account <id>:
|
|
614
|
+
${accounts}`,
|
|
615
|
+
severalAccounts: (accounts) => `Je hebt meerdere Cloudflare-accounts:
|
|
616
|
+
${accounts}`,
|
|
617
|
+
whichAccount: (count) => `Welke wil je gebruiken? (1-${count}): `,
|
|
618
|
+
deployFailed: "\nHet uitrollen is mislukt. Bekijk de melding van Wrangler hierboven; je kunt de opdracht opnieuw uitvoeren zonder iets te verliezen.",
|
|
619
|
+
workerAddress: (name) => `het adres van je Worker \u2018${name}\u2019 (Cloudflare-dashboard \u2192 Workers & Pages)`,
|
|
620
|
+
updated: (version, address) => `
|
|
621
|
+
Je installatie is bijgewerkt naar Orqevio ${version}: ${address}`,
|
|
622
|
+
installed: ({ address, setupCode, updateCommand, recoverCommand }) => [
|
|
623
|
+
"",
|
|
624
|
+
"Je installatie van Orqevio draait.",
|
|
625
|
+
"",
|
|
626
|
+
` Adres ${address}`,
|
|
627
|
+
` Installatiecode ${setupCode}`,
|
|
628
|
+
"",
|
|
629
|
+
"Open het adres en voer de code en je naam in. Orqevio geeft je dan je toegangssleutel:",
|
|
630
|
+
"bewaar die in je wachtwoordmanager, want meer heb je niet nodig om in te loggen.",
|
|
631
|
+
"De code werkt niet meer zodra je de installatie hebt ingesteld.",
|
|
632
|
+
"",
|
|
633
|
+
"Voor later:",
|
|
634
|
+
` ${updateCommand} werkt je installatie bij (je gegevens blijven behouden)`,
|
|
635
|
+
` ${recoverCommand} geeft je een nieuwe code als je de sleutel kwijt bent`
|
|
636
|
+
].join("\n"),
|
|
637
|
+
cannotReadRepoConfig: (detail) => `Kan wrangler.jsonc in deze map niet lezen: ${detail}`,
|
|
638
|
+
badRepoName: (name) => `De naam van de Worker in wrangler.jsonc (\u2018${name}\u2019) kan niet worden gebruikt.`,
|
|
639
|
+
setupCodeFailed: "\nDe code kon niet worden gewijzigd. Bekijk de melding van Wrangler hierboven.",
|
|
640
|
+
recovered: (setupCode) => [
|
|
641
|
+
"",
|
|
642
|
+
`Nieuwe installatiecode: ${setupCode}`,
|
|
643
|
+
"",
|
|
644
|
+
"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
|
+
].join("\n")
|
|
647
|
+
};
|
|
648
|
+
|
|
649
|
+
// src/messages/pt.ts
|
|
650
|
+
var pt = {
|
|
651
|
+
help: (defaultName) => `Instala sua pr\xF3pria c\xF3pia do Orqevio na sua conta da Cloudflare.
|
|
652
|
+
|
|
653
|
+
Uso:
|
|
654
|
+
npx create-orqevio Instala uma nova c\xF3pia
|
|
655
|
+
npx create-orqevio@latest update Atualiza sua c\xF3pia para a vers\xE3o mais recente (seus dados s\xE3o mantidos)
|
|
656
|
+
npx create-orqevio@latest recover Gera um novo c\xF3digo para recuperar seu acesso
|
|
657
|
+
|
|
658
|
+
Op\xE7\xF5es:
|
|
659
|
+
--name <nome> Nome da c\xF3pia (${defaultName} por padr\xE3o). Ele passa a fazer parte do endere\xE7o.
|
|
660
|
+
--account <id> Conta da Cloudflare a usar, se voc\xEA tiver v\xE1rias (ou CLOUDFLARE_ACCOUNT_ID)
|
|
661
|
+
--lang <c\xF3digo> Idioma destas mensagens: en, es, fr, pt, it, de, nl ou ja
|
|
662
|
+
-h, --help Mostra esta ajuda
|
|
663
|
+
-v, --version Mostra a vers\xE3o do Orqevio que ser\xE1 instalada
|
|
664
|
+
|
|
665
|
+
Voc\xEA precisa de uma conta da Cloudflare (o plano gratuito basta). Na primeira vez, o
|
|
666
|
+
navegador abre para voc\xEA fazer login.`,
|
|
667
|
+
no: /^n/i,
|
|
668
|
+
yesNo: "[S/n]",
|
|
669
|
+
extraArgument: (arg) => `Argumento inesperado: \u201C${arg}\u201D.`,
|
|
670
|
+
unknownOption: (option) => `Op\xE7\xE3o desconhecida: \u201C${option}\u201D.`,
|
|
671
|
+
missingValue: (option) => `A op\xE7\xE3o \u201C${option}\u201D precisa de um valor.`,
|
|
672
|
+
unknownCommand: (command) => `O comando \u201C${command}\u201D n\xE3o existe.`,
|
|
673
|
+
dryRunOnlyForDeployRepo: "--dry-run s\xF3 funciona com deploy-repo.",
|
|
674
|
+
unknownLanguage: (language, available) => `O idioma \u201C${language}\u201D n\xE3o est\xE1 dispon\xEDvel. Use um destes: ${available}.`,
|
|
675
|
+
needsNode: (minimum, current) => `Voc\xEA precisa do Node ${minimum} ou mais recente (voc\xEA tem o ${current}). Baixe em https://nodejs.org.`,
|
|
676
|
+
askName: (defaultName) => `Nome da c\xF3pia (${defaultName}): `,
|
|
677
|
+
badName: (name) => `\u201C${name}\u201D n\xE3o pode ser usado como nome.`,
|
|
678
|
+
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`,
|
|
680
|
+
accountUnreachable: "N\xE3o foi poss\xEDvel verificar sua conta da Cloudflare. Tente de novo em alguns minutos.",
|
|
681
|
+
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
|
+
nothingChanged: "Nada foi alterado. Para outra c\xF3pia, use outro nome: npx create-orqevio --name <nome>",
|
|
683
|
+
copyNotFound: (name, installCommand) => `N\xE3o h\xE1 nenhuma c\xF3pia chamada \u201C${name}\u201D nesta conta. Para instal\xE1-la: ${installCommand}`,
|
|
684
|
+
r2Disabled: (dashboardUrl, retryCommand) => [
|
|
685
|
+
"Sua conta da Cloudflare ainda n\xE3o tem o R2 ativado, e sua c\xF3pia precisa dele para guardar os anexos.",
|
|
686
|
+
`Ative-o no painel, em R2 \u2192 Overview: ${dashboardUrl}`,
|
|
687
|
+
"O uso inclu\xEDdo \xE9 gratuito (10 GB de armazenamento por m\xEAs), embora a Cloudflare possa pedir uma forma de pagamento.",
|
|
688
|
+
`Depois, execute de novo: ${retryCommand}`
|
|
689
|
+
].join("\n"),
|
|
690
|
+
signInPrompt: "Fa\xE7a login na Cloudflare no navegador que vai se abrir\u2026\n",
|
|
691
|
+
signInFailed: "O login na Cloudflare n\xE3o foi conclu\xEDdo.",
|
|
692
|
+
noAccessToAccount: (account, accounts) => `Esta sess\xE3o n\xE3o tem acesso \xE0 conta \u201C${account}\u201D. Contas dispon\xEDveis:
|
|
693
|
+
${accounts}`,
|
|
694
|
+
noAccounts: "Sua sess\xE3o da Cloudflare n\xE3o tem nenhuma conta dispon\xEDvel.",
|
|
695
|
+
chooseAccountWithFlag: (accounts) => `Voc\xEA tem v\xE1rias contas da Cloudflare. Escolha uma com --account <id>:
|
|
696
|
+
${accounts}`,
|
|
697
|
+
severalAccounts: (accounts) => `Voc\xEA tem v\xE1rias contas da Cloudflare:
|
|
698
|
+
${accounts}`,
|
|
699
|
+
whichAccount: (count) => `Qual delas devo usar? (1-${count}): `,
|
|
700
|
+
deployFailed: "\nO deploy falhou. Confira a mensagem do Wrangler acima; voc\xEA pode executar o comando de novo sem perder nada.",
|
|
701
|
+
workerAddress: (name) => `o endere\xE7o do seu Worker \u201C${name}\u201D (painel da Cloudflare \u2192 Workers & Pages)`,
|
|
702
|
+
updated: (version, address) => `
|
|
703
|
+
Sua c\xF3pia foi atualizada para o Orqevio ${version}: ${address}`,
|
|
704
|
+
installed: ({ address, setupCode, updateCommand, recoverCommand }) => [
|
|
705
|
+
"",
|
|
706
|
+
"Sua c\xF3pia do Orqevio j\xE1 est\xE1 no ar.",
|
|
707
|
+
"",
|
|
708
|
+
` Endere\xE7o ${address}`,
|
|
709
|
+
` C\xF3digo de configura\xE7\xE3o ${setupCode}`,
|
|
710
|
+
"",
|
|
711
|
+
"Abra-a e digite o c\xF3digo e seu nome. Em seguida, o Orqevio gera sua chave de acesso:",
|
|
712
|
+
"guarde-a no seu gerenciador de senhas, porque ela \xE9 tudo de que voc\xEA precisa para entrar.",
|
|
713
|
+
"O c\xF3digo deixa de funcionar assim que voc\xEA configurar a c\xF3pia.",
|
|
714
|
+
"",
|
|
715
|
+
"Mais tarde:",
|
|
716
|
+
` ${updateCommand} atualiza sua c\xF3pia (seus dados s\xE3o mantidos)`,
|
|
717
|
+
` ${recoverCommand} gera um novo c\xF3digo se voc\xEA perder a chave`
|
|
718
|
+
].join("\n"),
|
|
719
|
+
cannotReadRepoConfig: (detail) => `N\xE3o foi poss\xEDvel ler o wrangler.jsonc nesta pasta: ${detail}`,
|
|
720
|
+
badRepoName: (name) => `O nome do Worker no wrangler.jsonc (\u201C${name}\u201D) n\xE3o pode ser usado.`,
|
|
721
|
+
setupCodeFailed: "\nN\xE3o foi poss\xEDvel alterar o c\xF3digo. Confira a mensagem do Wrangler acima.",
|
|
722
|
+
recovered: (setupCode) => [
|
|
723
|
+
"",
|
|
724
|
+
`Novo c\xF3digo de configura\xE7\xE3o: ${setupCode}`,
|
|
725
|
+
"",
|
|
726
|
+
"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
|
+
].join("\n")
|
|
729
|
+
};
|
|
730
|
+
|
|
731
|
+
// src/messages/index.ts
|
|
732
|
+
var LANGUAGES = ["en", "es", "fr", "pt", "it", "de", "nl", "ja"];
|
|
733
|
+
var CATALOGS = { en, es, fr, pt, it, de, nl, ja };
|
|
734
|
+
var isLanguage = (value) => LANGUAGES.includes(value);
|
|
735
|
+
function detectLanguage(env = process.env, systemLocale = Intl.DateTimeFormat().resolvedOptions().locale) {
|
|
736
|
+
const candidates = [...(env.LANGUAGE ?? "").split(":"), env.LC_ALL, env.LC_MESSAGES, env.LANG, systemLocale];
|
|
737
|
+
for (const candidate of candidates) {
|
|
738
|
+
const base = candidate?.trim().toLowerCase().split(/[-_.@]/)[0];
|
|
739
|
+
if (base && isLanguage(base)) return base;
|
|
740
|
+
}
|
|
741
|
+
return "en";
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
// src/setup-code.ts
|
|
745
|
+
import { randomBytes } from "node:crypto";
|
|
746
|
+
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
747
|
+
function generateSetupCode(bytes = randomBytes(10)) {
|
|
748
|
+
let bits = 0;
|
|
749
|
+
let value = 0;
|
|
750
|
+
let out = "";
|
|
751
|
+
for (const byte of bytes) {
|
|
752
|
+
value = (value << 8 | byte) & 65535;
|
|
753
|
+
bits += 8;
|
|
754
|
+
while (bits >= 5) {
|
|
755
|
+
out += CROCKFORD[value >>> bits - 5 & 31];
|
|
756
|
+
bits -= 5;
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
if (bits > 0) out += CROCKFORD[value << 5 - bits & 31];
|
|
760
|
+
return out.match(/.{1,4}/g).join("-");
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
// src/wrangler.ts
|
|
764
|
+
import { spawn } from "node:child_process";
|
|
765
|
+
import { readFileSync as readFileSync2 } from "node:fs";
|
|
766
|
+
import { createRequire as createRequire2 } from "node:module";
|
|
767
|
+
import { tmpdir } from "node:os";
|
|
768
|
+
import path2 from "node:path";
|
|
769
|
+
function wranglerScript() {
|
|
770
|
+
const override = process.env.CREATE_ORQEVIO_WRANGLER;
|
|
771
|
+
if (override) return override;
|
|
772
|
+
const require2 = createRequire2(import.meta.url);
|
|
773
|
+
const manifest = require2.resolve("wrangler/package.json");
|
|
774
|
+
const { bin } = JSON.parse(readFileSync2(manifest, "utf8"));
|
|
775
|
+
return path2.join(path2.dirname(manifest), bin.wrangler);
|
|
776
|
+
}
|
|
777
|
+
function runWrangler(args, options = {}) {
|
|
778
|
+
return new Promise((resolve, reject) => {
|
|
779
|
+
const child = spawn(process.execPath, [wranglerScript(), ...args], {
|
|
780
|
+
cwd: options.cwd ?? tmpdir(),
|
|
781
|
+
// Wrangler's anonymous telemetry stays off unless the user turned it on themselves.
|
|
782
|
+
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"]
|
|
784
|
+
});
|
|
785
|
+
let stdout = "";
|
|
786
|
+
let stderr = "";
|
|
787
|
+
child.stdout?.on("data", (chunk) => stdout += chunk);
|
|
788
|
+
child.stderr?.on("data", (chunk) => stderr += chunk);
|
|
789
|
+
if (options.input !== void 0) child.stdin.end(options.input);
|
|
790
|
+
child.on("error", reject);
|
|
791
|
+
child.on("close", (code) => resolve({ code: code ?? 1, stdout, stderr }));
|
|
792
|
+
});
|
|
793
|
+
}
|
|
794
|
+
function deployedUrls(outputFile) {
|
|
795
|
+
let text = "";
|
|
796
|
+
try {
|
|
797
|
+
text = readFileSync2(outputFile, "utf8");
|
|
798
|
+
} catch {
|
|
799
|
+
return [];
|
|
800
|
+
}
|
|
801
|
+
const urls = [];
|
|
802
|
+
for (const line of text.split("\n")) {
|
|
803
|
+
if (!line.trim()) continue;
|
|
804
|
+
try {
|
|
805
|
+
const entry = JSON.parse(line);
|
|
806
|
+
if (entry.type === "deploy" && Array.isArray(entry.targets)) urls.push(...entry.targets.filter((t) => typeof t === "string"));
|
|
807
|
+
} catch {
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
return urls;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
// src/main.ts
|
|
814
|
+
var MIN_NODE = [22, 12];
|
|
815
|
+
var R2_DASHBOARD = "https://dash.cloudflare.com/?to=/:account/r2/overview";
|
|
816
|
+
async function main(argv, io = terminalIo(), deps = {}) {
|
|
817
|
+
const asked = requestedLanguage(argv);
|
|
818
|
+
let m = CATALOGS[asked && isLanguage(asked) ? asked : deps.language ?? detectLanguage()];
|
|
819
|
+
let parsed;
|
|
820
|
+
try {
|
|
821
|
+
parsed = parse(argv, m);
|
|
822
|
+
} catch (error) {
|
|
823
|
+
io.err(`${error.message}
|
|
824
|
+
|
|
825
|
+
${m.help(DEFAULT_NAME)}`);
|
|
826
|
+
return 2;
|
|
827
|
+
}
|
|
828
|
+
const { command, name: givenName, account: givenAccount, help, version, dryRun, lang } = parsed;
|
|
829
|
+
if (lang !== void 0) {
|
|
830
|
+
if (!isLanguage(lang)) {
|
|
831
|
+
io.err(m.unknownLanguage(lang, LANGUAGES.join(", ")));
|
|
832
|
+
return 2;
|
|
833
|
+
}
|
|
834
|
+
m = CATALOGS[lang];
|
|
835
|
+
}
|
|
836
|
+
if (help) {
|
|
837
|
+
io.out(m.help(DEFAULT_NAME));
|
|
838
|
+
return 0;
|
|
839
|
+
}
|
|
840
|
+
const orqevio = deps.orqevio ?? loadOrqevio();
|
|
841
|
+
if (version) {
|
|
842
|
+
io.out(orqevio.version);
|
|
843
|
+
return 0;
|
|
844
|
+
}
|
|
845
|
+
const [major = 0, minor = 0] = process.versions.node.split(".").map(Number);
|
|
846
|
+
if (major < MIN_NODE[0] || major === MIN_NODE[0] && minor < MIN_NODE[1]) {
|
|
847
|
+
io.err(m.needsNode(MIN_NODE.join("."), process.versions.node));
|
|
848
|
+
return 1;
|
|
849
|
+
}
|
|
850
|
+
if (command === "deploy-repo") return deployRepo(orqevio, dryRun, io, m);
|
|
851
|
+
let name = givenName ?? DEFAULT_NAME;
|
|
852
|
+
if (givenName === void 0 && io.ask && command !== "config") {
|
|
853
|
+
name = (await io.ask(m.askName(DEFAULT_NAME))).trim() || DEFAULT_NAME;
|
|
854
|
+
}
|
|
855
|
+
if (!isValidName(name)) {
|
|
856
|
+
io.err(`${m.badName(name)} ${m.nameRule}`);
|
|
857
|
+
return 2;
|
|
858
|
+
}
|
|
859
|
+
if (command === "config") {
|
|
860
|
+
io.out(JSON.stringify(copyConfig(orqevio.base, orqevio.dir, name), null, 2));
|
|
861
|
+
return 0;
|
|
862
|
+
}
|
|
863
|
+
io.out(`
|
|
864
|
+
${m.heading(command, orqevio.version, name)}
|
|
865
|
+
`);
|
|
866
|
+
const accounts = await signIn(io, m);
|
|
867
|
+
if (!accounts) return 1;
|
|
868
|
+
const account = await chooseAccount(accounts, givenAccount ?? process.env.CLOUDFLARE_ACCOUNT_ID, io, m);
|
|
869
|
+
if (!account) return 1;
|
|
870
|
+
const env = { CLOUDFLARE_ACCOUNT_ID: account };
|
|
871
|
+
const exists = await workerExists(name, env, io);
|
|
872
|
+
if (exists === null) {
|
|
873
|
+
io.err(m.accountUnreachable);
|
|
874
|
+
return 1;
|
|
875
|
+
}
|
|
876
|
+
let mode = command;
|
|
877
|
+
if (command === "install" && exists) {
|
|
878
|
+
const answer = io.ask ? (await io.ask(`${m.askUpdate(name)} ${m.yesNo} `)).trim() : "n";
|
|
879
|
+
if (m.no.test(answer)) {
|
|
880
|
+
io.err(m.nothingChanged);
|
|
881
|
+
return 1;
|
|
882
|
+
}
|
|
883
|
+
mode = "update";
|
|
884
|
+
}
|
|
885
|
+
if ((mode === "update" || mode === "recover") && !exists) {
|
|
886
|
+
io.err(m.copyNotFound(name, `npx create-orqevio${nameFlag(name)}`));
|
|
887
|
+
return 1;
|
|
888
|
+
}
|
|
889
|
+
if (mode === "install" && !await r2Enabled(env)) {
|
|
890
|
+
io.err(m.r2Disabled(R2_DASHBOARD, `npx create-orqevio${nameFlag(name)}`));
|
|
891
|
+
return 1;
|
|
892
|
+
}
|
|
893
|
+
return mode === "recover" ? recover(name, env, io, m) : deploy(mode === "update" ? "update" : "install", name, orqevio, env, io, m);
|
|
894
|
+
}
|
|
895
|
+
function requestedLanguage(argv) {
|
|
896
|
+
for (const [i, arg] of argv.entries()) {
|
|
897
|
+
if (arg === "--") break;
|
|
898
|
+
if (arg === "--lang") return argv[i + 1]?.trim().toLowerCase();
|
|
899
|
+
if (arg.startsWith("--lang=")) return arg.slice("--lang=".length).trim().toLowerCase();
|
|
900
|
+
}
|
|
901
|
+
return void 0;
|
|
902
|
+
}
|
|
903
|
+
var parseOptions = (argv) => parseArgs({
|
|
904
|
+
args: argv,
|
|
905
|
+
allowPositionals: true,
|
|
906
|
+
options: {
|
|
907
|
+
name: { type: "string" },
|
|
908
|
+
account: { type: "string" },
|
|
909
|
+
lang: { type: "string" },
|
|
910
|
+
"dry-run": { type: "boolean" },
|
|
911
|
+
help: { type: "boolean", short: "h" },
|
|
912
|
+
version: { type: "boolean", short: "v" }
|
|
913
|
+
}
|
|
914
|
+
});
|
|
915
|
+
function parseError(error, m) {
|
|
916
|
+
const code = error.code;
|
|
917
|
+
const option = /'(--?[\w-]+)/.exec(error.message)?.[1] ?? "";
|
|
918
|
+
if (code === "ERR_PARSE_ARGS_UNKNOWN_OPTION") return new Error(m.unknownOption(option));
|
|
919
|
+
if (code === "ERR_PARSE_ARGS_INVALID_OPTION_VALUE") return new Error(m.missingValue(option));
|
|
920
|
+
return error;
|
|
921
|
+
}
|
|
922
|
+
function parse(argv, m) {
|
|
923
|
+
let args;
|
|
924
|
+
try {
|
|
925
|
+
args = parseOptions(argv);
|
|
926
|
+
} catch (error) {
|
|
927
|
+
throw parseError(error, m);
|
|
928
|
+
}
|
|
929
|
+
const { values, positionals } = args;
|
|
930
|
+
if (positionals.length > 1) throw new Error(m.extraArgument(positionals[1]));
|
|
931
|
+
const command = positionals[0] ?? "install";
|
|
932
|
+
if (!["install", "update", "recover", "config", "deploy-repo"].includes(command)) throw new Error(m.unknownCommand(command));
|
|
933
|
+
if (values["dry-run"] && command !== "deploy-repo") throw new Error(m.dryRunOnlyForDeployRepo);
|
|
934
|
+
return {
|
|
935
|
+
command,
|
|
936
|
+
name: values.name,
|
|
937
|
+
account: values.account,
|
|
938
|
+
lang: values.lang?.trim().toLowerCase(),
|
|
939
|
+
help: values.help ?? false,
|
|
940
|
+
version: values.version ?? false,
|
|
941
|
+
dryRun: values["dry-run"] ?? false
|
|
942
|
+
};
|
|
943
|
+
}
|
|
944
|
+
var nameFlag = (name) => name === DEFAULT_NAME ? "" : ` --name ${name}`;
|
|
945
|
+
async function signIn(io, m) {
|
|
946
|
+
let accounts = await whoami();
|
|
947
|
+
if (!accounts) {
|
|
948
|
+
io.out(m.signInPrompt);
|
|
949
|
+
if ((await runWrangler(["login"])).code === 0) accounts = await whoami();
|
|
950
|
+
}
|
|
951
|
+
if (!accounts) io.err(m.signInFailed);
|
|
952
|
+
return accounts;
|
|
953
|
+
}
|
|
954
|
+
async function whoami() {
|
|
955
|
+
const { stdout } = await runWrangler(["whoami", "--json"], { capture: true });
|
|
956
|
+
try {
|
|
957
|
+
const info = JSON.parse(stdout.slice(stdout.indexOf("{"), stdout.lastIndexOf("}") + 1));
|
|
958
|
+
return info.loggedIn === true ? info.accounts ?? [] : null;
|
|
959
|
+
} catch {
|
|
960
|
+
return null;
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
async function chooseAccount(accounts, wanted, io, m) {
|
|
964
|
+
if (wanted) {
|
|
965
|
+
const match = accounts.find((a) => a.id === wanted || a.name === wanted);
|
|
966
|
+
if (match || !accounts.length) return match?.id ?? wanted;
|
|
967
|
+
io.err(m.noAccessToAccount(wanted, accountList(accounts)));
|
|
968
|
+
return null;
|
|
969
|
+
}
|
|
970
|
+
if (accounts.length === 1) return accounts[0].id;
|
|
971
|
+
if (!accounts.length) {
|
|
972
|
+
io.err(m.noAccounts);
|
|
973
|
+
return null;
|
|
974
|
+
}
|
|
975
|
+
if (!io.ask) {
|
|
976
|
+
io.err(m.chooseAccountWithFlag(accountList(accounts)));
|
|
977
|
+
return null;
|
|
978
|
+
}
|
|
979
|
+
io.out(m.severalAccounts(accounts.map((a, i) => ` ${i + 1}. ${a.name}`).join("\n")));
|
|
980
|
+
for (; ; ) {
|
|
981
|
+
const answer = (await io.ask(m.whichAccount(accounts.length))).trim();
|
|
982
|
+
const index = Number(answer) - 1;
|
|
983
|
+
if (Number.isInteger(index) && accounts[index]) return accounts[index].id;
|
|
984
|
+
if (!answer) return null;
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
var accountList = (accounts) => accounts.map((a) => ` ${a.name}: ${a.id}`).join("\n");
|
|
988
|
+
async function workerExists(name, env, io) {
|
|
989
|
+
const run = await runWrangler(["deployments", "list", "--name", name, "--json"], { capture: true, env });
|
|
990
|
+
if (run.code === 0) return true;
|
|
991
|
+
if (/\b10007\b/.test(run.stdout + run.stderr)) return false;
|
|
992
|
+
io?.err((run.stderr || run.stdout).trim());
|
|
993
|
+
return null;
|
|
994
|
+
}
|
|
995
|
+
async function r2Enabled(env) {
|
|
996
|
+
const run = await runWrangler(["r2", "bucket", "list"], { capture: true, env });
|
|
997
|
+
return !(run.code !== 0 && /\b10042\b/.test(run.stdout + run.stderr));
|
|
998
|
+
}
|
|
999
|
+
async function withWorkspace(work) {
|
|
1000
|
+
const dir = await mkdtemp(path3.join(tmpdir2(), "create-orqevio-"));
|
|
1001
|
+
const cleanup = () => rmSync(dir, { recursive: true, force: true });
|
|
1002
|
+
const interrupted = () => {
|
|
1003
|
+
cleanup();
|
|
1004
|
+
process.exit(130);
|
|
1005
|
+
};
|
|
1006
|
+
process.once("SIGINT", interrupted);
|
|
1007
|
+
try {
|
|
1008
|
+
return await work(dir);
|
|
1009
|
+
} finally {
|
|
1010
|
+
process.off("SIGINT", interrupted);
|
|
1011
|
+
cleanup();
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
async function deploy(mode, name, orqevio, env, io, m) {
|
|
1015
|
+
return withWorkspace(async (dir) => {
|
|
1016
|
+
const configFile = path3.join(dir, "wrangler.json");
|
|
1017
|
+
await writeFile(configFile, JSON.stringify(copyConfig(orqevio.base, orqevio.dir, name), null, 2));
|
|
1018
|
+
const args = ["deploy", "--config", configFile];
|
|
1019
|
+
let setupCode = null;
|
|
1020
|
+
if (mode === "install") {
|
|
1021
|
+
setupCode = generateSetupCode();
|
|
1022
|
+
const secretsFile = path3.join(dir, "secrets.env");
|
|
1023
|
+
await writeFile(secretsFile, `SETUP_CODE=${setupCode}
|
|
1024
|
+
`, { mode: 384 });
|
|
1025
|
+
args.push("--secrets-file", secretsFile);
|
|
1026
|
+
}
|
|
1027
|
+
const outputFile = path3.join(dir, "output.ndjson");
|
|
1028
|
+
const run = await runWrangler(args, { cwd: dir, env: { ...env, WRANGLER_OUTPUT_FILE_PATH: outputFile } });
|
|
1029
|
+
if (run.code !== 0) {
|
|
1030
|
+
io.err(m.deployFailed);
|
|
1031
|
+
return 1;
|
|
1032
|
+
}
|
|
1033
|
+
const url = deployedUrls(outputFile).find((target) => target.startsWith("https://"));
|
|
1034
|
+
const where = url ?? m.workerAddress(name);
|
|
1035
|
+
if (mode === "update") {
|
|
1036
|
+
io.out(m.updated(orqevio.version, where));
|
|
1037
|
+
return 0;
|
|
1038
|
+
}
|
|
1039
|
+
io.out(
|
|
1040
|
+
m.installed({
|
|
1041
|
+
address: where,
|
|
1042
|
+
setupCode,
|
|
1043
|
+
updateCommand: `npx create-orqevio@latest update${nameFlag(name)}`,
|
|
1044
|
+
recoverCommand: `npx create-orqevio@latest recover${nameFlag(name)}`
|
|
1045
|
+
})
|
|
1046
|
+
);
|
|
1047
|
+
return 0;
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
async function deployRepo(orqevio, dryRun, io, m) {
|
|
1051
|
+
let repo;
|
|
1052
|
+
try {
|
|
1053
|
+
repo = parseJsonc(readFileSync3("wrangler.jsonc", "utf8"));
|
|
1054
|
+
} catch (error) {
|
|
1055
|
+
io.err(m.cannotReadRepoConfig(error.message));
|
|
1056
|
+
return 1;
|
|
1057
|
+
}
|
|
1058
|
+
const name = typeof repo.name === "string" ? repo.name : "";
|
|
1059
|
+
if (!isValidName(name)) {
|
|
1060
|
+
io.err(`${m.badRepoName(name)} ${m.nameRule}`);
|
|
1061
|
+
return 1;
|
|
1062
|
+
}
|
|
1063
|
+
const config = copyConfig(orqevio.base, orqevio.dir, name, "button");
|
|
1064
|
+
const bucket = repo.r2_buckets?.find((b) => b.binding === "UPLOADS")?.bucket_name;
|
|
1065
|
+
if (bucket) config.r2_buckets = config.r2_buckets.map((b) => b.binding === "UPLOADS" ? { ...b, bucket_name: bucket } : b);
|
|
1066
|
+
return withWorkspace(async (dir) => {
|
|
1067
|
+
const configFile = path3.join(dir, "wrangler.json");
|
|
1068
|
+
await writeFile(configFile, JSON.stringify(config, null, 2));
|
|
1069
|
+
const args = ["deploy", "--config", configFile, ...dryRun ? ["--dry-run", "--outdir", path3.join(dir, "out")] : []];
|
|
1070
|
+
io.out(`Orqevio ${orqevio.version} \u2192 Worker ${name}`);
|
|
1071
|
+
const run = await runWrangler(args, { cwd: dir });
|
|
1072
|
+
return run.code === 0 ? 0 : 1;
|
|
1073
|
+
});
|
|
1074
|
+
}
|
|
1075
|
+
async function recover(name, env, io, m) {
|
|
1076
|
+
const setupCode = generateSetupCode();
|
|
1077
|
+
const run = await runWrangler(["secret", "put", "SETUP_CODE", "--name", name], { input: setupCode, env });
|
|
1078
|
+
if (run.code !== 0) {
|
|
1079
|
+
io.err(m.setupCodeFailed);
|
|
1080
|
+
return 1;
|
|
1081
|
+
}
|
|
1082
|
+
io.out(m.recovered(setupCode));
|
|
1083
|
+
return 0;
|
|
1084
|
+
}
|
|
1085
|
+
function terminalIo() {
|
|
1086
|
+
return {
|
|
1087
|
+
out: (text) => process.stdout.write(`${text}
|
|
1088
|
+
`),
|
|
1089
|
+
err: (text) => process.stderr.write(`${text}
|
|
1090
|
+
`),
|
|
1091
|
+
ask: process.stdin.isTTY ? async (question) => {
|
|
1092
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
1093
|
+
try {
|
|
1094
|
+
return await rl.question(question);
|
|
1095
|
+
} finally {
|
|
1096
|
+
rl.close();
|
|
1097
|
+
}
|
|
1098
|
+
} : void 0
|
|
1099
|
+
};
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
// src/cli.ts
|
|
1103
|
+
main(process.argv.slice(2)).then(
|
|
1104
|
+
(code) => process.exit(code),
|
|
1105
|
+
(error) => {
|
|
1106
|
+
console.error(error instanceof Error ? error.message : error);
|
|
1107
|
+
process.exit(1);
|
|
1108
|
+
}
|
|
1109
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-orqevio",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.0-rc.2",
|
|
4
|
+
"description": "Install your own copy of Orqevio on your Cloudflare account with one command.",
|
|
5
|
+
"license": "FSL-1.1-ALv2",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/hsylabs/orqevio.git",
|
|
9
|
+
"directory": "packages/create-orqevio"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/hsylabs/orqevio#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/hsylabs/orqevio/issues"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"bin": {
|
|
17
|
+
"create-orqevio": "dist/cli.js"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"wrangler": "4.161.0",
|
|
24
|
+
"orqevio": "1.0.0-rc.2"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/node": "^22.20.5",
|
|
28
|
+
"esbuild": "0.28.2"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=22.12"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "node build.mjs",
|
|
35
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
36
|
+
"test": "vitest run"
|
|
37
|
+
}
|
|
6
38
|
}
|
package/README.md
DELETED