@eide/foir-cli 0.1.30 → 0.1.31
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/dist/codegen/generators/static-documents.d.ts.map +1 -1
- package/dist/codegen/generators/static-documents.js +4 -1
- package/dist/commands/api-keys.d.ts.map +1 -1
- package/dist/commands/api-keys.js +3 -1
- package/dist/commands/auth-config.d.ts.map +1 -1
- package/dist/commands/auth-config.js +4 -3
- package/dist/commands/auth-providers.d.ts.map +1 -1
- package/dist/commands/auth-providers.js +7 -2
- package/dist/commands/customer-profiles.d.ts.map +1 -1
- package/dist/commands/customer-profiles.js +3 -1
- package/dist/commands/customers.d.ts.map +1 -1
- package/dist/commands/customers.js +9 -3
- package/dist/commands/embeddings.d.ts.map +1 -1
- package/dist/commands/embeddings.js +9 -3
- package/dist/commands/experiments.d.ts.map +1 -1
- package/dist/commands/experiments.js +28 -9
- package/dist/commands/extensions.d.ts.map +1 -1
- package/dist/commands/extensions.js +18 -6
- package/dist/commands/files.d.ts.map +1 -1
- package/dist/commands/hooks.d.ts.map +1 -1
- package/dist/commands/hooks.js +14 -6
- package/dist/commands/locales.d.ts.map +1 -1
- package/dist/commands/locales.js +13 -4
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +0 -1
- package/dist/commands/models.d.ts.map +1 -1
- package/dist/commands/models.js +6 -2
- package/dist/commands/notes.d.ts.map +1 -1
- package/dist/commands/notes.js +4 -2
- package/dist/commands/notifications.d.ts.map +1 -1
- package/dist/commands/operations.d.ts.map +1 -1
- package/dist/commands/operations.js +16 -5
- package/dist/commands/records.d.ts.map +1 -1
- package/dist/commands/records.js +15 -5
- package/dist/commands/schedules.d.ts.map +1 -1
- package/dist/commands/schedules.js +7 -2
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/segments.d.ts.map +1 -1
- package/dist/commands/segments.js +17 -5
- package/dist/commands/select-project.js +3 -3
- package/dist/commands/settings.d.ts.map +1 -1
- package/dist/commands/settings.js +3 -1
- package/dist/commands/variant-catalog.d.ts.map +1 -1
- package/dist/commands/variant-catalog.js +10 -3
- package/dist/commands/whoami.js +1 -1
- package/dist/graphql/generated.d.ts +2 -10
- package/dist/graphql/generated.d.ts.map +1 -1
- package/dist/graphql/generated.js +2 -2
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +3 -0
- package/dist/lib/extension-helpers.d.ts.map +1 -1
- package/dist/lib/seed-helpers.d.ts.map +1 -1
- package/package.json +20 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static-documents.d.ts","sourceRoot":"","sources":["../../../src/codegen/generators/static-documents.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAquB1D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,QAAQ,CAAC,YAAY,CAAC,GAC9B,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"static-documents.d.ts","sourceRoot":"","sources":["../../../src/codegen/generators/static-documents.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAquB1D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,QAAQ,CAAC,YAAY,CAAC,GAC9B,kBAAkB,EAAE,CAqCtB"}
|
|
@@ -761,7 +761,10 @@ export function generateStaticDocuments(domains) {
|
|
|
761
761
|
if (domains.sharing)
|
|
762
762
|
files.push({ filename: 'sharing.graphql', content: sharingDocument() });
|
|
763
763
|
if (domains.embeddings)
|
|
764
|
-
files.push({
|
|
764
|
+
files.push({
|
|
765
|
+
filename: 'embeddings.graphql',
|
|
766
|
+
content: embeddingsDocument(),
|
|
767
|
+
});
|
|
765
768
|
if (domains.analytics)
|
|
766
769
|
files.push({ filename: 'analytics.graphql', content: analyticsDocument() });
|
|
767
770
|
return files;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../../src/commands/api-keys.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAYtD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,
|
|
1
|
+
{"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../../src/commands/api-keys.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAYtD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAmKN"}
|
|
@@ -65,7 +65,9 @@ export function registerApiKeysCommands(program, globalOpts) {
|
|
|
65
65
|
};
|
|
66
66
|
if (cmdOpts.projectId)
|
|
67
67
|
input.projectId = cmdOpts.projectId;
|
|
68
|
-
const data = await client.request(CreateApiKeyDocument, {
|
|
68
|
+
const data = await client.request(CreateApiKeyDocument, {
|
|
69
|
+
input,
|
|
70
|
+
});
|
|
69
71
|
if (opts.json || opts.jsonl) {
|
|
70
72
|
formatOutput(data.createApiKey, opts);
|
|
71
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-config.d.ts","sourceRoot":"","sources":["../../src/commands/auth-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAStD,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,
|
|
1
|
+
{"version":3,"file":"auth-config.d.ts","sourceRoot":"","sources":["../../src/commands/auth-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAStD,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CA2CN"}
|
|
@@ -19,8 +19,7 @@ export function registerAuthConfigCommands(program, globalOpts) {
|
|
|
19
19
|
// Mask the signing key unless --show-key is passed
|
|
20
20
|
if (!cmdOpts.showKey && config.signingKey) {
|
|
21
21
|
const key = config.signingKey;
|
|
22
|
-
config.signingKey =
|
|
23
|
-
key.slice(0, 4) + '…' + key.slice(-4);
|
|
22
|
+
config.signingKey = key.slice(0, 4) + '…' + key.slice(-4);
|
|
24
23
|
}
|
|
25
24
|
formatOutput(config, opts);
|
|
26
25
|
}));
|
|
@@ -31,7 +30,9 @@ export function registerAuthConfigCommands(program, globalOpts) {
|
|
|
31
30
|
.action(withErrorHandler(globalOpts, async (token) => {
|
|
32
31
|
const opts = globalOpts();
|
|
33
32
|
const client = await createClient(opts);
|
|
34
|
-
const data = await client.request(VerifyCustomerTokenDocument, {
|
|
33
|
+
const data = await client.request(VerifyCustomerTokenDocument, {
|
|
34
|
+
token,
|
|
35
|
+
});
|
|
35
36
|
formatOutput(data.verifyCustomerToken, opts);
|
|
36
37
|
}));
|
|
37
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-providers.d.ts","sourceRoot":"","sources":["../../src/commands/auth-providers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAsBtD,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,
|
|
1
|
+
{"version":3,"file":"auth-providers.d.ts","sourceRoot":"","sources":["../../src/commands/auth-providers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAsBtD,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAyQN"}
|
|
@@ -121,7 +121,9 @@ export function registerAuthProvidersCommands(program, globalOpts) {
|
|
|
121
121
|
if (cmdOpts.captureMetadata !== undefined)
|
|
122
122
|
input.captureMetadata = true;
|
|
123
123
|
const client = await createClient(opts);
|
|
124
|
-
const data = await client.request(CreateAuthProviderDocument, {
|
|
124
|
+
const data = await client.request(CreateAuthProviderDocument, {
|
|
125
|
+
input,
|
|
126
|
+
});
|
|
125
127
|
if (opts.json || opts.jsonl) {
|
|
126
128
|
formatOutput(data.createCustomerAuthProvider, opts);
|
|
127
129
|
}
|
|
@@ -170,7 +172,10 @@ export function registerAuthProvidersCommands(program, globalOpts) {
|
|
|
170
172
|
throw new Error('No update fields provided.');
|
|
171
173
|
}
|
|
172
174
|
const client = await createClient(opts);
|
|
173
|
-
const data = await client.request(UpdateAuthProviderDocument, {
|
|
175
|
+
const data = await client.request(UpdateAuthProviderDocument, {
|
|
176
|
+
id,
|
|
177
|
+
input,
|
|
178
|
+
});
|
|
174
179
|
if (opts.json || opts.jsonl) {
|
|
175
180
|
formatOutput(data.updateCustomerAuthProvider, opts);
|
|
176
181
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer-profiles.d.ts","sourceRoot":"","sources":["../../src/commands/customer-profiles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAYtD,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,
|
|
1
|
+
{"version":3,"file":"customer-profiles.d.ts","sourceRoot":"","sources":["../../src/commands/customer-profiles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAYtD,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAwIN"}
|
|
@@ -67,7 +67,9 @@ export function registerCustomerProfilesCommands(program, globalOpts) {
|
|
|
67
67
|
.action(withErrorHandler(globalOpts, async (customerId) => {
|
|
68
68
|
const opts = globalOpts();
|
|
69
69
|
const client = await createClient(opts);
|
|
70
|
-
const data = await client.request(GetCustomerProfileDocument, {
|
|
70
|
+
const data = await client.request(GetCustomerProfileDocument, {
|
|
71
|
+
customerId,
|
|
72
|
+
});
|
|
71
73
|
if (!data.customerProfile) {
|
|
72
74
|
throw new Error(`No profile found for customer "${customerId}".`);
|
|
73
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../src/commands/customers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAatD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,
|
|
1
|
+
{"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../src/commands/customers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAatD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAqJN"}
|
|
@@ -54,11 +54,15 @@ export function registerCustomersCommands(program, globalOpts) {
|
|
|
54
54
|
const client = await createClient(opts);
|
|
55
55
|
let result;
|
|
56
56
|
if (idOrEmail.includes('@')) {
|
|
57
|
-
const data = await client.request(GetCustomerByEmailDocument, {
|
|
57
|
+
const data = await client.request(GetCustomerByEmailDocument, {
|
|
58
|
+
email: idOrEmail,
|
|
59
|
+
});
|
|
58
60
|
result = data.customerByEmail;
|
|
59
61
|
}
|
|
60
62
|
else {
|
|
61
|
-
const data = await client.request(GetCustomerDocument, {
|
|
63
|
+
const data = await client.request(GetCustomerDocument, {
|
|
64
|
+
id: idOrEmail,
|
|
65
|
+
});
|
|
62
66
|
result = data.customer;
|
|
63
67
|
}
|
|
64
68
|
if (!result) {
|
|
@@ -90,7 +94,9 @@ export function registerCustomersCommands(program, globalOpts) {
|
|
|
90
94
|
if (!input.email) {
|
|
91
95
|
throw new Error('--email is required.');
|
|
92
96
|
}
|
|
93
|
-
const data = await client.request(CreateCustomerDocument, {
|
|
97
|
+
const data = await client.request(CreateCustomerDocument, {
|
|
98
|
+
input,
|
|
99
|
+
});
|
|
94
100
|
formatOutput(data.createCustomer, opts);
|
|
95
101
|
if (!(opts.json || opts.jsonl || opts.quiet)) {
|
|
96
102
|
success(`Created customer ${data.createCustomer.email}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embeddings.d.ts","sourceRoot":"","sources":["../../src/commands/embeddings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AActD,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,
|
|
1
|
+
{"version":3,"file":"embeddings.d.ts","sourceRoot":"","sources":["../../src/commands/embeddings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AActD,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAqKN"}
|
|
@@ -17,7 +17,9 @@ export function registerEmbeddingsCommands(program, globalOpts) {
|
|
|
17
17
|
const opts = globalOpts();
|
|
18
18
|
const client = await createClient(opts);
|
|
19
19
|
const input = await parseInputData(cmdOpts);
|
|
20
|
-
const data = await client.request(WriteEmbeddingsDocument, {
|
|
20
|
+
const data = await client.request(WriteEmbeddingsDocument, {
|
|
21
|
+
input,
|
|
22
|
+
});
|
|
21
23
|
formatOutput(data.writeEmbeddings, opts);
|
|
22
24
|
if (!(opts.json || opts.jsonl || opts.quiet))
|
|
23
25
|
success(`Wrote ${data.writeEmbeddings.written} embedding(s)`);
|
|
@@ -58,7 +60,9 @@ export function registerEmbeddingsCommands(program, globalOpts) {
|
|
|
58
60
|
if (cmdOpts.limit && !input.limit) {
|
|
59
61
|
input.limit = parseInt(String(cmdOpts.limit), 10);
|
|
60
62
|
}
|
|
61
|
-
const data = await client.request(SearchEmbeddingsDocument, {
|
|
63
|
+
const data = await client.request(SearchEmbeddingsDocument, {
|
|
64
|
+
input,
|
|
65
|
+
});
|
|
62
66
|
formatList(data.searchEmbeddings, opts, {
|
|
63
67
|
columns: [
|
|
64
68
|
{ key: 'recordId', header: 'Record ID', width: 28 },
|
|
@@ -81,7 +85,9 @@ export function registerEmbeddingsCommands(program, globalOpts) {
|
|
|
81
85
|
.action(withErrorHandler(globalOpts, async (recordId) => {
|
|
82
86
|
const opts = globalOpts();
|
|
83
87
|
const client = await createClient(opts);
|
|
84
|
-
const data = await client.request(EmbeddingsForRecordDocument, {
|
|
88
|
+
const data = await client.request(EmbeddingsForRecordDocument, {
|
|
89
|
+
recordId,
|
|
90
|
+
});
|
|
85
91
|
formatList(data.embeddingsForRecord, opts, {
|
|
86
92
|
columns: [
|
|
87
93
|
{ key: 'id', header: 'ID', width: 28 },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experiments.d.ts","sourceRoot":"","sources":["../../src/commands/experiments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAmBtD,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,
|
|
1
|
+
{"version":3,"file":"experiments.d.ts","sourceRoot":"","sources":["../../src/commands/experiments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAmBtD,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAkON"}
|
|
@@ -54,11 +54,15 @@ export function registerExperimentsCommands(program, globalOpts) {
|
|
|
54
54
|
const client = await createClient(opts);
|
|
55
55
|
let result;
|
|
56
56
|
if (isUUID(idOrKey)) {
|
|
57
|
-
const data = await client.request(GetExperimentDocument, {
|
|
57
|
+
const data = await client.request(GetExperimentDocument, {
|
|
58
|
+
id: idOrKey,
|
|
59
|
+
});
|
|
58
60
|
result = data.experiment;
|
|
59
61
|
}
|
|
60
62
|
else {
|
|
61
|
-
const data = await client.request(GetExperimentByKeyDocument, {
|
|
63
|
+
const data = await client.request(GetExperimentByKeyDocument, {
|
|
64
|
+
key: idOrKey,
|
|
65
|
+
});
|
|
62
66
|
result = data.experimentByKey;
|
|
63
67
|
}
|
|
64
68
|
if (!result)
|
|
@@ -75,7 +79,9 @@ export function registerExperimentsCommands(program, globalOpts) {
|
|
|
75
79
|
const opts = globalOpts();
|
|
76
80
|
const client = await createClient(opts);
|
|
77
81
|
const input = await parseInputData(cmdOpts);
|
|
78
|
-
const data = await client.request(CreateExperimentDocument, {
|
|
82
|
+
const data = await client.request(CreateExperimentDocument, {
|
|
83
|
+
input,
|
|
84
|
+
});
|
|
79
85
|
formatOutput(data.createExperiment, opts);
|
|
80
86
|
if (!(opts.json || opts.jsonl || opts.quiet))
|
|
81
87
|
success(`Created experiment ${data.createExperiment.key}`);
|
|
@@ -90,7 +96,10 @@ export function registerExperimentsCommands(program, globalOpts) {
|
|
|
90
96
|
const opts = globalOpts();
|
|
91
97
|
const client = await createClient(opts);
|
|
92
98
|
const input = await parseInputData(cmdOpts);
|
|
93
|
-
const data = await client.request(UpdateExperimentDocument, {
|
|
99
|
+
const data = await client.request(UpdateExperimentDocument, {
|
|
100
|
+
id,
|
|
101
|
+
input,
|
|
102
|
+
});
|
|
94
103
|
formatOutput(data.updateExperiment, opts);
|
|
95
104
|
if (!(opts.json || opts.jsonl || opts.quiet))
|
|
96
105
|
success(`Updated experiment ${id}`);
|
|
@@ -123,7 +132,9 @@ export function registerExperimentsCommands(program, globalOpts) {
|
|
|
123
132
|
.action(withErrorHandler(globalOpts, async (id) => {
|
|
124
133
|
const opts = globalOpts();
|
|
125
134
|
const client = await createClient(opts);
|
|
126
|
-
const data = await client.request(StartExperimentDocument, {
|
|
135
|
+
const data = await client.request(StartExperimentDocument, {
|
|
136
|
+
experimentId: id,
|
|
137
|
+
});
|
|
127
138
|
formatOutput(data.startExperiment, opts);
|
|
128
139
|
if (!(opts.json || opts.jsonl || opts.quiet))
|
|
129
140
|
success('Experiment started');
|
|
@@ -135,7 +146,9 @@ export function registerExperimentsCommands(program, globalOpts) {
|
|
|
135
146
|
.action(withErrorHandler(globalOpts, async (id) => {
|
|
136
147
|
const opts = globalOpts();
|
|
137
148
|
const client = await createClient(opts);
|
|
138
|
-
const data = await client.request(PauseExperimentDocument, {
|
|
149
|
+
const data = await client.request(PauseExperimentDocument, {
|
|
150
|
+
experimentId: id,
|
|
151
|
+
});
|
|
139
152
|
formatOutput(data.pauseExperiment, opts);
|
|
140
153
|
if (!(opts.json || opts.jsonl || opts.quiet))
|
|
141
154
|
success('Experiment paused');
|
|
@@ -147,7 +160,9 @@ export function registerExperimentsCommands(program, globalOpts) {
|
|
|
147
160
|
.action(withErrorHandler(globalOpts, async (id) => {
|
|
148
161
|
const opts = globalOpts();
|
|
149
162
|
const client = await createClient(opts);
|
|
150
|
-
const data = await client.request(ResumeExperimentDocument, {
|
|
163
|
+
const data = await client.request(ResumeExperimentDocument, {
|
|
164
|
+
experimentId: id,
|
|
165
|
+
});
|
|
151
166
|
formatOutput(data.resumeExperiment, opts);
|
|
152
167
|
if (!(opts.json || opts.jsonl || opts.quiet))
|
|
153
168
|
success('Experiment resumed');
|
|
@@ -159,7 +174,9 @@ export function registerExperimentsCommands(program, globalOpts) {
|
|
|
159
174
|
.action(withErrorHandler(globalOpts, async (id) => {
|
|
160
175
|
const opts = globalOpts();
|
|
161
176
|
const client = await createClient(opts);
|
|
162
|
-
const data = await client.request(EndExperimentDocument, {
|
|
177
|
+
const data = await client.request(EndExperimentDocument, {
|
|
178
|
+
experimentId: id,
|
|
179
|
+
});
|
|
163
180
|
formatOutput(data.endExperiment, opts);
|
|
164
181
|
if (!(opts.json || opts.jsonl || opts.quiet))
|
|
165
182
|
success('Experiment ended');
|
|
@@ -171,7 +188,9 @@ export function registerExperimentsCommands(program, globalOpts) {
|
|
|
171
188
|
.action(withErrorHandler(globalOpts, async (id) => {
|
|
172
189
|
const opts = globalOpts();
|
|
173
190
|
const client = await createClient(opts);
|
|
174
|
-
const data = await client.request(ExperimentStatsDocument, {
|
|
191
|
+
const data = await client.request(ExperimentStatsDocument, {
|
|
192
|
+
experimentId: id,
|
|
193
|
+
});
|
|
175
194
|
formatOutput(data.experimentStats, opts);
|
|
176
195
|
}));
|
|
177
196
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../src/commands/extensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAetD,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,
|
|
1
|
+
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../src/commands/extensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAetD,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAoQN"}
|
|
@@ -48,11 +48,15 @@ export function registerExtensionsCommands(program, globalOpts) {
|
|
|
48
48
|
const client = await createClient(opts);
|
|
49
49
|
let result;
|
|
50
50
|
if (isUUID(idOrKey)) {
|
|
51
|
-
const data = await client.request(GetExtensionDocument, {
|
|
51
|
+
const data = await client.request(GetExtensionDocument, {
|
|
52
|
+
id: idOrKey,
|
|
53
|
+
});
|
|
52
54
|
result = data.extension;
|
|
53
55
|
}
|
|
54
56
|
else {
|
|
55
|
-
const data = await client.request(GetExtensionByKeyDocument, {
|
|
57
|
+
const data = await client.request(GetExtensionByKeyDocument, {
|
|
58
|
+
key: idOrKey,
|
|
59
|
+
});
|
|
56
60
|
result = data.extensionByKey;
|
|
57
61
|
}
|
|
58
62
|
if (!result)
|
|
@@ -69,7 +73,9 @@ export function registerExtensionsCommands(program, globalOpts) {
|
|
|
69
73
|
const opts = globalOpts();
|
|
70
74
|
const client = await createClient(opts);
|
|
71
75
|
const input = await parseInputData(cmdOpts);
|
|
72
|
-
const data = await client.request(RegisterExtensionDocument, {
|
|
76
|
+
const data = await client.request(RegisterExtensionDocument, {
|
|
77
|
+
input,
|
|
78
|
+
});
|
|
73
79
|
formatOutput(data.registerExtension, opts);
|
|
74
80
|
if (!(opts.json || opts.jsonl || opts.quiet))
|
|
75
81
|
success(`Registered extension ${data.registerExtension.key}`);
|
|
@@ -100,7 +106,9 @@ Examples:
|
|
|
100
106
|
if (cmdOpts.force) {
|
|
101
107
|
input.force = true;
|
|
102
108
|
}
|
|
103
|
-
const data = await client.request(InstallExtensionDocument, {
|
|
109
|
+
const data = await client.request(InstallExtensionDocument, {
|
|
110
|
+
input,
|
|
111
|
+
});
|
|
104
112
|
const result = data.installExtension;
|
|
105
113
|
if (opts.json || opts.jsonl || opts.quiet) {
|
|
106
114
|
formatOutput(result, opts);
|
|
@@ -148,7 +156,9 @@ Examples:
|
|
|
148
156
|
let extensionKey;
|
|
149
157
|
if (isUUID(keyOrId)) {
|
|
150
158
|
extensionId = keyOrId;
|
|
151
|
-
const data = await client.request(GetExtensionDocument, {
|
|
159
|
+
const data = await client.request(GetExtensionDocument, {
|
|
160
|
+
id: keyOrId,
|
|
161
|
+
});
|
|
152
162
|
if (!data.extension) {
|
|
153
163
|
throw new Error(`Extension "${keyOrId}" not found.`);
|
|
154
164
|
}
|
|
@@ -184,7 +194,9 @@ Examples:
|
|
|
184
194
|
.action(withErrorHandler(globalOpts, async (id) => {
|
|
185
195
|
const opts = globalOpts();
|
|
186
196
|
const client = await createClient(opts);
|
|
187
|
-
const data = await client.request(TriggerExtensionSyncDocument, {
|
|
197
|
+
const data = await client.request(TriggerExtensionSyncDocument, {
|
|
198
|
+
extensionId: id,
|
|
199
|
+
});
|
|
188
200
|
if (opts.json || opts.jsonl) {
|
|
189
201
|
formatOutput(data.triggerExtensionSync, opts);
|
|
190
202
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/commands/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AActD,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/commands/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AActD,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CA6JN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/commands/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAgBtD,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/commands/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAgBtD,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAuON"}
|
package/dist/commands/hooks.js
CHANGED
|
@@ -4,9 +4,7 @@ import { formatOutput, formatList, timeAgo, success } from '../lib/output.js';
|
|
|
4
4
|
import { parseInputData, confirmAction } from '../lib/input.js';
|
|
5
5
|
import { ListHooksDocument, GetHookByKeyDocument, CreateHookDocument, UpdateHookDocument, DeleteHookDocument, HookDeliveriesDocument, RetryHookDeliveryDocument, TestHookDocument, } from '../graphql/generated.js';
|
|
6
6
|
export function registerHooksCommands(program, globalOpts) {
|
|
7
|
-
const hooks = program
|
|
8
|
-
.command('hooks')
|
|
9
|
-
.description('Manage event hooks');
|
|
7
|
+
const hooks = program.command('hooks').description('Manage event hooks');
|
|
10
8
|
// list
|
|
11
9
|
hooks
|
|
12
10
|
.command('list')
|
|
@@ -127,7 +125,12 @@ export function registerHooksCommands(program, globalOpts) {
|
|
|
127
125
|
{ key: 'event', header: 'Event', width: 22 },
|
|
128
126
|
{ key: 'status', header: 'Status', width: 10 },
|
|
129
127
|
{ key: 'attempts', header: 'Tries', width: 6 },
|
|
130
|
-
{
|
|
128
|
+
{
|
|
129
|
+
key: 'durationMs',
|
|
130
|
+
header: 'Duration',
|
|
131
|
+
width: 10,
|
|
132
|
+
format: (v) => (v ? `${v}ms` : '—'),
|
|
133
|
+
},
|
|
131
134
|
{ key: 'error', header: 'Error', width: 30 },
|
|
132
135
|
{
|
|
133
136
|
key: 'deliveredAt',
|
|
@@ -146,7 +149,9 @@ export function registerHooksCommands(program, globalOpts) {
|
|
|
146
149
|
.action(withErrorHandler(globalOpts, async (deliveryId) => {
|
|
147
150
|
const opts = globalOpts();
|
|
148
151
|
const client = await createClient(opts);
|
|
149
|
-
const data = await client.request(RetryHookDeliveryDocument, {
|
|
152
|
+
const data = await client.request(RetryHookDeliveryDocument, {
|
|
153
|
+
deliveryId,
|
|
154
|
+
});
|
|
150
155
|
formatOutput(data.retryHookDelivery, opts);
|
|
151
156
|
if (!(opts.json || opts.jsonl || opts.quiet)) {
|
|
152
157
|
const status = data.retryHookDelivery.status;
|
|
@@ -169,7 +174,10 @@ export function registerHooksCommands(program, globalOpts) {
|
|
|
169
174
|
if (cmdOpts.data || cmdOpts.file) {
|
|
170
175
|
testData = await parseInputData(cmdOpts);
|
|
171
176
|
}
|
|
172
|
-
const data = await client.request(TestHookDocument, {
|
|
177
|
+
const data = await client.request(TestHookDocument, {
|
|
178
|
+
hookId,
|
|
179
|
+
data: testData,
|
|
180
|
+
});
|
|
173
181
|
formatOutput(data.testHook, opts);
|
|
174
182
|
if (!(opts.json || opts.jsonl || opts.quiet)) {
|
|
175
183
|
const status = data.testHook.status;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../src/commands/locales.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAetD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../src/commands/locales.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAetD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CA8JN"}
|
package/dist/commands/locales.js
CHANGED
|
@@ -54,11 +54,15 @@ export function registerLocalesCommands(program, globalOpts) {
|
|
|
54
54
|
let result;
|
|
55
55
|
// Locale codes are short (e.g. "en", "en-US") — not UUIDs
|
|
56
56
|
if (/^[0-9a-f]{8}-/.test(idOrCode)) {
|
|
57
|
-
const data = await client.request(GetLocaleDocument, {
|
|
57
|
+
const data = await client.request(GetLocaleDocument, {
|
|
58
|
+
id: idOrCode,
|
|
59
|
+
});
|
|
58
60
|
result = data.locale;
|
|
59
61
|
}
|
|
60
62
|
else {
|
|
61
|
-
const data = await client.request(GetLocaleByCodeDocument, {
|
|
63
|
+
const data = await client.request(GetLocaleByCodeDocument, {
|
|
64
|
+
code: idOrCode,
|
|
65
|
+
});
|
|
62
66
|
result = data.localeByCode;
|
|
63
67
|
}
|
|
64
68
|
if (!result)
|
|
@@ -87,7 +91,9 @@ export function registerLocalesCommands(program, globalOpts) {
|
|
|
87
91
|
const opts = globalOpts();
|
|
88
92
|
const client = await createClient(opts);
|
|
89
93
|
const input = await parseInputData(cmdOpts);
|
|
90
|
-
const data = await client.request(CreateLocaleDocument, {
|
|
94
|
+
const data = await client.request(CreateLocaleDocument, {
|
|
95
|
+
input,
|
|
96
|
+
});
|
|
91
97
|
formatOutput(data.createLocale, opts);
|
|
92
98
|
if (!(opts.json || opts.jsonl || opts.quiet))
|
|
93
99
|
success(`Created locale ${data.createLocale.locale}`);
|
|
@@ -102,7 +108,10 @@ export function registerLocalesCommands(program, globalOpts) {
|
|
|
102
108
|
const opts = globalOpts();
|
|
103
109
|
const client = await createClient(opts);
|
|
104
110
|
const input = await parseInputData(cmdOpts);
|
|
105
|
-
const data = await client.request(UpdateLocaleDocument, {
|
|
111
|
+
const data = await client.request(UpdateLocaleDocument, {
|
|
112
|
+
id,
|
|
113
|
+
input,
|
|
114
|
+
});
|
|
106
115
|
formatOutput(data.updateLocale, opts);
|
|
107
116
|
if (!(opts.json || opts.jsonl || opts.quiet))
|
|
108
117
|
success(`Updated locale ${data.updateLocale.locale}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,OAAO,EAAa,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,OAAO,EAAa,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA2KjE,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CASN"}
|
package/dist/commands/login.js
CHANGED
|
@@ -113,7 +113,6 @@ async function loginAction(globalOpts) {
|
|
|
113
113
|
await writeCredentials(credentials);
|
|
114
114
|
console.log(`\n✓ Logged in as ${tokens.user.email}`);
|
|
115
115
|
console.log('\nRun `foir select-project` to choose a project.');
|
|
116
|
-
process.exit(0);
|
|
117
116
|
}
|
|
118
117
|
export function registerLoginCommand(program, globalOpts) {
|
|
119
118
|
program
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/commands/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AActD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/commands/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AActD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAyLN"}
|
package/dist/commands/models.js
CHANGED
|
@@ -60,7 +60,9 @@ export function registerModelsCommands(program, globalOpts) {
|
|
|
60
60
|
const opts = globalOpts();
|
|
61
61
|
const client = await createClient(opts);
|
|
62
62
|
const inputData = await parseInputData(cmdOpts);
|
|
63
|
-
const data = await client.request(CreateModelDocument, {
|
|
63
|
+
const data = await client.request(CreateModelDocument, {
|
|
64
|
+
input: inputData,
|
|
65
|
+
});
|
|
64
66
|
formatOutput(data.createModel, opts);
|
|
65
67
|
if (!(opts.json || opts.jsonl || opts.quiet)) {
|
|
66
68
|
success(`Created model ${data.createModel.key}`);
|
|
@@ -107,7 +109,9 @@ export function registerModelsCommands(program, globalOpts) {
|
|
|
107
109
|
if (!existing.modelByKey) {
|
|
108
110
|
throw new Error(`Model "${key}" not found.`);
|
|
109
111
|
}
|
|
110
|
-
await client.request(DeleteModelDocument, {
|
|
112
|
+
await client.request(DeleteModelDocument, {
|
|
113
|
+
id: existing.modelByKey.id,
|
|
114
|
+
});
|
|
111
115
|
if (opts.json || opts.jsonl) {
|
|
112
116
|
formatOutput({ deleted: true, key }, opts);
|
|
113
117
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notes.d.ts","sourceRoot":"","sources":["../../src/commands/notes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAatD,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,
|
|
1
|
+
{"version":3,"file":"notes.d.ts","sourceRoot":"","sources":["../../src/commands/notes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAatD,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAgJN"}
|
package/dist/commands/notes.js
CHANGED
|
@@ -31,7 +31,7 @@ export function registerNotesCommands(program, globalOpts) {
|
|
|
31
31
|
key: 'content',
|
|
32
32
|
header: 'Content',
|
|
33
33
|
width: 40,
|
|
34
|
-
format: (v) => typeof v === 'string' ? v : JSON.stringify(v),
|
|
34
|
+
format: (v) => (typeof v === 'string' ? v : JSON.stringify(v)),
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
key: 'author',
|
|
@@ -101,7 +101,9 @@ export function registerNotesCommands(program, globalOpts) {
|
|
|
101
101
|
const input = { noteId: id };
|
|
102
102
|
if (cmdOpts.resolution)
|
|
103
103
|
input.resolution = cmdOpts.resolution;
|
|
104
|
-
const data = await client.request(ResolveNoteDocument, {
|
|
104
|
+
const data = await client.request(ResolveNoteDocument, {
|
|
105
|
+
input,
|
|
106
|
+
});
|
|
105
107
|
formatOutput(data.resolveNote, opts);
|
|
106
108
|
if (!(opts.json || opts.jsonl || opts.quiet))
|
|
107
109
|
success(`Resolved note ${id}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/commands/notifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAUtD,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,
|
|
1
|
+
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/commands/notifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAUtD,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAuFN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/commands/operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAkBtD,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/commands/operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAkBtD,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAsVN"}
|
|
@@ -93,7 +93,9 @@ export function registerOperationsCommands(program, globalOpts) {
|
|
|
93
93
|
if (!(opts.json || opts.jsonl || opts.quiet)) {
|
|
94
94
|
console.log(`Streaming execution ${executionId}…`);
|
|
95
95
|
}
|
|
96
|
-
const baseUrl = opts.apiUrl ??
|
|
96
|
+
const baseUrl = opts.apiUrl ??
|
|
97
|
+
process.env.FOIR_API_URL ??
|
|
98
|
+
'http://localhost:4000';
|
|
97
99
|
const sseUrl = `${baseUrl}/api/operations/${executionId}/stream`;
|
|
98
100
|
const response = await fetch(sseUrl);
|
|
99
101
|
if (!response.ok || !response.body) {
|
|
@@ -159,7 +161,9 @@ export function registerOperationsCommands(program, globalOpts) {
|
|
|
159
161
|
.action(withErrorHandler(globalOpts, async (key) => {
|
|
160
162
|
const opts = globalOpts();
|
|
161
163
|
const client = await createClient(opts);
|
|
162
|
-
const data = await client.request(OperationExecutionStatsDocument, {
|
|
164
|
+
const data = await client.request(OperationExecutionStatsDocument, {
|
|
165
|
+
operationKey: key,
|
|
166
|
+
});
|
|
163
167
|
formatOutput(data.operationExecutionStats, opts);
|
|
164
168
|
}));
|
|
165
169
|
// dead-letters
|
|
@@ -233,7 +237,9 @@ export function registerOperationsCommands(program, globalOpts) {
|
|
|
233
237
|
const opts = globalOpts();
|
|
234
238
|
const client = await createClient(opts);
|
|
235
239
|
const input = await parseInputData(cmdOpts);
|
|
236
|
-
const data = await client.request(CreateOperationDocument, {
|
|
240
|
+
const data = await client.request(CreateOperationDocument, {
|
|
241
|
+
input,
|
|
242
|
+
});
|
|
237
243
|
formatOutput(data.createOperation, opts);
|
|
238
244
|
if (!(opts.json || opts.jsonl || opts.quiet))
|
|
239
245
|
success(`Created operation "${data.createOperation.key}"`);
|
|
@@ -248,7 +254,10 @@ export function registerOperationsCommands(program, globalOpts) {
|
|
|
248
254
|
const opts = globalOpts();
|
|
249
255
|
const client = await createClient(opts);
|
|
250
256
|
const input = await parseInputData(cmdOpts);
|
|
251
|
-
const data = await client.request(UpdateOperationDocument, {
|
|
257
|
+
const data = await client.request(UpdateOperationDocument, {
|
|
258
|
+
key,
|
|
259
|
+
input,
|
|
260
|
+
});
|
|
252
261
|
formatOutput(data.updateOperation, opts);
|
|
253
262
|
if (!(opts.json || opts.jsonl || opts.quiet))
|
|
254
263
|
success(`Updated operation "${key}"`);
|
|
@@ -260,7 +269,9 @@ export function registerOperationsCommands(program, globalOpts) {
|
|
|
260
269
|
.option('--confirm', 'Skip confirmation prompt')
|
|
261
270
|
.action(withErrorHandler(globalOpts, async (key, cmdOpts) => {
|
|
262
271
|
const opts = globalOpts();
|
|
263
|
-
const confirmed = await confirmAction(`Delete operation "${key}"?`, {
|
|
272
|
+
const confirmed = await confirmAction(`Delete operation "${key}"?`, {
|
|
273
|
+
confirm: !!cmdOpts.confirm,
|
|
274
|
+
});
|
|
264
275
|
if (!confirmed) {
|
|
265
276
|
console.log('Aborted.');
|
|
266
277
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../src/commands/records.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA6BtD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,
|
|
1
|
+
{"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../src/commands/records.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA6BtD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAuZN"}
|