@quiltdata/benchling-webhook 0.7.4-20251107T155705Z → 0.7.4
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/README.md +6 -4
- package/dist/bin/cli.js +0 -18
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/commands/get-env.d.ts +16 -0
- package/dist/bin/commands/get-env.d.ts.map +1 -0
- package/dist/bin/commands/get-env.js +210 -0
- package/dist/bin/commands/get-env.js.map +1 -0
- package/dist/bin/commands/infer-quilt-config.d.ts +3 -2
- package/dist/bin/commands/infer-quilt-config.d.ts.map +1 -1
- package/dist/bin/commands/infer-quilt-config.js +39 -65
- package/dist/bin/commands/infer-quilt-config.js.map +1 -1
- package/dist/bin/commands/setup-wizard.d.ts.map +1 -1
- package/dist/bin/commands/setup-wizard.js +108 -153
- package/dist/bin/commands/setup-wizard.js.map +1 -1
- package/dist/bin/commands/sync-secrets.d.ts +6 -3
- package/dist/bin/commands/sync-secrets.d.ts.map +1 -1
- package/dist/bin/commands/sync-secrets.js +14 -6
- package/dist/bin/commands/sync-secrets.js.map +1 -1
- package/dist/lib/interfaces/config-storage.d.ts +80 -0
- package/dist/lib/interfaces/config-storage.d.ts.map +1 -0
- package/dist/lib/interfaces/config-storage.js +9 -0
- package/dist/lib/interfaces/config-storage.js.map +1 -0
- package/dist/lib/utils/stack-inference.d.ts +28 -0
- package/dist/lib/utils/stack-inference.d.ts.map +1 -1
- package/dist/lib/utils/stack-inference.js +61 -0
- package/dist/lib/utils/stack-inference.js.map +1 -1
- package/dist/lib/xdg-base.d.ts +306 -0
- package/dist/lib/xdg-base.d.ts.map +1 -0
- package/dist/lib/xdg-base.js +440 -0
- package/dist/lib/xdg-base.js.map +1 -0
- package/dist/lib/xdg-config.d.ts +54 -187
- package/dist/lib/xdg-config.d.ts.map +1 -1
- package/dist/lib/xdg-config.js +83 -342
- package/dist/lib/xdg-config.js.map +1 -1
- package/dist/package.json +4 -3
- package/dist/scripts/list-quilt-stacks.d.ts +14 -0
- package/dist/scripts/list-quilt-stacks.d.ts.map +1 -0
- package/dist/scripts/list-quilt-stacks.js +96 -0
- package/dist/scripts/list-quilt-stacks.js.map +1 -0
- package/env.template +79 -0
- package/package.json +4 -3
- package/dist/bin/commands/config-show.d.ts +0 -14
- package/dist/bin/commands/config-show.d.ts.map +0 -1
- package/dist/bin/commands/config-show.js +0 -24
- package/dist/bin/commands/config-show.js.map +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ts-node
|
|
2
|
+
/**
|
|
3
|
+
* List CloudFormation stacks that are Quilt catalog deployments
|
|
4
|
+
*
|
|
5
|
+
* Quilt stacks are identified by having a "QuiltWebHost" output parameter.
|
|
6
|
+
* This script efficiently fetches all stacks and filters them client-side.
|
|
7
|
+
*/
|
|
8
|
+
import { QuiltStack } from "../lib/utils/stack-inference";
|
|
9
|
+
/**
|
|
10
|
+
* Find all Quilt stacks in a region with optional verbose output
|
|
11
|
+
*/
|
|
12
|
+
declare function findQuiltStacks(region: string, verbose?: boolean): Promise<QuiltStack[]>;
|
|
13
|
+
export { findQuiltStacks };
|
|
14
|
+
//# sourceMappingURL=list-quilt-stacks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-quilt-stacks.d.ts","sourceRoot":"","sources":["../../scripts/list-quilt-stacks.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AAEH,OAAO,EAIH,UAAU,EACb,MAAM,8BAA8B,CAAC;AAEtC;;GAEG;AACH,iBAAe,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,UAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAwBrF;AAkED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
#!/usr/bin/env ts-node
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* List CloudFormation stacks that are Quilt catalog deployments
|
|
5
|
+
*
|
|
6
|
+
* Quilt stacks are identified by having a "QuiltWebHost" output parameter.
|
|
7
|
+
* This script efficiently fetches all stacks and filters them client-side.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.findQuiltStacks = findQuiltStacks;
|
|
11
|
+
const stack_inference_1 = require("../lib/utils/stack-inference");
|
|
12
|
+
/**
|
|
13
|
+
* Find all Quilt stacks in a region with optional verbose output
|
|
14
|
+
*/
|
|
15
|
+
async function findQuiltStacks(region, verbose = false) {
|
|
16
|
+
if (verbose) {
|
|
17
|
+
console.log(`Searching for Quilt stacks in ${region}...`);
|
|
18
|
+
console.log();
|
|
19
|
+
}
|
|
20
|
+
// Get all stacks
|
|
21
|
+
const allStacks = (0, stack_inference_1.listAllStacks)(region);
|
|
22
|
+
if (verbose) {
|
|
23
|
+
console.log(`Found ${allStacks.length} total stacks`);
|
|
24
|
+
// Show progress for each stack
|
|
25
|
+
for (const stackSummary of allStacks) {
|
|
26
|
+
process.stdout.write(` Checking ${stackSummary.StackName}...`);
|
|
27
|
+
if ((0, stack_inference_1.isQuiltStack)(region, stackSummary.StackName)) {
|
|
28
|
+
console.log(" ✓ Quilt stack");
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
console.log(" (not Quilt)");
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
// Use the utility function to get all Quilt stacks
|
|
36
|
+
return (0, stack_inference_1.findAllQuiltStacks)(region, false);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Main CLI entry point
|
|
40
|
+
*/
|
|
41
|
+
async function main() {
|
|
42
|
+
const args = process.argv.slice(2);
|
|
43
|
+
const region = args.find(arg => arg.startsWith("--region="))?.split("=")[1] || "us-east-1";
|
|
44
|
+
const verbose = args.includes("--verbose") || args.includes("-v");
|
|
45
|
+
const json = args.includes("--json");
|
|
46
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
47
|
+
console.log(`Usage: ts-node scripts/list-quilt-stacks.ts [options]
|
|
48
|
+
|
|
49
|
+
Options:
|
|
50
|
+
--region=REGION AWS region to search (default: us-east-1)
|
|
51
|
+
--verbose, -v Show detailed progress
|
|
52
|
+
--json Output results as JSON
|
|
53
|
+
--help, -h Show this help message
|
|
54
|
+
|
|
55
|
+
Examples:
|
|
56
|
+
ts-node scripts/list-quilt-stacks.ts --region=us-east-1
|
|
57
|
+
ts-node scripts/list-quilt-stacks.ts --region=us-east-2 --verbose
|
|
58
|
+
ts-node scripts/list-quilt-stacks.ts --json
|
|
59
|
+
`);
|
|
60
|
+
process.exit(0);
|
|
61
|
+
}
|
|
62
|
+
try {
|
|
63
|
+
const quiltStacks = await findQuiltStacks(region, verbose);
|
|
64
|
+
if (json) {
|
|
65
|
+
console.log(JSON.stringify(quiltStacks, null, 2));
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
if (verbose) {
|
|
69
|
+
console.log();
|
|
70
|
+
}
|
|
71
|
+
console.log(`Found ${quiltStacks.length} Quilt stack(s) in ${region}:`);
|
|
72
|
+
console.log();
|
|
73
|
+
for (const stack of quiltStacks) {
|
|
74
|
+
console.log(` • ${stack.StackName} (${stack.StackStatus})`);
|
|
75
|
+
const quiltWebHost = stack.Outputs?.find(o => o.OutputKey === "QuiltWebHost");
|
|
76
|
+
if (quiltWebHost) {
|
|
77
|
+
console.log(` QuiltWebHost: ${quiltWebHost.OutputValue}`);
|
|
78
|
+
}
|
|
79
|
+
const queueUrl = stack.Outputs?.find(o => o.OutputKey === "PackagerQueueUrl");
|
|
80
|
+
if (queueUrl) {
|
|
81
|
+
console.log(` Queue: ${queueUrl.OutputValue}`);
|
|
82
|
+
}
|
|
83
|
+
console.log();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
console.error(`Error: ${error.message}`);
|
|
89
|
+
process.exit(1);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// Run if called directly
|
|
93
|
+
if (require.main === module) {
|
|
94
|
+
main();
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=list-quilt-stacks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-quilt-stacks.js","sourceRoot":"","sources":["../../scripts/list-quilt-stacks.ts"],"names":[],"mappings":"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"}
|
package/env.template
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
#
|
|
2
|
+
# ALWAYS REQUIRED PARAMETERS
|
|
3
|
+
#
|
|
4
|
+
|
|
5
|
+
# --- Benchling OAuth Configuration ---
|
|
6
|
+
# Tenant: Use XXX if you login at XXX.benchling.com
|
|
7
|
+
BENCHLING_TENANT=your-tenant
|
|
8
|
+
|
|
9
|
+
# OAuth credentials from your Benchling app
|
|
10
|
+
BENCHLING_CLIENT_ID=your-client-id
|
|
11
|
+
BENCHLING_CLIENT_SECRET=your-client-secret
|
|
12
|
+
|
|
13
|
+
# App definition ID from Benchling app manifest
|
|
14
|
+
BENCHLING_APP_DEFINITION_ID=appdef_your_id_here
|
|
15
|
+
|
|
16
|
+
# S3 bucket for storing Benchling exports (YOUR data bucket)
|
|
17
|
+
BENCHLING_PKG_BUCKET=your-data-bucket # (without s3:// prefix)
|
|
18
|
+
|
|
19
|
+
#
|
|
20
|
+
# POSSIBLY REQUIRED PARAMETERS
|
|
21
|
+
#
|
|
22
|
+
|
|
23
|
+
QUILT_CATALOG=quilt-stack.your-company.com
|
|
24
|
+
# Required UNLESS available from 'quilt3 config'
|
|
25
|
+
|
|
26
|
+
BENCHLING_TEST_ENTRY=etr_123456789
|
|
27
|
+
# Actual entry ID from your tenant, needed to run integration tests
|
|
28
|
+
|
|
29
|
+
#
|
|
30
|
+
# Optional PARAMETERS
|
|
31
|
+
#
|
|
32
|
+
|
|
33
|
+
# --- Package Configuration ---
|
|
34
|
+
# Prefix for Quilt package names (e.g., "benchling/my-experiment")
|
|
35
|
+
BENCHLING_PKG_PREFIX=benchling
|
|
36
|
+
|
|
37
|
+
# Metadata key to link Benchling entries to packages
|
|
38
|
+
BENCHLING_PKG_KEY=experiment_id
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# --- Application Configuration (Required) ---
|
|
42
|
+
# Logging level: DEBUG, INFO, WARNING, ERROR, CRITICAL
|
|
43
|
+
BENCHLING_LOG_LEVEL=INFO
|
|
44
|
+
|
|
45
|
+
# Enable/disable webhook signature verification (true/false)
|
|
46
|
+
BENCHLING_ENABLE_WEBHOOK_VERIFICATION=true
|
|
47
|
+
|
|
48
|
+
# Comma-separated list of allowed source IPs (leave empty to allow all)
|
|
49
|
+
# Example: 34.216.192.90,34.217.183.162
|
|
50
|
+
BENCHLING_WEBHOOK_ALLOW_LIST=
|
|
51
|
+
|
|
52
|
+
# ==============================================================================
|
|
53
|
+
# NOTES
|
|
54
|
+
# ==============================================================================
|
|
55
|
+
#
|
|
56
|
+
# Quick Start:
|
|
57
|
+
# 1. Copy this file to .env: cp env.template .env
|
|
58
|
+
# 2. Fill in BENCHLING_* variables (section 2)
|
|
59
|
+
# 3. Create secret: npm run config
|
|
60
|
+
# 4. Fill in QuiltStackARN (section 1)
|
|
61
|
+
# 5. Deploy: npm run deploy
|
|
62
|
+
#
|
|
63
|
+
# Configuration at Runtime:
|
|
64
|
+
# The deployed stack resolves ALL configuration from just 2 sources:
|
|
65
|
+
# - QuiltStackARN → gets Quilt catalog, database, SQS queue from CloudFormation
|
|
66
|
+
# - BenchlingSecret → gets all Benchling credentials and app config from Secrets Manager
|
|
67
|
+
#
|
|
68
|
+
# No other environment variables are needed for production deployment.
|
|
69
|
+
#
|
|
70
|
+
# Local Development:
|
|
71
|
+
# For testing locally without AWS:
|
|
72
|
+
# - make -C docker run-local (starts Flask with mocked AWS)
|
|
73
|
+
# - make -C docker test-local (runs tests against local server)
|
|
74
|
+
#
|
|
75
|
+
# For More Information:
|
|
76
|
+
# - See docs/PARAMETERS.md for parameter reference
|
|
77
|
+
# - See README.md for complete setup guide
|
|
78
|
+
# - Run: npm run cli -- --help
|
|
79
|
+
#
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quiltdata/benchling-webhook",
|
|
3
|
-
"version": "0.7.4
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "AWS CDK deployment for Benchling webhook processing using Fargate - Deploy directly with npx",
|
|
5
5
|
"main": "dist/lib/index.js",
|
|
6
6
|
"types": "dist/lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist/",
|
|
9
9
|
"README.md",
|
|
10
|
-
"LICENSE"
|
|
10
|
+
"LICENSE",
|
|
11
|
+
"env.template"
|
|
11
12
|
],
|
|
12
13
|
"bin": {
|
|
13
14
|
"benchling-webhook": "./dist/bin/cli.js"
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
"test": "npm run build:typecheck && npm run test:ts && npm run test:python",
|
|
37
38
|
"test:ci": "npm run build:typecheck && npm run test:ts",
|
|
38
39
|
"test:dev": "make -C docker test-deployed-dev PROFILE=dev",
|
|
39
|
-
"test:local": "make -C docker build && make -C docker test-local
|
|
40
|
+
"test:local": "make -C docker build && make -C docker test-local",
|
|
40
41
|
"test:prod": "make -C docker test-deployed-prod",
|
|
41
42
|
"test:python": "make -C docker test-unit",
|
|
42
43
|
"test:ts": "cross-env NODE_ENV=test jest --maxWorkers=50%",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Config Show Command
|
|
4
|
-
*
|
|
5
|
-
* Outputs the complete configuration for a profile as JSON.
|
|
6
|
-
* This is used by Python code to avoid config logic duplication.
|
|
7
|
-
*/
|
|
8
|
-
interface ConfigShowOptions {
|
|
9
|
-
profile?: string;
|
|
10
|
-
json?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export declare function configShowCommand(options: ConfigShowOptions): Promise<void>;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=config-show.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-show.d.ts","sourceRoot":"","sources":["../../../bin/commands/config-show.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AAIH,UAAU,iBAAiB;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAejF"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
/**
|
|
4
|
-
* Config Show Command
|
|
5
|
-
*
|
|
6
|
-
* Outputs the complete configuration for a profile as JSON.
|
|
7
|
-
* This is used by Python code to avoid config logic duplication.
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.configShowCommand = configShowCommand;
|
|
11
|
-
const xdg_config_1 = require("../../lib/xdg-config");
|
|
12
|
-
async function configShowCommand(options) {
|
|
13
|
-
const profile = options.profile || "default";
|
|
14
|
-
const xdg = new xdg_config_1.XDGConfig();
|
|
15
|
-
// Check if profile exists
|
|
16
|
-
if (!xdg.profileExists(profile)) {
|
|
17
|
-
throw new Error(`Profile does not exist: ${profile}`);
|
|
18
|
-
}
|
|
19
|
-
// Read the profile configuration
|
|
20
|
-
const config = xdg.readProfile(profile);
|
|
21
|
-
// Always output as JSON (for Python consumption)
|
|
22
|
-
console.log(JSON.stringify(config, null, 2));
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=config-show.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-show.js","sourceRoot":"","sources":["../../../bin/commands/config-show.ts"],"names":[],"mappings":";;AACA;;;;;GAKG;;AASH,8CAeC;AAtBD,qDAAiD;AAO1C,KAAK,UAAU,iBAAiB,CAAC,OAA0B;IAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,SAAS,CAAC;IAE7C,MAAM,GAAG,GAAG,IAAI,sBAAS,EAAE,CAAC;IAE5B,0BAA0B;IAC1B,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,2BAA2B,OAAO,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED,iCAAiC;IACjC,MAAM,MAAM,GAAG,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAExC,iDAAiD;IACjD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AACjD,CAAC"}
|