@kernhq/module-quire 0.13.0 → 0.14.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/contract/models.d.ts +185 -0
- package/dist/contract/models.d.ts.map +1 -1
- package/dist/contract/models.js +133 -0
- package/dist/contract/models.js.map +1 -1
- package/dist/contract/permissions.d.ts +14 -0
- package/dist/contract/permissions.d.ts.map +1 -1
- package/dist/contract/permissions.js +82 -0
- package/dist/contract/permissions.js.map +1 -1
- package/dist/contract/properties.d.ts +4 -4
- package/dist/contract/router.d.ts +542 -15
- package/dist/contract/router.d.ts.map +1 -1
- package/dist/contract/router.js +155 -8
- package/dist/contract/router.js.map +1 -1
- package/dist/server/_impl.d.ts +526 -15
- package/dist/server/_impl.d.ts.map +1 -1
- package/dist/server/_impl.js +166 -23
- package/dist/server/_impl.js.map +1 -1
- package/dist/server/export/html.d.ts +67 -0
- package/dist/server/export/html.d.ts.map +1 -0
- package/dist/server/export/html.js +206 -0
- package/dist/server/export/html.js.map +1 -0
- package/dist/server/export/markdown.d.ts +51 -0
- package/dist/server/export/markdown.d.ts.map +1 -0
- package/dist/server/export/markdown.js +312 -0
- package/dist/server/export/markdown.js.map +1 -0
- package/dist/server/export/pdf.d.ts +20 -0
- package/dist/server/export/pdf.d.ts.map +1 -0
- package/dist/server/export/pdf.js +91 -0
- package/dist/server/export/pdf.js.map +1 -0
- package/dist/server/export/zip.d.ts +31 -0
- package/dist/server/export/zip.d.ts.map +1 -0
- package/dist/server/export/zip.js +158 -0
- package/dist/server/export/zip.js.map +1 -0
- package/dist/server/import/csv.d.ts +77 -0
- package/dist/server/import/csv.d.ts.map +1 -0
- package/dist/server/import/csv.js +263 -0
- package/dist/server/import/csv.js.map +1 -0
- package/dist/server/import/html.d.ts +52 -0
- package/dist/server/import/html.d.ts.map +1 -0
- package/dist/server/import/html.js +472 -0
- package/dist/server/import/html.js.map +1 -0
- package/dist/server/import/markdown.d.ts +63 -0
- package/dist/server/import/markdown.d.ts.map +1 -0
- package/dist/server/import/markdown.js +692 -0
- package/dist/server/import/markdown.js.map +1 -0
- package/dist/server/import/plan.d.ts +70 -0
- package/dist/server/import/plan.d.ts.map +1 -0
- package/dist/server/import/plan.js +761 -0
- package/dist/server/import/plan.js.map +1 -0
- package/dist/server/import/ydoc.d.ts +35 -0
- package/dist/server/import/ydoc.d.ts.map +1 -0
- package/dist/server/import/ydoc.js +91 -0
- package/dist/server/import/ydoc.js.map +1 -0
- package/dist/server/import/zip.d.ts +63 -0
- package/dist/server/import/zip.d.ts.map +1 -0
- package/dist/server/import/zip.js +308 -0
- package/dist/server/import/zip.js.map +1 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +3 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/schema.d.ts +445 -1
- package/dist/server/schema.d.ts.map +1 -1
- package/dist/server/schema.js +146 -0
- package/dist/server/schema.js.map +1 -1
- package/dist/server/services/databases.d.ts +5 -5
- package/dist/server/services/export.d.ts +176 -0
- package/dist/server/services/export.d.ts.map +1 -0
- package/dist/server/services/export.js +822 -0
- package/dist/server/services/export.js.map +1 -0
- package/dist/server/services/import.d.ts +109 -0
- package/dist/server/services/import.d.ts.map +1 -0
- package/dist/server/services/import.js +570 -0
- package/dist/server/services/import.js.map +1 -0
- package/dist/server/services/index.d.ts +28 -1
- package/dist/server/services/index.d.ts.map +1 -1
- package/dist/server/services/index.js +62 -1
- package/dist/server/services/index.js.map +1 -1
- package/dist/server/services/publications.d.ts +34 -1
- package/dist/server/services/publications.d.ts.map +1 -1
- package/dist/server/services/publications.js +62 -3
- package/dist/server/services/publications.js.map +1 -1
- package/dist/server/services/versions.d.ts +1 -1
- package/migrations/0010_transfers.sql +154 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/src/client/components/ExportDialog.svelte +685 -0
- package/src/client/components/ImportDialog.svelte +702 -0
- package/src/client/components/ImportReport.svelte +310 -0
- package/src/client/components/SidebarSpaces.svelte +79 -0
- package/src/client/i18n.ts +614 -0
- package/src/client/index.ts +32 -0
- package/src/client/mock.ts +318 -0
- package/src/client/module.ts +36 -0
- package/src/client/pages/PageView.svelte +36 -0
- package/src/client/pages/TransfersPage.svelte +570 -0
- package/src/client/permissions.ts +11 -0
- package/src/client/query.ts +23 -0
- package/src/client/transfers.ts +142 -0
- package/src/contract/models.ts +152 -0
- package/src/contract/permissions.ts +84 -0
- package/src/contract/router.ts +170 -7
package/dist/server/schema.js
CHANGED
|
@@ -16,6 +16,7 @@ export const schema = pgSchema('mod_quire');
|
|
|
16
16
|
/** Yjs state is binary; drizzle has no `bytea`, so it is declared once here. */
|
|
17
17
|
const bytea = customType({ dataType: () => 'bytea' });
|
|
18
18
|
const jsonObject = (name) => jsonb(name).notNull().default(sql `'{}'::jsonb`);
|
|
19
|
+
const jsonArray = (name) => jsonb(name).notNull().default(sql `'[]'::jsonb`);
|
|
19
20
|
const uuidArray = (name) => uuid(name).array().notNull().default(sql `'{}'::uuid[]`);
|
|
20
21
|
const id = () => uuid('id').primaryKey().default(sql `uuidv7()`);
|
|
21
22
|
const ws = () => uuid('workspace_id').notNull();
|
|
@@ -443,6 +444,149 @@ export const publications = schema.table('publications', {
|
|
|
443
444
|
index('publications_ws_root_idx').on(t.workspaceId, t.rootPageId),
|
|
444
445
|
index('publications_ws_created_idx').on(t.workspaceId, t.createdAt),
|
|
445
446
|
]);
|
|
447
|
+
/**
|
|
448
|
+
* A request to take a page, a page and everything under it, or a whole space out of Quire as a file.
|
|
449
|
+
*
|
|
450
|
+
* A row rather than a request that streams its answer, because the work is unbounded: a space is a
|
|
451
|
+
* tree of arbitrary size, and PDF means a round trip to Gotenberg per page. A job that outlives its
|
|
452
|
+
* HTTP request can report progress, can fail with a reason somebody reads afterwards, and can be
|
|
453
|
+
* retried without the browser having stayed open. `counts` and `error` are what make that true — see
|
|
454
|
+
* both below.
|
|
455
|
+
*
|
|
456
|
+
* What the artefact is rendered from is decided elsewhere and is worth stating here anyway, because
|
|
457
|
+
* this table is where somebody looks when the output is wrong: HTML and PDF come from
|
|
458
|
+
* `renderPageDoc`, the same static renderer the public site uses. Never the Y.Doc, never the draft.
|
|
459
|
+
*/
|
|
460
|
+
export const exportJobs = schema.table('export_jobs', {
|
|
461
|
+
id: id(),
|
|
462
|
+
workspaceId: ws(),
|
|
463
|
+
/**
|
|
464
|
+
* **Not null, deliberately, where every other `created_by` in this schema is nullable.**
|
|
465
|
+
*
|
|
466
|
+
* The artefact is the hazard. A subtree export flattens pages with different readerships into one
|
|
467
|
+
* file, so whoever may fetch it may read every page that went into it — handing it to the
|
|
468
|
+
* workspace at large launders the permission check that produced it. Fencing the download to the
|
|
469
|
+
* person who asked needs a person to fence it to, and a row whose requester has gone null cannot
|
|
470
|
+
* be fenced. So the column refuses to be empty and the artefact outlives nobody.
|
|
471
|
+
*/
|
|
472
|
+
requestedBy: uuid('requested_by').notNull(),
|
|
473
|
+
/** `page` — one page. `subtree` — a page and its descendants. `space` — every page in a space. */
|
|
474
|
+
scope: text('scope').notNull(),
|
|
475
|
+
/** the page for `page` and `subtree`, the space for `space` — which one is decided by `scope` */
|
|
476
|
+
targetId: uuid('target_id').notNull(),
|
|
477
|
+
/** `markdown` | `html` | `docx` | `pdf` */
|
|
478
|
+
format: text('format').notNull(),
|
|
479
|
+
/** `queued` | `running` | `done` | `failed` */
|
|
480
|
+
state: text('state').notNull().default('queued'),
|
|
481
|
+
/**
|
|
482
|
+
* The artefact in storage, written when the job finishes and null until then.
|
|
483
|
+
*
|
|
484
|
+
* Null while running is the honest state and the one that keeps a half file from being offered:
|
|
485
|
+
* the uploader writes the file, then the job records the id, so there is no window in which this
|
|
486
|
+
* points at bytes that are still arriving. An id is not a URL — the download is a signed URL a
|
|
487
|
+
* procedure mints, never a storage key a client assembles. `migrations/0009` is what that rule
|
|
488
|
+
* cost the last time it was broken.
|
|
489
|
+
*/
|
|
490
|
+
fileId: uuid('file_id'),
|
|
491
|
+
/**
|
|
492
|
+
* Why it failed, in the language of the thing that failed — "gotenberg unreachable", a Postgres
|
|
493
|
+
* SQLSTATE, the name of a page that could not be rendered.
|
|
494
|
+
*
|
|
495
|
+
* Diagnostic text, not a user-facing string: whatever a screen shows a person comes from a
|
|
496
|
+
* message key chosen from `state` and the machine-readable part of this. Storing the raw reason
|
|
497
|
+
* is what makes a support question answerable a week later.
|
|
498
|
+
*/
|
|
499
|
+
error: text('error'),
|
|
500
|
+
/**
|
|
501
|
+
* The job's own progress, as `{ total, done, skipped, failed }`.
|
|
502
|
+
*
|
|
503
|
+
* `skipped` is not padding: a subtree export by somebody who may not read one of its children
|
|
504
|
+
* leaves that child out, and a count of what was left out is the difference between an export
|
|
505
|
+
* that is missing pages and an export that says so.
|
|
506
|
+
*
|
|
507
|
+
* JSONB rather than four integer columns because the set differs by format and will grow — a PDF
|
|
508
|
+
* export wants `bytes`, a Markdown one does not — and adding a counter should not be a migration
|
|
509
|
+
* against a table whose rows are all transient anyway.
|
|
510
|
+
*/
|
|
511
|
+
counts: jsonObject('counts'),
|
|
512
|
+
createdAt: ts('created_at').notNull().defaultNow(),
|
|
513
|
+
/** null while `queued` or `running`; set once, on the transition to `done` or `failed` */
|
|
514
|
+
finishedAt: ts('finished_at'),
|
|
515
|
+
}, (t) => [
|
|
516
|
+
index('export_jobs_ws_created_idx').on(t.workspaceId, t.createdAt.desc()),
|
|
517
|
+
index('export_jobs_ws_state_idx').on(t.workspaceId, t.state, t.createdAt),
|
|
518
|
+
]);
|
|
519
|
+
/**
|
|
520
|
+
* A Notion export zip, a Confluence export or a folder of Markdown, on its way into a space.
|
|
521
|
+
*
|
|
522
|
+
* The same shape as `export_jobs` pointed the other way, with one addition that carries the weight of
|
|
523
|
+
* the feature: `report`. A real Notion export contains files that will not map — a `.csv` whose
|
|
524
|
+
* database has no columns Quire can type, an asset with no page referring to it, a `.md` whose page
|
|
525
|
+
* id appears twice. An import that silently drops forty pages is worse than one that refuses, so
|
|
526
|
+
* every file gets an entry saying which of the three things happened to it.
|
|
527
|
+
*/
|
|
528
|
+
export const importJobs = schema.table('import_jobs', {
|
|
529
|
+
id: id(),
|
|
530
|
+
workspaceId: ws(),
|
|
531
|
+
/** not null for the same reason as `export_jobs.requested_by` — see the comment there */
|
|
532
|
+
requestedBy: uuid('requested_by').notNull(),
|
|
533
|
+
/** `notion` | `confluence` | `markdown` */
|
|
534
|
+
source: text('source').notNull(),
|
|
535
|
+
/** the space being written into. An import always targets one space; there is no `scope` here. */
|
|
536
|
+
targetId: uuid('target_id').notNull(),
|
|
537
|
+
/**
|
|
538
|
+
* The uploaded archive.
|
|
539
|
+
*
|
|
540
|
+
* **Called `source_file_id` and not `file_id`, on purpose.** `export_jobs.file_id` is the file the
|
|
541
|
+
* job *produces* and is null until it succeeds; this is the file the job *consumes* and exists
|
|
542
|
+
* before the job does. One name pointing in two directions across two tables read by one screen
|
|
543
|
+
* is how a worker ends up writing its output id over the pointer to its input — which loses the
|
|
544
|
+
* archive, so the job cannot be retried and nothing reports that anything went missing. Two names
|
|
545
|
+
* make that mistake a compile error instead.
|
|
546
|
+
*/
|
|
547
|
+
sourceFileId: uuid('source_file_id').notNull(),
|
|
548
|
+
/** `queued` | `running` | `done` | `failed` */
|
|
549
|
+
state: text('state').notNull().default('queued'),
|
|
550
|
+
/** why the *job* failed; why one *file* failed is that file's entry in `report` */
|
|
551
|
+
error: text('error'),
|
|
552
|
+
/** `{ total, done, skipped, failed }` — the same counters as an export, over files rather than pages */
|
|
553
|
+
counts: jsonObject('counts'),
|
|
554
|
+
/**
|
|
555
|
+
* One entry per file in the upload: `{ path, outcome, pageId, reason }`.
|
|
556
|
+
*
|
|
557
|
+
* **Why this is a column and not a table.** The report is written by one job and read whole, as
|
|
558
|
+
* one document, by one screen — the person who ran the import, looking at what happened to their
|
|
559
|
+
* import. Nothing joins to an entry, nothing updates an entry after the fact, nothing holds a
|
|
560
|
+
* foreign key into one, and no entry outlives its job. A row-per-file table would mean four
|
|
561
|
+
* thousand inserts to render a list that is only ever fetched by `where job_id = $1`, plus a
|
|
562
|
+
* second tenant table with its own `workspace_id`, its own policy, its own `TENANT_TABLES` entry
|
|
563
|
+
* and its own retention rule — all to store a document. Dropping the job drops its report here;
|
|
564
|
+
* there is nothing to sweep.
|
|
565
|
+
*
|
|
566
|
+
* The size is the part worth checking rather than assuming: an entry is a path, one of three
|
|
567
|
+
* words, and either a uuid or a sentence, so a five-thousand-file import is a few hundred
|
|
568
|
+
* kilobytes — one TOASTed value read once. That holds for the exports people actually have.
|
|
569
|
+
*
|
|
570
|
+
* **What would change if somebody wanted to query across imports** — "every file that failed for
|
|
571
|
+
* this reason, across every import this month" — is that this stops being the right shape, and
|
|
572
|
+
* not by a little. `jsonb_array_elements` over the whole table can answer it, but no index helps:
|
|
573
|
+
* a GIN index on this column serves containment (`@>`), not a predicate and an ordering inside
|
|
574
|
+
* the array. The change is a `mod_quire.import_entries` table — `job_id`, `workspace_id`, `path`,
|
|
575
|
+
* `outcome`, `page_id`, `reason` — indexed on `(workspace_id, outcome, created_at)`, written by
|
|
576
|
+
* the same worker, with the existing rows backfilled by expanding this column through
|
|
577
|
+
* `jsonb_to_recordset`. It is a tenant table, so it arrives with the full triple (workspace_id,
|
|
578
|
+
* FORCE RLS, one policy) and an entry in `TENANT_TABLES`, and it needs the retention rule this
|
|
579
|
+
* column gets for free. The threshold is exactly that question: while every read names one job,
|
|
580
|
+
* the column is right.
|
|
581
|
+
*/
|
|
582
|
+
report: jsonArray('report'),
|
|
583
|
+
createdAt: ts('created_at').notNull().defaultNow(),
|
|
584
|
+
/** null while `queued` or `running`; set once, on the transition to `done` or `failed` */
|
|
585
|
+
finishedAt: ts('finished_at'),
|
|
586
|
+
}, (t) => [
|
|
587
|
+
index('import_jobs_ws_created_idx').on(t.workspaceId, t.createdAt.desc()),
|
|
588
|
+
index('import_jobs_ws_state_idx').on(t.workspaceId, t.state, t.createdAt),
|
|
589
|
+
]);
|
|
446
590
|
/** Every tenant table, so the RLS migration can be checked against one list rather than memory. */
|
|
447
591
|
export const TENANT_TABLES = [
|
|
448
592
|
'spaces',
|
|
@@ -459,5 +603,7 @@ export const TENANT_TABLES = [
|
|
|
459
603
|
'recent_views',
|
|
460
604
|
'watchers',
|
|
461
605
|
'publications',
|
|
606
|
+
'export_jobs',
|
|
607
|
+
'import_jobs',
|
|
462
608
|
];
|
|
463
609
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/server/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACjC,OAAO,EACL,OAAO,EACP,UAAU,EACV,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,SAAS,EACT,WAAW,EACX,IAAI,GACL,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAA;AAE3C,gFAAgF;AAChF,MAAM,KAAK,GAAG,UAAU,CAAuC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAA;AAE3F,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,GAAG,CAAA,aAAa,CAAC,CAAA;AACpF,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,GAAG,CAAA,cAAc,CAAC,CAAA;AAE3F,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,GAAG,CAAA,UAAU,CAAC,CAAA;AAC/D,MAAM,EAAE,GAAG,GAAG,EAAE,CA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AC,IAAI,EAAE,CAAC;IACzE,KAAK,CAAC,0BAA0B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC;CAC1E,CACF,CAAA;AAED,mGAAmG;AACnG,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,QAAQ;IACR,OAAO;IACP,eAAe;IACf,UAAU;IACV,WAAW;IACX,YAAY;IACZ,OAAO;IACP,WAAW;IACX,QAAQ;IACR,aAAa;IACb,WAAW;IACX,cAAc;IACd,UAAU;IACV,cAAc;IACd,aAAa;IACb,aAAa;CACL,CAAA"}
|
|
@@ -85,7 +85,7 @@ export declare function quireDatabases(kernel: Kernel, access: QuireAccess): {
|
|
|
85
85
|
id: string;
|
|
86
86
|
label: string;
|
|
87
87
|
colour: string;
|
|
88
|
-
group?: "
|
|
88
|
+
group?: "done" | "todo" | "doing" | undefined;
|
|
89
89
|
}[] | undefined;
|
|
90
90
|
format?: string | undefined;
|
|
91
91
|
precision?: number | undefined;
|
|
@@ -146,7 +146,7 @@ export declare function quireDatabases(kernel: Kernel, access: QuireAccess): {
|
|
|
146
146
|
id: string;
|
|
147
147
|
label: string;
|
|
148
148
|
colour: string;
|
|
149
|
-
group?: "
|
|
149
|
+
group?: "done" | "todo" | "doing" | undefined;
|
|
150
150
|
}[] | undefined;
|
|
151
151
|
format?: string | undefined;
|
|
152
152
|
precision?: number | undefined;
|
|
@@ -180,7 +180,7 @@ export declare function quireDatabases(kernel: Kernel, access: QuireAccess): {
|
|
|
180
180
|
id: string;
|
|
181
181
|
label: string;
|
|
182
182
|
colour: string;
|
|
183
|
-
group?: "
|
|
183
|
+
group?: "done" | "todo" | "doing" | undefined;
|
|
184
184
|
}[] | undefined;
|
|
185
185
|
format?: string | undefined;
|
|
186
186
|
precision?: number | undefined;
|
|
@@ -215,7 +215,7 @@ export declare function quireDatabases(kernel: Kernel, access: QuireAccess): {
|
|
|
215
215
|
id: string;
|
|
216
216
|
label: string;
|
|
217
217
|
colour: string;
|
|
218
|
-
group?: "
|
|
218
|
+
group?: "done" | "todo" | "doing" | undefined;
|
|
219
219
|
}[] | undefined;
|
|
220
220
|
format?: string | undefined;
|
|
221
221
|
precision?: number | undefined;
|
|
@@ -243,7 +243,7 @@ export declare function quireDatabases(kernel: Kernel, access: QuireAccess): {
|
|
|
243
243
|
id: string;
|
|
244
244
|
label: string;
|
|
245
245
|
colour: string;
|
|
246
|
-
group?: "
|
|
246
|
+
group?: "done" | "todo" | "doing" | undefined;
|
|
247
247
|
}[] | undefined;
|
|
248
248
|
format?: string | undefined;
|
|
249
249
|
precision?: number | undefined;
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Getting work *out* — a page, a page and everything under it, or a whole space, as a file.
|
|
3
|
+
*
|
|
4
|
+
* Four decisions run through the whole file and are worth having in one place.
|
|
5
|
+
*
|
|
6
|
+
* **1. It renders a stored version, never the live document.** HTML and PDF come from
|
|
7
|
+
* `renderPageDoc`, the same static renderer the public site uses, and Markdown comes from the same
|
|
8
|
+
* `PageDoc` through the writer next door. What is rendered is the page's *published* version when it
|
|
9
|
+
* has one and its newest stored version otherwise — never the Y.Doc somebody may be typing into
|
|
10
|
+
* right now. An export is a document, and a document taken mid-sentence is not one.
|
|
11
|
+
*
|
|
12
|
+
* **2. The permission is asked per page, as the person who asked for the export.** A subtree is a
|
|
13
|
+
* tree of different readerships, and the whole point of a page-scoped DENY is that it holds against
|
|
14
|
+
* a bulk read as well as against a click. So the job resolves the requester's principal and asks
|
|
15
|
+
* `quire.page.view` about every page it is about to write, with that page's own ancestor chain. A
|
|
16
|
+
* page they may not read is not in the archive, is not named in the archive, and is counted in
|
|
17
|
+
* `skipped` so they can see that something was left out. A page whose *parent* was withheld goes
|
|
18
|
+
* with it: a folder path is built from ancestors' titles, so keeping the child would print the title
|
|
19
|
+
* of the page that was withheld. `publications.ts` prunes its tree on exactly the same reasoning.
|
|
20
|
+
* `quire.page.export` itself is asked twice — once by the router before a row exists, and again by
|
|
21
|
+
* the job at the same scope, because a job runs minutes after it was queued and the revocation that
|
|
22
|
+
* happens in between is the one this key exists for.
|
|
23
|
+
*
|
|
24
|
+
* **3. Nothing that reaches a file is an address.** A picture becomes bytes in the archive and a
|
|
25
|
+
* relative `src`; for a PDF it becomes a `data:` URI. It is never a presigned storage URL, because
|
|
26
|
+
* that URL *is* the object key — `ws/<workspaceId>/<module>/<yyyy>/<mm>/<fileId>/<name>` — so it
|
|
27
|
+
* carries the tenant's workspace uuid and the file's uuid, and it stops working an hour after it is
|
|
28
|
+
* minted. That combination shipped once, into published HTML, and `migrations/0009` is what it cost.
|
|
29
|
+
*
|
|
30
|
+
* **4. The artefact is the module's own object, and the module deletes it.** Core exposes exactly
|
|
31
|
+
* one file procedure over the broker — `files.get` — so a background job cannot mint a `FileObject`:
|
|
32
|
+
* `createUpload` needs a user principal and hands back a presigned PUT for a browser. Rather than
|
|
33
|
+
* pretend, this writes the artefact into `kernel.storage` under a key derived from the job's own
|
|
34
|
+
* `file_id`, so the row that knows about the object is the only thing that can address it and
|
|
35
|
+
* deleting the row deletes the object. That is a smaller claim than a `FileObject` and an honest
|
|
36
|
+
* one: an export artefact does not appear in the workspace's file list, is not counted against the
|
|
37
|
+
* `storageBytes` entitlement, and is swept after {@link EXPORT_TTL_DAYS} days — see `sweep` for how,
|
|
38
|
+
* and for what that sweep cannot reach. The day core grows a procedure that mints a file for a
|
|
39
|
+
* service principal, this gets shorter and the artefact becomes a real file.
|
|
40
|
+
*/
|
|
41
|
+
import type { Principal } from '@kernhq/contracts';
|
|
42
|
+
import { type Kernel, type Tx } from '@kernhq/kernel';
|
|
43
|
+
import type { ExportFormat, ExportJob, ExportScope } from '../../contract/index.js';
|
|
44
|
+
import { exportJobs } from '../schema.js';
|
|
45
|
+
import type { QuireAccess } from './access.js';
|
|
46
|
+
type ExportRow = typeof exportJobs.$inferSelect;
|
|
47
|
+
/** How long an artefact is kept. Long enough to fetch twice, short enough not to be an archive. */
|
|
48
|
+
export declare const EXPORT_TTL_DAYS = 7;
|
|
49
|
+
export declare const exportArtefactKey: (workspaceId: string, fileId: string) => string;
|
|
50
|
+
/**
|
|
51
|
+
* The `# Title` line at the top of an exported Markdown file.
|
|
52
|
+
*
|
|
53
|
+
* Exported so the round-trip test can build its fixture from the line the job actually writes rather
|
|
54
|
+
* than from a copy of it — a title is the one thing in an export that has to come back *identical*,
|
|
55
|
+
* because it is the page's name rather than part of its body.
|
|
56
|
+
*
|
|
57
|
+
* The escape set is the same one `export/markdown.ts` uses for inline text — what changes meaning
|
|
58
|
+
* anywhere — plus **one position**: a run of hashes at the end. That is the ATX *closing sequence*,
|
|
59
|
+
* so `Roadmap #` written plainly is a heading whose content is `Roadmap`, per CommonMark, and the
|
|
60
|
+
* page came back under a different name. Escaping the run is the only spelling that survives, and
|
|
61
|
+
* escaping it only there is what keeps `# Sharp C#` — where the hash is ordinary text — readable in
|
|
62
|
+
* every other editor. The reader's half of this is `RE_ATX_CLOSING` in `import/markdown.ts`.
|
|
63
|
+
*/
|
|
64
|
+
export declare const markdownTitleLine: (title: string) => string;
|
|
65
|
+
export declare function toExportJob(row: ExportRow): ExportJob;
|
|
66
|
+
/** The path of one archive folder written from another, so a link between two files resolves. */
|
|
67
|
+
export declare function relativeFolder(from: string, to: string, file: string): string;
|
|
68
|
+
interface SelectedPage {
|
|
69
|
+
id: string;
|
|
70
|
+
parentId: string | null;
|
|
71
|
+
title: string;
|
|
72
|
+
state: Buffer | null;
|
|
73
|
+
}
|
|
74
|
+
interface PreparedPage extends SelectedPage {
|
|
75
|
+
/** where it sits in the archive: `handbook/getting-started`, from its ancestors' titles */
|
|
76
|
+
folder: string;
|
|
77
|
+
/** the titles above it, outermost first — drawn as a trail so a loose file says where it is from */
|
|
78
|
+
trail: string[];
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Tree order, and a folder per page whose siblings cannot collide.
|
|
82
|
+
*
|
|
83
|
+
* A page whose parent is not in the export is a root of the archive, which is what puts a subtree's
|
|
84
|
+
* own root at the top level. Sibling slugs are suffixed `-2`, `-3` in tree order, the same rule
|
|
85
|
+
* `withPaths` uses for a published site — so two people exporting the same space get the same names.
|
|
86
|
+
*/
|
|
87
|
+
export declare function prepareFolders(selected: SelectedPage[]): PreparedPage[];
|
|
88
|
+
export declare function quireExport(kernel: Kernel, access: QuireAccess): {
|
|
89
|
+
toExportJob: typeof toExportJob;
|
|
90
|
+
/**
|
|
91
|
+
* Record the request and hand it to a worker.
|
|
92
|
+
*
|
|
93
|
+
* Nothing is rendered here. A whole space is unbounded work and a PDF is a round trip to
|
|
94
|
+
* Chromium, so the request answers with a row somebody can watch rather than a response somebody
|
|
95
|
+
* has to keep a browser open for. The row exists before the job is sent, which is the order that
|
|
96
|
+
* matters: a job whose row is missing fails, and a row whose job never arrived stays `queued`
|
|
97
|
+
* and can be sent again.
|
|
98
|
+
*/
|
|
99
|
+
start(tx: Tx, principal: Principal, workspaceId: string, input: {
|
|
100
|
+
scope: ExportScope;
|
|
101
|
+
targetId: string;
|
|
102
|
+
format: ExportFormat;
|
|
103
|
+
}): Promise<ExportRow>;
|
|
104
|
+
/**
|
|
105
|
+
* One job, and the one place a *watched* job can give up on itself.
|
|
106
|
+
*
|
|
107
|
+
* The dialog polls this and never the list, so `reap` — which runs beside the list — would never
|
|
108
|
+
* reach the row somebody is actually looking at. One row rather than a workspace-wide update,
|
|
109
|
+
* because this is on a path that runs every second and a half while a job is moving: the write
|
|
110
|
+
* happens only for a row that is already stale, which is never, until it is.
|
|
111
|
+
*/
|
|
112
|
+
get(tx: Tx, workspaceId: string, jobId: string, principal: Principal): Promise<ExportRow>;
|
|
113
|
+
/** This person's own exports, newest first. Somebody else's are not listed and cannot be. */
|
|
114
|
+
list(tx: Tx, workspaceId: string, principal: Principal, limit: number): Promise<ExportRow[]>;
|
|
115
|
+
/**
|
|
116
|
+
* A short-lived link to the artefact, minted per request and never stored.
|
|
117
|
+
*
|
|
118
|
+
* This is the fence. A subtree export flattens pages of different readerships into one file, so
|
|
119
|
+
* whoever can fetch it can read everything that went into it — which is right for the person the
|
|
120
|
+
* permission check was run as and for nobody else. Minting the URL here rather than writing one
|
|
121
|
+
* into the row is what puts that check at the moment of the fetch instead of an hour earlier.
|
|
122
|
+
*/
|
|
123
|
+
downloadUrl(tx: Tx, workspaceId: string, row: ExportRow): Promise<string | null>;
|
|
124
|
+
/**
|
|
125
|
+
* Mark a job failed without having run it.
|
|
126
|
+
*
|
|
127
|
+
* There is exactly one caller: the router, when the queue refuses the job it has just recorded.
|
|
128
|
+
* Without it that row sits `queued` for ever and reads as work in progress, which is the worst
|
|
129
|
+
* of the three states to be wrong about.
|
|
130
|
+
*/
|
|
131
|
+
fail(tx: Tx, workspaceId: string, jobId: string, reason: string): Promise<void>;
|
|
132
|
+
/**
|
|
133
|
+
* Fail this workspace's abandoned jobs, so a dead one stops reading as work in progress.
|
|
134
|
+
*
|
|
135
|
+
* Called from the same two places as `sweep` and for the same reason — see the note there for
|
|
136
|
+
* why neither can be a cron job. It is deliberately a separate method: `sweep` deletes an
|
|
137
|
+
* artefact that has aged out of a job that *finished*, and this ends a job that never will.
|
|
138
|
+
*
|
|
139
|
+
* The screen that is being lied to is the one that fixes it: the transfers list polls
|
|
140
|
+
* `exports.list` every two seconds while anything is running, so an abandoned job is failed by
|
|
141
|
+
* the very poll that would otherwise draw its spinner for ever. `get` does the same for the one
|
|
142
|
+
* row a dialog is watching.
|
|
143
|
+
*
|
|
144
|
+
* Marked, never deleted. The row is the only record that somebody asked for this and did not get
|
|
145
|
+
* it, and it is what `sweep` will remove on its own schedule.
|
|
146
|
+
*/
|
|
147
|
+
reap(tx: Tx, workspaceId: string): Promise<number>;
|
|
148
|
+
/**
|
|
149
|
+
* Throw away this workspace's expired artefacts.
|
|
150
|
+
*
|
|
151
|
+
* Called from `start` and `list` rather than from a cron, and the reason is worth writing down:
|
|
152
|
+
* a scheduled sweep has to enumerate workspaces, and every tenant table here is under FORCE
|
|
153
|
+
* row-level security keyed on `app.workspace_id`, so a cross-workspace scan has nothing to scan
|
|
154
|
+
* with. Quire keeps no `workspaces` table of its own — the tracker does, which is how its cron
|
|
155
|
+
* jobs manage — and adding one is a migration rather than a service.
|
|
156
|
+
*
|
|
157
|
+
* The limit of doing it this way is real, which is why it is stated: a workspace whose exports
|
|
158
|
+
* nobody looks at again keeps its artefacts until somebody does. They are bounded by what that
|
|
159
|
+
* workspace exported, unreachable without a row, and the row is the only thing that addresses
|
|
160
|
+
* the object — so this is stale storage, not a leak.
|
|
161
|
+
*/
|
|
162
|
+
sweep(tx: Tx, workspaceId: string): Promise<number>;
|
|
163
|
+
/**
|
|
164
|
+
* The job.
|
|
165
|
+
*
|
|
166
|
+
* Three phases, and the split is not tidiness. The database work happens in short transactions;
|
|
167
|
+
* decoding a space's worth of Yjs, pulling its pictures out of storage and waiting on Chromium
|
|
168
|
+
* happen between them, holding nothing. The artefact is written to storage in one piece, and
|
|
169
|
+
* only then does the row point at it — so there is no moment at which `file_id` names bytes that
|
|
170
|
+
* are still arriving, and a failure anywhere leaves `file_id` null and the row `failed`.
|
|
171
|
+
*/
|
|
172
|
+
run(workspaceId: string, jobId: string): Promise<void>;
|
|
173
|
+
};
|
|
174
|
+
export type QuireExport = ReturnType<typeof quireExport>;
|
|
175
|
+
export {};
|
|
176
|
+
//# sourceMappingURL=export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../../src/server/services/export.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAa,KAAK,MAAM,EAAE,KAAK,EAAE,EAAU,MAAM,gBAAgB,CAAA;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAkB,MAAM,y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