Skip to content

Refactor all .mjs files to .js and update imports. Closes #194#228

Merged
cubap merged 33 commits intodevelopmentfrom
refactor-mjs-to-js
Apr 29, 2025
Merged

Refactor all .mjs files to .js and update imports. Closes #194#228
cubap merged 33 commits intodevelopmentfrom
refactor-mjs-to-js

Conversation

@cubap
Copy link
Member

@cubap cubap commented Apr 28, 2025

No description provided.

@cubap cubap changed the base branch from main to development April 28, 2025 15:01
@cubap cubap marked this pull request as ready for review April 29, 2025 15:40
@cubap cubap requested review from mepripri and thehabes as code owners April 29, 2025 15:40
@cubap
Copy link
Member Author

cubap commented Apr 29, 2025

Forcing @thehabes review to be in the affirmative so @git-voo can start convalescing

@cubap cubap merged commit 20ce23c into development Apr 29, 2025
3 checks passed
@cubap cubap deleted the refactor-mjs-to-js branch April 29, 2025 20:59
thehabes added a commit that referenced this pull request May 12, 2025
* update metadata (#171)

* update metadata

* modify route name and db.update

* update db.update dependent

* cleanup

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* quickfix

* cleanup

* modify db.update to receive one param {data, collection}

* nodiff

* restore action(data, collection) structure

* undiff

* Changed Collections Parameter for Save()

* Removing /:id put Call

* Removing the Limit from express.json()

* Removing the Limit from express.json()

* getting started with Vault (#190)

* getting started with Vault

* newer Vault

* tests

* removing redundant code

* proper tests passing

* sample Vault

* Bryan's refusal to .jsonld makes this not work as expected

* loading resources

This is incomplete by design. We need to ask Vault to add any resources we want resolved

* expanding the Manifest a bit

* touch up for merge

* touch up for merge

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Current Project IIIF manifest Creation (#187)

* Current Project IIIF manifest Creation

* Refactored the exportManifest() and endpoint name

* Changed the exportManifest() function

* TPEN ID error handled

* endpoint to move the manifest.json to TPEN-Static-Dev

* Changed @id to id

* Getting all Ids

* Console Clean up

* Added env variables

* Adding Imports

* Adding Imports

* Deleting Ids

* Updating Logic Added

* User not a member cannot change the manifest

* Removing project2

* Adding comments to functions

* add hotkeys service (#184)

* add hotkeys service

* hotkey endpoints

* aggregate hotkeys during project retrieval

* specify hotkey fields to include

* cleanup

* Update Hotkeys.js

* Update ProjectFactory.mjs

* Return hotkeys as an Array of Strings

* aligning with Class changes

* remove create, since .save is not acting correctly

* cleanup and drop .post

* tests restored

no Jest here, just checking exists.

* tests and sinon upgrade

* no db tests directly

* Update exists_unit.test.mjs

* putting post back in...

* adding create back with safety

* adding upsert to accomodate bad errors

* Update Hotkeys.js

* uncatch to let errors through

* expect the  errors to come back

* switch to jest tests

---------

Co-authored-by: cubap <cubap@slu.edu>

* hotifx

* hotfix for symbols.

* delete enabled

* Create API.md

* collaborators and users

* add markdown reader

* package for markdown

* Update API.md

* Update API.md

* touch

* ah codes

* proxy for internal use (#201)

* Endpoint to save changes for the new layer (#199)

* Adding endpoint to save changes from the layer

* Adding New Layer

* No Empty Label and no Annotations

* Updated new Layer

* Adding Items to partOf

* Changing id convention

* Removing updating layer

* Annotation Change

* Adding Delete Endpoint

* not sure...

This type of thing?

* Label Change

* Added Layer Class

* Adding rerum ids to delete and add

* Changing tests

* Update exists.test.mjs

* Changing LayerLabel

* Changes AnnotationCollection Structure

* Update Pages API

* Updating partOf Ids in case of any change

* Adding Layer Metadata Label Change

* example results as a base for comments, delete these files before merge.

* Adding AddLayer Commenting Rest of the APIs

* Added DeleteLayer Back

* Deleting json files

* Updates to the comments

* Making Project to Layer Changes

* Renaming layerAnnotationCollection

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Error Handled for no ProjectID or LayerID

* Clear Code

* send() instead of json()

---------

Co-authored-by: cubap <cubap@slu.edu>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Create sample.env

* Update sample.env

GitHub per @mepripri

* Update CODEOWNERS

* dev it and hotkeys

* 188 epic middleware to upgrade imported manifests (#209)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* 139 factor out type type dependencies (#211)

* determine data type by content

* Removing type dependencies

- Took controller and type out of controller
- Added a function to detect the data types and assign the correct collection

* matching tests to code move

* align with main

* Update driver.mjs (#217)

* 188 epic middleware to upgrade imported manifests (#218)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* rename redone

* This is Vault now

* test objects don't validate

* hulk smash 👊🏽

* _sub is no longer missing on invitees

* add temp sub to new user

* Update cd_dev.yaml

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Removing fileSystem from Github API (#214)

* Removing fileSystem from Github API

* Update ProjectFactory.mjs

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 220 services for bug reporting and feedback (#221)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* cicd (#222)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* 220 services for bug reporting and feedback (#224)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* explicitly adding CORS

* API call to Update Profile (#223)

* API call to Update Profile

* existingEmail and existingName

* Changes to comments

* Update User.mjs

* Save AnnotationCollection, Pages and Annotations to RERUM (#215)

* saveCollection to RERUM

* Adding Tinypen to Create RERUM Object

* Update exists.test.mjs

* Update exists.test.mjs

* Update Page.mjs

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* starting some adjustments

* better the tests

* headed home

* multiple ways to extract the data

* retest with suggestions

* layer/page halos

* percolating deletes

* setting up routes

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Import TPEN28 (#226)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Test restoration (#229)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* cleanup missing properties, changed method names

* just this route

* id shouldn't be optional here.

out of date test files dropped

* This should never break. What's up?

* bad merge

* Update exists_unit.test.mjs

* test is ugly

The page router needs a projectId as well to actually work

* Update end_to_end_unit.test.mjs

These two cannot work without a corresponding project, so it will need to be rewritten

* nested in router now

* Update exists.test.mjs

* un-mjs

* Refactor all .mjs files to .js and update imports. Closes #194 (#228)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Refactor all .mjs files to .js and update imports. Closes #194

* un-mjs

* npm update

* Hey I heard you like tests, so I put tests in your tests

* mjs > js

* no mjs, bad mjs

* fine

* habesroxx

* how bout now

* hide, Jest is coming

* runner love

* Update package-lock.json

* jest no like to run

* null != undefined

* default not defaulting

* fixes "id is not defined"

shoulda wrote test for this

* out of scope, out of effs

---------

Co-authored-by: Priyal Patel <mepripri0712@gmail.com>

* Update package-lock.json

* Using UID to get User Projects

* Update index.mjs

* no label is fine for Pages

* Origin Fetch

* SetHeader Origin

* Update index.js

* Getting User Projects (#237)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Using UID to get User Projects

* Update index.mjs

* Origin Fetch

* SetHeader Origin

* Update index.js

* Update index.js

* Update index.js

* Localhost URLS Validating (#242)

* Update index.js

* Update index.js

* Update validateURL.js

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* 231 create overwrite layer (#239)

* passing through the projectID

* some tests

* support page

* path in Page class generator

* no label is fine for Pages

* updating layers

* AI generated tests

* Update API.md

* oh auth.

* how'd we miss this?

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* just skip to move on

* Update Layer.js

* Update index.js

* merged mess unwrap

* dummy

* Update Project.js

* handle labels throughout

* unerring

* update layer organized

* return changes

* avoid hard crash

* prevent crash on a page 404

* full id

After I PUT a new label (this was successful) the "id" on the layer the db obj does not the the prefix and is just the hash.

* you get it

* vaildate all singular changes

* greedier try-catch

* Squashed commit of the following:

commit 44b75cf
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef45
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f977234
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c30
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec198
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* 422 if no pages are there.

* Update index.js

* Update index.js

* API entries

* typo

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* remove unused file

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>
thehabes added a commit that referenced this pull request May 16, 2025
* Development (#234)

* update metadata (#171)

* update metadata

* modify route name and db.update

* update db.update dependent

* cleanup

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* quickfix

* cleanup

* modify db.update to receive one param {data, collection}

* nodiff

* restore action(data, collection) structure

* undiff

* Changed Collections Parameter for Save()

* Removing /:id put Call

* Removing the Limit from express.json()

* Removing the Limit from express.json()

* getting started with Vault (#190)

* getting started with Vault

* newer Vault

* tests

* removing redundant code

* proper tests passing

* sample Vault

* Bryan's refusal to .jsonld makes this not work as expected

* loading resources

This is incomplete by design. We need to ask Vault to add any resources we want resolved

* expanding the Manifest a bit

* touch up for merge

* touch up for merge

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Current Project IIIF manifest Creation (#187)

* Current Project IIIF manifest Creation

* Refactored the exportManifest() and endpoint name

* Changed the exportManifest() function

* TPEN ID error handled

* endpoint to move the manifest.json to TPEN-Static-Dev

* Changed @id to id

* Getting all Ids

* Console Clean up

* Added env variables

* Adding Imports

* Adding Imports

* Deleting Ids

* Updating Logic Added

* User not a member cannot change the manifest

* Removing project2

* Adding comments to functions

* add hotkeys service (#184)

* add hotkeys service

* hotkey endpoints

* aggregate hotkeys during project retrieval

* specify hotkey fields to include

* cleanup

* Update Hotkeys.js

* Update ProjectFactory.mjs

* Return hotkeys as an Array of Strings

* aligning with Class changes

* remove create, since .save is not acting correctly

* cleanup and drop .post

* tests restored

no Jest here, just checking exists.

* tests and sinon upgrade

* no db tests directly

* Update exists_unit.test.mjs

* putting post back in...

* adding create back with safety

* adding upsert to accomodate bad errors

* Update Hotkeys.js

* uncatch to let errors through

* expect the  errors to come back

* switch to jest tests

---------

Co-authored-by: cubap <cubap@slu.edu>

* hotifx

* hotfix for symbols.

* delete enabled

* Create API.md

* collaborators and users

* add markdown reader

* package for markdown

* Update API.md

* Update API.md

* touch

* ah codes

* proxy for internal use (#201)

* Endpoint to save changes for the new layer (#199)

* Adding endpoint to save changes from the layer

* Adding New Layer

* No Empty Label and no Annotations

* Updated new Layer

* Adding Items to partOf

* Changing id convention

* Removing updating layer

* Annotation Change

* Adding Delete Endpoint

* not sure...

This type of thing?

* Label Change

* Added Layer Class

* Adding rerum ids to delete and add

* Changing tests

* Update exists.test.mjs

* Changing LayerLabel

* Changes AnnotationCollection Structure

* Update Pages API

* Updating partOf Ids in case of any change

* Adding Layer Metadata Label Change

* example results as a base for comments, delete these files before merge.

* Adding AddLayer Commenting Rest of the APIs

* Added DeleteLayer Back

* Deleting json files

* Updates to the comments

* Making Project to Layer Changes

* Renaming layerAnnotationCollection

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Error Handled for no ProjectID or LayerID

* Clear Code

* send() instead of json()

---------

Co-authored-by: cubap <cubap@slu.edu>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Create sample.env

* Update sample.env

GitHub per @mepripri

* Update CODEOWNERS

* dev it and hotkeys

* 188 epic middleware to upgrade imported manifests (#209)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* 139 factor out type type dependencies (#211)

* determine data type by content

* Removing type dependencies

- Took controller and type out of controller
- Added a function to detect the data types and assign the correct collection

* matching tests to code move

* align with main

* Update driver.mjs (#217)

* 188 epic middleware to upgrade imported manifests (#218)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* rename redone

* This is Vault now

* test objects don't validate

* hulk smash 👊🏽

* _sub is no longer missing on invitees

* add temp sub to new user

* Update cd_dev.yaml

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Removing fileSystem from Github API (#214)

* Removing fileSystem from Github API

* Update ProjectFactory.mjs

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 220 services for bug reporting and feedback (#221)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* cicd (#222)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* 220 services for bug reporting and feedback (#224)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* explicitly adding CORS

* API call to Update Profile (#223)

* API call to Update Profile

* existingEmail and existingName

* Changes to comments

* Update User.mjs

* Save AnnotationCollection, Pages and Annotations to RERUM (#215)

* saveCollection to RERUM

* Adding Tinypen to Create RERUM Object

* Update exists.test.mjs

* Update exists.test.mjs

* Update Page.mjs

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* starting some adjustments

* better the tests

* headed home

* multiple ways to extract the data

* retest with suggestions

* layer/page halos

* percolating deletes

* setting up routes

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Import TPEN28 (#226)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Test restoration (#229)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* cleanup missing properties, changed method names

* just this route

* id shouldn't be optional here.

out of date test files dropped

* This should never break. What's up?

* bad merge

* Update exists_unit.test.mjs

* test is ugly

The page router needs a projectId as well to actually work

* Update end_to_end_unit.test.mjs

These two cannot work without a corresponding project, so it will need to be rewritten

* nested in router now

* Update exists.test.mjs

* un-mjs

* Refactor all .mjs files to .js and update imports. Closes #194 (#228)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Refactor all .mjs files to .js and update imports. Closes #194

* un-mjs

* npm update

* Hey I heard you like tests, so I put tests in your tests

* mjs > js

* no mjs, bad mjs

* fine

* habesroxx

* how bout now

* hide, Jest is coming

* runner love

* Update package-lock.json

* jest no like to run

* null != undefined

* default not defaulting

* fixes "id is not defined"

shoulda wrote test for this

* out of scope, out of effs

---------

Co-authored-by: Priyal Patel <mepripri0712@gmail.com>

* Update package-lock.json

* Using UID to get User Projects

* Update index.mjs

* no label is fine for Pages

* Origin Fetch

* SetHeader Origin

* Update index.js

* Getting User Projects (#237)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Using UID to get User Projects

* Update index.mjs

* Origin Fetch

* SetHeader Origin

* Update index.js

* Update index.js

* Update index.js

* Localhost URLS Validating (#242)

* Update index.js

* Update index.js

* Update validateURL.js

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* 231 create overwrite layer (#239)

* passing through the projectID

* some tests

* support page

* path in Page class generator

* no label is fine for Pages

* updating layers

* AI generated tests

* Update API.md

* oh auth.

* how'd we miss this?

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* just skip to move on

* Update Layer.js

* Update index.js

* merged mess unwrap

* dummy

* Update Project.js

* handle labels throughout

* unerring

* update layer organized

* return changes

* avoid hard crash

* prevent crash on a page 404

* full id

After I PUT a new label (this was successful) the "id" on the layer the db obj does not the the prefix and is just the hash.

* you get it

* vaildate all singular changes

* greedier try-catch

* Squashed commit of the following:

commit 44b75cf
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef45
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f977234
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c30
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec198
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* 422 if no pages are there.

* Update index.js

* Update index.js

* API entries

* typo

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* remove unused file

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>

* creating separate files

* cleanup imports

* yuck. This wasn't even AI - it just autocompleted to CJS

* more jest nonsense

* Final attempt

This runs but doesn't pass `allTests`

* Update exists_unit.test.js

* new Put for page at a time updates

* put update

for batch items

Update Line.js

Update Line.js

always set rerumid

save pageAndProject

* auth  fixes for testing

* Update index.js

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>
cubap added a commit that referenced this pull request Aug 7, 2025
* Development (#234)

* update metadata (#171)

* update metadata

* modify route name and db.update

* update db.update dependent

* cleanup

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* quickfix

* cleanup

* modify db.update to receive one param {data, collection}

* nodiff

* restore action(data, collection) structure

* undiff

* Changed Collections Parameter for Save()

* Removing /:id put Call

* Removing the Limit from express.json()

* Removing the Limit from express.json()

* getting started with Vault (#190)

* getting started with Vault

* newer Vault

* tests

* removing redundant code

* proper tests passing

* sample Vault

* Bryan's refusal to .jsonld makes this not work as expected

* loading resources

This is incomplete by design. We need to ask Vault to add any resources we want resolved

* expanding the Manifest a bit

* touch up for merge

* touch up for merge

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Current Project IIIF manifest Creation (#187)

* Current Project IIIF manifest Creation

* Refactored the exportManifest() and endpoint name

* Changed the exportManifest() function

* TPEN ID error handled

* endpoint to move the manifest.json to TPEN-Static-Dev

* Changed @id to id

* Getting all Ids

* Console Clean up

* Added env variables

* Adding Imports

* Adding Imports

* Deleting Ids

* Updating Logic Added

* User not a member cannot change the manifest

* Removing project2

* Adding comments to functions

* add hotkeys service (#184)

* add hotkeys service

* hotkey endpoints

* aggregate hotkeys during project retrieval

* specify hotkey fields to include

* cleanup

* Update Hotkeys.js

* Update ProjectFactory.mjs

* Return hotkeys as an Array of Strings

* aligning with Class changes

* remove create, since .save is not acting correctly

* cleanup and drop .post

* tests restored

no Jest here, just checking exists.

* tests and sinon upgrade

* no db tests directly

* Update exists_unit.test.mjs

* putting post back in...

* adding create back with safety

* adding upsert to accomodate bad errors

* Update Hotkeys.js

* uncatch to let errors through

* expect the  errors to come back

* switch to jest tests

---------

Co-authored-by: cubap <cubap@slu.edu>

* hotifx

* hotfix for symbols.

* delete enabled

* Create API.md

* collaborators and users

* add markdown reader

* package for markdown

* Update API.md

* Update API.md

* touch

* ah codes

* proxy for internal use (#201)

* Endpoint to save changes for the new layer (#199)

* Adding endpoint to save changes from the layer

* Adding New Layer

* No Empty Label and no Annotations

* Updated new Layer

* Adding Items to partOf

* Changing id convention

* Removing updating layer

* Annotation Change

* Adding Delete Endpoint

* not sure...

This type of thing?

* Label Change

* Added Layer Class

* Adding rerum ids to delete and add

* Changing tests

* Update exists.test.mjs

* Changing LayerLabel

* Changes AnnotationCollection Structure

* Update Pages API

* Updating partOf Ids in case of any change

* Adding Layer Metadata Label Change

* example results as a base for comments, delete these files before merge.

* Adding AddLayer Commenting Rest of the APIs

* Added DeleteLayer Back

* Deleting json files

* Updates to the comments

* Making Project to Layer Changes

* Renaming layerAnnotationCollection

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Error Handled for no ProjectID or LayerID

* Clear Code

* send() instead of json()

---------

Co-authored-by: cubap <cubap@slu.edu>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Create sample.env

* Update sample.env

GitHub per @mepripri

* Update CODEOWNERS

* dev it and hotkeys

* 188 epic middleware to upgrade imported manifests (#209)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* 139 factor out type type dependencies (#211)

* determine data type by content

* Removing type dependencies

- Took controller and type out of controller
- Added a function to detect the data types and assign the correct collection

* matching tests to code move

* align with main

* Update driver.mjs (#217)

* 188 epic middleware to upgrade imported manifests (#218)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* rename redone

* This is Vault now

* test objects don't validate

* hulk smash 👊🏽

* _sub is no longer missing on invitees

* add temp sub to new user

* Update cd_dev.yaml

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Removing fileSystem from Github API (#214)

* Removing fileSystem from Github API

* Update ProjectFactory.mjs

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 220 services for bug reporting and feedback (#221)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* cicd (#222)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* 220 services for bug reporting and feedback (#224)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* explicitly adding CORS

* API call to Update Profile (#223)

* API call to Update Profile

* existingEmail and existingName

* Changes to comments

* Update User.mjs

* Save AnnotationCollection, Pages and Annotations to RERUM (#215)

* saveCollection to RERUM

* Adding Tinypen to Create RERUM Object

* Update exists.test.mjs

* Update exists.test.mjs

* Update Page.mjs

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* starting some adjustments

* better the tests

* headed home

* multiple ways to extract the data

* retest with suggestions

* layer/page halos

* percolating deletes

* setting up routes

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Import TPEN28 (#226)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Test restoration (#229)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* cleanup missing properties, changed method names

* just this route

* id shouldn't be optional here.

out of date test files dropped

* This should never break. What's up?

* bad merge

* Update exists_unit.test.mjs

* test is ugly

The page router needs a projectId as well to actually work

* Update end_to_end_unit.test.mjs

These two cannot work without a corresponding project, so it will need to be rewritten

* nested in router now

* Update exists.test.mjs

* un-mjs

* Refactor all .mjs files to .js and update imports. Closes #194 (#228)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Refactor all .mjs files to .js and update imports. Closes #194

* un-mjs

* npm update

* Hey I heard you like tests, so I put tests in your tests

* mjs > js

* no mjs, bad mjs

* fine

* habesroxx

* how bout now

* hide, Jest is coming

* runner love

* Update package-lock.json

* jest no like to run

* null != undefined

* default not defaulting

* fixes "id is not defined"

shoulda wrote test for this

* out of scope, out of effs

---------

Co-authored-by: Priyal Patel <mepripri0712@gmail.com>

* Update package-lock.json

* Using UID to get User Projects

* Update index.mjs

* no label is fine for Pages

* Origin Fetch

* SetHeader Origin

* Update index.js

* Getting User Projects (#237)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Using UID to get User Projects

* Update index.mjs

* Origin Fetch

* SetHeader Origin

* Update index.js

* Update index.js

* Update index.js

* Localhost URLS Validating (#242)

* Update index.js

* Update index.js

* Update validateURL.js

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* 231 create overwrite layer (#239)

* passing through the projectID

* some tests

* support page

* path in Page class generator

* no label is fine for Pages

* updating layers

* AI generated tests

* Update API.md

* oh auth.

* how'd we miss this?

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* just skip to move on

* Update Layer.js

* Update index.js

* merged mess unwrap

* dummy

* Update Project.js

* handle labels throughout

* unerring

* update layer organized

* return changes

* avoid hard crash

* prevent crash on a page 404

* full id

After I PUT a new label (this was successful) the "id" on the layer the db obj does not the the prefix and is just the hash.

* you get it

* vaildate all singular changes

* greedier try-catch

* Squashed commit of the following:

commit 44b75cf
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef45
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f977234
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c30
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec198
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* 422 if no pages are there.

* Update index.js

* Update index.js

* API entries

* typo

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* remove unused file

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>

* cherrypicked

* This spot in updateText too

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>
cubap added a commit that referenced this pull request Aug 11, 2025
* Development (#234)

* update metadata (#171)

* update metadata

* modify route name and db.update

* update db.update dependent

* cleanup

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* quickfix

* cleanup

* modify db.update to receive one param {data, collection}

* nodiff

* restore action(data, collection) structure

* undiff

* Changed Collections Parameter for Save()

* Removing /:id put Call

* Removing the Limit from express.json()

* Removing the Limit from express.json()

* getting started with Vault (#190)

* getting started with Vault

* newer Vault

* tests

* removing redundant code

* proper tests passing

* sample Vault

* Bryan's refusal to .jsonld makes this not work as expected

* loading resources

This is incomplete by design. We need to ask Vault to add any resources we want resolved

* expanding the Manifest a bit

* touch up for merge

* touch up for merge

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Current Project IIIF manifest Creation (#187)

* Current Project IIIF manifest Creation

* Refactored the exportManifest() and endpoint name

* Changed the exportManifest() function

* TPEN ID error handled

* endpoint to move the manifest.json to TPEN-Static-Dev

* Changed @id to id

* Getting all Ids

* Console Clean up

* Added env variables

* Adding Imports

* Adding Imports

* Deleting Ids

* Updating Logic Added

* User not a member cannot change the manifest

* Removing project2

* Adding comments to functions

* add hotkeys service (#184)

* add hotkeys service

* hotkey endpoints

* aggregate hotkeys during project retrieval

* specify hotkey fields to include

* cleanup

* Update Hotkeys.js

* Update ProjectFactory.mjs

* Return hotkeys as an Array of Strings

* aligning with Class changes

* remove create, since .save is not acting correctly

* cleanup and drop .post

* tests restored

no Jest here, just checking exists.

* tests and sinon upgrade

* no db tests directly

* Update exists_unit.test.mjs

* putting post back in...

* adding create back with safety

* adding upsert to accomodate bad errors

* Update Hotkeys.js

* uncatch to let errors through

* expect the  errors to come back

* switch to jest tests

---------

Co-authored-by: cubap <cubap@slu.edu>

* hotifx

* hotfix for symbols.

* delete enabled

* Create API.md

* collaborators and users

* add markdown reader

* package for markdown

* Update API.md

* Update API.md

* touch

* ah codes

* proxy for internal use (#201)

* Endpoint to save changes for the new layer (#199)

* Adding endpoint to save changes from the layer

* Adding New Layer

* No Empty Label and no Annotations

* Updated new Layer

* Adding Items to partOf

* Changing id convention

* Removing updating layer

* Annotation Change

* Adding Delete Endpoint

* not sure...

This type of thing?

* Label Change

* Added Layer Class

* Adding rerum ids to delete and add

* Changing tests

* Update exists.test.mjs

* Changing LayerLabel

* Changes AnnotationCollection Structure

* Update Pages API

* Updating partOf Ids in case of any change

* Adding Layer Metadata Label Change

* example results as a base for comments, delete these files before merge.

* Adding AddLayer Commenting Rest of the APIs

* Added DeleteLayer Back

* Deleting json files

* Updates to the comments

* Making Project to Layer Changes

* Renaming layerAnnotationCollection

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Error Handled for no ProjectID or LayerID

* Clear Code

* send() instead of json()

---------

Co-authored-by: cubap <cubap@slu.edu>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Create sample.env

* Update sample.env

GitHub per @mepripri

* Update CODEOWNERS

* dev it and hotkeys

* 188 epic middleware to upgrade imported manifests (#209)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* 139 factor out type type dependencies (#211)

* determine data type by content

* Removing type dependencies

- Took controller and type out of controller
- Added a function to detect the data types and assign the correct collection

* matching tests to code move

* align with main

* Update driver.mjs (#217)

* 188 epic middleware to upgrade imported manifests (#218)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* rename redone

* This is Vault now

* test objects don't validate

* hulk smash 👊🏽

* _sub is no longer missing on invitees

* add temp sub to new user

* Update cd_dev.yaml

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Removing fileSystem from Github API (#214)

* Removing fileSystem from Github API

* Update ProjectFactory.mjs

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 220 services for bug reporting and feedback (#221)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* cicd (#222)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* 220 services for bug reporting and feedback (#224)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* explicitly adding CORS

* API call to Update Profile (#223)

* API call to Update Profile

* existingEmail and existingName

* Changes to comments

* Update User.mjs

* Save AnnotationCollection, Pages and Annotations to RERUM (#215)

* saveCollection to RERUM

* Adding Tinypen to Create RERUM Object

* Update exists.test.mjs

* Update exists.test.mjs

* Update Page.mjs

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* starting some adjustments

* better the tests

* headed home

* multiple ways to extract the data

* retest with suggestions

* layer/page halos

* percolating deletes

* setting up routes

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Import TPEN28 (#226)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Test restoration (#229)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* cleanup missing properties, changed method names

* just this route

* id shouldn't be optional here.

out of date test files dropped

* This should never break. What's up?

* bad merge

* Update exists_unit.test.mjs

* test is ugly

The page router needs a projectId as well to actually work

* Update end_to_end_unit.test.mjs

These two cannot work without a corresponding project, so it will need to be rewritten

* nested in router now

* Update exists.test.mjs

* un-mjs

* Refactor all .mjs files to .js and update imports. Closes #194 (#228)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Refactor all .mjs files to .js and update imports. Closes #194

* un-mjs

* npm update

* Hey I heard you like tests, so I put tests in your tests

* mjs > js

* no mjs, bad mjs

* fine

* habesroxx

* how bout now

* hide, Jest is coming

* runner love

* Update package-lock.json

* jest no like to run

* null != undefined

* default not defaulting

* fixes "id is not defined"

shoulda wrote test for this

* out of scope, out of effs

---------

Co-authored-by: Priyal Patel <mepripri0712@gmail.com>

* Update package-lock.json

* Using UID to get User Projects

* Update index.mjs

* no label is fine for Pages

* Origin Fetch

* SetHeader Origin

* Update index.js

* Getting User Projects (#237)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Using UID to get User Projects

* Update index.mjs

* Origin Fetch

* SetHeader Origin

* Update index.js

* Update index.js

* Update index.js

* Localhost URLS Validating (#242)

* Update index.js

* Update index.js

* Update validateURL.js

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* 231 create overwrite layer (#239)

* passing through the projectID

* some tests

* support page

* path in Page class generator

* no label is fine for Pages

* updating layers

* AI generated tests

* Update API.md

* oh auth.

* how'd we miss this?

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* just skip to move on

* Update Layer.js

* Update index.js

* merged mess unwrap

* dummy

* Update Project.js

* handle labels throughout

* unerring

* update layer organized

* return changes

* avoid hard crash

* prevent crash on a page 404

* full id

After I PUT a new label (this was successful) the "id" on the layer the db obj does not the the prefix and is just the hash.

* you get it

* vaildate all singular changes

* greedier try-catch

* Squashed commit of the following:

commit 44b75cf
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef45
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f977234
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c30
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec198
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* 422 if no pages are there.

* Update index.js

* Update index.js

* API entries

* typo

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* remove unused file

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>

* upgradeReferences on Page class

* move to shared.js

* merge goof

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>
thehabes added a commit that referenced this pull request Aug 21, 2025
* Development (#234)

* update metadata (#171)

* update metadata

* modify route name and db.update

* update db.update dependent

* cleanup

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* quickfix

* cleanup

* modify db.update to receive one param {data, collection}

* nodiff

* restore action(data, collection) structure

* undiff

* Changed Collections Parameter for Save()

* Removing /:id put Call

* Removing the Limit from express.json()

* Removing the Limit from express.json()

* getting started with Vault (#190)

* getting started with Vault

* newer Vault

* tests

* removing redundant code

* proper tests passing

* sample Vault

* Bryan's refusal to .jsonld makes this not work as expected

* loading resources

This is incomplete by design. We need to ask Vault to add any resources we want resolved

* expanding the Manifest a bit

* touch up for merge

* touch up for merge

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Current Project IIIF manifest Creation (#187)

* Current Project IIIF manifest Creation

* Refactored the exportManifest() and endpoint name

* Changed the exportManifest() function

* TPEN ID error handled

* endpoint to move the manifest.json to TPEN-Static-Dev

* Changed @id to id

* Getting all Ids

* Console Clean up

* Added env variables

* Adding Imports

* Adding Imports

* Deleting Ids

* Updating Logic Added

* User not a member cannot change the manifest

* Removing project2

* Adding comments to functions

* add hotkeys service (#184)

* add hotkeys service

* hotkey endpoints

* aggregate hotkeys during project retrieval

* specify hotkey fields to include

* cleanup

* Update Hotkeys.js

* Update ProjectFactory.mjs

* Return hotkeys as an Array of Strings

* aligning with Class changes

* remove create, since .save is not acting correctly

* cleanup and drop .post

* tests restored

no Jest here, just checking exists.

* tests and sinon upgrade

* no db tests directly

* Update exists_unit.test.mjs

* putting post back in...

* adding create back with safety

* adding upsert to accomodate bad errors

* Update Hotkeys.js

* uncatch to let errors through

* expect the  errors to come back

* switch to jest tests

---------

Co-authored-by: cubap <cubap@slu.edu>

* hotifx

* hotfix for symbols.

* delete enabled

* Create API.md

* collaborators and users

* add markdown reader

* package for markdown

* Update API.md

* Update API.md

* touch

* ah codes

* proxy for internal use (#201)

* Endpoint to save changes for the new layer (#199)

* Adding endpoint to save changes from the layer

* Adding New Layer

* No Empty Label and no Annotations

* Updated new Layer

* Adding Items to partOf

* Changing id convention

* Removing updating layer

* Annotation Change

* Adding Delete Endpoint

* not sure...

This type of thing?

* Label Change

* Added Layer Class

* Adding rerum ids to delete and add

* Changing tests

* Update exists.test.mjs

* Changing LayerLabel

* Changes AnnotationCollection Structure

* Update Pages API

* Updating partOf Ids in case of any change

* Adding Layer Metadata Label Change

* example results as a base for comments, delete these files before merge.

* Adding AddLayer Commenting Rest of the APIs

* Added DeleteLayer Back

* Deleting json files

* Updates to the comments

* Making Project to Layer Changes

* Renaming layerAnnotationCollection

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Error Handled for no ProjectID or LayerID

* Clear Code

* send() instead of json()

---------

Co-authored-by: cubap <cubap@slu.edu>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Create sample.env

* Update sample.env

GitHub per @mepripri

* Update CODEOWNERS

* dev it and hotkeys

* 188 epic middleware to upgrade imported manifests (#209)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* 139 factor out type type dependencies (#211)

* determine data type by content

* Removing type dependencies

- Took controller and type out of controller
- Added a function to detect the data types and assign the correct collection

* matching tests to code move

* align with main

* Update driver.mjs (#217)

* 188 epic middleware to upgrade imported manifests (#218)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* rename redone

* This is Vault now

* test objects don't validate

* hulk smash 👊🏽

* _sub is no longer missing on invitees

* add temp sub to new user

* Update cd_dev.yaml

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Removing fileSystem from Github API (#214)

* Removing fileSystem from Github API

* Update ProjectFactory.mjs

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 220 services for bug reporting and feedback (#221)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* cicd (#222)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* 220 services for bug reporting and feedback (#224)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* explicitly adding CORS

* API call to Update Profile (#223)

* API call to Update Profile

* existingEmail and existingName

* Changes to comments

* Update User.mjs

* Save AnnotationCollection, Pages and Annotations to RERUM (#215)

* saveCollection to RERUM

* Adding Tinypen to Create RERUM Object

* Update exists.test.mjs

* Update exists.test.mjs

* Update Page.mjs

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* starting some adjustments

* better the tests

* headed home

* multiple ways to extract the data

* retest with suggestions

* layer/page halos

* percolating deletes

* setting up routes

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Import TPEN28 (#226)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Test restoration (#229)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* cleanup missing properties, changed method names

* just this route

* id shouldn't be optional here.

out of date test files dropped

* This should never break. What's up?

* bad merge

* Update exists_unit.test.mjs

* test is ugly

The page router needs a projectId as well to actually work

* Update end_to_end_unit.test.mjs

These two cannot work without a corresponding project, so it will need to be rewritten

* nested in router now

* Update exists.test.mjs

* un-mjs

* Refactor all .mjs files to .js and update imports. Closes #194 (#228)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Refactor all .mjs files to .js and update imports. Closes #194

* un-mjs

* npm update

* Hey I heard you like tests, so I put tests in your tests

* mjs > js

* no mjs, bad mjs

* fine

* habesroxx

* how bout now

* hide, Jest is coming

* runner love

* Update package-lock.json

* jest no like to run

* null != undefined

* default not defaulting

* fixes "id is not defined"

shoulda wrote test for this

* out of scope, out of effs

---------

Co-authored-by: Priyal Patel <mepripri0712@gmail.com>

* Update package-lock.json

* Using UID to get User Projects

* Update index.mjs

* no label is fine for Pages

* Origin Fetch

* SetHeader Origin

* Update index.js

* Getting User Projects (#237)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Using UID to get User Projects

* Update index.mjs

* Origin Fetch

* SetHeader Origin

* Update index.js

* Update index.js

* Update index.js

* Localhost URLS Validating (#242)

* Update index.js

* Update index.js

* Update validateURL.js

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* 231 create overwrite layer (#239)

* passing through the projectID

* some tests

* support page

* path in Page class generator

* no label is fine for Pages

* updating layers

* AI generated tests

* Update API.md

* oh auth.

* how'd we miss this?

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* just skip to move on

* Update Layer.js

* Update index.js

* merged mess unwrap

* dummy

* Update Project.js

* handle labels throughout

* unerring

* update layer organized

* return changes

* avoid hard crash

* prevent crash on a page 404

* full id

After I PUT a new label (this was successful) the "id" on the layer the db obj does not the the prefix and is just the hash.

* you get it

* vaildate all singular changes

* greedier try-catch

* Squashed commit of the following:

commit 44b75cf
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef45
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f977234
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c30
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec198
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* 422 if no pages are there.

* Update index.js

* Update index.js

* API entries

* typo

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* remove unused file

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>

* upgradeReferences on Page class

* move to shared.js

* merge goof

* check for content changed

* Refactor page and layer update logic and improve validation

Refactored updatePageAndProject to simplify logic and remove the contentChanged parameter. Improved validation for update requests in page/index.js and streamlined layer lookup. Added default type to Line update output. Minor formatting and consistency improvements in shared.js.

* layers updated

* comment only for notes

* upgrade for new warnings

* Refactor database access to use unified driver

Replaces separate database controllers with a single dbDriver instance for 'tiny' operations. Updates all references to use the new databaseTiny object, simplifying and unifying database access throughout shared.js.

* Are you there }? It's me, Margaret

* pass flasey check

* oops get rid of console.log

* Set line creator if not already defined

Adds logic to assign the line's creator property to the user's agent if it is undefined when processing items. This ensures that the creator information is consistently set for new or updated lines.

* Update shared.js

* fix for Bryan's test

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>
thehabes added a commit that referenced this pull request Oct 6, 2025
* update metadata (#171)

* update metadata

* modify route name and db.update

* update db.update dependent

* cleanup

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* quickfix

* cleanup

* modify db.update to receive one param {data, collection}

* nodiff

* restore action(data, collection) structure

* undiff

* Changed Collections Parameter for Save()

* Removing /:id put Call

* Removing the Limit from express.json()

* Removing the Limit from express.json()

* getting started with Vault (#190)

* getting started with Vault

* newer Vault

* tests

* removing redundant code

* proper tests passing

* sample Vault

* Bryan's refusal to .jsonld makes this not work as expected

* loading resources

This is incomplete by design. We need to ask Vault to add any resources we want resolved

* expanding the Manifest a bit

* touch up for merge

* touch up for merge

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Current Project IIIF manifest Creation (#187)

* Current Project IIIF manifest Creation

* Refactored the exportManifest() and endpoint name

* Changed the exportManifest() function

* TPEN ID error handled

* endpoint to move the manifest.json to TPEN-Static-Dev

* Changed @id to id

* Getting all Ids

* Console Clean up

* Added env variables

* Adding Imports

* Adding Imports

* Deleting Ids

* Updating Logic Added

* User not a member cannot change the manifest

* Removing project2

* Adding comments to functions

* add hotkeys service (#184)

* add hotkeys service

* hotkey endpoints

* aggregate hotkeys during project retrieval

* specify hotkey fields to include

* cleanup

* Update Hotkeys.js

* Update ProjectFactory.mjs

* Return hotkeys as an Array of Strings

* aligning with Class changes

* remove create, since .save is not acting correctly

* cleanup and drop .post

* tests restored

no Jest here, just checking exists.

* tests and sinon upgrade

* no db tests directly

* Update exists_unit.test.mjs

* putting post back in...

* adding create back with safety

* adding upsert to accomodate bad errors

* Update Hotkeys.js

* uncatch to let errors through

* expect the  errors to come back

* switch to jest tests

---------

Co-authored-by: cubap <cubap@slu.edu>

* hotifx

* hotfix for symbols.

* delete enabled

* Create API.md

* collaborators and users

* add markdown reader

* package for markdown

* Update API.md

* Update API.md

* touch

* ah codes

* proxy for internal use (#201)

* Endpoint to save changes for the new layer (#199)

* Adding endpoint to save changes from the layer

* Adding New Layer

* No Empty Label and no Annotations

* Updated new Layer

* Adding Items to partOf

* Changing id convention

* Removing updating layer

* Annotation Change

* Adding Delete Endpoint

* not sure...

This type of thing?

* Label Change

* Added Layer Class

* Adding rerum ids to delete and add

* Changing tests

* Update exists.test.mjs

* Changing LayerLabel

* Changes AnnotationCollection Structure

* Update Pages API

* Updating partOf Ids in case of any change

* Adding Layer Metadata Label Change

* example results as a base for comments, delete these files before merge.

* Adding AddLayer Commenting Rest of the APIs

* Added DeleteLayer Back

* Deleting json files

* Updates to the comments

* Making Project to Layer Changes

* Renaming layerAnnotationCollection

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Error Handled for no ProjectID or LayerID

* Clear Code

* send() instead of json()

---------

Co-authored-by: cubap <cubap@slu.edu>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Create sample.env

* Update sample.env

GitHub per @mepripri

* Update CODEOWNERS

* dev it and hotkeys

* 188 epic middleware to upgrade imported manifests (#209)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* 139 factor out type type dependencies (#211)

* determine data type by content

* Removing type dependencies

- Took controller and type out of controller
- Added a function to detect the data types and assign the correct collection

* matching tests to code move

* align with main

* Update driver.mjs (#217)

* 188 epic middleware to upgrade imported manifests (#218)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* rename redone

* This is Vault now

* test objects don't validate

* hulk smash 👊🏽

* _sub is no longer missing on invitees

* add temp sub to new user

* Update cd_dev.yaml

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Removing fileSystem from Github API (#214)

* Removing fileSystem from Github API

* Update ProjectFactory.mjs

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 220 services for bug reporting and feedback (#221)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* cicd (#222)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* 220 services for bug reporting and feedback (#224)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* explicitly adding CORS

* API call to Update Profile (#223)

* API call to Update Profile

* existingEmail and existingName

* Changes to comments

* Update User.mjs

* Save AnnotationCollection, Pages and Annotations to RERUM (#215)

* saveCollection to RERUM

* Adding Tinypen to Create RERUM Object

* Update exists.test.mjs

* Update exists.test.mjs

* Update Page.mjs

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* starting some adjustments

* better the tests

* headed home

* multiple ways to extract the data

* retest with suggestions

* layer/page halos

* percolating deletes

* setting up routes

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Import TPEN28 (#226)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Test restoration (#229)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* cleanup missing properties, changed method names

* just this route

* id shouldn't be optional here.

out of date test files dropped

* This should never break. What's up?

* bad merge

* Update exists_unit.test.mjs

* test is ugly

The page router needs a projectId as well to actually work

* Update end_to_end_unit.test.mjs

These two cannot work without a corresponding project, so it will need to be rewritten

* nested in router now

* Update exists.test.mjs

* un-mjs

* Refactor all .mjs files to .js and update imports. Closes #194 (#228)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Refactor all .mjs files to .js and update imports. Closes #194

* un-mjs

* npm update

* Hey I heard you like tests, so I put tests in your tests

* mjs > js

* no mjs, bad mjs

* fine

* habesroxx

* how bout now

* hide, Jest is coming

* runner love

* Update package-lock.json

* jest no like to run

* null != undefined

* default not defaulting

* fixes "id is not defined"

shoulda wrote test for this

* out of scope, out of effs

---------

Co-authored-by: Priyal Patel <mepripri0712@gmail.com>

* Update package-lock.json

* Using UID to get User Projects

* Update index.mjs

* no label is fine for Pages

* Origin Fetch

* SetHeader Origin

* Update index.js

* Update index.js

* Update index.js

* Getting User Projects (#237)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Using UID to get User Projects

* Update index.mjs

* Origin Fetch

* SetHeader Origin

* Update index.js

* Update index.js

* Update index.js

* Update validateURL.js

* Localhost URLS Validating (#242)

* Update index.js

* Update index.js

* Update validateURL.js

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* 231 create overwrite layer (#239)

* passing through the projectID

* some tests

* support page

* path in Page class generator

* no label is fine for Pages

* updating layers

* AI generated tests

* Update API.md

* oh auth.

* how'd we miss this?

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* just skip to move on

* Update Layer.js

* Update index.js

* merged mess unwrap

* dummy

* Update Project.js

* handle labels throughout

* unerring

* update layer organized

* return changes

* avoid hard crash

* prevent crash on a page 404

* full id

After I PUT a new label (this was successful) the "id" on the layer the db obj does not the the prefix and is just the hash.

* you get it

* vaildate all singular changes

* greedier try-catch

* Squashed commit of the following:

commit 44b75cf175f43ef5b7736cf7f7f9754b1dcd7f36
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab21d47427f3003c94b94b848f64f04850c
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f97723414967e86eccda10f29ab02c4d89e7a7e9
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c3015f32cb38d6c49cf25ac826a347310c26
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec19844b8a15fe4497eb877d6709f898487324
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2d76c8eb5226fc9b7773b695c13d690943
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5c7f8b729c845e05eacbfade3e8f354906
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e776954a4689ae174ee7a40f69c5c5d7a6
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084f2ebeaa966caf86999c3c2bc85300a314
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e02ca0a4fddf9df52e959a519e7368769d
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc0bc892a9391f4918bffb45e65fddae550
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* 422 if no pages are there.

* Update index.js

* Update index.js

* API entries

* typo

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* remove unused file

* 235 save annotations (#240)

* passing through the projectID

* some tests

* support page

* path in Page class generator

* no label is fine for Pages

* updating layers

* AI generated tests

* Update API.md

* oh auth.

* how'd we miss this?

* Create lineRouter with new paths

remove line library and add methods to class

* getLine

* really loading lines

* line modification

* test barf

* aw thucks!

* Hi, I'm new here.

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* just skip to move on

* Update Layer.js

* Update index.js

* merged mess unwrap

* dummy

* Update Project.js

* handle labels throughout

* unerring

* update layer organized

* return changes

* avoid hard crash

* prevent crash on a page 404

* full id

After I PUT a new label (this was successful) the "id" on the layer the db obj does not the the prefix and is just the hash.

* you get it

* vaildate all singular changes

* greedier try-catch

* Squashed commit of the following:

commit 44b75cf175f43ef5b7736cf7f7f9754b1dcd7f36
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab21d47427f3003c94b94b848f64f04850c
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f97723414967e86eccda10f29ab02c4d89e7a7e9
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c3015f32cb38d6c49cf25ac826a347310c26
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec19844b8a15fe4497eb877d6709f898487324
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2d76c8eb5226fc9b7773b695c13d690943
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5c7f8b729c845e05eacbfade3e8f354906
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e776954a4689ae174ee7a40f69c5c5d7a6
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084f2ebeaa966caf86999c3c2bc85300a314
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e02ca0a4fddf9df52e959a519e7368769d
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc0bc892a9391f4918bffb45e65fddae550
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* Squashed commit of the following:

commit 44b75cf175f43ef5b7736cf7f7f9754b1dcd7f36
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab21d47427f3003c94b94b848f64f04850c
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f97723414967e86eccda10f29ab02c4d89e7a7e9
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c3015f32cb38d6c49cf25ac826a347310c26
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec19844b8a15fe4497eb877d6709f898487324
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2d76c8eb5226fc9b7773b695c13d690943
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5c7f8b729c845e05eacbfade3e8f354906
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e776954a4689ae174ee7a40f69c5c5d7a6
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084f2ebeaa966caf86999c3c2bc85300a314
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e02ca0a4fddf9df52e959a519e7368769d
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc0bc892a9391f4918bffb45e65fddae550
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* 422 if no pages are there.

* Update index.js

* Update index.js

* Update index.js

* since I'm here...

moved some functions into their own space

* teehee

* Make it so.

* fixed GET /line/:id

* page isn't a page?

* undata

* more details in data objects

* Update Line.js

* load it for updates

* put overwrite in for updating pages

* unlog

* changing route format for compile trouble

* no test

* No. This is wrong and fills me with hate.

* quick code comment

* patches for PATCHes

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 230 clean up project routers (#245)

* Development (#234)

* update metadata (#171)

* update metadata

* modify route name and db.update

* update db.update dependent

* cleanup

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* quickfix

* cleanup

* modify db.update to receive one param {data, collection}

* nodiff

* restore action(data, collection) structure

* undiff

* Changed Collections Parameter for Save()

* Removing /:id put Call

* Removing the Limit from express.json()

* Removing the Limit from express.json()

* getting started with Vault (#190)

* getting started with Vault

* newer Vault

* tests

* removing redundant code

* proper tests passing

* sample Vault

* Bryan's refusal to .jsonld makes this not work as expected

* loading resources

This is incomplete by design. We need to ask Vault to add any resources we want resolved

* expanding the Manifest a bit

* touch up for merge

* touch up for merge

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Current Project IIIF manifest Creation (#187)

* Current Project IIIF manifest Creation

* Refactored the exportManifest() and endpoint name

* Changed the exportManifest() function

* TPEN ID error handled

* endpoint to move the manifest.json to TPEN-Static-Dev

* Changed @id to id

* Getting all Ids

* Console Clean up

* Added env variables

* Adding Imports

* Adding Imports

* Deleting Ids

* Updating Logic Added

* User not a member cannot change the manifest

* Removing project2

* Adding comments to functions

* add hotkeys service (#184)

* add hotkeys service

* hotkey endpoints

* aggregate hotkeys during project retrieval

* specify hotkey fields to include

* cleanup

* Update Hotkeys.js

* Update ProjectFactory.mjs

* Return hotkeys as an Array of Strings

* aligning with Class changes

* remove create, since .save is not acting correctly

* cleanup and drop .post

* tests restored

no Jest here, just checking exists.

* tests and sinon upgrade

* no db tests directly

* Update exists_unit.test.mjs

* putting post back in...

* adding create back with safety

* adding upsert to accomodate bad errors

* Update Hotkeys.js

* uncatch to let errors through

* expect the  errors to come back

* switch to jest tests

---------

Co-authored-by: cubap <cubap@slu.edu>

* hotifx

* hotfix for symbols.

* delete enabled

* Create API.md

* collaborators and users

* add markdown reader

* package for markdown

* Update API.md

* Update API.md

* touch

* ah codes

* proxy for internal use (#201)

* Endpoint to save changes for the new layer (#199)

* Adding endpoint to save changes from the layer

* Adding New Layer

* No Empty Label and no Annotations

* Updated new Layer

* Adding Items to partOf

* Changing id convention

* Removing updating layer

* Annotation Change

* Adding Delete Endpoint

* not sure...

This type of thing?

* Label Change

* Added Layer Class

* Adding rerum ids to delete and add

* Changing tests

* Update exists.test.mjs

* Changing LayerLabel

* Changes AnnotationCollection Structure

* Update Pages API

* Updating partOf Ids in case of any change

* Adding Layer Metadata Label Change

* example results as a base for comments, delete these files before merge.

* Adding AddLayer Commenting Rest of the APIs

* Added DeleteLayer Back

* Deleting json files

* Updates to the comments

* Making Project to Layer Changes

* Renaming layerAnnotationCollection

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Error Handled for no ProjectID or LayerID

* Clear Code

* send() instead of json()

---------

Co-authored-by: cubap <cubap@slu.edu>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Create sample.env

* Update sample.env

GitHub per @mepripri

* Update CODEOWNERS

* dev it and hotkeys

* 188 epic middleware to upgrade imported manifests (#209)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* 139 factor out type type dependencies (#211)

* determine data type by content

* Removing type dependencies

- Took controller and type out of controller
- Added a function to detect the data types and assign the correct collection

* matching tests to code move

* align with main

* Update driver.mjs (#217)

* 188 epic middleware to upgrade imported manifests (#218)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* rename redone

* This is Vault now

* test objects don't validate

* hulk smash 👊🏽

* _sub is no longer missing on invitees

* add temp sub to new user

* Update cd_dev.yaml

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Removing fileSystem from Github API (#214)

* Removing fileSystem from Github API

* Update ProjectFactory.mjs

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 220 services for bug reporting and feedback (#221)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* cicd (#222)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* 220 services for bug reporting and feedback (#224)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* explicitly adding CORS

* API call to Update Profile (#223)

* API call to Update Profile

* existingEmail and existingName

* Changes to comments

* Update User.mjs

* Save AnnotationCollection, Pages and Annotations to RERUM (#215)

* saveCollection to RERUM

* Adding Tinypen to Create RERUM Object

* Update exists.test.mjs

* Update exists.test.mjs

* Update Page.mjs

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* starting some adjustments

* better the tests

* headed home

* multiple ways to extract the data

* retest with suggestions

* layer/page halos

* percolating deletes

* setting up routes

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Import TPEN28 (#226)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Test restoration (#229)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* cleanup missing properties, changed method names

* just this route

* id shouldn't be optional here.

out of date test files dropped

* This should never break. What's up?

* bad merge

* Update exists_unit.test.mjs

* test is ugly

The page router needs a projectId as well to actually work

* Update end_to_end_unit.test.mjs

These two cannot work without a corresponding project, so it will need to be rewritten

* nested in router now

* Update exists.test.mjs

* un-mjs

* Refactor all .mjs files to .js and update imports. Closes #194 (#228)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Refactor all .mjs files to .js and update imports. Closes #194

* un-mjs

* npm update

* Hey I heard you like tests, so I put tests in your tests

* mjs > js

* no mjs, bad mjs

* fine

* habesroxx

* how bout now

* hide, Jest is coming

* runner love

* Update package-lock.json

* jest no like to run

* null != undefined

* default not defaulting

* fixes "id is not defined"

shoulda wrote test for this

* out of scope, out of effs

---------

Co-authored-by: Priyal Patel <mepripri0712@gmail.com>

* Update package-lock.json

* Using UID to get User Projects

* Update index.mjs

* no label is fine for Pages

* Origin Fetch

* SetHeader Origin

* Update index.js

* Getting User Projects (#237)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Using UID to get User Projects

* Update index.mjs

* Origin Fetch

* SetHeader Origin

* Update index.js

* Update index.js

* Update index.js

* Localhost URLS Validating (#242)

* Update index.js

* Update index.js

* Update validateURL.js

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* 231 create overwrite layer (#239)

* passing through the projectID

* some tests

* support page

* path in Page class generator

* no label is fine for Pages

* updating layers

* AI generated tests

* Update API.md

* oh auth.

* how'd we miss this?

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* just skip to move on

* Update Layer.js

* Update index.js

* merged mess unwrap

* dummy

* Update Project.js

* handle labels throughout

* unerring

* update layer organized

* return changes

* avoid hard crash

* prevent crash on a page 404

* full id

After I PUT a new label (this was successful) the "id" on the layer the db obj does not the the prefix and is just the hash.

* you get it

* vaildate all singular changes

* greedier try-catch

* Squashed commit of the following:

commit 44b75cf175f43ef5b7736cf7f7f9754b1dcd7f36
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab21d47427f3003c94b94b848f64f04850c
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f97723414967e86eccda10f29ab02c4d89e7a7e9
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c3015f32cb38d6c49cf25ac826a347310c26
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec19844b8a15fe4497eb877d6709f898487324
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2d76c8eb5226fc9b7773b695c13d690943
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5c7f8b729c845e05eacbfade3e8f354906
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e776954a4689ae174ee7a40f69c5c5d7a6
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084f2ebeaa966caf86999c3c2bc85300a314
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e02ca0a4fddf9df52e959a519e7368769d
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc0bc892a9391f4918bffb45e65fddae550
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* 422 if no pages are there.

* Update index.js

* Update index.js

* API entries

* typo

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* remove unused file

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>

* creating separate files

* cleanup imports

* yuck. This wasn't even AI - it just autocompleted to CJS

* more jest nonsense

* Final attempt

This runs but doesn't pass `allTests`

* Update exists_unit.test.js

* new Put for page at a time updates

* put update

for batch items

Update Line.js

Update Line.js

always set rerumid

save pageAndProject

* auth  fixes for testing

* Update index.js

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>

* Adding Tools to Project (#244)

* Adding Tools to Project

* getTools()

* remove getTools

* addTools and UpdateTools

* Update index.js

* Update index.js

* Update index.js

* Add a guard

* Tool guards

* Guards

* Comment Changes

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: cubap <cubap@slu.edu>

* Adding endpoint to add multiple lines to a page

* Update index.js

* Add project metrics to /my/projects (#227)

* Add project metrics to /my/profile

* fix failing test

* moving this for router use

* Relocating lastModified functions

- User gets a static to set pageId of last change
- line router sends change trigger
- shared utils gains functions that sort of static into Classes

* Update index.js

* tidy

* organized naming

* good to go

* one save behind

* Let's go

* better detail in modified

project:ID/page:ID

* Update privateProfile.js

---------

Co-authored-by: cubap <cubap@slu.edu>

* Update index.js

* co-op

* co-op

* co-op

* OK log time

* do 401 from TPEN2 the right way

* do 401 from TPEN2 the right way

* do 401 from TPEN2 the right way

* do 401 from TPEN2 the right way

* gotta import the function

* Update index.js

* Need to import Project

* Need to import Project

* Good to go

* Separating files

* add metarecords to new Projects (#254)

* 256 import creates bad ids (#257)

* correct id for new Layers

* set _id on imported project

* Update Layer.js

* always trim lastModified

* hotifx invite code

* Email invite, upgrade temp user (#259)

* Now we see it

* Need to do the agent in the GH action

* functioning demo

* touches

* touchup

* links

* links

* unused

* noted todo

* Use env variables instead of hard coded links

* Use env variables instead of hard coded links

* hotfix links in E-mail

* hotfix links in E-mail

* Align User With Project After Invite (#263)

* need to take one of those 'limitless' pills for this

* touchup

* renaming, documentation, cleanup, and better code integration

* renaming, documentation, cleanup, and better code integration

* renaming, documentation, cleanup, and better code integration

* renaming, documentation, cleanup, and better code integration

* Create New Project from One Image

* Update ProjectFactory.js

* Removing services

* Update ProjectFactory.js

* Update ProjectFactory.js

* MimeTypes

* cleanup

* Decline Project Invite - Service (#264)

* Add the decline route and route logic

* Unauthenticated /decline, Authenticated and Permission Checked /remove

* phew a lot more to it than anticipated

* changes from testing and thinking

* All the way through with the right UX

* All the way through with the right UX

* All the way through with the right UX

* cleanup

* cleanup

* cleanup

* support text/plain request bodies (#268)

* Implement optimistic locking for page and line updates

Adds optimistic locking to Layer and Page updates, propagates version conflict handling through the database controller, and introduces utility functions for consistent conflict response and retry logic. Updates line and page routes to use optimistic locking and handle version conflicts gracefully, improving data integrity in concurrent editing scenarios.

* IIIF Image Service (#266)

* IIIF Image Service

* Update ProjectFactory.js

* Update ProjectFactory.js

* 270 multiple updates to a page in parallel discards data (#271)

* expect text

* complicating updateText

* all sorts of variants

* allow no body

* Implement optimistic locking for page and line updates

Adds optimistic locking to Layer and Page updates, propagates version conflict handling through the database controller, and introduces utility functions for consistent conflict response and retry logic. Updates line and page routes to use optimistic locking and handle version conflicts gracefully, improving data integrity in concurrent editing scenarios.

* Update index.js

* error is currentVersion

* in route

* stop double res

* Update index.js

* Allow new header in common cors

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Copy Project API (#272)

* Copy Project API

* Duplicating Annotations

* Copy without annotation and copy with group api

* Project Cutomization API

* Hotkeys Guard and include items in DB

* Changes for API, refactoring

* Group Members Change

* Creator as OWNER and add one layer if no layers

* Update ProjectFactory.js

* MongoDB ProjectObject

* Update ProjectFactory.js

* Update ProjectFactory.js

* Update ProjectFactory.js

* Fixing ProjectDB Object

* Documentation around module concept

* Project label update API (#273)

* Project label update API

* picky

* make this a patch request

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Level 0 image fix for TPEN28 imported Projects (#274)

* Level 0 image fix for TPEN28 imported Projects

* Update ProjectFactory.js

* .id

* Adding Creator (#275)

* Adding Creator

* Export Changes

* creator Null in constructor

* Update Page.js

* creator

* creator on rerum

* Prev and Next

* asProjectLine() removed

* Update Line.js

* User as Creator

* Removed extra code

* Save to Rerum Canvas

* creator as agent and removing export creator

* Update Page.js

* line user

* Page user

* projectCreateRouter user

* Update index.js

* Prev and next Id for get Page

* Pages next and prev and partOf

* Use env variable instead of hard coded RERUM id prefixes

* oo i c.  sorry.  undo.

* User Agent as creator

* Add Layer to work

* Adding creator to manifest

* creator for image and temp layer

* creator remove

* Update ProjectFactory.js

* Page creator

* Update index.js

* Page creator

* Page creator findby

* Update index.js

* remove

* getManifestItems

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Layer and Page Management Endpoints (#278)

* Fixes for updating Layers and Pages

* Prepare PR

* remove console.log()s

* remove console.log()s

* polish

* polish

* optimize

* touchups from testing

* Revert "Layer and Page Management Endpoints (#278)" (#283)

This reverts commit c98a41c5ad5f8f32cac07c1f787430de05c391bd.

* Project Export Message (#277)

* Project Export Message

* checkIfUrlExists Utility

* status update

* docs

* deployment

* Update ProjectFactory.js

* Throughput errors

* guarded clause

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Layer and Page Management Endpoints (#284)

* Fixes for updating Layers and Pages

* Prepare PR

* remove console.log()s

* remove console.log()s

* polish

* polish

* optimize

* touchups from testing

* Reconfigure things so Page() and Layer() make more sense together

* cleaning

* changes from testing

* changes from testing

* touchup the gets

* ready pr

* page content change detection

* remove extra whitespace

* page content change detection

* page content change detection

* already checked userId

* already checked userId

* Only update if the page has changed when rebuilding order

* record page modition when page is reordered

* it is a typo

* Allow falsey prev and next in Page.update()

* All those tendrils making sure a page will update its layer if it needs to

* All those tendrils making sure a page will update its layer if it needs to

* change for clarity

* change for clarity

* change for clarity

* change for clarity

* touch-ups from reading through it

* updates from reading through and logs for tracing to make sure it all works

* updates from reading through and logs for tracing to make sure it all works

* continue refactor

* Find temps by id

* continue refactor

* No items for AnnotationCollection

* Use rerum ids for temps that will be upgraded

* get rid of duplicate call

* get rid of duplicate call

* Handle layer temp id problem as well

* polish

* oops

* update documentation

* Update Copy Project Layer Fix (#285)

* Update Copy Project Layer Fix

* update returned json when resolving temp id for page

* let these be null, not undefined

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Project export message (#286)

* Project Export Message

* checkIfUrlExists Utility

* status update

* docs

* deployment

* Update ProjectFactory.js

* Throughput errors

* guarded clause

* Failure State

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Page and Layer Label Hotfix (#287)

* Page and Layer Label Hotfix

* Update Page.js

* Pair Coding Hotfixes (#288)

* ok

* ok

* logs

* 'none'

* labels

* Page label

* operation logs

* withOptimisticLocking operation function

* updatePageAndProject() 4 paramter contentChange

* removing logs

* undo

---------

Co-authored-by: Priyal Patel <mepripri0712@gmail.com>

* ugh

* ugh

* ugh

* ugh

* ugh

* ugh

* ugh

* ugh

* remove logs from testing ugh

* Project Tools Fix (#290)

* Project Tools Fix

* no return here

* Touch up for errors

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* ah forgot to commit touchups

* Leave Project Endpoint (#289)

* If you love them let them go

* polish

* Creator on text and bounds (#294)

* Development (#234)

* update metadata (#171)

* update metadata

* modify route name and db.update

* update db.update dependent

* cleanup

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* quickfix

* cleanup

* modify db.update to receive one param {data, collection}

* nodiff

* restore action(data, collection) structure

* undiff

* Changed Collections Parameter for Save()

* Removing /:id put Call

* Removing the Limit from express.json()

* Removing the Limit from express.json()

* getting started with Vault (#190)

* getting started with Vault

* newer Vault

* tests

* removing redundant code

* proper tests passing

* sample Vault

* Bryan's refusal to .jsonld makes this not work as expected

* loading resources

This is incomplete by design. We need to ask Vault to add any resources we want resolved

* expanding the Manifest a bit

* touch up for merge

* touch up for merge

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Current Project IIIF manifest Creation (#187)

* Current Project IIIF manifest Creation

* Refactored the exportManifest() and endpoint name

* Changed the exportManifest() function

* TPEN ID error handled

* endpoint to move the manifest.json to TPEN-Static-Dev

* Changed @id to id

* Getting all Ids

* Console Clean up

* Added env variables

* Adding Imports

* Adding Imports

* Deleting Ids

* Updating Logic Added

* User not a member cannot change the manifest

* Removing project2

* Adding comments to functions

* add hotkeys service (#184)

* add hotkeys service

* hotkey endpoints

* aggregate hotkeys during project retrieval

* specify hotkey fields to include

* cleanup

* Update Hotkeys.js

* Update ProjectFactory.mjs

* Return hotkeys as an Array of Strings

* aligning with Class changes

* remove create, since .save is not acting correctly

* cleanup and drop .post

* tests restored

no Jest here, just checking exists.

* tests and sinon upgrade

* no db tests directly

* Update exists_unit.test.mjs

* putting post back in...

* adding create back with safety

* adding upsert to accomodate bad errors

* Update Hotkeys.js

* uncatch to let errors through

* expect the  errors to come back

* switch to jest tests

---------

Co-authored-by: cubap <cubap@slu.edu>

* hotifx

* hotfix for symbols.

* delete enabled

* Create API.md

* collaborators and users

* add markdown reader

* package for markdown

* Update API.md

* Update API.md

* touch

* ah codes

* proxy for internal use (#201)

* Endpoint to save changes for the new layer (#199)

* Adding endpoint to save changes from the layer

* Adding New Layer

* No Empty Label and no Annotations

* Updated new Layer

* Adding Items to partOf

* Changing id convention

* Removing updating layer

* Annotation Change

* Adding Delete Endpoint

* not sure...

This type of thing?

* Label Change

* Added Layer Class

* Adding rerum ids to delete and add

* Changing tests

* Update exists.test.mjs

* Changing LayerLabel

* Changes AnnotationCollection Structure

* Update Pages API

* Updating partOf Ids in case of any change

* Adding Layer Metadata Label Change

* example results as a base for comments, delete these files before merge.

* Adding AddLayer Commenting Rest of the APIs

* Added DeleteLayer Back

* Deleting json files

* Updates to the comments

* Making Project to Layer Changes

* Renaming layerAnnotationCollection

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Error Handled for no ProjectID or LayerID

* Clear Code

* send() instead of json()

---------

Co-authored-by: cubap <cubap@slu.edu>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Create sample.env

* Update sample.env

GitHub per @mepripri

* Update CODEOWNERS

* dev it and hotkeys

* 188 epic middleware to upgrade imported manifests (#209)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* 139 factor out type type dependencies (#211)

* determine data type by content

* Removing type dependencies

- Took controller and type out of controller
- Added a function to detect the data types and assign the correct collection

* matching tests to code move

* align with main

* Update driver.mjs (#217)

* 188 epic middleware to upgrade imported manifests (#218)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* rename redone

* This is Vault now

* test objects don't validate

* hulk smash 👊🏽

* _sub is no longer missing on invitees

* add temp sub to new user

* Update cd_dev.yaml

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Removing fileSystem from Github API (#214)

* Removing fileSystem from Github API

* Update ProjectFactory.mjs

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 220 services for bug reporting and feedback (#221)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* cicd (#222)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* 220 services for bug reporting and feedback (#224)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* explicitly adding CORS

* API call to Update Profile (#223)

* API call to Update Profile

* existingEmail and existingName

* Changes to comments

* Update User.mjs

* Save AnnotationCollection, Pages and Annotations to RERUM (#215)

* saveCollection to RERUM

* Adding Tinypen to Create RERUM Object

* Update exists.test.mjs

* Update exists.test.mjs

* Update Page.mjs

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* starting some adjustments

* better the tests

* headed home

* multiple ways to extract the data

* retest with suggestions

* layer/page halos

* percolating deletes

* setting up routes

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Import TPEN28 (#226)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Test restoration (#229)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* cleanup missing properties, changed method names

* just this route

* id shouldn't be optional here.

out of date test files dropped

* This should never break. What's up?

* bad merge

* Update exists_unit.test.mjs

* test is ugly

The page router needs a projectId as well to actually work

* Update end_to_end_unit.test.mjs

These two cannot work without a corresponding project, so it will need to be rewritten

* nested in router now

* Update exists.test.mjs

* un-mjs

* Refactor all .mjs files to .js and update imports. Closes #194 (#228)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Refactor all .mjs files to .js and update imports. Closes #194

* un-mjs

* npm update

* Hey I heard you like tests, so I put tests in your tests

* mjs > js

* no mjs, bad mjs

* fine

* habesroxx

* how bout now

* hide, Jest is coming

* runner love

* Update package-lock.json

* jest no like to run

* null != undefined

* default not defaulting

* fixes "id is not defined"

shoulda wrote test for this

* out of scope, out of effs

---------

Co-authored-by: Priyal Patel <mepripri0712@gmail.com>

* Update package-lock.json

* Using UID to get User Projects

* Update index.mjs

* no label is fine for Pages

* Origin Fetch

* SetHeader Origin

* Update index.js

* Getting User Projects (#237)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Using UID to get User Projects

* Update index.mjs

* Origin Fetch

* SetHeader Origin

* Update index.js

* Update index.js

* Update index.js

* Localhost URLS Validating (#242)

* Update index.js

* Update index.js

* Update validateURL.js

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* 231 create overwrite layer (#239)

* passing through the projectID

* some tests

* support page

* path in Page class generator

* no label is fine for Pages

* updating layers

* AI generated tests

* Update API.md

* oh auth.

* how'd we miss this?

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* just skip to move on

* Update Layer.js

* Update index.js

* merged mess unwrap

* dummy

* Update Project.js

* handle labels throughout

* unerring

* update layer organized

* return changes

* avoid hard crash

* prevent crash on a page 404

* full id

After I PUT a new label (this was successful) the "id" on the layer the db obj does not the the prefix and is just the hash.

* you get it

* vaildate all singular changes

* greedier try-catch

* Squashed commit of the following:

commit 44b75cf175f43ef5b7736cf7f7f9754b1dcd7f36
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab21d47427f3003c94b94b848f64f04850c
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f97723414967e86eccda10f29ab02c4d89e7a7e9
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c3015f32cb38d6c49cf25ac826a347310c26
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec19844b8a15fe4497eb877d6709f898487324
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2d76c8eb5226fc9b7773b695c13d690943
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5c7f8b729c845e05eacbfade3e8f354906
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e776954a4689ae174ee7a40f69c5c5d7a6
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084f2ebeaa966caf86999c3c2bc85300a314
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e02ca0a4fddf9df52e959a519e7368769d
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc0bc892a9391f4918bffb45e65fddae550
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* 422 if no pages are there.

* Update index.js

* Update index.js

* API entries

* typo

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* remove unused file

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>

* cherrypicked

* This spot in updateText too

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>

* 276 upgrade temp ids referenced in rerum data (#296)

* Development (#234)

* update metadata (#171)

* update metadata

* modify route name and db.update

* update db.update dependent

* cleanup

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* quickfix

* cleanup

* modify db.update to receive one param {data, collection}

* nodiff

* restore action(data, collection) structure

* undiff

* Changed Collections Parameter for Save()

* Removing /:id put Call

* Removing the Limit from express.json()

* Removing the Limit from express.json()

* getting started with Vault (#190)

* getting started with Vault

* newer Vault

* tests

* removing redundant code

* proper tests passing

* sample Vault

* Bryan's refusal to .jsonld makes this not work as expected

* loading resources

This is incomplete by design. We need to ask Vault to add any resources we want resolved

* expanding the Manifest a bit

* touch up for merge

* touch up for merge

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Current Project IIIF manifest Creation (#187)

* Current Project IIIF manifest Creation

* Refactored the exportManifest() and endpoint name

* Changed the exportManifest() function

* TPEN ID error handled

* endpoint to move the manifest.json to TPEN-Static-Dev

* Changed @id to id

* Getting all Ids

* Console Clean up

* Added env variables

* Adding Imports

* Adding Imports

* Deleting Ids

* Updating Logic Added

* User not a member cannot change the manifest

* Removing project2

* Adding comments to functions

* add hotkeys service (#184)

* add hotkeys service

* hotkey endpoints

* aggregate hotkeys during project retrieval

* specify hotkey fields to include

* cleanup

* Update Hotkeys.js

* Update ProjectFactory.mjs

* Return hotkeys as an Array of Strings

* aligning with Class changes

* remove create, since .save is not acting correctly

* cleanup and drop .post

* tests restored

no Jest here, just checking exists.

* tests and sinon upgrade

* no db tests directly

* Update exists_unit.test.mjs

* putting post back in...

* adding create back with safety

* adding upsert to accomodate bad errors

* Update Hotkeys.js

* uncatch to let errors through

* expect the  errors to come back

* switch to jest tests

---------

Co-authored-by: cubap <cubap@slu.edu>

* hotifx

* hotfix for symbols.

* delete enabled

* Create API.md

* collaborators and users

* add markdown reader

* package for markdown

* Update API.md

* Update API.md

* touch

* ah codes

* proxy for internal use (#201)

* Endpoint to save changes for the new layer (#199)

* Adding endpoint to save changes from the layer

* Adding New Layer

* No Empty Label and no Annotations

* Updated new Layer

* Adding Items to partOf

* Changing id convention

* Removing updating layer

* Annotation Change

* Adding Delete Endpoint

* not sure...

This type of thing?

* Label Change

* Added Layer Class

* Adding rerum ids to delete and add

* Changing tests

* Update exists.test.mjs

* Changing LayerLabel

* Changes AnnotationCollection Structure

* Update Pages API

* Updating partOf Ids in case of any change

* Adding Layer Metadata Label Change

* example results as a base for comments, delete these files before merge.

* Adding AddLayer Commenting Rest of the APIs

* Added DeleteLayer Back

* Deleting json files

* Updates to the comments

* Making Project to Layer Changes

* Renaming layerAnnotationCollection

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Error Handled for no ProjectID or LayerID

* Clear Code

* send() instead of json()

---------

Co-authored-by: cubap <cubap@slu.edu>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Create sample.env

* Update sample.env

GitHub per @mepripri

* Update CODEOWNERS

* dev it and hotkeys

* 188 epic middleware to upgrade imported manifests (#209)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* 139 factor out type type dependencies (#211)

* determine data type by content

* Removing type dependencies

- Took controller and type out of controller
- Added a function to detect the data types and assign the correct collection

* matching tests to code move

* align with main

* Update driver.mjs (#217)

* 188 epic middleware to upgrade imported manifests (#218)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* rename redone

* This is Vault now

* test objects don't validate

* hulk smash 👊🏽

* _sub is no longer missing on invitees

* add temp sub to new user

* Update cd_dev.yaml

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Removing fileSystem from Github API (#214)

* Removing fileSystem from Github API

* Update ProjectFactory.mjs

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 220 services for bug reporting and feedback (#221)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* cicd (#222)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* 220 services for bug reporting and feedback (#224)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* explicitly adding CORS

* API call to Update Profile (#223)

* API call to Update Profile

* existingEmail and e…
cubap added a commit that referenced this pull request Nov 10, 2025
* Development (#255)

* update metadata (#171)

* update metadata

* modify route name and db.update

* update db.update dependent

* cleanup

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* quickfix

* cleanup

* modify db.update to receive one param {data, collection}

* nodiff

* restore action(data, collection) structure

* undiff

* Changed Collections Parameter for Save()

* Removing /:id put Call

* Removing the Limit from express.json()

* Removing the Limit from express.json()

* getting started with Vault (#190)

* getting started with Vault

* newer Vault

* tests

* removing redundant code

* proper tests passing

* sample Vault

* Bryan's refusal to .jsonld makes this not work as expected

* loading resources

This is incomplete by design. We need to ask Vault to add any resources we want resolved

* expanding the Manifest a bit

* touch up for merge

* touch up for merge

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Current Project IIIF manifest Creation (#187)

* Current Project IIIF manifest Creation

* Refactored the exportManifest() and endpoint name

* Changed the exportManifest() function

* TPEN ID error handled

* endpoint to move the manifest.json to TPEN-Static-Dev

* Changed @id to id

* Getting all Ids

* Console Clean up

* Added env variables

* Adding Imports

* Adding Imports

* Deleting Ids

* Updating Logic Added

* User not a member cannot change the manifest

* Removing project2

* Adding comments to functions

* add hotkeys service (#184)

* add hotkeys service

* hotkey endpoints

* aggregate hotkeys during project retrieval

* specify hotkey fields to include

* cleanup

* Update Hotkeys.js

* Update ProjectFactory.mjs

* Return hotkeys as an Array of Strings

* aligning with Class changes

* remove create, since .save is not acting correctly

* cleanup and drop .post

* tests restored

no Jest here, just checking exists.

* tests and sinon upgrade

* no db tests directly

* Update exists_unit.test.mjs

* putting post back in...

* adding create back with safety

* adding upsert to accomodate bad errors

* Update Hotkeys.js

* uncatch to let errors through

* expect the  errors to come back

* switch to jest tests

---------

Co-authored-by: cubap <cubap@slu.edu>

* hotifx

* hotfix for symbols.

* delete enabled

* Create API.md

* collaborators and users

* add markdown reader

* package for markdown

* Update API.md

* Update API.md

* touch

* ah codes

* proxy for internal use (#201)

* Endpoint to save changes for the new layer (#199)

* Adding endpoint to save changes from the layer

* Adding New Layer

* No Empty Label and no Annotations

* Updated new Layer

* Adding Items to partOf

* Changing id convention

* Removing updating layer

* Annotation Change

* Adding Delete Endpoint

* not sure...

This type of thing?

* Label Change

* Added Layer Class

* Adding rerum ids to delete and add

* Changing tests

* Update exists.test.mjs

* Changing LayerLabel

* Changes AnnotationCollection Structure

* Update Pages API

* Updating partOf Ids in case of any change

* Adding Layer Metadata Label Change

* example results as a base for comments, delete these files before merge.

* Adding AddLayer Commenting Rest of the APIs

* Added DeleteLayer Back

* Deleting json files

* Updates to the comments

* Making Project to Layer Changes

* Renaming layerAnnotationCollection

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Error Handled for no ProjectID or LayerID

* Clear Code

* send() instead of json()

---------

Co-authored-by: cubap <cubap@slu.edu>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Create sample.env

* Update sample.env

GitHub per @mepripri

* Update CODEOWNERS

* dev it and hotkeys

* 188 epic middleware to upgrade imported manifests (#209)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* 139 factor out type type dependencies (#211)

* determine data type by content

* Removing type dependencies

- Took controller and type out of controller
- Added a function to detect the data types and assign the correct collection

* matching tests to code move

* align with main

* Update driver.mjs (#217)

* 188 epic middleware to upgrade imported manifests (#218)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* rename redone

* This is Vault now

* test objects don't validate

* hulk smash 👊🏽

* _sub is no longer missing on invitees

* add temp sub to new user

* Update cd_dev.yaml

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Removing fileSystem from Github API (#214)

* Removing fileSystem from Github API

* Update ProjectFactory.mjs

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 220 services for bug reporting and feedback (#221)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* cicd (#222)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* 220 services for bug reporting and feedback (#224)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* explicitly adding CORS

* API call to Update Profile (#223)

* API call to Update Profile

* existingEmail and existingName

* Changes to comments

* Update User.mjs

* Save AnnotationCollection, Pages and Annotations to RERUM (#215)

* saveCollection to RERUM

* Adding Tinypen to Create RERUM Object

* Update exists.test.mjs

* Update exists.test.mjs

* Update Page.mjs

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* starting some adjustments

* better the tests

* headed home

* multiple ways to extract the data

* retest with suggestions

* layer/page halos

* percolating deletes

* setting up routes

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Import TPEN28 (#226)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Test restoration (#229)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* cleanup missing properties, changed method names

* just this route

* id shouldn't be optional here.

out of date test files dropped

* This should never break. What's up?

* bad merge

* Update exists_unit.test.mjs

* test is ugly

The page router needs a projectId as well to actually work

* Update end_to_end_unit.test.mjs

These two cannot work without a corresponding project, so it will need to be rewritten

* nested in router now

* Update exists.test.mjs

* un-mjs

* Refactor all .mjs files to .js and update imports. Closes #194 (#228)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Refactor all .mjs files to .js and update imports. Closes #194

* un-mjs

* npm update

* Hey I heard you like tests, so I put tests in your tests

* mjs > js

* no mjs, bad mjs

* fine

* habesroxx

* how bout now

* hide, Jest is coming

* runner love

* Update package-lock.json

* jest no like to run

* null != undefined

* default not defaulting

* fixes "id is not defined"

shoulda wrote test for this

* out of scope, out of effs

---------

Co-authored-by: Priyal Patel <mepripri0712@gmail.com>

* Update package-lock.json

* Using UID to get User Projects

* Update index.mjs

* no label is fine for Pages

* Origin Fetch

* SetHeader Origin

* Update index.js

* Update index.js

* Update index.js

* Getting User Projects (#237)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Using UID to get User Projects

* Update index.mjs

* Origin Fetch

* SetHeader Origin

* Update index.js

* Update index.js

* Update index.js

* Update validateURL.js

* Localhost URLS Validating (#242)

* Update index.js

* Update index.js

* Update validateURL.js

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* 231 create overwrite layer (#239)

* passing through the projectID

* some tests

* support page

* path in Page class generator

* no label is fine for Pages

* updating layers

* AI generated tests

* Update API.md

* oh auth.

* how'd we miss this?

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* just skip to move on

* Update Layer.js

* Update index.js

* merged mess unwrap

* dummy

* Update Project.js

* handle labels throughout

* unerring

* update layer organized

* return changes

* avoid hard crash

* prevent crash on a page 404

* full id

After I PUT a new label (this was successful) the "id" on the layer the db obj does not the the prefix and is just the hash.

* you get it

* vaildate all singular changes

* greedier try-catch

* Squashed commit of the following:

commit 44b75cf175f43ef5b7736cf7f7f9754b1dcd7f36
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab21d47427f3003c94b94b848f64f04850c
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f97723414967e86eccda10f29ab02c4d89e7a7e9
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c3015f32cb38d6c49cf25ac826a347310c26
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec19844b8a15fe4497eb877d6709f898487324
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2d76c8eb5226fc9b7773b695c13d690943
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5c7f8b729c845e05eacbfade3e8f354906
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e776954a4689ae174ee7a40f69c5c5d7a6
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084f2ebeaa966caf86999c3c2bc85300a314
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e02ca0a4fddf9df52e959a519e7368769d
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc0bc892a9391f4918bffb45e65fddae550
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* 422 if no pages are there.

* Update index.js

* Update index.js

* API entries

* typo

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* remove unused file

* 235 save annotations (#240)

* passing through the projectID

* some tests

* support page

* path in Page class generator

* no label is fine for Pages

* updating layers

* AI generated tests

* Update API.md

* oh auth.

* how'd we miss this?

* Create lineRouter with new paths

remove line library and add methods to class

* getLine

* really loading lines

* line modification

* test barf

* aw thucks!

* Hi, I'm new here.

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* just skip to move on

* Update Layer.js

* Update index.js

* merged mess unwrap

* dummy

* Update Project.js

* handle labels throughout

* unerring

* update layer organized

* return changes

* avoid hard crash

* prevent crash on a page 404

* full id

After I PUT a new label (this was successful) the "id" on the layer the db obj does not the the prefix and is just the hash.

* you get it

* vaildate all singular changes

* greedier try-catch

* Squashed commit of the following:

commit 44b75cf175f43ef5b7736cf7f7f9754b1dcd7f36
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab21d47427f3003c94b94b848f64f04850c
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f97723414967e86eccda10f29ab02c4d89e7a7e9
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c3015f32cb38d6c49cf25ac826a347310c26
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec19844b8a15fe4497eb877d6709f898487324
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2d76c8eb5226fc9b7773b695c13d690943
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5c7f8b729c845e05eacbfade3e8f354906
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e776954a4689ae174ee7a40f69c5c5d7a6
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084f2ebeaa966caf86999c3c2bc85300a314
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e02ca0a4fddf9df52e959a519e7368769d
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc0bc892a9391f4918bffb45e65fddae550
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* Squashed commit of the following:

commit 44b75cf175f43ef5b7736cf7f7f9754b1dcd7f36
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab21d47427f3003c94b94b848f64f04850c
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f97723414967e86eccda10f29ab02c4d89e7a7e9
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c3015f32cb38d6c49cf25ac826a347310c26
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec19844b8a15fe4497eb877d6709f898487324
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2d76c8eb5226fc9b7773b695c13d690943
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5c7f8b729c845e05eacbfade3e8f354906
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e776954a4689ae174ee7a40f69c5c5d7a6
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084f2ebeaa966caf86999c3c2bc85300a314
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e02ca0a4fddf9df52e959a519e7368769d
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc0bc892a9391f4918bffb45e65fddae550
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* 422 if no pages are there.

* Update index.js

* Update index.js

* Update index.js

* since I'm here...

moved some functions into their own space

* teehee

* Make it so.

* fixed GET /line/:id

* page isn't a page?

* undata

* more details in data objects

* Update Line.js

* load it for updates

* put overwrite in for updating pages

* unlog

* changing route format for compile trouble

* no test

* No. This is wrong and fills me with hate.

* quick code comment

* patches for PATCHes

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 230 clean up project routers (#245)

* Development (#234)

* update metadata (#171)

* update metadata

* modify route name and db.update

* update db.update dependent

* cleanup

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* quickfix

* cleanup

* modify db.update to receive one param {data, collection}

* nodiff

* restore action(data, collection) structure

* undiff

* Changed Collections Parameter for Save()

* Removing /:id put Call

* Removing the Limit from express.json()

* Removing the Limit from express.json()

* getting started with Vault (#190)

* getting started with Vault

* newer Vault

* tests

* removing redundant code

* proper tests passing

* sample Vault

* Bryan's refusal to .jsonld makes this not work as expected

* loading resources

This is incomplete by design. We need to ask Vault to add any resources we want resolved

* expanding the Manifest a bit

* touch up for merge

* touch up for merge

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Current Project IIIF manifest Creation (#187)

* Current Project IIIF manifest Creation

* Refactored the exportManifest() and endpoint name

* Changed the exportManifest() function

* TPEN ID error handled

* endpoint to move the manifest.json to TPEN-Static-Dev

* Changed @id to id

* Getting all Ids

* Console Clean up

* Added env variables

* Adding Imports

* Adding Imports

* Deleting Ids

* Updating Logic Added

* User not a member cannot change the manifest

* Removing project2

* Adding comments to functions

* add hotkeys service (#184)

* add hotkeys service

* hotkey endpoints

* aggregate hotkeys during project retrieval

* specify hotkey fields to include

* cleanup

* Update Hotkeys.js

* Update ProjectFactory.mjs

* Return hotkeys as an Array of Strings

* aligning with Class changes

* remove create, since .save is not acting correctly

* cleanup and drop .post

* tests restored

no Jest here, just checking exists.

* tests and sinon upgrade

* no db tests directly

* Update exists_unit.test.mjs

* putting post back in...

* adding create back with safety

* adding upsert to accomodate bad errors

* Update Hotkeys.js

* uncatch to let errors through

* expect the  errors to come back

* switch to jest tests

---------

Co-authored-by: cubap <cubap@slu.edu>

* hotifx

* hotfix for symbols.

* delete enabled

* Create API.md

* collaborators and users

* add markdown reader

* package for markdown

* Update API.md

* Update API.md

* touch

* ah codes

* proxy for internal use (#201)

* Endpoint to save changes for the new layer (#199)

* Adding endpoint to save changes from the layer

* Adding New Layer

* No Empty Label and no Annotations

* Updated new Layer

* Adding Items to partOf

* Changing id convention

* Removing updating layer

* Annotation Change

* Adding Delete Endpoint

* not sure...

This type of thing?

* Label Change

* Added Layer Class

* Adding rerum ids to delete and add

* Changing tests

* Update exists.test.mjs

* Changing LayerLabel

* Changes AnnotationCollection Structure

* Update Pages API

* Updating partOf Ids in case of any change

* Adding Layer Metadata Label Change

* example results as a base for comments, delete these files before merge.

* Adding AddLayer Commenting Rest of the APIs

* Added DeleteLayer Back

* Deleting json files

* Updates to the comments

* Making Project to Layer Changes

* Renaming layerAnnotationCollection

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Error Handled for no ProjectID or LayerID

* Clear Code

* send() instead of json()

---------

Co-authored-by: cubap <cubap@slu.edu>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Create sample.env

* Update sample.env

GitHub per @mepripri

* Update CODEOWNERS

* dev it and hotkeys

* 188 epic middleware to upgrade imported manifests (#209)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* 139 factor out type type dependencies (#211)

* determine data type by content

* Removing type dependencies

- Took controller and type out of controller
- Added a function to detect the data types and assign the correct collection

* matching tests to code move

* align with main

* Update driver.mjs (#217)

* 188 epic middleware to upgrade imported manifests (#218)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* rename redone

* This is Vault now

* test objects don't validate

* hulk smash 👊🏽

* _sub is no longer missing on invitees

* add temp sub to new user

* Update cd_dev.yaml

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Removing fileSystem from Github API (#214)

* Removing fileSystem from Github API

* Update ProjectFactory.mjs

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 220 services for bug reporting and feedback (#221)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* cicd (#222)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* 220 services for bug reporting and feedback (#224)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* explicitly adding CORS

* API call to Update Profile (#223)

* API call to Update Profile

* existingEmail and existingName

* Changes to comments

* Update User.mjs

* Save AnnotationCollection, Pages and Annotations to RERUM (#215)

* saveCollection to RERUM

* Adding Tinypen to Create RERUM Object

* Update exists.test.mjs

* Update exists.test.mjs

* Update Page.mjs

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* starting some adjustments

* better the tests

* headed home

* multiple ways to extract the data

* retest with suggestions

* layer/page halos

* percolating deletes

* setting up routes

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Import TPEN28 (#226)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Test restoration (#229)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* cleanup missing properties, changed method names

* just this route

* id shouldn't be optional here.

out of date test files dropped

* This should never break. What's up?

* bad merge

* Update exists_unit.test.mjs

* test is ugly

The page router needs a projectId as well to actually work

* Update end_to_end_unit.test.mjs

These two cannot work without a corresponding project, so it will need to be rewritten

* nested in router now

* Update exists.test.mjs

* un-mjs

* Refactor all .mjs files to .js and update imports. Closes #194 (#228)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Refactor all .mjs files to .js and update imports. Closes #194

* un-mjs

* npm update

* Hey I heard you like tests, so I put tests in your tests

* mjs > js

* no mjs, bad mjs

* fine

* habesroxx

* how bout now

* hide, Jest is coming

* runner love

* Update package-lock.json

* jest no like to run

* null != undefined

* default not defaulting

* fixes "id is not defined"

shoulda wrote test for this

* out of scope, out of effs

---------

Co-authored-by: Priyal Patel <mepripri0712@gmail.com>

* Update package-lock.json

* Using UID to get User Projects

* Update index.mjs

* no label is fine for Pages

* Origin Fetch

* SetHeader Origin

* Update index.js

* Getting User Projects (#237)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Using UID to get User Projects

* Update index.mjs

* Origin Fetch

* SetHeader Origin

* Update index.js

* Update index.js

* Update index.js

* Localhost URLS Validating (#242)

* Update index.js

* Update index.js

* Update validateURL.js

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* 231 create overwrite layer (#239)

* passing through the projectID

* some tests

* support page

* path in Page class generator

* no label is fine for Pages

* updating layers

* AI generated tests

* Update API.md

* oh auth.

* how'd we miss this?

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* just skip to move on

* Update Layer.js

* Update index.js

* merged mess unwrap

* dummy

* Update Project.js

* handle labels throughout

* unerring

* update layer organized

* return changes

* avoid hard crash

* prevent crash on a page 404

* full id

After I PUT a new label (this was successful) the "id" on the layer the db obj does not the the prefix and is just the hash.

* you get it

* vaildate all singular changes

* greedier try-catch

* Squashed commit of the following:

commit 44b75cf175f43ef5b7736cf7f7f9754b1dcd7f36
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab21d47427f3003c94b94b848f64f04850c
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f97723414967e86eccda10f29ab02c4d89e7a7e9
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c3015f32cb38d6c49cf25ac826a347310c26
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec19844b8a15fe4497eb877d6709f898487324
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2d76c8eb5226fc9b7773b695c13d690943
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5c7f8b729c845e05eacbfade3e8f354906
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e776954a4689ae174ee7a40f69c5c5d7a6
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084f2ebeaa966caf86999c3c2bc85300a314
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e02ca0a4fddf9df52e959a519e7368769d
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc0bc892a9391f4918bffb45e65fddae550
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* 422 if no pages are there.

* Update index.js

* Update index.js

* API entries

* typo

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* remove unused file

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>

* creating separate files

* cleanup imports

* yuck. This wasn't even AI - it just autocompleted to CJS

* more jest nonsense

* Final attempt

This runs but doesn't pass `allTests`

* Update exists_unit.test.js

* new Put for page at a time updates

* put update

for batch items

Update Line.js

Update Line.js

always set rerumid

save pageAndProject

* auth  fixes for testing

* Update index.js

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>

* Adding Tools to Project (#244)

* Adding Tools to Project

* getTools()

* remove getTools

* addTools and UpdateTools

* Update index.js

* Update index.js

* Update index.js

* Add a guard

* Tool guards

* Guards

* Comment Changes

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: cubap <cubap@slu.edu>

* Adding endpoint to add multiple lines to a page

* Update index.js

* Add project metrics to /my/projects (#227)

* Add project metrics to /my/profile

* fix failing test

* moving this for router use

* Relocating lastModified functions

- User gets a static to set pageId of last change
- line router sends change trigger
- shared utils gains functions that sort of static into Classes

* Update index.js

* tidy

* organized naming

* good to go

* one save behind

* Let's go

* better detail in modified

project:ID/page:ID

* Update privateProfile.js

---------

Co-authored-by: cubap <cubap@slu.edu>

* Update index.js

* co-op

* co-op

* co-op

* OK log time

* do 401 from TPEN2 the right way

* do 401 from TPEN2 the right way

* do 401 from TPEN2 the right way

* do 401 from TPEN2 the right way

* gotta import the function

* Update index.js

* Need to import Project

* Need to import Project

* Good to go

* Separating files

* add metarecords to new Projects (#254)

* 256 import creates bad ids (#257)

* correct id for new Layers

* set _id on imported project

* Update Layer.js

* always trim lastModified

* hotifx invite code

* Email invite, upgrade temp user (#259)

* Now we see it

* Need to do the agent in the GH action

* functioning demo

* touches

* touchup

* links

* links

* unused

* noted todo

* Use env variables instead of hard coded links

* Use env variables instead of hard coded links

* hotfix links in E-mail

* hotfix links in E-mail

* Align User With Project After Invite (#263)

* need to take one of those 'limitless' pills for this

* touchup

* renaming, documentation, cleanup, and better code integration

* renaming, documentation, cleanup, and better code integration

* renaming, documentation, cleanup, and better code integration

* renaming, documentation, cleanup, and better code integration

* Create New Project from One Image

* Update ProjectFactory.js

* Removing services

* Update ProjectFactory.js

* Update ProjectFactory.js

* MimeTypes

* cleanup

* Decline Project Invite - Service (#264)

* Add the decline route and route logic

* Unauthenticated /decline, Authenticated and Permission Checked /remove

* phew a lot more to it than anticipated

* changes from testing and thinking

* All the way through with the right UX

* All the way through with the right UX

* All the way through with the right UX

* cleanup

* cleanup

* cleanup

* support text/plain request bodies (#268)

* Implement optimistic locking for page and line updates

Adds optimistic locking to Layer and Page updates, propagates version conflict handling through the database controller, and introduces utility functions for consistent conflict response and retry logic. Updates line and page routes to use optimistic locking and handle version conflicts gracefully, improving data integrity in concurrent editing scenarios.

* IIIF Image Service (#266)

* IIIF Image Service

* Update ProjectFactory.js

* Update ProjectFactory.js

* 270 multiple updates to a page in parallel discards data (#271)

* expect text

* complicating updateText

* all sorts of variants

* allow no body

* Implement optimistic locking for page and line updates

Adds optimistic locking to Layer and Page updates, propagates version conflict handling through the database controller, and introduces utility functions for consistent conflict response and retry logic. Updates line and page routes to use optimistic locking and handle version conflicts gracefully, improving data integrity in concurrent editing scenarios.

* Update index.js

* error is currentVersion

* in route

* stop double res

* Update index.js

* Allow new header in common cors

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Copy Project API (#272)

* Copy Project API

* Duplicating Annotations

* Copy without annotation and copy with group api

* Project Cutomization API

* Hotkeys Guard and include items in DB

* Changes for API, refactoring

* Group Members Change

* Creator as OWNER and add one layer if no layers

* Update ProjectFactory.js

* MongoDB ProjectObject

* Update ProjectFactory.js

* Update ProjectFactory.js

* Update ProjectFactory.js

* Fixing ProjectDB Object

* Documentation around module concept

* Project label update API (#273)

* Project label update API

* picky

* make this a patch request

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Level 0 image fix for TPEN28 imported Projects (#274)

* Level 0 image fix for TPEN28 imported Projects

* Update ProjectFactory.js

* .id

* Adding Creator (#275)

* Adding Creator

* Export Changes

* creator Null in constructor

* Update Page.js

* creator

* creator on rerum

* Prev and Next

* asProjectLine() removed

* Update Line.js

* User as Creator

* Removed extra code

* Save to Rerum Canvas

* creator as agent and removing export creator

* Update Page.js

* line user

* Page user

* projectCreateRouter user

* Update index.js

* Prev and next Id for get Page

* Pages next and prev and partOf

* Use env variable instead of hard coded RERUM id prefixes

* oo i c.  sorry.  undo.

* User Agent as creator

* Add Layer to work

* Adding creator to manifest

* creator for image and temp layer

* creator remove

* Update ProjectFactory.js

* Page creator

* Update index.js

* Page creator

* Page creator findby

* Update index.js

* remove

* getManifestItems

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Layer and Page Management Endpoints (#278)

* Fixes for updating Layers and Pages

* Prepare PR

* remove console.log()s

* remove console.log()s

* polish

* polish

* optimize

* touchups from testing

* Revert "Layer and Page Management Endpoints (#278)" (#283)

This reverts commit c98a41c5ad5f8f32cac07c1f787430de05c391bd.

* Project Export Message (#277)

* Project Export Message

* checkIfUrlExists Utility

* status update

* docs

* deployment

* Update ProjectFactory.js

* Throughput errors

* guarded clause

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Layer and Page Management Endpoints (#284)

* Fixes for updating Layers and Pages

* Prepare PR

* remove console.log()s

* remove console.log()s

* polish

* polish

* optimize

* touchups from testing

* Reconfigure things so Page() and Layer() make more sense together

* cleaning

* changes from testing

* changes from testing

* touchup the gets

* ready pr

* page content change detection

* remove extra whitespace

* page content change detection

* page content change detection

* already checked userId

* already checked userId

* Only update if the page has changed when rebuilding order

* record page modition when page is reordered

* it is a typo

* Allow falsey prev and next in Page.update()

* All those tendrils making sure a page will update its layer if it needs to

* All those tendrils making sure a page will update its layer if it needs to

* change for clarity

* change for clarity

* change for clarity

* change for clarity

* touch-ups from reading through it

* updates from reading through and logs for tracing to make sure it all works

* updates from reading through and logs for tracing to make sure it all works

* continue refactor

* Find temps by id

* continue refactor

* No items for AnnotationCollection

* Use rerum ids for temps that will be upgraded

* get rid of duplicate call

* get rid of duplicate call

* Handle layer temp id problem as well

* polish

* oops

* update documentation

* Update Copy Project Layer Fix (#285)

* Update Copy Project Layer Fix

* update returned json when resolving temp id for page

* let these be null, not undefined

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Project export message (#286)

* Project Export Message

* checkIfUrlExists Utility

* status update

* docs

* deployment

* Update ProjectFactory.js

* Throughput errors

* guarded clause

* Failure State

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Page and Layer Label Hotfix (#287)

* Page and Layer Label Hotfix

* Update Page.js

* Pair Coding Hotfixes (#288)

* ok

* ok

* logs

* 'none'

* labels

* Page label

* operation logs

* withOptimisticLocking operation function

* updatePageAndProject() 4 paramter contentChange

* removing logs

* undo

---------

Co-authored-by: Priyal Patel <mepripri0712@gmail.com>

* ugh

* ugh

* ugh

* ugh

* ugh

* ugh

* ugh

* ugh

* remove logs from testing ugh

* Project Tools Fix (#290)

* Project Tools Fix

* no return here

* Touch up for errors

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* ah forgot to commit touchups

* Leave Project Endpoint (#289)

* If you love them let them go

* polish

* Creator on text and bounds (#294)

* Development (#234)

* update metadata (#171)

* update metadata

* modify route name and db.update

* update db.update dependent

* cleanup

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* quickfix

* cleanup

* modify db.update to receive one param {data, collection}

* nodiff

* restore action(data, collection) structure

* undiff

* Changed Collections Parameter for Save()

* Removing /:id put Call

* Removing the Limit from express.json()

* Removing the Limit from express.json()

* getting started with Vault (#190)

* getting started with Vault

* newer Vault

* tests

* removing redundant code

* proper tests passing

* sample Vault

* Bryan's refusal to .jsonld makes this not work as expected

* loading resources

This is incomplete by design. We need to ask Vault to add any resources we want resolved

* expanding the Manifest a bit

* touch up for merge

* touch up for merge

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Current Project IIIF manifest Creation (#187)

* Current Project IIIF manifest Creation

* Refactored the exportManifest() and endpoint name

* Changed the exportManifest() function

* TPEN ID error handled

* endpoint to move the manifest.json to TPEN-Static-Dev

* Changed @id to id

* Getting all Ids

* Console Clean up

* Added env variables

* Adding Imports

* Adding Imports

* Deleting Ids

* Updating Logic Added

* User not a member cannot change the manifest

* Removing project2

* Adding comments to functions

* add hotkeys service (#184)

* add hotkeys service

* hotkey endpoints

* aggregate hotkeys during project retrieval

* specify hotkey fields to include

* cleanup

* Update Hotkeys.js

* Update ProjectFactory.mjs

* Return hotkeys as an Array of Strings

* aligning with Class changes

* remove create, since .save is not acting correctly

* cleanup and drop .post

* tests restored

no Jest here, just checking exists.

* tests and sinon upgrade

* no db tests directly

* Update exists_unit.test.mjs

* putting post back in...

* adding create back with safety

* adding upsert to accomodate bad errors

* Update Hotkeys.js

* uncatch to let errors through

* expect the  errors to come back

* switch to jest tests

---------

Co-authored-by: cubap <cubap@slu.edu>

* hotifx

* hotfix for symbols.

* delete enabled

* Create API.md

* collaborators and users

* add markdown reader

* package for markdown

* Update API.md

* Update API.md

* touch

* ah codes

* proxy for internal use (#201)

* Endpoint to save changes for the new layer (#199)

* Adding endpoint to save changes from the layer

* Adding New Layer

* No Empty Label and no Annotations

* Updated new Layer

* Adding Items to partOf

* Changing id convention

* Removing updating layer

* Annotation Change

* Adding Delete Endpoint

* not sure...

This type of thing?

* Label Change

* Added Layer Class

* Adding rerum ids to delete and add

* Changing tests

* Update exists.test.mjs

* Changing LayerLabel

* Changes AnnotationCollection Structure

* Update Pages API

* Updating partOf Ids in case of any change

* Adding Layer Metadata Label Change

* example results as a base for comments, delete these files before merge.

* Adding AddLayer Commenting Rest of the APIs

* Added DeleteLayer Back

* Deleting json files

* Updates to the comments

* Making Project to Layer Changes

* Renaming layerAnnotationCollection

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Error Handled for no ProjectID or LayerID

* Clear Code

* send() instead of json()

---------

Co-authored-by: cubap <cubap@slu.edu>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Create sample.env

* Update sample.env

GitHub per @mepripri

* Update CODEOWNERS

* dev it and hotkeys

* 188 epic middleware to upgrade imported manifests (#209)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* 139 factor out type type dependencies (#211)

* determine data type by content

* Removing type dependencies

- Took controller and type out of controller
- Added a function to detect the data types and assign the correct collection

* matching tests to code move

* align with main

* Update driver.mjs (#217)

* 188 epic middleware to upgrade imported manifests (#218)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* rename redone

* This is Vault now

* test objects don't validate

* hulk smash 👊🏽

* _sub is no longer missing on invitees

* add temp sub to new user

* Update cd_dev.yaml

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Removing fileSystem from Github API (#214)

* Removing fileSystem from Github API

* Update ProjectFactory.mjs

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 220 services for bug reporting and feedback (#221)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* cicd (#222)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* 220 services for bug reporting and feedback (#224)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* explicitly adding CORS

* API call to Update Profile (#223)

* API call to Update Profile

* existingEmail and existingName

* Changes to comments

* Update User.mjs

* Save AnnotationCollection, Pages and Annotations to RERUM (#215)

* saveCollection to RERUM

* Adding Tinypen to Create RERUM Object

* Update exists.test.mjs

* Update exists.test.mjs

* Update Page.mjs

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* starting some adjustments

* better the tests

* headed home

* multiple ways to extract the data

* retest with suggestions

* layer/page halos

* percolating deletes

* setting up routes

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Import TPEN28 (#226)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Test restoration (#229)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* cleanup missing properties, changed method names

* just this route

* id shouldn't be optional here.

out of date test files dropped

* This should never break. What's up?

* bad merge

* Update exists_unit.test.mjs

* test is ugly

The page router needs a projectId as well to actually work

* Update end_to_end_unit.test.mjs

These two cannot work without a corresponding project, so it will need to be rewritten

* nested in router now

* Update exists.test.mjs

* un-mjs

* Refactor all .mjs files to .js and update imports. Closes #194 (#228)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Refactor all .mjs files to .js and update imports. Closes #194

* un-mjs

* npm update

* Hey I heard you like tests, so I put tests in your tests

* mjs > js

* no mjs, bad mjs

* fine

* habesroxx

* how bout now

* hide, Jest is coming

* runner love

* Update package-lock.json

* jest no like to run

* null != undefined

* default not defaulting

* fixes "id is not defined"

shoulda wrote test for this

* out of scope, out of effs

---------

Co-authored-by: Priyal Patel <mepripri0712@gmail.com>

* Update package-lock.json

* Using UID to get User Projects

* Update index.mjs

* no label is fine for Pages

* Origin Fetch

* SetHeader Origin

* Update index.js

* Getting User Projects (#237)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Using UID to get User Projects

* Update index.mjs

* Origin Fetch

* SetHeader Origin

* Update index.js

* Update index.js

* Update index.js

* Localhost URLS Validating (#242)

* Update index.js

* Update index.js

* Update validateURL.js

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* 231 create overwrite layer (#239)

* passing through the projectID

* some tests

* support page

* path in Page class generator

* no label is fine for Pages

* updating layers

* AI generated tests

* Update API.md

* oh auth.

* how'd we miss this?

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* just skip to move on

* Update Layer.js

* Update index.js

* merged mess unwrap

* dummy

* Update Project.js

* handle labels throughout

* unerring

* update layer organized

* return changes

* avoid hard crash

* prevent crash on a page 404

* full id

After I PUT a new label (this was successful) the "id" on the layer the db obj does not the the prefix and is just the hash.

* you get it

* vaildate all singular changes

* greedier try-catch

* Squashed commit of the following:

commit 44b75cf175f43ef5b7736cf7f7f9754b1dcd7f36
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab21d47427f3003c94b94b848f64f04850c
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f97723414967e86eccda10f29ab02c4d89e7a7e9
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c3015f32cb38d6c49cf25ac826a347310c26
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec19844b8a15fe4497eb877d6709f898487324
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2d76c8eb5226fc9b7773b695c13d690943
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5c7f8b729c845e05eacbfade3e8f354906
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e776954a4689ae174ee7a40f69c5c5d7a6
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084f2ebeaa966caf86999c3c2bc85300a314
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e02ca0a4fddf9df52e959a519e7368769d
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc0bc892a9391f4918bffb45e65fddae550
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* 422 if no pages are there.

* Update index.js

* Update index.js

* API entries

* typo

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* remove unused file

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>

* cherrypicked

* This spot in updateText too

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>

* 276 upgrade temp ids referenced in rerum data (#296)

* Development (#234)

* update metadata (#171)

* update metadata

* modify route name and db.update

* update db.update dependent

* cleanup

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* quickfix

* cleanup

* modify db.update to receive one param {data, collection}

* nodiff

* restore action(data, collection) structure

* undiff

* Changed Collections Parameter for Save()

* Removing /:id put Call

* Removing the Limit from express.json()

* Removing the Limit from express.json()

* getting started with Vault (#190)

* getting started with Vault

* newer Vault

* tests

* removing redundant code

* proper tests passing

* sample Vault

* Bryan's refusal to .jsonld makes this not work as expected

* loading resources

This is incomplete by design. We need to ask Vault to add any resources we want resolved

* expanding the Manifest a bit

* touch up for merge

* touch up for merge

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Current Project IIIF manifest Creation (#187)

* Current Project IIIF manifest Creation

* Refactored the exportManifest() and endpoint name

* Changed the exportManifest() function

* TPEN ID error handled

* endpoint to move the manifest.json to TPEN-Static-Dev

* Changed @id to id

* Getting all Ids

* Console Clean up

* Added env variables

* Adding Imports

* Adding Imports

* Deleting Ids

* Updating Logic Added

* User not a member cannot change the manifest

* Removing project2

* Adding comments to functions

* add hotkeys service (#184)

* add hotkeys service

* hotkey endpoints

* aggregate hotkeys during project retrieval

* specify hotkey fields to include

* cleanup

* Update Hotkeys.js

* Update ProjectFactory.mjs

* Return hotkeys as an Array of Strings

* aligning with Class changes

* remove create, since .save is not acting correctly

* cleanup and drop .post

* tests restored

no Jest here, just checking exists.

* tests and sinon upgrade

* no db tests directly

* Update exists_unit.test.mjs

* putting post back in...

* adding create back with safety

* adding upsert to accomodate bad errors

* Update Hotkeys.js

* uncatch to let errors through

* expect the  errors to come back

* switch to jest tests

---------

Co-authored-by: cubap <cubap@slu.edu>

* hotifx

* hotfix for symbols.

* delete enabled

* Create API.md

* collaborators and users

* add markdown reader

* package for markdown

* Update API.md

* Update API.md

* touch

* ah codes

* proxy for internal use (#201)

* Endpoint to save changes for the new layer (#199)

* Adding endpoint to save changes from the layer

* Adding New Layer

* No Empty Label and no Annotations

* Updated new Layer

* Adding Items to partOf

* Changing id convention

* Removing updating layer

* Annotation Change

* Adding Delete Endpoint

* not sure...

This type of thing?

* Label Change

* Added Layer Class

* Adding rerum ids to delete and add

* Changing tests

* Update exists.test.mjs

* Changing LayerLabel

* Changes AnnotationCollection Structure

* Update Pages API

* Updating partOf Ids in case of any change

* Adding Layer Metadata Label Change

* example results as a base for comments, delete these files before merge.

* Adding AddLayer Commenting Rest of the APIs

* Added DeleteLayer Back

* Deleting json files

* Updates to the comments

* Making Project to Layer Changes

* Renaming layerAnnotationCollection

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Error Handled for no ProjectID or LayerID

* Clear Code

* send() instead of json()

---------

Co-authored-by: cubap <cubap@slu.edu>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Create sample.env

* Update sample.env

GitHub per @mepripri

* Update CODEOWNERS

* dev it and hotkeys

* 188 epic middleware to upgrade imported manifests (#209)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* 139 factor out type type dependencies (#211)

* determine data type by content

* Removing type dependencies

- Took controller and type out of controller
- Added a function to detect the data types and assign the correct collection

* matching tests to code move

* align with main

* Update driver.mjs (#217)

* 188 epic middleware to upgrade imported manifests (#218)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* rename redone

* This is Vault now

* test objects don't validate

* hulk smash 👊🏽

* _sub is no longer missing on invitees

* add temp sub to new user

* Update cd_dev.yaml

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Removing fileSystem from Github API (#214)

* Removing fileSystem from Github API

* Update ProjectFactory.mjs

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 220 services for bug reporting and feedback (#221)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* cicd (#222)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* 220 services for bug reporting and feedback (#224)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* explicitly adding CORS

* API call to Update Profile (#223)

* API call to Update Profile

* ex…
thehabes added a commit that referenced this pull request Nov 12, 2025
* Removing the Limit from express.json()

* Removing the Limit from express.json()

* getting started with Vault (#190)

* getting started with Vault

* newer Vault

* tests

* removing redundant code

* proper tests passing

* sample Vault

* Bryan's refusal to .jsonld makes this not work as expected

* loading resources

This is incomplete by design. We need to ask Vault to add any resources we want resolved

* expanding the Manifest a bit

* touch up for merge

* touch up for merge

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Current Project IIIF manifest Creation (#187)

* Current Project IIIF manifest Creation

* Refactored the exportManifest() and endpoint name

* Changed the exportManifest() function

* TPEN ID error handled

* endpoint to move the manifest.json to TPEN-Static-Dev

* Changed @id to id

* Getting all Ids

* Console Clean up

* Added env variables

* Adding Imports

* Adding Imports

* Deleting Ids

* Updating Logic Added

* User not a member cannot change the manifest

* Removing project2

* Adding comments to functions

* add hotkeys service (#184)

* add hotkeys service

* hotkey endpoints

* aggregate hotkeys during project retrieval

* specify hotkey fields to include

* cleanup

* Update Hotkeys.js

* Update ProjectFactory.mjs

* Return hotkeys as an Array of Strings

* aligning with Class changes

* remove create, since .save is not acting correctly

* cleanup and drop .post

* tests restored

no Jest here, just checking exists.

* tests and sinon upgrade

* no db tests directly

* Update exists_unit.test.mjs

* putting post back in...

* adding create back with safety

* adding upsert to accomodate bad errors

* Update Hotkeys.js

* uncatch to let errors through

* expect the  errors to come back

* switch to jest tests

---------

Co-authored-by: cubap <cubap@slu.edu>

* hotifx

* hotfix for symbols.

* delete enabled

* Create API.md

* collaborators and users

* add markdown reader

* package for markdown

* Update API.md

* Update API.md

* touch

* ah codes

* proxy for internal use (#201)

* Endpoint to save changes for the new layer (#199)

* Adding endpoint to save changes from the layer

* Adding New Layer

* No Empty Label and no Annotations

* Updated new Layer

* Adding Items to partOf

* Changing id convention

* Removing updating layer

* Annotation Change

* Adding Delete Endpoint

* not sure...

This type of thing?

* Label Change

* Added Layer Class

* Adding rerum ids to delete and add

* Changing tests

* Update exists.test.mjs

* Changing LayerLabel

* Changes AnnotationCollection Structure

* Update Pages API

* Updating partOf Ids in case of any change

* Adding Layer Metadata Label Change

* example results as a base for comments, delete these files before merge.

* Adding AddLayer Commenting Rest of the APIs

* Added DeleteLayer Back

* Deleting json files

* Updates to the comments

* Making Project to Layer Changes

* Renaming layerAnnotationCollection

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Error Handled for no ProjectID or LayerID

* Clear Code

* send() instead of json()

---------

Co-authored-by: cubap <cubap@slu.edu>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Create sample.env

* Update sample.env

GitHub per @mepripri

* Update CODEOWNERS

* dev it and hotkeys

* 188 epic middleware to upgrade imported manifests (#209)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* 139 factor out type type dependencies (#211)

* determine data type by content

* Removing type dependencies

- Took controller and type out of controller
- Added a function to detect the data types and assign the correct collection

* matching tests to code move

* align with main

* Update driver.mjs (#217)

* 188 epic middleware to upgrade imported manifests (#218)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* rename redone

* This is Vault now

* test objects don't validate

* hulk smash 👊🏽

* _sub is no longer missing on invitees

* add temp sub to new user

* Update cd_dev.yaml

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Removing fileSystem from Github API (#214)

* Removing fileSystem from Github API

* Update ProjectFactory.mjs

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 220 services for bug reporting and feedback (#221)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* cicd (#222)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* 220 services for bug reporting and feedback (#224)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* explicitly adding CORS

* API call to Update Profile (#223)

* API call to Update Profile

* existingEmail and existingName

* Changes to comments

* Update User.mjs

* Save AnnotationCollection, Pages and Annotations to RERUM (#215)

* saveCollection to RERUM

* Adding Tinypen to Create RERUM Object

* Update exists.test.mjs

* Update exists.test.mjs

* Update Page.mjs

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* starting some adjustments

* better the tests

* headed home

* multiple ways to extract the data

* retest with suggestions

* layer/page halos

* percolating deletes

* setting up routes

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Import TPEN28 (#226)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Test restoration (#229)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* cleanup missing properties, changed method names

* just this route

* id shouldn't be optional here.

out of date test files dropped

* This should never break. What's up?

* bad merge

* Update exists_unit.test.mjs

* test is ugly

The page router needs a projectId as well to actually work

* Update end_to_end_unit.test.mjs

These two cannot work without a corresponding project, so it will need to be rewritten

* nested in router now

* Update exists.test.mjs

* un-mjs

* Refactor all .mjs files to .js and update imports. Closes #194 (#228)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Refactor all .mjs files to .js and update imports. Closes #194

* un-mjs

* npm update

* Hey I heard you like tests, so I put tests in your tests

* mjs > js

* no mjs, bad mjs

* fine

* habesroxx

* how bout now

* hide, Jest is coming

* runner love

* Update package-lock.json

* jest no like to run

* null != undefined

* default not defaulting

* fixes "id is not defined"

shoulda wrote test for this

* out of scope, out of effs

---------

Co-authored-by: Priyal Patel <mepripri0712@gmail.com>

* Update package-lock.json

* Using UID to get User Projects

* Update index.mjs

* no label is fine for Pages

* Origin Fetch

* SetHeader Origin

* Update index.js

* Update index.js

* Update index.js

* Getting User Projects (#237)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Using UID to get User Projects

* Update index.mjs

* Origin Fetch

* SetHeader Origin

* Update index.js

* Update index.js

* Update index.js

* Update validateURL.js

* Localhost URLS Validating (#242)

* Update index.js

* Update index.js

* Update validateURL.js

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* 231 create overwrite layer (#239)

* passing through the projectID

* some tests

* support page

* path in Page class generator

* no label is fine for Pages

* updating layers

* AI generated tests

* Update API.md

* oh auth.

* how'd we miss this?

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* just skip to move on

* Update Layer.js

* Update index.js

* merged mess unwrap

* dummy

* Update Project.js

* handle labels throughout

* unerring

* update layer organized

* return changes

* avoid hard crash

* prevent crash on a page 404

* full id

After I PUT a new label (this was successful) the "id" on the layer the db obj does not the the prefix and is just the hash.

* you get it

* vaildate all singular changes

* greedier try-catch

* Squashed commit of the following:

commit 44b75cf175f43ef5b7736cf7f7f9754b1dcd7f36
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab21d47427f3003c94b94b848f64f04850c
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f97723414967e86eccda10f29ab02c4d89e7a7e9
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c3015f32cb38d6c49cf25ac826a347310c26
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec19844b8a15fe4497eb877d6709f898487324
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2d76c8eb5226fc9b7773b695c13d690943
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5c7f8b729c845e05eacbfade3e8f354906
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e776954a4689ae174ee7a40f69c5c5d7a6
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084f2ebeaa966caf86999c3c2bc85300a314
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e02ca0a4fddf9df52e959a519e7368769d
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc0bc892a9391f4918bffb45e65fddae550
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* 422 if no pages are there.

* Update index.js

* Update index.js

* API entries

* typo

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* remove unused file

* 235 save annotations (#240)

* passing through the projectID

* some tests

* support page

* path in Page class generator

* no label is fine for Pages

* updating layers

* AI generated tests

* Update API.md

* oh auth.

* how'd we miss this?

* Create lineRouter with new paths

remove line library and add methods to class

* getLine

* really loading lines

* line modification

* test barf

* aw thucks!

* Hi, I'm new here.

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* just skip to move on

* Update Layer.js

* Update index.js

* merged mess unwrap

* dummy

* Update Project.js

* handle labels throughout

* unerring

* update layer organized

* return changes

* avoid hard crash

* prevent crash on a page 404

* full id

After I PUT a new label (this was successful) the "id" on the layer the db obj does not the the prefix and is just the hash.

* you get it

* vaildate all singular changes

* greedier try-catch

* Squashed commit of the following:

commit 44b75cf175f43ef5b7736cf7f7f9754b1dcd7f36
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab21d47427f3003c94b94b848f64f04850c
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f97723414967e86eccda10f29ab02c4d89e7a7e9
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c3015f32cb38d6c49cf25ac826a347310c26
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec19844b8a15fe4497eb877d6709f898487324
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2d76c8eb5226fc9b7773b695c13d690943
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5c7f8b729c845e05eacbfade3e8f354906
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e776954a4689ae174ee7a40f69c5c5d7a6
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084f2ebeaa966caf86999c3c2bc85300a314
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e02ca0a4fddf9df52e959a519e7368769d
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc0bc892a9391f4918bffb45e65fddae550
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* Squashed commit of the following:

commit 44b75cf175f43ef5b7736cf7f7f9754b1dcd7f36
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab21d47427f3003c94b94b848f64f04850c
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f97723414967e86eccda10f29ab02c4d89e7a7e9
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c3015f32cb38d6c49cf25ac826a347310c26
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec19844b8a15fe4497eb877d6709f898487324
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2d76c8eb5226fc9b7773b695c13d690943
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5c7f8b729c845e05eacbfade3e8f354906
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e776954a4689ae174ee7a40f69c5c5d7a6
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084f2ebeaa966caf86999c3c2bc85300a314
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e02ca0a4fddf9df52e959a519e7368769d
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc0bc892a9391f4918bffb45e65fddae550
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* 422 if no pages are there.

* Update index.js

* Update index.js

* Update index.js

* since I'm here...

moved some functions into their own space

* teehee

* Make it so.

* fixed GET /line/:id

* page isn't a page?

* undata

* more details in data objects

* Update Line.js

* load it for updates

* put overwrite in for updating pages

* unlog

* changing route format for compile trouble

* no test

* No. This is wrong and fills me with hate.

* quick code comment

* patches for PATCHes

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 230 clean up project routers (#245)

* Development (#234)

* update metadata (#171)

* update metadata

* modify route name and db.update

* update db.update dependent

* cleanup

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* quickfix

* cleanup

* modify db.update to receive one param {data, collection}

* nodiff

* restore action(data, collection) structure

* undiff

* Changed Collections Parameter for Save()

* Removing /:id put Call

* Removing the Limit from express.json()

* Removing the Limit from express.json()

* getting started with Vault (#190)

* getting started with Vault

* newer Vault

* tests

* removing redundant code

* proper tests passing

* sample Vault

* Bryan's refusal to .jsonld makes this not work as expected

* loading resources

This is incomplete by design. We need to ask Vault to add any resources we want resolved

* expanding the Manifest a bit

* touch up for merge

* touch up for merge

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Current Project IIIF manifest Creation (#187)

* Current Project IIIF manifest Creation

* Refactored the exportManifest() and endpoint name

* Changed the exportManifest() function

* TPEN ID error handled

* endpoint to move the manifest.json to TPEN-Static-Dev

* Changed @id to id

* Getting all Ids

* Console Clean up

* Added env variables

* Adding Imports

* Adding Imports

* Deleting Ids

* Updating Logic Added

* User not a member cannot change the manifest

* Removing project2

* Adding comments to functions

* add hotkeys service (#184)

* add hotkeys service

* hotkey endpoints

* aggregate hotkeys during project retrieval

* specify hotkey fields to include

* cleanup

* Update Hotkeys.js

* Update ProjectFactory.mjs

* Return hotkeys as an Array of Strings

* aligning with Class changes

* remove create, since .save is not acting correctly

* cleanup and drop .post

* tests restored

no Jest here, just checking exists.

* tests and sinon upgrade

* no db tests directly

* Update exists_unit.test.mjs

* putting post back in...

* adding create back with safety

* adding upsert to accomodate bad errors

* Update Hotkeys.js

* uncatch to let errors through

* expect the  errors to come back

* switch to jest tests

---------

Co-authored-by: cubap <cubap@slu.edu>

* hotifx

* hotfix for symbols.

* delete enabled

* Create API.md

* collaborators and users

* add markdown reader

* package for markdown

* Update API.md

* Update API.md

* touch

* ah codes

* proxy for internal use (#201)

* Endpoint to save changes for the new layer (#199)

* Adding endpoint to save changes from the layer

* Adding New Layer

* No Empty Label and no Annotations

* Updated new Layer

* Adding Items to partOf

* Changing id convention

* Removing updating layer

* Annotation Change

* Adding Delete Endpoint

* not sure...

This type of thing?

* Label Change

* Added Layer Class

* Adding rerum ids to delete and add

* Changing tests

* Update exists.test.mjs

* Changing LayerLabel

* Changes AnnotationCollection Structure

* Update Pages API

* Updating partOf Ids in case of any change

* Adding Layer Metadata Label Change

* example results as a base for comments, delete these files before merge.

* Adding AddLayer Commenting Rest of the APIs

* Added DeleteLayer Back

* Deleting json files

* Updates to the comments

* Making Project to Layer Changes

* Renaming layerAnnotationCollection

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Error Handled for no ProjectID or LayerID

* Clear Code

* send() instead of json()

---------

Co-authored-by: cubap <cubap@slu.edu>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Create sample.env

* Update sample.env

GitHub per @mepripri

* Update CODEOWNERS

* dev it and hotkeys

* 188 epic middleware to upgrade imported manifests (#209)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* 139 factor out type type dependencies (#211)

* determine data type by content

* Removing type dependencies

- Took controller and type out of controller
- Added a function to detect the data types and assign the correct collection

* matching tests to code move

* align with main

* Update driver.mjs (#217)

* 188 epic middleware to upgrade imported manifests (#218)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* rename redone

* This is Vault now

* test objects don't validate

* hulk smash 👊🏽

* _sub is no longer missing on invitees

* add temp sub to new user

* Update cd_dev.yaml

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Removing fileSystem from Github API (#214)

* Removing fileSystem from Github API

* Update ProjectFactory.mjs

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 220 services for bug reporting and feedback (#221)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* cicd (#222)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* 220 services for bug reporting and feedback (#224)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* explicitly adding CORS

* API call to Update Profile (#223)

* API call to Update Profile

* existingEmail and existingName

* Changes to comments

* Update User.mjs

* Save AnnotationCollection, Pages and Annotations to RERUM (#215)

* saveCollection to RERUM

* Adding Tinypen to Create RERUM Object

* Update exists.test.mjs

* Update exists.test.mjs

* Update Page.mjs

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* starting some adjustments

* better the tests

* headed home

* multiple ways to extract the data

* retest with suggestions

* layer/page halos

* percolating deletes

* setting up routes

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Import TPEN28 (#226)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Test restoration (#229)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* cleanup missing properties, changed method names

* just this route

* id shouldn't be optional here.

out of date test files dropped

* This should never break. What's up?

* bad merge

* Update exists_unit.test.mjs

* test is ugly

The page router needs a projectId as well to actually work

* Update end_to_end_unit.test.mjs

These two cannot work without a corresponding project, so it will need to be rewritten

* nested in router now

* Update exists.test.mjs

* un-mjs

* Refactor all .mjs files to .js and update imports. Closes #194 (#228)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Refactor all .mjs files to .js and update imports. Closes #194

* un-mjs

* npm update

* Hey I heard you like tests, so I put tests in your tests

* mjs > js

* no mjs, bad mjs

* fine

* habesroxx

* how bout now

* hide, Jest is coming

* runner love

* Update package-lock.json

* jest no like to run

* null != undefined

* default not defaulting

* fixes "id is not defined"

shoulda wrote test for this

* out of scope, out of effs

---------

Co-authored-by: Priyal Patel <mepripri0712@gmail.com>

* Update package-lock.json

* Using UID to get User Projects

* Update index.mjs

* no label is fine for Pages

* Origin Fetch

* SetHeader Origin

* Update index.js

* Getting User Projects (#237)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Using UID to get User Projects

* Update index.mjs

* Origin Fetch

* SetHeader Origin

* Update index.js

* Update index.js

* Update index.js

* Localhost URLS Validating (#242)

* Update index.js

* Update index.js

* Update validateURL.js

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* 231 create overwrite layer (#239)

* passing through the projectID

* some tests

* support page

* path in Page class generator

* no label is fine for Pages

* updating layers

* AI generated tests

* Update API.md

* oh auth.

* how'd we miss this?

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* just skip to move on

* Update Layer.js

* Update index.js

* merged mess unwrap

* dummy

* Update Project.js

* handle labels throughout

* unerring

* update layer organized

* return changes

* avoid hard crash

* prevent crash on a page 404

* full id

After I PUT a new label (this was successful) the "id" on the layer the db obj does not the the prefix and is just the hash.

* you get it

* vaildate all singular changes

* greedier try-catch

* Squashed commit of the following:

commit 44b75cf175f43ef5b7736cf7f7f9754b1dcd7f36
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab21d47427f3003c94b94b848f64f04850c
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f97723414967e86eccda10f29ab02c4d89e7a7e9
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c3015f32cb38d6c49cf25ac826a347310c26
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec19844b8a15fe4497eb877d6709f898487324
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2d76c8eb5226fc9b7773b695c13d690943
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5c7f8b729c845e05eacbfade3e8f354906
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e776954a4689ae174ee7a40f69c5c5d7a6
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084f2ebeaa966caf86999c3c2bc85300a314
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e02ca0a4fddf9df52e959a519e7368769d
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc0bc892a9391f4918bffb45e65fddae550
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* 422 if no pages are there.

* Update index.js

* Update index.js

* API entries

* typo

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* remove unused file

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>

* creating separate files

* cleanup imports

* yuck. This wasn't even AI - it just autocompleted to CJS

* more jest nonsense

* Final attempt

This runs but doesn't pass `allTests`

* Update exists_unit.test.js

* new Put for page at a time updates

* put update

for batch items

Update Line.js

Update Line.js

always set rerumid

save pageAndProject

* auth  fixes for testing

* Update index.js

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>

* Adding Tools to Project (#244)

* Adding Tools to Project

* getTools()

* remove getTools

* addTools and UpdateTools

* Update index.js

* Update index.js

* Update index.js

* Add a guard

* Tool guards

* Guards

* Comment Changes

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: cubap <cubap@slu.edu>

* Adding endpoint to add multiple lines to a page

* Update index.js

* Add project metrics to /my/projects (#227)

* Add project metrics to /my/profile

* fix failing test

* moving this for router use

* Relocating lastModified functions

- User gets a static to set pageId of last change
- line router sends change trigger
- shared utils gains functions that sort of static into Classes

* Update index.js

* tidy

* organized naming

* good to go

* one save behind

* Let's go

* better detail in modified

project:ID/page:ID

* Update privateProfile.js

---------

Co-authored-by: cubap <cubap@slu.edu>

* Update index.js

* co-op

* co-op

* co-op

* OK log time

* do 401 from TPEN2 the right way

* do 401 from TPEN2 the right way

* do 401 from TPEN2 the right way

* do 401 from TPEN2 the right way

* gotta import the function

* Update index.js

* Need to import Project

* Need to import Project

* Good to go

* Separating files

* add metarecords to new Projects (#254)

* 256 import creates bad ids (#257)

* correct id for new Layers

* set _id on imported project

* Update Layer.js

* always trim lastModified

* hotifx invite code

* Email invite, upgrade temp user (#259)

* Now we see it

* Need to do the agent in the GH action

* functioning demo

* touches

* touchup

* links

* links

* unused

* noted todo

* Use env variables instead of hard coded links

* Use env variables instead of hard coded links

* hotfix links in E-mail

* hotfix links in E-mail

* Align User With Project After Invite (#263)

* need to take one of those 'limitless' pills for this

* touchup

* renaming, documentation, cleanup, and better code integration

* renaming, documentation, cleanup, and better code integration

* renaming, documentation, cleanup, and better code integration

* renaming, documentation, cleanup, and better code integration

* Create New Project from One Image

* Update ProjectFactory.js

* Removing services

* Update ProjectFactory.js

* Update ProjectFactory.js

* MimeTypes

* cleanup

* Decline Project Invite - Service (#264)

* Add the decline route and route logic

* Unauthenticated /decline, Authenticated and Permission Checked /remove

* phew a lot more to it than anticipated

* changes from testing and thinking

* All the way through with the right UX

* All the way through with the right UX

* All the way through with the right UX

* cleanup

* cleanup

* cleanup

* support text/plain request bodies (#268)

* Implement optimistic locking for page and line updates

Adds optimistic locking to Layer and Page updates, propagates version conflict handling through the database controller, and introduces utility functions for consistent conflict response and retry logic. Updates line and page routes to use optimistic locking and handle version conflicts gracefully, improving data integrity in concurrent editing scenarios.

* IIIF Image Service (#266)

* IIIF Image Service

* Update ProjectFactory.js

* Update ProjectFactory.js

* 270 multiple updates to a page in parallel discards data (#271)

* expect text

* complicating updateText

* all sorts of variants

* allow no body

* Implement optimistic locking for page and line updates

Adds optimistic locking to Layer and Page updates, propagates version conflict handling through the database controller, and introduces utility functions for consistent conflict response and retry logic. Updates line and page routes to use optimistic locking and handle version conflicts gracefully, improving data integrity in concurrent editing scenarios.

* Update index.js

* error is currentVersion

* in route

* stop double res

* Update index.js

* Allow new header in common cors

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Copy Project API (#272)

* Copy Project API

* Duplicating Annotations

* Copy without annotation and copy with group api

* Project Cutomization API

* Hotkeys Guard and include items in DB

* Changes for API, refactoring

* Group Members Change

* Creator as OWNER and add one layer if no layers

* Update ProjectFactory.js

* MongoDB ProjectObject

* Update ProjectFactory.js

* Update ProjectFactory.js

* Update ProjectFactory.js

* Fixing ProjectDB Object

* Documentation around module concept

* Project label update API (#273)

* Project label update API

* picky

* make this a patch request

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Level 0 image fix for TPEN28 imported Projects (#274)

* Level 0 image fix for TPEN28 imported Projects

* Update ProjectFactory.js

* .id

* Adding Creator (#275)

* Adding Creator

* Export Changes

* creator Null in constructor

* Update Page.js

* creator

* creator on rerum

* Prev and Next

* asProjectLine() removed

* Update Line.js

* User as Creator

* Removed extra code

* Save to Rerum Canvas

* creator as agent and removing export creator

* Update Page.js

* line user

* Page user

* projectCreateRouter user

* Update index.js

* Prev and next Id for get Page

* Pages next and prev and partOf

* Use env variable instead of hard coded RERUM id prefixes

* oo i c.  sorry.  undo.

* User Agent as creator

* Add Layer to work

* Adding creator to manifest

* creator for image and temp layer

* creator remove

* Update ProjectFactory.js

* Page creator

* Update index.js

* Page creator

* Page creator findby

* Update index.js

* remove

* getManifestItems

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Layer and Page Management Endpoints (#278)

* Fixes for updating Layers and Pages

* Prepare PR

* remove console.log()s

* remove console.log()s

* polish

* polish

* optimize

* touchups from testing

* Revert "Layer and Page Management Endpoints (#278)" (#283)

This reverts commit c98a41c5ad5f8f32cac07c1f787430de05c391bd.

* Project Export Message (#277)

* Project Export Message

* checkIfUrlExists Utility

* status update

* docs

* deployment

* Update ProjectFactory.js

* Throughput errors

* guarded clause

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Layer and Page Management Endpoints (#284)

* Fixes for updating Layers and Pages

* Prepare PR

* remove console.log()s

* remove console.log()s

* polish

* polish

* optimize

* touchups from testing

* Reconfigure things so Page() and Layer() make more sense together

* cleaning

* changes from testing

* changes from testing

* touchup the gets

* ready pr

* page content change detection

* remove extra whitespace

* page content change detection

* page content change detection

* already checked userId

* already checked userId

* Only update if the page has changed when rebuilding order

* record page modition when page is reordered

* it is a typo

* Allow falsey prev and next in Page.update()

* All those tendrils making sure a page will update its layer if it needs to

* All those tendrils making sure a page will update its layer if it needs to

* change for clarity

* change for clarity

* change for clarity

* change for clarity

* touch-ups from reading through it

* updates from reading through and logs for tracing to make sure it all works

* updates from reading through and logs for tracing to make sure it all works

* continue refactor

* Find temps by id

* continue refactor

* No items for AnnotationCollection

* Use rerum ids for temps that will be upgraded

* get rid of duplicate call

* get rid of duplicate call

* Handle layer temp id problem as well

* polish

* oops

* update documentation

* Update Copy Project Layer Fix (#285)

* Update Copy Project Layer Fix

* update returned json when resolving temp id for page

* let these be null, not undefined

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Project export message (#286)

* Project Export Message

* checkIfUrlExists Utility

* status update

* docs

* deployment

* Update ProjectFactory.js

* Throughput errors

* guarded clause

* Failure State

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Page and Layer Label Hotfix (#287)

* Page and Layer Label Hotfix

* Update Page.js

* Pair Coding Hotfixes (#288)

* ok

* ok

* logs

* 'none'

* labels

* Page label

* operation logs

* withOptimisticLocking operation function

* updatePageAndProject() 4 paramter contentChange

* removing logs

* undo

---------

Co-authored-by: Priyal Patel <mepripri0712@gmail.com>

* ugh

* ugh

* ugh

* ugh

* ugh

* ugh

* ugh

* ugh

* remove logs from testing ugh

* Project Tools Fix (#290)

* Project Tools Fix

* no return here

* Touch up for errors

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* ah forgot to commit touchups

* Leave Project Endpoint (#289)

* If you love them let them go

* polish

* Creator on text and bounds (#294)

* Development (#234)

* update metadata (#171)

* update metadata

* modify route name and db.update

* update db.update dependent

* cleanup

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* quickfix

* cleanup

* modify db.update to receive one param {data, collection}

* nodiff

* restore action(data, collection) structure

* undiff

* Changed Collections Parameter for Save()

* Removing /:id put Call

* Removing the Limit from express.json()

* Removing the Limit from express.json()

* getting started with Vault (#190)

* getting started with Vault

* newer Vault

* tests

* removing redundant code

* proper tests passing

* sample Vault

* Bryan's refusal to .jsonld makes this not work as expected

* loading resources

This is incomplete by design. We need to ask Vault to add any resources we want resolved

* expanding the Manifest a bit

* touch up for merge

* touch up for merge

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Current Project IIIF manifest Creation (#187)

* Current Project IIIF manifest Creation

* Refactored the exportManifest() and endpoint name

* Changed the exportManifest() function

* TPEN ID error handled

* endpoint to move the manifest.json to TPEN-Static-Dev

* Changed @id to id

* Getting all Ids

* Console Clean up

* Added env variables

* Adding Imports

* Adding Imports

* Deleting Ids

* Updating Logic Added

* User not a member cannot change the manifest

* Removing project2

* Adding comments to functions

* add hotkeys service (#184)

* add hotkeys service

* hotkey endpoints

* aggregate hotkeys during project retrieval

* specify hotkey fields to include

* cleanup

* Update Hotkeys.js

* Update ProjectFactory.mjs

* Return hotkeys as an Array of Strings

* aligning with Class changes

* remove create, since .save is not acting correctly

* cleanup and drop .post

* tests restored

no Jest here, just checking exists.

* tests and sinon upgrade

* no db tests directly

* Update exists_unit.test.mjs

* putting post back in...

* adding create back with safety

* adding upsert to accomodate bad errors

* Update Hotkeys.js

* uncatch to let errors through

* expect the  errors to come back

* switch to jest tests

---------

Co-authored-by: cubap <cubap@slu.edu>

* hotifx

* hotfix for symbols.

* delete enabled

* Create API.md

* collaborators and users

* add markdown reader

* package for markdown

* Update API.md

* Update API.md

* touch

* ah codes

* proxy for internal use (#201)

* Endpoint to save changes for the new layer (#199)

* Adding endpoint to save changes from the layer

* Adding New Layer

* No Empty Label and no Annotations

* Updated new Layer

* Adding Items to partOf

* Changing id convention

* Removing updating layer

* Annotation Change

* Adding Delete Endpoint

* not sure...

This type of thing?

* Label Change

* Added Layer Class

* Adding rerum ids to delete and add

* Changing tests

* Update exists.test.mjs

* Changing LayerLabel

* Changes AnnotationCollection Structure

* Update Pages API

* Updating partOf Ids in case of any change

* Adding Layer Metadata Label Change

* example results as a base for comments, delete these files before merge.

* Adding AddLayer Commenting Rest of the APIs

* Added DeleteLayer Back

* Deleting json files

* Updates to the comments

* Making Project to Layer Changes

* Renaming layerAnnotationCollection

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Error Handled for no ProjectID or LayerID

* Clear Code

* send() instead of json()

---------

Co-authored-by: cubap <cubap@slu.edu>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Create sample.env

* Update sample.env

GitHub per @mepripri

* Update CODEOWNERS

* dev it and hotkeys

* 188 epic middleware to upgrade imported manifests (#209)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* 139 factor out type type dependencies (#211)

* determine data type by content

* Removing type dependencies

- Took controller and type out of controller
- Added a function to detect the data types and assign the correct collection

* matching tests to code move

* align with main

* Update driver.mjs (#217)

* 188 epic middleware to upgrade imported manifests (#218)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* rename redone

* This is Vault now

* test objects don't validate

* hulk smash 👊🏽

* _sub is no longer missing on invitees

* add temp sub to new user

* Update cd_dev.yaml

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Removing fileSystem from Github API (#214)

* Removing fileSystem from Github API

* Update ProjectFactory.mjs

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 220 services for bug reporting and feedback (#221)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* cicd (#222)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* 220 services for bug reporting and feedback (#224)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* explicitly adding CORS

* API call to Update Profile (#223)

* API call to Update Profile

* existingEmail and existingName

* Changes to comments

* Update User.mjs

* Save AnnotationCollection, Pages and Annotations to RERUM (#215)

* saveCollection to RERUM

* Adding Tinypen to Create RERUM Object

* Update exists.test.mjs

* Update exists.test.mjs

* Update Page.mjs

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* starting some adjustments

* better the tests

* headed home

* multiple ways to extract the data

* retest with suggestions

* layer/page halos

* percolating deletes

* setting up routes

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Import TPEN28 (#226)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Test restoration (#229)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* cleanup missing properties, changed method names

* just this route

* id shouldn't be optional here.

out of date test files dropped

* This should never break. What's up?

* bad merge

* Update exists_unit.test.mjs

* test is ugly

The page router needs a projectId as well to actually work

* Update end_to_end_unit.test.mjs

These two cannot work without a corresponding project, so it will need to be rewritten

* nested in router now

* Update exists.test.mjs

* un-mjs

* Refactor all .mjs files to .js and update imports. Closes #194 (#228)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Refactor all .mjs files to .js and update imports. Closes #194

* un-mjs

* npm update

* Hey I heard you like tests, so I put tests in your tests

* mjs > js

* no mjs, bad mjs

* fine

* habesroxx

* how bout now

* hide, Jest is coming

* runner love

* Update package-lock.json

* jest no like to run

* null != undefined

* default not defaulting

* fixes "id is not defined"

shoulda wrote test for this

* out of scope, out of effs

---------

Co-authored-by: Priyal Patel <mepripri0712@gmail.com>

* Update package-lock.json

* Using UID to get User Projects

* Update index.mjs

* no label is fine for Pages

* Origin Fetch

* SetHeader Origin

* Update index.js

* Getting User Projects (#237)

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Using UID to get User Projects

* Update index.mjs

* Origin Fetch

* SetHeader Origin

* Update index.js

* Update index.js

* Update index.js

* Localhost URLS Validating (#242)

* Update index.js

* Update index.js

* Update validateURL.js

---------

Co-authored-by: Patrick Cuba <cubap@slu.edu>

* 231 create overwrite layer (#239)

* passing through the projectID

* some tests

* support page

* path in Page class generator

* no label is fine for Pages

* updating layers

* AI generated tests

* Update API.md

* oh auth.

* how'd we miss this?

* old tests

* adjust for tests

* default exports for tests

* wrangling AI tests

Jest mock is a nightmare.

* just skip to move on

* Update Layer.js

* Update index.js

* merged mess unwrap

* dummy

* Update Project.js

* handle labels throughout

* unerring

* update layer organized

* return changes

* avoid hard crash

* prevent crash on a page 404

* full id

After I PUT a new label (this was successful) the "id" on the layer the db obj does not the the prefix and is just the hash.

* you get it

* vaildate all singular changes

* greedier try-catch

* Squashed commit of the following:

commit 44b75cf175f43ef5b7736cf7f7f9754b1dcd7f36
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Wed May 7 10:13:21 2025 -0500

    Localhost URLS Validating (#242)

    * Update index.js

    * Update index.js

    * Update validateURL.js

    ---------

    Co-authored-by: Patrick Cuba <cubap@slu.edu>

commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d
Merge: f977234 52edaab
Author: cubap <cubap@slu.edu>
Date:   Mon May 5 10:40:24 2025 -0500

    Merge branch 'development' into import-tpen28

commit 52edaab21d47427f3003c94b94b848f64f04850c
Author: Priyal Patel <52342511+mepripri@users.noreply.github.com>
Date:   Fri May 2 09:36:27 2025 -0500

    Getting User Projects (#237)

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Update index.mjs

    * Using UID to get User Projects

    * Update index.mjs

    * Origin Fetch

    * SetHeader Origin

    * Update index.js

    * Update index.js

    * Update index.js

commit f97723414967e86eccda10f29ab02c4d89e7a7e9
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:14:16 2025 -0500

    Update index.js

commit dde7c3015f32cb38d6c49cf25ac826a347310c26
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 13:05:02 2025 -0500

    SetHeader Origin

commit d2ec19844b8a15fe4497eb877d6709f898487324
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 12:47:32 2025 -0500

    Origin Fetch

commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65
Merge: 6e79a8d 2e5bbbd
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Thu May 1 09:31:12 2025 -0500

    Merge branch 'development' into import-tpen28

commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc
Merge: 443d0a2 9f102fb
Author: Patrick Cuba <cubap@slu.edu>
Date:   Wed Apr 30 22:38:43 2025 -0500

    Merge branch 'development' of https://github.com/CenterForDigitalHumanities/TPEN-services into development

commit 443d0a2d76c8eb5226fc9b7773b695c13d690943
Author: cubap <cubap@slu.edu>
Date:   Wed Apr 30 15:23:02 2025 -0500

    no label is fine for Pages

commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d
Merge: ac0182f 9f102fb
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 12:06:38 2025 -0500

    Merge branch 'development' into import-tpen28

commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Wed Apr 30 11:51:40 2025 -0500

    Update index.mjs

commit 673a5c5c7f8b729c845e05eacbfade3e8f354906
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Tue Apr 29 17:22:08 2025 -0500

    Using UID to get User Projects

commit afe664e776954a4689ae174ee7a40f69c5c5d7a6
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Mon Apr 28 10:16:27 2025 -0500

    Update index.mjs

commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:56:11 2025 -0500

    Update index.mjs

commit 0906084f2ebeaa966caf86999c3c2bc85300a314
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:50:54 2025 -0500

    Update index.mjs

commit 5dd077e02ca0a4fddf9df52e959a519e7368769d
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 14:33:53 2025 -0500

    Update index.mjs

commit e9971bc0bc892a9391f4918bffb45e65fddae550
Author: Priyal Patel <mepripri0712@gmail.com>
Date:   Fri Apr 25 12:18:30 2025 -0500

    Update index.mjs

* 422 if no pages are there.

* Update index.js

* Update index.js

* API entries

* typo

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* remove unused file

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>

* cherrypicked

* This spot in updateText too

---------

Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>
Co-authored-by: Onoja <onoja.jsdev@gmail.com>
Co-authored-by: mepripri <mepripri0712@gmail.com>
Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>

* 276 upgrade temp ids referenced in rerum data (#296)

* Development (#234)

* update metadata (#171)

* update metadata

* modify route name and db.update

* update db.update dependent

* cleanup

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* quickfix

* cleanup

* modify db.update to receive one param {data, collection}

* nodiff

* restore action(data, collection) structure

* undiff

* Changed Collections Parameter for Save()

* Removing /:id put Call

* Removing the Limit from express.json()

* Removing the Limit from express.json()

* getting started with Vault (#190)

* getting started with Vault

* newer Vault

* tests

* removing redundant code

* proper tests passing

* sample Vault

* Bryan's refusal to .jsonld makes this not work as expected

* loading resources

This is incomplete by design. We need to ask Vault to add any resources we want resolved

* expanding the Manifest a bit

* touch up for merge

* touch up for merge

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Current Project IIIF manifest Creation (#187)

* Current Project IIIF manifest Creation

* Refactored the exportManifest() and endpoint name

* Changed the exportManifest() function

* TPEN ID error handled

* endpoint to move the manifest.json to TPEN-Static-Dev

* Changed @id to id

* Getting all Ids

* Console Clean up

* Added env variables

* Adding Imports

* Adding Imports

* Deleting Ids

* Updating Logic Added

* User not a member cannot change the manifest

* Removing project2

* Adding comments to functions

* add hotkeys service (#184)

* add hotkeys service

* hotkey endpoints

* aggregate hotkeys during project retrieval

* specify hotkey fields to include

* cleanup

* Update Hotkeys.js

* Update ProjectFactory.mjs

* Return hotkeys as an Array of Strings

* aligning with Class changes

* remove create, since .save is not acting correctly

* cleanup and drop .post

* tests restored

no Jest here, just checking exists.

* tests and sinon upgrade

* no db tests directly

* Update exists_unit.test.mjs

* putting post back in...

* adding create back with safety

* adding upsert to accomodate bad errors

* Update Hotkeys.js

* uncatch to let errors through

* expect the  errors to come back

* switch to jest tests

---------

Co-authored-by: cubap <cubap@slu.edu>

* hotifx

* hotfix for symbols.

* delete enabled

* Create API.md

* collaborators and users

* add markdown reader

* package for markdown

* Update API.md

* Update API.md

* touch

* ah codes

* proxy for internal use (#201)

* Endpoint to save changes for the new layer (#199)

* Adding endpoint to save changes from the layer

* Adding New Layer

* No Empty Label and no Annotations

* Updated new Layer

* Adding Items to partOf

* Changing id convention

* Removing updating layer

* Annotation Change

* Adding Delete Endpoint

* not sure...

This type of thing?

* Label Change

* Added Layer Class

* Adding rerum ids to delete and add

* Changing tests

* Update exists.test.mjs

* Changing LayerLabel

* Changes AnnotationCollection Structure

* Update Pages API

* Updating partOf Ids in case of any change

* Adding Layer Metadata Label Change

* example results as a base for comments, delete these files before merge.

* Adding AddLayer Commenting Rest of the APIs

* Added DeleteLayer Back

* Deleting json files

* Updates to the comments

* Making Project to Layer Changes

* Renaming layerAnnotationCollection

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Removing UpdateOne() changes

* Error Handled for no ProjectID or LayerID

* Clear Code

* send() instead of json()

---------

Co-authored-by: cubap <cubap@slu.edu>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* Create sample.env

* Update sample.env

GitHub per @mepripri

* Update CODEOWNERS

* dev it and hotkeys

* 188 epic middleware to upgrade imported manifests (#209)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* 139 factor out type type dependencies (#211)

* determine data type by content

* Removing type dependencies

- Took controller and type out of controller
- Added a function to detect the data types and assign the correct collection

* matching tests to code move

* align with main

* Update driver.mjs (#217)

* 188 epic middleware to upgrade imported manifests (#218)

* bring in vault

improve Project building from Manifest import

* fixes #206

* add singleton vault as utility

fix #208

* cleanup logs

* rename redone

* This is Vault now

* test objects don't validate

* hulk smash 👊🏽

* _sub is no longer missing on invitees

* add temp sub to new user

* Update cd_dev.yaml

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Removing fileSystem from Github API (#214)

* Removing fileSystem from Github API

* Update ProjectFactory.mjs

---------

Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>

* 220 services for bug reporting and feedback (#221)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* cicd (#222)

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* Update ci_dev.yaml (#219)

* Update ci_dev.yaml

* Update cd_prod.yaml

* Update ci_prod.yaml

* 220 services for bug reporting and feedback (#224)

* file dump init

* services for feedback

* /feedback/feedback is not a good route

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* test results

* added docs and ES6 conversion

* what the Golden AI hell is adding imports from my docs?

* explicitly adding CORS

* API call to Update Profile (#223)

* API call to Update Profile

* existingEmail and existingName

* Changes to comments

* Update User.mjs

* Save AnnotationCollection, Pages and Annotations to RERUM (#215)

* saveCollection to RERUM

* Adding Tinypen to Create RERUM Object

* Update exists.test.mjs

* Update exists.test.mjs

* Update Page.mjs

* Update cd_dev.yaml

* stop if things are missing

* adding verify on main

* starting some adjustments

* better the tests

* headed home

* multiple ways to extr…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants