@autohq/cli 0.1.249 → 0.1.251
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/agent-bridge.js +51 -7
- package/dist/index.js +86 -19
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -23340,7 +23340,7 @@ Object.assign(lookup, {
|
|
|
23340
23340
|
// package.json
|
|
23341
23341
|
var package_default = {
|
|
23342
23342
|
name: "@autohq/cli",
|
|
23343
|
-
version: "0.1.
|
|
23343
|
+
version: "0.1.251",
|
|
23344
23344
|
license: "SEE LICENSE IN README.md",
|
|
23345
23345
|
publishConfig: {
|
|
23346
23346
|
access: "public"
|
|
@@ -25721,20 +25721,27 @@ var SecretReferenceSchema = external_exports.object({
|
|
|
25721
25721
|
var NoToolAuthSchema = external_exports.object({
|
|
25722
25722
|
kind: external_exports.literal("none")
|
|
25723
25723
|
});
|
|
25724
|
+
var OptionalConnectionField = {
|
|
25725
|
+
optional: external_exports.boolean().optional()
|
|
25726
|
+
};
|
|
25724
25727
|
var McpOAuthToolAuthSchema = external_exports.object({
|
|
25725
25728
|
kind: external_exports.literal("mcp_oauth"),
|
|
25726
|
-
connection: ResourceNameSchema
|
|
25729
|
+
connection: ResourceNameSchema,
|
|
25730
|
+
...OptionalConnectionField
|
|
25727
25731
|
});
|
|
25728
25732
|
var ConnectionToolAuthSchema = ProviderConnectionReferenceSchema.extend({
|
|
25729
|
-
kind: external_exports.literal("connection")
|
|
25733
|
+
kind: external_exports.literal("connection"),
|
|
25734
|
+
...OptionalConnectionField
|
|
25730
25735
|
});
|
|
25731
25736
|
var ConnectionsToolAuthSchema = external_exports.object({
|
|
25732
25737
|
kind: external_exports.literal("connections"),
|
|
25733
|
-
connections: external_exports.array(ProviderConnectionReferenceSchema).min(1)
|
|
25738
|
+
connections: external_exports.array(ProviderConnectionReferenceSchema).min(1),
|
|
25739
|
+
...OptionalConnectionField
|
|
25734
25740
|
});
|
|
25735
25741
|
var ConnectionBackedToolSchema = ProviderConnectionReferenceSchema.extend({
|
|
25736
25742
|
kind: external_exports.literal("connection"),
|
|
25737
|
-
description: external_exports.string().trim().min(1).optional()
|
|
25743
|
+
description: external_exports.string().trim().min(1).optional(),
|
|
25744
|
+
...OptionalConnectionField
|
|
25738
25745
|
});
|
|
25739
25746
|
var ToolAliasSchema = ResourceNameSchema.refine(
|
|
25740
25747
|
(value2) => value2 !== "workspace",
|
|
@@ -25773,7 +25780,8 @@ function remoteMcpToolSchema(input) {
|
|
|
25773
25780
|
}),
|
|
25774
25781
|
McpOAuthToolAuthSchema,
|
|
25775
25782
|
ProviderConnectionReferenceSchema.extend({
|
|
25776
|
-
kind: external_exports.literal("provider_oauth")
|
|
25783
|
+
kind: external_exports.literal("provider_oauth"),
|
|
25784
|
+
...OptionalConnectionField
|
|
25777
25785
|
})
|
|
25778
25786
|
]).default({ kind: "none" })
|
|
25779
25787
|
});
|
|
@@ -26131,6 +26139,11 @@ function triggerSharedFields(guard) {
|
|
|
26131
26139
|
}
|
|
26132
26140
|
var TriggerEventSourceFields = {
|
|
26133
26141
|
connection: ConnectionNameSchema.optional(),
|
|
26142
|
+
// Mark a connection-bound trigger optional so apply silently skips it (rather
|
|
26143
|
+
// than failing) when the referenced connection has no active grant. The
|
|
26144
|
+
// skipped trigger is omitted from the applied agent and re-activates on the
|
|
26145
|
+
// next apply/sync once the connection is set up.
|
|
26146
|
+
optional: external_exports.boolean().optional(),
|
|
26134
26147
|
endpoint: external_exports.string().trim().min(1).optional(),
|
|
26135
26148
|
auth: external_exports.discriminatedUnion("kind", [
|
|
26136
26149
|
external_exports.object({
|
|
@@ -26188,6 +26201,7 @@ function heartbeatTriggerBaseSchema(guard) {
|
|
|
26188
26201
|
kind: external_exports.literal("heartbeat"),
|
|
26189
26202
|
event: external_exports.never().optional(),
|
|
26190
26203
|
connection: external_exports.never().optional(),
|
|
26204
|
+
optional: external_exports.never().optional(),
|
|
26191
26205
|
endpoint: external_exports.never().optional(),
|
|
26192
26206
|
auth: external_exports.never().optional(),
|
|
26193
26207
|
cron: external_exports.string().trim().min(1).max(512),
|
|
@@ -26891,7 +26905,10 @@ var ProjectAppliedResourceSchema = external_exports.union([
|
|
|
26891
26905
|
AgentResourceSchema
|
|
26892
26906
|
]);
|
|
26893
26907
|
var ProjectApplyDiagnosticSchema = external_exports.object({
|
|
26894
|
-
|
|
26908
|
+
// "info" is a non-blocking advisory (e.g. template-push capability/override
|
|
26909
|
+
// notices); "error" remains the validation-failure severity. Coordinated
|
|
26910
|
+
// shape with the optional-connection-gating work; whoever lands second rebases.
|
|
26911
|
+
severity: external_exports.enum(["error", "info"]),
|
|
26895
26912
|
blocking: external_exports.boolean(),
|
|
26896
26913
|
code: external_exports.string().min(1),
|
|
26897
26914
|
message: external_exports.string().min(1),
|
|
@@ -27891,6 +27908,33 @@ function toManagedTemplate(template) {
|
|
|
27891
27908
|
};
|
|
27892
27909
|
}
|
|
27893
27910
|
|
|
27911
|
+
// ../../packages/schemas/src/templates/subscription.ts
|
|
27912
|
+
var TemplateTrackSchema = external_exports.discriminatedUnion("kind", [
|
|
27913
|
+
external_exports.object({ kind: external_exports.literal("latest") }),
|
|
27914
|
+
external_exports.object({ kind: external_exports.literal("pinned"), version: external_exports.string().trim().min(1) })
|
|
27915
|
+
]);
|
|
27916
|
+
var TemplatePushStatusSchema = external_exports.discriminatedUnion("kind", [
|
|
27917
|
+
external_exports.object({ kind: external_exports.literal("pushed"), at: external_exports.string() }),
|
|
27918
|
+
external_exports.object({ kind: external_exports.literal("failed"), at: external_exports.string(), error: external_exports.string() }),
|
|
27919
|
+
external_exports.object({ kind: external_exports.literal("skipped"), at: external_exports.string(), reason: external_exports.string() })
|
|
27920
|
+
]);
|
|
27921
|
+
var TemplateSubscriptionProjectionSchema = external_exports.object({
|
|
27922
|
+
templateName: external_exports.string().trim().min(1),
|
|
27923
|
+
track: TemplateTrackSchema,
|
|
27924
|
+
resolvedVersion: external_exports.string().trim().min(1),
|
|
27925
|
+
integrity: external_exports.string().trim().min(1)
|
|
27926
|
+
});
|
|
27927
|
+
var ProjectTemplateSubscriptionSchema = external_exports.object({
|
|
27928
|
+
id: external_exports.string(),
|
|
27929
|
+
projectId: external_exports.string(),
|
|
27930
|
+
templateName: external_exports.string(),
|
|
27931
|
+
track: TemplateTrackSchema,
|
|
27932
|
+
lastResolvedVersion: external_exports.string(),
|
|
27933
|
+
integrity: external_exports.string(),
|
|
27934
|
+
lastPushStatus: TemplatePushStatusSchema.nullable(),
|
|
27935
|
+
updatedAt: external_exports.string()
|
|
27936
|
+
});
|
|
27937
|
+
|
|
27894
27938
|
// ../../packages/schemas/src/temporal.ts
|
|
27895
27939
|
var ResourceReconciliationScopeSchema = external_exports.object({
|
|
27896
27940
|
organizationId: external_exports.string().trim().min(1),
|
package/dist/index.js
CHANGED
|
@@ -17333,12 +17333,13 @@ function remoteMcpToolSchema(input) {
|
|
|
17333
17333
|
}),
|
|
17334
17334
|
McpOAuthToolAuthSchema,
|
|
17335
17335
|
ProviderConnectionReferenceSchema.extend({
|
|
17336
|
-
kind: external_exports.literal("provider_oauth")
|
|
17336
|
+
kind: external_exports.literal("provider_oauth"),
|
|
17337
|
+
...OptionalConnectionField
|
|
17337
17338
|
})
|
|
17338
17339
|
]).default({ kind: "none" })
|
|
17339
17340
|
});
|
|
17340
17341
|
}
|
|
17341
|
-
var REMOTE_MCP_TRANSPORTS, LOCAL_TOOL_IMPLEMENTATIONS, SecretReferenceSchema, NoToolAuthSchema, McpOAuthToolAuthSchema, ConnectionToolAuthSchema, ConnectionsToolAuthSchema, ConnectionBackedToolSchema, ToolAliasSchema, RemoteMcpToolSchema, LocalAutoToolSchema, LocalPingToolSchema, LocalChatToolSchema, LocalToolSchema, GithubToolSchema, ToolSpecSchema, AgentToolConnectRequestSchema, AgentToolConnectResponseSchema, AgentToolConnectCompleteResponseSchema, InlineAgentToolSchema, AgentToolRefSchema, AgentToolsSchema;
|
|
17342
|
+
var REMOTE_MCP_TRANSPORTS, LOCAL_TOOL_IMPLEMENTATIONS, SecretReferenceSchema, NoToolAuthSchema, OptionalConnectionField, McpOAuthToolAuthSchema, ConnectionToolAuthSchema, ConnectionsToolAuthSchema, ConnectionBackedToolSchema, ToolAliasSchema, RemoteMcpToolSchema, LocalAutoToolSchema, LocalPingToolSchema, LocalChatToolSchema, LocalToolSchema, GithubToolSchema, ToolSpecSchema, AgentToolConnectRequestSchema, AgentToolConnectResponseSchema, AgentToolConnectCompleteResponseSchema, InlineAgentToolSchema, AgentToolRefSchema, AgentToolsSchema;
|
|
17342
17343
|
var init_tools = __esm({
|
|
17343
17344
|
"../../packages/schemas/src/tools.ts"() {
|
|
17344
17345
|
"use strict";
|
|
@@ -17355,20 +17356,27 @@ var init_tools = __esm({
|
|
|
17355
17356
|
NoToolAuthSchema = external_exports.object({
|
|
17356
17357
|
kind: external_exports.literal("none")
|
|
17357
17358
|
});
|
|
17359
|
+
OptionalConnectionField = {
|
|
17360
|
+
optional: external_exports.boolean().optional()
|
|
17361
|
+
};
|
|
17358
17362
|
McpOAuthToolAuthSchema = external_exports.object({
|
|
17359
17363
|
kind: external_exports.literal("mcp_oauth"),
|
|
17360
|
-
connection: ResourceNameSchema
|
|
17364
|
+
connection: ResourceNameSchema,
|
|
17365
|
+
...OptionalConnectionField
|
|
17361
17366
|
});
|
|
17362
17367
|
ConnectionToolAuthSchema = ProviderConnectionReferenceSchema.extend({
|
|
17363
|
-
kind: external_exports.literal("connection")
|
|
17368
|
+
kind: external_exports.literal("connection"),
|
|
17369
|
+
...OptionalConnectionField
|
|
17364
17370
|
});
|
|
17365
17371
|
ConnectionsToolAuthSchema = external_exports.object({
|
|
17366
17372
|
kind: external_exports.literal("connections"),
|
|
17367
|
-
connections: external_exports.array(ProviderConnectionReferenceSchema).min(1)
|
|
17373
|
+
connections: external_exports.array(ProviderConnectionReferenceSchema).min(1),
|
|
17374
|
+
...OptionalConnectionField
|
|
17368
17375
|
});
|
|
17369
17376
|
ConnectionBackedToolSchema = ProviderConnectionReferenceSchema.extend({
|
|
17370
17377
|
kind: external_exports.literal("connection"),
|
|
17371
|
-
description: external_exports.string().trim().min(1).optional()
|
|
17378
|
+
description: external_exports.string().trim().min(1).optional(),
|
|
17379
|
+
...OptionalConnectionField
|
|
17372
17380
|
});
|
|
17373
17381
|
ToolAliasSchema = ResourceNameSchema.refine(
|
|
17374
17382
|
(value) => value !== "workspace",
|
|
@@ -17703,6 +17711,7 @@ function heartbeatTriggerBaseSchema(guard) {
|
|
|
17703
17711
|
kind: external_exports.literal("heartbeat"),
|
|
17704
17712
|
event: external_exports.never().optional(),
|
|
17705
17713
|
connection: external_exports.never().optional(),
|
|
17714
|
+
optional: external_exports.never().optional(),
|
|
17706
17715
|
endpoint: external_exports.never().optional(),
|
|
17707
17716
|
auth: external_exports.never().optional(),
|
|
17708
17717
|
cron: external_exports.string().trim().min(1).max(512),
|
|
@@ -18020,6 +18029,11 @@ var init_agents = __esm({
|
|
|
18020
18029
|
).optional();
|
|
18021
18030
|
TriggerEventSourceFields = {
|
|
18022
18031
|
connection: ConnectionNameSchema.optional(),
|
|
18032
|
+
// Mark a connection-bound trigger optional so apply silently skips it (rather
|
|
18033
|
+
// than failing) when the referenced connection has no active grant. The
|
|
18034
|
+
// skipped trigger is omitted from the applied agent and re-activates on the
|
|
18035
|
+
// next apply/sync once the connection is set up.
|
|
18036
|
+
optional: external_exports.boolean().optional(),
|
|
18023
18037
|
endpoint: external_exports.string().trim().min(1).optional(),
|
|
18024
18038
|
auth: external_exports.discriminatedUnion("kind", [
|
|
18025
18039
|
external_exports.object({
|
|
@@ -18625,7 +18639,10 @@ var init_project_resources = __esm({
|
|
|
18625
18639
|
AgentResourceSchema
|
|
18626
18640
|
]);
|
|
18627
18641
|
ProjectApplyDiagnosticSchema = external_exports.object({
|
|
18628
|
-
|
|
18642
|
+
// "info" is a non-blocking advisory (e.g. template-push capability/override
|
|
18643
|
+
// notices); "error" remains the validation-failure severity. Coordinated
|
|
18644
|
+
// shape with the optional-connection-gating work; whoever lands second rebases.
|
|
18645
|
+
severity: external_exports.enum(["error", "info"]),
|
|
18629
18646
|
blocking: external_exports.boolean(),
|
|
18630
18647
|
code: external_exports.string().min(1),
|
|
18631
18648
|
message: external_exports.string().min(1),
|
|
@@ -19784,6 +19801,40 @@ var init_hardcoded = __esm({
|
|
|
19784
19801
|
}
|
|
19785
19802
|
});
|
|
19786
19803
|
|
|
19804
|
+
// ../../packages/schemas/src/templates/subscription.ts
|
|
19805
|
+
var TemplateTrackSchema, TemplatePushStatusSchema, TemplateSubscriptionProjectionSchema, ProjectTemplateSubscriptionSchema;
|
|
19806
|
+
var init_subscription = __esm({
|
|
19807
|
+
"../../packages/schemas/src/templates/subscription.ts"() {
|
|
19808
|
+
"use strict";
|
|
19809
|
+
init_zod();
|
|
19810
|
+
TemplateTrackSchema = external_exports.discriminatedUnion("kind", [
|
|
19811
|
+
external_exports.object({ kind: external_exports.literal("latest") }),
|
|
19812
|
+
external_exports.object({ kind: external_exports.literal("pinned"), version: external_exports.string().trim().min(1) })
|
|
19813
|
+
]);
|
|
19814
|
+
TemplatePushStatusSchema = external_exports.discriminatedUnion("kind", [
|
|
19815
|
+
external_exports.object({ kind: external_exports.literal("pushed"), at: external_exports.string() }),
|
|
19816
|
+
external_exports.object({ kind: external_exports.literal("failed"), at: external_exports.string(), error: external_exports.string() }),
|
|
19817
|
+
external_exports.object({ kind: external_exports.literal("skipped"), at: external_exports.string(), reason: external_exports.string() })
|
|
19818
|
+
]);
|
|
19819
|
+
TemplateSubscriptionProjectionSchema = external_exports.object({
|
|
19820
|
+
templateName: external_exports.string().trim().min(1),
|
|
19821
|
+
track: TemplateTrackSchema,
|
|
19822
|
+
resolvedVersion: external_exports.string().trim().min(1),
|
|
19823
|
+
integrity: external_exports.string().trim().min(1)
|
|
19824
|
+
});
|
|
19825
|
+
ProjectTemplateSubscriptionSchema = external_exports.object({
|
|
19826
|
+
id: external_exports.string(),
|
|
19827
|
+
projectId: external_exports.string(),
|
|
19828
|
+
templateName: external_exports.string(),
|
|
19829
|
+
track: TemplateTrackSchema,
|
|
19830
|
+
lastResolvedVersion: external_exports.string(),
|
|
19831
|
+
integrity: external_exports.string(),
|
|
19832
|
+
lastPushStatus: TemplatePushStatusSchema.nullable(),
|
|
19833
|
+
updatedAt: external_exports.string()
|
|
19834
|
+
});
|
|
19835
|
+
}
|
|
19836
|
+
});
|
|
19837
|
+
|
|
19787
19838
|
// ../../packages/schemas/src/templates/index.ts
|
|
19788
19839
|
var init_templates = __esm({
|
|
19789
19840
|
"../../packages/schemas/src/templates/index.ts"() {
|
|
@@ -19792,6 +19843,7 @@ var init_templates = __esm({
|
|
|
19792
19843
|
init_specifier();
|
|
19793
19844
|
init_registry();
|
|
19794
19845
|
init_hardcoded();
|
|
19846
|
+
init_subscription();
|
|
19795
19847
|
}
|
|
19796
19848
|
});
|
|
19797
19849
|
|
|
@@ -22632,7 +22684,7 @@ var init_package = __esm({
|
|
|
22632
22684
|
"package.json"() {
|
|
22633
22685
|
package_default = {
|
|
22634
22686
|
name: "@autohq/cli",
|
|
22635
|
-
version: "0.1.
|
|
22687
|
+
version: "0.1.251",
|
|
22636
22688
|
license: "SEE LICENSE IN README.md",
|
|
22637
22689
|
publishConfig: {
|
|
22638
22690
|
access: "public"
|
|
@@ -23413,6 +23465,7 @@ function createStyle(flags) {
|
|
|
23413
23465
|
enabled: true,
|
|
23414
23466
|
success: (text) => chalk2.green(text),
|
|
23415
23467
|
warn: (text) => chalk2.yellow(text),
|
|
23468
|
+
info: (text) => chalk2.blue(text),
|
|
23416
23469
|
error: (text) => chalk2.red(text),
|
|
23417
23470
|
heading: (text) => chalk2.bold.underline(text),
|
|
23418
23471
|
label: (text) => chalk2.bold(text),
|
|
@@ -23432,6 +23485,7 @@ var init_style = __esm({
|
|
|
23432
23485
|
enabled: false,
|
|
23433
23486
|
success: identity,
|
|
23434
23487
|
warn: identity,
|
|
23488
|
+
info: identity,
|
|
23435
23489
|
error: identity,
|
|
23436
23490
|
heading: identity,
|
|
23437
23491
|
label: identity,
|
|
@@ -24515,6 +24569,7 @@ var init_assets = __esm({
|
|
|
24515
24569
|
});
|
|
24516
24570
|
|
|
24517
24571
|
// ../../packages/schemas/src/project-apply-files/template-injection.ts
|
|
24572
|
+
import { createHash as createHash4 } from "crypto";
|
|
24518
24573
|
function injectManagedTemplateFiles(input) {
|
|
24519
24574
|
const references = collectTemplateReferences(input.files);
|
|
24520
24575
|
if (references.size === 0) {
|
|
@@ -24525,7 +24580,11 @@ function injectManagedTemplateFiles(input) {
|
|
|
24525
24580
|
);
|
|
24526
24581
|
const injected = [];
|
|
24527
24582
|
for (const reference of references.values()) {
|
|
24528
|
-
|
|
24583
|
+
const version2 = resolveTemplateVersion(input.registry, reference);
|
|
24584
|
+
if (!version2) {
|
|
24585
|
+
continue;
|
|
24586
|
+
}
|
|
24587
|
+
for (const file2 of version2.files) {
|
|
24529
24588
|
const key = normalizeSourcePath(
|
|
24530
24589
|
templateInjectionKey(reference.name, normalizeSourcePath(file2.path))
|
|
24531
24590
|
);
|
|
@@ -24538,12 +24597,11 @@ function injectManagedTemplateFiles(input) {
|
|
|
24538
24597
|
}
|
|
24539
24598
|
return injected.length === 0 ? input.files : [...input.files, ...injected];
|
|
24540
24599
|
}
|
|
24541
|
-
function
|
|
24600
|
+
function resolveTemplateVersion(registry2, reference) {
|
|
24542
24601
|
try {
|
|
24543
|
-
|
|
24544
|
-
return registry2.getFiles(reference.name, version2.version);
|
|
24602
|
+
return registry2.resolveVersion(reference.name, reference.track);
|
|
24545
24603
|
} catch {
|
|
24546
|
-
return
|
|
24604
|
+
return null;
|
|
24547
24605
|
}
|
|
24548
24606
|
}
|
|
24549
24607
|
function collectTemplateReferences(files) {
|
|
@@ -24985,7 +25043,7 @@ var init_files = __esm({
|
|
|
24985
25043
|
});
|
|
24986
25044
|
|
|
24987
25045
|
// src/commands/apply/actions.ts
|
|
24988
|
-
import { createHash as
|
|
25046
|
+
import { createHash as createHash5 } from "crypto";
|
|
24989
25047
|
async function applyResource(input) {
|
|
24990
25048
|
if (input.commandOptions.connect && input.commandOptions.json) {
|
|
24991
25049
|
throw new Error("Cannot use --connect with --json output.");
|
|
@@ -25022,7 +25080,7 @@ async function applyProjectBundleInput(input) {
|
|
|
25022
25080
|
spinner.start("Preparing upload");
|
|
25023
25081
|
const upload = await input.client.prepareProjectApplyBundleUpload(
|
|
25024
25082
|
{
|
|
25025
|
-
sha256:
|
|
25083
|
+
sha256: createHash5("sha256").update(body).digest("hex"),
|
|
25026
25084
|
sizeBytes
|
|
25027
25085
|
},
|
|
25028
25086
|
{ apiBaseUrl: input.commandOptions.apiBaseUrl }
|
|
@@ -25143,12 +25201,21 @@ async function writeProjectApplyResponse(input) {
|
|
|
25143
25201
|
}
|
|
25144
25202
|
function writeDiagnostics(diagnostics, writeOutput, style) {
|
|
25145
25203
|
for (const diagnostic of diagnostics) {
|
|
25146
|
-
const severity = diagnostic.severity === "error" ? style.error(diagnostic.severity) : style.warn(diagnostic.severity);
|
|
25147
25204
|
writeOutput(
|
|
25148
|
-
`${severity} ${diagnostic.kind}/${diagnostic.name}: ${diagnostic.message}`
|
|
25205
|
+
`${styleDiagnosticSeverity(style, diagnostic.severity)} ${diagnostic.kind}/${diagnostic.name}: ${diagnostic.message}`
|
|
25149
25206
|
);
|
|
25150
25207
|
}
|
|
25151
25208
|
}
|
|
25209
|
+
function styleDiagnosticSeverity(style, severity) {
|
|
25210
|
+
switch (severity) {
|
|
25211
|
+
case "error":
|
|
25212
|
+
return style.error(severity);
|
|
25213
|
+
case "info":
|
|
25214
|
+
return style.info(severity);
|
|
25215
|
+
default:
|
|
25216
|
+
return style.warn(severity);
|
|
25217
|
+
}
|
|
25218
|
+
}
|
|
25152
25219
|
function planActionStyle(style, action) {
|
|
25153
25220
|
switch (action) {
|
|
25154
25221
|
case "create":
|
|
@@ -25181,12 +25248,12 @@ var init_actions = __esm({
|
|
|
25181
25248
|
});
|
|
25182
25249
|
|
|
25183
25250
|
// src/commands/auth/pkce.ts
|
|
25184
|
-
import { createHash as
|
|
25251
|
+
import { createHash as createHash6, randomBytes as randomBytes2 } from "crypto";
|
|
25185
25252
|
function pkceVerifier() {
|
|
25186
25253
|
return randomBytes2(32).toString("base64url");
|
|
25187
25254
|
}
|
|
25188
25255
|
function pkceChallenge(verifier) {
|
|
25189
|
-
return
|
|
25256
|
+
return createHash6("sha256").update(verifier).digest("base64url");
|
|
25190
25257
|
}
|
|
25191
25258
|
var init_pkce = __esm({
|
|
25192
25259
|
"src/commands/auth/pkce.ts"() {
|