@onequery/cli 0.1.63 → 0.1.64-darwin-arm64

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 (172) hide show
  1. package/package.json +17 -24
  2. package/vendor/aarch64-apple-darwin/onequery/onequery +0 -0
  3. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/CompositeItem-BB408Cyb.js +1 -0
  4. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/CompositeList-DbbDW_rT.js +1 -0
  5. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/DialogTitle-ChNkcIa6.js +1 -0
  6. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconArrowRight-DsOD7mDl.js +1 -0
  7. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconCheck-Gc24xPT2.js +1 -0
  8. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconChevronDown-B-39MA7-.js +1 -0
  9. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconChevronRight-DD16tNHZ.js +1 -0
  10. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconCoins-C7Nn0L6R.js +1 -0
  11. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconHistory-DuLS8PKF.js +1 -0
  12. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconLoader2-BpZcTuHV.js +1 -0
  13. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconPlus-CZiRiEUF.js +1 -0
  14. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconTerminal2-PxNqcz3d.js +1 -0
  15. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconX-rRpRFwc5.js +1 -0
  16. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/Separator-M05FshHx.js +1 -0
  17. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/_authenticated-CcSc_Pt7.js +1 -0
  18. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/_org_slug-BvJDit6U.js +1 -0
  19. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/alert-BIGxI3XN.js +1 -0
  20. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/api-base-url-DIb6qukm.js +1 -0
  21. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/api-client-tp8XTpAa.js +1 -0
  22. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/api-paths-DcYkf-C_.js +1 -0
  23. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/app-routes-CMyon6Em.js +1 -0
  24. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/audit-CdPU9Jf2.js +2 -0
  25. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/auth-bootstrap-query-B1MHd_NV.js +1 -0
  26. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/auth-client-D-YHMy0G.js +3 -0
  27. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/avatar-SaFoLofF.js +1 -0
  28. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/badge-BFPkSrVD.js +1 -0
  29. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/budget-CX5MplAP.js +1 -0
  30. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/callback-BWQ3ETBy.js +1 -0
  31. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/card-Dllm2lhp.js +1 -0
  32. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/checkbox-Bii9Pcrx.js +1 -0
  33. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/compiler-runtime-DCc3R3Xn.js +1 -0
  34. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/connect-database-C1Jb2l53.js +1 -0
  35. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/copy-button-BO1KBdf9.js +1 -0
  36. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/create-org-BSzKv5ue.js +1 -0
  37. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/createReactComponent-_L2mp4Ui.js +1 -0
  38. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/data-source-connection-form-CbDL0cgG.js +273 -0
  39. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/device-Bbz7apAX.js +1 -0
  40. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/dist-BNi06Dzx.js +3 -0
  41. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/dropdown-menu-Cw2MW0pD.js +1 -0
  42. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/empty-DjRo5ytz.js +1 -0
  43. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/format-date-Rg05aHXh.js +1 -0
  44. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/getDisabledMountTransitionStyles-C0uz3iMh.js +1 -0
  45. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/getPseudoElementBounds-CRlxTrfr.js +12 -0
  46. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/home-BNjpNKdt.js +1 -0
  47. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/index-B4OsjuJp.css +2 -0
  48. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/index-CXR0dKJj.js +10 -0
  49. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/input-BRu0b1Tq.js +1 -0
  50. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/integrations-BWC7iPQ5.js +1 -0
  51. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
  52. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
  53. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
  54. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
  55. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  56. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  57. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
  58. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/invite._invitationId-DmJnR4R5.js +1 -0
  59. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/jsx-runtime-DG_AJzB_.js +1 -0
  60. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/label-f2wVZcni.js +1 -0
  61. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/link-Cgvqhh5w.js +1 -0
  62. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/matchContext-CDajBC0L.js +1 -0
  63. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/organization-permissions-BXV_ess0.js +1 -0
  64. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/organization-query-keys-ieaSNxMR.js +1 -0
  65. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/query-CY--GYXb.js +1 -0
  66. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/query-timing-YBkSOxxF.js +1 -0
  67. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/queryOptions-bXtOUR_h.js +1 -0
  68. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/routes-CxJ2aoMf.js +1 -0
  69. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/schemas-EcBBwCo1.js +64 -0
  70. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/select-yNaL0SXM.js +1 -0
  71. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/separator-BH7Gsum-.js +1 -0
  72. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/settings-C8us2bWX.js +1 -0
  73. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/signin-BgfqB9QB.js +1 -0
  74. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/src-C5F1uEDb.js +1 -0
  75. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/team-CYPsHFTt.js +1 -0
  76. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/textarea-CnA77PLS.js +1 -0
  77. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/theme-toggle-CRaDbyxE.js +1 -0
  78. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/use-optimistic-mutation-3PPnMc-O.js +1 -0
  79. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/useBaseQuery-CO5Q8xm4.js +1 -0
  80. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/useBaseUiId-CtNp109T.js +1 -0
  81. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/useCompositeItem-D243hyne.js +1 -0
  82. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/useControlled-C-85HRFr.js +1 -0
  83. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/useQuery-DyOxsY45.js +1 -0
  84. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/useRender-CzpKCg11.js +1 -0
  85. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/useRouterState-DpT8luFk.js +1 -0
  86. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/useSuspenseQuery-CBFRU4At.js +1 -0
  87. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/useValueChanged-BNrgSVVM.js +1 -0
  88. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/utils-C8DGLIgm.js +1 -0
  89. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/xstate-react.esm-Bo3CCIRt.js +1 -0
  90. package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/zod-D0PWrP9q.js +1 -0
  91. package/vendor/aarch64-apple-darwin/runtime/dashboard/favicon.ico +0 -0
  92. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/amplitude/step1_settings_sidebar.png +0 -0
  93. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/amplitude/step2_projects.png +0 -0
  94. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/amplitude/step3_project_keys.png +0 -0
  95. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/amplitude/step4_api_keys.png +0 -0
  96. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/bigquery/step1_service_accounts.png +0 -0
  97. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/bigquery/step2_bigquery_roles.png +0 -0
  98. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/bigquery/step3_add_key_menu.png +0 -0
  99. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/bigquery/step4_create_json_key.png +0 -0
  100. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/cloudflare-workers-observability/step2_enable_workers_logs.png +0 -0
  101. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/cloudflare-workers-observability/step3_user_api_tokens.png +0 -0
  102. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/cloudflare-workers-observability/step4_create_api_token.png +0 -0
  103. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/cloudflare-workers-observability/step5_workers_pages_account_id.png +0 -0
  104. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/cloudflare-workers-observability/step6_workers_observability_permission.png +0 -0
  105. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/ga4/step1_service_accounts.png +0 -0
  106. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/ga4/step2_create_json_key.png +0 -0
  107. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/ga4/step3_add_user_viewer.png +0 -0
  108. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/ga4/step4_property_details.png +0 -0
  109. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/github-token-guide/step1_signin.png +0 -0
  110. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/github-token-guide/step2_new_fine_grained_token_sanitized.png +0 -0
  111. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/github-token-guide/step3_permissions_configured_sanitized.png +0 -0
  112. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/github-token-guide/step4_token_created_sanitized.png +0 -0
  113. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/google-search-console/step1_confirm_property.png +0 -0
  114. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/google-search-console/step2_scope_selected.png +0 -0
  115. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/google-search-console/step3_copy_access_token.png +0 -0
  116. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/mixpanel/step1_service_accounts.png +0 -0
  117. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/mixpanel/step2_create_service_account.png +0 -0
  118. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/mixpanel/step3_credentials.png +0 -0
  119. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/mixpanel/step4_project_settings.png +0 -0
  120. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/postgresql/step1_create_user.png +0 -0
  121. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/postgresql/step2_connection.png +0 -0
  122. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/posthog/step1_project_settings.png +0 -0
  123. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/posthog/step2_personal_api_keys.png +0 -0
  124. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/posthog/step3_create_key_modal.png +0 -0
  125. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/rds/step1_connect.png +0 -0
  126. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/rds/step2_create_user.png +0 -0
  127. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/rds/step3_grant.png +0 -0
  128. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/rds/step4_info.png +0 -0
  129. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/sentry/step1_personal_tokens.png +0 -0
  130. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/sentry/step2_create_token_permissions.png +0 -0
  131. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/sentry/step3_organization_slug.png +0 -0
  132. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/sentry/step4_project_slug.png +0 -0
  133. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/vercel/step1_tokens_page.png +0 -0
  134. package/vendor/aarch64-apple-darwin/runtime/dashboard/images/vercel/step2_configure_token.png +0 -0
  135. package/vendor/aarch64-apple-darwin/runtime/dashboard/index.html +47 -0
  136. package/vendor/aarch64-apple-darwin/runtime/dashboard/onequery.svg +44 -0
  137. package/vendor/aarch64-apple-darwin/runtime/migrations/20260327065242_curious_nightmare.sql +403 -0
  138. package/vendor/aarch64-apple-darwin/runtime/migrations/20260403103652_slippery_hellfire_club.sql +8 -0
  139. package/vendor/aarch64-apple-darwin/runtime/migrations/20260403112219_gigantic_namora.sql +1 -0
  140. package/vendor/aarch64-apple-darwin/runtime/migrations/20260420071232_previous_justin_hammer.sql +141 -0
  141. package/vendor/aarch64-apple-darwin/runtime/migrations/20260420093157_spooky_cassandra_nova.sql +29 -0
  142. package/vendor/aarch64-apple-darwin/runtime/migrations/20260420101631_even_ogun.sql +5 -0
  143. package/vendor/aarch64-apple-darwin/runtime/migrations/20260425110519_smart_amazoness.sql +8 -0
  144. package/vendor/aarch64-apple-darwin/runtime/migrations/20260428033542_rename_source_query_interface_missing.sql +36 -0
  145. package/vendor/aarch64-apple-darwin/runtime/migrations/20260430114113_jittery_scorpion.sql +28 -0
  146. package/vendor/aarch64-apple-darwin/runtime/migrations/20260430135906_flippant_timeslip.sql +4 -0
  147. package/vendor/aarch64-apple-darwin/runtime/migrations/20260502000100_drop_old_workflow_audit_tables.sql +15 -0
  148. package/vendor/aarch64-apple-darwin/runtime/migrations/20260503011110_moaning_jack_flag.sql +22 -0
  149. package/vendor/aarch64-apple-darwin/runtime/migrations/20260514143216_reset_workflow_audit_history.sql +20 -0
  150. package/vendor/aarch64-apple-darwin/runtime/migrations/20260524081943_colorful_firelord.sql +1 -0
  151. package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260327065242_snapshot.json +2817 -0
  152. package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260403103652_snapshot.json +2864 -0
  153. package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260403112219_snapshot.json +2870 -0
  154. package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260420071232_snapshot.json +3879 -0
  155. package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260420093157_snapshot.json +4088 -0
  156. package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260420101631_snapshot.json +3250 -0
  157. package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260425110519_snapshot.json +3250 -0
  158. package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260428033542_snapshot.json +3250 -0
  159. package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260430114113_snapshot.json +3507 -0
  160. package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260430135906_snapshot.json +3531 -0
  161. package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260503011110_snapshot.json +3089 -0
  162. package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260524081943_snapshot.json +3082 -0
  163. package/vendor/aarch64-apple-darwin/runtime/migrations/meta/_journal.json +104 -0
  164. package/vendor/aarch64-apple-darwin/runtime/pglite/initdb.wasm +0 -0
  165. package/vendor/aarch64-apple-darwin/runtime/pglite/pglite.data +0 -0
  166. package/vendor/aarch64-apple-darwin/runtime/pglite/pglite.wasm +0 -0
  167. package/vendor/aarch64-apple-darwin/server/onequery-server.mjs +447932 -0
  168. package/vendor/aarch64-apple-darwin/server/polyglot_sql_wasm_bg.wasm +0 -0
  169. package/bin/onequery.js +0 -266
  170. package/bin/package-constants.d.ts +0 -75
  171. package/bin/package-constants.js +0 -160
  172. package/runtime-bundle.json +0 -55
package/bin/onequery.js DELETED
@@ -1,266 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { spawn } from "node:child_process";
4
- import { chmodSync, existsSync, readFileSync, statSync } from "node:fs";
5
- import { createRequire } from "node:module";
6
- import path from "node:path";
7
- import { fileURLToPath } from "node:url";
8
-
9
- import {
10
- CLI_BINARY_NAME,
11
- CLI_PACKAGE_NAME,
12
- PLATFORM_PACKAGE_BY_TARGET,
13
- binaryNameForPlatform,
14
- resolveTargetTriple,
15
- resolveTargetTripleCandidates,
16
- } from "./package-constants.js";
17
-
18
- const launcherFilePath = fileURLToPath(import.meta.url);
19
- const launcherDir = path.dirname(launcherFilePath);
20
- const require = createRequire(import.meta.url);
21
- const runtimeBundleSpec = readRuntimeBundleSpec(resolveRuntimeBundleSpecPath());
22
-
23
- const { platform, arch } = process;
24
- const targetTriple = resolveTargetTriple(platform, arch);
25
- const targetTripleCandidates = resolveTargetTripleCandidates(platform, arch);
26
- const binaryName = binaryNameForPlatform(platform, CLI_BINARY_NAME);
27
-
28
- // CONTEXT: platform packages are installed through npm alias names so the
29
- // launcher resolves the alias folder, not the underlying published package id.
30
- const localVendorRoot = path.join(launcherDir, "..", "vendor");
31
- const resolvedVendor = resolveVendorPayload({
32
- binaryName,
33
- localVendorRoot,
34
- runtimeBundleSpec,
35
- targetTripleCandidates,
36
- });
37
-
38
- if (!resolvedVendor) {
39
- const preferredPackage = PLATFORM_PACKAGE_BY_TARGET[targetTriple];
40
- const packageManager = detectPackageManager();
41
- const reinstallCommand =
42
- packageManager === "bun"
43
- ? `bun install -g ${CLI_PACKAGE_NAME}@latest`
44
- : `npm install -g ${CLI_PACKAGE_NAME}@latest`;
45
-
46
- if (preferredPackage) {
47
- throw new Error(
48
- `Missing optional dependency ${preferredPackage}. Reinstall OneQuery CLI: ${reinstallCommand}`
49
- );
50
- }
51
-
52
- throw new Error(`Unsupported target triple: ${targetTriple}`);
53
- }
54
-
55
- const { binaryPath, bundleRoot } = resolvedVendor;
56
- const packageManagerEnvVar =
57
- detectPackageManager() === "bun"
58
- ? "ONEQUERY_MANAGED_BY_BUN"
59
- : "ONEQUERY_MANAGED_BY_NPM";
60
-
61
- if (platform !== "win32") {
62
- ensureExecutable(binaryPath);
63
- }
64
-
65
- const child = spawn(binaryPath, process.argv.slice(2), {
66
- env: {
67
- ...process.env,
68
- [packageManagerEnvVar]: "1",
69
- [runtimeBundleSpec.runtimeRootEnvVar]:
70
- process.env[runtimeBundleSpec.runtimeRootEnvVar] ?? bundleRoot,
71
- },
72
- stdio: "inherit",
73
- });
74
-
75
- child.on("error", (error) => {
76
- console.error(error);
77
- process.exit(1);
78
- });
79
-
80
- const forwardSignal = (signal) => {
81
- if (child.killed) {
82
- return;
83
- }
84
-
85
- try {
86
- child.kill(signal);
87
- } catch {
88
- // Ignore forwarding failures if the child already exited.
89
- }
90
- };
91
-
92
- ["SIGINT", "SIGTERM", "SIGHUP"].forEach((signal) => {
93
- process.on(signal, () => forwardSignal(signal));
94
- });
95
-
96
- const childResult = await new Promise((resolve) => {
97
- child.on("exit", (code, signal) => {
98
- if (signal) {
99
- resolve({ signal, type: "signal" });
100
- return;
101
- }
102
-
103
- resolve({ exitCode: code ?? 1, type: "code" });
104
- });
105
- });
106
-
107
- if (childResult.type === "signal") {
108
- process.kill(process.pid, childResult.signal);
109
- } else {
110
- process.exit(childResult.exitCode);
111
- }
112
-
113
- function detectPackageManager() {
114
- const userAgent = process.env.npm_config_user_agent ?? "";
115
- if (/\bbun\//u.test(userAgent)) {
116
- return "bun";
117
- }
118
-
119
- const execPath = process.env.npm_execpath ?? "";
120
- if (execPath.includes("bun")) {
121
- return "bun";
122
- }
123
-
124
- if (
125
- launcherDir.includes(".bun/install/global") ||
126
- launcherDir.includes(".bun\\install\\global")
127
- ) {
128
- return "bun";
129
- }
130
-
131
- return userAgent ? "npm" : null;
132
- }
133
-
134
- function resolveVendorPayload({
135
- binaryName,
136
- localVendorRoot,
137
- runtimeBundleSpec,
138
- targetTripleCandidates,
139
- }) {
140
- for (const candidateTargetTriple of targetTripleCandidates) {
141
- const localBundle = resolveBundlePaths({
142
- binaryName,
143
- bundleRoot: path.join(localVendorRoot, candidateTargetTriple),
144
- runtimeBundleSpec,
145
- });
146
-
147
- const platformPackage = PLATFORM_PACKAGE_BY_TARGET[candidateTargetTriple];
148
- if (platformPackage) {
149
- try {
150
- const packageJsonPath = require.resolve(
151
- `${platformPackage}/package.json`
152
- );
153
- const resolvedVendorRoot = path.join(
154
- path.dirname(packageJsonPath),
155
- "vendor"
156
- );
157
- const packagedBundle = resolveBundlePaths({
158
- binaryName,
159
- bundleRoot: path.join(resolvedVendorRoot, candidateTargetTriple),
160
- runtimeBundleSpec,
161
- });
162
- if (packagedBundle) {
163
- return {
164
- ...packagedBundle,
165
- };
166
- }
167
- } catch {
168
- // Keep checking fallback targets and local vendor payloads.
169
- }
170
- }
171
-
172
- if (localBundle) {
173
- return {
174
- ...localBundle,
175
- };
176
- }
177
- }
178
-
179
- return null;
180
- }
181
-
182
- function resolveBundlePaths({ binaryName, bundleRoot, runtimeBundleSpec }) {
183
- const binaryPath = path.join(
184
- bundleRoot,
185
- runtimeBundleSpec.directories.cli.relativePath,
186
- binaryName
187
- );
188
- if (!existsSync(binaryPath)) {
189
- return null;
190
- }
191
-
192
- return {
193
- binaryPath,
194
- bundleRoot,
195
- };
196
- }
197
-
198
- function resolveRuntimeBundleSpecPath() {
199
- const packagedSpecPath = path.join(launcherDir, "..", "runtime-bundle.json");
200
- if (existsSync(packagedSpecPath)) {
201
- return packagedSpecPath;
202
- }
203
-
204
- // Comment: local workspace execution reads the canonical bundle spec from the
205
- // repo; published npm packages ship the same file at the package root.
206
- return path.join(
207
- launcherDir,
208
- "..",
209
- "..",
210
- "..",
211
- "packages",
212
- "base",
213
- "src",
214
- "runtime-bundle.json"
215
- );
216
- }
217
-
218
- function readRuntimeBundleSpec(specPath) {
219
- let parsed;
220
- try {
221
- parsed = JSON.parse(readFileSync(specPath, "utf8"));
222
- } catch (error) {
223
- throw new Error(
224
- `Failed to read runtime bundle spec at ${specPath}: ${error instanceof Error ? error.message : String(error)}`,
225
- { cause: error }
226
- );
227
- }
228
-
229
- const runtimeRootEnvVar = readNonEmptyString(parsed?.runtimeRootEnvVar);
230
- const cliRelativePath = readNonEmptyString(
231
- parsed?.directories?.cli?.relativePath
232
- );
233
- const serverRelativePath = readNonEmptyString(
234
- parsed?.directories?.server?.relativePath
235
- );
236
- if (!runtimeRootEnvVar || !cliRelativePath || !serverRelativePath) {
237
- throw new Error(`Invalid runtime bundle spec at ${specPath}.`);
238
- }
239
-
240
- return {
241
- directories: {
242
- cli: {
243
- relativePath: cliRelativePath,
244
- },
245
- server: {
246
- relativePath: serverRelativePath,
247
- },
248
- },
249
- runtimeRootEnvVar,
250
- };
251
- }
252
-
253
- function readNonEmptyString(value) {
254
- return typeof value === "string" && value.length > 0 ? value : null;
255
- }
256
-
257
- function ensureExecutable(filePath) {
258
- const currentMode = statSync(filePath).mode & 0o777;
259
- if ((currentMode & 0o111) !== 0) {
260
- return;
261
- }
262
-
263
- // CONTEXT: npm tarballs store vendored native binaries without execute bits,
264
- // so restore the expected mode before spawning the packaged CLI binary.
265
- chmodSync(filePath, currentMode | 0o755);
266
- }
@@ -1,75 +0,0 @@
1
- export type TargetTriple =
2
- | "x86_64-unknown-linux-musl"
3
- | "aarch64-unknown-linux-musl"
4
- | "x86_64-apple-darwin"
5
- | "aarch64-apple-darwin"
6
- | "x86_64-pc-windows-msvc"
7
- | "aarch64-pc-windows-msvc"
8
- | "x86_64-unknown-linux-gnu"
9
- | "aarch64-unknown-linux-gnu";
10
-
11
- export type NpmTargetTriple = Exclude<
12
- TargetTriple,
13
- "x86_64-unknown-linux-gnu" | "aarch64-unknown-linux-gnu"
14
- >;
15
-
16
- export type RuntimePlatform = "linux" | "android" | "darwin" | "win32";
17
- export type RuntimeArch = "x64" | "arm64";
18
-
19
- export type PlatformPackage = {
20
- optionalDependencyName: string;
21
- npmTag: string;
22
- targetTriple: NpmTargetTriple;
23
- os: "linux" | "darwin" | "win32";
24
- cpu: RuntimeArch;
25
- };
26
-
27
- export type ReleasePlatformPackage = {
28
- optionalDependencyName: string | null;
29
- npmTag: string;
30
- targetTriple: TargetTriple;
31
- os: "linux" | "darwin" | "win32";
32
- cpu: RuntimeArch;
33
- };
34
-
35
- export const CLI_PACKAGE_NAME: "@onequery/cli";
36
- export const CLI_BINARY_NAME: "onequery";
37
- export const CLI_SERVER_BUNDLE_FILENAME: "onequery-server.mjs";
38
- export const CLI_NPM_TARBALL_PREFIX: "onequery-npm";
39
- export const CLI_NPM_STAGE_DIR_PREFIX: `${typeof CLI_NPM_TARBALL_PREFIX}-stage-`;
40
- export const CLI_NPM_PACK_DIR_PREFIX: `${typeof CLI_NPM_TARBALL_PREFIX}-pack-`;
41
- export const CLI_STAGE_PACKAGE_DIR_PREFIX: "onequery-cli-";
42
-
43
- export const PLATFORM_PACKAGES: Record<string, PlatformPackage>;
44
- export const EXTRA_RELEASE_PLATFORM_PACKAGES: Record<
45
- string,
46
- ReleasePlatformPackage
47
- >;
48
- export const RELEASE_PLATFORM_PACKAGES: Record<string, ReleasePlatformPackage>;
49
- export const PLATFORM_PACKAGE_BY_TARGET: Record<NpmTargetTriple, string>;
50
-
51
- export function serverBundleFilenameForTargetTriple(
52
- targetTriple: TargetTriple
53
- ): string;
54
-
55
- export function packageStagingDirPrefix(packageName: string): string;
56
-
57
- export function binaryNameForPlatform(
58
- platform: RuntimePlatform | string,
59
- baseName: string
60
- ): string;
61
-
62
- export function binaryNameForTargetTriple(
63
- targetTriple: TargetTriple | string,
64
- baseName: string
65
- ): string;
66
-
67
- export function resolveTargetTripleCandidates(
68
- platform: RuntimePlatform | string,
69
- arch: RuntimeArch | string
70
- ): TargetTriple[];
71
-
72
- export function resolveTargetTriple(
73
- platform: RuntimePlatform | string,
74
- arch: RuntimeArch | string
75
- ): TargetTriple;
@@ -1,160 +0,0 @@
1
- export const CLI_PACKAGE_NAME = "@onequery/cli";
2
- export const CLI_BINARY_NAME = "onequery";
3
- export const CLI_SERVER_BUNDLE_FILENAME = "onequery-server.mjs";
4
- export const CLI_NPM_TARBALL_PREFIX = "onequery-npm";
5
- export const CLI_NPM_STAGE_DIR_PREFIX = `${CLI_NPM_TARBALL_PREFIX}-stage-`;
6
- export const CLI_NPM_PACK_DIR_PREFIX = `${CLI_NPM_TARBALL_PREFIX}-pack-`;
7
- export const CLI_STAGE_PACKAGE_DIR_PREFIX = "onequery-cli-";
8
-
9
- export const PLATFORM_PACKAGES = {
10
- "cli-darwin-arm64": {
11
- optionalDependencyName: "onequery-darwin-arm64",
12
- npmTag: "darwin-arm64",
13
- targetTriple: "aarch64-apple-darwin",
14
- os: "darwin",
15
- cpu: "arm64",
16
- },
17
- "cli-darwin-x64": {
18
- optionalDependencyName: "onequery-darwin-x64",
19
- npmTag: "darwin-x64",
20
- targetTriple: "x86_64-apple-darwin",
21
- os: "darwin",
22
- cpu: "x64",
23
- },
24
- "cli-linux-arm64": {
25
- optionalDependencyName: "onequery-linux-arm64",
26
- npmTag: "linux-arm64",
27
- targetTriple: "aarch64-unknown-linux-musl",
28
- os: "linux",
29
- cpu: "arm64",
30
- },
31
- "cli-linux-x64": {
32
- optionalDependencyName: "onequery-linux-x64",
33
- npmTag: "linux-x64",
34
- targetTriple: "x86_64-unknown-linux-musl",
35
- os: "linux",
36
- cpu: "x64",
37
- },
38
- "cli-win32-arm64": {
39
- optionalDependencyName: "onequery-win32-arm64",
40
- npmTag: "win32-arm64",
41
- targetTriple: "aarch64-pc-windows-msvc",
42
- os: "win32",
43
- cpu: "arm64",
44
- },
45
- "cli-win32-x64": {
46
- optionalDependencyName: "onequery-win32-x64",
47
- npmTag: "win32-x64",
48
- targetTriple: "x86_64-pc-windows-msvc",
49
- os: "win32",
50
- cpu: "x64",
51
- },
52
- };
53
-
54
- export const EXTRA_RELEASE_PLATFORM_PACKAGES = {
55
- // COMMENT: Keep GNU Linux release tarballs available on GitHub Releases
56
- // without adding glibc-specific optional dependencies to the npm install
57
- // path. The launcher falls back to these local vendor payloads when present.
58
- "cli-linux-arm64-gnu": {
59
- optionalDependencyName: null,
60
- npmTag: "linux-arm64-gnu",
61
- targetTriple: "aarch64-unknown-linux-gnu",
62
- os: "linux",
63
- cpu: "arm64",
64
- },
65
- "cli-linux-x64-gnu": {
66
- optionalDependencyName: null,
67
- npmTag: "linux-x64-gnu",
68
- targetTriple: "x86_64-unknown-linux-gnu",
69
- os: "linux",
70
- cpu: "x64",
71
- },
72
- };
73
-
74
- export const RELEASE_PLATFORM_PACKAGES = {
75
- ...PLATFORM_PACKAGES,
76
- ...EXTRA_RELEASE_PLATFORM_PACKAGES,
77
- };
78
-
79
- export const PLATFORM_PACKAGE_BY_TARGET = Object.fromEntries(
80
- Object.values(PLATFORM_PACKAGES).map((platformPackage) => [
81
- platformPackage.targetTriple,
82
- platformPackage.optionalDependencyName,
83
- ])
84
- );
85
-
86
- export function serverBundleFilenameForTargetTriple(targetTriple) {
87
- switch (targetTriple) {
88
- case "aarch64-apple-darwin":
89
- case "aarch64-unknown-linux-musl":
90
- case "aarch64-unknown-linux-gnu":
91
- case "aarch64-pc-windows-msvc":
92
- case "x86_64-apple-darwin":
93
- case "x86_64-unknown-linux-musl":
94
- case "x86_64-unknown-linux-gnu":
95
- case "x86_64-pc-windows-msvc":
96
- return CLI_SERVER_BUNDLE_FILENAME;
97
- default:
98
- throw new Error(`Unsupported server target triple '${targetTriple}'.`);
99
- }
100
- }
101
-
102
- export function packageStagingDirPrefix(packageName) {
103
- return `${CLI_STAGE_PACKAGE_DIR_PREFIX}${packageName}-`;
104
- }
105
-
106
- export function binaryNameForPlatform(platform, baseName) {
107
- return platform === "win32" ? `${baseName}.exe` : baseName;
108
- }
109
-
110
- export function binaryNameForTargetTriple(targetTriple, baseName) {
111
- return targetTriple.includes("-windows-") ? `${baseName}.exe` : baseName;
112
- }
113
-
114
- export function resolveTargetTripleCandidates(platform, arch) {
115
- switch (platform) {
116
- case "linux":
117
- case "android": {
118
- switch (arch) {
119
- case "x64":
120
- return ["x86_64-unknown-linux-musl", "x86_64-unknown-linux-gnu"];
121
- case "arm64":
122
- return ["aarch64-unknown-linux-musl", "aarch64-unknown-linux-gnu"];
123
- default:
124
- break;
125
- }
126
- break;
127
- }
128
- case "darwin": {
129
- switch (arch) {
130
- case "x64":
131
- return ["x86_64-apple-darwin"];
132
- case "arm64":
133
- return ["aarch64-apple-darwin"];
134
- default:
135
- break;
136
- }
137
- break;
138
- }
139
- case "win32": {
140
- switch (arch) {
141
- case "x64":
142
- return ["x86_64-pc-windows-msvc"];
143
- case "arm64":
144
- return ["aarch64-pc-windows-msvc"];
145
- default:
146
- break;
147
- }
148
- break;
149
- }
150
- default: {
151
- break;
152
- }
153
- }
154
-
155
- throw new Error(`Unsupported platform: ${platform} (${arch})`);
156
- }
157
-
158
- export function resolveTargetTriple(platform, arch) {
159
- return resolveTargetTripleCandidates(platform, arch)[0];
160
- }
@@ -1,55 +0,0 @@
1
- {
2
- "manifestVersion": 1,
3
- "runtimeRootEnvVar": "ONEQUERY_RUNTIME_ROOT",
4
- "directories": {
5
- "cli": {
6
- "relativePath": "onequery"
7
- },
8
- "server": {
9
- "relativePath": "server"
10
- }
11
- },
12
- "runtimeEntries": {
13
- "migrations": {
14
- "relativePath": "runtime/migrations"
15
- },
16
- "webDist": {
17
- "relativePath": "runtime/dashboard",
18
- "requiredFile": "index.html"
19
- }
20
- },
21
- "runtimeAssetFamilies": {
22
- "pglite": {
23
- "buildOwnerPackage": "@onequery/db",
24
- "buildSource": {
25
- "kind": "package-entrypoint-directory",
26
- "packageSpecifier": "@electric-sql/pglite"
27
- },
28
- "files": {
29
- "pgliteWasm": {
30
- "filename": "pglite.wasm"
31
- },
32
- "initdbWasm": {
33
- "filename": "initdb.wasm"
34
- },
35
- "fsBundle": {
36
- "filename": "pglite.data"
37
- }
38
- },
39
- "packagedPath": "runtime/pglite"
40
- },
41
- "polyglotSql": {
42
- "buildOwnerPackage": "@onequery/server",
43
- "buildSource": {
44
- "kind": "package-entrypoint-directory",
45
- "packageSpecifier": "@polyglot-sql/sdk"
46
- },
47
- "files": {
48
- "wasm": {
49
- "filename": "polyglot_sql_wasm_bg.wasm"
50
- }
51
- },
52
- "packagedPath": "server"
53
- }
54
- }
55
- }