Commit 175eeb7
authored
feat(cli): read EQL v3 install SQL from @cipherstash/eql at runtime (CIP-3518) (#692)
The v3 install SQL was vendored into packages/cli/src/sql/cipherstash-encrypt-v3.sql
(~44k lines) by a build script (gen:eql-v3-sql), sha256-verified against the pinned
@cipherstash/eql. That copy defeats the point of depending on @cipherstash/eql: it
drifts from the pin on every bump (re-vendor required) and — as ~44k lines of
plpgsql in the tree — made GitHub classify the whole repo as plpgsql (CIP-3518).
Read it from the package at runtime instead:
- `readV3InstallSql()` calls `@cipherstash/eql/sql` `readInstallSql()` (the same
source the stack + prisma-next consume); the v3 branches of `loadBundledEqlSql`
and `EQLInstaller` route to it, so `resolveBundledFilename` is now v2-only.
- `@cipherstash/eql` moves devDependency → dependency, externalized in tsup so the
real package (and its `dist/sql/*.sql`) resolves at runtime.
- Delete `cipherstash-encrypt-v3.sql` + `scripts/build-eql-v3-sql.mjs` + the
`gen:eql-v3-sql` script and its CI drift-check (tests.yml).
No behaviour change: same one-artifact v3 bundle (self-adapts to non-superuser /
Supabase via the DO-block privilege catch), v2 path untouched. A `@cipherstash/eql`
bump now flows straight through. 557 cli unit green; bundle read verified via the
bin from an external cwd.
Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w1 parent b8cb599 commit 175eeb7
8 files changed
Lines changed: 65 additions & 44130 deletions
File tree
- .changeset
- .github/workflows
- packages/cli
- scripts
- src
- installer
- sql
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | 136 | | |
146 | 137 | | |
147 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
12 | 36 | | |
13 | 37 | | |
14 | 38 | | |
| |||
320 | 344 | | |
321 | 345 | | |
322 | 346 | | |
323 | | - | |
324 | | - | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
325 | 350 | | |
326 | 351 | | |
327 | 352 | | |
| |||
394 | 419 | | |
395 | 420 | | |
396 | 421 | | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
397 | 425 | | |
398 | 426 | | |
399 | 427 | | |
| |||
455 | 483 | | |
456 | 484 | | |
457 | 485 | | |
| 486 | + | |
| 487 | + | |
458 | 488 | | |
459 | | - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
460 | 492 | | |
461 | 493 | | |
462 | 494 | | |
| |||
474 | 506 | | |
475 | 507 | | |
476 | 508 | | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
477 | 513 | | |
478 | 514 | | |
479 | 515 | | |
480 | | - | |
| 516 | + | |
481 | 517 | | |
482 | 518 | | |
483 | 519 | | |
| |||
0 commit comments