@larkup/cli 0.3.0 → 0.3.2

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.
Files changed (39) hide show
  1. package/dist/{chunk-ODWAFTDP.js → chunk-2IVYLF4F.js} +1 -1
  2. package/dist/chunk-3GL3SZFJ.js +212 -0
  3. package/dist/chunk-5BX2UVG2.js +2352 -0
  4. package/dist/chunk-5RGEHTEF.js +646 -0
  5. package/dist/{chunk-YUC4VMEE.js → chunk-77BPWBHR.js} +2 -1
  6. package/dist/{chunk-65EVYGDT.js → chunk-7KURHXYU.js} +38 -38
  7. package/dist/chunk-A2PXF6Y7.js +1426 -0
  8. package/dist/{chunk-3EBUYTA7.js → chunk-ERDDY5EQ.js} +1 -1
  9. package/dist/{chunk-N6IF5QLH.js → chunk-HQPSE5ZU.js} +28 -36
  10. package/dist/chunk-IPKRK5UI.js +73 -0
  11. package/dist/{chunk-HAABLEPO.js → chunk-QAJSSODU.js} +1 -12
  12. package/dist/{chunk-BDMLJQRN.js → chunk-QKPH65NY.js} +1 -1
  13. package/dist/{chunk-S5DCG3CZ.js → chunk-RN25NOBI.js} +3 -3
  14. package/dist/{chunk-HOPZALAP.js → chunk-TJPYJ5TS.js} +1 -1
  15. package/dist/{chunk-FY7KWENQ.js → chunk-WVF2A44B.js} +11 -4
  16. package/dist/{chunk-4XN2IRCG.js → chunk-ZBGNJVTC.js} +3 -3
  17. package/dist/chunk-ZYHZIBTH.js +1272 -0
  18. package/dist/{dist-es-S5FAFKBD.js → dist-es-3L6W7F7P.js} +4 -4
  19. package/dist/{dist-es-YD724GH3.js → dist-es-6MPMKRLG.js} +21 -21
  20. package/dist/{dist-es-F6WXDZQY.js → dist-es-7LQAPSS6.js} +7 -7
  21. package/dist/{dist-es-NEADJWQM.js → dist-es-CVOBCRJ5.js} +9 -9
  22. package/dist/{dist-es-5DTOPEBY.js → dist-es-DAE2AYZV.js} +30 -23
  23. package/dist/{dist-es-BM4STLL5.js → dist-es-G4H4NZOY.js} +7 -7
  24. package/dist/{dist-es-LH5Y4P7D.js → dist-es-HV6ZWB2M.js} +8 -8
  25. package/dist/{dist-es-KMHWFNXI.js → dist-es-PQXH3VYE.js} +12 -9
  26. package/dist/{dist-es-3QFDPX44.js → dist-es-RGSF6JKX.js} +255 -231
  27. package/dist/{dist-es-DS5SFRTK.js → dist-es-UWL5EGDP.js} +1 -1
  28. package/dist/{chunk-FUTLPXFR.js → event-streams-NVY5IGD3.js} +31 -31
  29. package/dist/{event-streams-NPIZBVLJ.js → event-streams-RZ2JU5EF.js} +1 -2
  30. package/dist/index.js +43 -20
  31. package/dist/{loadSso-HXXA5UNF.js → loadSso-DEHYSFO4.js} +66 -62
  32. package/dist/{signin-7FUGJFG3.js → signin-CTAMN4QW.js} +70 -66
  33. package/dist/{sso-oidc-EPMF7LMF.js → sso-oidc-ZYLSPNAE.js} +69 -65
  34. package/dist/{sts-RBEOIBEJ.js → sts-EQDDSBAR.js} +75 -71
  35. package/dist/{tool-loader-2WHU3H77.js → tool-loader-UCLZNPMP.js} +2 -2
  36. package/dist/{tool-registry-JS5NUNN6.js → tool-registry-BNRTSH77.js} +3 -1
  37. package/package.json +13 -13
  38. package/dist/chunk-A7HMSODH.js +0 -126
  39. package/dist/chunk-MYOADNR2.js +0 -515
@@ -0,0 +1,646 @@
1
+ import {
2
+ IniSectionType,
3
+ isValidHostLabel
4
+ } from "./chunk-3GL3SZFJ.js";
5
+
6
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/property-provider/ProviderError.js
7
+ var ProviderError = class _ProviderError extends Error {
8
+ name = "ProviderError";
9
+ tryNextLink;
10
+ constructor(message, options = true) {
11
+ let logger;
12
+ let tryNextLink = true;
13
+ if (typeof options === "boolean") {
14
+ logger = void 0;
15
+ tryNextLink = options;
16
+ } else if (options != null && typeof options === "object") {
17
+ logger = options.logger;
18
+ tryNextLink = options.tryNextLink ?? true;
19
+ }
20
+ super(message);
21
+ this.tryNextLink = tryNextLink;
22
+ Object.setPrototypeOf(this, _ProviderError.prototype);
23
+ logger?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`);
24
+ }
25
+ static from(error, options = true) {
26
+ return Object.assign(new this(error.message, options), error);
27
+ }
28
+ };
29
+
30
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/property-provider/CredentialsProviderError.js
31
+ var CredentialsProviderError = class _CredentialsProviderError extends ProviderError {
32
+ name = "CredentialsProviderError";
33
+ constructor(message, options = true) {
34
+ super(message, options);
35
+ Object.setPrototypeOf(this, _CredentialsProviderError.prototype);
36
+ }
37
+ };
38
+
39
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getProfileName.js
40
+ var ENV_PROFILE = "AWS_PROFILE";
41
+ var DEFAULT_PROFILE = "default";
42
+ var getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE;
43
+
44
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/loadSharedConfigFiles.js
45
+ import { join as join3 } from "path";
46
+
47
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/constants.js
48
+ var CONFIG_PREFIX_SEPARATOR = ".";
49
+
50
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigData.js
51
+ var getConfigData = (data) => Object.entries(data).filter(([key]) => {
52
+ const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
53
+ if (indexOfSeparator === -1) {
54
+ return false;
55
+ }
56
+ return Object.values(IniSectionType).includes(key.substring(0, indexOfSeparator));
57
+ }).reduce((acc, [key, value]) => {
58
+ const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
59
+ const updatedKey = key.substring(0, indexOfSeparator) === IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key;
60
+ acc[updatedKey] = value;
61
+ return acc;
62
+ }, {
63
+ ...data.default && { default: data.default }
64
+ });
65
+
66
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigFilepath.js
67
+ import { join } from "path";
68
+
69
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js
70
+ import { homedir } from "os";
71
+ import { sep } from "path";
72
+ var homeDirCache = {};
73
+ var getHomeDirCacheKey = () => {
74
+ if (process && process.geteuid) {
75
+ return `${process.geteuid()}`;
76
+ }
77
+ return "DEFAULT";
78
+ };
79
+ var getHomeDir = () => {
80
+ const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${sep}` } = process.env;
81
+ if (HOME)
82
+ return HOME;
83
+ if (USERPROFILE)
84
+ return USERPROFILE;
85
+ if (HOMEPATH)
86
+ return `${HOMEDRIVE}${HOMEPATH}`;
87
+ const homeDirCacheKey = getHomeDirCacheKey();
88
+ if (!homeDirCache[homeDirCacheKey])
89
+ homeDirCache[homeDirCacheKey] = homedir();
90
+ return homeDirCache[homeDirCacheKey];
91
+ };
92
+
93
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigFilepath.js
94
+ var ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
95
+ var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || join(getHomeDir(), ".aws", "config");
96
+
97
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getCredentialsFilepath.js
98
+ import { join as join2 } from "path";
99
+ var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
100
+ var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || join2(getHomeDir(), ".aws", "credentials");
101
+
102
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseIni.js
103
+ var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@+.%:/]+)\2$/;
104
+ var profileNameBlockList = ["__proto__", "profile __proto__"];
105
+ var parseIni = (iniData) => {
106
+ const map = {};
107
+ let currentSection;
108
+ let currentSubSection;
109
+ for (const iniLine of iniData.split(/\r?\n/)) {
110
+ const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim();
111
+ const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]";
112
+ if (isSection) {
113
+ currentSection = void 0;
114
+ currentSubSection = void 0;
115
+ const sectionName = trimmedLine.substring(1, trimmedLine.length - 1);
116
+ const matches = prefixKeyRegex.exec(sectionName);
117
+ if (matches) {
118
+ const [, prefix, , name] = matches;
119
+ if (Object.values(IniSectionType).includes(prefix)) {
120
+ currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR);
121
+ }
122
+ } else {
123
+ currentSection = sectionName;
124
+ }
125
+ if (profileNameBlockList.includes(sectionName)) {
126
+ throw new Error(`Found invalid profile name "${sectionName}"`);
127
+ }
128
+ } else if (currentSection) {
129
+ const indexOfEqualsSign = trimmedLine.indexOf("=");
130
+ if (![0, -1].includes(indexOfEqualsSign)) {
131
+ const [name, value] = [
132
+ trimmedLine.substring(0, indexOfEqualsSign).trim(),
133
+ trimmedLine.substring(indexOfEqualsSign + 1).trim()
134
+ ];
135
+ if (value === "") {
136
+ currentSubSection = name;
137
+ } else {
138
+ if (currentSubSection && iniLine.trimStart() === iniLine) {
139
+ currentSubSection = void 0;
140
+ }
141
+ map[currentSection] = map[currentSection] || {};
142
+ const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name;
143
+ map[currentSection][key] = value;
144
+ }
145
+ }
146
+ }
147
+ }
148
+ return map;
149
+ };
150
+
151
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/readFile.js
152
+ import { readFile as fsReadFile } from "fs/promises";
153
+ var filePromises = {};
154
+ var fileIntercept = {};
155
+ var readFile = (path, options) => {
156
+ if (fileIntercept[path] !== void 0) {
157
+ return fileIntercept[path];
158
+ }
159
+ if (!filePromises[path] || options?.ignoreCache) {
160
+ filePromises[path] = fsReadFile(path, "utf8");
161
+ }
162
+ return filePromises[path];
163
+ };
164
+
165
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/loadSharedConfigFiles.js
166
+ var swallowError = () => ({});
167
+ var loadSharedConfigFiles = async (init = {}) => {
168
+ const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init;
169
+ const homeDir = getHomeDir();
170
+ const relativeHomeDirPrefix = "~/";
171
+ let resolvedFilepath = filepath;
172
+ if (filepath.startsWith(relativeHomeDirPrefix)) {
173
+ resolvedFilepath = join3(homeDir, filepath.slice(2));
174
+ }
175
+ let resolvedConfigFilepath = configFilepath;
176
+ if (configFilepath.startsWith(relativeHomeDirPrefix)) {
177
+ resolvedConfigFilepath = join3(homeDir, configFilepath.slice(2));
178
+ }
179
+ const parsedFiles = await Promise.all([
180
+ readFile(resolvedConfigFilepath, {
181
+ ignoreCache: init.ignoreCache
182
+ }).then(parseIni).then(getConfigData).catch(swallowError),
183
+ readFile(resolvedFilepath, {
184
+ ignoreCache: init.ignoreCache
185
+ }).then(parseIni).catch(swallowError)
186
+ ]);
187
+ return {
188
+ configFile: parsedFiles[0],
189
+ credentialsFile: parsedFiles[1]
190
+ };
191
+ };
192
+
193
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/mergeConfigFiles.js
194
+ var mergeConfigFiles = (...files) => {
195
+ const merged = {};
196
+ for (const file of files) {
197
+ for (const [key, values] of Object.entries(file)) {
198
+ if (merged[key] !== void 0) {
199
+ Object.assign(merged[key], values);
200
+ } else {
201
+ merged[key] = values;
202
+ }
203
+ }
204
+ }
205
+ return merged;
206
+ };
207
+
208
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseKnownFiles.js
209
+ var parseKnownFiles = async (init) => {
210
+ const parsedFiles = await loadSharedConfigFiles(init);
211
+ return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile);
212
+ };
213
+
214
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/checkRegion.js
215
+ var validRegions = /* @__PURE__ */ new Set();
216
+ var checkRegion = (region, check = isValidHostLabel) => {
217
+ if (!validRegions.has(region) && !check(region)) {
218
+ if (region === "*") {
219
+ console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`);
220
+ } else {
221
+ throw new Error(`Region not accepted: region="${region}" is not a valid hostname component.`);
222
+ }
223
+ } else {
224
+ validRegions.add(region);
225
+ }
226
+ };
227
+
228
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/isFipsRegion.js
229
+ var isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips"));
230
+
231
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/getRealRegion.js
232
+ var getRealRegion = (region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region;
233
+
234
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/resolveRegionConfig.js
235
+ var resolveRegionConfig = (input) => {
236
+ const { region, useFipsEndpoint } = input;
237
+ if (!region) {
238
+ throw new Error("Region is missing");
239
+ }
240
+ return Object.assign(input, {
241
+ region: async () => {
242
+ const providedRegion = typeof region === "function" ? await region() : region;
243
+ const realRegion = getRealRegion(providedRegion);
244
+ checkRegion(realRegion);
245
+ return realRegion;
246
+ },
247
+ useFipsEndpoint: async () => {
248
+ const providedRegion = typeof region === "string" ? region : await region();
249
+ if (isFipsRegion(providedRegion)) {
250
+ return true;
251
+ }
252
+ return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();
253
+ }
254
+ });
255
+ };
256
+
257
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/property-provider/TokenProviderError.js
258
+ var TokenProviderError = class _TokenProviderError extends ProviderError {
259
+ name = "TokenProviderError";
260
+ constructor(message, options = true) {
261
+ super(message, options);
262
+ Object.setPrototypeOf(this, _TokenProviderError.prototype);
263
+ }
264
+ };
265
+
266
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/property-provider/chain.js
267
+ var chain = (...providers) => async () => {
268
+ if (providers.length === 0) {
269
+ throw new ProviderError("No providers in chain");
270
+ }
271
+ let lastProviderError;
272
+ for (const provider of providers) {
273
+ try {
274
+ const credentials = await provider();
275
+ return credentials;
276
+ } catch (err) {
277
+ lastProviderError = err;
278
+ if (err?.tryNextLink) {
279
+ continue;
280
+ }
281
+ throw err;
282
+ }
283
+ }
284
+ throw lastProviderError;
285
+ };
286
+
287
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/property-provider/fromValue.js
288
+ var fromValue = (staticValue) => () => Promise.resolve(staticValue);
289
+
290
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/property-provider/memoize.js
291
+ var memoize = (provider, isExpired, requiresRefresh) => {
292
+ let resolved;
293
+ let pending;
294
+ let hasResult;
295
+ let isConstant = false;
296
+ const coalesceProvider = async () => {
297
+ if (!pending) {
298
+ pending = provider();
299
+ }
300
+ try {
301
+ resolved = await pending;
302
+ hasResult = true;
303
+ isConstant = false;
304
+ } finally {
305
+ pending = void 0;
306
+ }
307
+ return resolved;
308
+ };
309
+ if (isExpired === void 0) {
310
+ return async (options) => {
311
+ if (!hasResult || options?.forceRefresh) {
312
+ resolved = await coalesceProvider();
313
+ }
314
+ return resolved;
315
+ };
316
+ }
317
+ return async (options) => {
318
+ if (!hasResult || options?.forceRefresh) {
319
+ resolved = await coalesceProvider();
320
+ }
321
+ if (isConstant) {
322
+ return resolved;
323
+ }
324
+ if (requiresRefresh && !requiresRefresh(resolved)) {
325
+ isConstant = true;
326
+ return resolved;
327
+ }
328
+ if (isExpired(resolved)) {
329
+ await coalesceProvider();
330
+ return resolved;
331
+ }
332
+ return resolved;
333
+ };
334
+ };
335
+
336
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js
337
+ var booleanSelector = (obj, key, type) => {
338
+ if (!(key in obj))
339
+ return void 0;
340
+ if (obj[key] === "true")
341
+ return true;
342
+ if (obj[key] === "false")
343
+ return false;
344
+ throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`);
345
+ };
346
+
347
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/types.js
348
+ var SelectorType;
349
+ (function(SelectorType2) {
350
+ SelectorType2["ENV"] = "env";
351
+ SelectorType2["CONFIG"] = "shared config entry";
352
+ })(SelectorType || (SelectorType = {}));
353
+
354
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSSOTokenFilepath.js
355
+ import { createHash } from "crypto";
356
+ import { join as join4 } from "path";
357
+ var getSSOTokenFilepath = (id) => {
358
+ const hasher = createHash("sha1");
359
+ const cacheName = hasher.update(id).digest("hex");
360
+ return join4(getHomeDir(), ".aws", "sso", "cache", `${cacheName}.json`);
361
+ };
362
+
363
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSSOTokenFromFile.js
364
+ import { readFile as readFile2 } from "fs/promises";
365
+ var tokenIntercept = {};
366
+ var getSSOTokenFromFile = async (id) => {
367
+ if (tokenIntercept[id]) {
368
+ return tokenIntercept[id];
369
+ }
370
+ const ssoTokenFilepath = getSSOTokenFilepath(id);
371
+ const ssoTokenText = await readFile2(ssoTokenFilepath, "utf8");
372
+ return JSON.parse(ssoTokenText);
373
+ };
374
+
375
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSsoSessionData.js
376
+ var getSsoSessionData = (data) => Object.entries(data).filter(([key]) => key.startsWith(IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {});
377
+
378
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/loadSsoSessionData.js
379
+ var swallowError2 = () => ({});
380
+ var loadSsoSessionData = async (init = {}) => readFile(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2);
381
+
382
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/getSelectorName.js
383
+ function getSelectorName(functionString) {
384
+ try {
385
+ const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? []));
386
+ constants.delete("CONFIG");
387
+ constants.delete("CONFIG_PREFIX_SEPARATOR");
388
+ constants.delete("ENV");
389
+ return [...constants].join(", ");
390
+ } catch (ignored) {
391
+ return functionString;
392
+ }
393
+ }
394
+
395
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromEnv.js
396
+ var fromEnv = (envVarSelector, options) => async () => {
397
+ try {
398
+ const config = envVarSelector(process.env, options);
399
+ if (config === void 0) {
400
+ throw new Error();
401
+ }
402
+ return config;
403
+ } catch (e) {
404
+ throw new CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger });
405
+ }
406
+ };
407
+
408
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromSharedConfigFiles.js
409
+ var fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => {
410
+ const profile = getProfileName(init);
411
+ const { configFile, credentialsFile } = await loadSharedConfigFiles(init);
412
+ const profileFromCredentials = credentialsFile[profile] || {};
413
+ const profileFromConfig = configFile[profile] || {};
414
+ const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials };
415
+ try {
416
+ const cfgFile = preferredFile === "config" ? configFile : credentialsFile;
417
+ const configValue = configSelector(mergedProfile, cfgFile);
418
+ if (configValue === void 0) {
419
+ throw new Error();
420
+ }
421
+ return configValue;
422
+ } catch (e) {
423
+ throw new CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger });
424
+ }
425
+ };
426
+
427
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromStatic.js
428
+ var isFunction = (func) => typeof func === "function";
429
+ var fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : fromValue(defaultValue);
430
+
431
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/configLoader.js
432
+ var loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => {
433
+ const { signingName, logger } = configuration;
434
+ const envOptions = { signingName, logger };
435
+ return memoize(chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue)));
436
+ };
437
+
438
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js
439
+ var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT";
440
+ var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint";
441
+ var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {
442
+ environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV),
443
+ configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG),
444
+ default: false
445
+ };
446
+
447
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/NodeUseFipsEndpointConfigOptions.js
448
+ var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT";
449
+ var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint";
450
+ var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {
451
+ environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV),
452
+ configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG),
453
+ default: false
454
+ };
455
+
456
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/constants.js
457
+ var AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV";
458
+ var AWS_REGION_ENV = "AWS_REGION";
459
+ var AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION";
460
+ var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
461
+ var DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"];
462
+ var IMDS_REGION_PATH = "/latest/meta-data/placement/region";
463
+ var IMDS_TOKEN_PATH = "/latest/api/token";
464
+ var X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token";
465
+ var X_AWS_EC2_METADATA_TOKEN_TTL = "x-aws-ec2-metadata-token-ttl-seconds";
466
+
467
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/getInstanceMetadataRegion.js
468
+ var TIMEOUT_MS = 1e3;
469
+ var NEG_CACHE_TTL_MS = 6e4;
470
+ var negativeCacheUntil = 0;
471
+ var getInstanceMetadataRegion = async () => {
472
+ if (process.env[ENV_IMDS_DISABLED]) {
473
+ return void 0;
474
+ }
475
+ if (Date.now() < negativeCacheUntil) {
476
+ return void 0;
477
+ }
478
+ try {
479
+ const endpoint = resolveImdsEndpoint();
480
+ const token = (await imdsRequest({
481
+ ...endpoint,
482
+ path: IMDS_TOKEN_PATH,
483
+ method: "PUT",
484
+ headers: {
485
+ [X_AWS_EC2_METADATA_TOKEN_TTL]: "21600"
486
+ }
487
+ })).toString();
488
+ const region = (await imdsRequest({
489
+ ...endpoint,
490
+ path: IMDS_REGION_PATH,
491
+ method: "GET",
492
+ headers: {
493
+ [X_AWS_EC2_METADATA_TOKEN]: token
494
+ }
495
+ })).toString().trim();
496
+ return region || cacheNegativeAndReturnUndefined();
497
+ } catch {
498
+ return cacheNegativeAndReturnUndefined();
499
+ }
500
+ };
501
+ var cacheNegativeAndReturnUndefined = () => {
502
+ negativeCacheUntil = Date.now() + NEG_CACHE_TTL_MS;
503
+ return void 0;
504
+ };
505
+ var resolveImdsEndpoint = () => {
506
+ const envEndpoint = process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT;
507
+ if (envEndpoint) {
508
+ const url = new URL(envEndpoint);
509
+ return {
510
+ hostname: url.hostname.replace(/^\[(.+)]$/, "$1"),
511
+ port: url.port ? Number(url.port) : void 0
512
+ };
513
+ }
514
+ if (process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE === "IPv6") {
515
+ return { hostname: "fd00:ec2::254" };
516
+ }
517
+ return { hostname: "169.254.169.254" };
518
+ };
519
+ var imdsRequest = async (options) => {
520
+ const { request } = await import("http");
521
+ return new Promise((resolve, reject) => {
522
+ const req = request({
523
+ hostname: options.hostname,
524
+ port: options.port,
525
+ path: options.path,
526
+ method: options.method,
527
+ headers: options.headers,
528
+ timeout: TIMEOUT_MS,
529
+ signal: AbortSignal.timeout(TIMEOUT_MS)
530
+ });
531
+ req.on("error", (err) => {
532
+ reject(err);
533
+ req.destroy();
534
+ });
535
+ req.on("timeout", () => {
536
+ reject(new Error("TimeoutError from instance metadata service"));
537
+ req.destroy();
538
+ });
539
+ req.on("response", (res) => {
540
+ const { statusCode = 400 } = res;
541
+ if (statusCode < 200 || statusCode >= 300) {
542
+ reject(Object.assign(new Error("Error response received from instance metadata service"), { statusCode }));
543
+ req.destroy();
544
+ return;
545
+ }
546
+ const chunks = [];
547
+ res.on("data", (chunk) => chunks.push(chunk));
548
+ res.on("end", () => {
549
+ resolve(Buffer.concat(chunks));
550
+ req.destroy();
551
+ });
552
+ });
553
+ req.end();
554
+ });
555
+ };
556
+
557
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/config.js
558
+ var REGION_ENV_NAME = "AWS_REGION";
559
+ var REGION_INI_NAME = "region";
560
+ var NODE_REGION_CONFIG_OPTIONS = {
561
+ environmentVariableSelector: (env) => env[REGION_ENV_NAME],
562
+ configFileSelector: (profile) => profile[REGION_INI_NAME],
563
+ default: async () => {
564
+ const region = await getInstanceMetadataRegion();
565
+ if (region) {
566
+ return region;
567
+ }
568
+ throw new Error("Region is missing");
569
+ }
570
+ };
571
+ var NODE_REGION_CONFIG_FILE_OPTIONS = {
572
+ preferredFile: "credentials"
573
+ };
574
+
575
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/defaultsModeConfig.js
576
+ var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE";
577
+ var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode";
578
+ var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = {
579
+ environmentVariableSelector: (env) => {
580
+ return env[AWS_DEFAULTS_MODE_ENV];
581
+ },
582
+ configFileSelector: (profile) => {
583
+ return profile[AWS_DEFAULTS_MODE_CONFIG];
584
+ },
585
+ default: "legacy"
586
+ };
587
+
588
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/resolveDefaultsModeConfig.js
589
+ var resolveDefaultsModeConfig = ({ region = loadConfig(NODE_REGION_CONFIG_OPTIONS), defaultsMode = loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) } = {}) => memoize(async () => {
590
+ const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode;
591
+ switch (mode?.toLowerCase()) {
592
+ case "auto":
593
+ return resolveNodeDefaultsModeAuto(region);
594
+ case "in-region":
595
+ case "cross-region":
596
+ case "mobile":
597
+ case "standard":
598
+ case "legacy":
599
+ return Promise.resolve(mode?.toLocaleLowerCase());
600
+ case void 0:
601
+ return Promise.resolve("legacy");
602
+ default:
603
+ throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`);
604
+ }
605
+ });
606
+ var resolveNodeDefaultsModeAuto = async (clientRegion) => {
607
+ if (clientRegion) {
608
+ const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion;
609
+ const inferredRegion = await inferPhysicalRegion();
610
+ if (!inferredRegion) {
611
+ return "standard";
612
+ }
613
+ if (resolvedRegion === inferredRegion) {
614
+ return "in-region";
615
+ } else {
616
+ return "cross-region";
617
+ }
618
+ }
619
+ return "standard";
620
+ };
621
+ var inferPhysicalRegion = async () => {
622
+ if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) {
623
+ return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV];
624
+ }
625
+ return getInstanceMetadataRegion();
626
+ };
627
+
628
+ export {
629
+ CredentialsProviderError,
630
+ TokenProviderError,
631
+ booleanSelector,
632
+ SelectorType,
633
+ getProfileName,
634
+ getSSOTokenFilepath,
635
+ getSSOTokenFromFile,
636
+ CONFIG_PREFIX_SEPARATOR,
637
+ loadSsoSessionData,
638
+ parseKnownFiles,
639
+ loadConfig,
640
+ NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,
641
+ NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,
642
+ NODE_REGION_CONFIG_OPTIONS,
643
+ NODE_REGION_CONFIG_FILE_OPTIONS,
644
+ resolveRegionConfig,
645
+ resolveDefaultsModeConfig
646
+ };
@@ -23,7 +23,7 @@ var BUILTIN_TOOLS = [
23
23
  description: "Help your AI understand your videos, so you can ask questions and get answers from the right moments.",
24
24
  longDescription: "Turn videos into knowledge your AI can understand. It listens to what is said, reads what appears on screen, and helps you find the moments that matter.",
25
25
  category: "media",
26
- version: "0.2.2",
26
+ version: "0.2.9",
27
27
  pricing: "free",
28
28
  emoji: "\u{1F3AC}",
29
29
  icon: "Film",
@@ -765,6 +765,7 @@ async function getAllCategories() {
765
765
  }
766
766
 
767
767
  export {
768
+ compareToolVersions,
768
769
  mergeToolDescriptors,
769
770
  fetchToolFromHub,
770
771
  buildRegistry,