@fragment-dev/cli 2026.11.12 → 2026.11.13-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.
Files changed (82) hide show
  1. package/README.md +22 -1
  2. package/dist/{chunk-6H5VEWMH.js → chunk-2EMLJCCB.js} +1 -1
  3. package/dist/{chunk-PBOTSYWN.js → chunk-3CJRW6UH.js} +1 -1
  4. package/dist/{chunk-EUEC2RGK.js → chunk-3DAS3OFL.js} +2 -2
  5. package/dist/{chunk-DNAQPTVA.js → chunk-4LUAFIF5.js} +2 -2
  6. package/dist/{chunk-AY5LBONU.js → chunk-562FOENG.js} +2 -2
  7. package/dist/{chunk-PWOJYW62.js → chunk-5S53QKWI.js} +2 -2
  8. package/dist/{chunk-5F2PJ2LT.js → chunk-6SLKFJ3R.js} +1 -1
  9. package/dist/{chunk-77TG73N3.js → chunk-BOA4W5UK.js} +2 -2
  10. package/dist/{chunk-6MYCJAJL.js → chunk-CCIMF5G2.js} +2 -2
  11. package/dist/{chunk-D46OZVDM.js → chunk-CCJ6B7IM.js} +2 -2
  12. package/dist/{chunk-GNPKIMSW.js → chunk-CE5IRGV2.js} +3 -3
  13. package/dist/{chunk-ECRNMUZY.js → chunk-EKZUX3W4.js} +1 -1
  14. package/dist/{chunk-UYGNB7UR.js → chunk-F5CCJ6FF.js} +1 -1
  15. package/dist/{chunk-D47P74VC.js → chunk-FCPIWNB2.js} +27 -27
  16. package/dist/{chunk-S6EUZBEH.js → chunk-FMDJEY4R.js} +1 -1
  17. package/dist/{chunk-WABMYMTO.js → chunk-GR3GGYJY.js} +2 -2
  18. package/dist/{chunk-IGBICJSY.js → chunk-HT3U4M2Y.js} +1 -1
  19. package/dist/{chunk-HII7DWWZ.js → chunk-IPDXXZMM.js} +2 -2
  20. package/dist/{chunk-V3LLFTBC.js → chunk-JDYOG2HA.js} +1 -1
  21. package/dist/{chunk-OPMMPSLX.js → chunk-JELZBFKQ.js} +1 -1
  22. package/dist/{chunk-NHBFVBGA.js → chunk-JSS43ARW.js} +3 -3
  23. package/dist/{chunk-ZYFQDN2K.js → chunk-MB3FR4WL.js} +28 -4
  24. package/dist/{chunk-IUDVJMWC.js → chunk-MZLYFF2A.js} +1 -1
  25. package/dist/chunk-NEW2NRYM.js +46 -0
  26. package/dist/{chunk-DFBITJLK.js → chunk-OFNXU6XT.js} +1 -1
  27. package/dist/{chunk-EO6QNP4N.js → chunk-PCDWKMX2.js} +3 -3
  28. package/dist/{chunk-77SONGBG.js → chunk-Q7Z3H3GL.js} +2 -2
  29. package/dist/{chunk-5WAZAXOW.js → chunk-RF23UYTV.js} +2 -2
  30. package/dist/{chunk-6QJ3ZC6M.js → chunk-S4VUE6OA.js} +1 -1
  31. package/dist/{chunk-Q2E43BUP.js → chunk-U5ZBL6S4.js} +2 -2
  32. package/dist/{chunk-H2RK3NKQ.js → chunk-VXYOFJKR.js} +2 -2
  33. package/dist/{chunk-DYLKAHKE.js → chunk-WAU6SFQ5.js} +7 -1
  34. package/dist/{chunk-RHL6MOZS.js → chunk-WS34FKDX.js} +3 -3
  35. package/dist/{chunk-CTS34CX4.js → chunk-XF4UMVYD.js} +2 -2
  36. package/dist/{chunk-GJZISVDV.js → chunk-XREGFKSL.js} +2 -2
  37. package/dist/{chunk-35PT2VZ6.js → chunk-XT7X5Z7E.js} +2 -2
  38. package/dist/{chunk-G3IDF3GN.js → chunk-YWITUQIX.js} +1 -1
  39. package/dist/{chunk-SLD5GAXB.js → chunk-Z5SFM3A5.js} +1 -1
  40. package/dist/{chunk-VETXOSAQ.js → chunk-Z65KYV6Z.js} +2 -2
  41. package/dist/{chunk-CI336LA7.js → chunk-ZPU5TX3B.js} +1 -1
  42. package/dist/commands/add-ledger-entry.js +5 -4
  43. package/dist/commands/api-client/create.js +4 -3
  44. package/dist/commands/create-custom-link.js +5 -4
  45. package/dist/commands/create-ledger.js +5 -4
  46. package/dist/commands/delete-custom-txs.js +5 -4
  47. package/dist/commands/delete-ledger.js +5 -4
  48. package/dist/commands/delete-schema.js +5 -4
  49. package/dist/commands/gen-graphql.js +5 -4
  50. package/dist/commands/get-schema.js +6 -5
  51. package/dist/commands/init.js +4 -3
  52. package/dist/commands/login.js +5 -4
  53. package/dist/commands/migrate-ledger-entry.js +5 -4
  54. package/dist/commands/print-schema.js +7 -6
  55. package/dist/commands/query/ledgerAccounts.js +5 -4
  56. package/dist/commands/query/ledgers.js +5 -4
  57. package/dist/commands/query/schema.js +5 -4
  58. package/dist/commands/query/schemas.js +5 -4
  59. package/dist/commands/reverse-ledger-entry.js +5 -4
  60. package/dist/commands/simulate-scenario.js +7 -6
  61. package/dist/commands/start.js +4 -3
  62. package/dist/commands/store-schema.js +5 -4
  63. package/dist/commands/token.js +5 -4
  64. package/dist/commands/update-ledger-account.js +5 -4
  65. package/dist/commands/update.js +5 -4
  66. package/dist/commands/verify-schema.js +7 -6
  67. package/dist/commands/version.js +4 -3
  68. package/dist/commands/workspace.js +5 -4
  69. package/dist/commands.js +40 -39
  70. package/dist/index.js +40 -39
  71. package/dist/lib/authenticatedCommand.js +4 -3
  72. package/dist/lib/baseCommand.js +3 -2
  73. package/dist/lib/curl.js +13 -0
  74. package/dist/lib/version.js +2 -1
  75. package/dist/utils/formatChartOfAccounts.js +2 -2
  76. package/dist/utils/formatEntries.js +2 -2
  77. package/dist/utils/formatScenarioAccountBalances.js +2 -2
  78. package/dist/utils/formatScenarioBalances.js +3 -3
  79. package/dist/utils/schemaBackCompat.js +3 -3
  80. package/dist/utils/schemaValidation.js +2 -2
  81. package/oclif.manifest.json +2 -2
  82. package/package.json +1 -1
package/README.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  [Fragment](https://fragment.dev) is the Ledger API for engineers that move money. Stop wrangling payment tables, debugging balance errors and hacking together data pipelines. Start shipping the features that make a difference.
4
4
 
5
+ ## Installation
6
+
7
+ NPM
8
+
9
+ ```bash
10
+ npm install -g @fragment-dev/cli
11
+ ```
12
+
13
+ [Homebrew](https://brew.sh/)
14
+
15
+ ```bash
16
+ brew tap fragment-dev/tap
17
+ brew install fragment-dev/tap/fragment-cli
18
+ ```
19
+
20
+ Update an existing installation:
21
+
22
+ ```bash
23
+ fragment update
24
+ ```
25
+
5
26
  # Commands
6
27
 
7
28
  ## Browser login for new users
@@ -209,7 +230,7 @@ DESCRIPTION
209
230
  Create a Custom Link
210
231
 
211
232
  This mirrors the CreateCustomLink API endpoint.
212
- Read https://fragment.dev/guides/sync-payments#custom-link-onboarding to learn more about Custom Links.
233
+ Read https://fragment.dev/docs/sync-payments#custom-link-onboarding to learn more about Custom Links.
213
234
 
214
235
  EXAMPLES
215
236
  $ fragment create-custom-link --ik <ik> --name <name>
@@ -13,7 +13,7 @@ import {
13
13
  require_syntax,
14
14
  require_type,
15
15
  require_uri
16
- } from "./chunk-ZYFQDN2K.js";
16
+ } from "./chunk-MB3FR4WL.js";
17
17
  import {
18
18
  require_color_convert,
19
19
  require_source
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-OPMMPSLX.js";
3
+ } from "./chunk-JELZBFKQ.js";
4
4
  import {
5
5
  init_cjs_shims
6
6
  } from "./chunk-7GH3YGSC.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  formatScenarioBalances
3
- } from "./chunk-DNAQPTVA.js";
3
+ } from "./chunk-4LUAFIF5.js";
4
4
  import {
5
5
  DEFAULT_SCHEMA_PATH
6
6
  } from "./chunk-A4BSWX5D.js";
7
7
  import {
8
8
  FragmentCommand,
9
9
  require_lib
10
- } from "./chunk-ZYFQDN2K.js";
10
+ } from "./chunk-MB3FR4WL.js";
11
11
  import {
12
12
  getParsedSchemaString,
13
13
  parseJSON
@@ -7,7 +7,7 @@ import {
7
7
  generateSimulatingEntry,
8
8
  lil_id_default,
9
9
  makeLineKey
10
- } from "./chunk-UYGNB7UR.js";
10
+ } from "./chunk-F5CCJ6FF.js";
11
11
  import {
12
12
  formatBalance,
13
13
  getBalancePrecision
@@ -33,7 +33,7 @@ import {
33
33
  validateLedgerConsistencySettings,
34
34
  validatePaymentEntry,
35
35
  z as z2
36
- } from "./chunk-6QJ3ZC6M.js";
36
+ } from "./chunk-S4VUE6OA.js";
37
37
  import {
38
38
  BaseSchema,
39
39
  PaymentAccountingEventKey,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-OPMMPSLX.js";
3
+ } from "./chunk-JELZBFKQ.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-ZYFQDN2K.js";
6
+ } from "./chunk-MB3FR4WL.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-QDAKBUNO.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-OPMMPSLX.js";
3
+ } from "./chunk-JELZBFKQ.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-ZYFQDN2K.js";
6
+ } from "./chunk-MB3FR4WL.js";
7
7
  import {
8
8
  getParsedSchema
9
9
  } from "./chunk-QZNZYG2G.js";
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-T3RKAA7V.js";
8
8
  import {
9
9
  ChartOfAccounts
10
- } from "./chunk-6QJ3ZC6M.js";
10
+ } from "./chunk-S4VUE6OA.js";
11
11
  import {
12
12
  BaseSchema
13
13
  } from "./chunk-JTGVX5GX.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-OPMMPSLX.js";
3
+ } from "./chunk-JELZBFKQ.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-ZYFQDN2K.js";
6
+ } from "./chunk-MB3FR4WL.js";
7
7
  import {
8
8
  __toESM,
9
9
  init_cjs_shims
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-OPMMPSLX.js";
3
+ } from "./chunk-JELZBFKQ.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-ZYFQDN2K.js";
6
+ } from "./chunk-MB3FR4WL.js";
7
7
  import {
8
8
  getParsedSchema
9
9
  } from "./chunk-QZNZYG2G.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-OPMMPSLX.js";
3
+ } from "./chunk-JELZBFKQ.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-ZYFQDN2K.js";
6
+ } from "./chunk-MB3FR4WL.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-QDAKBUNO.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-OPMMPSLX.js";
3
+ } from "./chunk-JELZBFKQ.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-ZYFQDN2K.js";
6
+ } from "./chunk-MB3FR4WL.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-QDAKBUNO.js";
@@ -25,7 +25,7 @@ var CreateCustomLink = class extends AuthenticatedCommand {
25
25
  "CreateCustomLink"
26
26
  )} API endpoint.
27
27
  Read ${import_chalk.default.blueBright(
28
- "https://fragment.dev/guides/sync-payments#custom-link-onboarding"
28
+ "https://fragment.dev/docs/sync-payments#custom-link-onboarding"
29
29
  )} to learn more about Custom Links.`;
30
30
  }
31
31
  static {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-OPMMPSLX.js";
3
+ } from "./chunk-JELZBFKQ.js";
4
4
  import {
5
5
  init_cjs_shims
6
6
  } from "./chunk-7GH3YGSC.js";
@@ -10,7 +10,7 @@ import {
10
10
  parameterizeSchemaLedgerEntryConditionInput,
11
11
  parameterizeSchemaLedgerLineInput,
12
12
  reparameterizeSchemaLedgerAccountInput
13
- } from "./chunk-6QJ3ZC6M.js";
13
+ } from "./chunk-S4VUE6OA.js";
14
14
  import {
15
15
  getStructuralPath
16
16
  } from "./chunk-2QGAXOCF.js";
@@ -1,84 +1,84 @@
1
1
  import {
2
2
  Update
3
- } from "./chunk-WABMYMTO.js";
3
+ } from "./chunk-GR3GGYJY.js";
4
4
  import {
5
5
  VerifySchema
6
- } from "./chunk-RHL6MOZS.js";
6
+ } from "./chunk-WS34FKDX.js";
7
7
  import {
8
8
  Version
9
- } from "./chunk-CI336LA7.js";
9
+ } from "./chunk-ZPU5TX3B.js";
10
10
  import {
11
11
  Workspace
12
- } from "./chunk-IGBICJSY.js";
12
+ } from "./chunk-HT3U4M2Y.js";
13
13
  import {
14
14
  GetSchema as GetSchema2
15
- } from "./chunk-77TG73N3.js";
15
+ } from "./chunk-BOA4W5UK.js";
16
16
  import {
17
17
  QuerySchemas
18
- } from "./chunk-PBOTSYWN.js";
18
+ } from "./chunk-3CJRW6UH.js";
19
19
  import {
20
20
  ReverseLedgerEntry
21
- } from "./chunk-VETXOSAQ.js";
21
+ } from "./chunk-Z65KYV6Z.js";
22
22
  import {
23
23
  SimulateScenario
24
- } from "./chunk-EUEC2RGK.js";
24
+ } from "./chunk-3DAS3OFL.js";
25
25
  import {
26
26
  Start
27
- } from "./chunk-S6EUZBEH.js";
27
+ } from "./chunk-FMDJEY4R.js";
28
28
  import {
29
29
  StoreSchema
30
- } from "./chunk-6MYCJAJL.js";
30
+ } from "./chunk-CCIMF5G2.js";
31
31
  import {
32
32
  Token
33
- } from "./chunk-V3LLFTBC.js";
33
+ } from "./chunk-JDYOG2HA.js";
34
34
  import {
35
35
  UpdateLedgerAccount
36
- } from "./chunk-35PT2VZ6.js";
36
+ } from "./chunk-XT7X5Z7E.js";
37
37
  import {
38
38
  GenGraphQL
39
- } from "./chunk-Q2E43BUP.js";
39
+ } from "./chunk-U5ZBL6S4.js";
40
40
  import {
41
41
  GetSchema
42
- } from "./chunk-EO6QNP4N.js";
42
+ } from "./chunk-PCDWKMX2.js";
43
43
  import {
44
44
  Init
45
- } from "./chunk-SLD5GAXB.js";
45
+ } from "./chunk-Z5SFM3A5.js";
46
46
  import {
47
47
  Login
48
- } from "./chunk-H2RK3NKQ.js";
48
+ } from "./chunk-VXYOFJKR.js";
49
49
  import {
50
50
  MigrateLedgerEntry
51
- } from "./chunk-D46OZVDM.js";
51
+ } from "./chunk-CCJ6B7IM.js";
52
52
  import {
53
53
  PrintSchema
54
- } from "./chunk-NHBFVBGA.js";
54
+ } from "./chunk-JSS43ARW.js";
55
55
  import {
56
56
  QueryLedgerAccounts
57
- } from "./chunk-CTS34CX4.js";
57
+ } from "./chunk-XF4UMVYD.js";
58
58
  import {
59
59
  QueryLedgers
60
- } from "./chunk-ECRNMUZY.js";
60
+ } from "./chunk-EKZUX3W4.js";
61
61
  import {
62
62
  AddLedgerEntry
63
- } from "./chunk-5WAZAXOW.js";
63
+ } from "./chunk-RF23UYTV.js";
64
64
  import {
65
65
  ApiClientCreate
66
- } from "./chunk-G3IDF3GN.js";
66
+ } from "./chunk-YWITUQIX.js";
67
67
  import {
68
68
  CreateCustomLink
69
- } from "./chunk-GNPKIMSW.js";
69
+ } from "./chunk-CE5IRGV2.js";
70
70
  import {
71
71
  CreateLedger
72
- } from "./chunk-PWOJYW62.js";
72
+ } from "./chunk-5S53QKWI.js";
73
73
  import {
74
74
  DeleteCustomTxs
75
- } from "./chunk-AY5LBONU.js";
75
+ } from "./chunk-562FOENG.js";
76
76
  import {
77
77
  DeleteLedger
78
- } from "./chunk-HII7DWWZ.js";
78
+ } from "./chunk-IPDXXZMM.js";
79
79
  import {
80
80
  DeleteSchema
81
- } from "./chunk-GJZISVDV.js";
81
+ } from "./chunk-XREGFKSL.js";
82
82
  import {
83
83
  init_cjs_shims
84
84
  } from "./chunk-7GH3YGSC.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FragmentCommand,
3
3
  require_lib
4
- } from "./chunk-ZYFQDN2K.js";
4
+ } from "./chunk-MB3FR4WL.js";
5
5
  import {
6
6
  require_source
7
7
  } from "./chunk-QDAKBUNO.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  inquirer_default
3
- } from "./chunk-6H5VEWMH.js";
3
+ } from "./chunk-2EMLJCCB.js";
4
4
  import {
5
5
  FragmentCommand,
6
6
  require_lib
7
- } from "./chunk-ZYFQDN2K.js";
7
+ } from "./chunk-MB3FR4WL.js";
8
8
  import {
9
9
  require_source
10
10
  } from "./chunk-QDAKBUNO.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-OPMMPSLX.js";
3
+ } from "./chunk-JELZBFKQ.js";
4
4
  import {
5
5
  init_cjs_shims
6
6
  } from "./chunk-7GH3YGSC.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-OPMMPSLX.js";
3
+ } from "./chunk-JELZBFKQ.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-ZYFQDN2K.js";
6
+ } from "./chunk-MB3FR4WL.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-QDAKBUNO.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-OPMMPSLX.js";
3
+ } from "./chunk-JELZBFKQ.js";
4
4
  import {
5
5
  require_source
6
6
  } from "./chunk-QDAKBUNO.js";
@@ -5,7 +5,7 @@ import {
5
5
  FragmentCommand,
6
6
  GraphQLClient,
7
7
  require_lib
8
- } from "./chunk-ZYFQDN2K.js";
8
+ } from "./chunk-MB3FR4WL.js";
9
9
  import {
10
10
  colorizeJson
11
11
  } from "./chunk-QZNZYG2G.js";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  formatChartOfAccounts
3
- } from "./chunk-IUDVJMWC.js";
3
+ } from "./chunk-MZLYFF2A.js";
4
4
  import {
5
5
  formatEntries
6
- } from "./chunk-5F2PJ2LT.js";
6
+ } from "./chunk-6SLKFJ3R.js";
7
7
  import {
8
8
  DEFAULT_SCHEMA_PATH
9
9
  } from "./chunk-A4BSWX5D.js";
10
10
  import {
11
11
  FragmentCommand,
12
12
  require_lib
13
- } from "./chunk-ZYFQDN2K.js";
13
+ } from "./chunk-MB3FR4WL.js";
14
14
  import {
15
15
  getParsedSchemaString,
16
16
  parseJSON
@@ -5,13 +5,17 @@ import {
5
5
  import {
6
6
  parseJSON
7
7
  } from "./chunk-QZNZYG2G.js";
8
- import {
9
- require_graphql
10
- } from "./chunk-QF5EN33L.js";
11
8
  import {
12
9
  detectInstallationMethodFromPath,
13
10
  getFragmentCliVersion
14
- } from "./chunk-DYLKAHKE.js";
11
+ } from "./chunk-WAU6SFQ5.js";
12
+ import {
13
+ getCurlUpdateArgs,
14
+ hasCurlInstallation
15
+ } from "./chunk-NEW2NRYM.js";
16
+ import {
17
+ require_graphql
18
+ } from "./chunk-QF5EN33L.js";
15
19
  import {
16
20
  require_color_convert,
17
21
  require_has_flag,
@@ -50033,6 +50037,8 @@ var FragmentCommand = class extends import_core.Command {
50033
50037
  }
50034
50038
  }
50035
50039
  detectInstallationMethod() {
50040
+ if (hasCurlInstallation(this.config.root))
50041
+ return "curl";
50036
50042
  if (process.env.FRAGMENT_CLI_TEST_ENV === "true") {
50037
50043
  return "npm";
50038
50044
  }
@@ -50143,6 +50149,24 @@ var FragmentCommand = class extends import_core.Command {
50143
50149
  }) {
50144
50150
  const method = installationMethod ?? this.detectInstallationMethod();
50145
50151
  switch (method) {
50152
+ case "curl": {
50153
+ const version2 = await getFragmentCliVersion(this.isBeta, method);
50154
+ const args = getCurlUpdateArgs({
50155
+ root: this.config.root,
50156
+ version: version2,
50157
+ isBeta: this.isBeta
50158
+ });
50159
+ this.log(`Updating Fragment installed with curl to ${version2}...`);
50160
+ if (!dryRun) {
50161
+ const result = (0, import_cross_spawn.sync)("sh", args, {
50162
+ stdio: "inherit",
50163
+ env: { ...process.env, FRAGMENT_NODE_EXECUTABLE: process.execPath }
50164
+ });
50165
+ if (result.status !== 0)
50166
+ this.exit(1);
50167
+ }
50168
+ break;
50169
+ }
50146
50170
  case "npm":
50147
50171
  this.log("Detected npm installation. Updating via npm...");
50148
50172
  await this.updateViaNpm({ dryRun });
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-4E5LH6UM.js";
8
8
  import {
9
9
  ChartOfAccounts
10
- } from "./chunk-6QJ3ZC6M.js";
10
+ } from "./chunk-S4VUE6OA.js";
11
11
  import {
12
12
  BaseSchema
13
13
  } from "./chunk-JTGVX5GX.js";
@@ -0,0 +1,46 @@
1
+ import {
2
+ init_cjs_shims
3
+ } from "./chunk-7GH3YGSC.js";
4
+
5
+ // src/lib/curl.ts
6
+ init_cjs_shims();
7
+ import assert from "node:assert";
8
+ import { existsSync, readFileSync } from "node:fs";
9
+ import { isAbsolute, join } from "node:path";
10
+ var getCurlReleaseUrl = (isBeta) => `https://${isBeta ? "dev" : "prod"}-fragment-cli-bucket.s3.amazonaws.com/curl`;
11
+ var hasCurlInstallation = (root) => existsSync(join(root, ".fragment-curl"));
12
+ var getCurlUpdateArgs = (args) => {
13
+ const [installDirectory, binDirectory] = readFileSync(
14
+ join(args.root, ".fragment-curl"),
15
+ "utf8"
16
+ ).split("\n");
17
+ assert(
18
+ installDirectory && binDirectory && isAbsolute(installDirectory) && isAbsolute(binDirectory),
19
+ "Invalid curl installation marker; reinstall using https://fragment.dev/install.sh"
20
+ );
21
+ return [
22
+ join(args.root, "install.sh"),
23
+ "--version",
24
+ args.version,
25
+ "--install-dir",
26
+ installDirectory,
27
+ "--bin-dir",
28
+ binDirectory,
29
+ "--base-url",
30
+ getCurlReleaseUrl(args.isBeta)
31
+ ];
32
+ };
33
+ var getCurlCliVersion = async (isBeta) => {
34
+ const response = await fetch(`${getCurlReleaseUrl(isBeta)}/latest`);
35
+ assert(response.ok, `Curl release check failed: HTTP ${response.status}`);
36
+ const version = (await response.text()).trim();
37
+ assert(/^\d[\da-zA-Z.+-]*$/.test(version), "Invalid curl release version");
38
+ return version;
39
+ };
40
+
41
+ export {
42
+ getCurlReleaseUrl,
43
+ hasCurlInstallation,
44
+ getCurlUpdateArgs,
45
+ getCurlCliVersion
46
+ };
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  Schema,
6
6
  parseWithError
7
- } from "./chunk-6QJ3ZC6M.js";
7
+ } from "./chunk-S4VUE6OA.js";
8
8
  import {
9
9
  BadRequestError
10
10
  } from "./chunk-IJNU7K35.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  inquirer_default
3
- } from "./chunk-6H5VEWMH.js";
3
+ } from "./chunk-2EMLJCCB.js";
4
4
  import {
5
5
  AuthenticatedCommand
6
- } from "./chunk-OPMMPSLX.js";
6
+ } from "./chunk-JELZBFKQ.js";
7
7
  import {
8
8
  require_lib
9
- } from "./chunk-ZYFQDN2K.js";
9
+ } from "./chunk-MB3FR4WL.js";
10
10
  import {
11
11
  require_source
12
12
  } from "./chunk-QDAKBUNO.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  validateSchemaStructure
3
- } from "./chunk-DFBITJLK.js";
3
+ } from "./chunk-OFNXU6XT.js";
4
4
  import {
5
5
  ChartOfAccounts,
6
6
  MIN_SCHEMA_LEDGER_ENTRY_DISABLED_DURATION_SECONDS,
@@ -13,7 +13,7 @@ import {
13
13
  parseWithError,
14
14
  stringify,
15
15
  z
16
- } from "./chunk-6QJ3ZC6M.js";
16
+ } from "./chunk-S4VUE6OA.js";
17
17
  import {
18
18
  PaymentAccountingEventKey,
19
19
  VALID_LEDGER_ACCOUNT_STATUS_TRANSITIONS,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-OPMMPSLX.js";
3
+ } from "./chunk-JELZBFKQ.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-ZYFQDN2K.js";
6
+ } from "./chunk-MB3FR4WL.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-QDAKBUNO.js";
@@ -8121,7 +8121,7 @@ var transformAndValidateCoA = ({
8121
8121
  const defaultHasTotalBalance = defaultConsistencyConfig.totalBalanceUpdates !== void 0;
8122
8122
  if (!defaultHasOwnBalance && !defaultHasTotalBalance) {
8123
8123
  errors.push({
8124
- message: 'Schema defaultConsistencyConfig is not set. Please set totalBalanceUpdates to either "eventual" or "strong". Visit https://fragment.dev/guides/configure-consistency to learn more.',
8124
+ message: 'Schema defaultConsistencyConfig is not set. Please set totalBalanceUpdates to either "eventual" or "strong". Visit https://fragment.dev/docs/configure-consistency to learn more.',
8125
8125
  path: ["defaultConsistencyConfig"]
8126
8126
  });
8127
8127
  }
@@ -12,14 +12,14 @@ import {
12
12
  import {
13
13
  Schema,
14
14
  parseWithError
15
- } from "./chunk-6QJ3ZC6M.js";
15
+ } from "./chunk-S4VUE6OA.js";
16
16
  import {
17
17
  BadRequestError
18
18
  } from "./chunk-IJNU7K35.js";
19
19
  import {
20
20
  FragmentCommand,
21
21
  require_lib
22
- } from "./chunk-ZYFQDN2K.js";
22
+ } from "./chunk-MB3FR4WL.js";
23
23
  import {
24
24
  getParsedSchema
25
25
  } from "./chunk-QZNZYG2G.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  inquirer_default
3
- } from "./chunk-6H5VEWMH.js";
3
+ } from "./chunk-2EMLJCCB.js";
4
4
  import {
5
5
  provisionApiClientFromDashboard,
6
6
  startWorkspaceSelectionServer
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  FragmentCommand,
13
13
  require_lib
14
- } from "./chunk-ZYFQDN2K.js";
14
+ } from "./chunk-MB3FR4WL.js";
15
15
  import {
16
16
  require_source
17
17
  } from "./chunk-QDAKBUNO.js";
@@ -1,3 +1,7 @@
1
+ import {
2
+ getCurlCliVersion,
3
+ hasCurlInstallation
4
+ } from "./chunk-NEW2NRYM.js";
1
5
  import {
2
6
  init_cjs_shims
3
7
  } from "./chunk-7GH3YGSC.js";
@@ -8,6 +12,8 @@ import assert from "node:assert";
8
12
  var tapPackageJsonUrl = "https://raw.githubusercontent.com/fragment-dev/homebrew-tap/main/package.json";
9
13
  var npmRegistryUrl = "https://registry.npmjs.org/@fragment-dev/cli";
10
14
  var detectInstallationMethodFromPath = (root) => {
15
+ if (hasCurlInstallation(root))
16
+ return "curl";
11
17
  if (/[\\/]Cellar[\\/]/i.test(root)) {
12
18
  return "brew";
13
19
  }
@@ -28,7 +34,7 @@ var getNpmCliVersion = async (isBeta) => {
28
34
  assert(version, "npm registry returned no dist-tag version");
29
35
  return version;
30
36
  };
31
- var getFragmentCliVersion = async (isBeta, installationMethod = "unknown") => installationMethod === "npm" ? getNpmCliVersion(isBeta) : getHomebrewCliVersion(isBeta);
37
+ var getFragmentCliVersion = async (isBeta, installationMethod = "unknown") => installationMethod === "curl" ? getCurlCliVersion(isBeta) : installationMethod === "npm" ? getNpmCliVersion(isBeta) : getHomebrewCliVersion(isBeta);
32
38
 
33
39
  export {
34
40
  detectInstallationMethodFromPath,