@sealkeeper/schema 0.4.6 → 0.4.7

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.
Files changed (66) hide show
  1. package/README.md +2 -2
  2. package/dist/api.d.ts +9 -32
  3. package/dist/api.js +32 -28
  4. package/dist/credential.d.ts +1 -66
  5. package/dist/credential.js +25 -63
  6. package/dist/events.d.ts +1 -0
  7. package/dist/events.js +13 -1
  8. package/dist/goal.js +2 -2
  9. package/dist/hidden.d.ts +1 -0
  10. package/dist/hidden.js +5 -0
  11. package/dist/index.d.ts +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/moderation.js +1 -4
  14. package/dist/seal-conformance.js +2 -2
  15. package/dist/seal-verify.d.ts +21 -0
  16. package/dist/seal-verify.js +63 -0
  17. package/dist/standing.js +1 -1
  18. package/package.json +2 -6
  19. package/dist/db/agent-milestones.d.ts +0 -75
  20. package/dist/db/agent-milestones.js +0 -16
  21. package/dist/db/agent-renames.d.ts +0 -126
  22. package/dist/db/agent-renames.js +0 -20
  23. package/dist/db/agents.d.ts +0 -351
  24. package/dist/db/agents.js +0 -99
  25. package/dist/db/client.d.ts +0 -2561
  26. package/dist/db/client.js +0 -61
  27. package/dist/db/credentials.d.ts +0 -143
  28. package/dist/db/credentials.js +0 -16
  29. package/dist/db/deleted-operators.d.ts +0 -75
  30. package/dist/db/deleted-operators.js +0 -13
  31. package/dist/db/events.d.ts +0 -160
  32. package/dist/db/events.js +0 -41
  33. package/dist/db/feed-items.d.ts +0 -109
  34. package/dist/db/feed-items.js +0 -21
  35. package/dist/db/index.d.ts +0 -76
  36. package/dist/db/index.js +0 -28
  37. package/dist/db/migrate.d.ts +0 -1
  38. package/dist/db/migrate.js +0 -34
  39. package/dist/db/migrator.d.ts +0 -6
  40. package/dist/db/migrator.js +0 -36
  41. package/dist/db/operator-identities.d.ts +0 -211
  42. package/dist/db/operator-identities.js +0 -49
  43. package/dist/db/operator-level-grants.d.ts +0 -109
  44. package/dist/db/operator-level-grants.js +0 -30
  45. package/dist/db/operator-slugs.d.ts +0 -92
  46. package/dist/db/operator-slugs.js +0 -25
  47. package/dist/db/operators.d.ts +0 -228
  48. package/dist/db/operators.js +0 -39
  49. package/dist/db/quota-counters.d.ts +0 -109
  50. package/dist/db/quota-counters.js +0 -17
  51. package/dist/db/ratings.d.ts +0 -160
  52. package/dist/db/ratings.js +0 -27
  53. package/dist/db/scores.d.ts +0 -160
  54. package/dist/db/scores.js +0 -15
  55. package/dist/db/standing.d.ts +0 -264
  56. package/dist/db/standing.js +0 -34
  57. package/dist/db/task-claim-failures.d.ts +0 -143
  58. package/dist/db/task-claim-failures.js +0 -37
  59. package/dist/db/task-outcomes.d.ts +0 -145
  60. package/dist/db/task-outcomes.js +0 -25
  61. package/dist/db/tasks.d.ts +0 -381
  62. package/dist/db/tasks.js +0 -106
  63. package/dist/db/timestamps.d.ts +0 -4
  64. package/dist/db/timestamps.js +0 -24
  65. package/dist/db/url.d.ts +0 -12
  66. package/dist/db/url.js +0 -25
package/dist/db/url.d.ts DELETED
@@ -1,12 +0,0 @@
1
- import type { Options } from 'postgres';
2
- /**
3
- * Turns DATABASE_URL into arguments for postgres.js.
4
- *
5
- * On Cloud Run the URL uses the Cloud SQL socket form with an empty host,
6
- * `postgres://user:pass@/db?host=/cloudsql/project:region:instance`.
7
- * postgres.js cannot parse an empty host and ignores `?host=`, so this moves
8
- * the socket directory into the `path` option. Other URLs pass through.
9
- *
10
- * Errors never include the URL, because it carries the password.
11
- */
12
- export declare function pgArgs(databaseUrl: string): [string, Options<never>];
package/dist/db/url.js DELETED
@@ -1,25 +0,0 @@
1
- /**
2
- * Turns DATABASE_URL into arguments for postgres.js.
3
- *
4
- * On Cloud Run the URL uses the Cloud SQL socket form with an empty host,
5
- * `postgres://user:pass@/db?host=/cloudsql/project:region:instance`.
6
- * postgres.js cannot parse an empty host and ignores `?host=`, so this moves
7
- * the socket directory into the `path` option. Other URLs pass through.
8
- *
9
- * Errors never include the URL, because it carries the password.
10
- */
11
- export function pgArgs(databaseUrl) {
12
- const withHost = databaseUrl.replace(/^(postgres(?:ql)?:\/\/[^/@]*@)\//, '$1localhost/');
13
- let u;
14
- try {
15
- u = new URL(withHost);
16
- }
17
- catch {
18
- throw new Error('DATABASE_URL is not a valid postgres URL');
19
- }
20
- const socketDir = u.searchParams.get('host');
21
- if (!socketDir)
22
- return [databaseUrl, {}];
23
- u.searchParams.delete('host');
24
- return [u.toString(), { path: `${socketDir}/.s.PGSQL.${u.port || 5432}` }];
25
- }