@fragment-dev/cli 2026.10.22-5 → 2026.10.22-9
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 +10 -14
- package/dist/{chunk-ND7QZR7R.js → chunk-5GP3GUTJ.js} +2 -2
- package/dist/{chunk-YJGBEX5B.js → chunk-5J7GO2LD.js} +2 -2
- package/dist/{chunk-WWLP4HPC.js → chunk-5MNVNPOL.js} +2 -2
- package/dist/{chunk-AO62X3BO.js → chunk-5OKT5EMG.js} +5 -3
- package/dist/{chunk-ZA2L64JN.js → chunk-67DUFD6P.js} +1 -1
- package/dist/{chunk-PIQ6WUMK.js → chunk-AGSUHPTK.js} +4 -4
- package/dist/{chunk-E5P6XCQL.js → chunk-B23ACFAK.js} +2 -2
- package/dist/{chunk-5SZAIV6H.js → chunk-DF3U6ZLT.js} +1 -1
- package/dist/{chunk-OXHLKGQ5.js → chunk-EA4PQ3Q6.js} +15 -17
- package/dist/{chunk-TXZYFCBO.js → chunk-FGNF2UZU.js} +1 -1
- package/dist/{chunk-3FYCTUQG.js → chunk-FJHK32F7.js} +2 -2
- package/dist/{chunk-CSTRC57Q.js → chunk-GMESN77F.js} +4 -4
- package/dist/{chunk-2ZOSYPMG.js → chunk-GP4YLGE7.js} +1 -1
- package/dist/{chunk-MSTL4SGM.js → chunk-GSRBM4QF.js} +2 -2
- package/dist/{chunk-RXZ4S2ZQ.js → chunk-H55MKRZS.js} +25 -25
- package/dist/{chunk-5ZNQLL3D.js → chunk-HOGDV2YN.js} +3 -3
- package/dist/{chunk-7UQY3FIG.js → chunk-IDAIGTVO.js} +1 -1
- package/dist/{chunk-KEPMDY7V.js → chunk-J5VE25EA.js} +1 -1
- package/dist/{chunk-JMBVKYGC.js → chunk-JKZUZUAV.js} +1 -1
- package/dist/{chunk-Z6NR5CSS.js → chunk-JLXUB5H5.js} +18 -19
- package/dist/chunk-K2C7FOE6.js +1477 -0
- package/dist/{chunk-I55F4IDB.js → chunk-LR3ZGFUV.js} +2 -2
- package/dist/{chunk-4OP66KOV.js → chunk-M2C3IDIY.js} +1 -1
- package/dist/{chunk-HUH6X4FR.js → chunk-MM46JBHF.js} +3 -3
- package/dist/{chunk-DQKSSCGB.js → chunk-MODGIOPG.js} +38 -11
- package/dist/{chunk-N2IUAYUD.js → chunk-MVAJNY4X.js} +2 -2
- package/dist/{chunk-WSCCYKTK.js → chunk-N66WU3TN.js} +2 -2
- package/dist/{chunk-W7NFIOVK.js → chunk-OA3SUDZN.js} +2 -2
- package/dist/{chunk-DRY3QBRK.js → chunk-OCY2MVO7.js} +1 -1
- package/dist/{chunk-JYXPC5JP.js → chunk-OKMRVQTQ.js} +5 -5
- package/dist/{chunk-XZ6O5DO6.js → chunk-QFH4ECMN.js} +7 -5
- package/dist/{chunk-AQYXSJII.js → chunk-R6VUCOQM.js} +2 -2
- package/dist/{chunk-XL3PNDE7.js → chunk-RGB7H5GE.js} +1 -1
- package/dist/{chunk-TK6OCIYG.js → chunk-RPKBDFB4.js} +2 -2
- package/dist/{chunk-NL2ECIET.js → chunk-RWQZFXSF.js} +2 -1470
- package/dist/{chunk-M3W6IZD4.js → chunk-SPIU7ZUZ.js} +2 -2
- package/dist/chunk-T3EXEEYL.js +104 -0
- package/dist/{chunk-45ANXGMD.js → chunk-VCN774BB.js} +1 -1
- package/dist/{chunk-ELTMQLAC.js → chunk-VPOARVKJ.js} +10 -5
- package/dist/{chunk-CXCEORCL.js → chunk-WDUCGD5M.js} +1 -1
- package/dist/{chunk-AB4ADA3B.js → chunk-WKMNNG4S.js} +2 -2
- package/dist/{chunk-AIYVYJL6.js → chunk-XWCVZGAX.js} +1 -1
- package/dist/commands/add-ledger-entry.js +6 -6
- package/dist/commands/api-client/create.js +8 -6
- package/dist/commands/create-custom-link.js +6 -6
- package/dist/commands/create-ledger.js +6 -6
- package/dist/commands/delete-custom-txs.js +6 -6
- package/dist/commands/delete-ledger.js +6 -6
- package/dist/commands/delete-schema.js +6 -6
- package/dist/commands/gen-graphql.js +11 -10
- package/dist/commands/get-schema.js +7 -7
- package/dist/commands/init.js +5 -5
- package/dist/commands/login.js +9 -7
- package/dist/commands/migrate-ledger-entry.js +6 -6
- package/dist/commands/query/ledgerAccounts.js +6 -6
- package/dist/commands/query/ledgers.js +6 -6
- package/dist/commands/query/schema.js +6 -6
- package/dist/commands/query/schemas.js +6 -6
- package/dist/commands/reverse-ledger-entry.js +6 -6
- package/dist/commands/start.js +5 -5
- package/dist/commands/store-schema.js +6 -6
- package/dist/commands/token.js +6 -6
- package/dist/commands/update-ledger-account.js +6 -6
- package/dist/commands/update.js +6 -6
- package/dist/commands/verify-schema.js +12 -11
- package/dist/commands/version.js +5 -5
- package/dist/commands/workspace.js +6 -6
- package/dist/commands.js +42 -40
- package/dist/graphql.js +4 -3
- package/dist/index.js +42 -40
- package/dist/lib/auth.js +2 -2
- package/dist/lib/authenticatedCommand.js +5 -5
- package/dist/lib/baseCommand.js +4 -4
- package/dist/lib/browserAuth.js +3 -1
- package/dist/lib/browserLogin.js +13 -0
- package/dist/lib/constants.js +5 -5
- package/dist/utils/formatValidationErrors.js +3 -2
- package/dist/utils/schemaBackCompat.js +7 -6
- package/dist/utils/schemaValidation.js +6 -5
- package/dist/version.js +2 -2
- package/oclif.manifest.json +1 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
## Browser login for new users
|
|
8
8
|
|
|
9
|
-
Run `fragment login --browser
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
The browser and CLI must run on the same machine
|
|
13
|
-
Use `--workspace <id>` to
|
|
14
|
-
Credentials remain in the CLI credential directory. The browser
|
|
9
|
+
Run `fragment login --browser` to sign in and select a workspace.
|
|
10
|
+
The dashboard discovers the selected workspace's region before asking you to approve API-client creation.
|
|
11
|
+
New users complete dashboard onboarding first.
|
|
12
|
+
The browser and CLI must run on the same machine.
|
|
13
|
+
Use `--workspace <id>` to select an existing workspace directly.
|
|
14
|
+
Credentials remain in the CLI credential directory. The browser shows a confirmation after provisioning, with a button to open the approved workspace.
|
|
15
15
|
|
|
16
16
|
<!-- commands -->
|
|
17
17
|
* [`fragment add-ledger-entry`](#fragment-add-ledger-entry)
|
|
@@ -82,14 +82,12 @@ Create an API client for an integration.
|
|
|
82
82
|
|
|
83
83
|
```
|
|
84
84
|
USAGE
|
|
85
|
-
$ fragment api-client create --workspace <value> --name <value> [--role admin|reader] [--
|
|
86
|
-
|
|
85
|
+
$ fragment api-client create --workspace <value> --name <value> [--role admin|reader] [--output <value>] [--format
|
|
86
|
+
json|env]
|
|
87
87
|
|
|
88
88
|
FLAGS
|
|
89
89
|
--format=<option> [default: json] Output format (applies to both stdout and --output).
|
|
90
90
|
<options: json|env>
|
|
91
|
-
--mcp-url=<value> The Workspace MCP server origin (ex: https://mcp.us-west-2.fragment.dev). Falls back to
|
|
92
|
-
FRAGMENT_MCP_URL.
|
|
93
91
|
--name=<value> (required) A display name for the API client.
|
|
94
92
|
--output=<value> Write the credentials to this file instead of stdout.
|
|
95
93
|
--role=<option> Role to assign the API client (defaults to your own role, capped at it).
|
|
@@ -386,16 +384,14 @@ Authenticate with FRAGMENT.
|
|
|
386
384
|
|
|
387
385
|
```
|
|
388
386
|
USAGE
|
|
389
|
-
$ fragment login [--browser] [--workspace <value>] [--
|
|
390
|
-
[--
|
|
387
|
+
$ fragment login [--browser] [--workspace <value>] [--client-id <value>] [--client-secret <value>]
|
|
388
|
+
[--api-url <value>] [--oauth-url <value>] [--oauth-scope <value>] [--test]
|
|
391
389
|
|
|
392
390
|
FLAGS
|
|
393
391
|
--api-url=<value> The API URL for your FRAGMENT Workspace (ex: https://api.us-west-2.fragment.dev/graphql)
|
|
394
392
|
--browser Authenticate in the browser and provision an API client automatically.
|
|
395
393
|
--client-id=<value> The API Client ID for your FRAGMENT Workspace.
|
|
396
394
|
--client-secret=<value> The API Client Secret for your FRAGMENT Workspace
|
|
397
|
-
--mcp-url=<value> The Workspace MCP server origin (ex: https://mcp.us-west-2.fragment.dev). Used with
|
|
398
|
-
--browser.
|
|
399
395
|
--oauth-scope=<value> The OAuth Scope for your auth token (ex: https://api.us-west-2.fragment.dev/*)
|
|
400
396
|
--oauth-url=<value> The OAuth URL from which to retrieve your auth token (ex:
|
|
401
397
|
https://auth.fragment.dev/oauth2/token)
|
|
@@ -3,13 +3,15 @@ import {
|
|
|
3
3
|
CurrencyMatchInputSchema,
|
|
4
4
|
CurrencyModeSchema,
|
|
5
5
|
LedgerAccountTypeSchema,
|
|
6
|
+
assert_default,
|
|
7
|
+
codes
|
|
8
|
+
} from "./chunk-K2C7FOE6.js";
|
|
9
|
+
import {
|
|
6
10
|
ParameterizedString,
|
|
7
11
|
SafeStringSchema,
|
|
8
|
-
assert_default,
|
|
9
|
-
codes,
|
|
10
12
|
getStringParametersInternal,
|
|
11
13
|
z
|
|
12
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-RWQZFXSF.js";
|
|
13
15
|
import {
|
|
14
16
|
init_cjs_shims
|
|
15
17
|
} from "./chunk-7GH3YGSC.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
validateSchemaStructure
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MM46JBHF.js";
|
|
4
4
|
import {
|
|
5
5
|
ChartOfAccounts,
|
|
6
6
|
MIN_SCHEMA_LEDGER_ENTRY_DISABLED_DURATION_SECONDS,
|
|
@@ -13,17 +13,17 @@ import {
|
|
|
13
13
|
parseWithError,
|
|
14
14
|
stringify,
|
|
15
15
|
z
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-QFH4ECMN.js";
|
|
17
17
|
import {
|
|
18
18
|
PaymentAccountingEventKey,
|
|
19
19
|
VALID_LEDGER_ACCOUNT_STATUS_TRANSITIONS,
|
|
20
20
|
getSchemaObjectParameters
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-5OKT5EMG.js";
|
|
22
22
|
import {
|
|
23
23
|
BadRequestError,
|
|
24
24
|
InternalError,
|
|
25
25
|
assert_default
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-K2C7FOE6.js";
|
|
27
27
|
import {
|
|
28
28
|
getParsedSchemaString,
|
|
29
29
|
parseJSON
|
|
@@ -9,7 +9,7 @@ var FRAGMENT_HOME = process.env.FRAGMENT_PATH ?? `${homedir()}/.fragment`;
|
|
|
9
9
|
var FRAGMENT_VERSION_PATH = `${FRAGMENT_HOME}/version.json`;
|
|
10
10
|
var FRAGMENT_AUTH_PATH = `${FRAGMENT_HOME}/auth.json`;
|
|
11
11
|
var FRAGMENT_ACCESS_TOKEN_PATH = `${FRAGMENT_HOME}/token.json`;
|
|
12
|
-
var
|
|
12
|
+
var getDashboardUrl = () => process.env.FRAGMENT_DASHBOARD_URL ?? "https://dashboard.fragment.dev";
|
|
13
13
|
var DEV_POSTHOG_API_KEY = "phc_eHLtmjtSfHGfAMzmIxjgtwjp0SP8g1KrIbE1sM8jZVX";
|
|
14
14
|
var PROD_POSTHOG_API_KEY = "phc_dMs2ythnUI9lm53ZM60NawtEw6TypZuYngHb4SKAnV9";
|
|
15
15
|
var getPosthogApiKey = () => {
|
|
@@ -25,6 +25,6 @@ export {
|
|
|
25
25
|
FRAGMENT_VERSION_PATH,
|
|
26
26
|
FRAGMENT_AUTH_PATH,
|
|
27
27
|
FRAGMENT_ACCESS_TOKEN_PATH,
|
|
28
|
-
|
|
28
|
+
getDashboardUrl,
|
|
29
29
|
getPosthogApiKey
|
|
30
30
|
};
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
2
|
+
provisionApiClientFromDashboard,
|
|
3
|
+
startWorkspaceSelectionServer
|
|
4
|
+
} from "./chunk-T3EXEEYL.js";
|
|
5
|
+
import {
|
|
6
|
+
defaultBrowserAuthDeps
|
|
7
|
+
} from "./chunk-MODGIOPG.js";
|
|
5
8
|
import {
|
|
6
9
|
FragmentCommand,
|
|
7
10
|
require_lib
|
|
8
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-VPOARVKJ.js";
|
|
9
12
|
import {
|
|
10
|
-
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
getDashboardUrl
|
|
14
|
+
} from "./chunk-B23ACFAK.js";
|
|
12
15
|
import {
|
|
13
16
|
__toESM,
|
|
14
17
|
init_cjs_shims
|
|
@@ -52,10 +55,6 @@ var ApiClientCreate = class _ApiClientCreate extends FragmentCommand {
|
|
|
52
55
|
options: ["admin", "reader"],
|
|
53
56
|
description: "Role to assign the API client (defaults to your own role, capped at it)."
|
|
54
57
|
}),
|
|
55
|
-
"mcp-url": import_core.Flags.string({
|
|
56
|
-
required: false,
|
|
57
|
-
description: "The Workspace MCP server origin (ex: https://mcp.us-west-2.fragment.dev). Falls back to FRAGMENT_MCP_URL."
|
|
58
|
-
}),
|
|
59
58
|
output: import_core.Flags.string({
|
|
60
59
|
required: false,
|
|
61
60
|
description: "Write the credentials to this file instead of stdout."
|
|
@@ -79,18 +78,17 @@ var ApiClientCreate = class _ApiClientCreate extends FragmentCommand {
|
|
|
79
78
|
}
|
|
80
79
|
async run() {
|
|
81
80
|
const { flags } = await this.parse(_ApiClientCreate);
|
|
82
|
-
const
|
|
83
|
-
this.assert(authBaseUrl, {
|
|
84
|
-
message: "Must provide --mcp-url (or set FRAGMENT_MCP_URL), e.g. https://mcp.us-west-2.fragment.dev"
|
|
85
|
-
});
|
|
86
|
-
const result = await provisionApiClient(
|
|
81
|
+
const result = await provisionApiClientFromDashboard(
|
|
87
82
|
{
|
|
88
|
-
|
|
83
|
+
dashboardUrl: getDashboardUrl(),
|
|
89
84
|
workspaceId: flags.workspace,
|
|
90
85
|
clientName: flags.name,
|
|
91
86
|
role: flags.role ? ROLE_KEYS[flags.role] : void 0
|
|
92
87
|
},
|
|
93
|
-
|
|
88
|
+
{
|
|
89
|
+
...defaultBrowserAuthDeps((msg) => this.log(msg)),
|
|
90
|
+
startWorkspaceSelection: startWorkspaceSelectionServer
|
|
91
|
+
}
|
|
94
92
|
);
|
|
95
93
|
const rendered = this.render(result, flags.format);
|
|
96
94
|
if (flags.output) {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BackCompatCheckError,
|
|
3
3
|
verifySchemaAgainstFile
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AGSUHPTK.js";
|
|
5
5
|
import {
|
|
6
6
|
extractSchemaMetadata,
|
|
7
7
|
isJsonParseError,
|
|
8
8
|
validateSchemaStructure
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MM46JBHF.js";
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_SCHEMA_PATH
|
|
12
12
|
} from "./chunk-A4BSWX5D.js";
|
|
13
13
|
import {
|
|
14
14
|
logValidationErrors
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-OCY2MVO7.js";
|
|
16
16
|
import {
|
|
17
17
|
FragmentCommand,
|
|
18
18
|
require_lib
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-VPOARVKJ.js";
|
|
20
20
|
import {
|
|
21
21
|
colorizeJson,
|
|
22
22
|
emphasize,
|
|
@@ -1,78 +1,78 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Version
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VCN774BB.js";
|
|
4
4
|
import {
|
|
5
5
|
Workspace
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-M2C3IDIY.js";
|
|
7
7
|
import {
|
|
8
8
|
QuerySchemas
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WDUCGD5M.js";
|
|
10
10
|
import {
|
|
11
11
|
ReverseLedgerEntry
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LR3ZGFUV.js";
|
|
13
13
|
import {
|
|
14
14
|
Start
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-DF3U6ZLT.js";
|
|
16
16
|
import {
|
|
17
17
|
StoreSchema
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-SPIU7ZUZ.js";
|
|
19
19
|
import {
|
|
20
20
|
Token
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-JKZUZUAV.js";
|
|
22
22
|
import {
|
|
23
23
|
UpdateLedgerAccount
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-N66WU3TN.js";
|
|
25
25
|
import {
|
|
26
26
|
Update
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-MVAJNY4X.js";
|
|
28
28
|
import {
|
|
29
29
|
VerifySchema
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-GMESN77F.js";
|
|
31
31
|
import {
|
|
32
32
|
GenGraphQL
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-OKMRVQTQ.js";
|
|
34
34
|
import {
|
|
35
35
|
GetSchema
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-HOGDV2YN.js";
|
|
37
37
|
import {
|
|
38
38
|
Init
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-XWCVZGAX.js";
|
|
40
40
|
import {
|
|
41
41
|
Login
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-JLXUB5H5.js";
|
|
43
43
|
import {
|
|
44
44
|
MigrateLedgerEntry
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-WKMNNG4S.js";
|
|
46
46
|
import {
|
|
47
47
|
QueryLedgerAccounts
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-RPKBDFB4.js";
|
|
49
49
|
import {
|
|
50
50
|
QueryLedgers
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-RGB7H5GE.js";
|
|
52
52
|
import {
|
|
53
53
|
GetSchema as GetSchema2
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-FJHK32F7.js";
|
|
55
55
|
import {
|
|
56
56
|
AddLedgerEntry
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-5MNVNPOL.js";
|
|
58
58
|
import {
|
|
59
59
|
ApiClientCreate
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-EA4PQ3Q6.js";
|
|
61
61
|
import {
|
|
62
62
|
CreateCustomLink
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-GSRBM4QF.js";
|
|
64
64
|
import {
|
|
65
65
|
CreateLedger
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-5J7GO2LD.js";
|
|
67
67
|
import {
|
|
68
68
|
DeleteCustomTxs
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-R6VUCOQM.js";
|
|
70
70
|
import {
|
|
71
71
|
DeleteLedger
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-5GP3GUTJ.js";
|
|
73
73
|
import {
|
|
74
74
|
DeleteSchema
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-OA3SUDZN.js";
|
|
76
76
|
import {
|
|
77
77
|
init_cjs_shims
|
|
78
78
|
} from "./chunk-7GH3YGSC.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
inquirer_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GP4YLGE7.js";
|
|
4
4
|
import {
|
|
5
5
|
AuthenticatedCommand
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-J5VE25EA.js";
|
|
7
7
|
import {
|
|
8
8
|
require_lib
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VPOARVKJ.js";
|
|
10
10
|
import {
|
|
11
11
|
require_source
|
|
12
12
|
} from "./chunk-QDAKBUNO.js";
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
inquirer_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GP4YLGE7.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from "./chunk-
|
|
5
|
+
provisionApiClientFromDashboard,
|
|
6
|
+
startWorkspaceSelectionServer
|
|
7
|
+
} from "./chunk-T3EXEEYL.js";
|
|
8
|
+
import {
|
|
9
|
+
defaultBrowserAuthDeps
|
|
10
|
+
} from "./chunk-MODGIOPG.js";
|
|
8
11
|
import {
|
|
9
12
|
FragmentCommand,
|
|
10
13
|
require_lib
|
|
11
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VPOARVKJ.js";
|
|
12
15
|
import {
|
|
13
16
|
require_source
|
|
14
17
|
} from "./chunk-QDAKBUNO.js";
|
|
@@ -16,8 +19,8 @@ import {
|
|
|
16
19
|
FRAGMENT_ACCESS_TOKEN_PATH,
|
|
17
20
|
FRAGMENT_AUTH_PATH,
|
|
18
21
|
FRAGMENT_HOME,
|
|
19
|
-
|
|
20
|
-
} from "./chunk-
|
|
22
|
+
getDashboardUrl
|
|
23
|
+
} from "./chunk-B23ACFAK.js";
|
|
21
24
|
import {
|
|
22
25
|
__toESM,
|
|
23
26
|
init_cjs_shims
|
|
@@ -58,10 +61,6 @@ var Login = class _Login extends FragmentCommand {
|
|
|
58
61
|
required: false,
|
|
59
62
|
description: "The Workspace id. Omit to select a workspace after browser login."
|
|
60
63
|
}),
|
|
61
|
-
"mcp-url": import_core.Flags.string({
|
|
62
|
-
required: false,
|
|
63
|
-
description: "The Workspace MCP server origin (ex: https://mcp.us-west-2.fragment.dev). Used with --browser."
|
|
64
|
-
}),
|
|
65
64
|
"client-id": import_core.Flags.string({
|
|
66
65
|
description: "The API Client ID for your FRAGMENT Workspace.",
|
|
67
66
|
required: false
|
|
@@ -117,17 +116,17 @@ var Login = class _Login extends FragmentCommand {
|
|
|
117
116
|
this.log(`Credentials written to ${FRAGMENT_AUTH_PATH}`);
|
|
118
117
|
}
|
|
119
118
|
async browserLogin(flags) {
|
|
120
|
-
const
|
|
121
|
-
this.assert(authBaseUrl, {
|
|
122
|
-
message: "Must provide --mcp-url (or set FRAGMENT_MCP_URL) with --browser, e.g. https://mcp.us-west-2.fragment.dev"
|
|
123
|
-
});
|
|
124
|
-
const credentials = await provisionApiClient(
|
|
119
|
+
const credentials = await provisionApiClientFromDashboard(
|
|
125
120
|
{
|
|
126
|
-
|
|
121
|
+
dashboardUrl: getDashboardUrl(),
|
|
127
122
|
workspaceId: flags.workspace,
|
|
128
|
-
clientName: "Fragment CLI"
|
|
123
|
+
clientName: "Fragment CLI",
|
|
124
|
+
role: void 0
|
|
129
125
|
},
|
|
130
|
-
|
|
126
|
+
{
|
|
127
|
+
...defaultBrowserAuthDeps((msg) => this.log(msg)),
|
|
128
|
+
startWorkspaceSelection: startWorkspaceSelectionServer
|
|
129
|
+
}
|
|
131
130
|
);
|
|
132
131
|
await this.saveCredentials(
|
|
133
132
|
{
|