seqera 0.1.0-beta.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/bin/seqera +58 -0
- package/package.json +32 -0
package/bin/seqera
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
const { execFileSync } = require("child_process");
|
|
5
|
+
const { join } = require("path");
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Platform-specific package mapping.
|
|
9
|
+
* Each entry maps a Node.js platform-arch pair to the corresponding
|
|
10
|
+
* npm package that contains the standalone Seqera CLI binary.
|
|
11
|
+
*/
|
|
12
|
+
const PLATFORM_PACKAGES = {
|
|
13
|
+
"darwin-arm64": "@seqera/cli-darwin-arm64",
|
|
14
|
+
"darwin-x64": "@seqera/cli-darwin-x64",
|
|
15
|
+
"linux-x64": "@seqera/cli-linux-x64",
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const platformKey = `${process.platform}-${process.arch}`;
|
|
19
|
+
const packageName = PLATFORM_PACKAGES[platformKey];
|
|
20
|
+
|
|
21
|
+
if (!packageName) {
|
|
22
|
+
console.error(
|
|
23
|
+
`Error: Unsupported platform "${platformKey}".\n` +
|
|
24
|
+
`Seqera CLI supports: ${Object.keys(PLATFORM_PACKAGES).join(", ")}\n`
|
|
25
|
+
);
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
let binaryPath;
|
|
30
|
+
try {
|
|
31
|
+
// Resolve the binary from the platform-specific package
|
|
32
|
+
binaryPath = require.resolve(join(packageName, "bin", "seqera"));
|
|
33
|
+
} catch {
|
|
34
|
+
console.error(
|
|
35
|
+
`Error: Could not find the Seqera CLI binary for ${platformKey}.\n` +
|
|
36
|
+
`Expected package: ${packageName}\n\n` +
|
|
37
|
+
`This can happen if:\n` +
|
|
38
|
+
` - Your package manager didn't install optional dependencies\n` +
|
|
39
|
+
` - You're on an unsupported platform\n\n` +
|
|
40
|
+
`Try reinstalling: npm install -g seqera\n`
|
|
41
|
+
);
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Execute the platform binary, forwarding all arguments and stdio
|
|
46
|
+
try {
|
|
47
|
+
execFileSync(binaryPath, process.argv.slice(2), {
|
|
48
|
+
stdio: "inherit",
|
|
49
|
+
});
|
|
50
|
+
} catch (err) {
|
|
51
|
+
// execFileSync throws on non-zero exit code; forward the exit code
|
|
52
|
+
if (err.status !== undefined) {
|
|
53
|
+
process.exit(err.status);
|
|
54
|
+
}
|
|
55
|
+
// Unexpected error (e.g. ENOENT, EACCES)
|
|
56
|
+
console.error(`Error: Failed to execute Seqera CLI binary: ${err.message}`);
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "seqera",
|
|
3
|
+
"version": "0.1.0-beta.1",
|
|
4
|
+
"description": "AI-powered CLI for Seqera Platform - bioinformatics workflow management",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"seqera",
|
|
7
|
+
"nextflow",
|
|
8
|
+
"bioinformatics",
|
|
9
|
+
"workflow",
|
|
10
|
+
"ai",
|
|
11
|
+
"cli"
|
|
12
|
+
],
|
|
13
|
+
"author": "Seqera Labs",
|
|
14
|
+
"license": "Apache-2.0",
|
|
15
|
+
"bin": {
|
|
16
|
+
"seqera": "bin/seqera"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"bin/**"
|
|
20
|
+
],
|
|
21
|
+
"optionalDependencies": {
|
|
22
|
+
"@seqera/cli-darwin-arm64": "0.1.0-beta.1",
|
|
23
|
+
"@seqera/cli-darwin-x64": "0.1.0-beta.1",
|
|
24
|
+
"@seqera/cli-linux-x64": "0.1.0-beta.1"
|
|
25
|
+
},
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=18"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
}
|
|
32
|
+
}
|