@fragment-dev/cli 2026.11.13-1 → 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.
- package/README.md +21 -0
- package/dist/{chunk-6H5VEWMH.js → chunk-2EMLJCCB.js} +1 -1
- package/dist/{chunk-PBOTSYWN.js → chunk-3CJRW6UH.js} +1 -1
- package/dist/{chunk-4FLUWOFO.js → chunk-3DAS3OFL.js} +1 -1
- package/dist/{chunk-AY5LBONU.js → chunk-562FOENG.js} +2 -2
- package/dist/{chunk-PWOJYW62.js → chunk-5S53QKWI.js} +2 -2
- package/dist/{chunk-77TG73N3.js → chunk-BOA4W5UK.js} +2 -2
- package/dist/{chunk-6MYCJAJL.js → chunk-CCIMF5G2.js} +2 -2
- package/dist/{chunk-D46OZVDM.js → chunk-CCJ6B7IM.js} +2 -2
- package/dist/{chunk-3UJFEFTD.js → chunk-CE5IRGV2.js} +2 -2
- package/dist/{chunk-ECRNMUZY.js → chunk-EKZUX3W4.js} +1 -1
- package/dist/{chunk-RJBVOPFD.js → chunk-FCPIWNB2.js} +27 -27
- package/dist/{chunk-S6EUZBEH.js → chunk-FMDJEY4R.js} +1 -1
- package/dist/{chunk-WABMYMTO.js → chunk-GR3GGYJY.js} +2 -2
- package/dist/{chunk-IGBICJSY.js → chunk-HT3U4M2Y.js} +1 -1
- package/dist/{chunk-HII7DWWZ.js → chunk-IPDXXZMM.js} +2 -2
- package/dist/{chunk-V3LLFTBC.js → chunk-JDYOG2HA.js} +1 -1
- package/dist/{chunk-OPMMPSLX.js → chunk-JELZBFKQ.js} +1 -1
- package/dist/{chunk-LMAJOZGP.js → chunk-JSS43ARW.js} +1 -1
- package/dist/{chunk-ZYFQDN2K.js → chunk-MB3FR4WL.js} +28 -4
- package/dist/chunk-NEW2NRYM.js +46 -0
- package/dist/{chunk-EO6QNP4N.js → chunk-PCDWKMX2.js} +3 -3
- package/dist/{chunk-5WAZAXOW.js → chunk-RF23UYTV.js} +2 -2
- package/dist/{chunk-CSUC4K6Z.js → chunk-U5ZBL6S4.js} +1 -1
- package/dist/{chunk-H2RK3NKQ.js → chunk-VXYOFJKR.js} +2 -2
- package/dist/{chunk-DYLKAHKE.js → chunk-WAU6SFQ5.js} +7 -1
- package/dist/{chunk-TGEDLZAO.js → chunk-WS34FKDX.js} +1 -1
- package/dist/{chunk-CTS34CX4.js → chunk-XF4UMVYD.js} +2 -2
- package/dist/{chunk-GJZISVDV.js → chunk-XREGFKSL.js} +2 -2
- package/dist/{chunk-35PT2VZ6.js → chunk-XT7X5Z7E.js} +2 -2
- package/dist/{chunk-G3IDF3GN.js → chunk-YWITUQIX.js} +1 -1
- package/dist/{chunk-SLD5GAXB.js → chunk-Z5SFM3A5.js} +1 -1
- package/dist/{chunk-VETXOSAQ.js → chunk-Z65KYV6Z.js} +2 -2
- package/dist/{chunk-CI336LA7.js → chunk-ZPU5TX3B.js} +1 -1
- package/dist/commands/add-ledger-entry.js +5 -4
- package/dist/commands/api-client/create.js +4 -3
- package/dist/commands/create-custom-link.js +5 -4
- package/dist/commands/create-ledger.js +5 -4
- package/dist/commands/delete-custom-txs.js +5 -4
- package/dist/commands/delete-ledger.js +5 -4
- package/dist/commands/delete-schema.js +5 -4
- package/dist/commands/gen-graphql.js +4 -3
- package/dist/commands/get-schema.js +6 -5
- package/dist/commands/init.js +4 -3
- package/dist/commands/login.js +5 -4
- package/dist/commands/migrate-ledger-entry.js +5 -4
- package/dist/commands/print-schema.js +4 -3
- package/dist/commands/query/ledgerAccounts.js +5 -4
- package/dist/commands/query/ledgers.js +5 -4
- package/dist/commands/query/schema.js +5 -4
- package/dist/commands/query/schemas.js +5 -4
- package/dist/commands/reverse-ledger-entry.js +5 -4
- package/dist/commands/simulate-scenario.js +4 -3
- package/dist/commands/start.js +4 -3
- package/dist/commands/store-schema.js +5 -4
- package/dist/commands/token.js +5 -4
- package/dist/commands/update-ledger-account.js +5 -4
- package/dist/commands/update.js +5 -4
- package/dist/commands/verify-schema.js +4 -3
- package/dist/commands/version.js +4 -3
- package/dist/commands/workspace.js +5 -4
- package/dist/commands.js +33 -32
- package/dist/index.js +33 -32
- package/dist/lib/authenticatedCommand.js +4 -3
- package/dist/lib/baseCommand.js +3 -2
- package/dist/lib/curl.js +13 -0
- package/dist/lib/version.js +2 -1
- package/oclif.manifest.json +1 -1
- 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
|
|
@@ -1,84 +1,84 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Update
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GR3GGYJY.js";
|
|
4
4
|
import {
|
|
5
5
|
VerifySchema
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WS34FKDX.js";
|
|
7
7
|
import {
|
|
8
8
|
Version
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZPU5TX3B.js";
|
|
10
10
|
import {
|
|
11
11
|
Workspace
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HT3U4M2Y.js";
|
|
13
13
|
import {
|
|
14
14
|
GetSchema as GetSchema2
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BOA4W5UK.js";
|
|
16
16
|
import {
|
|
17
17
|
QuerySchemas
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3CJRW6UH.js";
|
|
19
19
|
import {
|
|
20
20
|
ReverseLedgerEntry
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-Z65KYV6Z.js";
|
|
22
22
|
import {
|
|
23
23
|
SimulateScenario
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-3DAS3OFL.js";
|
|
25
25
|
import {
|
|
26
26
|
Start
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-FMDJEY4R.js";
|
|
28
28
|
import {
|
|
29
29
|
StoreSchema
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-CCIMF5G2.js";
|
|
31
31
|
import {
|
|
32
32
|
Token
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-JDYOG2HA.js";
|
|
34
34
|
import {
|
|
35
35
|
UpdateLedgerAccount
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-XT7X5Z7E.js";
|
|
37
37
|
import {
|
|
38
38
|
GenGraphQL
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-U5ZBL6S4.js";
|
|
40
40
|
import {
|
|
41
41
|
GetSchema
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-PCDWKMX2.js";
|
|
43
43
|
import {
|
|
44
44
|
Init
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-Z5SFM3A5.js";
|
|
46
46
|
import {
|
|
47
47
|
Login
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-VXYOFJKR.js";
|
|
49
49
|
import {
|
|
50
50
|
MigrateLedgerEntry
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-CCJ6B7IM.js";
|
|
52
52
|
import {
|
|
53
53
|
PrintSchema
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-JSS43ARW.js";
|
|
55
55
|
import {
|
|
56
56
|
QueryLedgerAccounts
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-XF4UMVYD.js";
|
|
58
58
|
import {
|
|
59
59
|
QueryLedgers
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-EKZUX3W4.js";
|
|
61
61
|
import {
|
|
62
62
|
AddLedgerEntry
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-RF23UYTV.js";
|
|
64
64
|
import {
|
|
65
65
|
ApiClientCreate
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-YWITUQIX.js";
|
|
67
67
|
import {
|
|
68
68
|
CreateCustomLink
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-CE5IRGV2.js";
|
|
70
70
|
import {
|
|
71
71
|
CreateLedger
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-5S53QKWI.js";
|
|
73
73
|
import {
|
|
74
74
|
DeleteCustomTxs
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-562FOENG.js";
|
|
76
76
|
import {
|
|
77
77
|
DeleteLedger
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-IPDXXZMM.js";
|
|
79
79
|
import {
|
|
80
80
|
DeleteSchema
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-XREGFKSL.js";
|
|
82
82
|
import {
|
|
83
83
|
init_cjs_shims
|
|
84
84
|
} from "./chunk-7GH3YGSC.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
inquirer_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2EMLJCCB.js";
|
|
4
4
|
import {
|
|
5
5
|
FragmentCommand,
|
|
6
6
|
require_lib
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MB3FR4WL.js";
|
|
8
8
|
import {
|
|
9
9
|
require_source
|
|
10
10
|
} from "./chunk-QDAKBUNO.js";
|
|
@@ -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-
|
|
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 });
|
|
@@ -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
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
inquirer_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2EMLJCCB.js";
|
|
4
4
|
import {
|
|
5
5
|
AuthenticatedCommand
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JELZBFKQ.js";
|
|
7
7
|
import {
|
|
8
8
|
require_lib
|
|
9
|
-
} from "./chunk-
|
|
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
|
inquirer_default
|
|
3
|
-
} from "./chunk-
|
|
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-
|
|
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,
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AddLedgerEntry
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-RF23UYTV.js";
|
|
4
|
+
import "../chunk-JELZBFKQ.js";
|
|
5
5
|
import "../chunk-3ZBETKSW.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-MB3FR4WL.js";
|
|
7
7
|
import "../chunk-IDAIGTVO.js";
|
|
8
8
|
import "../chunk-QZNZYG2G.js";
|
|
9
|
+
import "../chunk-WAU6SFQ5.js";
|
|
10
|
+
import "../chunk-NEW2NRYM.js";
|
|
9
11
|
import "../chunk-QF5EN33L.js";
|
|
10
|
-
import "../chunk-DYLKAHKE.js";
|
|
11
12
|
import "../chunk-QDAKBUNO.js";
|
|
12
13
|
import "../chunk-7K4RMTU4.js";
|
|
13
14
|
import "../chunk-67DUFD6P.js";
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ApiClientCreate
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-YWITUQIX.js";
|
|
4
4
|
import "../../chunk-LID4G5RM.js";
|
|
5
5
|
import "../../chunk-TWNWTJEF.js";
|
|
6
6
|
import "../../chunk-MI5NFPWE.js";
|
|
7
7
|
import "../../chunk-3SE5DFKP.js";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-MB3FR4WL.js";
|
|
9
9
|
import "../../chunk-IDAIGTVO.js";
|
|
10
10
|
import "../../chunk-QZNZYG2G.js";
|
|
11
|
+
import "../../chunk-WAU6SFQ5.js";
|
|
12
|
+
import "../../chunk-NEW2NRYM.js";
|
|
11
13
|
import "../../chunk-QF5EN33L.js";
|
|
12
|
-
import "../../chunk-DYLKAHKE.js";
|
|
13
14
|
import "../../chunk-QDAKBUNO.js";
|
|
14
15
|
import "../../chunk-7K4RMTU4.js";
|
|
15
16
|
import "../../chunk-67DUFD6P.js";
|