arocapi 1.0.3 → 1.0.5

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/README.md CHANGED
@@ -1,16 +1,11 @@
1
- [RO-Crate]: https://www.researchobject.org/ro-crate/specification
2
- [OCFL]: https://ocfl.io/
3
- [PILARS]: https://w3id.org/ldac/pilars
4
- [REMS]: https://trust.aaf.edu.au/rems/
5
1
 
6
-
7
- # An RO-Crate API for Data Collections : Arocapi
2
+ # An RO-Crate API for Data Collections : Arocapi
8
3
 
9
4
  This project is a prototype implementation of an RO-Crate based collections archive and data portal based on the Portland Common Data model of collections suitable use in long-term archival repository systems that aim to follow the Protocols for Long Term Archival Repository Services ([PILARS]) <https://w3id.org/ldac/pilars>.
10
5
 
11
6
  The aim is to provide an API-centred reference implementation of a repository with an access-controlled web portal for data dissemination and deposit:
12
7
 
13
- - Backend-agnostic RO-Crate storage using pluggable storage-layers
8
+ - Backend-agnostic RO-Crate storage using pluggable storage-layers
14
9
  - [OCFL] - the Oxford Common File Layout specification on disk or cloud-based object storage
15
10
  - Object Storage as used in [PARADISEC]
16
11
  - A simple RO-Crate file layout (TODO - likely a super-simple protocol for directory hierarchy with the presense on RO-Crate used to indicate that everythig under that directory is a single RO-Crate)
@@ -18,8 +13,6 @@ The aim is to provide an API-centred reference implementation of a repository wi
18
13
  - Based on the princuple that all data MUST have a implementation-neutral natural-language description of its access conditiions stored with it
19
14
  - Licenses may be based on 'traditional' access control lists maintained in software such as PARADISEC or a license manager such as REMS, (TODO: an example implementation using github groups to manage license access, a simple ACL manager?)).
20
15
 
21
-
22
-
23
16
  ## Getting started
24
17
 
25
18
  This project was bootstrapped with [Fastify-CLI](https://www.npmjs.com/package/fastify-cli)
@@ -32,7 +25,9 @@ docker compose up
32
25
 
33
26
  # Generate db client
34
27
  npx prisma generate
35
- npx prisma migrate dev
28
+
29
+ # Apply db migrations
30
+ npx prisma migrate deploy
36
31
 
37
32
  # Run the app
38
33
  pnpm run dev
@@ -59,6 +54,11 @@ Run the test cases.
59
54
 
60
55
  Connect to mysql console
61
56
 
62
- ## Learn More
57
+ ## Resources
58
+
59
+ - [RO-Crate](https://www.researchobject.org/ro-crate/specification)
60
+ - [OCFL](https://ocfl.io/)
61
+ - [PILARS](https://w3id.org/ldac/pilars)
62
+ - [REMS](https://trust.aaf.edu.au/rems/)
63
63
 
64
64
  To learn Fastify, check out the [Fastify documentation](https://fastify.dev/docs/latest/).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "arocapi",
4
- "version": "1.0.3",
4
+ "version": "1.0.5",
5
5
  "description": "An RO-Crate API",
6
6
  "main": "dist/app.js",
7
7
  "exports": {
@@ -20,6 +20,7 @@
20
20
  "@fastify/routes": "^6.0.2",
21
21
  "@fastify/sensible": "^6.0.0",
22
22
  "@opensearch-project/opensearch": "^3.5.1",
23
+ "@prisma/config": "^6.14.0",
23
24
  "dotenv": "^17.2.1",
24
25
  "express": "^5.1.0",
25
26
  "fastify": "^5.4.0",
@@ -69,7 +70,9 @@
69
70
  "lint:types": "tsc --noEmit",
70
71
  "prepublishOnly": "npm run lint:biome && npm run lint:types && npm run build:ts",
71
72
  "generate": "npx prisma generate",
72
- "postinstall": "npm run generate"
73
+ "postinstall": "npm run generate",
74
+ "db:generate": "prisma generate",
75
+ "db:migrate": "prisma migrate deploy"
73
76
  },
74
77
  "repository": {
75
78
  "type": "git",
@@ -0,0 +1,17 @@
1
+ model Entity {
2
+ id Int @id @default(autoincrement())
3
+ rocrateId String @db.VarChar(2048)
4
+ name String @db.VarChar(1024)
5
+ description String @db.Text
6
+ conformsTo String @db.VarChar(2048)
7
+ // NOTE: How should we do recordType, can we infer it from conformsTo?
8
+ // recordType String??
9
+ memberOf String? @db.VarChar(2048)
10
+ root String? @db.VarChar(2048)
11
+ /// RecordType[]
12
+ recordType Json
13
+ rocrate Json
14
+
15
+ createdAt DateTime @default(now())
16
+ updatedAt DateTime @updatedAt
17
+ }