@fuzdev/fuz_app 0.84.0 → 0.85.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/testing/CLAUDE.md
CHANGED
|
@@ -121,8 +121,7 @@ factories accept any migration namespace set.
|
|
|
121
121
|
- `create_pg_factory(init_schema, test_url?)` — PostgreSQL; `skip: true` when `test_url` missing. Drops `schema_version` before `init_schema` so migrations re-evaluate against actual tables (prevents stale tracker rows from skipping migrations when DDL changes between sessions). Pool reused + cleaned up across `create()` calls.
|
|
122
122
|
- `auth_truncate_tables` — `['invite', 'api_token', 'auth_session', 'role_grant', 'role_grant_offer', 'actor', 'account']` in FK-safe order. Excludes `audit_log` — unit DB tests don't need to truncate it.
|
|
123
123
|
- `auth_integration_truncate_tables` — `auth_truncate_tables + ['audit_log']` for integration suites that exercise the audit path.
|
|
124
|
-
- `
|
|
125
|
-
- `drop_auth_schema(db)` — `DROP TABLE IF EXISTS <table> CASCADE` for every entry in `auth_drop_tables` plus `schema_version`. Safe on fresh DBs.
|
|
124
|
+
- `drop_auth_schema(db)` — `DROP SCHEMA public CASCADE; CREATE SCHEMA public`; call at the top of `init_schema` on persistent pg databases that may hold stale DDL from previous fuz_app versions. Drift-proof full-schema reset (despite the name, not auth-scoped) — same mechanism as `reset_pglite`.
|
|
126
125
|
- `create_describe_db(factories, truncate_tables)` — returns `describe_db(name, fn)` running `fn(get_db)` once per factory inside a `describe` with shared `beforeAll(create)` + `beforeEach(TRUNCATE)` + `afterAll(close)`. Skipped factories use `describe.skip`.
|
|
127
126
|
- `log_db_factory_status(factories)` — console summary of enabled / skipped factories.
|
|
128
127
|
|
package/dist/testing/db.d.ts
CHANGED
|
@@ -71,25 +71,18 @@ export declare const auth_truncate_tables: string[];
|
|
|
71
71
|
*/
|
|
72
72
|
export declare const auth_integration_truncate_tables: string[];
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
* The full set created by `auth_migrations` — use for clean-slate
|
|
77
|
-
* test DB initialization. `auth_truncate_tables` is the subset for
|
|
78
|
-
* between-test data cleanup (excludes `audit_log`).
|
|
79
|
-
*
|
|
80
|
-
* When adding tables to `auth_migrations`, add them here too.
|
|
81
|
-
*/
|
|
82
|
-
export declare const auth_drop_tables: readonly ["app_settings", "invite", "audit_log", "api_token", "auth_session", "role_grant", "role_grant_offer", "actor", "account", "bootstrap_lock"];
|
|
83
|
-
/**
|
|
84
|
-
* Drop all auth tables and schema version tracking for a clean slate.
|
|
74
|
+
* Reset the entire `public` schema for a clean slate before re-migration.
|
|
85
75
|
*
|
|
86
76
|
* Recommended at the start of `init_schema` callbacks for `create_pg_factory`.
|
|
87
|
-
* Persistent test databases
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
77
|
+
* Persistent test databases accumulate stale DDL across fuz_app versions;
|
|
78
|
+
* `DROP SCHEMA public CASCADE; CREATE SCHEMA public` wipes every table, type,
|
|
79
|
+
* and sequence regardless of namespace, so migrations always run against a
|
|
80
|
+
* truly empty database. Drift-proof — unlike a hand-maintained drop list it
|
|
81
|
+
* needs no upkeep when the schema gains a table. Despite the historical name,
|
|
82
|
+
* this resets the whole schema, not just auth tables (the only documented use
|
|
83
|
+
* is clean-slate re-migration, which always wanted a full reset).
|
|
91
84
|
*
|
|
92
|
-
* @mutates db - drops
|
|
85
|
+
* @mutates db - drops and recreates the `public` schema; all tables gone.
|
|
93
86
|
*/
|
|
94
87
|
export declare const drop_auth_schema: (db: Db) => Promise<void>;
|
|
95
88
|
/**
|
package/dist/testing/db.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/db.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AA6B7B,OAAO,KAAK,EAAC,EAAE,EAAC,MAAM,aAAa,CAAC;AAKpC;;GAEG;AACH,eAAO,MAAM,KAAK,SAA4B,C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,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GAAU,IAAI,EAAE,KAAG,OAAO,CAAC,IAAI,CAGvD,CAAC;AAMF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,GAAI,aAAa,CAAC,EAAE,EAAE,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,KAAG,SAkB7E,CAAC;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,iBAAiB,GAC7B,aAAa,CAAC,EAAE,EAAE,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,EACtC,WAAW,MAAM,KACf,SA2DF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,UAQhC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC,UAAyC,CAAC;AAEvF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,GAAU,IAAI,EAAE,KAAG,OAAO,CAAC,IAAI,CAG3D,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,GAC9B,WAAW,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,EACvC,iBAAiB,KAAK,CAAC,MAAM,CAAC,KAC5B,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,KAAK,IAAI,CAwBzD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,WAAW,KAAK,CAAC,SAAS,CAAC,KAAG,IAMnE,CAAC"}
|
package/dist/testing/db.js
CHANGED
|
@@ -178,42 +178,22 @@ export const auth_truncate_tables = [
|
|
|
178
178
|
*/
|
|
179
179
|
export const auth_integration_truncate_tables = [...auth_truncate_tables, 'audit_log'];
|
|
180
180
|
/**
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
* The full set created by `auth_migrations` — use for clean-slate
|
|
184
|
-
* test DB initialization. `auth_truncate_tables` is the subset for
|
|
185
|
-
* between-test data cleanup (excludes `audit_log`).
|
|
186
|
-
*
|
|
187
|
-
* When adding tables to `auth_migrations`, add them here too.
|
|
188
|
-
*/
|
|
189
|
-
export const auth_drop_tables = [
|
|
190
|
-
'app_settings',
|
|
191
|
-
'invite',
|
|
192
|
-
'audit_log',
|
|
193
|
-
'api_token',
|
|
194
|
-
'auth_session',
|
|
195
|
-
'role_grant',
|
|
196
|
-
'role_grant_offer',
|
|
197
|
-
'actor',
|
|
198
|
-
'account',
|
|
199
|
-
'bootstrap_lock',
|
|
200
|
-
];
|
|
201
|
-
/**
|
|
202
|
-
* Drop all auth tables and schema version tracking for a clean slate.
|
|
181
|
+
* Reset the entire `public` schema for a clean slate before re-migration.
|
|
203
182
|
*
|
|
204
183
|
* Recommended at the start of `init_schema` callbacks for `create_pg_factory`.
|
|
205
|
-
* Persistent test databases
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
184
|
+
* Persistent test databases accumulate stale DDL across fuz_app versions;
|
|
185
|
+
* `DROP SCHEMA public CASCADE; CREATE SCHEMA public` wipes every table, type,
|
|
186
|
+
* and sequence regardless of namespace, so migrations always run against a
|
|
187
|
+
* truly empty database. Drift-proof — unlike a hand-maintained drop list it
|
|
188
|
+
* needs no upkeep when the schema gains a table. Despite the historical name,
|
|
189
|
+
* this resets the whole schema, not just auth tables (the only documented use
|
|
190
|
+
* is clean-slate re-migration, which always wanted a full reset).
|
|
191
|
+
*
|
|
192
|
+
* @mutates db - drops and recreates the `public` schema; all tables gone.
|
|
211
193
|
*/
|
|
212
194
|
export const drop_auth_schema = async (db) => {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
await db.query('DROP TABLE IF EXISTS schema_version CASCADE');
|
|
195
|
+
await db.query('DROP SCHEMA public CASCADE');
|
|
196
|
+
await db.query('CREATE SCHEMA public');
|
|
217
197
|
};
|
|
218
198
|
/**
|
|
219
199
|
* Create a `describe_db` function bound to specific factories and truncate tables.
|
|
@@ -50,14 +50,13 @@
|
|
|
50
50
|
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
51
51
|
import type {ComponentProps, Snippet} from 'svelte';
|
|
52
52
|
import type {OmitStrict} from '@fuzdev/fuz_util/types.js';
|
|
53
|
-
import
|
|
53
|
+
import {icon_remove} from '@fuzdev/fuz_ui/icons.js';
|
|
54
54
|
import PendingAnimation from '@fuzdev/fuz_ui/PendingAnimation.svelte';
|
|
55
|
+
import Svg from '@fuzdev/fuz_ui/Svg.svelte';
|
|
55
56
|
|
|
56
57
|
import PopoverButton from './PopoverButton.svelte';
|
|
57
58
|
import type {Popover} from './popover.svelte.js';
|
|
58
59
|
|
|
59
|
-
const GLYPH_REMOVE = '🗙';
|
|
60
|
-
|
|
61
60
|
const {
|
|
62
61
|
onconfirm,
|
|
63
62
|
popover_button_attrs,
|
|
@@ -140,7 +139,7 @@
|
|
|
140
139
|
{#if popover_button_content}
|
|
141
140
|
{@render popover_button_content(popover, () => confirm(popover))}
|
|
142
141
|
{:else}
|
|
143
|
-
<
|
|
142
|
+
<Svg data={icon_remove} />
|
|
144
143
|
{/if}
|
|
145
144
|
</button>
|
|
146
145
|
{/if}
|
|
@@ -155,7 +154,7 @@
|
|
|
155
154
|
{:else if label !== undefined}
|
|
156
155
|
{label}
|
|
157
156
|
{:else}
|
|
158
|
-
<
|
|
157
|
+
<Svg data={icon_remove} />
|
|
159
158
|
{/if}
|
|
160
159
|
</span>
|
|
161
160
|
{#if pending}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmButton.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/ui/ConfirmButton.svelte"],"names":[],"mappings":"AAkDA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAC,cAAc,EAAE,OAAO,E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IACxE,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B,CAAC;AA+FJ,QAAA,MAAM,aAAa,sDAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fuzdev/fuz_app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.85.0",
|
|
4
4
|
"description": "fullstack app library",
|
|
5
5
|
"glyph": "🗝",
|
|
6
6
|
"logo": "logo.svg",
|
|
@@ -70,10 +70,11 @@
|
|
|
70
70
|
"@electric-sql/pglite": "^0.4.5",
|
|
71
71
|
"@fuzdev/blake3_wasm": "^0.1.1",
|
|
72
72
|
"@fuzdev/fuz_code": "^0.46.0",
|
|
73
|
-
"@fuzdev/fuz_css": "^0.
|
|
74
|
-
"@fuzdev/fuz_ui": "^0.
|
|
73
|
+
"@fuzdev/fuz_css": "^0.63.0",
|
|
74
|
+
"@fuzdev/fuz_ui": "^0.205.0",
|
|
75
75
|
"@fuzdev/fuz_util": "^0.65.1",
|
|
76
76
|
"@fuzdev/gro": "^0.204.0",
|
|
77
|
+
"@fuzdev/mdz": "^0.1.0",
|
|
77
78
|
"@hono/node-server": "^1.19.14",
|
|
78
79
|
"@hono/node-ws": "^1.3.1",
|
|
79
80
|
"@node-rs/argon2": "^2.0.2",
|
|
@@ -98,7 +99,7 @@
|
|
|
98
99
|
"prettier-plugin-svelte": "^3.5.1",
|
|
99
100
|
"svelte": "^5.56.2",
|
|
100
101
|
"svelte-check": "^4.6.0",
|
|
101
|
-
"svelte-docinfo": "^0.
|
|
102
|
+
"svelte-docinfo": "^0.5.1",
|
|
102
103
|
"svelte2tsx": "^0.7.52",
|
|
103
104
|
"tslib": "^2.8.1",
|
|
104
105
|
"typescript": "^5.9.3",
|