@coffre/db 0.8.1 → 0.9.0
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/dist/connect.d.ts +1 -1
- package/dist/{database-BEnexh-3.d.ts → database-hd1hAll-.d.ts} +1 -1
- package/dist/dialect.d.ts +1 -1
- package/dist/grants.d.ts +1 -1
- package/dist/hyperdrive.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/log.d.ts +1 -1
- package/dist/migrations/postgres/0010_handle_places.sql +2 -0
- package/dist/migrations/postgres/0011_plain_values.sql +19 -0
- package/dist/migrations/postgres/meta/0010_snapshot.json +2991 -0
- package/dist/migrations/postgres/meta/0011_snapshot.json +2997 -0
- package/dist/migrations/postgres/meta/_journal.json +14 -0
- package/dist/migrations/sqlite/0010_handle_places.sql +2 -0
- package/dist/migrations/sqlite/0011_plain_values.sql +14 -0
- package/dist/migrations/sqlite/meta/0010_snapshot.json +2711 -0
- package/dist/migrations/sqlite/meta/0011_snapshot.json +2718 -0
- package/dist/migrations/sqlite/meta/_journal.json +14 -0
- package/dist/portable.d.ts +2 -2
- package/dist/{schema-BZRkBJQZ.d.ts → schema-CCYKTG-E.d.ts} +34 -0
- package/dist/schema-sqlite.d.ts +38 -0
- package/dist/schema-sqlite.js +3 -1
- package/dist/schema-version.d.ts +1 -1
- package/dist/schema-version.js +28 -0
- package/dist/schema.d.ts +1 -1
- package/dist/schema.js +3 -1
- package/package.json +2 -2
- package/src/migrations/postgres/0010_handle_places.sql +2 -0
- package/src/migrations/postgres/0011_plain_values.sql +19 -0
- package/src/migrations/postgres/meta/0010_snapshot.json +2991 -0
- package/src/migrations/postgres/meta/0011_snapshot.json +2997 -0
- package/src/migrations/postgres/meta/_journal.json +14 -0
- package/src/migrations/sqlite/0010_handle_places.sql +2 -0
- package/src/migrations/sqlite/0011_plain_values.sql +14 -0
- package/src/migrations/sqlite/meta/0010_snapshot.json +2711 -0
- package/src/migrations/sqlite/meta/0011_snapshot.json +2718 -0
- package/src/migrations/sqlite/meta/_journal.json +14 -0
- package/src/schema.sqlite.ts +7 -0
- package/src/schema.ts +7 -0
|
@@ -71,6 +71,20 @@
|
|
|
71
71
|
"when": 1792281880190,
|
|
72
72
|
"tag": "0009_handles",
|
|
73
73
|
"breakpoints": true
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"idx": 10,
|
|
77
|
+
"version": "6",
|
|
78
|
+
"when": 1792315000277,
|
|
79
|
+
"tag": "0010_handle_places",
|
|
80
|
+
"breakpoints": true
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"idx": 11,
|
|
84
|
+
"version": "6",
|
|
85
|
+
"when": 1792317461299,
|
|
86
|
+
"tag": "0011_plain_values",
|
|
87
|
+
"breakpoints": true
|
|
74
88
|
}
|
|
75
89
|
]
|
|
76
90
|
}
|
package/src/schema.sqlite.ts
CHANGED
|
@@ -177,6 +177,11 @@ export const secretVersions = sqliteTable(
|
|
|
177
177
|
// and each says which half it holds: 'private' or 'public'.
|
|
178
178
|
pairId: text('pair_id'),
|
|
179
179
|
pairHalf: text('pair_half'),
|
|
180
|
+
// The value itself, for a plain one: a key marked not secret, an account's
|
|
181
|
+
// id, which whoever lists the environment sees and a read serves without
|
|
182
|
+
// the vault. Null for a secret. Its ciphertext is kept as any version's,
|
|
183
|
+
// for what opens values through the vault (a reference, a fork's copy).
|
|
184
|
+
plaintext: text(),
|
|
180
185
|
},
|
|
181
186
|
(table) => [
|
|
182
187
|
unique('secret_versions_secret_id_version_key').on(table.secretId, table.version),
|
|
@@ -671,6 +676,8 @@ export const credentials = sqliteTable(
|
|
|
671
676
|
identityId: text('identity_id'),
|
|
672
677
|
// What a service or personal token reaches (`CredentialScope`), JSON: null for a session, one a binding issued (its binding's), or one of 0.4 the app has not sealed yet.
|
|
673
678
|
scope: text(),
|
|
679
|
+
// The environments a handle was made for, by id, each with whether it was asked for as `@me`, JSON: null for any other credential, or a handle of 0.8.
|
|
680
|
+
places: text(),
|
|
674
681
|
label: text(),
|
|
675
682
|
createdAt: createdAt(),
|
|
676
683
|
createdBy: text('created_by').notNull(),
|
package/src/schema.ts
CHANGED
|
@@ -171,6 +171,11 @@ export const secretVersions = pgTable(
|
|
|
171
171
|
// and each says which half it holds: 'private' or 'public'.
|
|
172
172
|
pairId: uuid('pair_id'),
|
|
173
173
|
pairHalf: text('pair_half'),
|
|
174
|
+
// The value itself, for a plain one: a key marked not secret, an account's
|
|
175
|
+
// id, which whoever lists the environment sees and a read serves without
|
|
176
|
+
// the vault. Null for a secret. Its ciphertext is kept as any version's,
|
|
177
|
+
// for what opens values through the vault (a reference, a fork's copy).
|
|
178
|
+
plaintext: text(),
|
|
174
179
|
},
|
|
175
180
|
(table) => [
|
|
176
181
|
unique('secret_versions_secret_id_version_key').on(table.secretId, table.version),
|
|
@@ -745,6 +750,8 @@ export const credentials = pgTable(
|
|
|
745
750
|
identityId: uuid('identity_id'),
|
|
746
751
|
// What a service or personal token reaches (`CredentialScope`), JSON: null for a session, one a binding issued (its binding's), or one of 0.4 the app has not sealed yet.
|
|
747
752
|
scope: text(),
|
|
753
|
+
// The environments a handle was made for, by id, each with whether it was asked for as `@me`, JSON: null for any other credential, or a handle of 0.8.
|
|
754
|
+
places: text(),
|
|
748
755
|
label: text(),
|
|
749
756
|
createdAt: createdAt(),
|
|
750
757
|
createdBy: text('created_by').notNull(),
|