@adminiumjs/adminium 0.3.50 → 0.3.51
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/add-ons/bundled-pins.js +13 -13
- package/dist/apps/sample-data.d.ts.map +1 -1
- package/dist/apps/sample-data.js +61 -33
- package/dist/apps/sample-data.js.map +1 -1
- package/dist/apps/sample-files.d.ts +27 -0
- package/dist/apps/sample-files.d.ts.map +1 -0
- package/dist/apps/sample-files.js +112 -0
- package/dist/apps/sample-files.js.map +1 -0
- package/dist/cli/commands/app/build.d.ts.map +1 -1
- package/dist/cli/commands/app/build.js +2 -2
- package/dist/cli/commands/app/build.js.map +1 -1
- package/dist/cli/commands/app/check.js +2 -2
- package/dist/cli/commands/app/check.js.map +1 -1
- package/dist/designer/tools.d.ts.map +1 -1
- package/dist/designer/tools.js +3 -2
- package/dist/designer/tools.js.map +1 -1
- package/dist/files/column-judge.d.ts.map +1 -1
- package/dist/files/column-judge.js +9 -3
- package/dist/files/column-judge.js.map +1 -1
- package/dist/project/apps/build-apps.js +2 -2
- package/dist/project/apps/build-apps.js.map +1 -1
- package/dist/project/apps/check-app.d.ts +10 -0
- package/dist/project/apps/check-app.d.ts.map +1 -1
- package/dist/project/apps/check-app.js +86 -7
- package/dist/project/apps/check-app.js.map +1 -1
- package/dist/project/apps/pack-folder.js +2 -2
- package/dist/project/apps/pack-folder.js.map +1 -1
- package/node_modules/@adminium/adapter-mysql/package.json +1 -1
- package/node_modules/@adminium/adapter-postgres/package.json +1 -1
- package/node_modules/@adminium/adapter-sqlite/package.json +1 -1
- package/node_modules/@adminium/add-on-contracts/package.json +1 -1
- package/node_modules/@adminium/engine/package.json +1 -1
- package/node_modules/@adminium/i18n/package.json +1 -1
- package/node_modules/@adminium/llm/package.json +1 -1
- package/node_modules/@adminium/manifest/dist/index.d.ts +1 -1
- package/node_modules/@adminium/manifest/dist/index.d.ts.map +1 -1
- package/node_modules/@adminium/manifest/dist/index.js +1 -1
- package/node_modules/@adminium/manifest/dist/index.js.map +1 -1
- package/node_modules/@adminium/manifest/dist/sample.d.ts +25 -2
- package/node_modules/@adminium/manifest/dist/sample.d.ts.map +1 -1
- package/node_modules/@adminium/manifest/dist/sample.js +46 -6
- package/node_modules/@adminium/manifest/dist/sample.js.map +1 -1
- package/node_modules/@adminium/manifest/package.json +1 -1
- package/node_modules/@adminium/meta/package.json +1 -1
- package/node_modules/@adminium/schema-import/package.json +1 -1
- package/node_modules/@adminium/widgets/package.json +1 -1
- package/package.json +12 -12
- package/skills/adminium/references/cli/overview.md +1 -1
- package/skills/adminium/references/projects/folder--package-json.md +1 -1
- package/skills/adminium-add-ons/references/catalogue/add-ons.md +13 -13
- package/skills/adminium-add-ons/references/cli/overview.md +1 -1
- package/skills/adminium-app/references/cli/overview.md +1 -1
- package/skills/adminium-app/references/manifest/INDEX-2.md +2 -2
- package/skills/adminium-app/references/manifest/INDEX.md +3 -3
- package/skills/adminium-app/references/manifest/requiredschema--column-rules-6.md +3 -20
- package/skills/adminium-app/references/manifest/requiredschema--column-rules-7.md +20 -2
- package/skills/adminium-app/references/manifest/requiredschema--column-rules-8.md +2 -0
- package/skills/adminium-app/references/manifest/sample-data--sample-people-2.md +15 -0
- package/skills/adminium-app/references/manifest/sample-data--sample-people.md +0 -15
- package/skills/adminium-design/references/cli/overview.md +1 -1
- package/skills/adminium-mobile/references/cli/overview.md +1 -1
- package/skills/adminium-project/references/cli/overview.md +1 -1
- package/skills/adminium-project/references/projects/deploy--docker.md +1 -1
- package/skills/adminium-project/references/projects/deploy--upgrading-adminium.md +2 -2
- package/skills/adminium-project/references/projects/folder--package-json.md +1 -1
- package/skills/adminium-project/references/projects/pull-and-check--check.md +1 -1
- package/skills/adminium-surface/references/cli/overview.md +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export const BUNDLED_PINS = [
|
|
2
|
-
{ key: 'barcode-labels', version: '1.0.
|
|
3
|
-
{ key: 'customiser', version: '1.0.
|
|
4
|
-
{ key: 'design-studio', version: '1.0.
|
|
5
|
-
{ key: 'forms', version: '1.0.
|
|
6
|
-
{ key: 'holiday-calendars', version: '1.0.
|
|
7
|
-
{ key: 'import-canva', version: '1.0.
|
|
8
|
-
{ key: 'inventory', version: '1.0.
|
|
9
|
-
{ key: 'invoices', version: '1.0.
|
|
10
|
-
{ key: 'offers', version: '1.0.
|
|
11
|
-
{ key: 'payments-paypal', version: '1.0.
|
|
12
|
-
{ key: 'payments-stripe', version: '1.0.
|
|
13
|
-
{ key: 'personalizer', version: '1.0.
|
|
14
|
-
{ key: 'shipping-dhl', version: '1.0.
|
|
2
|
+
{ key: 'barcode-labels', version: '1.0.22', integrity: 'sha512-mm6k9ECiDXrWje6/DUuhfHtaXBqeU9sJ0YjApPXrYivJZooko7FLj+1SYQ4SQYamk7CKZR6NFyRaGJTeAEfl3g==' },
|
|
3
|
+
{ key: 'customiser', version: '1.0.22', integrity: 'sha512-pho0GFPEsHYpaQcy+hjDB2/dLC5q8hamzlN7y5pnZVcCp3RWoineqBxd6GV5pzoTx8zuoL/u/1ib6xuL0PAKwQ==' },
|
|
4
|
+
{ key: 'design-studio', version: '1.0.22', integrity: 'sha512-COPwrIDdr2hJHryPxYiB3KbPZkD4uBr0ECuInH/uOoVGfky7SbJchSYteqyctwvHjSsggH/JpqKZiW3Cdqb1RA==' },
|
|
5
|
+
{ key: 'forms', version: '1.0.22', integrity: 'sha512-6xjXqRAZ6Dxr+IuRFZkIYVWsrr3OIYSljnBviR+ohD/hHvXFGfmv9asfnOp3xhN5Q63rFWnq+BMeyQMaENCxTw==' },
|
|
6
|
+
{ key: 'holiday-calendars', version: '1.0.22', integrity: 'sha512-PVf4iWNXxVSZ8AGfNrH+C2+QGWO966lNIhe3mGf6cn7nTug1az0AkNiNPXbqRvMN/uwlgNW85vWQMmAYGqk+kA==' },
|
|
7
|
+
{ key: 'import-canva', version: '1.0.22', integrity: 'sha512-rzng8TUxKgj/dGBVOLA8GFFS1zOxZ9Fh77mb9pCfc7ku1BrZc3ykp8dKs4YpyVn0L9XrpTnNiA+QkmXAy36ROQ==' },
|
|
8
|
+
{ key: 'inventory', version: '1.0.22', integrity: 'sha512-Sqs2uot4aR+zSGbeAsU8pmXN1B9XO7HQMZvRGOWcTEZvQAtt4+h27A78MxEAKYWt3PSfxd4NI7kf1JToREojGg==' },
|
|
9
|
+
{ key: 'invoices', version: '1.0.22', integrity: 'sha512-PaZ2OBT6l1lddU9VWgDqem2cT2vCDaDLNTgOJswxmj/F1EjonAR2DC1q3xw5lPBkfWYe4tCeJuv5zJfiauW6dQ==' },
|
|
10
|
+
{ key: 'offers', version: '1.0.22', integrity: 'sha512-buWsxcA9PsSBatqGEQrqh7rKZxW8kyIfApfAfGTHWpQF7A8ElbuHMvWiKze/XgqVZto9wQov64xi/ttcvvkKig==' },
|
|
11
|
+
{ key: 'payments-paypal', version: '1.0.22', integrity: 'sha512-q+ujCSENLlTY/YsG6WCQp2zkvLMF14Uws727QPZMvqdmTX8tzTUzSoLu8n739oKOlfSRs59wSglyZ3aMvOAYUQ==' },
|
|
12
|
+
{ key: 'payments-stripe', version: '1.0.22', integrity: 'sha512-NF1CIN/R1h95H/WjaRIm22g7lE9BtRWQ0c2AgFk3clHhmuVcUPQgJ9hLr6f6O5HmcOASdOwh8RlY7cumtlAxrw==' },
|
|
13
|
+
{ key: 'personalizer', version: '1.0.22', integrity: 'sha512-bM08bw91W6BwT70xqJg+pkGwVUVXQjzOR+RolpxSpOc6aPshAwKeiASHCxPn5pJB4p9mzo/gbAMGur3aVfAZgg==' },
|
|
14
|
+
{ key: 'shipping-dhl', version: '1.0.22', integrity: 'sha512-gS/TIBbvQwpmsK2VqI/kjyRe/KQ7J8+6g63jGILczs7TTN6Dw1Ztlv75MU8LK2vDbPY4foXERX0OvQSZ5XTpXg==' },
|
|
15
15
|
];
|
|
16
16
|
//# sourceMappingURL=bundled-pins.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sample-data.d.ts","sourceRoot":"","sources":["../../src/apps/sample-data.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sample-data.d.ts","sourceRoot":"","sources":["../../src/apps/sample-data.ts"],"names":[],"mappings":"AAiDA,OAAO,EAAO,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAcL,KAAK,QAAQ,EACb,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAWL,KAAK,GAAG,EAMR,KAAK,MAAM,EAEZ,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC/F,OAAO,EAAE,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAK1E,OAAO,EAAyD,KAAK,kBAAkB,EAAuC,MAAM,0BAA0B,CAAC;AAM/J,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAqB,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAQ3C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,iBAAiB,CAAC;IAC3B,KAAK,EAAE,QAAQ,CAAC;IAChB,6GAA6G;IAC7G,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAChC,sIAAsI;IACtI,UAAU,CAAC,EAAE;QAAE,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC;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AAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,yFAAyF;AACzF,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CAAO,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAEzL;AAED,8IAA8I;AAC9I,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,KAAK,GAAG,QAAQ;AACtB,6IAA6I;AAC7I,KAAK,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CAAO,GAC9F,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CA2B3B;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,GAAG,IAAI,CAoD3F;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,YAAY,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAItH;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,CAQ5F"}
|
package/dist/apps/sample-data.js
CHANGED
|
@@ -43,8 +43,9 @@
|
|
|
43
43
|
* reference the scan missed makes the database refuse, and nothing is removed.
|
|
44
44
|
*/
|
|
45
45
|
import { addOnTablesFor } from './add-on-tables.js';
|
|
46
|
+
import { keptSampleFile, SampleFileRefused } from './sample-files.js';
|
|
46
47
|
import { createHash } from 'node:crypto';
|
|
47
|
-
import { basename
|
|
48
|
+
import { basename } from 'node:path';
|
|
48
49
|
import { sql } from 'kysely';
|
|
49
50
|
import { z } from 'zod';
|
|
50
51
|
import { byClockSchema, byStaySchema, codeSchemaOf, isoDurationMs, prefixFor, ROW_DIRECTIVES, sampleBundleIssues, sampleBundleSchema, sampleDirective, sampleSectionIssues, seedLabelsOf, seedRowIdentity, shareCodeColumns, } from '@adminium/manifest';
|
|
@@ -64,6 +65,7 @@ import { ledgersOf } from '../ledgers/rules.js';
|
|
|
64
65
|
import { fetchByPk, pkLabel } from '../crud/records.js';
|
|
65
66
|
import { writeStores } from '../crud/write-stores.js';
|
|
66
67
|
import { ConflictError, NotFoundError, ValidationFailedError } from '../errors.js';
|
|
68
|
+
import { createFileColumnJudge, storedBytes } from '../files/column-judge.js';
|
|
67
69
|
import { Reads } from '../crud/capacity/count.js';
|
|
68
70
|
import { slotDays } from '../crud/capacity/placement.js';
|
|
69
71
|
import { slotKey as countKey } from '../crud/capacity/count.js';
|
|
@@ -71,7 +73,18 @@ import { tallyFor } from '../crud/capacity/judge.js';
|
|
|
71
73
|
import { rulesFor } from '../crud/capacity/rules.js';
|
|
72
74
|
import { storedTableRef, tableRefIndex } from './table-ref.js';
|
|
73
75
|
const NO_STAFF = { ids: new Map(), people: [], teams: [] };
|
|
76
|
+
/** A file the sample added to the library: `pk` holds its id, and — for a file of an app's rows for an add-on — that add-on's key (`section`). */
|
|
74
77
|
const FILE_REF = '@file';
|
|
78
|
+
/** The add-on whose section added a file entry; null for a file of the owner's own sample. */
|
|
79
|
+
function fileSectionOf(row) {
|
|
80
|
+
try {
|
|
81
|
+
const section = JSON.parse(row.pk).section;
|
|
82
|
+
return typeof section === 'string' ? section : null;
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
75
88
|
/** A staff member the sample made (`sampleData.people`): `pk` holds the user's id, `label` the person's key. */
|
|
76
89
|
const PERSON_REF = '@person';
|
|
77
90
|
/** A team the sample made (`sampleData.teams`): `pk` holds the team's id, `label` the name the manifest gives it. */
|
|
@@ -598,14 +611,6 @@ function keysAsText(values, given, table) {
|
|
|
598
611
|
}
|
|
599
612
|
/** Key types an identity sequence counts in. */
|
|
600
613
|
const INTEGER_TYPES = new Set(['integer', 'bigint', 'smallint']);
|
|
601
|
-
const MIME_BY_EXTENSION = {
|
|
602
|
-
'.webp': 'image/webp',
|
|
603
|
-
'.png': 'image/png',
|
|
604
|
-
'.jpg': 'image/jpeg',
|
|
605
|
-
'.jpeg': 'image/jpeg',
|
|
606
|
-
'.gif': 'image/gif',
|
|
607
|
-
'.svg': 'image/svg+xml',
|
|
608
|
-
};
|
|
609
614
|
// ── the service ───────────────────────────────────────────────────────────
|
|
610
615
|
/** The bundle file the app's manifest names, if it ships one. */
|
|
611
616
|
export function sampleFileOf(manifest) {
|
|
@@ -1256,8 +1261,8 @@ export function createSampleDataService(deps) {
|
|
|
1256
1261
|
const ownTables = new Set(section.tables.filter((table) => table.own === true && !elsewhere.has(table.ref)).map((table) => table.ref));
|
|
1257
1262
|
return { section, own, named, ownTables, namesTheirSample: [...named].some((label) => !own.has(label) && !appBundleLabels.has(label) && !seeded.has(label)) };
|
|
1258
1263
|
}
|
|
1259
|
-
/** Whether a row of an app's list of sample rows is of its section for this add-on: a row of the add-on's table,
|
|
1260
|
-
const ofSection = (addOnKey, ownTables) => (row) => isSampleRow(row) && (row.table_ref.startsWith(`${addOnKey}:`) || ownTables.has(row.table_ref));
|
|
1264
|
+
/** Whether a row of an app's list of sample rows is of its section for this add-on: a row of the add-on's table, of an own table only that file fills, or a file that file added. */
|
|
1265
|
+
const ofSection = (addOnKey, ownTables) => (row) => (isSampleRow(row) && (row.table_ref.startsWith(`${addOnKey}:`) || ownTables.has(row.table_ref))) || (row.table_ref === FILE_REF && fileSectionOf(row) === addOnKey);
|
|
1261
1266
|
/** The apps whose loaded section for this add-on points at a row of the add-on's own sample: those rows leave before that sample does. */
|
|
1262
1267
|
async function sectionsNaming(addOn, connectionId) {
|
|
1263
1268
|
const out = [];
|
|
@@ -1302,8 +1307,8 @@ export function createSampleDataService(deps) {
|
|
|
1302
1307
|
if (mine.some((row) => isSampleRow(row) && row.table_ref.startsWith(`${addOnKey}:`)))
|
|
1303
1308
|
return null;
|
|
1304
1309
|
const { section, own, named, ownTables, namesTheirSample } = await readSection(app, addOnKey, addOn);
|
|
1305
|
-
// …or of an own table only this file fills (a file may hold nothing else).
|
|
1306
|
-
if (mine.some(
|
|
1310
|
+
// …or of an own table only this file fills (a file may hold nothing else). Its rows, never its files: they say nothing went in.
|
|
1311
|
+
if (mine.some((row) => isSampleRow(row) && ownTables.has(row.table_ref)))
|
|
1307
1312
|
return null;
|
|
1308
1313
|
const labels = await labelsIn(app, connectionId, handle);
|
|
1309
1314
|
const theirs = await labelsIn(addOn, connectionId, handle);
|
|
@@ -1317,7 +1322,8 @@ export function createSampleDataService(deps) {
|
|
|
1317
1322
|
if (!labels.has(label))
|
|
1318
1323
|
labels.set(label, key);
|
|
1319
1324
|
return {
|
|
1320
|
-
|
|
1325
|
+
// Its files are its own: a label resolves within this file, and the files leave with its rows.
|
|
1326
|
+
bundle: { ...section, tables: section.tables.map((table) => ({ ...table, ref: table.own === true ? table.ref : `${addOnKey}:${table.ref}` })) },
|
|
1321
1327
|
section: addOnKey,
|
|
1322
1328
|
owns: (ref) => ref.startsWith(`${addOnKey}:`),
|
|
1323
1329
|
labels,
|
|
@@ -1559,15 +1565,25 @@ export function createSampleDataService(deps) {
|
|
|
1559
1565
|
let committed = false;
|
|
1560
1566
|
try {
|
|
1561
1567
|
for (const [label, asset] of Object.entries(bundle.assets)) {
|
|
1562
|
-
const { bytes, sha256: actual } = await filesOf(app).readVerifiedFile(app.key, app.version, asset.file);
|
|
1568
|
+
const { bytes: read, sha256: actual } = await filesOf(app).readVerifiedFile(app.key, app.version, asset.file);
|
|
1563
1569
|
if (actual !== asset.sha256) {
|
|
1564
|
-
throw new ValidationFailedError(`The sample
|
|
1570
|
+
throw new ValidationFailedError(`The sample file "${asset.file}" is not the file the bundle names.`, {
|
|
1565
1571
|
reason: 'SAMPLE_INVALID',
|
|
1566
1572
|
});
|
|
1567
1573
|
}
|
|
1574
|
+
// Held to what an upload of it is held to: an SVG cleaned, a model what its name says, each within its public cap.
|
|
1575
|
+
let kept;
|
|
1576
|
+
try {
|
|
1577
|
+
kept = await keptSampleFile(read, asset.file);
|
|
1578
|
+
}
|
|
1579
|
+
catch (error) {
|
|
1580
|
+
if (!(error instanceof SampleFileRefused))
|
|
1581
|
+
throw error;
|
|
1582
|
+
throw new ValidationFailedError(error.message, { reason: 'SAMPLE_INVALID' });
|
|
1583
|
+
}
|
|
1584
|
+
const { bytes, mime } = kept;
|
|
1568
1585
|
const id = newId('file');
|
|
1569
1586
|
const filename = basename(asset.file);
|
|
1570
|
-
const mime = MIME_BY_EXTENSION[extname(filename).toLowerCase()] ?? 'application/octet-stream';
|
|
1571
1587
|
const stored = await deps.files.write({ id, kind: 'upload', filename, mime, bytes });
|
|
1572
1588
|
await files.create({
|
|
1573
1589
|
id,
|
|
@@ -1586,7 +1602,7 @@ export function createSampleDataService(deps) {
|
|
|
1586
1602
|
fileIds.set(label, id);
|
|
1587
1603
|
assetsById.set(id, { filename, mime, bytes });
|
|
1588
1604
|
}
|
|
1589
|
-
opts.progress?.(20, 'Added the
|
|
1605
|
+
opts.progress?.(20, 'Added the files');
|
|
1590
1606
|
const sampleFileIds = new Set(fileIds.values());
|
|
1591
1607
|
const ledger = await ensureLedger(app, connectionId, handle);
|
|
1592
1608
|
// The app's own file may name its sample people; rows for an add-on name none.
|
|
@@ -1619,7 +1635,8 @@ export function createSampleDataService(deps) {
|
|
|
1619
1635
|
lentBy.set(identity, [...(lentBy.get(identity) ?? []), entry]);
|
|
1620
1636
|
}
|
|
1621
1637
|
}
|
|
1622
|
-
|
|
1638
|
+
// The judge reads the files' bytes, so an SVG named is shown to be one the cleaner wrote.
|
|
1639
|
+
const writes = createWriteService({ ...writeStores(deps.meta), files: createFileColumnJudge({ meta: deps.meta, bytesOf: storedBytes(deps.files) }) });
|
|
1623
1640
|
const context = {
|
|
1624
1641
|
origin: 'import',
|
|
1625
1642
|
hops: 0,
|
|
@@ -1640,6 +1657,8 @@ export function createSampleDataService(deps) {
|
|
|
1640
1657
|
let reused = 0;
|
|
1641
1658
|
/** Rows taken from another app's sample rather than written. */
|
|
1642
1659
|
let takenShared = 0;
|
|
1660
|
+
/** Set when a section's pass put none of its rows in: its files are let go, and the section waits. */
|
|
1661
|
+
let unused = false;
|
|
1643
1662
|
await handle.db.transaction().execute(async (trx) => {
|
|
1644
1663
|
const db = asDb(trx);
|
|
1645
1664
|
const labels = new Map(pass.labels ?? []);
|
|
@@ -2163,7 +2182,11 @@ export function createSampleDataService(deps) {
|
|
|
2163
2182
|
.execute();
|
|
2164
2183
|
}
|
|
2165
2184
|
reused = adopted.size + takenShared;
|
|
2166
|
-
|
|
2185
|
+
// A section none of whose rows went in (each left out) keeps none of its files: it is tried again, files and all, later.
|
|
2186
|
+
unused = pass.section !== undefined && reused === 0 && Object.values(counts).every((n) => n === 0);
|
|
2187
|
+
/** A file's entry: a section's says whose, so the section's removal takes it with its rows. */
|
|
2188
|
+
const fileKey = (id) => canonicalJson(pass.section === undefined ? { id } : { id, section: pass.section });
|
|
2189
|
+
for (const id of unused ? [] : adoptedFiles) {
|
|
2167
2190
|
const file = await files.findById(id);
|
|
2168
2191
|
if (file === null || file.deletedAt !== null || file.entityConnectionId !== connectionId)
|
|
2169
2192
|
continue;
|
|
@@ -2173,7 +2196,7 @@ export function createSampleDataService(deps) {
|
|
|
2173
2196
|
.values({
|
|
2174
2197
|
seq,
|
|
2175
2198
|
table_ref: FILE_REF,
|
|
2176
|
-
pk:
|
|
2199
|
+
pk: fileKey(id),
|
|
2177
2200
|
label: null,
|
|
2178
2201
|
row_hash: '',
|
|
2179
2202
|
col_hashes: '{}',
|
|
@@ -2182,14 +2205,14 @@ export function createSampleDataService(deps) {
|
|
|
2182
2205
|
.execute();
|
|
2183
2206
|
}
|
|
2184
2207
|
// The copies made for the rows after an image's first: removed with the sample, like the images.
|
|
2185
|
-
for (const id of copies) {
|
|
2208
|
+
for (const id of unused ? [] : copies) {
|
|
2186
2209
|
seq += 1;
|
|
2187
2210
|
await db
|
|
2188
2211
|
.insertInto(ledger)
|
|
2189
2212
|
.values({
|
|
2190
2213
|
seq,
|
|
2191
2214
|
table_ref: FILE_REF,
|
|
2192
|
-
pk:
|
|
2215
|
+
pk: fileKey(id),
|
|
2193
2216
|
label: null,
|
|
2194
2217
|
row_hash: '',
|
|
2195
2218
|
col_hashes: '{}',
|
|
@@ -2197,14 +2220,14 @@ export function createSampleDataService(deps) {
|
|
|
2197
2220
|
})
|
|
2198
2221
|
.execute();
|
|
2199
2222
|
}
|
|
2200
|
-
for (const [label, id] of fileIds) {
|
|
2223
|
+
for (const [label, id] of unused ? [] : fileIds) {
|
|
2201
2224
|
seq += 1;
|
|
2202
2225
|
await db
|
|
2203
2226
|
.insertInto(ledger)
|
|
2204
2227
|
.values({
|
|
2205
2228
|
seq,
|
|
2206
2229
|
table_ref: FILE_REF,
|
|
2207
|
-
pk:
|
|
2230
|
+
pk: fileKey(id),
|
|
2208
2231
|
label,
|
|
2209
2232
|
row_hash: '',
|
|
2210
2233
|
col_hashes: '{}',
|
|
@@ -2222,6 +2245,9 @@ export function createSampleDataService(deps) {
|
|
|
2222
2245
|
}
|
|
2223
2246
|
});
|
|
2224
2247
|
committed = true;
|
|
2248
|
+
if (unused)
|
|
2249
|
+
for (const id of [...fileIds.values(), ...copies])
|
|
2250
|
+
await files.markDeleted(id).catch(() => undefined);
|
|
2225
2251
|
if (moves.length > 0 && pass.section !== undefined) {
|
|
2226
2252
|
const posted = await makeMoves({ app, section: pass.section, moves, wrote, connectionId, handle, view, names, timeZone, refOf: (tableId) => storedTableRef(refIndex, tableId), opts, now });
|
|
2227
2253
|
for (const [ref, n] of Object.entries(posted))
|
|
@@ -2260,10 +2286,10 @@ export function createSampleDataService(deps) {
|
|
|
2260
2286
|
category: 'app',
|
|
2261
2287
|
action: 'app.sample-data.add',
|
|
2262
2288
|
connectionId,
|
|
2263
|
-
changes: { after: { key: app.key, counts, reused, files: fileIds.size } },
|
|
2289
|
+
changes: { after: { key: app.key, counts, reused, files: unused ? 0 : fileIds.size } },
|
|
2264
2290
|
});
|
|
2265
2291
|
await deps.publish?.(connectionId);
|
|
2266
|
-
return { counts, files: fileIds.size };
|
|
2292
|
+
return { counts, files: unused ? 0 : fileIds.size };
|
|
2267
2293
|
}
|
|
2268
2294
|
catch (error) {
|
|
2269
2295
|
// After the commit the rows are in, and they name these people and files: a later step that failed (a counter
|
|
@@ -2488,17 +2514,19 @@ export function createSampleDataService(deps) {
|
|
|
2488
2514
|
const seeded = await seededLabels(app, connectionId, await deps.manager.data(connectionId));
|
|
2489
2515
|
const done = await addPass(app, { bundle, owns: (ref) => !ref.includes(':'), labels: seeded.found, leftOut: seeded.gone }, opts);
|
|
2490
2516
|
const counts = { ...done.counts };
|
|
2517
|
+
let files = done.files;
|
|
2491
2518
|
for (const section of await sectionsFor(app, connectionId)) {
|
|
2492
2519
|
const added = await addPass(app, section, opts);
|
|
2493
2520
|
for (const [ref, count] of Object.entries(added.counts))
|
|
2494
2521
|
counts[ref] = (counts[ref] ?? 0) + count;
|
|
2522
|
+
files += added.files;
|
|
2495
2523
|
}
|
|
2496
2524
|
// The sections of apps that named this add-on's sample and were waiting for it.
|
|
2497
2525
|
if (app.manifest.kind === 'add-on') {
|
|
2498
2526
|
for (const waiting of await sectionsWaitingFor(app, connectionId))
|
|
2499
2527
|
await addPass(waiting.app, waiting.pass, opts);
|
|
2500
2528
|
}
|
|
2501
|
-
return { counts, files
|
|
2529
|
+
return { counts, files };
|
|
2502
2530
|
},
|
|
2503
2531
|
/**
|
|
2504
2532
|
* What a removal would take and keep. Re-reads the database first: a
|
|
@@ -2562,7 +2590,7 @@ export function createSampleDataService(deps) {
|
|
|
2562
2590
|
return removeRows(app, opts);
|
|
2563
2591
|
},
|
|
2564
2592
|
};
|
|
2565
|
-
/** The removal itself; `only` narrows it to some of the ledger's rows (one section), leaving the rest
|
|
2593
|
+
/** The removal itself; `only` narrows it to some of the ledger's rows and files (one section), leaving the rest as they are. */
|
|
2566
2594
|
async function removeRows(app, opts, only) {
|
|
2567
2595
|
{
|
|
2568
2596
|
const connectionId = await connectionOf(app);
|
|
@@ -2663,9 +2691,9 @@ export function createSampleDataService(deps) {
|
|
|
2663
2691
|
await updateRows(db, handle.dialect, table, Object.fromEntries(back.map((column) => [column, null])), key);
|
|
2664
2692
|
}
|
|
2665
2693
|
// The files' entries go too; a file a kept row still names stays in the library.
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2694
|
+
// A removal narrowed to one section takes the files that section added, and no other.
|
|
2695
|
+
for (const row of all.filter((entry) => entry.table_ref === FILE_REF && (only === undefined || only(entry))))
|
|
2696
|
+
removedSeqs.push(row.seq);
|
|
2669
2697
|
// What another app's sample lists too: out of this ledger, never out of the table.
|
|
2670
2698
|
for (const seq of shared)
|
|
2671
2699
|
removedSeqs.push(seq);
|
|
@@ -2706,7 +2734,7 @@ export function createSampleDataService(deps) {
|
|
|
2706
2734
|
if (isId(value, 'file'))
|
|
2707
2735
|
keptValues.add(value);
|
|
2708
2736
|
}
|
|
2709
|
-
for (const row of
|
|
2737
|
+
for (const row of all.filter((entry) => entry.table_ref === FILE_REF && (only === undefined || only(entry)))) {
|
|
2710
2738
|
const id = JSON.parse(row.pk).id;
|
|
2711
2739
|
if (!keptValues.has(id))
|
|
2712
2740
|
await files.markDeleted(id).catch(() => undefined);
|