@executor-js/cli 0.1.0 → 0.2.1
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/index.js +594 -329
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import path2 from "path";
|
|
|
10
10
|
import { Command } from "commander";
|
|
11
11
|
|
|
12
12
|
// ../sdk/src/index.ts
|
|
13
|
-
import { Context as Context2, Effect as
|
|
13
|
+
import { Context as Context2, Effect as Effect18, Layer as Layer5, Schema as Schema19, Data as Data6, Option as Option6 } from "effect";
|
|
14
14
|
import {
|
|
15
15
|
HttpApi,
|
|
16
16
|
HttpApiBuilder,
|
|
@@ -22,91 +22,90 @@ import {
|
|
|
22
22
|
} from "effect/unstable/httpapi";
|
|
23
23
|
|
|
24
24
|
// ../storage-core/src/factory.ts
|
|
25
|
-
import { Effect } from "effect";
|
|
25
|
+
import { Effect, Option, Schema } from "effect";
|
|
26
26
|
|
|
27
27
|
// ../storage-core/src/errors.ts
|
|
28
28
|
import { Data } from "effect";
|
|
29
29
|
var StorageError = class extends Data.TaggedError("StorageError") {
|
|
30
30
|
};
|
|
31
|
-
var UniqueViolationError = class extends Data.TaggedError(
|
|
32
|
-
"UniqueViolationError"
|
|
33
|
-
) {
|
|
31
|
+
var UniqueViolationError = class extends Data.TaggedError("UniqueViolationError") {
|
|
34
32
|
};
|
|
35
33
|
|
|
34
|
+
// ../storage-core/src/factory.ts
|
|
35
|
+
var decodeJsonFromString = Schema.decodeUnknownOption(Schema.UnknownFromJsonString);
|
|
36
|
+
|
|
36
37
|
// ../sdk/src/ids.ts
|
|
37
|
-
import { Schema } from "effect";
|
|
38
|
-
var ScopeId =
|
|
39
|
-
var ToolId =
|
|
40
|
-
var SecretId =
|
|
41
|
-
var PolicyId =
|
|
42
|
-
var ConnectionId =
|
|
38
|
+
import { Schema as Schema2 } from "effect";
|
|
39
|
+
var ScopeId = Schema2.String.pipe(Schema2.brand("ScopeId"));
|
|
40
|
+
var ToolId = Schema2.String.pipe(Schema2.brand("ToolId"));
|
|
41
|
+
var SecretId = Schema2.String.pipe(Schema2.brand("SecretId"));
|
|
42
|
+
var PolicyId = Schema2.String.pipe(Schema2.brand("PolicyId"));
|
|
43
|
+
var ConnectionId = Schema2.String.pipe(Schema2.brand("ConnectionId"));
|
|
44
|
+
var CredentialBindingId = Schema2.String.pipe(Schema2.brand("CredentialBindingId"));
|
|
43
45
|
|
|
44
46
|
// ../sdk/src/scope.ts
|
|
45
|
-
import { Schema as
|
|
46
|
-
var Scope = class extends
|
|
47
|
+
import { Schema as Schema3 } from "effect";
|
|
48
|
+
var Scope = class extends Schema3.Class("Scope")({
|
|
47
49
|
id: ScopeId,
|
|
48
|
-
name:
|
|
49
|
-
createdAt:
|
|
50
|
+
name: Schema3.String,
|
|
51
|
+
createdAt: Schema3.Date
|
|
50
52
|
}) {
|
|
51
53
|
};
|
|
52
54
|
|
|
53
55
|
// ../sdk/src/errors.ts
|
|
54
|
-
import { Data as Data2, Schema as
|
|
55
|
-
var ToolNotFoundError = class extends
|
|
56
|
+
import { Data as Data2, Schema as Schema4 } from "effect";
|
|
57
|
+
var ToolNotFoundError = class extends Schema4.TaggedErrorClass()(
|
|
56
58
|
"ToolNotFoundError",
|
|
57
59
|
{ toolId: ToolId }
|
|
58
60
|
) {
|
|
59
61
|
};
|
|
60
62
|
var ToolInvocationError = class extends Data2.TaggedError("ToolInvocationError") {
|
|
61
63
|
};
|
|
62
|
-
var PluginNotLoadedError = class extends
|
|
64
|
+
var PluginNotLoadedError = class extends Schema4.TaggedErrorClass()(
|
|
63
65
|
"PluginNotLoadedError",
|
|
64
66
|
{
|
|
65
|
-
pluginId:
|
|
67
|
+
pluginId: Schema4.String,
|
|
66
68
|
toolId: ToolId
|
|
67
69
|
}
|
|
68
70
|
) {
|
|
69
71
|
};
|
|
70
|
-
var NoHandlerError = class extends
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
pluginId: Schema3.String
|
|
75
|
-
}
|
|
76
|
-
) {
|
|
72
|
+
var NoHandlerError = class extends Schema4.TaggedErrorClass()("NoHandlerError", {
|
|
73
|
+
toolId: ToolId,
|
|
74
|
+
pluginId: Schema4.String
|
|
75
|
+
}) {
|
|
77
76
|
};
|
|
78
|
-
var ToolBlockedError = class extends
|
|
77
|
+
var ToolBlockedError = class extends Schema4.TaggedErrorClass()(
|
|
79
78
|
"ToolBlockedError",
|
|
80
79
|
{
|
|
81
80
|
toolId: ToolId,
|
|
82
|
-
pattern:
|
|
81
|
+
pattern: Schema4.String
|
|
83
82
|
}
|
|
84
83
|
) {
|
|
85
84
|
};
|
|
86
|
-
var SourceNotFoundError = class extends
|
|
85
|
+
var SourceNotFoundError = class extends Schema4.TaggedErrorClass()(
|
|
87
86
|
"SourceNotFoundError",
|
|
88
|
-
{ sourceId:
|
|
87
|
+
{ sourceId: Schema4.String }
|
|
89
88
|
) {
|
|
90
89
|
};
|
|
91
|
-
var SourceRemovalNotAllowedError = class extends
|
|
90
|
+
var SourceRemovalNotAllowedError = class extends Schema4.TaggedErrorClass()(
|
|
92
91
|
"SourceRemovalNotAllowedError",
|
|
93
|
-
{ sourceId:
|
|
92
|
+
{ sourceId: Schema4.String }
|
|
94
93
|
) {
|
|
95
94
|
};
|
|
96
|
-
var SecretNotFoundError = class extends
|
|
95
|
+
var SecretNotFoundError = class extends Schema4.TaggedErrorClass()(
|
|
97
96
|
"SecretNotFoundError",
|
|
98
97
|
{ secretId: SecretId }
|
|
99
98
|
) {
|
|
100
99
|
};
|
|
101
|
-
var SecretResolutionError = class extends
|
|
100
|
+
var SecretResolutionError = class extends Schema4.TaggedErrorClass()(
|
|
102
101
|
"SecretResolutionError",
|
|
103
102
|
{
|
|
104
103
|
secretId: SecretId,
|
|
105
|
-
message:
|
|
104
|
+
message: Schema4.String
|
|
106
105
|
}
|
|
107
106
|
) {
|
|
108
107
|
};
|
|
109
|
-
var SecretOwnedByConnectionError = class extends
|
|
108
|
+
var SecretOwnedByConnectionError = class extends Schema4.TaggedErrorClass()(
|
|
110
109
|
"SecretOwnedByConnectionError",
|
|
111
110
|
{
|
|
112
111
|
secretId: SecretId,
|
|
@@ -114,72 +113,87 @@ var SecretOwnedByConnectionError = class extends Schema3.TaggedErrorClass()(
|
|
|
114
113
|
}
|
|
115
114
|
) {
|
|
116
115
|
};
|
|
117
|
-
var
|
|
116
|
+
var SecretInUseError = class extends Schema4.TaggedErrorClass()(
|
|
117
|
+
"SecretInUseError",
|
|
118
|
+
{
|
|
119
|
+
secretId: SecretId,
|
|
120
|
+
usageCount: Schema4.Number
|
|
121
|
+
}
|
|
122
|
+
) {
|
|
123
|
+
};
|
|
124
|
+
var ConnectionNotFoundError = class extends Schema4.TaggedErrorClass()(
|
|
118
125
|
"ConnectionNotFoundError",
|
|
119
126
|
{ connectionId: ConnectionId }
|
|
120
127
|
) {
|
|
121
128
|
};
|
|
122
|
-
var ConnectionProviderNotRegisteredError = class extends
|
|
129
|
+
var ConnectionProviderNotRegisteredError = class extends Schema4.TaggedErrorClass()(
|
|
123
130
|
"ConnectionProviderNotRegisteredError",
|
|
124
131
|
{
|
|
125
|
-
provider:
|
|
126
|
-
connectionId:
|
|
132
|
+
provider: Schema4.String,
|
|
133
|
+
connectionId: Schema4.optional(ConnectionId)
|
|
127
134
|
}
|
|
128
135
|
) {
|
|
129
136
|
};
|
|
130
|
-
var ConnectionRefreshNotSupportedError = class extends
|
|
137
|
+
var ConnectionRefreshNotSupportedError = class extends Schema4.TaggedErrorClass()(
|
|
131
138
|
"ConnectionRefreshNotSupportedError",
|
|
132
139
|
{
|
|
133
140
|
connectionId: ConnectionId,
|
|
134
|
-
provider:
|
|
141
|
+
provider: Schema4.String
|
|
135
142
|
}
|
|
136
143
|
) {
|
|
137
144
|
};
|
|
138
|
-
var ConnectionReauthRequiredError = class extends
|
|
145
|
+
var ConnectionReauthRequiredError = class extends Schema4.TaggedErrorClass()(
|
|
139
146
|
"ConnectionReauthRequiredError",
|
|
140
147
|
{
|
|
141
148
|
connectionId: ConnectionId,
|
|
142
|
-
provider:
|
|
143
|
-
message:
|
|
149
|
+
provider: Schema4.String,
|
|
150
|
+
message: Schema4.String
|
|
151
|
+
}
|
|
152
|
+
) {
|
|
153
|
+
};
|
|
154
|
+
var ConnectionInUseError = class extends Schema4.TaggedErrorClass()(
|
|
155
|
+
"ConnectionInUseError",
|
|
156
|
+
{
|
|
157
|
+
connectionId: ConnectionId,
|
|
158
|
+
usageCount: Schema4.Number
|
|
144
159
|
}
|
|
145
160
|
) {
|
|
146
161
|
};
|
|
147
162
|
|
|
148
163
|
// ../sdk/src/types.ts
|
|
149
|
-
import { Schema as
|
|
150
|
-
var ToolSchema = class extends
|
|
164
|
+
import { Schema as Schema5 } from "effect";
|
|
165
|
+
var ToolSchema = class extends Schema5.Class("ToolSchema")({
|
|
151
166
|
id: ToolId,
|
|
152
|
-
name:
|
|
153
|
-
description:
|
|
154
|
-
inputSchema:
|
|
155
|
-
outputSchema:
|
|
156
|
-
inputTypeScript:
|
|
157
|
-
outputTypeScript:
|
|
158
|
-
typeScriptDefinitions:
|
|
159
|
-
Schema4.Record(Schema4.String, Schema4.String)
|
|
160
|
-
)
|
|
167
|
+
name: Schema5.optional(Schema5.String),
|
|
168
|
+
description: Schema5.optional(Schema5.String),
|
|
169
|
+
inputSchema: Schema5.optional(Schema5.Unknown),
|
|
170
|
+
outputSchema: Schema5.optional(Schema5.Unknown),
|
|
171
|
+
inputTypeScript: Schema5.optional(Schema5.String),
|
|
172
|
+
outputTypeScript: Schema5.optional(Schema5.String),
|
|
173
|
+
typeScriptDefinitions: Schema5.optional(Schema5.Record(Schema5.String, Schema5.String))
|
|
161
174
|
}) {
|
|
162
175
|
};
|
|
163
|
-
var SourceDetectionResult = class extends
|
|
176
|
+
var SourceDetectionResult = class extends Schema5.Class(
|
|
164
177
|
"SourceDetectionResult"
|
|
165
178
|
)({
|
|
166
179
|
/** Plugin id that recognized the URL (e.g. "openapi", "graphql"). */
|
|
167
|
-
kind:
|
|
180
|
+
kind: Schema5.String,
|
|
168
181
|
/** Confidence tier — UI uses this to pick a winner when multiple
|
|
169
182
|
* plugins claim a URL. */
|
|
170
|
-
confidence:
|
|
183
|
+
confidence: Schema5.Literals(["high", "medium", "low"]),
|
|
171
184
|
/** The (possibly normalized) endpoint the plugin will use. */
|
|
172
|
-
endpoint:
|
|
185
|
+
endpoint: Schema5.String,
|
|
173
186
|
/** Human-readable name suggestion, typically derived from spec title
|
|
174
187
|
* or URL hostname. */
|
|
175
|
-
name:
|
|
188
|
+
name: Schema5.String,
|
|
176
189
|
/** Namespace suggestion — the plugin's recommendation for the source
|
|
177
190
|
* id. UI may override. */
|
|
178
|
-
namespace:
|
|
191
|
+
namespace: Schema5.String
|
|
179
192
|
}) {
|
|
180
193
|
};
|
|
181
194
|
|
|
182
195
|
// ../sdk/src/core-schema.ts
|
|
196
|
+
var credentialBindingKinds = ["text", "secret", "connection"];
|
|
183
197
|
var coreSchema = {
|
|
184
198
|
source: {
|
|
185
199
|
fields: {
|
|
@@ -289,9 +303,8 @@ var coreSchema = {
|
|
|
289
303
|
fields: {
|
|
290
304
|
id: { type: "string", required: true },
|
|
291
305
|
scope_id: { type: "string", required: true, index: true },
|
|
292
|
-
/** Routing key into `plugin.connectionProviders`.
|
|
293
|
-
*
|
|
294
|
-
* `google-discovery:google`). Mirrors `secret.provider`. */
|
|
306
|
+
/** Routing key into `plugin.connectionProviders`. OAuth2 connections
|
|
307
|
+
* use the shared `oauth2` provider. Mirrors `secret.provider`. */
|
|
295
308
|
provider: { type: "string", required: true, index: true },
|
|
296
309
|
/** Display label shown in the Connections UI. Usually the account
|
|
297
310
|
* email / handle / org name the user signed in as. */
|
|
@@ -331,6 +344,26 @@ var coreSchema = {
|
|
|
331
344
|
created_at: { type: "date", required: true }
|
|
332
345
|
}
|
|
333
346
|
},
|
|
347
|
+
// Shared credential slot bindings. Plugins keep source-specific semantics
|
|
348
|
+
// local, but credential ownership and resolution use one scoped shape.
|
|
349
|
+
credential_binding: {
|
|
350
|
+
fields: {
|
|
351
|
+
id: { type: "string", required: true },
|
|
352
|
+
scope_id: { type: "string", required: true, index: true },
|
|
353
|
+
plugin_id: { type: "string", required: true, index: true },
|
|
354
|
+
source_id: { type: "string", required: true, index: true },
|
|
355
|
+
source_scope_id: { type: "string", required: true, index: true },
|
|
356
|
+
slot_key: { type: "string", required: true, index: true },
|
|
357
|
+
/** "text" | "secret" | "connection". */
|
|
358
|
+
kind: { type: credentialBindingKinds, required: true, index: true },
|
|
359
|
+
text_value: { type: "string", required: false },
|
|
360
|
+
secret_id: { type: "string", required: false, index: true },
|
|
361
|
+
secret_scope_id: { type: "string", required: false, index: true },
|
|
362
|
+
connection_id: { type: "string", required: false, index: true },
|
|
363
|
+
created_at: { type: "date", required: true },
|
|
364
|
+
updated_at: { type: "date", required: true }
|
|
365
|
+
}
|
|
366
|
+
},
|
|
334
367
|
// User-authored overrides for tool permissions. Each row is one rule:
|
|
335
368
|
// a glob-ish pattern + an action (approve / require_approval / block).
|
|
336
369
|
// Resolution walks the scope stack innermost-first, then `position`
|
|
@@ -365,84 +398,223 @@ var coreSchema = {
|
|
|
365
398
|
};
|
|
366
399
|
|
|
367
400
|
// ../sdk/src/policies.ts
|
|
368
|
-
import { Schema as
|
|
369
|
-
var ToolPolicyActionSchema =
|
|
370
|
-
"approve",
|
|
371
|
-
"require_approval",
|
|
372
|
-
"block"
|
|
373
|
-
]);
|
|
401
|
+
import { Match, Schema as Schema6 } from "effect";
|
|
402
|
+
var ToolPolicyActionSchema = Schema6.Literals(["approve", "require_approval", "block"]);
|
|
374
403
|
|
|
375
404
|
// ../sdk/src/secrets.ts
|
|
376
|
-
import { Schema as
|
|
377
|
-
var SecretRef = class extends
|
|
405
|
+
import { Schema as Schema7 } from "effect";
|
|
406
|
+
var SecretRef = class extends Schema7.Class("SecretRef")({
|
|
378
407
|
id: SecretId,
|
|
379
408
|
scopeId: ScopeId,
|
|
380
409
|
/** Human-readable label (e.g. "Cloudflare API Token") */
|
|
381
|
-
name:
|
|
410
|
+
name: Schema7.String,
|
|
382
411
|
/** Which provider holds the value */
|
|
383
|
-
provider:
|
|
384
|
-
createdAt:
|
|
412
|
+
provider: Schema7.String,
|
|
413
|
+
createdAt: Schema7.Date
|
|
385
414
|
}) {
|
|
386
415
|
};
|
|
387
|
-
var SetSecretInput = class extends
|
|
388
|
-
"SetSecretInput"
|
|
389
|
-
)({
|
|
416
|
+
var SetSecretInput = class extends Schema7.Class("SetSecretInput")({
|
|
390
417
|
id: SecretId,
|
|
391
418
|
/** Scope id to own this secret. Must be one of the executor's
|
|
392
419
|
* configured scopes. */
|
|
393
420
|
scope: ScopeId,
|
|
394
421
|
/** Display name shown in secret-list UI. */
|
|
395
|
-
name:
|
|
422
|
+
name: Schema7.String,
|
|
396
423
|
/** The secret value itself — never persisted outside the provider. */
|
|
397
|
-
value:
|
|
424
|
+
value: Schema7.String,
|
|
398
425
|
/** Optional provider routing. If unset the executor picks the first
|
|
399
426
|
* writable provider in registration order. */
|
|
400
|
-
provider:
|
|
427
|
+
provider: Schema7.optional(Schema7.String)
|
|
428
|
+
}) {
|
|
429
|
+
};
|
|
430
|
+
var RemoveSecretInput = class extends Schema7.Class("RemoveSecretInput")({
|
|
431
|
+
id: SecretId,
|
|
432
|
+
/** Scope id whose secret row/value should be removed. Must be one of
|
|
433
|
+
* the executor's configured scopes. */
|
|
434
|
+
targetScope: ScopeId
|
|
401
435
|
}) {
|
|
402
436
|
};
|
|
403
437
|
|
|
404
438
|
// ../sdk/src/secret-backed-value.ts
|
|
405
|
-
import { Effect as Effect3, Schema as
|
|
406
|
-
var SecretBackedValue =
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
secretId:
|
|
410
|
-
prefix:
|
|
439
|
+
import { Effect as Effect3, Schema as Schema8 } from "effect";
|
|
440
|
+
var SecretBackedValue = Schema8.Union([
|
|
441
|
+
Schema8.String,
|
|
442
|
+
Schema8.Struct({
|
|
443
|
+
secretId: Schema8.String,
|
|
444
|
+
prefix: Schema8.optional(Schema8.String)
|
|
411
445
|
})
|
|
412
446
|
]);
|
|
413
|
-
var SecretBackedMap =
|
|
447
|
+
var SecretBackedMap = Schema8.Record(Schema8.String, SecretBackedValue);
|
|
448
|
+
|
|
449
|
+
// ../sdk/src/credential-bindings.ts
|
|
450
|
+
import { Match as Match2, Schema as Schema9 } from "effect";
|
|
451
|
+
var CredentialBindingKind = Schema9.Literals(credentialBindingKinds);
|
|
452
|
+
var CredentialBindingValue = Schema9.Union([
|
|
453
|
+
Schema9.Struct({
|
|
454
|
+
kind: Schema9.Literal("text"),
|
|
455
|
+
text: Schema9.String
|
|
456
|
+
}),
|
|
457
|
+
Schema9.Struct({
|
|
458
|
+
kind: Schema9.Literal("secret"),
|
|
459
|
+
secretId: SecretId,
|
|
460
|
+
secretScopeId: Schema9.optional(ScopeId)
|
|
461
|
+
}),
|
|
462
|
+
Schema9.Struct({
|
|
463
|
+
kind: Schema9.Literal("connection"),
|
|
464
|
+
connectionId: ConnectionId
|
|
465
|
+
})
|
|
466
|
+
]);
|
|
467
|
+
var ConfiguredCredentialBindingSchema = Schema9.Struct({
|
|
468
|
+
kind: Schema9.Literal("binding"),
|
|
469
|
+
slot: Schema9.String,
|
|
470
|
+
prefix: Schema9.optional(Schema9.String)
|
|
471
|
+
});
|
|
472
|
+
var ConfiguredCredentialBinding = class extends Schema9.Class(
|
|
473
|
+
"ConfiguredCredentialBinding"
|
|
474
|
+
)(ConfiguredCredentialBindingSchema.fields) {
|
|
475
|
+
};
|
|
476
|
+
var ConfiguredCredentialValue = Schema9.Union([Schema9.String, ConfiguredCredentialBinding]);
|
|
477
|
+
var ConfiguredCredentialValueSchema = Schema9.Union([
|
|
478
|
+
Schema9.String,
|
|
479
|
+
ConfiguredCredentialBindingSchema
|
|
480
|
+
]);
|
|
481
|
+
var ScopedSecretCredentialInput = Schema9.Struct({
|
|
482
|
+
secretId: Schema9.String,
|
|
483
|
+
prefix: Schema9.optional(Schema9.String),
|
|
484
|
+
targetScope: ScopeId,
|
|
485
|
+
secretScopeId: Schema9.optional(ScopeId)
|
|
486
|
+
});
|
|
487
|
+
var CredentialBindingRef = class extends Schema9.Class(
|
|
488
|
+
"CredentialBindingRef"
|
|
489
|
+
)({
|
|
490
|
+
id: CredentialBindingId,
|
|
491
|
+
scopeId: ScopeId,
|
|
492
|
+
pluginId: Schema9.String,
|
|
493
|
+
sourceId: Schema9.String,
|
|
494
|
+
sourceScopeId: ScopeId,
|
|
495
|
+
slotKey: Schema9.String,
|
|
496
|
+
value: CredentialBindingValue,
|
|
497
|
+
createdAt: Schema9.Date,
|
|
498
|
+
updatedAt: Schema9.Date
|
|
499
|
+
}) {
|
|
500
|
+
};
|
|
501
|
+
var SetCredentialBindingInput = class extends Schema9.Class(
|
|
502
|
+
"SetCredentialBindingInput"
|
|
503
|
+
)({
|
|
504
|
+
targetScope: ScopeId,
|
|
505
|
+
pluginId: Schema9.String,
|
|
506
|
+
sourceId: Schema9.String,
|
|
507
|
+
sourceScope: ScopeId,
|
|
508
|
+
slotKey: Schema9.String,
|
|
509
|
+
value: CredentialBindingValue
|
|
510
|
+
}) {
|
|
511
|
+
};
|
|
512
|
+
var CredentialBindingSourceInput = class extends Schema9.Class(
|
|
513
|
+
"CredentialBindingSourceInput"
|
|
514
|
+
)({
|
|
515
|
+
pluginId: Schema9.String,
|
|
516
|
+
sourceId: Schema9.String,
|
|
517
|
+
sourceScope: ScopeId
|
|
518
|
+
}) {
|
|
519
|
+
};
|
|
520
|
+
var CredentialBindingSlotInput = class extends Schema9.Class(
|
|
521
|
+
"CredentialBindingSlotInput"
|
|
522
|
+
)({
|
|
523
|
+
pluginId: Schema9.String,
|
|
524
|
+
sourceId: Schema9.String,
|
|
525
|
+
sourceScope: ScopeId,
|
|
526
|
+
slotKey: Schema9.String
|
|
527
|
+
}) {
|
|
528
|
+
};
|
|
529
|
+
var RemoveCredentialBindingInput = class extends Schema9.Class(
|
|
530
|
+
"RemoveCredentialBindingInput"
|
|
531
|
+
)({
|
|
532
|
+
targetScope: ScopeId,
|
|
533
|
+
pluginId: Schema9.String,
|
|
534
|
+
sourceId: Schema9.String,
|
|
535
|
+
sourceScope: ScopeId,
|
|
536
|
+
slotKey: Schema9.String
|
|
537
|
+
}) {
|
|
538
|
+
};
|
|
539
|
+
var ReplaceCredentialBindingValue = class extends Schema9.Class(
|
|
540
|
+
"ReplaceCredentialBindingValue"
|
|
541
|
+
)({
|
|
542
|
+
slotKey: Schema9.String,
|
|
543
|
+
value: CredentialBindingValue
|
|
544
|
+
}) {
|
|
545
|
+
};
|
|
546
|
+
var ReplaceCredentialBindingsInput = class extends Schema9.Class(
|
|
547
|
+
"ReplaceCredentialBindingsInput"
|
|
548
|
+
)({
|
|
549
|
+
targetScope: ScopeId,
|
|
550
|
+
pluginId: Schema9.String,
|
|
551
|
+
sourceId: Schema9.String,
|
|
552
|
+
sourceScope: ScopeId,
|
|
553
|
+
slotPrefixes: Schema9.Array(Schema9.String),
|
|
554
|
+
bindings: Schema9.Array(ReplaceCredentialBindingValue)
|
|
555
|
+
}) {
|
|
556
|
+
};
|
|
557
|
+
var CredentialBindingResolutionStatus = Schema9.Literals([
|
|
558
|
+
"resolved",
|
|
559
|
+
"missing",
|
|
560
|
+
"blocked"
|
|
561
|
+
]);
|
|
562
|
+
var ResolvedCredentialSlot = class extends Schema9.Class(
|
|
563
|
+
"ResolvedCredentialSlot"
|
|
564
|
+
)({
|
|
565
|
+
pluginId: Schema9.String,
|
|
566
|
+
sourceId: Schema9.String,
|
|
567
|
+
sourceScopeId: ScopeId,
|
|
568
|
+
slotKey: Schema9.String,
|
|
569
|
+
bindingScopeId: Schema9.NullOr(ScopeId),
|
|
570
|
+
kind: Schema9.NullOr(CredentialBindingKind),
|
|
571
|
+
status: CredentialBindingResolutionStatus
|
|
572
|
+
}) {
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
// ../sdk/src/usages.ts
|
|
576
|
+
import { Schema as Schema10 } from "effect";
|
|
577
|
+
var Usage = class extends Schema10.Class("Usage")({
|
|
578
|
+
pluginId: Schema10.String,
|
|
579
|
+
scopeId: ScopeId,
|
|
580
|
+
ownerKind: Schema10.String,
|
|
581
|
+
ownerId: Schema10.String,
|
|
582
|
+
ownerName: Schema10.NullOr(Schema10.String),
|
|
583
|
+
slot: Schema10.String
|
|
584
|
+
}) {
|
|
585
|
+
};
|
|
414
586
|
|
|
415
587
|
// ../sdk/src/connections.ts
|
|
416
|
-
import { Data as Data3, Schema as
|
|
417
|
-
var ConnectionProviderState =
|
|
418
|
-
var ConnectionRef = class extends
|
|
588
|
+
import { Data as Data3, Schema as Schema11 } from "effect";
|
|
589
|
+
var ConnectionProviderState = Schema11.Record(Schema11.String, Schema11.Unknown);
|
|
590
|
+
var ConnectionRef = class extends Schema11.Class("ConnectionRef")({
|
|
419
591
|
id: ConnectionId,
|
|
420
592
|
scopeId: ScopeId,
|
|
421
|
-
provider:
|
|
422
|
-
identityLabel:
|
|
593
|
+
provider: Schema11.String,
|
|
594
|
+
identityLabel: Schema11.NullOr(Schema11.String),
|
|
423
595
|
accessTokenSecretId: SecretId,
|
|
424
|
-
refreshTokenSecretId:
|
|
596
|
+
refreshTokenSecretId: Schema11.NullOr(SecretId),
|
|
425
597
|
/** Epoch ms when the access token expires; null if not declared. */
|
|
426
|
-
expiresAt:
|
|
598
|
+
expiresAt: Schema11.NullOr(Schema11.Number),
|
|
427
599
|
/** OAuth-style scope string as returned by the token endpoint. Named
|
|
428
600
|
* `oauthScope` to avoid collision with the executor scope id. */
|
|
429
|
-
oauthScope:
|
|
430
|
-
providerState:
|
|
431
|
-
createdAt:
|
|
432
|
-
updatedAt:
|
|
601
|
+
oauthScope: Schema11.NullOr(Schema11.String),
|
|
602
|
+
providerState: Schema11.NullOr(ConnectionProviderState),
|
|
603
|
+
createdAt: Schema11.Date,
|
|
604
|
+
updatedAt: Schema11.Date
|
|
433
605
|
}) {
|
|
434
606
|
};
|
|
435
|
-
var TokenMaterial = class extends
|
|
607
|
+
var TokenMaterial = class extends Schema11.Class("TokenMaterial")({
|
|
436
608
|
/** Target secret id. Plugins typically derive this from the source id
|
|
437
609
|
* + a stable suffix (e.g. `${sourceId}.access_token`). */
|
|
438
610
|
secretId: SecretId,
|
|
439
611
|
/** Display name stamped on the secret row. Only visible to code — the
|
|
440
612
|
* Connections UI hides connection-owned secrets. */
|
|
441
|
-
name:
|
|
442
|
-
value:
|
|
613
|
+
name: Schema11.String,
|
|
614
|
+
value: Schema11.String
|
|
443
615
|
}) {
|
|
444
616
|
};
|
|
445
|
-
var CreateConnectionInput = class extends
|
|
617
|
+
var CreateConnectionInput = class extends Schema11.Class(
|
|
446
618
|
"CreateConnectionInput"
|
|
447
619
|
)({
|
|
448
620
|
id: ConnectionId,
|
|
@@ -450,304 +622,377 @@ var CreateConnectionInput = class extends Schema8.Class(
|
|
|
450
622
|
* secrets. This is the sharing boundary: a user scope is personal,
|
|
451
623
|
* an org/workspace scope is shared with descendants. */
|
|
452
624
|
scope: ScopeId,
|
|
453
|
-
provider:
|
|
454
|
-
identityLabel:
|
|
625
|
+
provider: Schema11.String,
|
|
626
|
+
identityLabel: Schema11.NullOr(Schema11.String),
|
|
455
627
|
accessToken: TokenMaterial,
|
|
456
|
-
refreshToken:
|
|
457
|
-
expiresAt:
|
|
628
|
+
refreshToken: Schema11.NullOr(TokenMaterial),
|
|
629
|
+
expiresAt: Schema11.NullOr(Schema11.Number),
|
|
458
630
|
/** OAuth-style scope string. Distinct from the executor scope above. */
|
|
459
|
-
oauthScope:
|
|
460
|
-
providerState:
|
|
631
|
+
oauthScope: Schema11.NullOr(Schema11.String),
|
|
632
|
+
providerState: Schema11.NullOr(ConnectionProviderState)
|
|
461
633
|
}) {
|
|
462
634
|
};
|
|
463
|
-
var ConnectionRefreshError = class extends Data3.TaggedError(
|
|
464
|
-
"ConnectionRefreshError"
|
|
465
|
-
) {
|
|
635
|
+
var ConnectionRefreshError = class extends Data3.TaggedError("ConnectionRefreshError") {
|
|
466
636
|
};
|
|
467
|
-
var UpdateConnectionTokensInput = class extends
|
|
637
|
+
var UpdateConnectionTokensInput = class extends Schema11.Class(
|
|
468
638
|
"UpdateConnectionTokensInput"
|
|
469
639
|
)({
|
|
470
640
|
id: ConnectionId,
|
|
471
|
-
accessToken:
|
|
472
|
-
refreshToken:
|
|
473
|
-
expiresAt:
|
|
474
|
-
oauthScope:
|
|
475
|
-
providerState:
|
|
476
|
-
identityLabel:
|
|
641
|
+
accessToken: Schema11.String,
|
|
642
|
+
refreshToken: Schema11.optional(Schema11.NullOr(Schema11.String)),
|
|
643
|
+
expiresAt: Schema11.optional(Schema11.NullOr(Schema11.Number)),
|
|
644
|
+
oauthScope: Schema11.optional(Schema11.NullOr(Schema11.String)),
|
|
645
|
+
providerState: Schema11.optional(Schema11.NullOr(ConnectionProviderState)),
|
|
646
|
+
identityLabel: Schema11.optional(Schema11.NullOr(Schema11.String))
|
|
647
|
+
}) {
|
|
648
|
+
};
|
|
649
|
+
var RemoveConnectionInput = class extends Schema11.Class(
|
|
650
|
+
"RemoveConnectionInput"
|
|
651
|
+
)({
|
|
652
|
+
id: ConnectionId,
|
|
653
|
+
/** Scope id whose connection row and owned token secrets should be removed. */
|
|
654
|
+
targetScope: ScopeId
|
|
477
655
|
}) {
|
|
478
656
|
};
|
|
479
657
|
|
|
480
658
|
// ../sdk/src/elicitation.ts
|
|
481
|
-
import { Schema as
|
|
482
|
-
var FormElicitation = class extends
|
|
483
|
-
message:
|
|
659
|
+
import { Schema as Schema12 } from "effect";
|
|
660
|
+
var FormElicitation = class extends Schema12.TaggedClass()("FormElicitation", {
|
|
661
|
+
message: Schema12.String,
|
|
484
662
|
/** JSON Schema describing the fields to collect */
|
|
485
|
-
requestedSchema:
|
|
663
|
+
requestedSchema: Schema12.Record(Schema12.String, Schema12.Unknown)
|
|
486
664
|
}) {
|
|
487
665
|
};
|
|
488
|
-
var UrlElicitation = class extends
|
|
489
|
-
message:
|
|
490
|
-
url:
|
|
666
|
+
var UrlElicitation = class extends Schema12.TaggedClass()("UrlElicitation", {
|
|
667
|
+
message: Schema12.String,
|
|
668
|
+
url: Schema12.String,
|
|
491
669
|
/** Unique ID so the host can correlate the callback */
|
|
492
|
-
elicitationId:
|
|
670
|
+
elicitationId: Schema12.String
|
|
493
671
|
}) {
|
|
494
672
|
};
|
|
495
|
-
var ElicitationAction =
|
|
496
|
-
var ElicitationResponse = class extends
|
|
673
|
+
var ElicitationAction = Schema12.Literals(["accept", "decline", "cancel"]);
|
|
674
|
+
var ElicitationResponse = class extends Schema12.Class("ElicitationResponse")({
|
|
497
675
|
action: ElicitationAction,
|
|
498
676
|
/** Present when action is "accept" — the data the user provided */
|
|
499
|
-
content:
|
|
677
|
+
content: Schema12.optional(Schema12.Record(Schema12.String, Schema12.Unknown))
|
|
500
678
|
}) {
|
|
501
679
|
};
|
|
502
|
-
var ElicitationDeclinedError = class extends
|
|
680
|
+
var ElicitationDeclinedError = class extends Schema12.TaggedErrorClass()(
|
|
503
681
|
"ElicitationDeclinedError",
|
|
504
682
|
{
|
|
505
683
|
toolId: ToolId,
|
|
506
|
-
action:
|
|
684
|
+
action: Schema12.Literals(["decline", "cancel"])
|
|
507
685
|
}
|
|
508
686
|
) {
|
|
509
687
|
};
|
|
510
688
|
|
|
511
689
|
// ../sdk/src/blob.ts
|
|
512
|
-
import { Effect as
|
|
690
|
+
import { Effect as Effect7 } from "effect";
|
|
513
691
|
|
|
514
692
|
// ../sdk/src/oauth.ts
|
|
515
|
-
import { Effect as
|
|
516
|
-
var OAuthDynamicDcrStrategy =
|
|
517
|
-
kind:
|
|
693
|
+
import { Effect as Effect8, Schema as Schema13 } from "effect";
|
|
694
|
+
var OAuthDynamicDcrStrategy = Schema13.Struct({
|
|
695
|
+
kind: Schema13.Literal("dynamic-dcr"),
|
|
518
696
|
/** Scopes to request. Defaults to whatever `scopes_supported`
|
|
519
697
|
* advertises; caller can narrow or extend. */
|
|
520
|
-
scopes:
|
|
698
|
+
scopes: Schema13.optional(Schema13.Array(Schema13.String))
|
|
521
699
|
});
|
|
522
|
-
var OAuthAuthorizationCodeStrategy =
|
|
523
|
-
kind:
|
|
524
|
-
authorizationEndpoint:
|
|
525
|
-
tokenEndpoint:
|
|
700
|
+
var OAuthAuthorizationCodeStrategy = Schema13.Struct({
|
|
701
|
+
kind: Schema13.Literal("authorization-code"),
|
|
702
|
+
authorizationEndpoint: Schema13.String,
|
|
703
|
+
tokenEndpoint: Schema13.String,
|
|
526
704
|
/** Expected authorization-server issuer for ID token validation. Some
|
|
527
705
|
* providers use a token endpoint host that differs from issuer, or a
|
|
528
706
|
* path-scoped issuer such as Okta custom authorization servers. */
|
|
529
|
-
issuerUrl:
|
|
707
|
+
issuerUrl: Schema13.optional(Schema13.NullOr(Schema13.String)),
|
|
530
708
|
/** Secret id holding the `client_id`. Using a secret row rather than
|
|
531
709
|
* an inline string so the value lives at the scope where the caller
|
|
532
710
|
* configured it and shadowing behaves consistently. */
|
|
533
|
-
clientIdSecretId:
|
|
711
|
+
clientIdSecretId: Schema13.String,
|
|
534
712
|
/** Secret id for `client_secret`. Null for public clients using
|
|
535
713
|
* PKCE without a confidential secret. */
|
|
536
|
-
clientSecretSecretId:
|
|
537
|
-
scopes:
|
|
714
|
+
clientSecretSecretId: Schema13.NullOr(Schema13.String),
|
|
715
|
+
scopes: Schema13.Array(Schema13.String),
|
|
538
716
|
/** Separator between scopes. RFC 6749 says space; some providers
|
|
539
717
|
* (GitHub classic) use comma. */
|
|
540
|
-
scopeSeparator:
|
|
718
|
+
scopeSeparator: Schema13.optional(Schema13.String),
|
|
541
719
|
/** Provider-specific params injected at authorization URL build time
|
|
542
720
|
* (Google's `access_type=offline`, `prompt=consent`, ...). */
|
|
543
|
-
extraAuthorizationParams:
|
|
544
|
-
Schema10.Record(Schema10.String, Schema10.String)
|
|
545
|
-
),
|
|
721
|
+
extraAuthorizationParams: Schema13.optional(Schema13.Record(Schema13.String, Schema13.String)),
|
|
546
722
|
/** `"body"` (default) sends client creds in the form body; `"basic"`
|
|
547
723
|
* uses HTTP Basic auth. Stripe-style servers require basic. */
|
|
548
|
-
clientAuth:
|
|
724
|
+
clientAuth: Schema13.optional(Schema13.Literals(["body", "basic"]))
|
|
549
725
|
});
|
|
550
|
-
var OAuthClientCredentialsStrategy =
|
|
551
|
-
kind:
|
|
552
|
-
tokenEndpoint:
|
|
553
|
-
clientIdSecretId:
|
|
554
|
-
clientSecretSecretId:
|
|
555
|
-
scopes:
|
|
556
|
-
scopeSeparator:
|
|
557
|
-
clientAuth:
|
|
726
|
+
var OAuthClientCredentialsStrategy = Schema13.Struct({
|
|
727
|
+
kind: Schema13.Literal("client-credentials"),
|
|
728
|
+
tokenEndpoint: Schema13.String,
|
|
729
|
+
clientIdSecretId: Schema13.String,
|
|
730
|
+
clientSecretSecretId: Schema13.String,
|
|
731
|
+
scopes: Schema13.optional(Schema13.Array(Schema13.String)),
|
|
732
|
+
scopeSeparator: Schema13.optional(Schema13.String),
|
|
733
|
+
clientAuth: Schema13.optional(Schema13.Literals(["body", "basic"]))
|
|
558
734
|
});
|
|
559
|
-
var OAuthStrategy =
|
|
735
|
+
var OAuthStrategy = Schema13.Union([
|
|
560
736
|
OAuthDynamicDcrStrategy,
|
|
561
737
|
OAuthAuthorizationCodeStrategy,
|
|
562
738
|
OAuthClientCredentialsStrategy
|
|
563
739
|
]);
|
|
564
|
-
var OAuthProviderState =
|
|
565
|
-
|
|
566
|
-
kind:
|
|
567
|
-
tokenEndpoint:
|
|
568
|
-
issuerUrl:
|
|
569
|
-
authorizationServerUrl:
|
|
570
|
-
authorizationServerMetadataUrl:
|
|
571
|
-
idTokenSigningAlgValuesSupported:
|
|
572
|
-
Schema10.Array(Schema10.String)
|
|
573
|
-
),
|
|
740
|
+
var OAuthProviderState = Schema13.Union([
|
|
741
|
+
Schema13.Struct({
|
|
742
|
+
kind: Schema13.Literal("dynamic-dcr"),
|
|
743
|
+
tokenEndpoint: Schema13.String,
|
|
744
|
+
issuerUrl: Schema13.optional(Schema13.NullOr(Schema13.String)),
|
|
745
|
+
authorizationServerUrl: Schema13.optional(Schema13.NullOr(Schema13.String)),
|
|
746
|
+
authorizationServerMetadataUrl: Schema13.NullOr(Schema13.String),
|
|
747
|
+
idTokenSigningAlgValuesSupported: Schema13.optional(Schema13.Array(Schema13.String)),
|
|
574
748
|
/** DCR-minted client_id. Embedded inline (not a secret) — DCR
|
|
575
749
|
* clients are public-ish by design; the secret part (if the AS
|
|
576
750
|
* issued one) is a separate secret row. */
|
|
577
|
-
clientId:
|
|
578
|
-
clientSecretSecretId:
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
751
|
+
clientId: Schema13.String,
|
|
752
|
+
clientSecretSecretId: Schema13.NullOr(Schema13.String),
|
|
753
|
+
clientSecretSecretScopeId: Schema13.optional(Schema13.NullOr(Schema13.String)),
|
|
754
|
+
clientAuth: Schema13.Literals(["body", "basic"]),
|
|
755
|
+
scopes: Schema13.Array(Schema13.String).pipe(Schema13.withDecodingDefaultType(Effect8.succeed([]))),
|
|
756
|
+
scopeSeparator: Schema13.optional(Schema13.String),
|
|
757
|
+
scope: Schema13.NullOr(Schema13.String),
|
|
758
|
+
/** RFC 8707 canonical resource URL. Replayed on refresh so the new
|
|
759
|
+
* access token's audience stays bound to the same resource. */
|
|
760
|
+
resource: Schema13.optional(Schema13.NullOr(Schema13.String))
|
|
583
761
|
}),
|
|
584
|
-
|
|
585
|
-
kind:
|
|
586
|
-
tokenEndpoint:
|
|
587
|
-
issuerUrl:
|
|
588
|
-
clientIdSecretId:
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
762
|
+
Schema13.Struct({
|
|
763
|
+
kind: Schema13.Literal("authorization-code"),
|
|
764
|
+
tokenEndpoint: Schema13.String,
|
|
765
|
+
issuerUrl: Schema13.optional(Schema13.NullOr(Schema13.String)),
|
|
766
|
+
clientIdSecretId: Schema13.String,
|
|
767
|
+
clientIdSecretScopeId: Schema13.optional(Schema13.NullOr(Schema13.String)),
|
|
768
|
+
clientSecretSecretId: Schema13.NullOr(Schema13.String),
|
|
769
|
+
clientSecretSecretScopeId: Schema13.optional(Schema13.NullOr(Schema13.String)),
|
|
770
|
+
clientAuth: Schema13.Literals(["body", "basic"]),
|
|
771
|
+
scopes: Schema13.Array(Schema13.String).pipe(Schema13.withDecodingDefaultType(Effect8.succeed([]))),
|
|
772
|
+
scopeSeparator: Schema13.optional(Schema13.String),
|
|
773
|
+
scope: Schema13.NullOr(Schema13.String),
|
|
774
|
+
resource: Schema13.optional(Schema13.NullOr(Schema13.String))
|
|
594
775
|
}),
|
|
595
|
-
|
|
596
|
-
kind:
|
|
597
|
-
tokenEndpoint:
|
|
598
|
-
clientIdSecretId:
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
776
|
+
Schema13.Struct({
|
|
777
|
+
kind: Schema13.Literal("client-credentials"),
|
|
778
|
+
tokenEndpoint: Schema13.String,
|
|
779
|
+
clientIdSecretId: Schema13.String,
|
|
780
|
+
clientIdSecretScopeId: Schema13.optional(Schema13.NullOr(Schema13.String)),
|
|
781
|
+
clientSecretSecretId: Schema13.String,
|
|
782
|
+
clientSecretSecretScopeId: Schema13.optional(Schema13.NullOr(Schema13.String)),
|
|
783
|
+
scopes: Schema13.Array(Schema13.String),
|
|
784
|
+
scopeSeparator: Schema13.optional(Schema13.String),
|
|
785
|
+
clientAuth: Schema13.Literals(["body", "basic"]),
|
|
786
|
+
scope: Schema13.NullOr(Schema13.String)
|
|
604
787
|
})
|
|
605
788
|
]);
|
|
606
|
-
var OAuthProbeError = class extends
|
|
789
|
+
var OAuthProbeError = class extends Schema13.TaggedErrorClass()(
|
|
607
790
|
"OAuthProbeError",
|
|
608
791
|
{
|
|
609
|
-
message:
|
|
610
|
-
}
|
|
792
|
+
message: Schema13.String
|
|
793
|
+
},
|
|
794
|
+
{ httpApiStatus: 400 }
|
|
611
795
|
) {
|
|
612
|
-
static annotations = { httpApiStatus: 400 };
|
|
613
796
|
};
|
|
614
|
-
var OAuthStartError = class extends
|
|
797
|
+
var OAuthStartError = class extends Schema13.TaggedErrorClass()(
|
|
615
798
|
"OAuthStartError",
|
|
616
799
|
{
|
|
617
|
-
message:
|
|
618
|
-
|
|
800
|
+
message: Schema13.String,
|
|
801
|
+
/** RFC 6749 §5.2 / RFC 7591 §3.2.2 error code propagated up from the
|
|
802
|
+
* authorization server (e.g. `invalid_client_metadata`). UI surfaces
|
|
803
|
+
* it as the structured "AS rejected the registration" reason. */
|
|
804
|
+
error: Schema13.optional(Schema13.String),
|
|
805
|
+
errorDescription: Schema13.optional(Schema13.String)
|
|
806
|
+
},
|
|
807
|
+
{ httpApiStatus: 400 }
|
|
619
808
|
) {
|
|
620
|
-
static annotations = { httpApiStatus: 400 };
|
|
621
809
|
};
|
|
622
|
-
var OAuthCompleteError = class extends
|
|
810
|
+
var OAuthCompleteError = class extends Schema13.TaggedErrorClass()(
|
|
623
811
|
"OAuthCompleteError",
|
|
624
812
|
{
|
|
625
|
-
message:
|
|
813
|
+
message: Schema13.String,
|
|
626
814
|
/** RFC 6749 §5.2 error code, when the token endpoint returned one.
|
|
627
815
|
* Callers distinguish terminal failures (`invalid_grant` ⇒
|
|
628
816
|
* re-auth required) from transient ones. */
|
|
629
|
-
code:
|
|
630
|
-
}
|
|
817
|
+
code: Schema13.optional(Schema13.String)
|
|
818
|
+
},
|
|
819
|
+
{ httpApiStatus: 400 }
|
|
631
820
|
) {
|
|
632
|
-
static annotations = { httpApiStatus: 400 };
|
|
633
821
|
};
|
|
634
|
-
var OAuthSessionNotFoundError = class extends
|
|
822
|
+
var OAuthSessionNotFoundError = class extends Schema13.TaggedErrorClass()(
|
|
635
823
|
"OAuthSessionNotFoundError",
|
|
636
824
|
{
|
|
637
|
-
sessionId:
|
|
638
|
-
}
|
|
825
|
+
sessionId: Schema13.String
|
|
826
|
+
},
|
|
827
|
+
{ httpApiStatus: 404 }
|
|
639
828
|
) {
|
|
640
|
-
static annotations = { httpApiStatus: 404 };
|
|
641
829
|
};
|
|
642
830
|
var OAUTH2_SESSION_TTL_MS = 15 * 60 * 1e3;
|
|
643
831
|
|
|
644
832
|
// ../sdk/src/oauth-helpers.ts
|
|
645
|
-
import { Data as Data4, Effect as
|
|
833
|
+
import { Data as Data4, Effect as Effect9, Predicate } from "effect";
|
|
646
834
|
var OAuth2Error = class extends Data4.TaggedError("OAuth2Error") {
|
|
647
835
|
};
|
|
836
|
+
var isOAuth2Error = Predicate.isTagged("OAuth2Error");
|
|
648
837
|
|
|
649
838
|
// ../sdk/src/oauth-service.ts
|
|
650
|
-
import { Effect as
|
|
839
|
+
import { Duration as Duration2, Effect as Effect11, Match as Match3, Option as Option3, Schema as Schema15 } from "effect";
|
|
840
|
+
import { FetchHttpClient as FetchHttpClient2, HttpClient as HttpClient2, HttpClientRequest as HttpClientRequest2 } from "effect/unstable/http";
|
|
651
841
|
|
|
652
842
|
// ../sdk/src/oauth-discovery.ts
|
|
653
|
-
import { Data as Data5, Effect as
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
) {
|
|
843
|
+
import { Data as Data5, Duration, Effect as Effect10, Option as Option2, Predicate as Predicate2, Result, Schema as Schema14 } from "effect";
|
|
844
|
+
import { FetchHttpClient, HttpClient, HttpClientRequest } from "effect/unstable/http";
|
|
845
|
+
var OAuthDiscoveryError = class extends Data5.TaggedError("OAuthDiscoveryError") {
|
|
657
846
|
};
|
|
658
|
-
var StringArray =
|
|
659
|
-
var OAuthProtectedResourceMetadataSchema =
|
|
660
|
-
resource:
|
|
661
|
-
authorization_servers:
|
|
662
|
-
scopes_supported:
|
|
663
|
-
bearer_methods_supported:
|
|
664
|
-
resource_documentation:
|
|
847
|
+
var StringArray = Schema14.Array(Schema14.String);
|
|
848
|
+
var OAuthProtectedResourceMetadataSchema = Schema14.Struct({
|
|
849
|
+
resource: Schema14.optional(Schema14.String),
|
|
850
|
+
authorization_servers: Schema14.optional(StringArray),
|
|
851
|
+
scopes_supported: Schema14.optional(StringArray),
|
|
852
|
+
bearer_methods_supported: Schema14.optional(StringArray),
|
|
853
|
+
resource_documentation: Schema14.optional(Schema14.String)
|
|
665
854
|
}).annotate({ identifier: "OAuthProtectedResourceMetadata" });
|
|
666
|
-
var OAuthAuthorizationServerMetadataSchema =
|
|
667
|
-
issuer:
|
|
668
|
-
authorization_endpoint:
|
|
669
|
-
token_endpoint:
|
|
670
|
-
registration_endpoint:
|
|
671
|
-
scopes_supported:
|
|
672
|
-
response_types_supported:
|
|
673
|
-
grant_types_supported:
|
|
674
|
-
code_challenge_methods_supported:
|
|
675
|
-
token_endpoint_auth_methods_supported:
|
|
676
|
-
revocation_endpoint:
|
|
677
|
-
introspection_endpoint:
|
|
678
|
-
userinfo_endpoint:
|
|
679
|
-
id_token_signing_alg_values_supported:
|
|
855
|
+
var OAuthAuthorizationServerMetadataSchema = Schema14.Struct({
|
|
856
|
+
issuer: Schema14.String,
|
|
857
|
+
authorization_endpoint: Schema14.String,
|
|
858
|
+
token_endpoint: Schema14.String,
|
|
859
|
+
registration_endpoint: Schema14.optional(Schema14.String),
|
|
860
|
+
scopes_supported: Schema14.optional(StringArray),
|
|
861
|
+
response_types_supported: Schema14.optional(StringArray),
|
|
862
|
+
grant_types_supported: Schema14.optional(StringArray),
|
|
863
|
+
code_challenge_methods_supported: Schema14.optional(StringArray),
|
|
864
|
+
token_endpoint_auth_methods_supported: Schema14.optional(StringArray),
|
|
865
|
+
revocation_endpoint: Schema14.optional(Schema14.String),
|
|
866
|
+
introspection_endpoint: Schema14.optional(Schema14.String),
|
|
867
|
+
userinfo_endpoint: Schema14.optional(Schema14.String),
|
|
868
|
+
id_token_signing_alg_values_supported: Schema14.optional(StringArray)
|
|
680
869
|
}).annotate({ identifier: "OAuthAuthorizationServerMetadata" });
|
|
681
|
-
var OAuthClientInformationSchema =
|
|
682
|
-
client_id:
|
|
683
|
-
client_secret:
|
|
684
|
-
client_id_issued_at:
|
|
685
|
-
client_secret_expires_at:
|
|
686
|
-
registration_access_token:
|
|
687
|
-
registration_client_uri:
|
|
688
|
-
token_endpoint_auth_method:
|
|
689
|
-
grant_types:
|
|
690
|
-
response_types:
|
|
691
|
-
redirect_uris:
|
|
692
|
-
client_name:
|
|
693
|
-
scope:
|
|
870
|
+
var OAuthClientInformationSchema = Schema14.Struct({
|
|
871
|
+
client_id: Schema14.String,
|
|
872
|
+
client_secret: Schema14.optional(Schema14.String),
|
|
873
|
+
client_id_issued_at: Schema14.optional(Schema14.Number),
|
|
874
|
+
client_secret_expires_at: Schema14.optional(Schema14.Number),
|
|
875
|
+
registration_access_token: Schema14.optional(Schema14.String),
|
|
876
|
+
registration_client_uri: Schema14.optional(Schema14.String),
|
|
877
|
+
token_endpoint_auth_method: Schema14.optional(Schema14.String),
|
|
878
|
+
grant_types: Schema14.optional(StringArray),
|
|
879
|
+
response_types: Schema14.optional(StringArray),
|
|
880
|
+
redirect_uris: Schema14.optional(StringArray),
|
|
881
|
+
client_name: Schema14.optional(Schema14.String),
|
|
882
|
+
scope: Schema14.optional(Schema14.String)
|
|
694
883
|
}).annotate({ identifier: "OAuthClientInformation" });
|
|
695
|
-
var
|
|
696
|
-
OAuthProtectedResourceMetadataSchema
|
|
697
|
-
);
|
|
698
|
-
var decodeAuthServerMetadata = Schema11.decodeUnknownEffect(
|
|
699
|
-
OAuthAuthorizationServerMetadataSchema
|
|
884
|
+
var decodeResourceMetadataJson = Schema14.decodeUnknownEffect(
|
|
885
|
+
Schema14.fromJsonString(OAuthProtectedResourceMetadataSchema)
|
|
700
886
|
);
|
|
701
|
-
var
|
|
702
|
-
|
|
887
|
+
var decodeAuthServerMetadata = Schema14.decodeUnknownEffect(OAuthAuthorizationServerMetadataSchema);
|
|
888
|
+
var decodeClientInformationJson = Schema14.decodeUnknownEffect(
|
|
889
|
+
Schema14.fromJsonString(OAuthClientInformationSchema)
|
|
703
890
|
);
|
|
704
891
|
var DcrErrorBody = class extends Data5.TaggedError("DcrErrorBody") {
|
|
705
892
|
};
|
|
706
893
|
var DcrTransport = class extends Data5.TaggedError("DcrTransport") {
|
|
707
894
|
};
|
|
895
|
+
var DcrErrorBodyJson = Schema14.Struct({
|
|
896
|
+
error: Schema14.String,
|
|
897
|
+
error_description: Schema14.optional(Schema14.String)
|
|
898
|
+
});
|
|
899
|
+
var decodeDcrErrorBodyJson = Schema14.decodeUnknownOption(Schema14.fromJsonString(DcrErrorBodyJson));
|
|
708
900
|
|
|
709
901
|
// ../sdk/src/oauth-service.ts
|
|
710
|
-
var OAuthAuthorizationServerMetadataJson =
|
|
711
|
-
var OAuthClientInformationJson =
|
|
712
|
-
var DynamicDcrSessionPayload =
|
|
713
|
-
kind:
|
|
714
|
-
identityLabel:
|
|
715
|
-
codeVerifier:
|
|
716
|
-
authorizationServerUrl:
|
|
717
|
-
authorizationServerMetadataUrl:
|
|
902
|
+
var OAuthAuthorizationServerMetadataJson = Schema15.Record(Schema15.String, Schema15.Unknown);
|
|
903
|
+
var OAuthClientInformationJson = Schema15.Record(Schema15.String, Schema15.Unknown);
|
|
904
|
+
var DynamicDcrSessionPayload = Schema15.Struct({
|
|
905
|
+
kind: Schema15.Literal("dynamic-dcr"),
|
|
906
|
+
identityLabel: Schema15.NullOr(Schema15.String),
|
|
907
|
+
codeVerifier: Schema15.String,
|
|
908
|
+
authorizationServerUrl: Schema15.String,
|
|
909
|
+
authorizationServerMetadataUrl: Schema15.String,
|
|
718
910
|
authorizationServerMetadata: OAuthAuthorizationServerMetadataJson,
|
|
719
911
|
clientInformation: OAuthClientInformationJson,
|
|
720
|
-
resourceMetadataUrl:
|
|
721
|
-
resourceMetadata:
|
|
722
|
-
|
|
723
|
-
)
|
|
724
|
-
scopes: Schema12.Array(Schema12.String)
|
|
912
|
+
resourceMetadataUrl: Schema15.NullOr(Schema15.String),
|
|
913
|
+
resourceMetadata: Schema15.NullOr(Schema15.Record(Schema15.String, Schema15.Unknown)),
|
|
914
|
+
scopes: Schema15.Array(Schema15.String),
|
|
915
|
+
resource: Schema15.NullOr(Schema15.String).pipe(Schema15.withDecodingDefaultType(Effect11.succeed(null)))
|
|
725
916
|
});
|
|
726
|
-
var AuthorizationCodeSessionPayload =
|
|
727
|
-
kind:
|
|
728
|
-
identityLabel:
|
|
729
|
-
codeVerifier:
|
|
730
|
-
authorizationEndpoint:
|
|
731
|
-
tokenEndpoint:
|
|
732
|
-
issuerUrl:
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
917
|
+
var AuthorizationCodeSessionPayload = Schema15.Struct({
|
|
918
|
+
kind: Schema15.Literal("authorization-code"),
|
|
919
|
+
identityLabel: Schema15.NullOr(Schema15.String),
|
|
920
|
+
codeVerifier: Schema15.String,
|
|
921
|
+
authorizationEndpoint: Schema15.String,
|
|
922
|
+
tokenEndpoint: Schema15.String,
|
|
923
|
+
issuerUrl: Schema15.NullOr(Schema15.String).pipe(
|
|
924
|
+
Schema15.withDecodingDefaultType(Effect11.succeed(null))
|
|
925
|
+
),
|
|
926
|
+
clientIdSecretId: Schema15.String,
|
|
927
|
+
clientIdSecretScopeId: Schema15.NullOr(Schema15.String).pipe(
|
|
928
|
+
Schema15.withDecodingDefaultType(Effect11.succeed(null))
|
|
929
|
+
),
|
|
930
|
+
clientSecretSecretId: Schema15.NullOr(Schema15.String),
|
|
931
|
+
clientSecretSecretScopeId: Schema15.NullOr(Schema15.String).pipe(
|
|
932
|
+
Schema15.withDecodingDefaultType(Effect11.succeed(null))
|
|
933
|
+
),
|
|
934
|
+
scopes: Schema15.Array(Schema15.String),
|
|
935
|
+
scopeSeparator: Schema15.optional(Schema15.String),
|
|
936
|
+
clientAuth: Schema15.Literals(["body", "basic"])
|
|
738
937
|
});
|
|
739
|
-
var OAuthSessionPayload =
|
|
938
|
+
var OAuthSessionPayload = Schema15.Union([
|
|
740
939
|
DynamicDcrSessionPayload,
|
|
741
940
|
AuthorizationCodeSessionPayload
|
|
742
941
|
]);
|
|
743
|
-
var decodeSessionPayload =
|
|
744
|
-
var encodeSessionPayload =
|
|
942
|
+
var decodeSessionPayload = Schema15.decodeUnknownSync(OAuthSessionPayload);
|
|
943
|
+
var encodeSessionPayload = Schema15.encodeSync(OAuthSessionPayload);
|
|
944
|
+
var UnknownFromJsonString = Schema15.fromJsonString(Schema15.Unknown);
|
|
945
|
+
var decodeUnknownJsonOption = Schema15.decodeUnknownOption(UnknownFromJsonString);
|
|
946
|
+
var decodeProviderStateSync = Schema15.decodeUnknownSync(OAuthProviderState);
|
|
947
|
+
var encodeProviderStateSync = Schema15.encodeSync(OAuthProviderState);
|
|
948
|
+
|
|
949
|
+
// ../sdk/src/hosted-http-client.ts
|
|
950
|
+
import { Effect as Effect12, Layer as Layer3, Schema as Schema16 } from "effect";
|
|
951
|
+
import { FetchHttpClient as FetchHttpClient3 } from "effect/unstable/http";
|
|
952
|
+
var HostedOutboundRequestBlocked = class extends Schema16.TaggedErrorClass()(
|
|
953
|
+
"HostedOutboundRequestBlocked",
|
|
954
|
+
{
|
|
955
|
+
url: Schema16.String,
|
|
956
|
+
reason: Schema16.String
|
|
957
|
+
}
|
|
958
|
+
) {
|
|
959
|
+
};
|
|
960
|
+
|
|
961
|
+
// ../sdk/src/plugin.ts
|
|
962
|
+
import { Effect as Effect13 } from "effect";
|
|
963
|
+
function definePlugin(authorFactory) {
|
|
964
|
+
return (options) => {
|
|
965
|
+
const {
|
|
966
|
+
storage: storageOverride,
|
|
967
|
+
...rest
|
|
968
|
+
} = options ?? {};
|
|
969
|
+
const hasAuthorOptions = Object.keys(rest).length > 0;
|
|
970
|
+
const spec = authorFactory(hasAuthorOptions ? rest : void 0);
|
|
971
|
+
return {
|
|
972
|
+
...spec,
|
|
973
|
+
storage: storageOverride ?? spec.storage
|
|
974
|
+
};
|
|
975
|
+
};
|
|
976
|
+
}
|
|
745
977
|
|
|
746
978
|
// ../sdk/src/executor.ts
|
|
747
|
-
import {
|
|
979
|
+
import {
|
|
980
|
+
Context,
|
|
981
|
+
Deferred,
|
|
982
|
+
Effect as Effect15,
|
|
983
|
+
Match as Match5,
|
|
984
|
+
Option as Option5,
|
|
985
|
+
Result as Result2,
|
|
986
|
+
Schema as Schema17,
|
|
987
|
+
Semaphore
|
|
988
|
+
} from "effect";
|
|
989
|
+
import { FetchHttpClient as FetchHttpClient4 } from "effect/unstable/http";
|
|
990
|
+
|
|
991
|
+
// ../sdk/src/schema-types.ts
|
|
992
|
+
import { Match as Match4, Option as Option4 } from "effect";
|
|
748
993
|
|
|
749
994
|
// ../sdk/src/scoped-adapter.ts
|
|
750
|
-
import { Effect as
|
|
995
|
+
import { Effect as Effect14 } from "effect";
|
|
751
996
|
|
|
752
997
|
// ../sdk/src/executor.ts
|
|
753
998
|
var collectSchemas = (plugins) => {
|
|
@@ -756,22 +1001,68 @@ var collectSchemas = (plugins) => {
|
|
|
756
1001
|
if (!plugin.schema) continue;
|
|
757
1002
|
for (const [modelKey, model] of Object.entries(plugin.schema)) {
|
|
758
1003
|
if (merged[modelKey]) {
|
|
759
|
-
throw new
|
|
760
|
-
`Duplicate model "${modelKey}" contributed by plugin "${plugin.id}" (reserved by core or another plugin)
|
|
761
|
-
|
|
1004
|
+
throw new StorageError({
|
|
1005
|
+
message: `Duplicate model "${modelKey}" contributed by plugin "${plugin.id}" (reserved by core or another plugin)`,
|
|
1006
|
+
cause: void 0
|
|
1007
|
+
});
|
|
762
1008
|
}
|
|
763
1009
|
merged[modelKey] = model;
|
|
764
1010
|
}
|
|
765
1011
|
}
|
|
766
1012
|
return merged;
|
|
767
1013
|
};
|
|
768
|
-
var
|
|
769
|
-
|
|
770
|
-
|
|
1014
|
+
var decodeJsonFromString2 = Schema17.decodeUnknownOption(Schema17.UnknownFromJsonString);
|
|
1015
|
+
var decodeProviderState = Schema17.decodeUnknownOption(ConnectionProviderState);
|
|
1016
|
+
var activeAdapterRef = Context.Reference("executor/ActiveAdapter", {
|
|
1017
|
+
defaultValue: () => null
|
|
1018
|
+
});
|
|
1019
|
+
var activeRawAdapterRef = Context.Reference(
|
|
1020
|
+
"executor/ActiveRawAdapter",
|
|
1021
|
+
{
|
|
1022
|
+
defaultValue: () => null
|
|
1023
|
+
}
|
|
771
1024
|
);
|
|
772
1025
|
|
|
773
1026
|
// ../storage-core/src/testing/memory.ts
|
|
774
|
-
import { Effect as
|
|
1027
|
+
import { Effect as Effect16, Match as Match6 } from "effect";
|
|
1028
|
+
|
|
1029
|
+
// ../sdk/src/test-config.ts
|
|
1030
|
+
import { Effect as Effect17 } from "effect";
|
|
1031
|
+
var memorySecretsPlugin = definePlugin(() => {
|
|
1032
|
+
const store = /* @__PURE__ */ new Map();
|
|
1033
|
+
const provider = {
|
|
1034
|
+
key: "memory",
|
|
1035
|
+
writable: true,
|
|
1036
|
+
get: (id, scope) => Effect17.sync(() => store.get(`${scope}\0${id}`) ?? null),
|
|
1037
|
+
set: (id, value, scope) => Effect17.sync(() => {
|
|
1038
|
+
store.set(`${scope}\0${id}`, value);
|
|
1039
|
+
}),
|
|
1040
|
+
delete: (id, scope) => Effect17.sync(() => store.delete(`${scope}\0${id}`)),
|
|
1041
|
+
list: () => Effect17.sync(
|
|
1042
|
+
() => Array.from(store.keys()).map((key) => {
|
|
1043
|
+
const name = key.split("\0", 2)[1] ?? key;
|
|
1044
|
+
return { id: name, name };
|
|
1045
|
+
})
|
|
1046
|
+
)
|
|
1047
|
+
};
|
|
1048
|
+
return {
|
|
1049
|
+
id: "memory-secrets",
|
|
1050
|
+
storage: () => ({}),
|
|
1051
|
+
secretProviders: [provider]
|
|
1052
|
+
};
|
|
1053
|
+
});
|
|
1054
|
+
|
|
1055
|
+
// ../sdk/src/api-errors.ts
|
|
1056
|
+
import { Schema as Schema18 } from "effect";
|
|
1057
|
+
var InternalError = class extends Schema18.TaggedErrorClass()(
|
|
1058
|
+
"InternalError",
|
|
1059
|
+
{
|
|
1060
|
+
/** Opaque correlation id for backend lookup (Sentry event id, log line, etc.). */
|
|
1061
|
+
traceId: Schema18.String
|
|
1062
|
+
},
|
|
1063
|
+
{ httpApiStatus: 500 }
|
|
1064
|
+
) {
|
|
1065
|
+
};
|
|
775
1066
|
|
|
776
1067
|
// src/utils/get-config.ts
|
|
777
1068
|
import { existsSync } from "fs";
|
|
@@ -827,9 +1118,7 @@ var getType = (name, field, dialect) => {
|
|
|
827
1118
|
mysql: `mysqlEnum([${type.map((x) => `'${x}'`).join(", ")}])`
|
|
828
1119
|
}[dialect];
|
|
829
1120
|
}
|
|
830
|
-
throw new TypeError(
|
|
831
|
-
`Invalid field type for field ${name}`
|
|
832
|
-
);
|
|
1121
|
+
throw new TypeError(`Invalid field type for field ${name}`);
|
|
833
1122
|
}
|
|
834
1123
|
const typeMap = {
|
|
835
1124
|
string: {
|
|
@@ -870,17 +1159,11 @@ var getType = (name, field, dialect) => {
|
|
|
870
1159
|
};
|
|
871
1160
|
const dbTypeMap = typeMap[type];
|
|
872
1161
|
if (!dbTypeMap) {
|
|
873
|
-
throw new Error(
|
|
874
|
-
`Unsupported field type '${field.type}' for field '${name}'.`
|
|
875
|
-
);
|
|
1162
|
+
throw new Error(`Unsupported field type '${field.type}' for field '${name}'.`);
|
|
876
1163
|
}
|
|
877
1164
|
return dbTypeMap[dialect];
|
|
878
1165
|
};
|
|
879
|
-
var generateDrizzleSchema = async ({
|
|
880
|
-
schema,
|
|
881
|
-
dialect,
|
|
882
|
-
file
|
|
883
|
-
}) => {
|
|
1166
|
+
var generateDrizzleSchema = async ({ schema, dialect, file }) => {
|
|
884
1167
|
const filePath = file || "./executor-schema.ts";
|
|
885
1168
|
const fileExist = existsSync2(filePath);
|
|
886
1169
|
let code = generateImport({ dialect, schema });
|
|
@@ -1033,10 +1316,7 @@ ${block}
|
|
|
1033
1316
|
const hasOne = singleRelations.length > 0;
|
|
1034
1317
|
const hasMany = manyRelations.length > 0;
|
|
1035
1318
|
if (hasOne || hasMany) {
|
|
1036
|
-
const destructured = [
|
|
1037
|
-
hasOne ? "one" : "",
|
|
1038
|
-
hasMany ? "many" : ""
|
|
1039
|
-
].filter(Boolean).join(", ");
|
|
1319
|
+
const destructured = [hasOne ? "one" : "", hasMany ? "many" : ""].filter(Boolean).join(", ");
|
|
1040
1320
|
const body = [
|
|
1041
1321
|
...singleRelations.filter((r) => r.reference).map(
|
|
1042
1322
|
(r) => ` ${r.key}: one(${r.model}, {
|
|
@@ -1044,9 +1324,7 @@ ${block}
|
|
|
1044
1324
|
references: [${r.reference.references}],
|
|
1045
1325
|
})`
|
|
1046
1326
|
),
|
|
1047
|
-
...manyRelations.map(
|
|
1048
|
-
({ key, model }) => ` ${key}: many(${model})`
|
|
1049
|
-
)
|
|
1327
|
+
...manyRelations.map(({ key, model }) => ` ${key}: many(${model})`)
|
|
1050
1328
|
].join(",\n");
|
|
1051
1329
|
const block = `export const ${modelName}Relations = relations(${modelName}, ({ ${destructured} }) => ({
|
|
1052
1330
|
${body}
|
|
@@ -1064,10 +1342,7 @@ ${relationsString}`;
|
|
|
1064
1342
|
overwrite: fileExist
|
|
1065
1343
|
};
|
|
1066
1344
|
};
|
|
1067
|
-
function generateImport({
|
|
1068
|
-
dialect,
|
|
1069
|
-
schema
|
|
1070
|
-
}) {
|
|
1345
|
+
function generateImport({ dialect, schema }) {
|
|
1071
1346
|
const rootImports = [];
|
|
1072
1347
|
const coreImports = [];
|
|
1073
1348
|
let hasBigint = false;
|
|
@@ -1172,17 +1447,7 @@ async function generateAction(opts) {
|
|
|
1172
1447
|
await fs.writeFile(outPath, result.code);
|
|
1173
1448
|
console.log(`Schema generated: ${path2.relative(cwd, outPath)}`);
|
|
1174
1449
|
}
|
|
1175
|
-
var generate = new Command("generate").description("Generate a drizzle schema file from the executor config").option(
|
|
1176
|
-
"-c, --cwd <cwd>",
|
|
1177
|
-
"the working directory",
|
|
1178
|
-
process.cwd()
|
|
1179
|
-
).option(
|
|
1180
|
-
"--config <config>",
|
|
1181
|
-
"path to the executor config file"
|
|
1182
|
-
).option(
|
|
1183
|
-
"--output <output>",
|
|
1184
|
-
"output file path for the generated schema"
|
|
1185
|
-
).action(generateAction);
|
|
1450
|
+
var generate = new Command("generate").description("Generate a drizzle schema file from the executor config").option("-c, --cwd <cwd>", "the working directory", process.cwd()).option("--config <config>", "path to the executor config file").option("--output <output>", "output file path for the generated schema").action(generateAction);
|
|
1186
1451
|
|
|
1187
1452
|
// src/index.ts
|
|
1188
1453
|
process.on("SIGINT", () => process.exit(0));
|