@quiltdata/benchling-webhook 0.6.3-20251104T182406Z → 0.7.1-20251106T100426Z
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 +166 -5
- package/dist/bin/benchling-webhook.d.ts +2 -16
- package/dist/bin/benchling-webhook.d.ts.map +1 -1
- package/dist/bin/benchling-webhook.js +96 -158
- package/dist/bin/benchling-webhook.js.map +1 -1
- package/dist/bin/cli.js +96 -8
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/{config-profiles.d.ts → commands/config-profiles.d.ts} +10 -9
- package/dist/bin/commands/config-profiles.d.ts.map +1 -0
- package/dist/bin/{config-profiles.js → commands/config-profiles.js} +109 -102
- package/dist/bin/commands/config-profiles.js.map +1 -0
- package/dist/bin/commands/create-secret.d.ts.map +1 -0
- package/dist/bin/commands/create-secret.js.map +1 -0
- package/dist/bin/commands/deploy.d.ts +12 -1
- package/dist/bin/commands/deploy.d.ts.map +1 -1
- package/dist/bin/commands/deploy.js +116 -106
- package/dist/bin/commands/deploy.js.map +1 -1
- package/dist/bin/{get-env.d.ts → commands/get-env.d.ts} +1 -1
- package/dist/bin/commands/get-env.d.ts.map +1 -0
- package/dist/bin/{get-env.js → commands/get-env.js} +2 -2
- package/dist/bin/commands/get-env.js.map +1 -0
- package/dist/bin/commands/health-check.d.ts +47 -0
- package/dist/bin/commands/health-check.d.ts.map +1 -0
- package/dist/bin/commands/health-check.js +357 -0
- package/dist/bin/commands/health-check.js.map +1 -0
- package/dist/{scripts → bin/commands}/infer-quilt-config.d.ts +6 -15
- package/dist/bin/commands/infer-quilt-config.d.ts.map +1 -0
- package/dist/{scripts → bin/commands}/infer-quilt-config.js +37 -63
- package/dist/bin/commands/infer-quilt-config.js.map +1 -0
- package/dist/bin/commands/init.d.ts.map +1 -1
- package/dist/bin/commands/init.js +2 -32
- package/dist/bin/commands/init.js.map +1 -1
- package/dist/bin/commands/publish.d.ts.map +1 -0
- package/dist/bin/{publish.js → commands/publish.js} +2 -2
- package/dist/bin/commands/publish.js.map +1 -0
- package/dist/bin/commands/setup-profile.d.ts +29 -0
- package/dist/bin/commands/setup-profile.d.ts.map +1 -0
- package/dist/bin/commands/setup-profile.js +218 -0
- package/dist/bin/commands/setup-profile.js.map +1 -0
- package/dist/bin/commands/setup-wizard.d.ts +24 -11
- package/dist/bin/commands/setup-wizard.d.ts.map +1 -1
- package/dist/bin/commands/setup-wizard.js +607 -51
- package/dist/bin/commands/setup-wizard.js.map +1 -1
- package/dist/{scripts → bin/commands}/sync-secrets.d.ts +6 -1
- package/dist/bin/commands/sync-secrets.d.ts.map +1 -0
- package/dist/{scripts → bin/commands}/sync-secrets.js +159 -55
- package/dist/bin/commands/sync-secrets.js.map +1 -0
- package/dist/bin/commands/validate.d.ts.map +1 -1
- package/dist/bin/commands/validate.js +2 -12
- package/dist/bin/commands/validate.js.map +1 -1
- package/dist/lib/alb-api-gateway.d.ts +7 -1
- package/dist/lib/alb-api-gateway.d.ts.map +1 -1
- package/dist/lib/alb-api-gateway.js +9 -6
- package/dist/lib/alb-api-gateway.js.map +1 -1
- package/dist/lib/benchling-webhook-stack.d.ts +13 -12
- package/dist/lib/benchling-webhook-stack.d.ts.map +1 -1
- package/dist/lib/benchling-webhook-stack.js +44 -31
- package/dist/lib/benchling-webhook-stack.js.map +1 -1
- package/dist/lib/configuration-saver.d.ts +4 -24
- package/dist/lib/configuration-saver.d.ts.map +1 -1
- package/dist/lib/configuration-saver.js +14 -71
- package/dist/lib/configuration-saver.js.map +1 -1
- package/dist/lib/fargate-service.d.ts +11 -21
- package/dist/lib/fargate-service.d.ts.map +1 -1
- package/dist/lib/fargate-service.js +79 -176
- package/dist/lib/fargate-service.js.map +1 -1
- package/dist/lib/types/config.d.ts +538 -232
- package/dist/lib/types/config.d.ts.map +1 -1
- package/dist/lib/types/config.js +133 -3
- package/dist/lib/types/config.js.map +1 -1
- package/dist/lib/utils/config-loader.d.ts.map +1 -1
- package/dist/lib/utils/config-loader.js +3 -2
- package/dist/lib/utils/config-loader.js.map +1 -1
- package/dist/lib/utils/config-resolver.d.ts +2 -2
- package/dist/lib/utils/config-resolver.d.ts.map +1 -1
- package/dist/lib/utils/config-resolver.js +14 -7
- package/dist/lib/utils/config-resolver.js.map +1 -1
- package/dist/lib/utils/config.d.ts +1 -1
- package/dist/lib/utils/config.d.ts.map +1 -1
- package/dist/lib/utils/config.js +7 -3
- package/dist/lib/utils/config.js.map +1 -1
- package/dist/lib/utils/sqs.d.ts +13 -0
- package/dist/lib/utils/sqs.d.ts.map +1 -0
- package/dist/lib/utils/sqs.js +22 -0
- package/dist/lib/utils/sqs.js.map +1 -0
- package/dist/lib/utils/stack-inference.d.ts.map +1 -1
- package/dist/lib/utils/stack-inference.js +8 -6
- package/dist/lib/utils/stack-inference.js.map +1 -1
- package/dist/lib/xdg-config.d.ts +224 -106
- package/dist/lib/xdg-config.d.ts.map +1 -1
- package/dist/lib/xdg-config.js +454 -387
- package/dist/lib/xdg-config.js.map +1 -1
- package/dist/package.json +19 -14
- package/dist/scripts/check-logs.d.ts +12 -0
- package/dist/scripts/check-logs.d.ts.map +1 -0
- package/dist/{bin → scripts}/check-logs.js +65 -15
- package/dist/scripts/check-logs.js.map +1 -0
- package/dist/scripts/check-webhook-verification.d.ts +3 -0
- package/dist/scripts/check-webhook-verification.d.ts.map +1 -0
- package/dist/{bin/test-invalid-signature.js → scripts/check-webhook-verification.js} +1 -1
- package/dist/scripts/check-webhook-verification.js.map +1 -0
- package/dist/scripts/get-dev-version.d.ts +16 -0
- package/dist/scripts/get-dev-version.d.ts.map +1 -0
- package/dist/scripts/get-dev-version.js +57 -0
- package/dist/scripts/get-dev-version.js.map +1 -0
- package/dist/scripts/send-event.d.ts.map +1 -0
- package/dist/scripts/send-event.js.map +1 -0
- package/dist/{bin → scripts}/version.d.ts +3 -1
- package/dist/scripts/version.d.ts.map +1 -0
- package/dist/{bin → scripts}/version.js +95 -9
- package/dist/scripts/version.js.map +1 -0
- package/package.json +19 -14
- package/dist/bin/check-logs.d.ts +0 -7
- package/dist/bin/check-logs.d.ts.map +0 -1
- package/dist/bin/check-logs.js.map +0 -1
- package/dist/bin/config-profiles.d.ts.map +0 -1
- package/dist/bin/config-profiles.js.map +0 -1
- package/dist/bin/create-secret.d.ts.map +0 -1
- package/dist/bin/create-secret.js.map +0 -1
- package/dist/bin/dev-deploy.d.ts +0 -20
- package/dist/bin/dev-deploy.d.ts.map +0 -1
- package/dist/bin/dev-deploy.js +0 -289
- package/dist/bin/dev-deploy.js.map +0 -1
- package/dist/bin/get-env.d.ts.map +0 -1
- package/dist/bin/get-env.js.map +0 -1
- package/dist/bin/publish.d.ts.map +0 -1
- package/dist/bin/publish.js.map +0 -1
- package/dist/bin/release.d.ts +0 -11
- package/dist/bin/release.d.ts.map +0 -1
- package/dist/bin/release.js +0 -141
- package/dist/bin/release.js.map +0 -1
- package/dist/bin/send-event.d.ts.map +0 -1
- package/dist/bin/send-event.js.map +0 -1
- package/dist/bin/test-invalid-signature.d.ts +0 -3
- package/dist/bin/test-invalid-signature.d.ts.map +0 -1
- package/dist/bin/test-invalid-signature.js.map +0 -1
- package/dist/bin/version.d.ts.map +0 -1
- package/dist/bin/version.js.map +0 -1
- package/dist/lib/xdg-cli-wrapper.d.ts +0 -113
- package/dist/lib/xdg-cli-wrapper.d.ts.map +0 -1
- package/dist/lib/xdg-cli-wrapper.js +0 -289
- package/dist/lib/xdg-cli-wrapper.js.map +0 -1
- package/dist/scripts/config-health-check.d.ts +0 -84
- package/dist/scripts/config-health-check.d.ts.map +0 -1
- package/dist/scripts/config-health-check.js +0 -659
- package/dist/scripts/config-health-check.js.map +0 -1
- package/dist/scripts/infer-quilt-config.d.ts.map +0 -1
- package/dist/scripts/infer-quilt-config.js.map +0 -1
- package/dist/scripts/install-wizard.d.ts +0 -34
- package/dist/scripts/install-wizard.d.ts.map +0 -1
- package/dist/scripts/install-wizard.js +0 -719
- package/dist/scripts/install-wizard.js.map +0 -1
- package/dist/scripts/sync-secrets.d.ts.map +0 -1
- package/dist/scripts/sync-secrets.js.map +0 -1
- /package/dist/bin/{create-secret.d.ts → commands/create-secret.d.ts} +0 -0
- /package/dist/bin/{create-secret.js → commands/create-secret.js} +0 -0
- /package/dist/bin/{publish.d.ts → commands/publish.d.ts} +0 -0
- /package/dist/{bin → scripts}/send-event.d.ts +0 -0
- /package/dist/{bin → scripts}/send-event.js +0 -0
package/README.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Connects Benchling lab notebook entries to Quilt data packages via webhooks.
|
|
4
4
|
|
|
5
|
+
## BREAKING CHANGE: v0.7.0
|
|
6
|
+
|
|
7
|
+
Version 0.7.0 introduces a completely new configuration architecture. If you are upgrading from v0.6.x, **you must reconfigure your deployment**. See [Migration Guide](#migration-from-v06x) below.
|
|
8
|
+
|
|
5
9
|
## Prerequisites
|
|
6
10
|
|
|
7
11
|
- Node.js 18+ with `npx` ([download](https://nodejs.org))
|
|
@@ -30,18 +34,175 @@ After deployment, install the webhook URL in your [Benchling app settings](https
|
|
|
30
34
|
|
|
31
35
|
In Benchling: Create entry → Insert Canvas → "Quilt Integration" → Create/Update package
|
|
32
36
|
|
|
33
|
-
##
|
|
37
|
+
## Configuration Structure (v0.7.0+)
|
|
38
|
+
|
|
39
|
+
Profiles are stored in `~/.config/benchling-webhook/{profile}/`:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
~/.config/benchling-webhook/
|
|
43
|
+
├── default/
|
|
44
|
+
│ ├── config.json # All configuration settings
|
|
45
|
+
│ └── deployments.json # Deployment history and tracking
|
|
46
|
+
├── dev/ # Optional: development profile
|
|
47
|
+
│ ├── config.json
|
|
48
|
+
│ └── deployments.json
|
|
49
|
+
└── prod/ # Optional: separate production profile
|
|
50
|
+
├── config.json
|
|
51
|
+
└── deployments.json
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Profile-Based Configuration
|
|
55
|
+
|
|
56
|
+
**Profile**: A named set of configuration values (credentials, settings, etc.)
|
|
57
|
+
|
|
58
|
+
**Stage**: An API Gateway deployment target (`dev`, `prod`, `staging`, etc.)
|
|
59
|
+
|
|
60
|
+
Profiles and stages are independent - you can deploy any profile to any stage.
|
|
61
|
+
|
|
62
|
+
## Multi-Environment Deployments
|
|
63
|
+
|
|
64
|
+
### For End Users (Single Environment)
|
|
65
|
+
|
|
66
|
+
Most users only need production:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npx @quiltdata/benchling-webhook@latest # Setup production profile
|
|
70
|
+
npx @quiltdata/benchling-webhook@latest deploy # Deploy to production
|
|
71
|
+
npx @quiltdata/benchling-webhook@latest test # Test production
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### For Maintainers (Dev + Production)
|
|
75
|
+
|
|
76
|
+
Create side-by-side dev and production environments:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Initial setup (one-time)
|
|
80
|
+
npx @quiltdata/benchling-webhook@latest setup # Setup default profile
|
|
81
|
+
npx @quiltdata/benchling-webhook@latest setup-profile dev --inherit # Setup dev profile
|
|
82
|
+
|
|
83
|
+
# Edit dev profile to override:
|
|
84
|
+
# - benchling.appDefinitionId (different Benchling app for dev)
|
|
85
|
+
# - deployment.imageTag ("latest" for dev, semantic version for prod)
|
|
86
|
+
|
|
87
|
+
# Deploy both environments
|
|
88
|
+
npx @quiltdata/benchling-webhook@latest deploy --profile dev --stage dev # Deploy dev
|
|
89
|
+
npx @quiltdata/benchling-webhook@latest deploy --profile default --stage prod # Deploy prod
|
|
90
|
+
|
|
91
|
+
# Test both environments
|
|
92
|
+
npx @quiltdata/benchling-webhook@latest test --profile dev # Test dev
|
|
93
|
+
npx @quiltdata/benchling-webhook@latest test --profile default # Test prod
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Architecture
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
Single AWS Stack: BenchlingWebhookStack
|
|
100
|
+
├── API Gateway (shared)
|
|
101
|
+
│ ├── Stage: dev → https://xxx.amazonaws.com/dev/event
|
|
102
|
+
│ └── Stage: prod → https://xxx.amazonaws.com/prod/event
|
|
103
|
+
├── ALB (shared)
|
|
104
|
+
│ ├── Target Group: dev-targets → ECS Service: benchling-webhook-dev
|
|
105
|
+
│ └── Target Group: prod-targets → ECS Service: benchling-webhook-prod
|
|
106
|
+
├── ECS Cluster (shared)
|
|
107
|
+
│ ├── Service: benchling-webhook-dev (imageTag: latest)
|
|
108
|
+
│ └── Service: benchling-webhook-prod (imageTag: v0.7.0)
|
|
109
|
+
└── VPC, Secrets Manager, CloudWatch (shared)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Available Commands
|
|
34
113
|
|
|
35
114
|
```bash
|
|
36
|
-
npx @quiltdata/benchling-webhook@latest --help
|
|
37
|
-
npx @quiltdata/benchling-webhook@latest
|
|
38
|
-
npx @quiltdata/benchling-webhook@latest
|
|
39
|
-
npx @quiltdata/benchling-webhook@latest
|
|
115
|
+
npx @quiltdata/benchling-webhook@latest --help # Show all commands
|
|
116
|
+
npx @quiltdata/benchling-webhook@latest setup # Initial setup (creates default profile)
|
|
117
|
+
npx @quiltdata/benchling-webhook@latest setup-profile dev # Create dev profile
|
|
118
|
+
npx @quiltdata/benchling-webhook@latest deploy # Deploy default profile to prod stage
|
|
119
|
+
npx @quiltdata/benchling-webhook@latest deploy --profile dev --stage dev # Deploy dev profile to dev stage
|
|
120
|
+
npx @quiltdata/benchling-webhook@latest test # Test deployed integration
|
|
121
|
+
npx @quiltdata/benchling-webhook@latest manifest # Generate Benchling app manifest
|
|
40
122
|
```
|
|
41
123
|
|
|
124
|
+
## Migration from v0.6.x
|
|
125
|
+
|
|
126
|
+
**IMPORTANT: Version 0.7.0 is a BREAKING CHANGE release.**
|
|
127
|
+
|
|
128
|
+
The configuration structure has completely changed. There is **NO automatic migration**. You must manually reconfigure your deployment.
|
|
129
|
+
|
|
130
|
+
### Step-by-Step Upgrade Guide
|
|
131
|
+
|
|
132
|
+
1. **Before upgrading, save your current configuration:**
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# Save your current settings for reference
|
|
136
|
+
cat ~/.config/benchling-webhook/default.json > ~/benchling-config-backup.json
|
|
137
|
+
cat ~/.config/benchling-webhook/deploy.json >> ~/benchling-config-backup.json
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
2. **Install v0.7.0:**
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
npm install -g @quiltdata/benchling-webhook@0.7.0
|
|
144
|
+
# or use npx
|
|
145
|
+
npx @quiltdata/benchling-webhook@0.7.0
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
3. **Run setup wizard to create new configuration:**
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
npx @quiltdata/benchling-webhook@latest setup
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
The wizard will prompt you to re-enter your configuration. Reference your backup file for settings.
|
|
155
|
+
|
|
156
|
+
4. **For multi-environment setups, create additional profiles:**
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
npx @quiltdata/benchling-webhook@latest setup-profile dev --inherit
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
5. **Test your deployment:**
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
npx @quiltdata/benchling-webhook@latest deploy --profile default --stage prod
|
|
166
|
+
npx @quiltdata/benchling-webhook@latest test --profile default
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
6. **Optional: Clean up old configuration files:**
|
|
170
|
+
|
|
171
|
+
Old configuration files are not used by v0.7.0 but remain for reference:
|
|
172
|
+
- `~/.config/benchling-webhook/default.json` (old user config)
|
|
173
|
+
- `~/.config/benchling-webhook/deploy.json` (old deployment tracking)
|
|
174
|
+
- `~/.config/benchling-webhook/profiles/` (old profiles directory)
|
|
175
|
+
|
|
176
|
+
You can safely delete these after verifying your new deployment works.
|
|
177
|
+
|
|
178
|
+
### What Changed in v0.7.0
|
|
179
|
+
|
|
180
|
+
| v0.6.x | v0.7.0 |
|
|
181
|
+
|--------|--------|
|
|
182
|
+
| `~/.config/benchling-webhook/default.json` | `~/.config/benchling-webhook/default/config.json` |
|
|
183
|
+
| `~/.config/benchling-webhook/profiles/dev/default.json` | `~/.config/benchling-webhook/dev/config.json` |
|
|
184
|
+
| `~/.config/benchling-webhook/deploy.json` (shared) | `~/.config/benchling-webhook/{profile}/deployments.json` (per-profile) |
|
|
185
|
+
|
|
186
|
+
For detailed migration information, see [MIGRATION.md](./MIGRATION.md).
|
|
187
|
+
|
|
188
|
+
## Cost Information
|
|
189
|
+
|
|
190
|
+
Running multiple environments increases infrastructure costs:
|
|
191
|
+
|
|
192
|
+
| Configuration | Monthly Cost | Notes |
|
|
193
|
+
|---------------|--------------|-------|
|
|
194
|
+
| **Single environment** | $70-100 | Production only |
|
|
195
|
+
| **Dual environment** | $85-145 | +15-45% for dev environment |
|
|
196
|
+
|
|
197
|
+
**Cost breakdown:**
|
|
198
|
+
- ALB: ~$23 (shared between environments)
|
|
199
|
+
- NAT Gateway: ~$32 (shared between environments)
|
|
200
|
+
- ECS Fargate: ~$15-45 per environment (scales with usage)
|
|
201
|
+
|
|
42
202
|
## Resources
|
|
43
203
|
|
|
44
204
|
- [Changelog](./CHANGELOG.md) - Version history
|
|
205
|
+
- [Migration Guide](./MIGRATION.md) - Upgrading from v0.6.x to v0.7.0
|
|
45
206
|
- [Report Issues](https://github.com/quiltdata/benchling-webhook/issues)
|
|
46
207
|
|
|
47
208
|
## License
|
|
@@ -3,7 +3,6 @@ import "dotenv/config";
|
|
|
3
3
|
import * as cdk from "aws-cdk-lib";
|
|
4
4
|
import { BenchlingWebhookStack } from "../lib/benchling-webhook-stack";
|
|
5
5
|
import type { Config } from "../lib/utils/config";
|
|
6
|
-
declare const inferStackConfig: any;
|
|
7
6
|
/**
|
|
8
7
|
* Result of CDK bootstrap check
|
|
9
8
|
*/
|
|
@@ -23,28 +22,15 @@ export interface DeploymentResult {
|
|
|
23
22
|
stackName: string;
|
|
24
23
|
stackId: string;
|
|
25
24
|
}
|
|
26
|
-
/**
|
|
27
|
-
* Configuration inference result
|
|
28
|
-
*/
|
|
29
|
-
export interface InferenceResult {
|
|
30
|
-
success: boolean;
|
|
31
|
-
inferredVars: Record<string, string>;
|
|
32
|
-
error?: string;
|
|
33
|
-
}
|
|
34
25
|
/**
|
|
35
26
|
* Check if CDK is bootstrapped for the given account/region
|
|
36
27
|
* Returns status object instead of exiting
|
|
37
28
|
*/
|
|
38
29
|
export declare function checkCdkBootstrap(account: string, region: string): Promise<BootstrapStatus>;
|
|
39
|
-
/**
|
|
40
|
-
* Attempt to infer configuration from catalog
|
|
41
|
-
* Non-fatal - returns success flag and inferred values
|
|
42
|
-
*/
|
|
43
|
-
export declare function inferConfiguration(catalogUrl: string): Promise<InferenceResult>;
|
|
44
30
|
/**
|
|
45
31
|
* Create CDK app and stack (synthesis only, no deployment)
|
|
46
|
-
*
|
|
32
|
+
* v0.7.0: Updated to use ProfileConfig
|
|
33
|
+
* TODO: Phase 4 will update this to read ProfileConfig directly from XDGConfig
|
|
47
34
|
*/
|
|
48
35
|
export declare function createStack(config: Config): DeploymentResult;
|
|
49
|
-
export { inferStackConfig };
|
|
50
36
|
//# sourceMappingURL=benchling-webhook.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"benchling-webhook.d.ts","sourceRoot":"","sources":["../../bin/benchling-webhook.ts"],"names":[],"mappings":";AACA,OAAO,eAAe,CAAC;AACvB,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"benchling-webhook.d.ts","sourceRoot":"","sources":["../../bin/benchling-webhook.ts"],"names":[],"mappings":";AACA,OAAO,eAAe,CAAC;AACvB,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC;IACb,KAAK,EAAE,qBAAqB,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CACnC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACf,OAAO,CAAC,eAAe,CAAC,CAsC1B;AAiDD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAqB5D"}
|
|
@@ -34,18 +34,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
};
|
|
35
35
|
})();
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.inferStackConfig = void 0;
|
|
38
37
|
exports.checkCdkBootstrap = checkCdkBootstrap;
|
|
39
|
-
exports.inferConfiguration = inferConfiguration;
|
|
40
38
|
exports.createStack = createStack;
|
|
41
39
|
require("dotenv/config");
|
|
42
40
|
const cdk = __importStar(require("aws-cdk-lib"));
|
|
43
41
|
const benchling_webhook_stack_1 = require("../lib/benchling-webhook-stack");
|
|
44
42
|
const child_process_1 = require("child_process");
|
|
45
|
-
// Import get-env for library usage
|
|
46
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
47
|
-
const { inferStackConfig } = require("./get-env");
|
|
48
|
-
exports.inferStackConfig = inferStackConfig;
|
|
49
43
|
/**
|
|
50
44
|
* Check if CDK is bootstrapped for the given account/region
|
|
51
45
|
* Returns status object instead of exiting
|
|
@@ -82,47 +76,67 @@ async function checkCdkBootstrap(account, region) {
|
|
|
82
76
|
}
|
|
83
77
|
}
|
|
84
78
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
79
|
+
* Convert legacy Config to ProfileConfig (temporary adapter for Phase 4 migration)
|
|
80
|
+
* TODO: Remove this function in Phase 4 when all config loading uses ProfileConfig directly
|
|
87
81
|
*/
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
82
|
+
function legacyConfigToProfileConfig(config) {
|
|
83
|
+
return {
|
|
84
|
+
quilt: {
|
|
85
|
+
stackArn: config.quiltStackArn || "",
|
|
86
|
+
catalog: config.quiltCatalog,
|
|
87
|
+
database: config.quiltDatabase,
|
|
88
|
+
queueUrl: config.queueUrl,
|
|
89
|
+
region: config.cdkRegion,
|
|
90
|
+
},
|
|
91
|
+
benchling: {
|
|
92
|
+
tenant: config.benchlingTenant,
|
|
93
|
+
clientId: config.benchlingClientId,
|
|
94
|
+
clientSecret: config.benchlingClientSecret,
|
|
95
|
+
secretArn: config.benchlingSecret,
|
|
96
|
+
appDefinitionId: config.benchlingAppDefinitionId,
|
|
97
|
+
},
|
|
98
|
+
packages: {
|
|
99
|
+
bucket: config.quiltUserBucket,
|
|
100
|
+
prefix: config.pkgPrefix || "benchling",
|
|
101
|
+
metadataKey: config.pkgKey || "experiment_id",
|
|
102
|
+
},
|
|
103
|
+
deployment: {
|
|
104
|
+
region: config.cdkRegion,
|
|
105
|
+
account: config.cdkAccount,
|
|
106
|
+
ecrRepository: config.ecrRepositoryName || "quiltdata/benchling",
|
|
107
|
+
imageTag: config.imageTag || "latest",
|
|
108
|
+
},
|
|
109
|
+
logging: {
|
|
110
|
+
level: config.logLevel || "INFO",
|
|
111
|
+
},
|
|
112
|
+
security: {
|
|
113
|
+
webhookAllowList: config.webhookAllowList || "",
|
|
114
|
+
enableVerification: config.enableWebhookVerification !== "false",
|
|
115
|
+
},
|
|
116
|
+
_metadata: {
|
|
117
|
+
version: "0.7.0-migration",
|
|
118
|
+
createdAt: new Date().toISOString(),
|
|
119
|
+
updatedAt: new Date().toISOString(),
|
|
120
|
+
source: "cli",
|
|
121
|
+
},
|
|
122
|
+
};
|
|
107
123
|
}
|
|
108
124
|
/**
|
|
109
125
|
* Create CDK app and stack (synthesis only, no deployment)
|
|
110
|
-
*
|
|
126
|
+
* v0.7.0: Updated to use ProfileConfig
|
|
127
|
+
* TODO: Phase 4 will update this to read ProfileConfig directly from XDGConfig
|
|
111
128
|
*/
|
|
112
129
|
function createStack(config) {
|
|
113
130
|
const app = new cdk.App();
|
|
131
|
+
// Convert legacy config to ProfileConfig
|
|
132
|
+
const profileConfig = legacyConfigToProfileConfig(config);
|
|
114
133
|
const stack = new benchling_webhook_stack_1.BenchlingWebhookStack(app, "BenchlingWebhookStack", {
|
|
115
134
|
env: {
|
|
116
135
|
account: config.cdkAccount,
|
|
117
136
|
region: config.cdkRegion,
|
|
118
137
|
},
|
|
119
|
-
|
|
120
|
-
quiltStackArn: config.quiltStackArn,
|
|
121
|
-
benchlingSecret: config.benchlingSecret,
|
|
122
|
-
logLevel: config.logLevel || "INFO",
|
|
138
|
+
config: profileConfig,
|
|
123
139
|
createEcrRepository: config.createEcrRepository === "true",
|
|
124
|
-
ecrRepositoryName: config.ecrRepositoryName || "quiltdata/benchling",
|
|
125
|
-
imageTag: config.imageTag || "latest",
|
|
126
140
|
});
|
|
127
141
|
return {
|
|
128
142
|
app,
|
|
@@ -131,134 +145,58 @@ function createStack(config) {
|
|
|
131
145
|
stackId: stack.stackId,
|
|
132
146
|
};
|
|
133
147
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
*/
|
|
139
|
-
async function legacyGetConfig() {
|
|
140
|
-
const userEnv = process.env;
|
|
141
|
-
let inferredEnv = {};
|
|
142
|
-
// If QUILT_CATALOG is provided, try to infer additional configuration
|
|
143
|
-
if (userEnv.QUILT_CATALOG) {
|
|
144
|
-
try {
|
|
145
|
-
console.log(`Inferring configuration from catalog: ${userEnv.QUILT_CATALOG}`);
|
|
146
|
-
const result = await inferStackConfig(`https://${userEnv.QUILT_CATALOG.replace(/^https?:\/\//, "")}`);
|
|
147
|
-
inferredEnv = result.inferredVars;
|
|
148
|
-
console.log("✓ Successfully inferred stack configuration\n");
|
|
149
|
-
}
|
|
150
|
-
catch (error) {
|
|
151
|
-
console.error(`Warning: Could not infer configuration from catalog: ${error.message}`);
|
|
152
|
-
console.error("Falling back to environment variables only.\n");
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
// Merge: user env takes precedence over inferred values
|
|
156
|
-
const config = { ...inferredEnv, ...userEnv };
|
|
157
|
-
// Validate required user-provided values
|
|
158
|
-
const requiredUserVars = [
|
|
159
|
-
"QUILT_CATALOG",
|
|
160
|
-
"QUILT_USER_BUCKET",
|
|
161
|
-
"BENCHLING_CLIENT_ID",
|
|
162
|
-
"BENCHLING_CLIENT_SECRET",
|
|
163
|
-
"BENCHLING_TENANT",
|
|
164
|
-
];
|
|
165
|
-
const missingVars = requiredUserVars.filter((varName) => !config[varName]);
|
|
166
|
-
if (missingVars.length > 0) {
|
|
167
|
-
console.error("Error: Missing required environment variables:");
|
|
168
|
-
missingVars.forEach((varName) => {
|
|
169
|
-
console.error(` - ${varName}`);
|
|
170
|
-
});
|
|
171
|
-
console.error("\nPlease set these variables in your .env file.");
|
|
172
|
-
console.error("See env.template for guidance.");
|
|
173
|
-
process.exit(1);
|
|
174
|
-
}
|
|
175
|
-
// Validate inferred values are present
|
|
176
|
-
const requiredInferredVars = [
|
|
177
|
-
"CDK_DEFAULT_ACCOUNT",
|
|
178
|
-
"CDK_DEFAULT_REGION",
|
|
179
|
-
"QUEUE_ARN",
|
|
180
|
-
"QUILT_DATABASE",
|
|
181
|
-
];
|
|
182
|
-
const missingInferredVars = requiredInferredVars.filter((varName) => !config[varName]);
|
|
183
|
-
if (missingInferredVars.length > 0) {
|
|
184
|
-
console.error("Error: Could not infer required configuration:");
|
|
185
|
-
missingInferredVars.forEach((varName) => {
|
|
186
|
-
console.error(` - ${varName}`);
|
|
187
|
-
});
|
|
188
|
-
console.error("\nThese values should be automatically inferred from your Quilt catalog.");
|
|
189
|
-
console.error("Please ensure:");
|
|
190
|
-
console.error(" 1. QUILT_CATALOG is set correctly");
|
|
191
|
-
console.error(" 2. Your AWS credentials have CloudFormation read permissions");
|
|
192
|
-
console.error(" 3. The Quilt stack is deployed and accessible");
|
|
193
|
-
console.error("\nAlternatively, you can manually set these values in your .env file.");
|
|
194
|
-
process.exit(1);
|
|
195
|
-
}
|
|
196
|
-
// Validate required Benchling fields
|
|
197
|
-
const requiredBenchlingFields = [
|
|
198
|
-
"BENCHLING_TENANT",
|
|
199
|
-
"BENCHLING_CLIENT_ID",
|
|
200
|
-
"BENCHLING_CLIENT_SECRET",
|
|
201
|
-
"BENCHLING_APP_DEFINITION_ID",
|
|
202
|
-
];
|
|
203
|
-
const missingBenchling = requiredBenchlingFields.filter((field) => !config[field]);
|
|
204
|
-
if (missingBenchling.length > 0) {
|
|
205
|
-
console.error("Error: The following required Benchling configuration is missing:");
|
|
206
|
-
missingBenchling.forEach((field) => console.error(` - ${field}`));
|
|
207
|
-
process.exit(1);
|
|
208
|
-
}
|
|
209
|
-
return config;
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* DEPRECATED: Legacy main function for backwards compatibility
|
|
213
|
-
* Use createStack() + CDK CLI for new code
|
|
214
|
-
*/
|
|
215
|
-
async function legacyMain() {
|
|
216
|
-
const config = await legacyGetConfig();
|
|
217
|
-
// Check bootstrap
|
|
218
|
-
const bootstrapStatus = await checkCdkBootstrap(config.CDK_DEFAULT_ACCOUNT, config.CDK_DEFAULT_REGION);
|
|
219
|
-
if (!bootstrapStatus.bootstrapped) {
|
|
220
|
-
console.error("\n❌ CDK Bootstrap Error");
|
|
221
|
-
console.error("=".repeat(80));
|
|
222
|
-
console.error(bootstrapStatus.message);
|
|
223
|
-
console.error("\nTo bootstrap CDK, run:");
|
|
224
|
-
console.error(` ${bootstrapStatus.command}`);
|
|
225
|
-
console.error("=".repeat(80));
|
|
226
|
-
process.exit(1);
|
|
227
|
-
}
|
|
228
|
-
if (bootstrapStatus.warning) {
|
|
229
|
-
console.error("\n⚠️ CDK Bootstrap Warning");
|
|
230
|
-
console.error("=".repeat(80));
|
|
231
|
-
console.error(bootstrapStatus.warning);
|
|
232
|
-
console.error("=".repeat(80));
|
|
233
|
-
}
|
|
234
|
-
else {
|
|
235
|
-
console.log(`✓ CDK is bootstrapped (CDKToolkit stack: ${bootstrapStatus.status})\n`);
|
|
236
|
-
}
|
|
237
|
-
// Create stack - Secrets-only mode (v0.6.0+)
|
|
148
|
+
// Only run if called directly (not imported)
|
|
149
|
+
// v0.7.0: Updated to use ProfileConfig
|
|
150
|
+
// TODO: Phase 4 will replace this with proper XDGConfig loading
|
|
151
|
+
if (require.main === module) {
|
|
238
152
|
const app = new cdk.App();
|
|
239
|
-
//
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
153
|
+
// Minimal ProfileConfig from environment variables (for direct CDK usage)
|
|
154
|
+
const profileConfig = {
|
|
155
|
+
quilt: {
|
|
156
|
+
stackArn: process.env.QUILT_STACK_ARN || "",
|
|
157
|
+
catalog: process.env.QUILT_CATALOG || "",
|
|
158
|
+
database: process.env.QUILT_DATABASE || "",
|
|
159
|
+
queueUrl: process.env.QUEUE_URL || "",
|
|
160
|
+
region: process.env.CDK_DEFAULT_REGION || "us-east-1",
|
|
161
|
+
},
|
|
162
|
+
benchling: {
|
|
163
|
+
tenant: process.env.BENCHLING_TENANT || "",
|
|
164
|
+
clientId: process.env.BENCHLING_CLIENT_ID || "",
|
|
165
|
+
secretArn: process.env.BENCHLING_SECRET,
|
|
166
|
+
appDefinitionId: process.env.BENCHLING_APP_DEFINITION_ID || "",
|
|
167
|
+
},
|
|
168
|
+
packages: {
|
|
169
|
+
bucket: process.env.QUILT_USER_BUCKET || "",
|
|
170
|
+
prefix: process.env.PKG_PREFIX || "benchling",
|
|
171
|
+
metadataKey: process.env.PKG_KEY || "experiment_id",
|
|
172
|
+
},
|
|
173
|
+
deployment: {
|
|
174
|
+
region: process.env.CDK_DEFAULT_REGION || "us-east-1",
|
|
175
|
+
account: process.env.CDK_DEFAULT_ACCOUNT,
|
|
176
|
+
ecrRepository: process.env.ECR_REPOSITORY_NAME || "quiltdata/benchling",
|
|
177
|
+
imageTag: process.env.IMAGE_TAG || "latest",
|
|
178
|
+
},
|
|
179
|
+
logging: {
|
|
180
|
+
level: process.env.LOG_LEVEL || "INFO",
|
|
181
|
+
},
|
|
182
|
+
security: {
|
|
183
|
+
webhookAllowList: process.env.WEBHOOK_ALLOW_LIST || "",
|
|
184
|
+
enableVerification: process.env.ENABLE_WEBHOOK_VERIFICATION !== "false",
|
|
185
|
+
},
|
|
186
|
+
_metadata: {
|
|
187
|
+
version: "0.7.0",
|
|
188
|
+
createdAt: new Date().toISOString(),
|
|
189
|
+
updatedAt: new Date().toISOString(),
|
|
190
|
+
source: "cli",
|
|
191
|
+
},
|
|
192
|
+
};
|
|
243
193
|
new benchling_webhook_stack_1.BenchlingWebhookStack(app, "BenchlingWebhookStack", {
|
|
244
194
|
env: {
|
|
245
|
-
account:
|
|
246
|
-
region:
|
|
195
|
+
account: process.env.CDK_DEFAULT_ACCOUNT,
|
|
196
|
+
region: process.env.CDK_DEFAULT_REGION,
|
|
247
197
|
},
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
benchlingSecret: benchlingSecret,
|
|
251
|
-
logLevel: config.LOG_LEVEL || "INFO",
|
|
252
|
-
// ECR repository configuration
|
|
253
|
-
createEcrRepository: config.CREATE_ECR_REPOSITORY === "true",
|
|
254
|
-
ecrRepositoryName: config.ECR_REPOSITORY_NAME || "quiltdata/benchling",
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
// Only run if called directly (not imported)
|
|
258
|
-
if (require.main === module) {
|
|
259
|
-
legacyMain().catch((error) => {
|
|
260
|
-
console.error("Fatal error during CDK synthesis:", error);
|
|
261
|
-
process.exit(1);
|
|
198
|
+
config: profileConfig,
|
|
199
|
+
createEcrRepository: process.env.CREATE_ECR_REPOSITORY === "true",
|
|
262
200
|
});
|
|
263
201
|
}
|
|
264
202
|
//# sourceMappingURL=benchling-webhook.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"benchling-webhook.js","sourceRoot":"","sources":["../../bin/benchling-webhook.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"benchling-webhook.js","sourceRoot":"","sources":["../../bin/benchling-webhook.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,8CAyCC;AAsDD,kCAqBC;AApJD,yBAAuB;AACvB,iDAAmC;AACnC,4EAAuE;AACvE,iDAAyC;AAyBzC;;;GAGG;AACI,KAAK,UAAU,iBAAiB,CACnC,OAAe,EACf,MAAc;IAEd,IAAI,CAAC;QACD,MAAM,MAAM,GAAG,IAAA,wBAAQ,EACnB,+CAA+C,MAAM,6EAA6E,EAClI,EAAE,QAAQ,EAAE,OAAO,EAAE,CACxB,CAAC;QAEF,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;QAElC,IACI,WAAW,CAAC,QAAQ,CAAC,gBAAgB,CAAC;YACtC,WAAW,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EACzC,CAAC;YACC,OAAO;gBACH,YAAY,EA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