@knkcs/importhub-ui 0.1.0 → 0.2.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/CHANGELOG.md +7 -0
- package/README.md +16 -4
- package/dist/importhub-client-CYqd7Eeq.js +16 -0
- package/dist/importhub-client-CYqd7Eeq.js.map +1 -0
- package/dist/index.d.ts +628 -13
- package/dist/index.js +1718 -97
- package/dist/index.js.map +1 -1
- package/dist/testing.d.ts +235 -14
- package/dist/testing.js +411 -41
- package/dist/testing.js.map +1 -1
- package/package.json +10 -2
package/dist/testing.js
CHANGED
|
@@ -1,57 +1,427 @@
|
|
|
1
|
-
import { createHostMembers as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { createHostMembers as j } from "@knkcs/anker/host";
|
|
2
|
+
import { C as O, N as F } from "./importhub-client-CYqd7Eeq.js";
|
|
3
|
+
const z = "user_stub_ada", k = "ws_stub_main", V = "ws_stub_other";
|
|
4
|
+
function J(r = k) {
|
|
4
5
|
return {
|
|
5
|
-
userId:
|
|
6
|
-
workspaceId:
|
|
7
|
-
members:
|
|
8
|
-
{ userId:
|
|
6
|
+
userId: z,
|
|
7
|
+
workspaceId: r,
|
|
8
|
+
members: j([
|
|
9
|
+
{ userId: z, displayName: "Ada Importer", email: "ada@example.com" }
|
|
9
10
|
])
|
|
10
11
|
};
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
+
function x() {
|
|
13
14
|
return [
|
|
14
|
-
{
|
|
15
|
-
|
|
15
|
+
{
|
|
16
|
+
id: "br_stub_gesetz_2",
|
|
17
|
+
blueprintId: "bp_stub_gesetz",
|
|
18
|
+
blueprintName: "Gesetz",
|
|
19
|
+
label: "Release 2",
|
|
20
|
+
fieldPaths: ["titel", "abkuerzung"]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: "br_stub_gesetz_1",
|
|
24
|
+
blueprintId: "bp_stub_gesetz",
|
|
25
|
+
blueprintName: "Gesetz",
|
|
26
|
+
label: "Release 1",
|
|
27
|
+
fieldPaths: ["titel", "abkuerzung", "fussnote"]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "br_stub_entscheidung_1",
|
|
31
|
+
blueprintId: "bp_stub_entscheidung",
|
|
32
|
+
blueprintName: "Entscheidung",
|
|
33
|
+
label: "Release 1",
|
|
34
|
+
fieldPaths: ["aktenzeichen", "datum"]
|
|
35
|
+
}
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
function U() {
|
|
39
|
+
return [
|
|
40
|
+
{
|
|
41
|
+
id: "mp_stub_norm",
|
|
42
|
+
releaseNumber: 1,
|
|
43
|
+
content: {
|
|
44
|
+
name: "Gesetz norms",
|
|
45
|
+
description: "One Content per norm",
|
|
46
|
+
blueprintId: "bp_stub_gesetz",
|
|
47
|
+
blueprintReleaseId: "br_stub_gesetz_1",
|
|
48
|
+
elementSelector: "//norm",
|
|
49
|
+
sourceKey: { selector: "@id" },
|
|
50
|
+
fields: [
|
|
51
|
+
{ name: "titel", selector: "titel", type: "text" },
|
|
52
|
+
{ name: "fussnote", selector: "fn", type: "text" }
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: "mp_stub_decision",
|
|
58
|
+
content: {
|
|
59
|
+
name: "Court decisions",
|
|
60
|
+
description: "",
|
|
61
|
+
blueprintId: "bp_stub_entscheidung",
|
|
62
|
+
blueprintReleaseId: "br_stub_entscheidung_1",
|
|
63
|
+
elementSelector: "",
|
|
64
|
+
sourceKey: {},
|
|
65
|
+
fields: []
|
|
66
|
+
}
|
|
67
|
+
}
|
|
16
68
|
];
|
|
17
69
|
}
|
|
18
|
-
function
|
|
19
|
-
return [
|
|
70
|
+
function D() {
|
|
71
|
+
return [
|
|
72
|
+
{
|
|
73
|
+
id: "es_stub_latin1",
|
|
74
|
+
releaseNumber: 1,
|
|
75
|
+
content: {
|
|
76
|
+
name: "ISO Latin 1",
|
|
77
|
+
description: "The Latin-1 entities Boorberg's files use",
|
|
78
|
+
entities: { auml: "ä", nbsp: " " }
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
];
|
|
82
|
+
}
|
|
83
|
+
function W() {
|
|
84
|
+
return [
|
|
85
|
+
{
|
|
86
|
+
id: "ip_stub_gesetz",
|
|
87
|
+
releaseNumber: 2,
|
|
88
|
+
content: {
|
|
89
|
+
name: "Boorberg gesetz",
|
|
90
|
+
description: "Boorberg's law files",
|
|
91
|
+
entitySetId: "es_stub_latin1",
|
|
92
|
+
preprocessors: [{ processor: "rename-element", settings: { from: "para", to: "absatz" } }],
|
|
93
|
+
mappingIds: ["mp_stub_norm"],
|
|
94
|
+
postProcessors: [],
|
|
95
|
+
autoPublish: !1,
|
|
96
|
+
deleteSourceFileOnSuccess: !0
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: "ip_stub_vrpml",
|
|
101
|
+
content: {
|
|
102
|
+
name: "VRPML court decisions",
|
|
103
|
+
description: "",
|
|
104
|
+
entitySetId: "",
|
|
105
|
+
preprocessors: [],
|
|
106
|
+
mappingIds: ["mp_stub_decision"],
|
|
107
|
+
postProcessors: [],
|
|
108
|
+
autoPublish: !1,
|
|
109
|
+
deleteSourceFileOnSuccess: !1
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
];
|
|
20
113
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
114
|
+
const w = (r, p, o, d = "") => ({
|
|
115
|
+
field_type: "text",
|
|
116
|
+
config: { name: p, api_accessor: r, required: o, instructions: d },
|
|
117
|
+
system: !1
|
|
118
|
+
});
|
|
119
|
+
function L() {
|
|
120
|
+
return [
|
|
121
|
+
{
|
|
122
|
+
name: "citation-links",
|
|
123
|
+
kind: "post_processor",
|
|
124
|
+
target: "source_file",
|
|
125
|
+
description: "Links citations in rich text to the Content they name, through legalcitationhub.",
|
|
126
|
+
settingsSpec: []
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: "norm-cite",
|
|
130
|
+
kind: "preprocessor",
|
|
131
|
+
target: "rich_text_field",
|
|
132
|
+
description: "Marks legal norm citations in one rich-text field.",
|
|
133
|
+
settingsSpec: []
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: "rename-element",
|
|
137
|
+
kind: "preprocessor",
|
|
138
|
+
target: "source_file",
|
|
139
|
+
description: "Renames every element of one name to another.",
|
|
140
|
+
settingsSpec: [
|
|
141
|
+
w("from", "Element", !0, "The element's name now."),
|
|
142
|
+
w("to", "New name", !0)
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: "sentence-detect",
|
|
147
|
+
kind: "preprocessor",
|
|
148
|
+
target: "source_file",
|
|
149
|
+
description: "Wraps each sentence of an element in its own element.",
|
|
150
|
+
settingsSpec: [w("element", "Element", !1)]
|
|
151
|
+
}
|
|
152
|
+
];
|
|
153
|
+
}
|
|
154
|
+
const q = [
|
|
155
|
+
"listImportProfiles",
|
|
156
|
+
"getImportProfile",
|
|
157
|
+
"createImportProfile",
|
|
158
|
+
"updateImportProfile",
|
|
159
|
+
"deleteImportProfile",
|
|
160
|
+
"listProcessors",
|
|
161
|
+
"listMappings",
|
|
162
|
+
"getMapping",
|
|
163
|
+
"createMapping",
|
|
164
|
+
"updateMapping",
|
|
165
|
+
"deleteMapping",
|
|
166
|
+
"listMappingImportProfiles",
|
|
167
|
+
"checkMappingBlueprintRelease",
|
|
168
|
+
"listEntitySets",
|
|
169
|
+
"getEntitySet",
|
|
170
|
+
"createEntitySet",
|
|
171
|
+
"updateEntitySet",
|
|
172
|
+
"deleteEntitySet"
|
|
173
|
+
], v = (r = []) => r.map((p) => ({
|
|
174
|
+
id: p.id,
|
|
175
|
+
content: structuredClone(p.content),
|
|
176
|
+
revision: 1,
|
|
177
|
+
releaseNumber: p.releaseNumber,
|
|
178
|
+
releasedRevision: p.releaseNumber ? 1 : void 0
|
|
179
|
+
})), y = (r) => ({
|
|
180
|
+
draftRevisionId: `${r.id}_r${r.revision}`,
|
|
181
|
+
draftDiffersFromRelease: r.releasedRevision !== r.revision,
|
|
182
|
+
...r.releaseNumber ? { latestRelease: { id: `${r.id}_rel${r.releaseNumber}`, number: r.releaseNumber } } : {}
|
|
183
|
+
}), $ = (r) => ({
|
|
184
|
+
valid: r.length === 0,
|
|
185
|
+
reasons: r
|
|
186
|
+
}), S = (r) => [...r].sort((p, o) => p.content.name.localeCompare(o.content.name));
|
|
187
|
+
let A = 0;
|
|
188
|
+
function Q(r = {}) {
|
|
189
|
+
const p = Object.fromEntries(
|
|
190
|
+
Object.entries(
|
|
191
|
+
r.workspaces ?? {
|
|
192
|
+
[k]: {
|
|
193
|
+
importProfiles: W(),
|
|
194
|
+
mappings: U(),
|
|
195
|
+
entitySets: D()
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
).map(([e, t]) => [
|
|
199
|
+
e,
|
|
200
|
+
{
|
|
201
|
+
importProfiles: v(t.importProfiles),
|
|
202
|
+
mappings: v(t.mappings),
|
|
203
|
+
entitySets: v(t.entitySets)
|
|
204
|
+
}
|
|
205
|
+
])
|
|
206
|
+
), o = r.processors ?? L(), d = r.blueprintReleases ?? x();
|
|
207
|
+
let P = r.activeWorkspaceId ?? k;
|
|
208
|
+
const N = Object.fromEntries(q.map((e) => [e, 0])), s = () => (p[P] ??= { importProfiles: [], mappings: [], entitySets: [] }, p[P]), a = async (e, t) => {
|
|
209
|
+
if (N[e]++, r.fail) throw r.fail;
|
|
210
|
+
return structuredClone(t());
|
|
211
|
+
}, c = (e, t, n) => {
|
|
212
|
+
const i = e.find((l) => l.id === t);
|
|
213
|
+
if (!i) throw new Error(`${n} ${t} not found`);
|
|
214
|
+
return i;
|
|
215
|
+
}, g = (e, t, n) => {
|
|
216
|
+
if (!t.trim()) throw new Error("a name is required");
|
|
217
|
+
if (e.some((i) => i.id !== n && i.content.name === t)) throw new F();
|
|
218
|
+
}, E = (e, t, n) => {
|
|
219
|
+
if (n && n !== y(e).draftRevisionId)
|
|
220
|
+
throw new Error("the draft moved: somebody saved in between");
|
|
221
|
+
e.content = structuredClone(t), e.revision++;
|
|
24
222
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
223
|
+
function B(e) {
|
|
224
|
+
const t = [], n = d.find((i) => i.id === e.blueprintReleaseId);
|
|
225
|
+
return e.blueprintReleaseId ? n ? n.blueprintId !== e.blueprintId && t.push({
|
|
226
|
+
path: "/blueprintReleaseId",
|
|
227
|
+
code: "release_of_other_blueprint",
|
|
228
|
+
message: "The pinned Release is of another Blueprint."
|
|
229
|
+
}) : t.push({
|
|
230
|
+
path: "/blueprintReleaseId",
|
|
231
|
+
code: "blueprint_gone",
|
|
232
|
+
message: "blueprinthub does not know the Blueprint Release it pins."
|
|
233
|
+
}) : t.push({
|
|
234
|
+
path: "/blueprintReleaseId",
|
|
235
|
+
code: "no_blueprint_release",
|
|
236
|
+
message: "It pins no Blueprint Release."
|
|
237
|
+
}), e.elementSelector || t.push({
|
|
238
|
+
path: "/elementSelector",
|
|
239
|
+
code: "no_element_selector",
|
|
240
|
+
message: "It has no element selector."
|
|
241
|
+
}), !e.sourceKey?.selector && !e.sourceKey?.template && t.push({ path: "/sourceKey", code: "no_source_key", message: "It has no Source Key." }), (e.fields ?? []).forEach((i, l) => {
|
|
242
|
+
const m = String(i.name ?? "");
|
|
243
|
+
n && !n.fieldPaths.includes(m) && t.push({
|
|
244
|
+
path: `/fields/${l}`,
|
|
245
|
+
code: "unknown_field_path",
|
|
246
|
+
message: `The pinned Release has no field ${m}.`
|
|
247
|
+
});
|
|
248
|
+
}), t;
|
|
249
|
+
}
|
|
250
|
+
function C(e, t, n) {
|
|
251
|
+
return e.flatMap((i, l) => {
|
|
252
|
+
const m = `/${t}/${l}`, u = o.find((f) => f.name === i.processor);
|
|
253
|
+
return u ? u.target !== "source_file" ? [
|
|
254
|
+
{
|
|
255
|
+
path: m,
|
|
256
|
+
code: "rich_text_processor",
|
|
257
|
+
message: `${u.name} is configured on a rich-text field, not on a Profile.`
|
|
258
|
+
}
|
|
259
|
+
] : u.kind !== n ? [{ path: m, code: "wrong_processor_kind", message: `${u.name} does not run here.` }] : u.settingsSpec.filter(
|
|
260
|
+
(f) => f.config.required && (i.settings[f.config.api_accessor] ?? "") === ""
|
|
261
|
+
).map((f) => ({
|
|
262
|
+
path: `${m}/settings/${f.config.api_accessor}`,
|
|
263
|
+
code: "invalid_processor_settings",
|
|
264
|
+
message: `${u.name}: ${f.config.api_accessor} is required.`
|
|
265
|
+
})) : [
|
|
266
|
+
{ path: m, code: "unknown_processor", message: `No Processor is called ${i.processor}.` }
|
|
267
|
+
];
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
function T(e) {
|
|
271
|
+
const t = s(), n = [
|
|
272
|
+
...C(e.preprocessors, "preprocessors", "preprocessor"),
|
|
273
|
+
...C(e.postProcessors, "postProcessors", "post_processor")
|
|
274
|
+
];
|
|
275
|
+
return e.mappingIds.length === 0 && n.push({ path: "/mappingIds", code: "no_mappings", message: "It includes no Mapping." }), e.mappingIds.forEach((i, l) => {
|
|
276
|
+
const m = t.mappings.find((I) => I.id === i);
|
|
277
|
+
if (!m) {
|
|
278
|
+
n.push({
|
|
279
|
+
path: `/mappingIds/${l}`,
|
|
280
|
+
code: "mapping_missing",
|
|
281
|
+
message: "It includes a Mapping that does not exist."
|
|
282
|
+
});
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
const u = B(m.content);
|
|
286
|
+
u.length > 0 && n.push({
|
|
287
|
+
path: `/mappingIds/${l}`,
|
|
288
|
+
code: "mapping_invalid",
|
|
289
|
+
message: `The Mapping ${m.content.name} is invalid: ${u.map((I) => I.message).join(" ")}`
|
|
290
|
+
});
|
|
291
|
+
}), e.entitySetId && !t.entitySets.some((i) => i.id === e.entitySetId) && n.push({
|
|
292
|
+
path: "/entitySetId",
|
|
293
|
+
code: "entity_set_missing",
|
|
294
|
+
message: "It names an Entity Set that does not exist."
|
|
295
|
+
}), n;
|
|
296
|
+
}
|
|
297
|
+
const K = (e) => Object.keys(e.entities).length === 0 ? [{ path: "/entities", code: "no_entities", message: "It defines no entity." }] : [], b = (e) => ({
|
|
298
|
+
id: e.id,
|
|
299
|
+
content: e.content,
|
|
300
|
+
validity: $(T(e.content)),
|
|
301
|
+
state: y(e)
|
|
302
|
+
}), h = (e) => ({
|
|
303
|
+
id: e.id,
|
|
304
|
+
content: e.content,
|
|
305
|
+
validity: $(B(e.content)),
|
|
306
|
+
state: y(e)
|
|
307
|
+
}), _ = (e) => ({
|
|
308
|
+
id: e.id,
|
|
309
|
+
content: e.content,
|
|
310
|
+
validity: $(K(e.content)),
|
|
311
|
+
state: y(e)
|
|
312
|
+
}), M = (e) => S(s().importProfiles.filter((t) => e(t.content))).map((t) => ({
|
|
313
|
+
id: t.id,
|
|
314
|
+
name: t.content.name
|
|
315
|
+
})), R = (e) => `${e}_stub_new_${++A}`;
|
|
316
|
+
return {
|
|
317
|
+
calls: N,
|
|
318
|
+
switchWorkspace(e) {
|
|
319
|
+
P = e;
|
|
320
|
+
},
|
|
321
|
+
listImportProfiles: () => a("listImportProfiles", () => S(s().importProfiles).map(b)),
|
|
322
|
+
getImportProfile: (e) => a("getImportProfile", () => b(c(s().importProfiles, e, "Import Profile"))),
|
|
323
|
+
createImportProfile: (e) => a("createImportProfile", () => {
|
|
324
|
+
g(s().importProfiles, e.name);
|
|
325
|
+
const t = {
|
|
326
|
+
id: R("ip"),
|
|
327
|
+
content: structuredClone(e),
|
|
328
|
+
revision: 1
|
|
329
|
+
};
|
|
330
|
+
return s().importProfiles.push(t), b(t);
|
|
331
|
+
}),
|
|
332
|
+
updateImportProfile: (e, t, n) => a("updateImportProfile", () => {
|
|
333
|
+
const i = c(s().importProfiles, e, "Import Profile");
|
|
334
|
+
return g(s().importProfiles, t.name, e), E(i, t, n), b(i);
|
|
335
|
+
}),
|
|
336
|
+
deleteImportProfile: (e) => a("deleteImportProfile", () => {
|
|
337
|
+
c(s().importProfiles, e, "Import Profile"), s().importProfiles = s().importProfiles.filter((t) => t.id !== e);
|
|
338
|
+
}),
|
|
339
|
+
listProcessors: () => a("listProcessors", () => [...o].sort((e, t) => e.name.localeCompare(t.name))),
|
|
340
|
+
listMappings: () => a("listMappings", () => S(s().mappings).map(h)),
|
|
341
|
+
getMapping: (e) => a("getMapping", () => h(c(s().mappings, e, "Mapping"))),
|
|
342
|
+
createMapping: (e) => a("createMapping", () => {
|
|
343
|
+
g(s().mappings, e.name);
|
|
344
|
+
const t = {
|
|
345
|
+
id: R("mp"),
|
|
346
|
+
content: structuredClone(e),
|
|
347
|
+
revision: 1
|
|
348
|
+
};
|
|
349
|
+
return s().mappings.push(t), h(t);
|
|
350
|
+
}),
|
|
351
|
+
updateMapping: (e, t, n) => a("updateMapping", () => {
|
|
352
|
+
const i = c(s().mappings, e, "Mapping");
|
|
353
|
+
return g(s().mappings, t.name, e), E(i, t, n), h(i);
|
|
354
|
+
}),
|
|
355
|
+
deleteMapping: (e) => a("deleteMapping", () => {
|
|
356
|
+
c(s().mappings, e, "Mapping");
|
|
357
|
+
const t = M((n) => n.mappingIds.includes(e));
|
|
358
|
+
if (t.length > 0)
|
|
359
|
+
throw new O(
|
|
360
|
+
t,
|
|
361
|
+
`the Mapping is included by ${t.map((n) => n.name).join(", ")}`
|
|
362
|
+
);
|
|
363
|
+
s().mappings = s().mappings.filter((n) => n.id !== e);
|
|
364
|
+
}),
|
|
365
|
+
listMappingImportProfiles: (e) => a("listMappingImportProfiles", () => (c(s().mappings, e, "Mapping"), M((t) => t.mappingIds.includes(e)))),
|
|
366
|
+
checkMappingBlueprintRelease: (e, t) => a("checkMappingBlueprintRelease", () => {
|
|
367
|
+
const n = c(s().mappings, e, "Mapping"), i = d.find((l) => l.id === t);
|
|
368
|
+
if (!i) throw new Error(`Blueprint Release ${t} not found`);
|
|
369
|
+
if (i.blueprintId !== n.content.blueprintId)
|
|
370
|
+
throw new Error("the Release is of another Blueprint");
|
|
371
|
+
return {
|
|
372
|
+
blueprintId: i.blueprintId,
|
|
373
|
+
missingFieldPaths: (n.content.fields ?? []).map((l) => String(l.name ?? "")).filter((l) => !i.fieldPaths.includes(l)),
|
|
374
|
+
missingReleaseSpecFields: []
|
|
375
|
+
};
|
|
376
|
+
}),
|
|
377
|
+
listEntitySets: () => a("listEntitySets", () => S(s().entitySets).map(_)),
|
|
378
|
+
getEntitySet: (e) => a("getEntitySet", () => _(c(s().entitySets, e, "Entity Set"))),
|
|
379
|
+
createEntitySet: (e) => a("createEntitySet", () => {
|
|
380
|
+
g(s().entitySets, e.name);
|
|
381
|
+
const t = {
|
|
382
|
+
id: R("es"),
|
|
383
|
+
content: structuredClone(e),
|
|
384
|
+
revision: 1
|
|
385
|
+
};
|
|
386
|
+
return s().entitySets.push(t), _(t);
|
|
387
|
+
}),
|
|
388
|
+
updateEntitySet: (e, t, n) => a("updateEntitySet", () => {
|
|
389
|
+
const i = c(s().entitySets, e, "Entity Set");
|
|
390
|
+
return g(s().entitySets, t.name, e), E(i, t, n), _(i);
|
|
391
|
+
}),
|
|
392
|
+
deleteEntitySet: (e) => a("deleteEntitySet", () => {
|
|
393
|
+
c(s().entitySets, e, "Entity Set");
|
|
394
|
+
const t = M((n) => n.entitySetId === e);
|
|
395
|
+
if (t.length > 0)
|
|
396
|
+
throw new O(
|
|
397
|
+
t,
|
|
398
|
+
`the Entity Set is named by ${t.map((n) => n.name).join(", ")}`
|
|
399
|
+
);
|
|
400
|
+
s().entitySets = s().entitySets.filter((n) => n.id !== e);
|
|
401
|
+
})
|
|
32
402
|
};
|
|
403
|
+
}
|
|
404
|
+
function X(r = x()) {
|
|
33
405
|
return {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
() => [...n().importProfiles ?? []].sort((t, s) => t.name.localeCompare(s.name))
|
|
41
|
-
),
|
|
42
|
-
listEntitySets: () => a(
|
|
43
|
-
"listEntitySets",
|
|
44
|
-
() => [...n().entitySets ?? []].sort((t, s) => t.name.localeCompare(s.name))
|
|
45
|
-
)
|
|
406
|
+
async listBlueprints() {
|
|
407
|
+
return [...new Map(r.map((o) => [o.blueprintId, o.blueprintName]))].map(([o, d]) => ({ id: o, name: d })).sort((o, d) => o.name.localeCompare(d.name));
|
|
408
|
+
},
|
|
409
|
+
async listReleases(p) {
|
|
410
|
+
return r.filter((o) => o.blueprintId === p).map((o) => ({ id: o.id, label: o.label }));
|
|
411
|
+
}
|
|
46
412
|
};
|
|
47
413
|
}
|
|
48
414
|
export {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
415
|
+
V as STUB_OTHER_WORKSPACE_ID,
|
|
416
|
+
z as STUB_USER_ID,
|
|
417
|
+
k as STUB_WORKSPACE_ID,
|
|
418
|
+
X as createStubBlueprints,
|
|
419
|
+
Q as createStubImporthubClient,
|
|
420
|
+
x as stubBlueprintReleases,
|
|
421
|
+
D as stubEntitySets,
|
|
422
|
+
J as stubIdentity,
|
|
423
|
+
W as stubImportProfiles,
|
|
424
|
+
U as stubMappings,
|
|
425
|
+
L as stubProcessors
|
|
56
426
|
};
|
|
57
427
|
//# sourceMappingURL=testing.js.map
|
package/dist/testing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.js","sources":["../src/testing/fixtures.ts","../src/testing/stub-client.ts"],"sourcesContent":["import { createHostMembers, type HostIdentity } from \"@knkcs/anker/host\";\nimport type { EntitySetSummary, ImportProfileSummary } from \"../client/importhub-client\";\n\n/** The stub viewer's id. */\nexport const STUB_USER_ID = \"user_stub_ada\";\n/** The stub workspace's id. */\nexport const STUB_WORKSPACE_ID = \"ws_stub_main\";\n/** A second workspace, for tests that switch to it. */\nexport const STUB_OTHER_WORKSPACE_ID = \"ws_stub_other\";\n\n/**\n * A `HostIdentity` for anker's `TestHost` or `HostProvider`: Ada, in the stub\n * workspace unless another is named.\n */\nexport function stubIdentity(workspaceId: string = STUB_WORKSPACE_ID): HostIdentity {\n\treturn {\n\t\tuserId: STUB_USER_ID,\n\t\tworkspaceId,\n\t\tmembers: createHostMembers([\n\t\t\t{ userId: STUB_USER_ID, displayName: \"Ada Importer\", email: \"ada@example.com\" },\n\t\t]),\n\t};\n}\n\n/** The stub workspace's Import Profiles: two, one per kind of Source File. */\nexport function stubImportProfiles(): ImportProfileSummary[] {\n\treturn [\n\t\t{ id: \"ip_stub_gesetz\", name: \"Boorberg gesetz\" },\n\t\t{ id: \"ip_stub_vrpml\", name: \"VRPML court decisions\" },\n\t];\n}\n\n/** The stub workspace's Entity Sets: one. */\nexport function stubEntitySets(): EntitySetSummary[] {\n\treturn [{ id: \"es_stub_latin1\", name: \"ISO Latin 1\" }];\n}\n","// An `ImporthubClient` over in-memory workspaces seeded from the fixtures.\n//\n// importhub takes the workspace from the caller's token, never from an\n// argument, so a real client answers for whichever workspace the host's\n// session is in. The stub does the same: it answers for its active\n// workspace, and a test switches it (`switchWorkspace`) where a host would\n// switch the token, which is how a host's test shows that switching reloads\n// the new workspace's data.\n//\n// Typed as the whole interface, so a method added to `ImporthubClient`\n// without an answer here fails this package's typecheck, not a host's test.\nimport type {\n\tEntitySetSummary,\n\tImporthubClient,\n\tImportProfileSummary,\n} from \"../client/importhub-client\";\nimport { STUB_WORKSPACE_ID, stubEntitySets, stubImportProfiles } from \"./fixtures\";\n\n/** What one stub workspace holds. */\nexport interface StubWorkspace {\n\timportProfiles?: ImportProfileSummary[];\n\tentitySets?: EntitySetSummary[];\n}\n\nexport interface StubImporthubClientOptions {\n\t/**\n\t * The workspaces by id. Without it, the stub workspace holds the\n\t * fixtures' Import Profiles and Entity Sets.\n\t */\n\tworkspaces?: Record<string, StubWorkspace>;\n\t/** The workspace answered for first; the stub workspace by default. */\n\tactiveWorkspaceId?: string;\n\t/** Fail every read with this error, as an unreachable importhub would. */\n\tfail?: Error;\n}\n\nexport interface StubImporthubClient extends ImporthubClient {\n\t/** Answer for another workspace from now on, as a host's new token would. */\n\tswitchWorkspace(workspaceId: string): void;\n\t/** How many reads each method has answered, for tests that count reloads. */\n\treadonly calls: Readonly<Record<keyof ImporthubClient, number>>;\n}\n\nexport function createStubImporthubClient(\n\toptions: StubImporthubClientOptions = {},\n): StubImporthubClient {\n\tconst workspaces = options.workspaces ?? {\n\t\t[STUB_WORKSPACE_ID]: { importProfiles: stubImportProfiles(), entitySets: stubEntitySets() },\n\t};\n\tlet active = options.activeWorkspaceId ?? STUB_WORKSPACE_ID;\n\tconst calls: Record<keyof ImporthubClient, number> = {\n\t\tlistImportProfiles: 0,\n\t\tlistEntitySets: 0,\n\t};\n\tconst current = (): StubWorkspace => workspaces[active] ?? {};\n\tconst answer = async <T>(method: keyof ImporthubClient, read: () => T): Promise<T> => {\n\t\tcalls[method]++;\n\t\tif (options.fail) throw options.fail;\n\t\treturn structuredClone(read());\n\t};\n\treturn {\n\t\tcalls,\n\t\tswitchWorkspace(workspaceId) {\n\t\t\tactive = workspaceId;\n\t\t},\n\t\tlistImportProfiles: () =>\n\t\t\tanswer(\"listImportProfiles\", () =>\n\t\t\t\t[...(current().importProfiles ?? [])].sort((a, b) => a.name.localeCompare(b.name)),\n\t\t\t),\n\t\tlistEntitySets: () =>\n\t\t\tanswer(\"listEntitySets\", () =>\n\t\t\t\t[...(current().entitySets ?? [])].sort((a, b) => a.name.localeCompare(b.name)),\n\t\t\t),\n\t};\n}\n"],"names":["STUB_USER_ID","STUB_WORKSPACE_ID","STUB_OTHER_WORKSPACE_ID","stubIdentity","workspaceId","createHostMembers","stubImportProfiles","stubEntitySets","createStubImporthubClient","options","workspaces","active","calls","current","answer","method","read","a","b"],"mappings":";AAIO,MAAMA,IAAe,iBAEfC,IAAoB,gBAEpBC,IAA0B;AAMhC,SAASC,EAAaC,IAAsBH,GAAiC;AACnF,S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AAE,KAAK,cAAcC,EAAE,IAAI,CAAC;AAAA,IAAA;AAAA,EAC9E;AAEH;"}
|
|
1
|
+
{"version":3,"file":"testing.js","sources":["../src/testing/fixtures.ts","../src/testing/stub-client.ts"],"sourcesContent":["import { createHostMembers, type HostIdentity } from \"@knkcs/anker/host\";\nimport type {\n\tEntitySetContent,\n\tImportProfileContent,\n\tMappingContent,\n\tProcessor,\n} from \"../client/importhub-client\";\n\n/** The stub viewer's id. */\nexport const STUB_USER_ID = \"user_stub_ada\";\n/** The stub workspace's id. */\nexport const STUB_WORKSPACE_ID = \"ws_stub_main\";\n/** A second workspace, for tests that switch to it. */\nexport const STUB_OTHER_WORKSPACE_ID = \"ws_stub_other\";\n\n/**\n * A `HostIdentity` for anker's `TestHost` or `HostProvider`: Ada, in the stub\n * workspace unless another is named.\n */\nexport function stubIdentity(workspaceId: string = STUB_WORKSPACE_ID): HostIdentity {\n\treturn {\n\t\tuserId: STUB_USER_ID,\n\t\tworkspaceId,\n\t\tmembers: createHostMembers([\n\t\t\t{ userId: STUB_USER_ID, displayName: \"Ada Importer\", email: \"ada@example.com\" },\n\t\t]),\n\t};\n}\n\n/** A stub configuration as the stub client is seeded with it: an id and its content. */\nexport interface StubConfiguration<C> {\n\tid: string;\n\tcontent: C;\n\t/** The number of its latest Release; none when unset. */\n\treleaseNumber?: number;\n}\n\n/** A Blueprint Release the stub knows, with the field paths it has. */\nexport interface StubBlueprintRelease {\n\tid: string;\n\tblueprintId: string;\n\tblueprintName: string;\n\tlabel: string;\n\tfieldPaths: string[];\n}\n\n/**\n * Two Releases of the \"Gesetz\" Blueprint, the newer of which dropped\n * `fussnote`, and one of \"Entscheidung\".\n */\nexport function stubBlueprintReleases(): StubBlueprintRelease[] {\n\treturn [\n\t\t{\n\t\t\tid: \"br_stub_gesetz_2\",\n\t\t\tblueprintId: \"bp_stub_gesetz\",\n\t\t\tblueprintName: \"Gesetz\",\n\t\t\tlabel: \"Release 2\",\n\t\t\tfieldPaths: [\"titel\", \"abkuerzung\"],\n\t\t},\n\t\t{\n\t\t\tid: \"br_stub_gesetz_1\",\n\t\t\tblueprintId: \"bp_stub_gesetz\",\n\t\t\tblueprintName: \"Gesetz\",\n\t\t\tlabel: \"Release 1\",\n\t\t\tfieldPaths: [\"titel\", \"abkuerzung\", \"fussnote\"],\n\t\t},\n\t\t{\n\t\t\tid: \"br_stub_entscheidung_1\",\n\t\t\tblueprintId: \"bp_stub_entscheidung\",\n\t\t\tblueprintName: \"Entscheidung\",\n\t\t\tlabel: \"Release 1\",\n\t\t\tfieldPaths: [\"aktenzeichen\", \"datum\"],\n\t\t},\n\t];\n}\n\n/** The stub workspace's Mappings: one valid and released, one invalid. */\nexport function stubMappings(): StubConfiguration<MappingContent>[] {\n\treturn [\n\t\t{\n\t\t\tid: \"mp_stub_norm\",\n\t\t\treleaseNumber: 1,\n\t\t\tcontent: {\n\t\t\t\tname: \"Gesetz norms\",\n\t\t\t\tdescription: \"One Content per norm\",\n\t\t\t\tblueprintId: \"bp_stub_gesetz\",\n\t\t\t\tblueprintReleaseId: \"br_stub_gesetz_1\",\n\t\t\t\telementSelector: \"//norm\",\n\t\t\t\tsourceKey: { selector: \"@id\" },\n\t\t\t\tfields: [\n\t\t\t\t\t{ name: \"titel\", selector: \"titel\", type: \"text\" },\n\t\t\t\t\t{ name: \"fussnote\", selector: \"fn\", type: \"text\" },\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tid: \"mp_stub_decision\",\n\t\t\tcontent: {\n\t\t\t\tname: \"Court decisions\",\n\t\t\t\tdescription: \"\",\n\t\t\t\tblueprintId: \"bp_stub_entscheidung\",\n\t\t\t\tblueprintReleaseId: \"br_stub_entscheidung_1\",\n\t\t\t\telementSelector: \"\",\n\t\t\t\tsourceKey: {},\n\t\t\t\tfields: [],\n\t\t\t},\n\t\t},\n\t];\n}\n\n/** The stub workspace's Entity Sets: one. */\nexport function stubEntitySets(): StubConfiguration<EntitySetContent>[] {\n\treturn [\n\t\t{\n\t\t\tid: \"es_stub_latin1\",\n\t\t\treleaseNumber: 1,\n\t\t\tcontent: {\n\t\t\t\tname: \"ISO Latin 1\",\n\t\t\t\tdescription: \"The Latin-1 entities Boorberg's files use\",\n\t\t\t\tentities: { auml: \"ä\", nbsp: \" \" },\n\t\t\t},\n\t\t},\n\t];\n}\n\n/**\n * The stub workspace's Import Profiles: one per kind of Source File. The\n * VRPML one includes the invalid Mapping, so it is invalid too.\n */\nexport function stubImportProfiles(): StubConfiguration<ImportProfileContent>[] {\n\treturn [\n\t\t{\n\t\t\tid: \"ip_stub_gesetz\",\n\t\t\treleaseNumber: 2,\n\t\t\tcontent: {\n\t\t\t\tname: \"Boorberg gesetz\",\n\t\t\t\tdescription: \"Boorberg's law files\",\n\t\t\t\tentitySetId: \"es_stub_latin1\",\n\t\t\t\tpreprocessors: [{ processor: \"rename-element\", settings: { from: \"para\", to: \"absatz\" } }],\n\t\t\t\tmappingIds: [\"mp_stub_norm\"],\n\t\t\t\tpostProcessors: [],\n\t\t\t\tautoPublish: false,\n\t\t\t\tdeleteSourceFileOnSuccess: true,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tid: \"ip_stub_vrpml\",\n\t\t\tcontent: {\n\t\t\t\tname: \"VRPML court decisions\",\n\t\t\t\tdescription: \"\",\n\t\t\t\tentitySetId: \"\",\n\t\t\t\tpreprocessors: [],\n\t\t\t\tmappingIds: [\"mp_stub_decision\"],\n\t\t\t\tpostProcessors: [],\n\t\t\t\tautoPublish: false,\n\t\t\t\tdeleteSourceFileOnSuccess: false,\n\t\t\t},\n\t\t},\n\t];\n}\n\nconst text = (accessor: string, name: string, required: boolean, instructions = \"\") => ({\n\tfield_type: \"text\",\n\tconfig: { name, api_accessor: accessor, required, instructions },\n\tsystem: false,\n});\n\n/** The catalogue, a few Processors of each kind and target. */\nexport function stubProcessors(): Processor[] {\n\treturn [\n\t\t{\n\t\t\tname: \"citation-links\",\n\t\t\tkind: \"post_processor\",\n\t\t\ttarget: \"source_file\",\n\t\t\tdescription:\n\t\t\t\t\"Links citations in rich text to the Content they name, through legalcitationhub.\",\n\t\t\tsettingsSpec: [],\n\t\t},\n\t\t{\n\t\t\tname: \"norm-cite\",\n\t\t\tkind: \"preprocessor\",\n\t\t\ttarget: \"rich_text_field\",\n\t\t\tdescription: \"Marks legal norm citations in one rich-text field.\",\n\t\t\tsettingsSpec: [],\n\t\t},\n\t\t{\n\t\t\tname: \"rename-element\",\n\t\t\tkind: \"preprocessor\",\n\t\t\ttarget: \"source_file\",\n\t\t\tdescription: \"Renames every element of one name to another.\",\n\t\t\tsettingsSpec: [\n\t\t\t\ttext(\"from\", \"Element\", true, \"The element's name now.\"),\n\t\t\t\ttext(\"to\", \"New name\", true),\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tname: \"sentence-detect\",\n\t\t\tkind: \"preprocessor\",\n\t\t\ttarget: \"source_file\",\n\t\t\tdescription: \"Wraps each sentence of an element in its own element.\",\n\t\t\tsettingsSpec: [text(\"element\", \"Element\", false)],\n\t\t},\n\t];\n}\n","// An `ImporthubClient` over in-memory workspaces seeded from the fixtures.\n//\n// importhub takes the workspace from the caller's token, never from an\n// argument, so a real client answers for whichever workspace the host's\n// session is in. The stub does the same: it answers for its active\n// workspace, and a test switches it (`switchWorkspace`) where a host would\n// switch the token, which is how a host's test shows that switching reloads\n// the new workspace's data.\n//\n// It keeps importhub's rules a screen shows (internal/server's handlers):\n// validity reasons with their codes, a delete refused while Import Profiles\n// use the configuration, names unique per kind, a save on a draft that moved\n// refused, and the Blueprint Release check. Its messages are its own, not\n// importhub's.\n//\n// Typed as the whole interface, so a method added to `ImporthubClient`\n// without an answer here fails this package's typecheck, not a host's test.\nimport type {\n\tConfigurationState,\n\tEntitySet,\n\tEntitySetContent,\n\tImporthubClient,\n\tImportProfile,\n\tImportProfileContent,\n\tMapping,\n\tMappingContent,\n\tProcessor,\n\tProcessorStep,\n\tValidity,\n\tValidityReason,\n} from \"../client/importhub-client\";\nimport { ConfigurationInUseError, NameTakenError } from \"../client/importhub-client\";\nimport type { ImporthubBlueprints } from \"../common/host\";\nimport {\n\tSTUB_WORKSPACE_ID,\n\ttype StubBlueprintRelease,\n\ttype StubConfiguration,\n\tstubBlueprintReleases,\n\tstubEntitySets,\n\tstubImportProfiles,\n\tstubMappings,\n\tstubProcessors,\n} from \"./fixtures\";\n\n/** What one stub workspace holds. */\nexport interface StubWorkspace {\n\timportProfiles?: StubConfiguration<ImportProfileContent>[];\n\tmappings?: StubConfiguration<MappingContent>[];\n\tentitySets?: StubConfiguration<EntitySetContent>[];\n}\n\nexport interface StubImporthubClientOptions {\n\t/**\n\t * The workspaces by id. Without it, the stub workspace holds the\n\t * fixtures' Import Profiles, Mappings and Entity Sets.\n\t */\n\tworkspaces?: Record<string, StubWorkspace>;\n\t/** The workspace answered for first; the stub workspace by default. */\n\tactiveWorkspaceId?: string;\n\t/** The Processor catalogue; the fixtures' by default. */\n\tprocessors?: Processor[];\n\t/** The Blueprint Releases blueprinthub knows; the fixtures' by default. */\n\tblueprintReleases?: StubBlueprintRelease[];\n\t/** Fail every call with this error, as an unreachable importhub would. */\n\tfail?: Error;\n}\n\nexport interface StubImporthubClient extends ImporthubClient {\n\t/** Answer for another workspace from now on, as a host's new token would. */\n\tswitchWorkspace(workspaceId: string): void;\n\t/** How many calls each method has answered, for tests that count reloads. */\n\treadonly calls: Readonly<Record<keyof ImporthubClient, number>>;\n}\n\n/** One stored configuration: its draft, and how many saves it has had. */\ninterface Stored<C> {\n\tid: string;\n\tcontent: C;\n\trevision: number;\n\treleaseNumber?: number;\n\t/** The revision the latest Release was cut from. */\n\treleasedRevision?: number;\n}\n\ninterface Workspace {\n\timportProfiles: Stored<ImportProfileContent>[];\n\tmappings: Stored<MappingContent>[];\n\tentitySets: Stored<EntitySetContent>[];\n}\n\nconst METHODS: (keyof ImporthubClient)[] = [\n\t\"listImportProfiles\",\n\t\"getImportProfile\",\n\t\"createImportProfile\",\n\t\"updateImportProfile\",\n\t\"deleteImportProfile\",\n\t\"listProcessors\",\n\t\"listMappings\",\n\t\"getMapping\",\n\t\"createMapping\",\n\t\"updateMapping\",\n\t\"deleteMapping\",\n\t\"listMappingImportProfiles\",\n\t\"checkMappingBlueprintRelease\",\n\t\"listEntitySets\",\n\t\"getEntitySet\",\n\t\"createEntitySet\",\n\t\"updateEntitySet\",\n\t\"deleteEntitySet\",\n];\n\nconst seed = <C>(items: StubConfiguration<C>[] = []): Stored<C>[] =>\n\titems.map((i) => ({\n\t\tid: i.id,\n\t\tcontent: structuredClone(i.content),\n\t\trevision: 1,\n\t\treleaseNumber: i.releaseNumber,\n\t\treleasedRevision: i.releaseNumber ? 1 : undefined,\n\t}));\n\nconst stateOf = <C>(s: Stored<C>): ConfigurationState => ({\n\tdraftRevisionId: `${s.id}_r${s.revision}`,\n\tdraftDiffersFromRelease: s.releasedRevision !== s.revision,\n\t...(s.releaseNumber\n\t\t? { latestRelease: { id: `${s.id}_rel${s.releaseNumber}`, number: s.releaseNumber } }\n\t\t: {}),\n});\n\nconst validity = (reasons: ValidityReason[]): Validity => ({\n\tvalid: reasons.length === 0,\n\treasons,\n});\n\nconst byName = <T extends { content: { name: string } }>(items: T[]) =>\n\t[...items].sort((a, b) => a.content.name.localeCompare(b.content.name));\n\nlet created = 0;\n\nexport function createStubImporthubClient(\n\toptions: StubImporthubClientOptions = {},\n): StubImporthubClient {\n\tconst workspaces: Record<string, Workspace> = Object.fromEntries(\n\t\tObject.entries(\n\t\t\toptions.workspaces ?? {\n\t\t\t\t[STUB_WORKSPACE_ID]: {\n\t\t\t\t\timportProfiles: stubImportProfiles(),\n\t\t\t\t\tmappings: stubMappings(),\n\t\t\t\t\tentitySets: stubEntitySets(),\n\t\t\t\t},\n\t\t\t},\n\t\t).map(([id, w]) => [\n\t\t\tid,\n\t\t\t{\n\t\t\t\timportProfiles: seed(w.importProfiles),\n\t\t\t\tmappings: seed(w.mappings),\n\t\t\t\tentitySets: seed(w.entitySets),\n\t\t\t},\n\t\t]),\n\t);\n\tconst processors = options.processors ?? stubProcessors();\n\tconst releases = options.blueprintReleases ?? stubBlueprintReleases();\n\tlet active = options.activeWorkspaceId ?? STUB_WORKSPACE_ID;\n\tconst calls = Object.fromEntries(METHODS.map((m) => [m, 0])) as Record<\n\t\tkeyof ImporthubClient,\n\t\tnumber\n\t>;\n\tconst ws = (): Workspace => {\n\t\tworkspaces[active] ??= { importProfiles: [], mappings: [], entitySets: [] };\n\t\treturn workspaces[active];\n\t};\n\tconst answer = async <T>(method: keyof ImporthubClient, run: () => T): Promise<T> => {\n\t\tcalls[method]++;\n\t\tif (options.fail) throw options.fail;\n\t\treturn structuredClone(run());\n\t};\n\tconst find = <C>(items: Stored<C>[], id: string, kind: string): Stored<C> => {\n\t\tconst item = items.find((i) => i.id === id);\n\t\tif (!item) throw new Error(`${kind} ${id} not found`);\n\t\treturn item;\n\t};\n\tconst nameFree = <C extends { name: string }>(items: Stored<C>[], name: string, id?: string) => {\n\t\tif (!name.trim()) throw new Error(\"a name is required\");\n\t\tif (items.some((i) => i.id !== id && i.content.name === name)) throw new NameTakenError();\n\t};\n\tconst save = <C>(item: Stored<C>, content: C, draftRevisionId: string) => {\n\t\tif (draftRevisionId && draftRevisionId !== stateOf(item).draftRevisionId) {\n\t\t\tthrow new Error(\"the draft moved: somebody saved in between\");\n\t\t}\n\t\titem.content = structuredClone(content);\n\t\titem.revision++;\n\t};\n\n\tfunction mappingReasons(c: MappingContent): ValidityReason[] {\n\t\tconst out: ValidityReason[] = [];\n\t\tconst release = releases.find((r) => r.id === c.blueprintReleaseId);\n\t\tif (!c.blueprintReleaseId) {\n\t\t\tout.push({\n\t\t\t\tpath: \"/blueprintReleaseId\",\n\t\t\t\tcode: \"no_blueprint_release\",\n\t\t\t\tmessage: \"It pins no Blueprint Release.\",\n\t\t\t});\n\t\t} else if (!release) {\n\t\t\tout.push({\n\t\t\t\tpath: \"/blueprintReleaseId\",\n\t\t\t\tcode: \"blueprint_gone\",\n\t\t\t\tmessage: \"blueprinthub does not know the Blueprint Release it pins.\",\n\t\t\t});\n\t\t} else if (release.blueprintId !== c.blueprintId) {\n\t\t\tout.push({\n\t\t\t\tpath: \"/blueprintReleaseId\",\n\t\t\t\tcode: \"release_of_other_blueprint\",\n\t\t\t\tmessage: \"The pinned Release is of another Blueprint.\",\n\t\t\t});\n\t\t}\n\t\tif (!c.elementSelector) {\n\t\t\tout.push({\n\t\t\t\tpath: \"/elementSelector\",\n\t\t\t\tcode: \"no_element_selector\",\n\t\t\t\tmessage: \"It has no element selector.\",\n\t\t\t});\n\t\t}\n\t\tif (!c.sourceKey?.selector && !c.sourceKey?.template) {\n\t\t\tout.push({ path: \"/sourceKey\", code: \"no_source_key\", message: \"It has no Source Key.\" });\n\t\t}\n\t\t(c.fields ?? []).forEach((f, i) => {\n\t\t\tconst path = String(f.name ?? \"\");\n\t\t\tif (release && !release.fieldPaths.includes(path)) {\n\t\t\t\tout.push({\n\t\t\t\t\tpath: `/fields/${i}`,\n\t\t\t\t\tcode: \"unknown_field_path\",\n\t\t\t\t\tmessage: `The pinned Release has no field ${path}.`,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\treturn out;\n\t}\n\n\tfunction stepReasons(\n\t\tsteps: ProcessorStep[],\n\t\tlist: string,\n\t\tkind: Processor[\"kind\"],\n\t): ValidityReason[] {\n\t\treturn steps.flatMap((s, i): ValidityReason[] => {\n\t\t\tconst path = `/${list}/${i}`;\n\t\t\tconst p = processors.find((x) => x.name === s.processor);\n\t\t\tif (!p)\n\t\t\t\treturn [\n\t\t\t\t\t{ path, code: \"unknown_processor\", message: `No Processor is called ${s.processor}.` },\n\t\t\t\t];\n\t\t\tif (p.target !== \"source_file\") {\n\t\t\t\treturn [\n\t\t\t\t\t{\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\tcode: \"rich_text_processor\",\n\t\t\t\t\t\tmessage: `${p.name} is configured on a rich-text field, not on a Profile.`,\n\t\t\t\t\t},\n\t\t\t\t];\n\t\t\t}\n\t\t\tif (p.kind !== kind)\n\t\t\t\treturn [{ path, code: \"wrong_processor_kind\", message: `${p.name} does not run here.` }];\n\t\t\tconst missing = p.settingsSpec.filter(\n\t\t\t\t(f) => f.config.required && (s.settings[f.config.api_accessor] ?? \"\") === \"\",\n\t\t\t);\n\t\t\treturn missing.map((f) => ({\n\t\t\t\tpath: `${path}/settings/${f.config.api_accessor}`,\n\t\t\t\tcode: \"invalid_processor_settings\",\n\t\t\t\tmessage: `${p.name}: ${f.config.api_accessor} is required.`,\n\t\t\t}));\n\t\t});\n\t}\n\n\tfunction profileReasons(c: ImportProfileContent): ValidityReason[] {\n\t\tconst w = ws();\n\t\tconst out = [\n\t\t\t...stepReasons(c.preprocessors, \"preprocessors\", \"preprocessor\"),\n\t\t\t...stepReasons(c.postProcessors, \"postProcessors\", \"post_processor\"),\n\t\t];\n\t\tif (c.mappingIds.length === 0) {\n\t\t\tout.push({ path: \"/mappingIds\", code: \"no_mappings\", message: \"It includes no Mapping.\" });\n\t\t}\n\t\tc.mappingIds.forEach((id, i) => {\n\t\t\tconst m = w.mappings.find((x) => x.id === id);\n\t\t\tif (!m) {\n\t\t\t\tout.push({\n\t\t\t\t\tpath: `/mappingIds/${i}`,\n\t\t\t\t\tcode: \"mapping_missing\",\n\t\t\t\t\tmessage: \"It includes a Mapping that does not exist.\",\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst reasons = mappingReasons(m.content);\n\t\t\tif (reasons.length > 0) {\n\t\t\t\tout.push({\n\t\t\t\t\tpath: `/mappingIds/${i}`,\n\t\t\t\t\tcode: \"mapping_invalid\",\n\t\t\t\t\tmessage: `The Mapping ${m.content.name} is invalid: ${reasons.map((r) => r.message).join(\" \")}`,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tif (c.entitySetId && !w.entitySets.some((e) => e.id === c.entitySetId)) {\n\t\t\tout.push({\n\t\t\t\tpath: \"/entitySetId\",\n\t\t\t\tcode: \"entity_set_missing\",\n\t\t\t\tmessage: \"It names an Entity Set that does not exist.\",\n\t\t\t});\n\t\t}\n\t\treturn out;\n\t}\n\n\tconst entitySetReasons = (c: EntitySetContent): ValidityReason[] =>\n\t\tObject.keys(c.entities).length === 0\n\t\t\t? [{ path: \"/entities\", code: \"no_entities\", message: \"It defines no entity.\" }]\n\t\t\t: [];\n\n\tconst profileOf = (s: Stored<ImportProfileContent>): ImportProfile => ({\n\t\tid: s.id,\n\t\tcontent: s.content,\n\t\tvalidity: validity(profileReasons(s.content)),\n\t\tstate: stateOf(s),\n\t});\n\tconst mappingOf = (s: Stored<MappingContent>): Mapping => ({\n\t\tid: s.id,\n\t\tcontent: s.content,\n\t\tvalidity: validity(mappingReasons(s.content)),\n\t\tstate: stateOf(s),\n\t});\n\tconst entitySetOf = (s: Stored<EntitySetContent>): EntitySet => ({\n\t\tid: s.id,\n\t\tcontent: s.content,\n\t\tvalidity: validity(entitySetReasons(s.content)),\n\t\tstate: stateOf(s),\n\t});\n\tconst profilesUsing = (uses: (c: ImportProfileContent) => boolean) =>\n\t\tbyName(ws().importProfiles.filter((p) => uses(p.content))).map((p) => ({\n\t\t\tid: p.id,\n\t\t\tname: p.content.name,\n\t\t}));\n\tconst newId = (prefix: string) => `${prefix}_stub_new_${++created}`;\n\n\treturn {\n\t\tcalls,\n\t\tswitchWorkspace(workspaceId) {\n\t\t\tactive = workspaceId;\n\t\t},\n\n\t\tlistImportProfiles: () =>\n\t\t\tanswer(\"listImportProfiles\", () => byName(ws().importProfiles).map(profileOf)),\n\t\tgetImportProfile: (id) =>\n\t\t\tanswer(\"getImportProfile\", () => profileOf(find(ws().importProfiles, id, \"Import Profile\"))),\n\t\tcreateImportProfile: (content) =>\n\t\t\tanswer(\"createImportProfile\", () => {\n\t\t\t\tnameFree(ws().importProfiles, content.name);\n\t\t\t\tconst s: Stored<ImportProfileContent> = {\n\t\t\t\t\tid: newId(\"ip\"),\n\t\t\t\t\tcontent: structuredClone(content),\n\t\t\t\t\trevision: 1,\n\t\t\t\t};\n\t\t\t\tws().importProfiles.push(s);\n\t\t\t\treturn profileOf(s);\n\t\t\t}),\n\t\tupdateImportProfile: (id, content, draftRevisionId) =>\n\t\t\tanswer(\"updateImportProfile\", () => {\n\t\t\t\tconst s = find(ws().importProfiles, id, \"Import Profile\");\n\t\t\t\tnameFree(ws().importProfiles, content.name, id);\n\t\t\t\tsave(s, content, draftRevisionId);\n\t\t\t\treturn profileOf(s);\n\t\t\t}),\n\t\tdeleteImportProfile: (id) =>\n\t\t\tanswer(\"deleteImportProfile\", () => {\n\t\t\t\tfind(ws().importProfiles, id, \"Import Profile\");\n\t\t\t\tws().importProfiles = ws().importProfiles.filter((p) => p.id !== id);\n\t\t\t}),\n\n\t\tlistProcessors: () =>\n\t\t\tanswer(\"listProcessors\", () => [...processors].sort((a, b) => a.name.localeCompare(b.name))),\n\n\t\tlistMappings: () => answer(\"listMappings\", () => byName(ws().mappings).map(mappingOf)),\n\t\tgetMapping: (id) => answer(\"getMapping\", () => mappingOf(find(ws().mappings, id, \"Mapping\"))),\n\t\tcreateMapping: (content) =>\n\t\t\tanswer(\"createMapping\", () => {\n\t\t\t\tnameFree(ws().mappings, content.name);\n\t\t\t\tconst s: Stored<MappingContent> = {\n\t\t\t\t\tid: newId(\"mp\"),\n\t\t\t\t\tcontent: structuredClone(content),\n\t\t\t\t\trevision: 1,\n\t\t\t\t};\n\t\t\t\tws().mappings.push(s);\n\t\t\t\treturn mappingOf(s);\n\t\t\t}),\n\t\tupdateMapping: (id, content, draftRevisionId) =>\n\t\t\tanswer(\"updateMapping\", () => {\n\t\t\t\tconst s = find(ws().mappings, id, \"Mapping\");\n\t\t\t\tnameFree(ws().mappings, content.name, id);\n\t\t\t\tsave(s, content, draftRevisionId);\n\t\t\t\treturn mappingOf(s);\n\t\t\t}),\n\t\tdeleteMapping: (id) =>\n\t\t\tanswer(\"deleteMapping\", () => {\n\t\t\t\tfind(ws().mappings, id, \"Mapping\");\n\t\t\t\tconst using = profilesUsing((c) => c.mappingIds.includes(id));\n\t\t\t\tif (using.length > 0) {\n\t\t\t\t\tthrow new ConfigurationInUseError(\n\t\t\t\t\t\tusing,\n\t\t\t\t\t\t`the Mapping is included by ${using.map((p) => p.name).join(\", \")}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tws().mappings = ws().mappings.filter((m) => m.id !== id);\n\t\t\t}),\n\t\tlistMappingImportProfiles: (id) =>\n\t\t\tanswer(\"listMappingImportProfiles\", () => {\n\t\t\t\tfind(ws().mappings, id, \"Mapping\");\n\t\t\t\treturn profilesUsing((c) => c.mappingIds.includes(id));\n\t\t\t}),\n\t\tcheckMappingBlueprintRelease: (id, blueprintReleaseId) =>\n\t\t\tanswer(\"checkMappingBlueprintRelease\", () => {\n\t\t\t\tconst m = find(ws().mappings, id, \"Mapping\");\n\t\t\t\tconst release = releases.find((r) => r.id === blueprintReleaseId);\n\t\t\t\tif (!release) throw new Error(`Blueprint Release ${blueprintReleaseId} not found`);\n\t\t\t\tif (release.blueprintId !== m.content.blueprintId) {\n\t\t\t\t\tthrow new Error(\"the Release is of another Blueprint\");\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tblueprintId: release.blueprintId,\n\t\t\t\t\tmissingFieldPaths: (m.content.fields ?? [])\n\t\t\t\t\t\t.map((f) => String(f.name ?? \"\"))\n\t\t\t\t\t\t.filter((path) => !release.fieldPaths.includes(path)),\n\t\t\t\t\tmissingReleaseSpecFields: [],\n\t\t\t\t};\n\t\t\t}),\n\n\t\tlistEntitySets: () => answer(\"listEntitySets\", () => byName(ws().entitySets).map(entitySetOf)),\n\t\tgetEntitySet: (id) =>\n\t\t\tanswer(\"getEntitySet\", () => entitySetOf(find(ws().entitySets, id, \"Entity Set\"))),\n\t\tcreateEntitySet: (content) =>\n\t\t\tanswer(\"createEntitySet\", () => {\n\t\t\t\tnameFree(ws().entitySets, content.name);\n\t\t\t\tconst s: Stored<EntitySetContent> = {\n\t\t\t\t\tid: newId(\"es\"),\n\t\t\t\t\tcontent: structuredClone(content),\n\t\t\t\t\trevision: 1,\n\t\t\t\t};\n\t\t\t\tws().entitySets.push(s);\n\t\t\t\treturn entitySetOf(s);\n\t\t\t}),\n\t\tupdateEntitySet: (id, content, draftRevisionId) =>\n\t\t\tanswer(\"updateEntitySet\", () => {\n\t\t\t\tconst s = find(ws().entitySets, id, \"Entity Set\");\n\t\t\t\tnameFree(ws().entitySets, content.name, id);\n\t\t\t\tsave(s, content, draftRevisionId);\n\t\t\t\treturn entitySetOf(s);\n\t\t\t}),\n\t\tdeleteEntitySet: (id) =>\n\t\t\tanswer(\"deleteEntitySet\", () => {\n\t\t\t\tfind(ws().entitySets, id, \"Entity Set\");\n\t\t\t\tconst using = profilesUsing((c) => c.entitySetId === id);\n\t\t\t\tif (using.length > 0) {\n\t\t\t\t\tthrow new ConfigurationInUseError(\n\t\t\t\t\t\tusing,\n\t\t\t\t\t\t`the Entity Set is named by ${using.map((p) => p.name).join(\", \")}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tws().entitySets = ws().entitySets.filter((e) => e.id !== id);\n\t\t\t}),\n\t};\n}\n\n/**\n * An `ImporthubBlueprints` over the stub's Blueprint Releases, for a host's\n * `ImporthubHost.blueprints` in tests.\n */\nexport function createStubBlueprints(\n\tblueprintReleases: StubBlueprintRelease[] = stubBlueprintReleases(),\n): ImporthubBlueprints {\n\treturn {\n\t\tasync listBlueprints() {\n\t\t\tconst byId = new Map(blueprintReleases.map((r) => [r.blueprintId, r.blueprintName]));\n\t\t\treturn [...byId]\n\t\t\t\t.map(([id, name]) => ({ id, name }))\n\t\t\t\t.sort((a, b) => a.name.localeCompare(b.name));\n\t\t},\n\t\tasync listReleases(blueprintId) {\n\t\t\treturn blueprintReleases\n\t\t\t\t.filter((r) => r.blueprintId === blueprintId)\n\t\t\t\t.map((r) => ({ id: r.id, label: r.label }));\n\t\t},\n\t};\n}\n"],"names":["STUB_USER_ID","STUB_WORKSPACE_ID","STUB_OTHER_WORKSPACE_ID","stubIdentity","workspaceId","createHostMembers","stubBlueprintReleases","stubMappings","stubEntitySets","stubImportProfiles","text","accessor","name","required","instructions","stubProcessors","METHODS","seed","items","i","stateOf","s","validity","reasons","byName","a","b","created","createStubImporthubClient","options","workspaces","id","w","processors","releases","active","calls","m","ws","answer","method","run","find","kind","item","nameFree","NameTakenError","save","content","draftRevisionId","mappingReasons","c","out","release","r","f","path","stepReasons","steps","list","p","x","profileReasons","e","entitySetReasons","profileOf","mappingOf","entitySetOf","profilesUsing","uses","newId","prefix","using","ConfigurationInUseError","blueprintReleaseId","createStubBlueprints","blueprintReleases","blueprintId"],"mappings":";;AASO,MAAMA,IAAe,iBAEfC,IAAoB,gBAEpBC,IAA0B;AAMhC,SAASC,EAAaC,IAAsBH,GAAiC;AACnF,SAAO;AAAA,IACN,QAAQD;AAAA,IACR,aAAAI;AAAA,IACA,SAASC,EAAkB;AAAA,MAC1B,EAAE,QAAQL,GAAc,aAAa,gBAAgB,OAAO,kBAAA;AAAA,IAAkB,CAC9E;AAAA,EAAA;AAEH;AAuBO,SAASM,IAAgD;AAC/D,SAAO;AAAA,IACN;AAAA,MACC,IAAI;AAAA,MACJ,aAAa;AAAA,MACb,eAAe;AAAA,MACf,OAAO;AAAA,MACP,YAAY,CAAC,SAAS,YAAY;AAAA,IAAA;AAAA,IAEnC;AAAA,MACC,IAAI;AAAA,MACJ,aAAa;AAAA,MACb,eAAe;AAAA,MACf,OAAO;AAAA,MACP,YAAY,CAAC,SAAS,cAAc,UAAU;AAAA,IAAA;AAAA,IAE/C;AAAA,MACC,IAAI;AAAA,MACJ,aAAa;AAAA,MACb,eAAe;AAAA,MACf,OAAO;AAAA,MACP,YAAY,CAAC,gBAAgB,OAAO;AAAA,IAAA;AAAA,EACrC;AAEF;AAGO,SAASC,IAAoD;AACnE,SAAO;AAAA,IACN;AAAA,MACC,IAAI;AAAA,MACJ,eAAe;AAAA,MACf,SAAS;AAAA,QACR,MAAM;AAAA,QACN,aAAa;A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 -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knkcs/importhub-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "importhub's screens for knk hosts: Imports, Import Profiles, Mappings and Entity Sets",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -46,13 +46,19 @@
|
|
|
46
46
|
"@bufbuild/protobuf": "^2.0.0",
|
|
47
47
|
"@connectrpc/connect": "^2.0.0",
|
|
48
48
|
"@connectrpc/connect-web": "^2.0.0",
|
|
49
|
+
"@hookform/resolvers": "^3.0.0",
|
|
49
50
|
"@knkcs/anker": "^5.20.0",
|
|
51
|
+
"@knkcs/fieldkit": "^0.18.0-rc.15",
|
|
50
52
|
"@tanstack/react-query": "^5.0.0",
|
|
53
|
+
"@tanstack/react-table": "^8.0.0",
|
|
51
54
|
"i18next": "^26.0.0",
|
|
52
55
|
"lucide-react": ">=0.400.0",
|
|
53
56
|
"react": "^19.0.0",
|
|
54
57
|
"react-dom": "^19.0.0",
|
|
55
|
-
"react-
|
|
58
|
+
"react-hook-form": "^7.0.0",
|
|
59
|
+
"react-i18next": "^17.0.0",
|
|
60
|
+
"react-router": "^7.0.0",
|
|
61
|
+
"zod": "^3.0.0"
|
|
56
62
|
},
|
|
57
63
|
"devDependencies": {
|
|
58
64
|
"@biomejs/biome": "^2.6.10",
|
|
@@ -66,11 +72,13 @@
|
|
|
66
72
|
"@emotion/react": "^11.14.0",
|
|
67
73
|
"@hookform/resolvers": "^3.10.0",
|
|
68
74
|
"@knkcs/anker": "^5.20.0",
|
|
75
|
+
"@knkcs/fieldkit": "^0.18.0-rc.15",
|
|
69
76
|
"@tanstack/react-query": "^5.108.4",
|
|
70
77
|
"@tanstack/react-table": "^8.21.3",
|
|
71
78
|
"@testing-library/dom": "^10.4.2",
|
|
72
79
|
"@testing-library/jest-dom": "^6.9.1",
|
|
73
80
|
"@testing-library/react": "^16.3.3",
|
|
81
|
+
"@testing-library/user-event": "^14.6.14",
|
|
74
82
|
"@types/node": "^22.20.7",
|
|
75
83
|
"@types/react": "^19.3.3",
|
|
76
84
|
"@types/react-dom": "^19.3.0",
|