@enactprotocol/cli 2.1.20 → 2.1.22
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/commands/auth/index.d.ts +5 -0
- package/dist/commands/auth/index.d.ts.map +1 -1
- package/dist/commands/auth/index.js +47 -28
- package/dist/commands/auth/index.js.map +1 -1
- package/dist/commands/info/index.d.ts.map +1 -1
- package/dist/commands/info/index.js +11 -1
- package/dist/commands/info/index.js.map +1 -1
- package/dist/commands/init/index.d.ts.map +1 -1
- package/dist/commands/init/index.js +51 -15
- package/dist/commands/init/index.js.map +1 -1
- package/dist/commands/inspect/index.d.ts.map +1 -1
- package/dist/commands/inspect/index.js +12 -1
- package/dist/commands/inspect/index.js.map +1 -1
- package/dist/commands/install/index.d.ts.map +1 -1
- package/dist/commands/install/index.js +11 -1
- package/dist/commands/install/index.js.map +1 -1
- package/dist/commands/learn/index.d.ts.map +1 -1
- package/dist/commands/learn/index.js +7 -2
- package/dist/commands/learn/index.js.map +1 -1
- package/dist/commands/run/index.d.ts.map +1 -1
- package/dist/commands/run/index.js +7 -3
- package/dist/commands/run/index.js.map +1 -1
- package/dist/commands/search/index.d.ts.map +1 -1
- package/dist/commands/search/index.js +7 -3
- package/dist/commands/search/index.js.map +1 -1
- package/dist/commands/trust/index.js +1 -1
- package/dist/commands/trust/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +5 -5
- package/src/commands/auth/index.ts +52 -33
- package/src/commands/info/index.ts +13 -1
- package/src/commands/init/index.ts +47 -15
- package/src/commands/inspect/index.ts +13 -1
- package/src/commands/install/index.ts +13 -1
- package/src/commands/learn/index.ts +7 -2
- package/src/commands/run/index.ts +7 -3
- package/src/commands/search/index.ts +7 -3
- package/src/commands/trust/index.ts +1 -1
- package/src/index.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -114,8 +114,13 @@ async function learnHandler(
|
|
|
114
114
|
config.registry?.url ??
|
|
115
115
|
"https://siikwkfgsmouioodghho.supabase.co/functions/v1";
|
|
116
116
|
|
|
117
|
-
// Get auth token -
|
|
118
|
-
|
|
117
|
+
// Get auth token - try stored JWT first (for private tools), then fall back to config/env/anon
|
|
118
|
+
const { getValidToken } = await import("../auth/index.js");
|
|
119
|
+
let authToken: string | undefined = (await getValidToken()) ?? undefined;
|
|
120
|
+
if (!authToken) {
|
|
121
|
+
authToken = config.registry?.authToken ?? process.env.ENACT_AUTH_TOKEN;
|
|
122
|
+
}
|
|
123
|
+
// Fall back to anon key for unauthenticated public access
|
|
119
124
|
if (!authToken && registryUrl.includes("siikwkfgsmouioodghho.supabase.co")) {
|
|
120
125
|
authToken =
|
|
121
126
|
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InNpaWt3a2Znc21vdWlvb2RnaGhvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjQ2MTkzMzksImV4cCI6MjA4MDE5NTMzOX0.kxnx6-IPFhmGx6rzNx36vbyhFMFZKP_jFqaDbKnJ_E0";
|
|
@@ -220,10 +220,14 @@ async function fetchAndCacheTool(
|
|
|
220
220
|
config.registry?.url ??
|
|
221
221
|
"https://siikwkfgsmouioodghho.supabase.co/functions/v1";
|
|
222
222
|
|
|
223
|
-
// Get auth token -
|
|
224
|
-
|
|
223
|
+
// Get auth token - try stored JWT first (for private tools), then fall back to config/env/anon
|
|
224
|
+
const { getValidToken } = await import("../auth/index.js");
|
|
225
|
+
let authToken: string | undefined = (await getValidToken()) ?? undefined;
|
|
226
|
+
if (!authToken) {
|
|
227
|
+
authToken = config.registry?.authToken ?? process.env.ENACT_AUTH_TOKEN;
|
|
228
|
+
}
|
|
229
|
+
// Fall back to anon key for unauthenticated public access
|
|
225
230
|
if (!authToken && registryUrl.includes("siikwkfgsmouioodghho.supabase.co")) {
|
|
226
|
-
// Use the official Supabase anon key for unauthenticated access
|
|
227
231
|
authToken =
|
|
228
232
|
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InNpaWt3a2Znc21vdWlvb2RnaGhvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjQ2MTkzMzksImV4cCI6MjA4MDE5NTMzOX0.kxnx6-IPFhmGx6rzNx36vbyhFMFZKP_jFqaDbKnJ_E0";
|
|
229
233
|
}
|
|
@@ -231,10 +231,14 @@ async function searchHandler(
|
|
|
231
231
|
config.registry?.url ??
|
|
232
232
|
"https://siikwkfgsmouioodghho.supabase.co/functions/v1";
|
|
233
233
|
|
|
234
|
-
// Get auth token -
|
|
235
|
-
|
|
234
|
+
// Get auth token - try stored JWT first (for private tools), then fall back to config/env/anon
|
|
235
|
+
const { getValidToken } = await import("../auth/index.js");
|
|
236
|
+
let authToken: string | undefined = (await getValidToken()) ?? undefined;
|
|
237
|
+
if (!authToken) {
|
|
238
|
+
authToken = config.registry?.authToken ?? process.env.ENACT_AUTH_TOKEN;
|
|
239
|
+
}
|
|
240
|
+
// Fall back to anon key for unauthenticated public access
|
|
236
241
|
if (!authToken && registryUrl.includes("siikwkfgsmouioodghho.supabase.co")) {
|
|
237
|
-
// Use the official Supabase anon key for unauthenticated access
|
|
238
242
|
authToken =
|
|
239
243
|
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InNpaWt3a2Znc21vdWlvb2RnaGhvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjQ2MTkzMzksImV4cCI6MjA4MDE5NTMzOX0.kxnx6-IPFhmGx6rzNx36vbyhFMFZKP_jFqaDbKnJ_E0";
|
|
240
244
|
}
|
|
@@ -219,7 +219,7 @@ async function trustListHandler(options: TrustListOptions, _ctx: CommandContext)
|
|
|
219
219
|
return;
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
header("Trusted Identities
|
|
222
|
+
header("Trusted Identities");
|
|
223
223
|
newline();
|
|
224
224
|
if (auditors.length === 0) {
|
|
225
225
|
dim(" No trusted identities configured");
|
package/src/index.ts
CHANGED
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
} from "./commands";
|
|
35
35
|
import { error, formatError } from "./utils";
|
|
36
36
|
|
|
37
|
-
export const version = "2.1.
|
|
37
|
+
export const version = "2.1.22";
|
|
38
38
|
|
|
39
39
|
// Export types for external use
|
|
40
40
|
export type { GlobalOptions, CommandContext } from "./types";
|