@fragment-dev/cli 2026.7.9-1 → 2026.7.9-11

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 (64) hide show
  1. package/README.md +16 -0
  2. package/dist/{chunk-PILLZB3E.js → chunk-27IQNS3A.js} +43 -19
  3. package/dist/{chunk-QRP56DLY.js → chunk-3BWYGCTW.js} +2 -2
  4. package/dist/{chunk-QDA5BIHP.js → chunk-3OHJCZZM.js} +2 -2
  5. package/dist/{chunk-K2UATKJI.js → chunk-47SENOIF.js} +1 -1
  6. package/dist/{chunk-UOXPSGVC.js → chunk-4CEBCA46.js} +1 -1
  7. package/dist/{chunk-5HH4NNSE.js → chunk-4E6Y3PSS.js} +2 -2
  8. package/dist/{chunk-VIVSBPCD.js → chunk-4MZBCWZQ.js} +2 -2
  9. package/dist/{chunk-HCTAYKGL.js → chunk-5KUA4RJK.js} +2 -2
  10. package/dist/{chunk-VGBDSE7K.js → chunk-5MQSQSME.js} +2 -2
  11. package/dist/{chunk-NWPJRN3W.js → chunk-624X4WQX.js} +1 -1
  12. package/dist/{chunk-5A52AXRT.js → chunk-7TNXITUF.js} +3 -3
  13. package/dist/{chunk-WMBVWK2M.js → chunk-BC2OJSPA.js} +1 -1
  14. package/dist/{chunk-ZMSR4Z3E.js → chunk-BMOEYXRT.js} +2 -2
  15. package/dist/{chunk-FELYEHSZ.js → chunk-CNRBK46D.js} +1 -1
  16. package/dist/chunk-DYLKAHKE.js +36 -0
  17. package/dist/{chunk-BPXEIAXA.js → chunk-EYAGCQYO.js} +1 -1
  18. package/dist/{chunk-45CYJ3K6.js → chunk-IZBMLZIC.js} +1 -1
  19. package/dist/{chunk-QJOWCJUB.js → chunk-KFAA2PA4.js} +1 -1
  20. package/dist/{chunk-C7ROAUIM.js → chunk-KT3DLGYI.js} +1 -1
  21. package/dist/{chunk-Z5OAHICZ.js → chunk-LFD4H2HA.js} +28 -24
  22. package/dist/{chunk-NAJ7S3OV.js → chunk-LLGNTKT5.js} +2 -2
  23. package/dist/{chunk-2VYJABNZ.js → chunk-NAO73VDE.js} +2 -2
  24. package/dist/{chunk-UMIUGX6O.js → chunk-OAJCTIWT.js} +7 -4
  25. package/dist/{chunk-MOZRABR6.js → chunk-OBI2YPSX.js} +2 -2
  26. package/dist/{chunk-LB3C4WTL.js → chunk-PIHY2GFS.js} +1 -1
  27. package/dist/{chunk-OZQUYOQH.js → chunk-QNGMAK7L.js} +2 -2
  28. package/dist/chunk-SH5YJD4P.js +31 -0
  29. package/dist/{chunk-XDGKUJ32.js → chunk-THBZ6XSN.js} +2 -2
  30. package/dist/{chunk-J6GQWO4E.js → chunk-U7FUVHZJ.js} +2 -2
  31. package/dist/{chunk-SQL643PS.js → chunk-VUVWR4BG.js} +1 -1
  32. package/dist/commands/add-ledger-entry.js +5 -5
  33. package/dist/commands/api-client/create.js +4 -4
  34. package/dist/commands/create-custom-link.js +5 -5
  35. package/dist/commands/create-ledger.js +5 -5
  36. package/dist/commands/delete-custom-txs.js +5 -5
  37. package/dist/commands/delete-ledger.js +5 -5
  38. package/dist/commands/delete-schema.js +5 -5
  39. package/dist/commands/gen-graphql.js +4 -4
  40. package/dist/commands/get-schema.js +6 -6
  41. package/dist/commands/init.js +4 -4
  42. package/dist/commands/login.js +5 -5
  43. package/dist/commands/migrate-ledger-entry.js +5 -5
  44. package/dist/commands/query/ledgerAccounts.js +5 -5
  45. package/dist/commands/query/ledgers.js +5 -5
  46. package/dist/commands/query/schema.js +5 -5
  47. package/dist/commands/query/schemas.js +5 -5
  48. package/dist/commands/reverse-ledger-entry.js +5 -5
  49. package/dist/commands/start.js +4 -4
  50. package/dist/commands/store-schema.js +5 -5
  51. package/dist/commands/token.js +5 -5
  52. package/dist/commands/update-ledger-account.js +5 -5
  53. package/dist/commands/update.js +5 -5
  54. package/dist/commands/verify-schema.js +4 -4
  55. package/dist/commands/version.js +17 -0
  56. package/dist/commands/workspace.js +5 -5
  57. package/dist/commands.js +31 -30
  58. package/dist/index.js +31 -30
  59. package/dist/lib/authenticatedCommand.js +4 -4
  60. package/dist/lib/baseCommand.js +3 -3
  61. package/dist/lib/version.js +3 -1
  62. package/oclif.manifest.json +17 -1
  63. package/package.json +1 -1
  64. package/dist/chunk-CW4UI44G.js +0 -17
package/README.md CHANGED
@@ -31,6 +31,7 @@
31
31
  * [`fragment update`](#fragment-update)
32
32
  * [`fragment update-ledger-account`](#fragment-update-ledger-account)
33
33
  * [`fragment verify-schema`](#fragment-verify-schema)
34
+ * [`fragment version`](#fragment-version)
34
35
  * [`fragment workspace`](#fragment-workspace)
35
36
 
36
37
  ## `fragment add-ledger-entry`
@@ -665,6 +666,21 @@ EXAMPLES
665
666
  $ fragment verify-schema --path ./my-schema.jsonc --json
666
667
  ```
667
668
 
669
+ ## `fragment version`
670
+
671
+ Print the installed FRAGMENT CLI version.
672
+
673
+ ```
674
+ USAGE
675
+ $ fragment version
676
+
677
+ DESCRIPTION
678
+ Print the installed FRAGMENT CLI version.
679
+
680
+ EXAMPLES
681
+ $ fragment version
682
+ ```
683
+
668
684
  ## `fragment workspace`
669
685
 
670
686
  Get the details of the workspace this CLI is authenticated to
@@ -1,16 +1,17 @@
1
- import {
2
- parseJSON
3
- } from "./chunk-O7AE4SQS.js";
4
1
  import {
5
2
  readVersionFile,
6
3
  updateVersionFile
7
4
  } from "./chunk-34NLRFFT.js";
5
+ import {
6
+ parseJSON
7
+ } from "./chunk-O7AE4SQS.js";
8
8
  import {
9
9
  require_graphql
10
10
  } from "./chunk-QF5EN33L.js";
11
11
  import {
12
+ detectInstallationMethodFromPath,
12
13
  getFragmentCliVersion
13
- } from "./chunk-CW4UI44G.js";
14
+ } from "./chunk-DYLKAHKE.js";
14
15
  import {
15
16
  require_color_convert,
16
17
  require_has_flag,
@@ -47764,6 +47765,9 @@ var FragmentCommand = class extends import_core.Command {
47764
47765
  constructor() {
47765
47766
  super(...arguments);
47766
47767
  this.isBeta = this.config.pjson["beta"] ?? true;
47768
+ // Commands that run their own version check (e.g. `version`) set this to
47769
+ // false to skip init's throttled check and avoid a duplicate warning.
47770
+ this.checkVersionOnInit = true;
47767
47771
  this.auth = null;
47768
47772
  this.posthogClient = null;
47769
47773
  }
@@ -47788,14 +47792,41 @@ var FragmentCommand = class extends import_core.Command {
47788
47792
  };
47789
47793
  }
47790
47794
  async outOfDate() {
47791
- const latestRelease = await getFragmentCliVersion(this.isBeta);
47795
+ const installationMethod = this.detectInstallationMethod();
47796
+ const latestRelease = await getFragmentCliVersion(
47797
+ this.isBeta,
47798
+ installationMethod
47799
+ );
47792
47800
  const outOfDate = process.env.FRAGMENT_LOCAL_DEV !== "true" && (0, import_semver.compare)(latestRelease, this.config.version) > 0;
47793
- return { outOfDate, latestRelease };
47801
+ return { outOfDate, latestRelease, installationMethod };
47802
+ }
47803
+ // Warns on stderr when out of date and advances the shared throttle so the
47804
+ // next command skips its own check for six hours. A failed check (e.g.
47805
+ // offline) is swallowed — it never blocks the command or advances the
47806
+ // throttle.
47807
+ async warnIfOutOfDate() {
47808
+ try {
47809
+ const { outOfDate } = await this.outOfDate();
47810
+ if (outOfDate) {
47811
+ this.logToStderr(
47812
+ `${import_chalk.default.yellow("Your CLI version is out of date. Run")} ${import_chalk.default.cyan(
47813
+ "fragment update"
47814
+ )} ${import_chalk.default.yellow("to get the latest version.")}`
47815
+ );
47816
+ }
47817
+ await updateVersionFile(this.debug);
47818
+ } catch (e) {
47819
+ this.debug(`Version check failed: ${e}`);
47820
+ }
47794
47821
  }
47795
47822
  detectInstallationMethod() {
47796
47823
  if (process.env.FRAGMENT_CLI_TEST_ENV === "true") {
47797
47824
  return "npm";
47798
47825
  }
47826
+ const fromPath = detectInstallationMethodFromPath(this.config.root);
47827
+ if (fromPath) {
47828
+ return fromPath;
47829
+ }
47799
47830
  try {
47800
47831
  const brewListResult = (0, import_cross_spawn.sync)("brew", ["list", "--formula"], {
47801
47832
  stdio: "pipe"
@@ -47894,10 +47925,11 @@ var FragmentCommand = class extends import_core.Command {
47894
47925
  }
47895
47926
  }
47896
47927
  async updateFragmentCli({
47897
- dryRun = false
47928
+ dryRun = false,
47929
+ installationMethod
47898
47930
  }) {
47899
- const installationMethod = this.detectInstallationMethod();
47900
- switch (installationMethod) {
47931
+ const method = installationMethod ?? this.detectInstallationMethod();
47932
+ switch (method) {
47901
47933
  case "npm":
47902
47934
  this.log("Detected npm installation. Updating via npm...");
47903
47935
  await this.updateViaNpm({ dryRun });
@@ -47999,7 +48031,7 @@ var FragmentCommand = class extends import_core.Command {
47999
48031
  }
48000
48032
  });
48001
48033
  }
48002
- if (process.env.FRAGMENT_CLI_TEST_ENV === "true" || process.env.FRAGMENT_SKIP_AUTO_UPDATE === "true") {
48034
+ if (!this.checkVersionOnInit || process.env.FRAGMENT_CLI_TEST_ENV === "true" || process.env.FRAGMENT_SKIP_AUTO_UPDATE === "true") {
48003
48035
  return;
48004
48036
  }
48005
48037
  const versionConfig = await readVersionFile(this.debug);
@@ -48008,15 +48040,7 @@ var FragmentCommand = class extends import_core.Command {
48008
48040
  return;
48009
48041
  }
48010
48042
  }
48011
- const { outOfDate } = await this.outOfDate();
48012
- await updateVersionFile(this.debug);
48013
- if (outOfDate) {
48014
- this.logToStderr(
48015
- `${import_chalk.default.yellow("Your CLI version is out of date. Run")} ${import_chalk.default.cyan(
48016
- "fragment update"
48017
- )} ${import_chalk.default.yellow("to get the latest version.")}`
48018
- );
48019
- }
48043
+ await this.warnIfOutOfDate();
48020
48044
  }
48021
48045
  async catch(err) {
48022
48046
  this.debug(err);
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-FELYEHSZ.js";
3
+ } from "./chunk-CNRBK46D.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-PILLZB3E.js";
6
+ } from "./chunk-27IQNS3A.js";
7
7
  import {
8
8
  getParsedSchema
9
9
  } from "./chunk-O7AE4SQS.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-FELYEHSZ.js";
3
+ } from "./chunk-CNRBK46D.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-PILLZB3E.js";
6
+ } from "./chunk-27IQNS3A.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-XK2D2Z44.js";
@@ -18,7 +18,7 @@ import {
18
18
  import {
19
19
  FragmentCommand,
20
20
  require_lib
21
- } from "./chunk-PILLZB3E.js";
21
+ } from "./chunk-27IQNS3A.js";
22
22
  import {
23
23
  getParsedSchema
24
24
  } from "./chunk-O7AE4SQS.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-FELYEHSZ.js";
3
+ } from "./chunk-CNRBK46D.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-FELYEHSZ.js";
3
+ } from "./chunk-CNRBK46D.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-PILLZB3E.js";
6
+ } from "./chunk-27IQNS3A.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-XK2D2Z44.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-FELYEHSZ.js";
3
+ } from "./chunk-CNRBK46D.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-PILLZB3E.js";
6
+ } from "./chunk-27IQNS3A.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-XK2D2Z44.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-FELYEHSZ.js";
3
+ } from "./chunk-CNRBK46D.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-PILLZB3E.js";
6
+ } from "./chunk-27IQNS3A.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-XK2D2Z44.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-FELYEHSZ.js";
3
+ } from "./chunk-CNRBK46D.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-PILLZB3E.js";
6
+ } from "./chunk-27IQNS3A.js";
7
7
  import {
8
8
  __toESM,
9
9
  init_cjs_shims
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-FELYEHSZ.js";
3
+ } from "./chunk-CNRBK46D.js";
4
4
  import {
5
5
  init_cjs_shims
6
6
  } from "./chunk-7GH3YGSC.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  inquirer_default
3
- } from "./chunk-QJOWCJUB.js";
3
+ } from "./chunk-KFAA2PA4.js";
4
4
  import {
5
5
  AuthenticatedCommand
6
- } from "./chunk-FELYEHSZ.js";
6
+ } from "./chunk-CNRBK46D.js";
7
7
  import {
8
8
  require_lib
9
- } from "./chunk-PILLZB3E.js";
9
+ } from "./chunk-27IQNS3A.js";
10
10
  import {
11
11
  require_source
12
12
  } from "./chunk-XK2D2Z44.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-FELYEHSZ.js";
3
+ } from "./chunk-CNRBK46D.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-FELYEHSZ.js";
3
+ } from "./chunk-CNRBK46D.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-PILLZB3E.js";
6
+ } from "./chunk-27IQNS3A.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-XK2D2Z44.js";
@@ -5,7 +5,7 @@ import {
5
5
  FragmentCommand,
6
6
  GraphQLClient,
7
7
  require_lib
8
- } from "./chunk-PILLZB3E.js";
8
+ } from "./chunk-27IQNS3A.js";
9
9
  import {
10
10
  colorizeJson
11
11
  } from "./chunk-O7AE4SQS.js";
@@ -0,0 +1,36 @@
1
+ import {
2
+ init_cjs_shims
3
+ } from "./chunk-7GH3YGSC.js";
4
+
5
+ // src/lib/version.ts
6
+ init_cjs_shims();
7
+ import assert from "node:assert";
8
+ var tapPackageJsonUrl = "https://raw.githubusercontent.com/fragment-dev/homebrew-tap/main/package.json";
9
+ var npmRegistryUrl = "https://registry.npmjs.org/@fragment-dev/cli";
10
+ var detectInstallationMethodFromPath = (root) => {
11
+ if (/[\\/]Cellar[\\/]/i.test(root)) {
12
+ return "brew";
13
+ }
14
+ if (root.includes("node_modules")) {
15
+ return "npm";
16
+ }
17
+ return void 0;
18
+ };
19
+ var getHomebrewCliVersion = async (isBeta) => {
20
+ const packageJson = await (await fetch(tapPackageJsonUrl)).json();
21
+ return packageJson[isBeta ? "dev" : "prod"];
22
+ };
23
+ var getNpmCliVersion = async (isBeta) => {
24
+ const { "dist-tags": distTags } = await (await fetch(npmRegistryUrl, {
25
+ headers: { accept: "application/vnd.npm.install-v1+json" }
26
+ })).json();
27
+ const version = (isBeta ? distTags?.beta : void 0) ?? distTags?.latest;
28
+ assert(version, "npm registry returned no dist-tag version");
29
+ return version;
30
+ };
31
+ var getFragmentCliVersion = async (isBeta, installationMethod = "unknown") => installationMethod === "npm" ? getNpmCliVersion(isBeta) : getHomebrewCliVersion(isBeta);
32
+
33
+ export {
34
+ detectInstallationMethodFromPath,
35
+ getFragmentCliVersion
36
+ };
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  FragmentCommand,
14
14
  require_lib
15
- } from "./chunk-PILLZB3E.js";
15
+ } from "./chunk-27IQNS3A.js";
16
16
  import {
17
17
  colorizeJson,
18
18
  emphasize,
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  FragmentCommand,
7
7
  require_lib
8
- } from "./chunk-PILLZB3E.js";
8
+ } from "./chunk-27IQNS3A.js";
9
9
  import {
10
10
  resolveMcpBaseUrl
11
11
  } from "./chunk-TLM4VKIC.js";
@@ -13,7 +13,7 @@ import {
13
13
  require_syntax,
14
14
  require_type,
15
15
  require_uri
16
- } from "./chunk-PILLZB3E.js";
16
+ } from "./chunk-27IQNS3A.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-FELYEHSZ.js";
3
+ } from "./chunk-CNRBK46D.js";
4
4
  import {
5
5
  require_source
6
6
  } from "./chunk-XK2D2Z44.js";
@@ -1,75 +1,78 @@
1
+ import {
2
+ Version
3
+ } from "./chunk-SH5YJD4P.js";
1
4
  import {
2
5
  Workspace
3
- } from "./chunk-NWPJRN3W.js";
6
+ } from "./chunk-624X4WQX.js";
4
7
  import {
5
8
  QuerySchemas
6
- } from "./chunk-UOXPSGVC.js";
9
+ } from "./chunk-4CEBCA46.js";
7
10
  import {
8
11
  ReverseLedgerEntry
9
- } from "./chunk-ZMSR4Z3E.js";
12
+ } from "./chunk-BMOEYXRT.js";
10
13
  import {
11
14
  Start
12
- } from "./chunk-LB3C4WTL.js";
15
+ } from "./chunk-PIHY2GFS.js";
13
16
  import {
14
17
  StoreSchema
15
- } from "./chunk-OZQUYOQH.js";
18
+ } from "./chunk-QNGMAK7L.js";
16
19
  import {
17
20
  Token
18
- } from "./chunk-C7ROAUIM.js";
21
+ } from "./chunk-KT3DLGYI.js";
19
22
  import {
20
23
  UpdateLedgerAccount
21
- } from "./chunk-2VYJABNZ.js";
24
+ } from "./chunk-NAO73VDE.js";
22
25
  import {
23
26
  Update
24
- } from "./chunk-UMIUGX6O.js";
27
+ } from "./chunk-OAJCTIWT.js";
25
28
  import {
26
29
  VerifySchema
27
- } from "./chunk-BPXEIAXA.js";
30
+ } from "./chunk-EYAGCQYO.js";
28
31
  import {
29
32
  GenGraphQL
30
- } from "./chunk-K2UATKJI.js";
33
+ } from "./chunk-47SENOIF.js";
31
34
  import {
32
35
  GetSchema
33
- } from "./chunk-5A52AXRT.js";
36
+ } from "./chunk-7TNXITUF.js";
34
37
  import {
35
38
  Init
36
- } from "./chunk-SQL643PS.js";
39
+ } from "./chunk-VUVWR4BG.js";
37
40
  import {
38
41
  Login
39
- } from "./chunk-NAJ7S3OV.js";
42
+ } from "./chunk-LLGNTKT5.js";
40
43
  import {
41
44
  MigrateLedgerEntry
42
- } from "./chunk-XDGKUJ32.js";
45
+ } from "./chunk-THBZ6XSN.js";
43
46
  import {
44
47
  QueryLedgerAccounts
45
- } from "./chunk-MOZRABR6.js";
48
+ } from "./chunk-OBI2YPSX.js";
46
49
  import {
47
50
  QueryLedgers
48
- } from "./chunk-WMBVWK2M.js";
51
+ } from "./chunk-BC2OJSPA.js";
49
52
  import {
50
53
  GetSchema as GetSchema2
51
- } from "./chunk-VGBDSE7K.js";
54
+ } from "./chunk-5MQSQSME.js";
52
55
  import {
53
56
  AddLedgerEntry
54
- } from "./chunk-J6GQWO4E.js";
57
+ } from "./chunk-U7FUVHZJ.js";
55
58
  import {
56
59
  ApiClientCreate
57
- } from "./chunk-45CYJ3K6.js";
60
+ } from "./chunk-IZBMLZIC.js";
58
61
  import {
59
62
  CreateCustomLink
60
- } from "./chunk-QDA5BIHP.js";
63
+ } from "./chunk-3OHJCZZM.js";
61
64
  import {
62
65
  CreateLedger
63
- } from "./chunk-QRP56DLY.js";
66
+ } from "./chunk-3BWYGCTW.js";
64
67
  import {
65
68
  DeleteCustomTxs
66
- } from "./chunk-VIVSBPCD.js";
69
+ } from "./chunk-4MZBCWZQ.js";
67
70
  import {
68
71
  DeleteLedger
69
- } from "./chunk-HCTAYKGL.js";
72
+ } from "./chunk-5KUA4RJK.js";
70
73
  import {
71
74
  DeleteSchema
72
- } from "./chunk-5HH4NNSE.js";
75
+ } from "./chunk-4E6Y3PSS.js";
73
76
  import {
74
77
  init_cjs_shims
75
78
  } from "./chunk-7GH3YGSC.js";
@@ -81,6 +84,7 @@ var COMMANDS = {
81
84
  start: Start,
82
85
  // CLI commands
83
86
  update: Update,
87
+ version: Version,
84
88
  // Auth commands
85
89
  login: Login,
86
90
  token: Token,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  inquirer_default
3
- } from "./chunk-QJOWCJUB.js";
3
+ } from "./chunk-KFAA2PA4.js";
4
4
  import {
5
5
  defaultBrowserAuthDeps,
6
6
  provisionApiClient
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  FragmentCommand,
10
10
  require_lib
11
- } from "./chunk-PILLZB3E.js";
11
+ } from "./chunk-27IQNS3A.js";
12
12
  import {
13
13
  require_source
14
14
  } from "./chunk-XK2D2Z44.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-FELYEHSZ.js";
3
+ } from "./chunk-CNRBK46D.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-PILLZB3E.js";
6
+ } from "./chunk-27IQNS3A.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-XK2D2Z44.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  inquirer_default
3
- } from "./chunk-QJOWCJUB.js";
3
+ } from "./chunk-KFAA2PA4.js";
4
4
  import {
5
5
  FragmentCommand,
6
6
  require_lib
7
- } from "./chunk-PILLZB3E.js";
7
+ } from "./chunk-27IQNS3A.js";
8
8
  import {
9
9
  require_source
10
10
  } from "./chunk-XK2D2Z44.js";
@@ -33,7 +33,7 @@ var Update = class _Update extends FragmentCommand {
33
33
  async run() {
34
34
  const { flags } = await this.parse(_Update);
35
35
  let shouldUpdate = flags.yes;
36
- const { outOfDate, latestRelease } = await this.outOfDate();
36
+ const { outOfDate, latestRelease, installationMethod } = await this.outOfDate();
37
37
  if (!outOfDate) {
38
38
  this.log("Already up-to-date.");
39
39
  return;
@@ -54,7 +54,10 @@ Would you like to update the FRAGMENT CLI? (y/n)`,
54
54
  ]));
55
55
  }
56
56
  if (shouldUpdate) {
57
- await this.updateFragmentCli({ dryRun: flags["dry-run"] });
57
+ await this.updateFragmentCli({
58
+ dryRun: flags["dry-run"],
59
+ installationMethod
60
+ });
58
61
  } else {
59
62
  this.log("Not updating.");
60
63
  return;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-FELYEHSZ.js";
3
+ } from "./chunk-CNRBK46D.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-PILLZB3E.js";
6
+ } from "./chunk-27IQNS3A.js";
7
7
  import {
8
8
  __toESM,
9
9
  init_cjs_shims
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FragmentCommand,
3
3
  require_lib
4
- } from "./chunk-PILLZB3E.js";
4
+ } from "./chunk-27IQNS3A.js";
5
5
  import {
6
6
  require_source
7
7
  } from "./chunk-XK2D2Z44.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-FELYEHSZ.js";
3
+ } from "./chunk-CNRBK46D.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-PILLZB3E.js";
6
+ } from "./chunk-27IQNS3A.js";
7
7
  import {
8
8
  getParsedSchema
9
9
  } from "./chunk-O7AE4SQS.js";
@@ -0,0 +1,31 @@
1
+ import {
2
+ FragmentCommand
3
+ } from "./chunk-27IQNS3A.js";
4
+ import {
5
+ init_cjs_shims
6
+ } from "./chunk-7GH3YGSC.js";
7
+
8
+ // src/commands/version.ts
9
+ init_cjs_shims();
10
+ var Version = class _Version extends FragmentCommand {
11
+ constructor() {
12
+ super(...arguments);
13
+ // Skip init's throttled check; run() always does a fresh one below.
14
+ this.checkVersionOnInit = false;
15
+ }
16
+ static {
17
+ this.description = "Print the installed FRAGMENT CLI version.";
18
+ }
19
+ static {
20
+ this.examples = ["<%= config.bin %> <%= command.id %>"];
21
+ }
22
+ async run() {
23
+ await this.parse(_Version);
24
+ this.log(this.config.version);
25
+ await this.warnIfOutOfDate();
26
+ }
27
+ };
28
+
29
+ export {
30
+ Version
31
+ };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-FELYEHSZ.js";
3
+ } from "./chunk-CNRBK46D.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-PILLZB3E.js";
6
+ } from "./chunk-27IQNS3A.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-XK2D2Z44.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-FELYEHSZ.js";
3
+ } from "./chunk-CNRBK46D.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-PILLZB3E.js";
6
+ } from "./chunk-27IQNS3A.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-XK2D2Z44.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FragmentCommand,
3
3
  require_lib
4
- } from "./chunk-PILLZB3E.js";
4
+ } from "./chunk-27IQNS3A.js";
5
5
  import {
6
6
  require_source
7
7
  } from "./chunk-XK2D2Z44.js";