levix-bot 4.9.2 → 5.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.
Files changed (242) hide show
  1. package/README.md +57 -3
  2. package/SETUP.md +63 -7
  3. package/app.cjs +159 -46
  4. package/deploy/install.sh +10 -5
  5. package/package.json +9 -6
  6. package/public/dashboard/assets/40af6d88b63079a0-BZ8ojJNu.woff2 +0 -0
  7. package/public/dashboard/assets/481acf6760031cee-BypgxfGb.woff2 +0 -0
  8. package/public/dashboard/assets/6d3351fc535f8ef3-D2-eand5.woff2 +0 -0
  9. package/public/dashboard/assets/8ab0af53a3bda9d3-CyCXRvzh.woff2 +0 -0
  10. package/public/dashboard/assets/8f262393e9249e61-TQp-UTiE.woff2 +0 -0
  11. package/public/dashboard/assets/94d65887a83f1282-DmpS2jIq.woff2 +0 -0
  12. package/public/dashboard/assets/99e400330f36ae77-D3oMJlXt.woff2 +0 -0
  13. package/public/dashboard/assets/9d1f41b13e519d90-BVNSOH3d.woff2 +0 -0
  14. package/public/dashboard/assets/a005256cb957ecc7-CoYeBiSI.woff2 +0 -0
  15. package/public/dashboard/assets/b19c2080652a3c2b-DIC32ArD.woff2 +0 -0
  16. package/public/dashboard/assets/c4064400db3750ce-BehTv68k.woff2 +0 -0
  17. package/public/dashboard/assets/c69d345fa1068c2d-CmI34b-g.woff2 +0 -0
  18. package/public/dashboard/assets/cc27b30471250057-6fWv1k7M.woff2 +0 -0
  19. package/public/dashboard/assets/d8c30647abfeffe6-eXO_dkmS.woff2 +0 -0
  20. package/public/dashboard/assets/eb83d8d40af4411f-Buze_B52.woff2 +0 -0
  21. package/public/dashboard/assets/effc6711249e7349-qRpaaN48.woff2 +0 -0
  22. package/public/dashboard/assets/gateway-BDYet0pI.css +1 -0
  23. package/public/dashboard/assets/gateway-BYt6-s1O.js +1 -0
  24. package/public/dashboard/assets/index-B9wFpD_z.css +2 -0
  25. package/public/dashboard/assets/index-DWcQmu0_.js +124 -0
  26. package/public/dashboard/assets/index-Da-j89O-.js +458 -0
  27. package/public/dashboard/font-licenses/jetbrainsmono-OFL.txt +93 -0
  28. package/public/dashboard/font-licenses/plusjakartasans-OFL.txt +93 -0
  29. package/public/dashboard/font-licenses/tajawal-OFL.txt +93 -0
  30. package/public/dashboard/gateway.html +17 -0
  31. package/public/dashboard/index.html +3 -5
  32. package/public/ui-boot.js +33 -14
  33. package/scheduler.cjs +76 -23
  34. package/src/auth/auth-storage.cjs +54 -7
  35. package/src/auth/use-database-auth-state.js +70 -39
  36. package/src/automation/engine.js +412 -0
  37. package/src/automation/limits.cjs +6 -0
  38. package/src/automation/manage.js +290 -0
  39. package/src/automation/reactions.js +471 -0
  40. package/src/automation/rules.cjs +114 -0
  41. package/src/automation/status.cjs +76 -0
  42. package/src/backup/account.cjs +29 -0
  43. package/src/backup/activation.cjs +247 -0
  44. package/src/backup/content.cjs +36 -0
  45. package/src/backup/create.cjs +280 -0
  46. package/src/backup/extensions.cjs +101 -0
  47. package/src/backup/format.cjs +565 -0
  48. package/src/backup/jobs.cjs +111 -0
  49. package/src/backup/journal.cjs +41 -0
  50. package/src/backup/plan.cjs +223 -0
  51. package/src/backup/recovery.cjs +110 -0
  52. package/src/backup/restore.cjs +460 -0
  53. package/src/backup/uploads.cjs +146 -0
  54. package/src/bootstrap/core.js +46 -12
  55. package/src/bootstrap/panel.js +53 -2
  56. package/src/bootstrap/session-startup-policy.js +8 -1
  57. package/src/cli.js +163 -22
  58. package/src/commands/autodelete.cjs +41 -57
  59. package/src/commands/autoschedule.cjs +7 -33
  60. package/src/commands/blacklist.cjs +17 -35
  61. package/src/commands/block.cjs +4 -18
  62. package/src/commands/calc.cjs +22 -74
  63. package/src/commands/debt.cjs +28 -59
  64. package/src/commands/deleteschedule.cjs +7 -23
  65. package/src/commands/digit.cjs +5 -39
  66. package/src/commands/gemini.cjs +135 -218
  67. package/src/commands/group/add.cjs +28 -76
  68. package/src/commands/group/all.cjs +4 -15
  69. package/src/commands/group/antilink.cjs +28 -41
  70. package/src/commands/group/antispam.cjs +25 -35
  71. package/src/commands/group/approveall.cjs +7 -21
  72. package/src/commands/group/clearwarns.cjs +4 -18
  73. package/src/commands/group/deletenote.cjs +4 -18
  74. package/src/commands/group/demote.cjs +6 -23
  75. package/src/commands/group/flagged.cjs +10 -19
  76. package/src/commands/group/kick.cjs +26 -36
  77. package/src/commands/group/media.cjs +21 -36
  78. package/src/commands/group/members.cjs +16 -28
  79. package/src/commands/group/note.cjs +3 -14
  80. package/src/commands/group/policy.cjs +16 -37
  81. package/src/commands/group/promote.cjs +5 -22
  82. package/src/commands/group/removeall.cjs +6 -38
  83. package/src/commands/group/rules.cjs +4 -19
  84. package/src/commands/group/save.cjs +4 -18
  85. package/src/commands/group/setname.cjs +5 -19
  86. package/src/commands/group/setpp.cjs +8 -26
  87. package/src/commands/group/setrules.cjs +4 -15
  88. package/src/commands/group/setwarn.cjs +6 -23
  89. package/src/commands/group/tagadmins.cjs +5 -16
  90. package/src/commands/group/warn.cjs +5 -16
  91. package/src/commands/group/warns.cjs +12 -33
  92. package/src/commands/group/welcome.cjs +17 -34
  93. package/src/commands/group.cjs +91 -68
  94. package/src/commands/help.cjs +48 -89
  95. package/src/commands/lang.cjs +38 -97
  96. package/src/commands/listschedules.cjs +19 -30
  97. package/src/commands/loop.cjs +9 -55
  98. package/src/commands/md.cjs +2 -13
  99. package/src/commands/memory.cjs +53 -87
  100. package/src/commands/mod.cjs +40 -79
  101. package/src/commands/notes.cjs +4 -15
  102. package/src/commands/pack.cjs +26 -49
  103. package/src/commands/packs.cjs +8 -18
  104. package/src/commands/perm.cjs +48 -51
  105. package/src/commands/ping.cjs +2 -10
  106. package/src/commands/poll.cjs +5 -38
  107. package/src/commands/prayer.cjs +55 -36
  108. package/src/commands/qr.cjs +4 -18
  109. package/src/commands/rand.cjs +9 -58
  110. package/src/commands/restart.cjs +15 -33
  111. package/src/commands/schedule.cjs +5 -25
  112. package/src/commands/score.cjs +6 -27
  113. package/src/commands/send.cjs +4 -18
  114. package/src/commands/setprefix.cjs +11 -23
  115. package/src/commands/shortlink.cjs +13 -39
  116. package/src/commands/status.cjs +188 -76
  117. package/src/commands/sticker.cjs +5 -16
  118. package/src/commands/stickers.cjs +16 -20
  119. package/src/commands/stopbot.cjs +9 -25
  120. package/src/commands/stt.cjs +75 -107
  121. package/src/commands/todo.cjs +11 -31
  122. package/src/commands/toimage.cjs +11 -27
  123. package/src/commands/translate.cjs +53 -36
  124. package/src/commands/tts.cjs +46 -40
  125. package/src/commands/unblock.cjs +3 -17
  126. package/src/commands/update.cjs +23 -0
  127. package/src/commands/weather.cjs +40 -47
  128. package/src/config/ai-identity.cjs +14 -1
  129. package/src/config/baileys.config.js +1 -1
  130. package/src/config/data-dir.cjs +37 -0
  131. package/src/config/defaults.cjs +1 -0
  132. package/src/config/exit-codes.cjs +11 -0
  133. package/src/config/lock.cjs +55 -81
  134. package/src/config/official-links.cjs +61 -0
  135. package/src/config/paths.cjs +4 -33
  136. package/src/config/release.cjs +87 -0
  137. package/src/config/settings.cjs +182 -10
  138. package/src/core/connection.js +37 -8
  139. package/src/core/events.js +119 -33
  140. package/src/core/session.js +525 -82
  141. package/src/core/socket.js +81 -10
  142. package/src/db/copy.cjs +136 -0
  143. package/src/db/db.cjs +241 -36
  144. package/src/db/startup-guard.js +5 -0
  145. package/src/db/store.cjs +561 -54
  146. package/src/diagnostics/debugLog.cjs +16 -4
  147. package/src/diagnostics/device.cjs +4 -2
  148. package/src/diagnostics/signalSessionInspect.cjs +38 -0
  149. package/src/domain/command.js +24 -22
  150. package/src/extensions/autoReply.cjs +521 -0
  151. package/src/extensions/context.cjs +73 -0
  152. package/src/extensions/contract.cjs +69 -0
  153. package/src/extensions/entitlement/client.cjs +381 -0
  154. package/src/extensions/entitlement/index.cjs +629 -0
  155. package/src/extensions/entitlement/installation.cjs +117 -0
  156. package/src/extensions/entitlement/keys.cjs +72 -0
  157. package/src/extensions/entitlement/state.cjs +201 -0
  158. package/src/extensions/entitlement/target.cjs +7 -0
  159. package/src/extensions/entitlement/token.cjs +225 -0
  160. package/src/extensions/host.cjs +519 -0
  161. package/src/extensions/templateKeys.cjs +81 -0
  162. package/src/handlers/command.handler.js +191 -64
  163. package/src/handlers/group.handler.js +78 -18
  164. package/src/handlers/message.handler.js +56 -25
  165. package/src/i18n/catalog.generated.cjs +3537 -0
  166. package/src/index.js +51 -12
  167. package/src/legal/bundled/ar.json +102 -0
  168. package/src/legal/bundled/en.json +102 -0
  169. package/src/legal/bundled/es-419.json +102 -0
  170. package/src/legal/bundled/pt-BR.json +102 -0
  171. package/src/legal/cli.cjs +200 -0
  172. package/src/legal/consent.cjs +187 -0
  173. package/src/legal/document.cjs +156 -0
  174. package/src/legal/keys.cjs +100 -0
  175. package/src/legal/release.cjs +226 -0
  176. package/src/legal/remote.cjs +419 -0
  177. package/src/legal/terms.cjs +142 -0
  178. package/src/messaging/escape.cjs +31 -0
  179. package/src/messaging/health.cjs +65 -0
  180. package/src/messaging/identity.cjs +42 -0
  181. package/src/messaging/message.cjs +136 -0
  182. package/src/messaging/parser.cjs +88 -0
  183. package/src/messaging/router.cjs +217 -0
  184. package/src/middleware/permissions.middleware.js +34 -2
  185. package/src/panel/account-profile.cjs +489 -0
  186. package/src/panel/fallback-page.cjs +177 -0
  187. package/src/panel/password-reset.cjs +13 -14
  188. package/src/panel/recovery-email.cjs +3 -1
  189. package/src/routes/backup.api.esm.js +175 -0
  190. package/src/routes/dashboard.api.esm.js +183 -7
  191. package/src/routes/plus.api.esm.js +172 -0
  192. package/src/routes/reactions.api.esm.js +60 -0
  193. package/src/services/aiAgent.cjs +56 -43
  194. package/src/services/aiDocs.cjs +187 -0
  195. package/src/services/aiImage.cjs +183 -0
  196. package/src/services/aiMedia.cjs +146 -0
  197. package/src/services/aiProviders.cjs +76 -80
  198. package/src/services/aiRouter.cjs +2 -2
  199. package/src/services/aiToolAuth.cjs +76 -4
  200. package/src/services/aiTools.cjs +431 -105
  201. package/src/services/autoDelete.cjs +9 -1
  202. package/src/services/levix-docs.generated.json +2623 -0
  203. package/src/services/memoryPolicy.cjs +56 -0
  204. package/src/services/updateCheck.cjs +362 -0
  205. package/src/stickers/errors.cjs +53 -97
  206. package/src/stickers/library.cjs +13 -6
  207. package/src/stickers/owner.cjs +1 -1
  208. package/src/utils/commandContext.cjs +13 -0
  209. package/src/utils/commandDocs.cjs +42 -20
  210. package/src/utils/geminiHttpOptions.cjs +56 -0
  211. package/src/utils/geminiMedia.cjs +28 -3
  212. package/src/utils/groupMetadataCache.cjs +386 -21
  213. package/src/utils/httpsFetch.cjs +113 -0
  214. package/src/utils/i18n.cjs +117 -7
  215. package/src/utils/linkPreview.cjs +90 -0
  216. package/src/utils/markdownParser.cjs +3 -3
  217. package/src/utils/memory.cjs +375 -28
  218. package/src/utils/messageContent.cjs +7 -1
  219. package/src/utils/moderationAction.cjs +116 -73
  220. package/src/utils/moderationSummary.cjs +32 -56
  221. package/src/utils/permissionLevel.cjs +7 -28
  222. package/src/utils/permissions.cjs +23 -14
  223. package/src/utils/permissions.esm.js +99 -166
  224. package/src/utils/recentMessageCache.esm.js +241 -37
  225. package/src/utils/recurrence.cjs +78 -66
  226. package/src/utils/sendBotMessage.cjs +14 -29
  227. package/src/utils/sendBotMessage.esm.js +28 -13
  228. package/src/utils/statusMessage.cjs +94 -33
  229. package/src/utils/stickerBot.cjs +18 -16
  230. package/src/utils/storage.cjs +2 -0
  231. package/src/utils/storage.esm.js +2 -0
  232. package/src/utils/thumbnail.cjs +5 -21
  233. package/public/dashboard/assets/index-4xhK_Tpl.js +0 -561
  234. package/public/dashboard/assets/index-CK8osB4o.css +0 -2
  235. package/public/dashboard.css +0 -3127
  236. package/public/dashboard.js +0 -1981
  237. package/public/gateway-i18n.js +0 -321
  238. package/public/gateway.js +0 -70
  239. package/views/dashboard.ejs +0 -775
  240. package/views/login.ejs +0 -408
  241. package/views/qr.ejs +0 -155
  242. package/views/setup.ejs +0 -118
@@ -10,9 +10,10 @@
10
10
  //
11
11
  // * Nothing secret and no message content is ever written. Every record is
12
12
  // rebuilt key by key before it reaches the file: a secret-shaped key name
13
- // becomes "[redacted]" at any depth, a message-content key keeps only its
14
- // length, and every remaining string runs through the one shared sanitizer
15
- // (src/diagnostics/sanitize.cjs) before being capped at 2000 characters.
13
+ // or a personal-name key becomes "[redacted]" at any depth, a
14
+ // message-content key keeps only its length, and every remaining string
15
+ // runs through the one shared sanitizer (src/diagnostics/sanitize.cjs)
16
+ // before being capped at 2000 characters.
16
17
  // * A failure never reaches the caller. A full disk, a permission problem or
17
18
  // a record that cannot be serialized must not break the other log streams
18
19
  // or the code that logged.
@@ -42,7 +43,7 @@ const FILE_PATTERN = /^debug-\d{4}-\d{2}-\d{2}\.log$/;
42
43
  // deliberately absent: `err.code`, `statusCode` and friends are diagnostic
43
44
  // value, not a credential. A bare `code` is handled by the digit rule below.
44
45
  const SECRET_KEY_PATTERN =
45
- /pass(word)?|secret|token|api[_-]?key|authorization|cookie|session|creds?|private|noise|signed|identity/i;
46
+ /pass(word)?|secret|token|api[_-]?key|authorization|cookie|session|creds?|private|noise|signed|identity|entitlement|obfuscated|installation|purchase/i;
46
47
 
47
48
  // Exactly these names are secrets; a substring rule would swallow `otpTimeout`
48
49
  // and the like without cause.
@@ -54,6 +55,13 @@ const EXACT_SECRET_KEYS = new Set([
54
55
  "setupcode",
55
56
  ]);
56
57
 
58
+ // Personal-name keys, at any depth. A substring covers camelCase and
59
+ // snake_case; `notify` is exact so `notified` and `notifyMode` stay.
60
+ const PERSONAL_NAME_KEY_PATTERN =
61
+ /username|user_name|pushname|push_name|verifiedname|verified_name|displayname|display_name/i;
62
+
63
+ const EXACT_PERSONAL_NAME_KEYS = new Set(["notify"]);
64
+
57
65
  // A bare `code` is an OTP when it is a short digit string, and an error/status
58
66
  // code otherwise (`ENOENT`, `ERR_…`, 404).
59
67
  const DIGIT_CODE_PATTERN = /^\d{4,10}$/;
@@ -132,6 +140,10 @@ function sanitizeValue(value, depth, seen) {
132
140
  out[key] = "[redacted]";
133
141
  continue;
134
142
  }
143
+ if (PERSONAL_NAME_KEY_PATTERN.test(key) || EXACT_PERSONAL_NAME_KEYS.has(lower)) {
144
+ out[key] = "[redacted]";
145
+ continue;
146
+ }
135
147
  if (lower === "code" && typeof item === "string" && DIGIT_CODE_PATTERN.test(item)) {
136
148
  out[key] = "[redacted]";
137
149
  continue;
@@ -23,7 +23,7 @@ const STRING_CAPS = Object.freeze({
23
23
 
24
24
  /** Enumerated client fields. Anything outside the list is dropped. */
25
25
  const ENUMS = Object.freeze({
26
- language: ["ar", "en"],
26
+ language: ["ar", "en", "pt-BR", "es-419"],
27
27
  theme: ["light", "dark"],
28
28
  connectivity: ["wifi", "cellular", "ethernet", "vpn", "none", "unknown"],
29
29
  memory: ["ok", "low", "unknown"],
@@ -63,8 +63,10 @@ function sanitizeClientFields(client) {
63
63
  for (const [key, allowed] of Object.entries(ENUMS)) {
64
64
  const raw = client[key];
65
65
  if (typeof raw !== "string") continue;
66
+ // Match without case, keep the canonical spelling (pt-BR, es-419).
66
67
  const value = raw.trim().toLowerCase();
67
- if (allowed.includes(value)) out[key] = value;
68
+ const match = allowed.find((item) => item.toLowerCase() === value);
69
+ if (match) out[key] = match;
68
70
  }
69
71
 
70
72
  return out;
@@ -0,0 +1,38 @@
1
+ // libsignal logs SessionEntry objects. Node ignores the legacy inspect() hook
2
+ // since v11. util.inspect.custom restores a key-free form so private keys never
3
+ // reach stdout, the terminal, journald, docker logs or the Android host log.
4
+ // A static require keeps the executable's bundle on the same libsignal instance
5
+ // that Baileys uses.
6
+
7
+ const util = require("node:util");
8
+
9
+ const SESSION_PLACEHOLDER = "[SessionEntry redacted]";
10
+
11
+ function redactSessionEntry() {
12
+ return SESSION_PLACEHOLDER;
13
+ }
14
+
15
+ function installSignalSessionInspect() {
16
+ try {
17
+ const { SessionRecord } = require("libsignal");
18
+ if (typeof SessionRecord?.createEntry !== "function") return false;
19
+ const prototype = Object.getPrototypeOf(SessionRecord.createEntry());
20
+ if (prototype === null || prototype === undefined) return false;
21
+ const existing = Object.getOwnPropertyDescriptor(prototype, util.inspect.custom);
22
+ if (existing && existing.value === redactSessionEntry) return true;
23
+ Object.defineProperty(prototype, util.inspect.custom, {
24
+ configurable: true,
25
+ enumerable: false,
26
+ writable: false,
27
+ value: redactSessionEntry,
28
+ });
29
+ return true;
30
+ } catch {
31
+ return false;
32
+ }
33
+ }
34
+
35
+ module.exports = {
36
+ installSignalSessionInspect,
37
+ SESSION_PLACEHOLDER,
38
+ };
@@ -82,21 +82,23 @@ async function askDomain({ assumeYes }) {
82
82
  * only a proxy we actually put in front justifies trusting one hop of
83
83
  * forwarded headers, and only then is it safe to stop listening publicly.
84
84
  */
85
- function persist({ domain, proxied }) {
86
- settings.set("public_domain", domain);
87
- if (proxied) {
88
- // Exactly one hop: the proxy on this machine. See src/utils/requestOrigin.cjs
89
- // for why this does not weaken the first-run check.
90
- settings.set("trust_proxy", "1");
91
- // Nobody should be able to reach the panel past the certificate by asking
92
- // for the raw port.
93
- settings.set("bind_address", "127.0.0.1");
94
- }
85
+ async function persist({ domain, proxied }, asDataOwner) {
86
+ await asDataOwner(() => {
87
+ settings.set("public_domain", domain);
88
+ if (proxied) {
89
+ // Exactly one hop: the proxy on this machine. See src/utils/requestOrigin.cjs
90
+ // for why this does not weaken the first-run check.
91
+ settings.set("trust_proxy", "1");
92
+ // Nobody should be able to reach the panel past the certificate by asking
93
+ // for the raw port.
94
+ settings.set("bind_address", "127.0.0.1");
95
+ }
96
+ });
95
97
  }
96
98
 
97
- export async function runDomainCommand({ domain = null, assumeYes = false, system } = {}) {
99
+ export async function runDomainCommand({ domain = null, assumeYes = false, system, asDataOwner = async (fn) => fn() } = {}) {
98
100
  const sys = system || createSystem();
99
- const port = settings.get("port");
101
+ const port = await asDataOwner(() => settings.get("port"));
100
102
 
101
103
  line();
102
104
  line(" Levix — domain setup");
@@ -128,7 +130,7 @@ export async function runDomainCommand({ domain = null, assumeYes = false, syste
128
130
  line(" Levix is running inside a container.");
129
131
  line(" A container cannot — and should not — configure the host's web server.");
130
132
  proxyInstructions(name, port, { https: "the host proxy" });
131
- persist({ domain: name, proxied: false });
133
+ await persist({ domain: name, proxied: false }, asDataOwner);
132
134
  tick(`Saved ${name} as the public address.`);
133
135
  return 0;
134
136
 
@@ -141,7 +143,7 @@ export async function runDomainCommand({ domain = null, assumeYes = false, syste
141
143
  proxyInstructions(name, port, { https: decision.target });
142
144
  const hint = PANEL_HINTS[decision.target];
143
145
  if (hint) line(` In ${decision.target}: ${hint}\n`);
144
- persist({ domain: name, proxied: false });
146
+ await persist({ domain: name, proxied: false }, asDataOwner);
145
147
  tick(`Saved ${name} as the public address.`);
146
148
  return 0;
147
149
  }
@@ -155,7 +157,7 @@ export async function runDomainCommand({ domain = null, assumeYes = false, syste
155
157
  proxyInstructions(name, port, { https: "certbot --apache" });
156
158
  line(" The proxy needs mod_proxy, mod_proxy_http and mod_proxy_wstunnel.");
157
159
  line();
158
- persist({ domain: name, proxied: false });
160
+ await persist({ domain: name, proxied: false }, asDataOwner);
159
161
  return 0;
160
162
 
161
163
  case "blocked":
@@ -167,13 +169,13 @@ export async function runDomainCommand({ domain = null, assumeYes = false, syste
167
169
  return 1;
168
170
 
169
171
  case "nginx":
170
- return configureNginx(sys, { name, port, report, assumeYes });
172
+ return configureNginx(sys, { name, port, report, assumeYes, asDataOwner });
171
173
 
172
174
  case "caddy":
173
- return configureCaddy(sys, { name, port, report, assumeYes, install: false });
175
+ return configureCaddy(sys, { name, port, report, assumeYes, install: false, asDataOwner });
174
176
 
175
177
  case "install-caddy":
176
- return configureCaddy(sys, { name, port, report, assumeYes, install: true });
178
+ return configureCaddy(sys, { name, port, report, assumeYes, install: true, asDataOwner });
177
179
 
178
180
  default:
179
181
  cross(`Nothing to do (${decision.reason}).`);
@@ -249,7 +251,7 @@ async function confirmDns(sys, name, { assumeYes }) {
249
251
  return ask("Continue without HTTPS for now?", { assumeYes });
250
252
  }
251
253
 
252
- async function configureNginx(sys, { name, port, report, assumeYes }) {
254
+ async function configureNginx(sys, { name, port, report, assumeYes, asDataOwner }) {
253
255
  if (!requireRoot(report)) return 1;
254
256
 
255
257
  const dnsOk = await confirmDns(sys, name, { assumeYes });
@@ -313,12 +315,12 @@ async function configureNginx(sys, { name, port, report, assumeYes }) {
313
315
  line();
314
316
  }
315
317
 
316
- persist({ domain: name, proxied: true });
318
+ await persist({ domain: name, proxied: true }, asDataOwner);
317
319
  finalUrl(name, https, { restart: true });
318
320
  return 0;
319
321
  }
320
322
 
321
- async function configureCaddy(sys, { name, port, report, assumeYes, install }) {
323
+ async function configureCaddy(sys, { name, port, report, assumeYes, install, asDataOwner }) {
322
324
  if (!requireRoot(report)) return 1;
323
325
 
324
326
  if (install) {
@@ -379,7 +381,7 @@ async function configureCaddy(sys, { name, port, report, assumeYes, install }) {
379
381
  tick("Caddy reloaded");
380
382
  tick("HTTPS will be issued automatically on the first request");
381
383
 
382
- persist({ domain: name, proxied: true });
384
+ await persist({ domain: name, proxied: true }, asDataOwner);
383
385
  finalUrl(name, true, { restart: true });
384
386
  return 0;
385
387
  }