@captiveorigins/payload-plugin-onephylogeny 0.0.0-stage → 0.1.0-alpha.1
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/LICENSE +75 -0
- package/README.md +4 -2
- package/dist/index.d.ts +37 -0
- package/dist/index.js +188 -0
- package/package.json +52 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
Required Notice: Copyright 2026 Captive Origins (https://captiveorigins.com)
|
|
2
|
+
|
|
3
|
+
# PolyForm Noncommercial License 1.0.0
|
|
4
|
+
|
|
5
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
6
|
+
|
|
7
|
+
## Acceptance
|
|
8
|
+
|
|
9
|
+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
|
|
14
|
+
|
|
15
|
+
## Distribution License
|
|
16
|
+
|
|
17
|
+
The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
|
|
18
|
+
|
|
19
|
+
## Notices
|
|
20
|
+
|
|
21
|
+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
|
|
22
|
+
|
|
23
|
+
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
24
|
+
|
|
25
|
+
## Changes and New Works License
|
|
26
|
+
|
|
27
|
+
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
|
|
28
|
+
|
|
29
|
+
## Patent License
|
|
30
|
+
|
|
31
|
+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
32
|
+
|
|
33
|
+
## Noncommercial Purposes
|
|
34
|
+
|
|
35
|
+
Any noncommercial purpose is a permitted purpose.
|
|
36
|
+
|
|
37
|
+
## Personal Uses
|
|
38
|
+
|
|
39
|
+
Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
|
|
40
|
+
|
|
41
|
+
## Noncommercial Organizations
|
|
42
|
+
|
|
43
|
+
Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
|
|
44
|
+
|
|
45
|
+
## Fair Use
|
|
46
|
+
|
|
47
|
+
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
48
|
+
|
|
49
|
+
## No Other Rights
|
|
50
|
+
|
|
51
|
+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
52
|
+
|
|
53
|
+
## Patent Defense
|
|
54
|
+
|
|
55
|
+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
56
|
+
|
|
57
|
+
## Violations
|
|
58
|
+
|
|
59
|
+
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
60
|
+
|
|
61
|
+
## No Liability
|
|
62
|
+
|
|
63
|
+
***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
|
|
64
|
+
|
|
65
|
+
## Definitions
|
|
66
|
+
|
|
67
|
+
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
68
|
+
|
|
69
|
+
**You** refers to the individual or entity agreeing to these terms.
|
|
70
|
+
|
|
71
|
+
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
72
|
+
|
|
73
|
+
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
74
|
+
|
|
75
|
+
**Use** means anything you do with the software requiring one of your licenses.
|
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @captiveorigins/payload-plugin-onephylogeny
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
OnePhylogeny for Payload: immutable reference panels and released results on your own collections, with server-enforced review, safe endpoints and no coordinates.
|
|
4
|
+
|
|
5
|
+
See the [repository](https://github.com/CaptiveOrigins/onephylogeny) for documentation.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Access, Plugin } from 'payload';
|
|
2
|
+
|
|
3
|
+
type OnePhylogenyPluginOptions = {
|
|
4
|
+
/** Slugs of the collections this plugin adds. */
|
|
5
|
+
slugs?: {
|
|
6
|
+
panels?: string;
|
|
7
|
+
assignments?: string;
|
|
8
|
+
};
|
|
9
|
+
/** Host collections to relate to. Leave one out and its field isn't added, so the plugin works in any site. */
|
|
10
|
+
relations?: {
|
|
11
|
+
subject?: string;
|
|
12
|
+
sequence?: string;
|
|
13
|
+
taxa?: string;
|
|
14
|
+
files?: string;
|
|
15
|
+
importRuns?: string;
|
|
16
|
+
};
|
|
17
|
+
/** Who may create panels and results, and activate panels. Default: nobody but trusted local scripts. Activating also needs a signed-in user, who is recorded. */
|
|
18
|
+
manageAccess?: Access;
|
|
19
|
+
/** Who may approve or reject results. Default: same as manageAccess. */
|
|
20
|
+
reviewAccess?: Access;
|
|
21
|
+
/** Extra rule for reading released results, such as the host's own animal permissions. Default: signed-in users. */
|
|
22
|
+
readReleasedAccess?: Access;
|
|
23
|
+
/** Field added to assignments for multi-tenant hosts' isolation plugins to find. */
|
|
24
|
+
group?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Which panels results may be made against. `activeOrShown` also allows a `candidate` a maintainer ticked "shown as
|
|
27
|
+
* exploratory", and lets readers see such candidates. Default: `active`.
|
|
28
|
+
*/
|
|
29
|
+
resultsAgainst?: 'active' | 'activeOrShown';
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* OnePhylogeny for Payload. Adds immutable panels and reviewed results, relating to whatever collections a site already
|
|
33
|
+
* has. It holds no species knowledge. Compute happens elsewhere: this stores what was computed and controls release.
|
|
34
|
+
*/
|
|
35
|
+
declare const onePhylogeny: (options?: OnePhylogenyPluginOptions) => Plugin;
|
|
36
|
+
|
|
37
|
+
export { type OnePhylogenyPluginOptions, onePhylogeny };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { validateResult } from "@captiveorigins/onephylogeny-core";
|
|
3
|
+
import { APIError } from "payload";
|
|
4
|
+
var PANEL_TRANSITIONS = { candidate: ["active", "withdrawn"], active: ["superseded", "withdrawn"], superseded: ["withdrawn"], withdrawn: [] };
|
|
5
|
+
var LOCKED_PANEL_FIELDS = ["key", "version", "marker", "checksum", "artifact", "importRun", "taxa", "groups", "notCovered", "validatedScope"];
|
|
6
|
+
var REVIEW_TRANSITIONS = { pending: ["approved", "rejected"], approved: ["withdrawn"], rejected: [], withdrawn: [] };
|
|
7
|
+
var COORDINATES = /^(lat|lon|lng|latitude|longitude|latlon|lat_lon|coordinates?)$/i;
|
|
8
|
+
var hasCoordinates = (value) => {
|
|
9
|
+
if (Array.isArray(value)) return value.some(hasCoordinates);
|
|
10
|
+
if (!value || typeof value !== "object") return false;
|
|
11
|
+
return Object.entries(value).some(([k, v]) => COORDINATES.test(k) || hasCoordinates(v));
|
|
12
|
+
};
|
|
13
|
+
var fail = (message) => {
|
|
14
|
+
throw new APIError(message, 400, void 0, true);
|
|
15
|
+
};
|
|
16
|
+
var idOf = (v) => v && typeof v === "object" ? String(v.id) : v == null ? void 0 : String(v);
|
|
17
|
+
var same = (a, b) => JSON.stringify(a ?? null) === JSON.stringify(b ?? null);
|
|
18
|
+
var stripIds = (rows) => Array.isArray(rows) ? rows.map((r) => {
|
|
19
|
+
const { id: _id, ...rest } = r;
|
|
20
|
+
return rest;
|
|
21
|
+
}) : rows;
|
|
22
|
+
var stamp = (v) => v == null || v === "" ? "" : v instanceof Date ? v.toISOString() : String(v);
|
|
23
|
+
var ACTIVATION_FIELDS = ["activatedBy", "activatedAt"];
|
|
24
|
+
var panelBeforeChange = ({ data, originalDoc, operation, req }) => {
|
|
25
|
+
const leaving = operation === "update" && String(data.status ?? originalDoc.status) !== "candidate";
|
|
26
|
+
if (leaving) {
|
|
27
|
+
if (data.shownAsExploratory === true && String(originalDoc.status) !== "candidate") fail("Only a candidate panel can be shown as exploratory.");
|
|
28
|
+
data.shownAsExploratory = false;
|
|
29
|
+
}
|
|
30
|
+
if (hasCoordinates(data.groups)) fail("Panels use generalized regions and never hold coordinates.");
|
|
31
|
+
if (operation === "create") {
|
|
32
|
+
if ((data.status ?? "candidate") !== "candidate") fail("A new panel starts as a candidate.");
|
|
33
|
+
if (ACTIVATION_FIELDS.some((f) => stamp(data[f]))) fail("Who activated a panel, and when, are set by activating.");
|
|
34
|
+
return data;
|
|
35
|
+
}
|
|
36
|
+
const from = String(originalDoc.status);
|
|
37
|
+
const to = String(data.status ?? from);
|
|
38
|
+
if (to !== from && !PANEL_TRANSITIONS[from]?.includes(to)) fail(`A panel can't go from ${from} to ${to}.`);
|
|
39
|
+
if (from === "candidate" && to === "active") {
|
|
40
|
+
if (!(data.validatedScope ?? originalDoc.validatedScope)?.length) fail("A panel with no validated claims can't become active.");
|
|
41
|
+
if (!req.user) fail("Activating a panel needs a signed-in person, who is recorded.");
|
|
42
|
+
data.activatedBy = String(req.user.id);
|
|
43
|
+
data.activatedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
44
|
+
} else if (ACTIVATION_FIELDS.some((f) => f in data && stamp(data[f]) !== stamp(originalDoc[f]))) {
|
|
45
|
+
fail("Who activated a panel, and when, are set by activating.");
|
|
46
|
+
}
|
|
47
|
+
if (from !== "candidate") {
|
|
48
|
+
for (const f of LOCKED_PANEL_FIELDS) {
|
|
49
|
+
if (!(f in data)) continue;
|
|
50
|
+
const changed = f === "groups" ? !same(stripIds(data[f]), stripIds(originalDoc[f])) : Array.isArray(data[f]) ? !same(data[f].map(idOf), (originalDoc[f] ?? []).map(idOf)) : idOf(data[f]) !== idOf(originalDoc[f]);
|
|
51
|
+
if (changed) fail(`A ${from} panel can't be edited. Build a new version instead.`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return data;
|
|
55
|
+
};
|
|
56
|
+
var supersedeOthers = (panels) => async ({ doc, previousDoc, req }) => {
|
|
57
|
+
if (doc.status !== "active" || previousDoc?.status === "active") return doc;
|
|
58
|
+
const others = await req.payload.find({ collection: panels, where: { and: [{ key: { equals: doc.key } }, { status: { equals: "active" } }, { id: { not_equals: doc.id } }] }, limit: 100, depth: 0, req, overrideAccess: true });
|
|
59
|
+
for (const other of others.docs) await req.payload.update({ collection: panels, id: other.id, data: { status: "superseded" }, req, overrideAccess: true });
|
|
60
|
+
return doc;
|
|
61
|
+
};
|
|
62
|
+
var assignmentBeforeChange = (panels, againstShown) => async ({ data, originalDoc, operation, req }) => {
|
|
63
|
+
if (operation === "create") {
|
|
64
|
+
if ((data.reviewStatus ?? "pending") !== "pending") fail("A new result starts as pending review.");
|
|
65
|
+
const panel = await req.payload.findByID({ collection: panels, id: idOf(data.panel), depth: 0, req, overrideAccess: true });
|
|
66
|
+
const shown = panel.status === "candidate" && panel.shownAsExploratory === true;
|
|
67
|
+
if (panel.status !== "active" && !(againstShown && shown)) fail(againstShown ? "Results can only be made against an active panel, or a candidate shown as exploratory." : "Results can only be made against an active panel.");
|
|
68
|
+
data.panelStatus = panel.status;
|
|
69
|
+
data.panelShownAsExploratory = shown;
|
|
70
|
+
const result = data.result;
|
|
71
|
+
const problems = validateResult(result).filter((d) => d.severity === "error");
|
|
72
|
+
if (problems.length) fail(problems.map((p) => p.message).join("; "));
|
|
73
|
+
if (result.panel.version !== panel.version || result.panel.checksum !== panel.checksum) fail("This result was not made with this panel version.");
|
|
74
|
+
const found = new Set(result.findings.map((f) => f.group));
|
|
75
|
+
const missing = (panel.groups ?? []).filter((g) => !found.has(g.groupId)).map((g) => g.groupId);
|
|
76
|
+
if (missing.length) fail(`Every group must be reported. Missing: ${missing.join(", ")}.`);
|
|
77
|
+
if (hasCoordinates(result)) fail("Results never hold coordinates.");
|
|
78
|
+
return data;
|
|
79
|
+
}
|
|
80
|
+
const from = String(originalDoc.reviewStatus);
|
|
81
|
+
const to = String(data.reviewStatus ?? from);
|
|
82
|
+
for (const f of ["result", "panel", "sequence", "subject", "summary", "importRun"]) {
|
|
83
|
+
if (f in data && (f === "result" || f === "summary" ? !same(data[f], originalDoc[f]) : idOf(data[f]) !== idOf(originalDoc[f]))) fail("A result can't be edited. Make a new one instead.");
|
|
84
|
+
}
|
|
85
|
+
for (const f of ["panelStatus", "panelShownAsExploratory"]) {
|
|
86
|
+
if (f in data && !same(data[f], originalDoc[f])) fail("The panel status a result was made against is set when it is made.");
|
|
87
|
+
}
|
|
88
|
+
if (to !== from) {
|
|
89
|
+
if (!REVIEW_TRANSITIONS[from]?.includes(to)) fail(`A result can't go from ${from} to ${to}.`);
|
|
90
|
+
if (to === "approved") {
|
|
91
|
+
if (!req.user) fail("Approving a result needs a signed-in reviewer.");
|
|
92
|
+
data.reviewer = String(req.user.id);
|
|
93
|
+
data.releasedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
94
|
+
}
|
|
95
|
+
} else {
|
|
96
|
+
if ("reviewer" in data && data.reviewer !== originalDoc.reviewer) fail("The reviewer is set by approving.");
|
|
97
|
+
if ("releasedAt" in data && String(data.releasedAt) !== String(originalDoc.releasedAt)) fail("The release date is set by approving.");
|
|
98
|
+
}
|
|
99
|
+
return data;
|
|
100
|
+
};
|
|
101
|
+
var relation = (name, relationTo, extra = {}) => relationTo ? [{ name, type: "relationship", relationTo, index: true, ...extra }] : [];
|
|
102
|
+
var onePhylogeny = (options = {}) => (config) => {
|
|
103
|
+
const panels = options.slugs?.panels ?? "panels";
|
|
104
|
+
const assignments = options.slugs?.assignments ?? "assignments";
|
|
105
|
+
const r = options.relations ?? {};
|
|
106
|
+
const group = options.group ?? "Genetics";
|
|
107
|
+
const manage = options.manageAccess ?? (() => false);
|
|
108
|
+
const review = options.reviewAccess ?? manage;
|
|
109
|
+
const readReleased = options.readReleasedAccess ?? (({ req }) => Boolean(req.user));
|
|
110
|
+
const againstShown = options.resultsAgainst === "activeOrShown";
|
|
111
|
+
const panelCollection = {
|
|
112
|
+
slug: panels,
|
|
113
|
+
labels: { singular: "Reference panel", plural: "Reference panels" },
|
|
114
|
+
admin: { group, useAsTitle: "key", defaultColumns: ["key", "version", "status", "marker"] },
|
|
115
|
+
access: {
|
|
116
|
+
read: async (args) => {
|
|
117
|
+
if (await manage(args)) return true;
|
|
118
|
+
const published = { status: { in: ["active", "superseded"] } };
|
|
119
|
+
return againstShown ? { or: [published, { and: [{ status: { equals: "candidate" } }, { shownAsExploratory: { equals: true } }] }] } : published;
|
|
120
|
+
},
|
|
121
|
+
create: manage,
|
|
122
|
+
update: manage,
|
|
123
|
+
delete: () => false
|
|
124
|
+
},
|
|
125
|
+
fields: [
|
|
126
|
+
{ name: "key", type: "text", required: true, index: true, admin: { description: "Stays the same across versions of one panel." } },
|
|
127
|
+
{ name: "version", type: "text", required: true },
|
|
128
|
+
{ name: "status", type: "select", required: true, defaultValue: "candidate", index: true, options: ["candidate", "active", "superseded", "withdrawn"] },
|
|
129
|
+
{ name: "shownAsExploratory", type: "checkbox", defaultValue: false, index: true, admin: { description: "Show this candidate as exploratory, before review. Only candidates; cleared when it moves on." } },
|
|
130
|
+
{ name: "marker", type: "text", required: true },
|
|
131
|
+
{ name: "checksum", type: "text", required: true, index: true },
|
|
132
|
+
...relation("taxa", r.taxa, { hasMany: true }),
|
|
133
|
+
...relation("artifact", r.files, { admin: { description: "The full panel: JSON manifest and sequences." } }),
|
|
134
|
+
...relation("importRun", r.importRuns),
|
|
135
|
+
{ name: "validatedScope", type: "text", hasMany: true, admin: { description: "The claims this panel is validated for. Pages show only these." } },
|
|
136
|
+
{ name: "notCovered", type: "text", hasMany: true },
|
|
137
|
+
{ name: "groups", type: "array", fields: [{ name: "groupId", type: "text", required: true }, { name: "label", type: "text", required: true }, { name: "regionName", type: "text", admin: { description: "A general region, never coordinates." } }] },
|
|
138
|
+
{ name: "activatedBy", type: "text", admin: { readOnly: true, description: "The signed-in user who activated this panel. Set by activating." } },
|
|
139
|
+
{ name: "activatedAt", type: "date", admin: { readOnly: true } }
|
|
140
|
+
],
|
|
141
|
+
hooks: { beforeChange: [panelBeforeChange], afterChange: [supersedeOthers(panels)] }
|
|
142
|
+
};
|
|
143
|
+
const assignmentCollection = {
|
|
144
|
+
slug: assignments,
|
|
145
|
+
labels: { singular: "Lineage result", plural: "Lineage results" },
|
|
146
|
+
admin: { group, useAsTitle: "summary", defaultColumns: ["summary", "panel", "reviewStatus", "releasedAt"] },
|
|
147
|
+
access: {
|
|
148
|
+
read: async (args) => {
|
|
149
|
+
if (await manage(args) || await review(args)) return true;
|
|
150
|
+
const allowed = await readReleased(args);
|
|
151
|
+
if (!allowed) return false;
|
|
152
|
+
const released2 = { reviewStatus: { equals: "approved" } };
|
|
153
|
+
return allowed === true ? released2 : { and: [released2, allowed] };
|
|
154
|
+
},
|
|
155
|
+
create: manage,
|
|
156
|
+
update: review,
|
|
157
|
+
delete: () => false
|
|
158
|
+
},
|
|
159
|
+
fields: [
|
|
160
|
+
...relation("subject", r.subject),
|
|
161
|
+
...relation("sequence", r.sequence),
|
|
162
|
+
{ name: "panel", type: "relationship", relationTo: panels, required: true, index: true },
|
|
163
|
+
{ name: "summary", type: "text", required: true },
|
|
164
|
+
{ name: "result", type: "json", required: true, admin: { description: "The OnePhylogeny result, stored exactly as computed." } },
|
|
165
|
+
...relation("importRun", r.importRuns),
|
|
166
|
+
{ name: "reviewStatus", type: "select", required: true, defaultValue: "pending", index: true, options: ["pending", "approved", "rejected", "withdrawn"] },
|
|
167
|
+
{ name: "reviewer", type: "text", admin: { readOnly: true } },
|
|
168
|
+
{ name: "releasedAt", type: "date", admin: { readOnly: true } },
|
|
169
|
+
{ name: "panelStatus", type: "text", admin: { readOnly: true, description: "The panel's status when this result was made." } },
|
|
170
|
+
{ name: "panelShownAsExploratory", type: "checkbox", admin: { readOnly: true } }
|
|
171
|
+
],
|
|
172
|
+
hooks: { beforeChange: [assignmentBeforeChange(panels, againstShown)] }
|
|
173
|
+
};
|
|
174
|
+
const released = {
|
|
175
|
+
path: "/onephylogeny/released",
|
|
176
|
+
method: "get",
|
|
177
|
+
handler: async (req) => {
|
|
178
|
+
const subject = new URL(req.url ?? "", "http://x").searchParams.get("subject");
|
|
179
|
+
if (!subject || !r.subject) return Response.json({ error: "A subject is required" }, { status: 400 });
|
|
180
|
+
const found = await req.payload.find({ collection: assignments, where: { and: [{ subject: { equals: subject } }, { reviewStatus: { equals: "approved" } }] }, sort: "-releasedAt", limit: 20, depth: 1, req, overrideAccess: false });
|
|
181
|
+
return Response.json({ docs: found.docs });
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
return { ...config, collections: [...config.collections ?? [], panelCollection, assignmentCollection], endpoints: [...config.endpoints ?? [], released] };
|
|
185
|
+
};
|
|
186
|
+
export {
|
|
187
|
+
onePhylogeny
|
|
188
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@captiveorigins/payload-plugin-onephylogeny",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0-alpha.1",
|
|
4
|
+
"description": "OnePhylogeny for Payload: immutable reference panels and released results on your own collections, with server-enforced review, safe endpoints and no coordinates.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"phylogenetics",
|
|
7
|
+
"reference-panel"
|
|
8
|
+
],
|
|
9
|
+
"homepage": "https://github.com/CaptiveOrigins/onephylogeny#readme",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/CaptiveOrigins/onephylogeny/issues"
|
|
12
|
+
},
|
|
13
|
+
"license": "PolyForm-Noncommercial-1.0.0",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/CaptiveOrigins/onephylogeny.git",
|
|
17
|
+
"directory": "packages/payload"
|
|
18
|
+
},
|
|
19
|
+
"type": "module",
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"import": "./dist/index.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"main": "./dist/index.js",
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"files": [
|
|
30
|
+
"dist",
|
|
31
|
+
"README.md",
|
|
32
|
+
"LICENSE"
|
|
33
|
+
],
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=22"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@captiveorigins/onephylogeny-core": "^0.1.0-alpha.1"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"payload": "^3.80.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@payloadcms/db-mongodb": "3.92.1",
|
|
45
|
+
"graphql": "^16.14.2",
|
|
46
|
+
"mongodb-memory-server": "^11.3.0",
|
|
47
|
+
"payload": "^3.92.1",
|
|
48
|
+
"@types/node": "^24.19.2"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "tsup src/index.ts --format esm --dts --clean --target es2022",
|
|
52
|
+
"typecheck": "tsc --noEmit",
|
|
53
|
+
"test": "vitest run"
|
|
54
|
+
}
|
|
6
55
|
}
|