@liquidmetal-ai/raindrop 0.13.0 → 0.15.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 (250) hide show
  1. package/README.md +327 -89
  2. package/bundle/build-CBEGQPJT.js +62 -0
  3. package/bundle/{chunk-IEF2XC25.js → chunk-2PH3PHH3.js} +5 -3
  4. package/bundle/{chunk-4HZ22KOV.js → chunk-3CMR7ES5.js} +4 -4
  5. package/bundle/{chunk-JSBM2JYW.js → chunk-3EYKCHIK.js} +1 -1
  6. package/bundle/chunk-5XHDP4VK.js +1697 -0
  7. package/bundle/{chunk-TSQK4HH6.js → chunk-674GMSXY.js} +1 -1
  8. package/bundle/{chunk-PS3WZBDF.js → chunk-6L4V66WZ.js} +1105 -2728
  9. package/bundle/{chunk-5245CEUM.js → chunk-AGG7JZVH.js} +2 -2
  10. package/bundle/{chunk-3GFKUF5D.js → chunk-B3IY2XS6.js} +4 -2
  11. package/bundle/{chunk-WIDI65NO.js → chunk-CBAXTRCS.js} +1 -1
  12. package/bundle/{chunk-JLVDTXO2.js → chunk-DPV5HIG7.js} +4 -4
  13. package/bundle/{chunk-36GNZK4A.js → chunk-EVXLXWP7.js} +1 -1
  14. package/bundle/{chunk-4YVU5KEQ.js → chunk-HN3AAKRY.js} +4 -2
  15. package/bundle/{chunk-NVNEQXHN.js → chunk-IGLE4Y3B.js} +7 -5
  16. package/bundle/{chunk-FGSYWVBA.js → chunk-IQ6HFRA6.js} +1 -1
  17. package/bundle/{chunk-O3QZDJ75.js → chunk-JQONDSHY.js} +2 -2
  18. package/bundle/{chunk-W4IPOFZC.js → chunk-KADMFJLN.js} +8 -6
  19. package/bundle/chunk-KG5BLUGU.js +246 -0
  20. package/bundle/{chunk-V5LHJTYS.js → chunk-KLOYSTZY.js} +13 -2
  21. package/bundle/{chunk-ETC5VU7H.js → chunk-KXHVSLAI.js} +1 -1
  22. package/bundle/{chunk-Y4WFGNPM.js → chunk-L6FRQULN.js} +1 -1
  23. package/bundle/{chunk-3QCVYSRU.js → chunk-LT3BFQ4O.js} +1 -1
  24. package/bundle/{chunk-KQZJHBNG.js → chunk-MBLKVNI5.js} +1 -1
  25. package/bundle/{chunk-6AIUQUUM.js → chunk-MFMVJZW6.js} +71 -15
  26. package/bundle/{chunk-25T7MEKO.js → chunk-MJBLNWG3.js} +1 -1
  27. package/bundle/{chunk-MSJ33O5Y.js → chunk-NRCQIE3Z.js} +95 -115
  28. package/bundle/{chunk-XKKPPSPC.js → chunk-OCYTN4IH.js} +2 -2
  29. package/bundle/{chunk-2GAMWFJE.js → chunk-QEF5D4VE.js} +1 -1
  30. package/bundle/{chunk-4B3QYXBA.js → chunk-T7MQCLXF.js} +5 -3
  31. package/bundle/{chunk-LDFYPOXJ.js → chunk-TFQY5TSY.js} +1 -1
  32. package/bundle/{chunk-BWK4MC7Y.js → chunk-USZXZZAR.js} +8 -6
  33. package/bundle/{chunk-ER2RCPCY.js → chunk-V54KHS5B.js} +2 -2
  34. package/bundle/{chunk-YSKASURB.js → chunk-V6J23FL2.js} +1 -1
  35. package/bundle/{chunk-UHSTDJ7X.js → chunk-VN2QYX4C.js} +1 -1
  36. package/bundle/{chunk-Z4OWKG7J.js → chunk-VOT5MMEY.js} +1 -1
  37. package/bundle/{chunk-W6GU26WO.js → chunk-WG6BDFPZ.js} +1 -1
  38. package/bundle/{chunk-AK77X5GL.js → chunk-XX74I5RK.js} +4 -2
  39. package/bundle/{chunk-6BT265R3.js → chunk-YQCRWPNI.js} +1 -1
  40. package/bundle/commands/annotation/get.js +3 -3
  41. package/bundle/commands/annotation/list.js +3 -3
  42. package/bundle/commands/annotation/put.js +3 -3
  43. package/bundle/commands/auth/apikey.js +2 -2
  44. package/bundle/commands/auth/list.js +2 -2
  45. package/bundle/commands/auth/login.js +2 -2
  46. package/bundle/commands/auth/logout.js +2 -2
  47. package/bundle/commands/auth/select.js +3 -3
  48. package/bundle/commands/bucket/create-credential.js +2 -2
  49. package/bundle/commands/bucket/delete-credential.js +2 -2
  50. package/bundle/commands/bucket/get-credential.js +2 -2
  51. package/bundle/commands/bucket/list-credentials.js +2 -2
  52. package/bundle/commands/build/actor/setup.js +124 -0
  53. package/bundle/commands/build/branch.js +10 -10
  54. package/bundle/commands/build/bucket-events/setup.js +146 -0
  55. package/bundle/commands/build/checkout.js +8 -8
  56. package/bundle/commands/build/clone.js +6 -6
  57. package/bundle/commands/build/delete.js +8 -8
  58. package/bundle/commands/build/deploy.js +10 -10
  59. package/bundle/commands/build/env/get.js +3 -3
  60. package/bundle/commands/build/env/list.js +2 -2
  61. package/bundle/commands/build/env/set.js +3 -3
  62. package/bundle/commands/build/env.js +2 -2
  63. package/bundle/commands/build/features.js +192 -0
  64. package/bundle/commands/build/find.js +4 -4
  65. package/bundle/commands/build/generate.js +52 -3
  66. package/bundle/commands/build/init-workspace.js +3 -3
  67. package/bundle/commands/build/init.js +15 -3
  68. package/bundle/commands/build/list.js +5 -5
  69. package/bundle/commands/build/queue/setup.js +133 -0
  70. package/bundle/commands/build/sandbox.js +6 -6
  71. package/bundle/commands/build/smartbucket/setup.js +165 -0
  72. package/bundle/commands/build/smartmemory/setup.js +171 -0
  73. package/bundle/commands/build/smartsql/setup.js +167 -0
  74. package/bundle/commands/build/start.js +2 -2
  75. package/bundle/commands/build/status.js +5 -5
  76. package/bundle/commands/build/stop.js +2 -2
  77. package/bundle/commands/build/stripe/dashboard.js +3 -3
  78. package/bundle/commands/build/stripe/onboard.js +3 -3
  79. package/bundle/commands/build/stripe/setup.js +3 -3
  80. package/bundle/commands/build/stripe/start.js +14 -14
  81. package/bundle/commands/build/stripe/status.js +3 -3
  82. package/bundle/commands/build/stripe/subscription/create.js +4 -4
  83. package/bundle/commands/build/stripe/subscription/get.js +4 -4
  84. package/bundle/commands/build/stripe/subscription/update.js +4 -4
  85. package/bundle/commands/build/tools/check.js +2 -2
  86. package/bundle/commands/build/tools/fmt.js +2 -2
  87. package/bundle/commands/build/unsandbox.js +6 -6
  88. package/bundle/commands/build/upload.js +5 -5
  89. package/bundle/commands/build/validate.js +85 -14
  90. package/bundle/commands/build/workos/delete.js +6 -6
  91. package/bundle/commands/build/workos/env/attach.js +3 -3
  92. package/bundle/commands/build/workos/env/attached.js +3 -3
  93. package/bundle/commands/build/workos/env/create.js +3 -3
  94. package/bundle/commands/build/workos/env/delete.js +3 -3
  95. package/bundle/commands/build/workos/env/detach.js +3 -3
  96. package/bundle/commands/build/workos/env/dev-login.js +3 -3
  97. package/bundle/commands/build/workos/env/get.js +3 -3
  98. package/bundle/commands/build/workos/env/list.js +3 -3
  99. package/bundle/commands/build/workos/env/set.js +3 -3
  100. package/bundle/commands/build/workos/invite.js +3 -3
  101. package/bundle/commands/build/workos/jwt.js +172 -0
  102. package/bundle/commands/build/workos/setup.js +3 -3
  103. package/bundle/commands/build/workos/status.js +3 -3
  104. package/bundle/commands/dns/create.js +2 -2
  105. package/bundle/commands/dns/delete.js +6 -6
  106. package/bundle/commands/dns/get.js +6 -6
  107. package/bundle/commands/dns/list.js +3 -3
  108. package/bundle/commands/dns/records/create.js +2 -2
  109. package/bundle/commands/dns/records/delete.js +3 -3
  110. package/bundle/commands/dns/records/get.js +2 -2
  111. package/bundle/commands/dns/records/list.js +2 -2
  112. package/bundle/commands/dns/records/update.js +2 -2
  113. package/bundle/commands/doctor.js +309 -0
  114. package/bundle/commands/logs/query.js +3 -3
  115. package/bundle/commands/logs/tail.js +3 -3
  116. package/bundle/commands/mcp/install-claude.js +2 -2
  117. package/bundle/commands/mcp/install-gemini.js +2 -2
  118. package/bundle/commands/mcp/install-goose.js +2 -2
  119. package/bundle/commands/mcp/status.js +2 -2
  120. package/bundle/commands/object/delete.js +5 -37
  121. package/bundle/commands/object/get.js +5 -37
  122. package/bundle/commands/object/list.js +7 -39
  123. package/bundle/commands/object/put.js +5 -37
  124. package/bundle/commands/query/chunk-search.js +14 -46
  125. package/bundle/commands/query/document.js +17 -55
  126. package/bundle/commands/query/events.js +2 -2
  127. package/bundle/commands/query/reindex.js +2 -2
  128. package/bundle/commands/query/search.js +14 -46
  129. package/bundle/commands/tail.js +2 -2
  130. package/bundle/index.js +1 -1
  131. package/dist/commands/build/actor/setup.d.ts +22 -0
  132. package/dist/commands/build/actor/setup.d.ts.map +1 -0
  133. package/dist/commands/build/actor/setup.js +116 -0
  134. package/dist/commands/build/bucket-events/setup.d.ts +22 -0
  135. package/dist/commands/build/bucket-events/setup.d.ts.map +1 -0
  136. package/dist/commands/build/bucket-events/setup.js +134 -0
  137. package/dist/commands/build/features.d.ts +19 -0
  138. package/dist/commands/build/features.d.ts.map +1 -0
  139. package/dist/commands/build/features.js +97 -0
  140. package/dist/commands/build/generate.d.ts +2 -0
  141. package/dist/commands/build/generate.d.ts.map +1 -1
  142. package/dist/commands/build/generate.js +52 -0
  143. package/dist/commands/build/init.d.ts.map +1 -1
  144. package/dist/commands/build/init.js +10 -0
  145. package/dist/commands/build/queue/setup.d.ts +21 -0
  146. package/dist/commands/build/queue/setup.d.ts.map +1 -0
  147. package/dist/commands/build/queue/setup.js +120 -0
  148. package/dist/commands/build/smartbucket/setup.d.ts +23 -0
  149. package/dist/commands/build/smartbucket/setup.d.ts.map +1 -0
  150. package/dist/commands/build/smartbucket/setup.js +167 -0
  151. package/dist/commands/build/smartmemory/setup.d.ts +23 -0
  152. package/dist/commands/build/smartmemory/setup.d.ts.map +1 -0
  153. package/dist/commands/build/smartmemory/setup.js +172 -0
  154. package/dist/commands/build/smartsql/setup.d.ts +23 -0
  155. package/dist/commands/build/smartsql/setup.d.ts.map +1 -0
  156. package/dist/commands/build/smartsql/setup.js +169 -0
  157. package/dist/commands/build/validate.d.ts +2 -0
  158. package/dist/commands/build/validate.d.ts.map +1 -1
  159. package/dist/commands/build/validate.js +80 -8
  160. package/dist/commands/build/workos/jwt.d.ts +23 -0
  161. package/dist/commands/build/workos/jwt.d.ts.map +1 -0
  162. package/dist/commands/build/workos/jwt.js +172 -0
  163. package/dist/commands/doctor.d.ts +27 -0
  164. package/dist/commands/doctor.d.ts.map +1 -0
  165. package/dist/commands/doctor.js +328 -0
  166. package/dist/commands/object/delete.d.ts +0 -2
  167. package/dist/commands/object/delete.d.ts.map +1 -1
  168. package/dist/commands/object/delete.js +3 -38
  169. package/dist/commands/object/get.d.ts +0 -2
  170. package/dist/commands/object/get.d.ts.map +1 -1
  171. package/dist/commands/object/get.js +3 -38
  172. package/dist/commands/object/list.d.ts +0 -2
  173. package/dist/commands/object/list.d.ts.map +1 -1
  174. package/dist/commands/object/list.js +5 -40
  175. package/dist/commands/object/put.d.ts +0 -2
  176. package/dist/commands/object/put.d.ts.map +1 -1
  177. package/dist/commands/object/put.js +3 -38
  178. package/dist/commands/query/chunk-search.d.ts +0 -2
  179. package/dist/commands/query/chunk-search.d.ts.map +1 -1
  180. package/dist/commands/query/chunk-search.js +12 -46
  181. package/dist/commands/query/document.d.ts +1 -3
  182. package/dist/commands/query/document.d.ts.map +1 -1
  183. package/dist/commands/query/document.js +16 -60
  184. package/dist/commands/query/search.d.ts +0 -2
  185. package/dist/commands/query/search.d.ts.map +1 -1
  186. package/dist/commands/query/search.js +12 -46
  187. package/dist/feature-catalog.d.ts +28 -0
  188. package/dist/feature-catalog.d.ts.map +1 -0
  189. package/dist/feature-catalog.js +104 -0
  190. package/dist/index.d.ts.map +1 -1
  191. package/dist/index.js +16 -2
  192. package/oclif.manifest.json +4811 -3433
  193. package/package.json +3 -3
  194. package/templates/examples/smartbucket-minimal.ts.hbs +87 -0
  195. package/templates/examples/smartmemory-minimal.ts.hbs +82 -0
  196. package/templates/examples/smartsql-minimal.ts.hbs +69 -0
  197. package/templates/handlers/actor/index.test.ts.hbs +48 -85
  198. package/templates/handlers/actor/index.ts.hbs +16 -316
  199. package/templates/handlers/bucket-event-notification/index.ts.hbs +32 -235
  200. package/templates/handlers/bucket-event-observer.ts.hbs +79 -0
  201. package/templates/handlers/http-service/index.test.ts.hbs +3 -0
  202. package/templates/handlers/http-service/index.ts.hbs +43 -15
  203. package/templates/handlers/queue-consumer-setup.ts.hbs +45 -0
  204. package/templates/handlers/task/index.test.ts.hbs +30 -112
  205. package/templates/handlers/task/index.ts.hbs +19 -58
  206. package/templates/init/RAINDROP.md.hbs +97 -1
  207. package/templates/init/eslint.config.js +43 -0
  208. package/templates/init/package.json.hbs +4 -1
  209. package/templates/init/tsconfig.json +3 -3
  210. package/bundle/chunk-23UBI7BN.js +0 -48
  211. package/bundle/chunk-2QWMBNE3.js +0 -384
  212. package/bundle/chunk-45IYWQDC.js +0 -384
  213. package/bundle/chunk-5YUO23QU.js +0 -4585
  214. package/bundle/chunk-6MIGCNUO.js +0 -75
  215. package/bundle/chunk-7ZJWA6HP.js +0 -805
  216. package/bundle/chunk-AIYVX2M7.js +0 -44
  217. package/bundle/chunk-BB5TNIEM.js +0 -48
  218. package/bundle/chunk-BUR3HFKH.js +0 -488
  219. package/bundle/chunk-BYSBS7KT.js +0 -488
  220. package/bundle/chunk-CX3RWI62.js +0 -28658
  221. package/bundle/chunk-DLH7MI57.js +0 -305
  222. package/bundle/chunk-E3WJIYJZ.js +0 -12148
  223. package/bundle/chunk-EX7NOPRF.js +0 -12148
  224. package/bundle/chunk-F76JQS2J.js +0 -231
  225. package/bundle/chunk-FBOXMVKD.js +0 -28679
  226. package/bundle/chunk-FTPZ6SQW.js +0 -238909
  227. package/bundle/chunk-H3CFZ7ZH.js +0 -74
  228. package/bundle/chunk-HXOILVWA.js +0 -384
  229. package/bundle/chunk-IMP7O5AC.js +0 -22452
  230. package/bundle/chunk-IPYOAKRE.js +0 -231
  231. package/bundle/chunk-J7HN6XF2.js +0 -4461
  232. package/bundle/chunk-JOLOAALA.js +0 -231
  233. package/bundle/chunk-JZ2G4Q35.js +0 -4585
  234. package/bundle/chunk-KVAWPWF7.js +0 -231
  235. package/bundle/chunk-MEUAAIXV.js +0 -28657
  236. package/bundle/chunk-QBWFE57Z.js +0 -384
  237. package/bundle/chunk-SP3LOXPC.js +0 -46
  238. package/bundle/chunk-T7C564PR.js +0 -28678
  239. package/bundle/chunk-UFH545WJ.js +0 -22452
  240. package/bundle/chunk-UHVMPWM5.js +0 -315
  241. package/bundle/chunk-VB7ZTSZV.js +0 -1089
  242. package/bundle/chunk-VBIJDFMJ.js +0 -384
  243. package/bundle/chunk-VR7RLTE3.js +0 -231
  244. package/bundle/chunk-WFZUJLEC.js +0 -231
  245. package/bundle/chunk-YDGJTLVZ.js +0 -133
  246. package/bundle/chunk-YPNQ7UFK.js +0 -502
  247. package/bundle/chunk-YXFDRMSN.js +0 -384
  248. package/dist/lib/dns-utils.d.ts +0 -7
  249. package/dist/lib/dns-utils.d.ts.map +0 -1
  250. package/dist/lib/dns-utils.js +0 -44
@@ -1,488 +0,0 @@
1
- import {
2
- init_cjs_shims
3
- } from "./chunk-PS3WZBDF.js";
4
-
5
- // ../../node_modules/.pnpm/open@10.1.2/node_modules/open/index.js
6
- init_cjs_shims();
7
- import process5 from "node:process";
8
- import { Buffer } from "node:buffer";
9
- import path from "node:path";
10
- import { fileURLToPath } from "node:url";
11
- import util from "node:util";
12
- import childProcess from "node:child_process";
13
- import fs4, { constants as fsConstants } from "node:fs/promises";
14
-
15
- // ../../node_modules/.pnpm/is-wsl@3.1.0/node_modules/is-wsl/index.js
16
- init_cjs_shims();
17
- import process from "node:process";
18
- import os from "node:os";
19
- import fs3 from "node:fs";
20
-
21
- // ../../node_modules/.pnpm/is-inside-container@1.0.0/node_modules/is-inside-container/index.js
22
- init_cjs_shims();
23
- import fs2 from "node:fs";
24
-
25
- // ../../node_modules/.pnpm/is-docker@3.0.0/node_modules/is-docker/index.js
26
- init_cjs_shims();
27
- import fs from "node:fs";
28
- var isDockerCached;
29
- function hasDockerEnv() {
30
- try {
31
- fs.statSync("/.dockerenv");
32
- return true;
33
- } catch {
34
- return false;
35
- }
36
- }
37
- function hasDockerCGroup() {
38
- try {
39
- return fs.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
40
- } catch {
41
- return false;
42
- }
43
- }
44
- function isDocker() {
45
- if (isDockerCached === void 0) {
46
- isDockerCached = hasDockerEnv() || hasDockerCGroup();
47
- }
48
- return isDockerCached;
49
- }
50
-
51
- // ../../node_modules/.pnpm/is-inside-container@1.0.0/node_modules/is-inside-container/index.js
52
- var cachedResult;
53
- var hasContainerEnv = () => {
54
- try {
55
- fs2.statSync("/run/.containerenv");
56
- return true;
57
- } catch {
58
- return false;
59
- }
60
- };
61
- function isInsideContainer() {
62
- if (cachedResult === void 0) {
63
- cachedResult = hasContainerEnv() || isDocker();
64
- }
65
- return cachedResult;
66
- }
67
-
68
- // ../../node_modules/.pnpm/is-wsl@3.1.0/node_modules/is-wsl/index.js
69
- var isWsl = () => {
70
- if (process.platform !== "linux") {
71
- return false;
72
- }
73
- if (os.release().toLowerCase().includes("microsoft")) {
74
- if (isInsideContainer()) {
75
- return false;
76
- }
77
- return true;
78
- }
79
- try {
80
- return fs3.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
81
- } catch {
82
- return false;
83
- }
84
- };
85
- var is_wsl_default = process.env.__IS_WSL_TEST__ ? isWsl : isWsl();
86
-
87
- // ../../node_modules/.pnpm/define-lazy-prop@3.0.0/node_modules/define-lazy-prop/index.js
88
- init_cjs_shims();
89
- function defineLazyProperty(object, propertyName, valueGetter) {
90
- const define = (value) => Object.defineProperty(object, propertyName, { value, enumerable: true, writable: true });
91
- Object.defineProperty(object, propertyName, {
92
- configurable: true,
93
- enumerable: true,
94
- get() {
95
- const result = valueGetter();
96
- define(result);
97
- return result;
98
- },
99
- set(value) {
100
- define(value);
101
- }
102
- });
103
- return object;
104
- }
105
-
106
- // ../../node_modules/.pnpm/default-browser@5.2.1/node_modules/default-browser/index.js
107
- init_cjs_shims();
108
- import { promisify as promisify4 } from "node:util";
109
- import process4 from "node:process";
110
- import { execFile as execFile4 } from "node:child_process";
111
-
112
- // ../../node_modules/.pnpm/default-browser-id@5.0.0/node_modules/default-browser-id/index.js
113
- init_cjs_shims();
114
- import { promisify } from "node:util";
115
- import process2 from "node:process";
116
- import { execFile } from "node:child_process";
117
- var execFileAsync = promisify(execFile);
118
- async function defaultBrowserId() {
119
- if (process2.platform !== "darwin") {
120
- throw new Error("macOS only");
121
- }
122
- const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
123
- const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
124
- return match?.groups.id ?? "com.apple.Safari";
125
- }
126
-
127
- // ../../node_modules/.pnpm/bundle-name@4.1.0/node_modules/bundle-name/index.js
128
- init_cjs_shims();
129
-
130
- // ../../node_modules/.pnpm/run-applescript@7.0.0/node_modules/run-applescript/index.js
131
- init_cjs_shims();
132
- import process3 from "node:process";
133
- import { promisify as promisify2 } from "node:util";
134
- import { execFile as execFile2, execFileSync } from "node:child_process";
135
- var execFileAsync2 = promisify2(execFile2);
136
- async function runAppleScript(script, { humanReadableOutput = true } = {}) {
137
- if (process3.platform !== "darwin") {
138
- throw new Error("macOS only");
139
- }
140
- const outputArguments = humanReadableOutput ? [] : ["-ss"];
141
- const { stdout } = await execFileAsync2("osascript", ["-e", script, outputArguments]);
142
- return stdout.trim();
143
- }
144
-
145
- // ../../node_modules/.pnpm/bundle-name@4.1.0/node_modules/bundle-name/index.js
146
- async function bundleName(bundleId) {
147
- return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string
148
- tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
149
- }
150
-
151
- // ../../node_modules/.pnpm/default-browser@5.2.1/node_modules/default-browser/windows.js
152
- init_cjs_shims();
153
- import { promisify as promisify3 } from "node:util";
154
- import { execFile as execFile3 } from "node:child_process";
155
- var execFileAsync3 = promisify3(execFile3);
156
- var windowsBrowserProgIds = {
157
- AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
158
- MSEdgeDHTML: { name: "Edge", id: "com.microsoft.edge" },
159
- // On macOS, it's "com.microsoft.edgemac"
160
- MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" },
161
- // Newer Edge/Win10 releases
162
- "IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" },
163
- FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
164
- ChromeHTML: { name: "Chrome", id: "com.google.chrome" },
165
- BraveHTML: { name: "Brave", id: "com.brave.Browser" },
166
- BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" },
167
- BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" }
168
- };
169
- var UnknownBrowserError = class extends Error {
170
- };
171
- async function defaultBrowser(_execFileAsync = execFileAsync3) {
172
- const { stdout } = await _execFileAsync("reg", [
173
- "QUERY",
174
- " HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
175
- "/v",
176
- "ProgId"
177
- ]);
178
- const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
179
- if (!match) {
180
- throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
181
- }
182
- const { id } = match.groups;
183
- const browser = windowsBrowserProgIds[id];
184
- if (!browser) {
185
- throw new UnknownBrowserError(`Unknown browser ID: ${id}`);
186
- }
187
- return browser;
188
- }
189
-
190
- // ../../node_modules/.pnpm/default-browser@5.2.1/node_modules/default-browser/index.js
191
- var execFileAsync4 = promisify4(execFile4);
192
- var titleize = (string) => string.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x) => x.toUpperCase());
193
- async function defaultBrowser2() {
194
- if (process4.platform === "darwin") {
195
- const id = await defaultBrowserId();
196
- const name = await bundleName(id);
197
- return { name, id };
198
- }
199
- if (process4.platform === "linux") {
200
- const { stdout } = await execFileAsync4("xdg-mime", ["query", "default", "x-scheme-handler/http"]);
201
- const id = stdout.trim();
202
- const name = titleize(id.replace(/.desktop$/, "").replace("-", " "));
203
- return { name, id };
204
- }
205
- if (process4.platform === "win32") {
206
- return defaultBrowser();
207
- }
208
- throw new Error("Only macOS, Linux, and Windows are supported");
209
- }
210
-
211
- // ../../node_modules/.pnpm/open@10.1.2/node_modules/open/index.js
212
- var execFile5 = util.promisify(childProcess.execFile);
213
- var __dirname = path.dirname(fileURLToPath(import.meta.url));
214
- var localXdgOpenPath = path.join(__dirname, "xdg-open");
215
- var { platform, arch } = process5;
216
- var getWslDrivesMountPoint = /* @__PURE__ */ (() => {
217
- const defaultMountPoint = "/mnt/";
218
- let mountPoint;
219
- return async function() {
220
- if (mountPoint) {
221
- return mountPoint;
222
- }
223
- const configFilePath = "/etc/wsl.conf";
224
- let isConfigFileExists = false;
225
- try {
226
- await fs4.access(configFilePath, fsConstants.F_OK);
227
- isConfigFileExists = true;
228
- } catch {
229
- }
230
- if (!isConfigFileExists) {
231
- return defaultMountPoint;
232
- }
233
- const configContent = await fs4.readFile(configFilePath, { encoding: "utf8" });
234
- const configMountPoint = /(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(configContent);
235
- if (!configMountPoint) {
236
- return defaultMountPoint;
237
- }
238
- mountPoint = configMountPoint.groups.mountPoint.trim();
239
- mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
240
- return mountPoint;
241
- };
242
- })();
243
- var getPowershellPathFromWsl = async () => {
244
- const mountPoint = await getWslDrivesMountPoint();
245
- return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
246
- };
247
- async function getWindowsDefaultBrowserFromWsl() {
248
- const powershellPath = await getPowershellPathFromWsl();
249
- const rawCommand = '(Get-ItemProperty -Path "HKCU:\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice").ProgId';
250
- const encodedCommand = Buffer.from(rawCommand, "utf16le").toString("base64");
251
- const { stdout } = await execFile5(
252
- powershellPath,
253
- [
254
- "-NoProfile",
255
- "-NonInteractive",
256
- "-ExecutionPolicy",
257
- "Bypass",
258
- "-EncodedCommand",
259
- encodedCommand
260
- ],
261
- { encoding: "utf8" }
262
- );
263
- const progId = stdout.trim();
264
- const browserMap = {
265
- ChromeHTML: "com.google.chrome",
266
- MSEdgeHTM: "com.microsoft.edge",
267
- FirefoxURL: "org.mozilla.firefox"
268
- };
269
- return browserMap[progId] ? { id: browserMap[progId] } : {};
270
- }
271
- var pTryEach = async (array, mapper) => {
272
- let latestError;
273
- for (const item of array) {
274
- try {
275
- return await mapper(item);
276
- } catch (error) {
277
- latestError = error;
278
- }
279
- }
280
- throw latestError;
281
- };
282
- var baseOpen = async (options) => {
283
- options = {
284
- wait: false,
285
- background: false,
286
- newInstance: false,
287
- allowNonzeroExitCode: false,
288
- ...options
289
- };
290
- if (Array.isArray(options.app)) {
291
- return pTryEach(options.app, (singleApp) => baseOpen({
292
- ...options,
293
- app: singleApp
294
- }));
295
- }
296
- let { name: app, arguments: appArguments = [] } = options.app ?? {};
297
- appArguments = [...appArguments];
298
- if (Array.isArray(app)) {
299
- return pTryEach(app, (appName) => baseOpen({
300
- ...options,
301
- app: {
302
- name: appName,
303
- arguments: appArguments
304
- }
305
- }));
306
- }
307
- if (app === "browser" || app === "browserPrivate") {
308
- const ids = {
309
- "com.google.chrome": "chrome",
310
- "google-chrome.desktop": "chrome",
311
- "org.mozilla.firefox": "firefox",
312
- "firefox.desktop": "firefox",
313
- "com.microsoft.msedge": "edge",
314
- "com.microsoft.edge": "edge",
315
- "com.microsoft.edgemac": "edge",
316
- "microsoft-edge.desktop": "edge"
317
- };
318
- const flags = {
319
- chrome: "--incognito",
320
- firefox: "--private-window",
321
- edge: "--inPrivate"
322
- };
323
- const browser = is_wsl_default ? await getWindowsDefaultBrowserFromWsl() : await defaultBrowser2();
324
- if (browser.id in ids) {
325
- const browserName = ids[browser.id];
326
- if (app === "browserPrivate") {
327
- appArguments.push(flags[browserName]);
328
- }
329
- return baseOpen({
330
- ...options,
331
- app: {
332
- name: apps[browserName],
333
- arguments: appArguments
334
- }
335
- });
336
- }
337
- throw new Error(`${browser.name} is not supported as a default browser`);
338
- }
339
- let command;
340
- const cliArguments = [];
341
- const childProcessOptions = {};
342
- if (platform === "darwin") {
343
- command = "open";
344
- if (options.wait) {
345
- cliArguments.push("--wait-apps");
346
- }
347
- if (options.background) {
348
- cliArguments.push("--background");
349
- }
350
- if (options.newInstance) {
351
- cliArguments.push("--new");
352
- }
353
- if (app) {
354
- cliArguments.push("-a", app);
355
- }
356
- } else if (platform === "win32" || is_wsl_default && !isInsideContainer() && !app) {
357
- command = is_wsl_default ? await getPowershellPathFromWsl() : `${process5.env.SYSTEMROOT || process5.env.windir || "C:\\Windows"}\\System32\\WindowsPowerShell\\v1.0\\powershell`;
358
- cliArguments.push(
359
- "-NoProfile",
360
- "-NonInteractive",
361
- "-ExecutionPolicy",
362
- "Bypass",
363
- "-EncodedCommand"
364
- );
365
- if (!is_wsl_default) {
366
- childProcessOptions.windowsVerbatimArguments = true;
367
- }
368
- const encodedArguments = ["Start"];
369
- if (options.wait) {
370
- encodedArguments.push("-Wait");
371
- }
372
- if (app) {
373
- encodedArguments.push(`"\`"${app}\`""`);
374
- if (options.target) {
375
- appArguments.push(options.target);
376
- }
377
- } else if (options.target) {
378
- encodedArguments.push(`"${options.target}"`);
379
- }
380
- if (appArguments.length > 0) {
381
- appArguments = appArguments.map((argument) => `"\`"${argument}\`""`);
382
- encodedArguments.push("-ArgumentList", appArguments.join(","));
383
- }
384
- options.target = Buffer.from(encodedArguments.join(" "), "utf16le").toString("base64");
385
- } else {
386
- if (app) {
387
- command = app;
388
- } else {
389
- const isBundled = !__dirname || __dirname === "/";
390
- let exeLocalXdgOpen = false;
391
- try {
392
- await fs4.access(localXdgOpenPath, fsConstants.X_OK);
393
- exeLocalXdgOpen = true;
394
- } catch {
395
- }
396
- const useSystemXdgOpen = process5.versions.electron ?? (platform === "android" || isBundled || !exeLocalXdgOpen);
397
- command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
398
- }
399
- if (appArguments.length > 0) {
400
- cliArguments.push(...appArguments);
401
- }
402
- if (!options.wait) {
403
- childProcessOptions.stdio = "ignore";
404
- childProcessOptions.detached = true;
405
- }
406
- }
407
- if (platform === "darwin" && appArguments.length > 0) {
408
- cliArguments.push("--args", ...appArguments);
409
- }
410
- if (options.target) {
411
- cliArguments.push(options.target);
412
- }
413
- const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);
414
- if (options.wait) {
415
- return new Promise((resolve, reject) => {
416
- subprocess.once("error", reject);
417
- subprocess.once("close", (exitCode) => {
418
- if (!options.allowNonzeroExitCode && exitCode > 0) {
419
- reject(new Error(`Exited with code ${exitCode}`));
420
- return;
421
- }
422
- resolve(subprocess);
423
- });
424
- });
425
- }
426
- subprocess.unref();
427
- return subprocess;
428
- };
429
- var open = (target, options) => {
430
- if (typeof target !== "string") {
431
- throw new TypeError("Expected a `target`");
432
- }
433
- return baseOpen({
434
- ...options,
435
- target
436
- });
437
- };
438
- function detectArchBinary(binary) {
439
- if (typeof binary === "string" || Array.isArray(binary)) {
440
- return binary;
441
- }
442
- const { [arch]: archBinary } = binary;
443
- if (!archBinary) {
444
- throw new Error(`${arch} is not supported`);
445
- }
446
- return archBinary;
447
- }
448
- function detectPlatformBinary({ [platform]: platformBinary }, { wsl }) {
449
- if (wsl && is_wsl_default) {
450
- return detectArchBinary(wsl);
451
- }
452
- if (!platformBinary) {
453
- throw new Error(`${platform} is not supported`);
454
- }
455
- return detectArchBinary(platformBinary);
456
- }
457
- var apps = {};
458
- defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
459
- darwin: "google chrome",
460
- win32: "chrome",
461
- linux: ["google-chrome", "google-chrome-stable", "chromium"]
462
- }, {
463
- wsl: {
464
- ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
465
- x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
466
- }
467
- }));
468
- defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
469
- darwin: "firefox",
470
- win32: "C:\\Program Files\\Mozilla Firefox\\firefox.exe",
471
- linux: "firefox"
472
- }, {
473
- wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
474
- }));
475
- defineLazyProperty(apps, "edge", () => detectPlatformBinary({
476
- darwin: "microsoft edge",
477
- win32: "msedge",
478
- linux: ["microsoft-edge", "microsoft-edge-dev"]
479
- }, {
480
- wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
481
- }));
482
- defineLazyProperty(apps, "browser", () => "browser");
483
- defineLazyProperty(apps, "browserPrivate", () => "browserPrivate");
484
- var open_default = open;
485
-
486
- export {
487
- open_default
488
- };