@smythos/sre 1.5.25 → 1.5.26
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.
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package Manager Detection Utility
|
|
3
|
+
*
|
|
4
|
+
* This utility helps in identifying the package manager (npm, pnpm, or yarn)
|
|
5
|
+
* used in the current environment. This is crucial for providing the correct
|
|
6
|
+
* install instructions to the user.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Detects the package manager used in the current environment.
|
|
10
|
+
*
|
|
11
|
+
* It checks the `npm_config_user_agent` environment variable first,
|
|
12
|
+
* which is a standard way to detect the package manager.
|
|
13
|
+
*
|
|
14
|
+
* Falls back to checking the executed script path and common package manager
|
|
15
|
+
* patterns.
|
|
16
|
+
*
|
|
17
|
+
* @returns {'npm' | 'pnpm' | 'yarn'} The detected package manager.
|
|
18
|
+
*/
|
|
19
|
+
export declare const getPackageManager: () => "npm" | "pnpm" | "yarn";
|
|
20
|
+
/**
|
|
21
|
+
* Gets the install command for the detected package manager.
|
|
22
|
+
*
|
|
23
|
+
* @param packageName - The name of the package to install
|
|
24
|
+
* @returns The complete install command string
|
|
25
|
+
*/
|
|
26
|
+
export declare const getInstallCommand: (packageName: string) => string;
|
package/package.json
CHANGED
|
@@ -262,6 +262,10 @@ const imageGenerator = {
|
|
|
262
262
|
const teamId = agent.teamId;
|
|
263
263
|
const apiKey = (await getCredentials(AccessCandidate.team(teamId), 'runware')) as string;
|
|
264
264
|
|
|
265
|
+
if (!apiKey) {
|
|
266
|
+
throw new Error('Runware API key is missing. Please provide a valid key to continue.');
|
|
267
|
+
}
|
|
268
|
+
|
|
265
269
|
const runware = new Runware({ apiKey });
|
|
266
270
|
await runware.ensureConnection();
|
|
267
271
|
|