From 79a52e0f67c668ff5217547dc54288bfc8e9b06a Mon Sep 17 00:00:00 2001 From: Bryan Haberberger Date: Fri, 8 May 2026 16:15:01 -0500 Subject: [PATCH 1/6] `development` to `main` (#520) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 * 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 * 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 commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d Merge: f977234 52edaab Author: cubap 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 Date: Thu May 1 13:14:16 2025 -0500 Update index.js commit dde7c3015f32cb38d6c49cf25ac826a347310c26 Author: Priyal Patel Date: Thu May 1 13:05:02 2025 -0500 SetHeader Origin commit d2ec19844b8a15fe4497eb877d6709f898487324 Author: Priyal Patel Date: Thu May 1 12:47:32 2025 -0500 Origin Fetch commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65 Merge: 6e79a8d 2e5bbbd Author: Priyal Patel Date: Thu May 1 09:31:12 2025 -0500 Merge branch 'development' into import-tpen28 commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc Merge: 443d0a2 9f102fb Author: Patrick Cuba 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 Date: Wed Apr 30 15:23:02 2025 -0500 no label is fine for Pages commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d Merge: ac0182f 9f102fb Author: Priyal Patel Date: Wed Apr 30 12:06:38 2025 -0500 Merge branch 'development' into import-tpen28 commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce Author: Priyal Patel Date: Wed Apr 30 11:51:40 2025 -0500 Update index.mjs commit 673a5c5c7f8b729c845e05eacbfade3e8f354906 Author: Priyal Patel Date: Tue Apr 29 17:22:08 2025 -0500 Using UID to get User Projects commit afe664e776954a4689ae174ee7a40f69c5c5d7a6 Author: Priyal Patel Date: Mon Apr 28 10:16:27 2025 -0500 Update index.mjs commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2 Author: Priyal Patel Date: Fri Apr 25 14:56:11 2025 -0500 Update index.mjs commit 0906084f2ebeaa966caf86999c3c2bc85300a314 Author: Priyal Patel Date: Fri Apr 25 14:50:54 2025 -0500 Update index.mjs commit 5dd077e02ca0a4fddf9df52e959a519e7368769d Author: Priyal Patel Date: Fri Apr 25 14:33:53 2025 -0500 Update index.mjs commit e9971bc0bc892a9391f4918bffb45e65fddae550 Author: Priyal Patel 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 * 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 commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d Merge: f977234 52edaab Author: cubap 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 Date: Thu May 1 13:14:16 2025 -0500 Update index.js commit dde7c3015f32cb38d6c49cf25ac826a347310c26 Author: Priyal Patel Date: Thu May 1 13:05:02 2025 -0500 SetHeader Origin commit d2ec19844b8a15fe4497eb877d6709f898487324 Author: Priyal Patel Date: Thu May 1 12:47:32 2025 -0500 Origin Fetch commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65 Merge: 6e79a8d 2e5bbbd Author: Priyal Patel Date: Thu May 1 09:31:12 2025 -0500 Merge branch 'development' into import-tpen28 commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc Merge: 443d0a2 9f102fb Author: Patrick Cuba 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 Date: Wed Apr 30 15:23:02 2025 -0500 no label is fine for Pages commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d Merge: ac0182f 9f102fb Author: Priyal Patel Date: Wed Apr 30 12:06:38 2025 -0500 Merge branch 'development' into import-tpen28 commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce Author: Priyal Patel Date: Wed Apr 30 11:51:40 2025 -0500 Update index.mjs commit 673a5c5c7f8b729c845e05eacbfade3e8f354906 Author: Priyal Patel Date: Tue Apr 29 17:22:08 2025 -0500 Using UID to get User Projects commit afe664e776954a4689ae174ee7a40f69c5c5d7a6 Author: Priyal Patel Date: Mon Apr 28 10:16:27 2025 -0500 Update index.mjs commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2 Author: Priyal Patel Date: Fri Apr 25 14:56:11 2025 -0500 Update index.mjs commit 0906084f2ebeaa966caf86999c3c2bc85300a314 Author: Priyal Patel Date: Fri Apr 25 14:50:54 2025 -0500 Update index.mjs commit 5dd077e02ca0a4fddf9df52e959a519e7368769d Author: Priyal Patel Date: Fri Apr 25 14:33:53 2025 -0500 Update index.mjs commit e9971bc0bc892a9391f4918bffb45e65fddae550 Author: Priyal Patel 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 commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d Merge: f977234 52edaab Author: cubap 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 Date: Thu May 1 13:14:16 2025 -0500 Update index.js commit dde7c3015f32cb38d6c49cf25ac826a347310c26 Author: Priyal Patel Date: Thu May 1 13:05:02 2025 -0500 SetHeader Origin commit d2ec19844b8a15fe4497eb877d6709f898487324 Author: Priyal Patel Date: Thu May 1 12:47:32 2025 -0500 Origin Fetch commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65 Merge: 6e79a8d 2e5bbbd Author: Priyal Patel Date: Thu May 1 09:31:12 2025 -0500 Merge branch 'development' into import-tpen28 commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc Merge: 443d0a2 9f102fb Author: Patrick Cuba 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 Date: Wed Apr 30 15:23:02 2025 -0500 no label is fine for Pages commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d Merge: ac0182f 9f102fb Author: Priyal Patel Date: Wed Apr 30 12:06:38 2025 -0500 Merge branch 'development' into import-tpen28 commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce Author: Priyal Patel Date: Wed Apr 30 11:51:40 2025 -0500 Update index.mjs commit 673a5c5c7f8b729c845e05eacbfade3e8f354906 Author: Priyal Patel Date: Tue Apr 29 17:22:08 2025 -0500 Using UID to get User Projects commit afe664e776954a4689ae174ee7a40f69c5c5d7a6 Author: Priyal Patel Date: Mon Apr 28 10:16:27 2025 -0500 Update index.mjs commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2 Author: Priyal Patel Date: Fri Apr 25 14:56:11 2025 -0500 Update index.mjs commit 0906084f2ebeaa966caf86999c3c2bc85300a314 Author: Priyal Patel Date: Fri Apr 25 14:50:54 2025 -0500 Update index.mjs commit 5dd077e02ca0a4fddf9df52e959a519e7368769d Author: Priyal Patel Date: Fri Apr 25 14:33:53 2025 -0500 Update index.mjs commit e9971bc0bc892a9391f4918bffb45e65fddae550 Author: Priyal Patel 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 * 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 * 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 * 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 * 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 Co-authored-by: Bryan Haberberger * 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 * 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 * 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 * 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 * 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 commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d Merge: f977234 52edaab Author: cubap 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 Date: Thu May 1 13:14:16 2025 -0500 Update index.js commit dde7c3015f32cb38d6c49cf25ac826a347310c26 Author: Priyal Patel Date: Thu May 1 13:05:02 2025 -0500 SetHeader Origin commit d2ec19844b8a15fe4497eb877d6709f898487324 Author: Priyal Patel Date: Thu May 1 12:47:32 2025 -0500 Origin Fetch commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65 Merge: 6e79a8d 2e5bbbd Author: Priyal Patel Date: Thu May 1 09:31:12 2025 -0500 Merge branch 'development' into import-tpen28 commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc Merge: 443d0a2 9f102fb Author: Patrick Cuba 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 Date: Wed Apr 30 15:23:02 2025 -0500 no label is fine for Pages commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d Merge: ac0182f 9f102fb Author: Priyal Patel Date: Wed Apr 30 12:06:38 2025 -0500 Merge branch 'development' into import-tpen28 commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce Author: Priyal Patel Date: Wed Apr 30 11:51:40 2025 -0500 Update index.mjs commit 673a5c5c7f8b729c845e05eacbfade3e8f354906 Author: Priyal Patel Date: Tue Apr 29 17:22:08 2025 -0500 Using UID to get User Projects commit afe664e776954a4689ae174ee7a40f69c5c5d7a6 Author: Priyal Patel Date: Mon Apr 28 10:16:27 2025 -0500 Update index.mjs commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2 Author: Priyal Patel Date: Fri Apr 25 14:56:11 2025 -0500 Update index.mjs commit 0906084f2ebeaa966caf86999c3c2bc85300a314 Author: Priyal Patel Date: Fri Apr 25 14:50:54 2025 -0500 Update index.mjs commit 5dd077e02ca0a4fddf9df52e959a519e7368769d Author: Priyal Patel Date: Fri Apr 25 14:33:53 2025 -0500 Update index.mjs commit e9971bc0bc892a9391f4918bffb45e65fddae550 Author: Priyal Patel 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 * remove unused file --------- Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com> Co-authored-by: Bryan Haberberger Co-authored-by: Onoja Co-authored-by: mepripri 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 Co-authored-by: Onoja Co-authored-by: mepripri 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 Co-authored-by: cubap * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 Co-authored-by: Bryan Haberberger * 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 * 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 * 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 * 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 * 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 commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d Merge: f977234 52edaab Author: cubap 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 Date: Thu May 1 13:14:16 2025 -0500 Update index.js commit dde7c3015f32cb38d6c49cf25ac826a347310c26 Author: Priyal Patel Date: Thu May 1 13:05:02 2025 -0500 SetHeader Origin commit d2ec19844b8a15fe4497eb877d6709f898487324 Author: Priyal Patel Date: Thu May 1 12:47:32 2025 -0500 Origin Fetch commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65 Merge: 6e79a8d 2e5bbbd Author: Priyal Patel Date: Thu May 1 09:31:12 2025 -0500 Merge branch 'development' into import-tpen28 commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc Merge: 443d0a2 9f102fb Author: Patrick Cuba 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 Date: Wed Apr 30 15:23:02 2025 -0500 no label is fine for Pages commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d Merge: ac0182f 9f102fb Author: Priyal Patel Date: Wed Apr 30 12:06:38 2025 -0500 Merge branch 'development' into import-tpen28 commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce Author: Priyal Patel Date: Wed Apr 30 11:51:40 2025 -0500 Update index.mjs commit 673a5c5c7f8b729c845e05eacbfade3e8f354906 Author: Priyal Patel Date: Tue Apr 29 17:22:08 2025 -0500 Using UID to get User Projects commit afe664e776954a4689ae174ee7a40f69c5c5d7a6 Author: Priyal Patel Date: Mon Apr 28 10:16:27 2025 -0500 Update index.mjs commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2 Author: Priyal Patel Date: Fri Apr 25 14:56:11 2025 -0500 Update index.mjs commit 0906084f2ebeaa966caf86999c3c2bc85300a314 Author: Priyal Patel Date: Fri Apr 25 14:50:54 2025 -0500 Update index.mjs commit 5dd077e02ca0a4fddf9df52e959a519e7368769d Author: Priyal Patel Date: Fri Apr 25 14:33:53 2025 -0500 Update index.mjs commit e9971bc0bc892a9391f4918bffb45e65fddae550 Author: Priyal Patel 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 * remove unused file --------- Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com> Co-authored-by: Bryan Haberberger Co-authored-by: Onoja Co-authored-by: mepripri 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 Co-authored-by: Onoja Co-authored-by: mepripri 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 * 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 * 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 * 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 Co-authored-by: Bryan Haberberger * 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 * 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 * 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 * 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 * 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 commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d Merge: f977234 52edaab Author: cubap 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 Date: Thu May 1 13:14:16 2025 -0500 Update index.js commit dde7c3015f32cb38d6c49cf25ac826a347310c26 Author: Priyal Patel Date: Thu May 1 13:05:02 2025 -0500 SetHeader Origin commit d2ec19844b8a15fe4497eb877d6709f898487324 Author: Priyal Patel Date: Thu May 1 12:47:32 2025 -0500 Origin Fetch commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65 Merge: 6e79a8d 2e5bbbd Author: Priyal Patel Date: Thu May 1 09:31:12 2025 -0500 Merge branch 'development' into import-tpen28 commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc Merge: 443d0a2 9f102fb Author: Patrick Cuba 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 Date: Wed Apr 30 15:23:02 2025 -0500 no label is fine for Pages commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d Merge: ac0182f 9f102fb Author: Priyal Patel Date: Wed Apr 30 12:06:38 2025 -0500 Merge branch 'development' into import-tpen28 commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce Author: Priyal Patel Date: Wed Apr 30 11:51:40 2025 -0500 Update index.mjs commit 673a5c5c7f8b729c845e05eacbfade3e8f354906 Author: Priyal Patel Date: Tue Apr 29 17:22:08 2025 -0500 Using UID to get User Projects commit afe664e776954a4689ae174ee7a40f69c5c5d7a6 Author: Priyal Patel Date: Mon Apr 28 10:16:27 2025 -0500 Update index.mjs commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2 Author: Priyal Patel Date: Fri Apr 25 14:56:11 2025 -0500 Update index.mjs commit 0906084f2ebeaa966caf86999c3c2bc85300a314 Author: Priyal Patel Date: Fri Apr 25 14:50:54 2025 -0500 Update index.mjs commit 5dd077e02ca0a4fddf9df52e959a519e7368769d Author: Priyal Patel Date: Fri Apr 25 14:33:53 2025 -0500 Update index.mjs commit e9971bc0bc892a9391f4918bffb45e65fddae550 Author: Priyal Patel 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 * remove unused file --------- Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com> Co-authored-by: Bryan Haberberger Co-authored-by: Onoja Co-authored-by: mepripri 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 Co-authored-by: Onoja Co-authored-by: mepripri Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com> * Set line creator if not already defined (#305) 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. * Project Update Roles (#291) * Project Update Roles * Custom Role API * Update Change * changing variable name * upda;te comment * Use the static value from Group.defaultRoles * Revert "Merge branch 'development' into project-roles-fix" This reverts commit 44129962469b290b27c2ef011075ee792ece526a, reversing changes made to 2f3d09aac1e3dcf6f511b9043f65ba3b5d0b2494. * Roles update --------- Co-authored-by: Bryan Haberberger * Project roles fix (#306) * Project Update Roles * Custom Role API * Update Change * changing variable name * upda;te comment * Use the static value from Group.defaultRoles * Revert "Merge branch 'development' into project-roles-fix" This reverts commit 44129962469b290b27c2ef011075ee792ece526a, reversing changes made to 2f3d09aac1e3dcf6f511b9043f65ba3b5d0b2494. * Roles update * isDefaultRole test file --------- Co-authored-by: Bryan Haberberger * TPEN28 Fix (#300) * TPEN28 Fix * Update import28Router.js * service fix * function this * protocol * Update ProjectFactory.js * protocol * co-op fixing * change variables around page vs canvas * GET not POST --------- Co-authored-by: Bryan Haberberger * 295 contentchanged for layers and pages (#298) * Development (#234) * update metadata (#171) * update metadata * modify route name and db.update * update db.update dependent * cleanup --------- Co-authored-by: Bryan Haberberger * 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 * 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 * 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 Co-authored-by: Bryan Haberberger * 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 * 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 * 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 * 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 * 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 commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d Merge: f977234 52edaab Author: cubap 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 Date: Thu May 1 13:14:16 2025 -0500 Update index.js commit dde7c3015f32cb38d6c49cf25ac826a347310c26 Author: Priyal Patel Date: Thu May 1 13:05:02 2025 -0500 SetHeader Origin commit d2ec19844b8a15fe4497eb877d6709f898487324 Author: Priyal Patel Date: Thu May 1 12:47:32 2025 -0500 Origin Fetch commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65 Merge: 6e79a8d 2e5bbbd Author: Priyal Patel Date: Thu May 1 09:31:12 2025 -0500 Merge branch 'development' into import-tpen28 commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc Merge: 443d0a2 9f102fb Author: Patrick Cuba 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 Date: Wed Apr 30 15:23:02 2025 -0500 no label is fine for Pages commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d Merge: ac0182f 9f102fb Author: Priyal Patel Date: Wed Apr 30 12:06:38 2025 -0500 Merge branch 'development' into import-tpen28 commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce Author: Priyal Patel Date: Wed Apr 30 11:51:40 2025 -0500 Update index.mjs commit 673a5c5c7f8b729c845e05eacbfade3e8f354906 Author: Priyal Patel Date: Tue Apr 29 17:22:08 2025 -0500 Using UID to get User Projects commit afe664e776954a4689ae174ee7a40f69c5c5d7a6 Author: Priyal Patel Date: Mon Apr 28 10:16:27 2025 -0500 Update index.mjs commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2 Author: Priyal Patel Date: Fri Apr 25 14:56:11 2025 -0500 Update index.mjs commit 0906084f2ebeaa966caf86999c3c2bc85300a314 Author: Priyal Patel Date: Fri Apr 25 14:50:54 2025 -0500 Update index.mjs commit 5dd077e02ca0a4fddf9df52e959a519e7368769d Author: Priyal Patel Date: Fri Apr 25 14:33:53 2025 -0500 Update index.mjs commit e9971bc0bc892a9391f4918bffb45e65fddae550 Author: Priyal Patel 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 * remove unused file --------- Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com> Co-authored-by: Bryan Haberberger Co-authored-by: Onoja Co-authored-by: mepripri 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 Co-authored-by: Onoja Co-authored-by: mepripri Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com> * TPEN28 Multiple Users Fix (#307) Co-authored-by: Bryan Haberberger * public-profile (#299) * public-profile * API changed * Fix up error responses, and expectations for those responses in the tests. * /:lineid/text hotfix (#310) * Line needs to know creator to update text. generator is not set here. * Line needs to know creator to update text. generator is not set here. * Tpen28 Cookies Change (#311) * TPEN28 Multiple Users Fix * Update import28Router.js * Update import28Router.js --------- Co-authored-by: Bryan Haberberger * Protect PATCH /:projectId/label Endpoint (#308) * Putting some ideas together to play around * Putting some ideas together to play around * POC stuff * hmm something from Friday perhaps * improve ideas * This is all sus * Feeling good about these checks, start to prune out what we wouldn't need in this file for checking if strings are suspicious * hmmm * check label before loading project * Check JSON one level deep as well * clean this up a bit * clean this up a bit * rename stuff. add tests. * clean up, document, propose middleware solution as well as exported base logic that middleware uses for custom handling options. * dont need the id part here * Don't need these imports because we are using middleware now * Be less loggy during recursion * Simplify and log better * use 400 response code * oops get rid of this from testing * polish and open * polish and open * word in comment * word in comment * EOF char * word in comment * touch up * Better guard error for when label is falsey. Allow labels that are numbers by converting to string-number * ok fine undefined is actually an illegal json value so it won't get this far. * Check the 'just spaces' case to get the 400 in the route instead of letting the Class 500 * changes discussed at morning standup * Add protection to /project/metadata route (#316) * Get this ready for copilot * Add screenContentMiddleware to protect /project/metadata route - Import screenContentMiddleware from utilities/checkIfSuspicious.js - Add middleware to PUT /:projectId/metadata route after auth0Middleware - Remove TODO comment as protection is now implemented - Middleware will reject suspicious input with 400 error * undiff * Improvement to logic guard logs. Fix support for arrays of strings and numbers as a checkable value. * Improvement to logic guard logs. Fix support for arrays of strings and numbers as a checkable value. * Improvement to logic guard logs. Fix support for arrays of strings and numbers as a checkable value. * Update utilities/checkIfSuspicious.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * documentation, good to go * good spell check AI --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Protect POST /project/create with screenContentMiddleware to block suspicious input (utilities/checkIfSuspicious) (#319) * Protect /project/addRoles and /project/setRoles routes (#322) * project: protect addRoles and setRoles routes with screenContentMiddleware (checkIfSuspicious) * changes from testing * changes from testing * Add comprehensive CONTRIBUTING.md guide for Node.js, Git, and local development (#302) * Initial plan * Add comprehensive CONTRIBUTING.md guide Co-authored-by: cubap <1119165+cubap@users.noreply.github.com> * Fix license reference in CONTRIBUTING.md Co-authored-by: cubap <1119165+cubap@users.noreply.github.com> * Remove MariaDB references from CONTRIBUTING.md as it's not used in the project Co-authored-by: cubap <1119165+cubap@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: cubap <1119165+cubap@users.noreply.github.com> * Revise CONTRIBUTING.md for clarity and updates Updated contributing guidelines to clarify Auth0 usage and branch naming conventions. * Protect /project/create Route (#320) * Protect POST /project/create with screenContentMiddleware to block suspicious input (utilities/checkIfSuspicious) * Have to do more special checks on project data objects within the route. * add space lint * Pages are one more layer deep * addressing comments from standup * Changes from testing. The deeper data check will not error out on malformed data, it will skip it. Malformed data checks are performed by Project.create() which will respond with 400. It uses /utilities/validatePayload.js which is not working. It does not check if the value of required keys are of the correct type. * FIXME documentation * FIXME documentation * Remove unused optimistic locking utilities Deleted the handleVersionConflict and withOptimisticLocking functions from shared.js as they are no longer used. This helps clean up the codebase and reduce maintenance overhead. * Update utilities/shared.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update utilities/checkIfSuspicious.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Protect PUT /profile route (#331) * Since the route takes req.body wholesale, we have to loop the keys to check for suspicious stuff. THe middleware won't check all the keys. * Fix iteration over req.body in profile route Replaces array iteration with object key iteration in the /profile route to correctly validate all properties in req.body. This ensures suspicious data is properly detected and handled. --------- Co-authored-by: cubap * Default Tools and New Project with custom Tools (#328) * Default Tools * Create project with custom tools * Changes to comments * Guards for values * validate Tools * guards solve * url and enabled * check label dupe * web component add * tagname * Changes to Tools endpoint (#346) * Protect /project/import and /project/import-image routes (#326) * This makes some big decisions * I'm looking at you, language maps * o * touch ups from testing and documentation * remove old languageCodes * polish * polish * Since we check language maps, lets check metadata maps because they can have language maps. * Since we check language maps, lets check metadata maps because they can have language maps. * polish * Update utilities/checkIfSuspicious.js spellcheck Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update utilities/checkIfSuspicious.js spellcheck Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update utilities/checkIfSuspicious.js spellcheck Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * guard depth parameter too --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * suspicious test fix * Enhance /project/create request body validation to prevent malformed data including page, metadata, and tools structure validation (#327) * Initial plan * Enhanced validateProjectPayload function with comprehensive type and structure validation Co-authored-by: cubap <1119165+cubap@users.noreply.github.com> * Final implementation: Updated Project.js comment and verified end-to-end functionality Co-authored-by: cubap <1119165+cubap@users.noreply.github.com> * Simplify validation to return first error encountered instead of collecting all errors Co-authored-by: cubap <1119165+cubap@users.noreply.github.com> * Enhance validation to include page structure validation within layers - Add comprehensive page validation for layer.pages arrays - Validate page objects have required id and target properties - Validate page id and target are non-empty strings - Validate optional page label and items properties when present - Add 7 new test cases covering page validation scenarios - Resolves issue where malformed page objects were passing validation Addresses @thehabes feedback about pages not being validated. Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * Enhance metadata validation to enforce strict object structure - Validate each metadata item is an object (not string or other type) - Ensure metadata objects have only 'label' and 'value' properties - Validate label and value are non-empty strings - Reject metadata objects with extra properties - Add 6 comprehensive test cases covering all metadata validation scenarios Addresses @thehabes feedback about metadata structure validation. Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * Add comprehensive tools validation to validateProjectPayload - Validate tools property when present must be an array - Validate each tool object has required properties: label, toolName, location, custom - Validate toolName follows lowercase-with-hyphens pattern - Validate location is one of: dialog, pane, drawer, linked, sidebar - Validate URL format when present and not empty - Validate custom object structure and properties - Add 10 comprehensive test cases covering all tools validation scenarios - Now correctly rejects @thehabes example with tools: "tools" Addresses @thehabes feedback about tools property validation. Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * Remove package-lock.json changes introduced during npm install Revert package-lock.json to original state to avoid including dependency changes that were introduced during testing/development. Only code changes for validation should be included in the PR. Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: cubap <1119165+cubap@users.noreply.github.com> Co-authored-by: Patrick Cuba Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> Co-authored-by: Bryan Haberberger * newLineIndex === -1 logic * logical errors * Add suspicious content protection to POST /layer route (#350) * Initial plan * Initial analysis: Identify layer route protection requirements Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * Add screenContentMiddleware to POST /layer route for suspicious content protection Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * Remove unwanted package-lock.json changes from initial commit Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * Additional checks on expected complex structured layer data * Update layer/__tests__/layer_routes.test.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * no no we were skipping these for a reason * quick guards * cleanup * cleanup --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> Co-authored-by: Bryan Haberberger Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Add suspicious content protection to PUT /layer/:layerId route (#351) * Initial plan * Initial plan Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * Add screenContentMiddleware and hasSuspiciousLayerData protection to PUT /layer/:layerId route Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * Revert accidental package-lock.json changes Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * improvement from manual testing * touchup for logs --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> Co-authored-by: Bryan Haberberger * tagName fix for Tools (#349) * Protect PUT /page/:pageid Route (#352) * Suspicious checks in route * some cleanup * add stubs for tests * add stubs for tests * add stubs for tests * Shared embedded check model * polish * Clean up respondWithError imports * Update layer/index.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update layer/index.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * shared hasSuspiciousX() checks * shared hasSuspiciousX(x) checks * removed unused imports * polish * Move project data check into shared location as well --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Add suspicious content protection to POST /line/ route (#353) * Initial plan * Initial plan for adding suspicious content check to POST /line/ route Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * Add suspicious content protection to POST /line/ route Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * adjustments for tests * Minor adjustments * fix test error * fix test error * Revert package-lock.json changes Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * oo move this so it doesn't save lines * Update line/index.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * ah no undo check the whole anno, the body is checked in the recursion * polish * Add 'bodyValue' to common keys, since Web Annotation may use that key for TextualBody * Fair, screenContentMiddleware() duplicates the logic because we turn the body into an Array of 1 if it is an object. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> Co-authored-by: Bryan Haberberger Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Protect PUT /line/:lineid Route (#354) * Claude's try * Claude's changes * Claude's changes * polish * Update line/__tests__/lineRouter.test.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * This one is too easy to let AI do (#356) * Add suspicious input validation to feedback and bug report routes (#358) * Initial plan * Add suspicious input validation to feedback routes Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * oo forgot this test from the last pr * Remove tests * polish * Update line/__tests__/lineRouter.test.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> Co-authored-by: Bryan Haberberger Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Node 22.20.0 now * Page Viewer URL Change (#357) * Metadata Fix (#360) * Metadata Fix * Update validatePayload.js * language map * space * Update metadata validation Pair coding --------- Co-authored-by: Bryan Haberberger * hotfix test * metadata hotfix (#361) * Remove /manifest directory and unregister manifest routes (#363) * Remove /manifest directory and unregister manifest routes (#362) * Initial plan * Initial plan for removing /manifest directory and routes Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * Remove /manifest directory and unregister manifest routes Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * undiff * undiff --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * Add web-friendly API documentation for TPEN services (#301) * Initial plan * Add web-friendly API documentation Co-authored-by: cubap <1119165+cubap@users.noreply.github.com> * Initial analysis: identify changes needed for API documentation Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * Revert package-lock.json changes to original state Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: cubap <1119165+cubap@users.noreply.github.com> Co-authored-by: Bryan Haberberger Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * NPM Package Updates for package.json (#359) * Update Packages * Express wildcard syntax update * rename function for jest * Refactor to cancel unnecessary test and touch up existing tests * change documentation here, since the behavior from the package changed * Update tool configurations and URLs Enabled custom tags and URLs for 'inspect' and 'history' tools, disabled 'line-breaking', 'compare-pages', 'enigma', and 'latin-vulgate' tools, and updated the Enigma tool URL. * Roll back express-oauth2-jwt-bearer and undo refactor * Roll back express-oauth2-jwt-bearer and undo refactor * undiff * cleanup from npm-check recommendations (#364) --------- Co-authored-by: cubap * Update API.html styles for improved readability Adjusted background and text colors for code blocks, endpoints, and table of contents to enhance contrast and readability. Minor CSS cleanups and added missing newline at end of file. * fix line getter * fix line getter * fix line getter * Update project/projectToolsRouter.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * TPEN28 Tools Fix (#365) * TPEN28 Tools Fix * cookies * Preview Transcription Default Tool (#368) * Preview Transcription Default Tool * Compare Pages * Add Tests to Check If Routes Exist (#367) * prepare for AI * Thanks Claude * cleanup * cleanup license file name * cleanup * cleanup * add method detection to tests * cleanup * cleanup * Line Break URL (#371) * 369 support namespaced project metadata (#370) * add support for project_metadata namespaces Introduces customMetadataRouter with GET, POST, and PUT endpoints for namespaced project_metadata, including deep upsert logic and origin-based namespace detection. Updates ProjectFactory to include project_metadata, adds tests for the new router, and modifies projectReadRouter to filter project_metadata by allowed namespaces based on request origin and query parameters. Integrates the new router into the main project router. * load the project before updating * Refactor ProjectFactory formatting and spacing * Improve local and missing origin detection in namespace logic Enhanced getNamespacesToInclude to check both host and origin headers for local addresses. If origin cannot be determined or parsed, defaults to wildcard for better backward compatibility and local testing support. * Refactor project_metadata to interfaces in router * hi * Update customMetadataRouter.js * Add suspicious JSON check to custom metadata routes Moved suspicious content screening from middleware to inline checks in POST and PUT /project/:id/custom routes. Now uses isSuspiciousJSON to wrap suspicious payloads, improving security and flexibility. * sus checks --------- Co-authored-by: Bryan Haberberger * Location Fix (#372) * Create Project with Multiple Images (#373) * claude on development * Add Claude Code GitHub Actions workflow * Go prd (#374) * Development (#255) * update metadata (#171) * update metadata * modify route name and db.update * update db.update dependent * cleanup --------- Co-authored-by: Bryan Haberberger * 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 * 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 * 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 Co-authored-by: Bryan Haberberger * 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 * 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 * 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 * 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 * 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 commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d Merge: f977234 52edaab Author: cubap 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 Date: Thu May 1 13:14:16 2025 -0500 Update index.js commit dde7c3015f32cb38d6c49cf25ac826a347310c26 Author: Priyal Patel Date: Thu May 1 13:05:02 2025 -0500 SetHeader Origin commit d2ec19844b8a15fe4497eb877d6709f898487324 Author: Priyal Patel Date: Thu May 1 12:47:32 2025 -0500 Origin Fetch commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65 Merge: 6e79a8d 2e5bbbd Author: Priyal Patel Date: Thu May 1 09:31:12 2025 -0500 Merge branch 'development' into import-tpen28 commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc Merge: 443d0a2 9f102fb Author: Patrick Cuba 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 Date: Wed Apr 30 15:23:02 2025 -0500 no label is fine for Pages commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d Merge: ac0182f 9f102fb Author: Priyal Patel Date: Wed Apr 30 12:06:38 2025 -0500 Merge branch 'development' into import-tpen28 commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce Author: Priyal Patel Date: Wed Apr 30 11:51:40 2025 -0500 Update index.mjs commit 673a5c5c7f8b729c845e05eacbfade3e8f354906 Author: Priyal Patel Date: Tue Apr 29 17:22:08 2025 -0500 Using UID to get User Projects commit afe664e776954a4689ae174ee7a40f69c5c5d7a6 Author: Priyal Patel Date: Mon Apr 28 10:16:27 2025 -0500 Update index.mjs commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2 Author: Priyal Patel Date: Fri Apr 25 14:56:11 2025 -0500 Update index.mjs commit 0906084f2ebeaa966caf86999c3c2bc85300a314 Author: Priyal Patel Date: Fri Apr 25 14:50:54 2025 -0500 Update index.mjs commit 5dd077e02ca0a4fddf9df52e959a519e7368769d Author: Priyal Patel Date: Fri Apr 25 14:33:53 2025 -0500 Update index.mjs commit e9971bc0bc892a9391f4918bffb45e65fddae550 Author: Priyal Patel 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 * 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 commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d Merge: f977234 52edaab Author: cubap 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 Date: Thu May 1 13:14:16 2025 -0500 Update index.js commit dde7c3015f32cb38d6c49cf25ac826a347310c26 Author: Priyal Patel Date: Thu May 1 13:05:02 2025 -0500 SetHeader Origin commit d2ec19844b8a15fe4497eb877d6709f898487324 Author: Priyal Patel Date: Thu May 1 12:47:32 2025 -0500 Origin Fetch commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65 Merge: 6e79a8d 2e5bbbd Author: Priyal Patel Date: Thu May 1 09:31:12 2025 -0500 Merge branch 'development' into import-tpen28 commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc Merge: 443d0a2 9f102fb Author: Patrick Cuba 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 Date: Wed Apr 30 15:23:02 2025 -0500 no label is fine for Pages commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d Merge: ac0182f 9f102fb Author: Priyal Patel Date: Wed Apr 30 12:06:38 2025 -0500 Merge branch 'development' into import-tpen28 commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce Author: Priyal Patel Date: Wed Apr 30 11:51:40 2025 -0500 Update index.mjs commit 673a5c5c7f8b729c845e05eacbfade3e8f354906 Author: Priyal Patel Date: Tue Apr 29 17:22:08 2025 -0500 Using UID to get User Projects commit afe664e776954a4689ae174ee7a40f69c5c5d7a6 Author: Priyal Patel Date: Mon Apr 28 10:16:27 2025 -0500 Update index.mjs commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2 Author: Priyal Patel Date: Fri Apr 25 14:56:11 2025 -0500 Update index.mjs commit 0906084f2ebeaa966caf86999c3c2bc85300a314 Author: Priyal Patel Date: Fri Apr 25 14:50:54 2025 -0500 Update index.mjs commit 5dd077e02ca0a4fddf9df52e959a519e7368769d Author: Priyal Patel Date: Fri Apr 25 14:33:53 2025 -0500 Update index.mjs commit e9971bc0bc892a9391f4918bffb45e65fddae550 Author: Priyal Patel 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 commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d Merge: f977234 52edaab Author: cubap 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 Date: Thu May 1 13:14:16 2025 -0500 Update index.js commit dde7c3015f32cb38d6c49cf25ac826a347310c26 Author: Priyal Patel Date: Thu May 1 13:05:02 2025 -0500 SetHeader Origin commit d2ec19844b8a15fe4497eb877d6709f898487324 Author: Priyal Patel Date: Thu May 1 12:47:32 2025 -0500 Origin Fetch commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65 Merge: 6e79a8d 2e5bbbd Author: Priyal Patel Date: Thu May 1 09:31:12 2025 -0500 Merge branch 'development' into import-tpen28 commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc Merge: 443d0a2 9f102fb Author: Patrick Cuba 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 Date: Wed Apr 30 15:23:02 2025 -0500 no label is fine for Pages commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d Merge: ac0182f 9f102fb Author: Priyal Patel Date: Wed Apr 30 12:06:38 2025 -0500 Merge branch 'development' into import-tpen28 commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce Author: Priyal Patel Date: Wed Apr 30 11:51:40 2025 -0500 Update index.mjs commit 673a5c5c7f8b729c845e05eacbfade3e8f354906 Author: Priyal Patel Date: Tue Apr 29 17:22:08 2025 -0500 Using UID to get User Projects commit afe664e776954a4689ae174ee7a40f69c5c5d7a6 Author: Priyal Patel Date: Mon Apr 28 10:16:27 2025 -0500 Update index.mjs commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2 Author: Priyal Patel Date: Fri Apr 25 14:56:11 2025 -0500 Update index.mjs commit 0906084f2ebeaa966caf86999c3c2bc85300a314 Author: Priyal Patel Date: Fri Apr 25 14:50:54 2025 -0500 Update index.mjs commit 5dd077e02ca0a4fddf9df52e959a519e7368769d Author: Priyal Patel Date: Fri Apr 25 14:33:53 2025 -0500 Update index.mjs commit e9971bc0bc892a9391f4918bffb45e65fddae550 Author: Priyal Patel 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 * 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 * 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 * 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 * 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 Co-authored-by: Bryan Haberberger * 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 * 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 * 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 * 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 * 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 commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d Merge: f977234 52edaab Author: cubap 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 Date: Thu May 1 13:14:16 2025 -0500 Update index.js commit dde7c3015f32cb38d6c49cf25ac826a347310c26 Author: Priyal Patel Date: Thu May 1 13:05:02 2025 -0500 SetHeader Origin commit d2ec19844b8a15fe4497eb877d6709f898487324 Author: Priyal Patel Date: Thu May 1 12:47:32 2025 -0500 Origin Fetch commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65 Merge: 6e79a8d 2e5bbbd Author: Priyal Patel Date: Thu May 1 09:31:12 2025 -0500 Merge branch 'development' into import-tpen28 commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc Merge: 443d0a2 9f102fb Author: Patrick Cuba 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 Date: Wed Apr 30 15:23:02 2025 -0500 no label is fine for Pages commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d Merge: ac0182f 9f102fb Author: Priyal Patel Date: Wed Apr 30 12:06:38 2025 -0500 Merge branch 'development' into import-tpen28 commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce Author: Priyal Patel Date: Wed Apr 30 11:51:40 2025 -0500 Update index.mjs commit 673a5c5c7f8b729c845e05eacbfade3e8f354906 Author: Priyal Patel Date: Tue Apr 29 17:22:08 2025 -0500 Using UID to get User Projects commit afe664e776954a4689ae174ee7a40f69c5c5d7a6 Author: Priyal Patel Date: Mon Apr 28 10:16:27 2025 -0500 Update index.mjs commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2 Author: Priyal Patel Date: Fri Apr 25 14:56:11 2025 -0500 Update index.mjs commit 0906084f2ebeaa966caf86999c3c2bc85300a314 Author: Priyal Patel Date: Fri Apr 25 14:50:54 2025 -0500 Update index.mjs commit 5dd077e02ca0a4fddf9df52e959a519e7368769d Author: Priyal Patel Date: Fri Apr 25 14:33:53 2025 -0500 Update index.mjs commit e9971bc0bc892a9391f4918bffb45e65fddae550 Author: Priyal Patel 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 * remove unused file --------- Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com> Co-authored-by: Bryan Haberberger Co-authored-by: Onoja Co-authored-by: mepripri 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 Co-authored-by: Onoja Co-authored-by: mepripri 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 Co-authored-by: cubap * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 Co-authored-by: Bryan Haberberger * 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 * 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 * 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 * 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 * 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 commit 032ef458dd9c0602ca3c23b795a39f0de2dd7d7d Merge: f977234 52edaab Author: cubap 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 Date: Thu May 1 13:14:16 2025 -0500 Update index.js commit dde7c3015f32cb38d6c49cf25ac826a347310c26 Author: Priyal Patel Date: Thu May 1 13:05:02 2025 -0500 SetHeader Origin commit d2ec19844b8a15fe4497eb877d6709f898487324 Author: Priyal Patel Date: Thu May 1 12:47:32 2025 -0500 Origin Fetch commit 83fac3a3cf8bea72c5941b3e1cba7f95fe130d65 Merge: 6e79a8d 2e5bbbd Author: Priyal Patel Date: Thu May 1 09:31:12 2025 -0500 Merge branch 'development' into import-tpen28 commit 2e5bbbd0dd8d7690d9c7f6c33394fbac28d813dc Merge: 443d0a2 9f102fb Author: Patrick Cuba 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 Date: Wed Apr 30 15:23:02 2025 -0500 no label is fine for Pages commit 6e79a8d24aa70c8844859c5c70c1eb1766303d9d Merge: ac0182f 9f102fb Author: Priyal Patel Date: Wed Apr 30 12:06:38 2025 -0500 Merge branch 'development' into import-tpen28 commit ac0182f62ae4ea53a32f4fb3d70baac41dc101ce Author: Priyal Patel Date: Wed Apr 30 11:51:40 2025 -0500 Update index.mjs commit 673a5c5c7f8b729c845e05eacbfade3e8f354906 Author: Priyal Patel Date: Tue Apr 29 17:22:08 2025 -0500 Using UID to get User Projects commit afe664e776954a4689ae174ee7a40f69c5c5d7a6 Author: Priyal Patel Date: Mon Apr 28 10:16:27 2025 -0500 Update index.mjs commit 6bf9c9a704df759f553a8f7fff86556108c4c0c2 Author: Priyal Patel Date: Fri Apr 25 14:56:11 2025 -0500 Update index.mjs commit 0906084f2ebeaa966caf86999c3c2bc85300a314 Author: Priyal Patel Date: Fri Apr 25 14:50:54 2025 -0500 Update index.mjs commit 5dd077e02ca0a4fddf9df52e959a519e7368769d Author: Priyal Patel Date: Fri Apr 25 14:33:53 2025 -0500 Update index.mjs commit e9971bc0bc892a9391f4918bffb45e65fddae550 Author: Priyal Patel 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 * remove unused file --------- Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com> Co-authored-by: Bryan Haberberger Co-authored-by: Onoja Co-authored-by: mepripri 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 Co-authored-by: Onoja Co-authored-by: mepripri 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 * 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 * 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 * 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 Co-authored-by: Bryan Haberberger * 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 * 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… * deduped * how we feeling? * Links into RERUM APIs and code and the TPEN3 home page. * Fix PM2 cluster mode environment variable loading (#379) Problem: - When running with `pm2 start` in cluster mode, Node.js 22's --env-file flag was not being passed - This caused all process.env variables to be undefined, breaking database connections and app configuration - The issue only occurred in PM2 deployments; npm start worked correctly Solution: - Created ecosystem.config.js to configure PM2 with proper node_args - Added --env-file=config.env --env-file=.env flags to node_args - Updated CI/CD workflows (cd_dev.yaml and cd_prod.yaml) to use ecosystem config - Configured separate development and production environments Changes: - NEW: ecosystem.config.js - PM2 configuration with cluster mode and env loading - UPDATED: .github/workflows/cd_dev.yaml - Use ecosystem config for development deployment - UPDATED: .github/workflows/cd_prod.yaml - Use ecosystem config for production deployment Testing: - Local: pm2 start ecosystem.config.js --env development - Verify env variables load: process.env values should be defined from config.env and .env πŸ€– Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude * ftw * The file * cmon * redo with human * cleanup * cleanup * Let's see how RHEL feels about this (#380) * Let's see how RHEL feels about this * ok now be good * cleanup * ah I see probably still need dotenv here in the app.js * get them .env vars back cmon * trying * Ok then let's have you do it like before * Debug logs * Verified I can get it to work the old way, so take steps towards the new way * closer, logs are being weird though. * paths maybe? * stick a fork in it * stick a fork in it * stick a fork in it * I think it works! * Closer * stop smoking * yaml supports if tpen3_services isn't already registered in pm2 * Update env-loader.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update __tests__/mount.test.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Group.js * Cleanup (#381) * cleanup * Another pass * Signup - Login - Logout - Invite - Reject (#412) * issues * 204 here * upgrade _sub property when user in no longer temp * /page/:pageid/resolved Endpoint (#397) * Go with minimax m2 * Another kind of line uri pattern * cleanup * polish * polish * polish * polish * Touch up so we don't resolve objects that are already resolved * Remove introduced this.update() calls in Group.js * Invite and Reject Flows (#417) * invite flow * upgrades and rejections when temp user was invited to multiple projects before doing either. * upgrades and rejections when temp user was invited to multiple projects before doing either. * cleanup * copilot suggestion * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Only Update Lines (Annotations) That Have Changed (#419) * opus 4.5 unattended nice * cleanup * consolodate tests * polish * A deeper equality check for comparing JSON objects * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * dang this needs to go to development as a hotfix (#420) * Let Members Leave Projects (#421) * dang this needs to go to development as a hotfix * Let a logged in user leave a project they are a part of (same business rules apply as for removing a user) * refactor a bit. Send users an email when they are removed from a project by admins, or when they leave a group voluntarily * cleanup * polish * Apply suggestion from @Copilot whitespace in email Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Move stuff around based on review. Allow removal of the only leader. * unused * rename for separation of actions * changes from testing * Move stuff around * changes from testing * indentation * id instead of projectid for consistency * id instead of projectid for consistency * id instead of projectid for consistency * id instead of projectid for consistency --------- Co-authored-by: Patrick Cuba Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Create a New Column (#396) * Create a New Column * Delete classes/Column/__tests__/Column.test.js This was all skipped, so let's just avoid it * Implement code review recommendations for Column feature This commit addresses all the critical and recommended improvements from the code review: - Added TPENCOLUMNS environment variable to config.env - Fixed variable scope errors in checkAndCreateUnorderedColumn function - Added null safety checks for page.columns in line/index.js (lines 135, 184, 238) - Added comprehensive error handling to all Column class methods - Added JSDoc documentation for Column class and helper functions - Added input validation to createNewColumn method - Refactored checkAndCreateUnorderedColumn into smaller, more maintainable helper functions: - getRemainingAnnotations() - createUnorderedColumn() - deleteUnorderedColumn() - updateUnorderedColumn() - Updated CLAUDE.md and copilot-instructions.md with TPENCOLUMNS documentation These changes improve code reliability, maintainability, and documentation quality. πŸ€– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Patrick Cuba * Merge and Extend endpoints * Prev and Next addition, sus check * dup labels * headers issue resolved * code cleanup * existingUnorderedColumn guard * true * suggested changes * Self review * No comments * whitespace check * remove UnorderedColumn totally * PrevNext Fix * docs * fixes * 400 projectID pageId * space * label col fix * delete column if empty * cols in index * variable name change * line fix * column guards --------- Co-authored-by: Patrick Cuba Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Patrick Cuba Co-authored-by: Bryan Haberberger * hotfix test * Page update for columns (#424) * Columns Update on Annotator * remove update * back to start * Column Update on Line Parsing Change * deletes * bounds and post line * bounds fix * logs * itemsProvided * line fix * delete fix * remove comment * Return 200 with empty array for /my/projects when user has no projects (#428) * Initial plan * Fix my/projects endpoint to return 200 with empty array for users with no projects Co-authored-by: cubap <1119165+cubap@users.noreply.github.com> * Update API documentation to reflect new empty projects response * Revert unintended package-lock.json changes Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: cubap <1119165+cubap@users.noreply.github.com> Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * PATCH /text Runtime Improvements (#429) * Runtime improvement on the /text amd /bounds routes * remove debug logging * whitespace * whitespace * one user fetch * not a diff * Change from standup, catch errors from the page and project update * Change from standup, catch errors from the page and project update * fix for copilot comment * Error Catching and Logging In Routes (#423) * Error catching and logging * touchup * small tweak from testing and reviewing * Stop this unhandled 500 * Stop this 500 * 500s from other routes * Error handler as a middleware util * stop this 500 * Stop that 500 * returns * returns * use respondWithError in app.js too * touchup * touchup * touchup * touchup from copilot review * touchup from copilot review * touchup from copilot review * oof too much of a logic change, this is what we actually wanted. * hotifx merge stuff * hotfix for column passing * 'pixel' in fragment selector hotfix (#433) * 'pixel' in fragment selector hotfix * Changes from testing * TPEN Services npm Package Updates (#438) * Update packages, npm versions, and node versions * changes from testing * oh boy * undo localhost * undo localhost * the force * the force * Authentication (token 400 or 401) and Authorization (user permissions) Audit (#441) * First pass at auditing permission checks and adding them to the appropriate places * changes from review and testing * fix test * changes from testing and review * changes from copilot review * Align Packages (#444) * packages * darnit jsdom * Personalized Name String in E-mails (#449) * Better attempt at using a personalized string for usernames in emails instead of the generic 'TPEN User' text. * Changes while reviewing * Changes while reviewing * Changes while reviewing * Validate PATCH /line/:lineid/bounds requests (#452) * First pass at validating the xywh * changes while reviewing * 407 update updates (#454) * caller choses whether to save after * Add shouldUpdate flag to Group role methods Introduce an optional shouldUpdate parameter to Group.setMemberRoles and Group.removeMemberRoles to control whether changes are immediately persisted. These methods now skip calling update() when shouldUpdate is false, allowing callers to batch multiple role mutations and perform a single update. Call sites updated: removed a redundant update in Project.removeMember flow and adjusted memberRouter to pass shouldUpdate=false for intermediate role changes, then call group.update() once after all changes. This reduces redundant DB writes and improves efficiency. * New GET /line/:lineid?text=blob Feature (#455) * Gave the agent pipeline a try * Changes while testing and reviewing * No tests * Lines section for API.html * Lines section for API.html * oo bail on this, it needs to be its own task * simplify * Say less in AI assistant files * Changes while reviewing * Changes while reviewing * Remove this section * clean this up a little * clean this up a little * Ah I see this was trying to help how it fails through, but we need these to throw their errors like usual. * Now it fails through how it is supposed to * Now it fails through how it is supposed to * white space lint stuff * How about a redo for reasons * clean up function documentation * changes while reviewing * touchup for function documentation * const * changes during review * changes during review * shape of the refactor * Gotta fix this now then * Gotta fix this now then * Remove the fallback conditionals, the Class will handle it * Remove imported Line function. It is no longer required here * changes from getting demo to run * changes from getting demo to run * Working demo * Changes during review * Changes during review * Gimme those sweet sweet rerum errors * Gimme those sweet sweet rerum errors * Changes during review * changes while testing * oops bad docs * Really take the body from RERUM even if falsey * Changes during standup * Touchups during final review step * Touchups during final review step * Touchups during final review step * 407 do over (#458) * caller choses whether to save after * Add shouldUpdate flag to Group role methods Introduce an optional shouldUpdate parameter to Group.setMemberRoles and Group.removeMemberRoles to control whether changes are immediately persisted. These methods now skip calling update() when shouldUpdate is false, allowing callers to batch multiple role mutations and perform a single update. Call sites updated: removed a redundant update in Project.removeMember flow and adjusted memberRouter to pass shouldUpdate=false for intermediate role changes, then call group.update() once after all changes. This reduces redundant DB writes and improves efficiency. * auditfix * whitespace * No updated packages yet --------- Co-authored-by: Bryan Haberberger * Page Routes With Page and Line Class Refactor (#461) * First pass at utilizing the Page and Line classes in the page routes * changes while reviewing * changes while reviewing * changes while reviewing * changes while reviewing * clean up and align error throughput * clean up and align error throughput * changes from testing * Really connect the wires after closer inspection * Really connect the wires after closer inspection * Really connect the wires after closer inspection * changes while revewing * changes while revewing * Changes while testing and reviewing * Changes while testing and reviewing * Changes while testing and reviewing * Changes while testing and reviewing * Changes while testing and reviewing * Changes while testing and reviewing * Changes while testing and reviewing * Changes while testing and reviewing * Changes while testing and reviewing * Changes while testing and reviewing * Changes while testing and reviewing * Changes from standup * Changes from standup * Changes from standup * Changes during review * Changes during review * Layer Routes With Layer, Page, and Line Class Refactor (#469) * First push at refactoring for the Layer * First push at refactoring for the Layer * Changes during readthrough and testing * Changes during readthrough and testing * Changes during readthrough and testing * Changes during readthrough and testing * Changes during readthrough and testing * Changes during readthrough and testing * Changes during readthrough and testing * Changes during readthrough and testing * Changes during readthrough and testing * Changes during readthrough and testing * Changes during review and testing * move this back * changes during testing and review * changes during testing and review * changes during testing and review * changes during testing and review * changes during testing and review * Changes from cubap review * Changes from cubap review * Make sure Layer references in the Pages are upgraded when Layer is upgraded * NPM Package Updates (#472) * start with ALL and work backwards * reset * try iiif/helpers * try cors * try dompurify * try dotenv and jwt * try marked and mongo * try jest * nodemon and sinon * try maria, which seems like it breaks * try maria again with this minor refactor * try jsdom, which we are pretty sure breaks. * ah ok, no refactor for that, so we have to lock it in at 27 * try latest node and npm lts * ah I see! Let's try the version bundled with nvm * Now how about after telling the server it's ok to use the latest version instead of the bundled version in nvm. * mkay how about a new package-lock.json built around that? * Yeah I was afraid of that * jsdom is locked down now. refactor complete. * update nodemailer * Replace Bad Instance of `databaseTiny.find()` (#474) * Fix smoke test for development. Fix issue with bad usage of databaseTiny.find(). * Changes during review * Remove API.md and jsdom/dompurify/marked dependencies (#477) * Initial plan * Remove API.md and jsdom/dompurify/marked packages Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * changes during review --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> Co-authored-by: Bryan Haberberger * Eliminate redundant project DB fetches across route handlers (#478) * Initial plan * initial plan: eliminate redundant project data queries Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * eliminate redundant project data queries across route handlers - Add optional `project` param to `findPageById()` and `findLayerById()` in shared.js so callers with a pre-loaded project can skip the redundant DB fetch - Pass pre-loaded `project` to `findLayerById()` and `findPageById()` in layer/index.js - Pass pre-loaded `project` to `findPageById()` in page/index.js PUT /:pageId - Pass pre-loaded `project` to `findPageById()` in line/index.js (POST, PUT, PATCHΓ—2) - Use `project.data` directly in customMetadataRouter.js GET/POST/PUT /:id/custom instead of calling `database.findOne()` again after `checkUserAccess()` already loaded it - Restructure projectReadRouter.js GET /:id to call `loadAsUser()` once and derive the access check from its result via new `userHasAccess()` helper (saves project+group load) - Remove redundant `loadAsUser()` call in projectReadRouter.js GET /:id/manifest; use `project.data` from `checkUserAccess()` for the existence check instead - Add optional `preloadedProjectData` param to `ProjectFactory.exportManifest()` so callers with already-loaded data skip the internal `loadAsUser()` fetch Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * address code review: add Array.isArray guard in userHasAccess, add comment on loadAsUser error pattern Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> * no package lock changes * changes during review * changes during review * Changes during review * Changes during review --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> Co-authored-by: Bryan Haberberger * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * adding versioning * f * Add --no-git-tag-version to prerelease step Prevent npm from creating git tags during CI prerelease bumps by adding `--no-git-tag-version` to the `npm version prerelease --preid=alpha` commands in .github/workflows/ci_dev.yaml and .github/workflows/ci_prod.yaml. This aligns the prerelease step with the existing patch/minor no-tag behavior and avoids unintended tags from CI. * Add release-please workflow and bump version Add a GitHub Actions workflow to run googleapis/release-please-action on pushes to the development branch and via workflow_dispatch. Add release-please-config.json and a manifest to configure node prerelease (alpha) releases for the tpen3-services package, and bump package.json version to 0.1.0-alpha.1. * .2 * version init * Functional, but... (#503) * No more claude connector here * Fix History Tool URL β€” use github-pages tpen-line-history (#519) The Tools.defaultTools History Tool URL pointed at https://app.t-pen.org/components/line-history/index.js, which 404s β€” the local component was deleted from tpen3-interfaces in 1c25cbe. The github-hosted tpen-line-history custom element is the working artifact and is published at: https://centerfordigitalhumanities.github.io/tpen-line-history/tpen-line-history.js tagName stays tpen-line-history so it continues to load as a custom element (not an iframe). --------- Co-authored-by: Priyal Patel Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com> Co-authored-by: cubap Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com> Co-authored-by: Onoja Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: cubap <1119165+cubap@users.noreply.github.com> Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com> Co-authored-by: Claude Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Patrick Cuba --- classes/Tools/Tools.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/Tools/Tools.js b/classes/Tools/Tools.js index a1d935bc..199b583c 100644 --- a/classes/Tools/Tools.js +++ b/classes/Tools/Tools.js @@ -214,11 +214,11 @@ export default class Tools { { "label": "History Tool", "toolName": "history", - "custom": { - "enabled": true, + "custom": { + "enabled": true, "tagName": "tpen-line-history" }, - "url": "https://app.t-pen.org/components/line-history/index.js", + "url": "https://centerfordigitalhumanities.github.io/tpen-line-history/tpen-line-history.js", "location": "pane" }, { From 5734ab9c4d2a1170204ff6cf40ced8a9099a8760 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 9 May 2026 01:54:31 +0000 Subject: [PATCH 2/6] Initial plan From 6602808fa21e4c8cde70f6a208e53467dec384ac Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 9 May 2026 01:56:27 +0000 Subject: [PATCH 3/6] feat: add sender workflow for shared OpenAPI artifact sync Agent-Logs-Url: https://github.com/CenterForDigitalHumanities/TPEN-services/sessions/7492f37f-92a2-4dfe-8273-a5988b4741fc Co-authored-by: cubap <1119165+cubap@users.noreply.github.com> --- .../workflows/sync_tpen_shared_openapi.yaml | 50 +++++++++++++++++++ __tests__/mount.test.js | 6 +++ ...en-services-shared-components.openapi.yaml | 5 ++ 3 files changed, 61 insertions(+) create mode 100644 .github/workflows/sync_tpen_shared_openapi.yaml create mode 100644 openapi/components/tpen-services-shared-components.openapi.yaml diff --git a/.github/workflows/sync_tpen_shared_openapi.yaml b/.github/workflows/sync_tpen_shared_openapi.yaml new file mode 100644 index 00000000..21125317 --- /dev/null +++ b/.github/workflows/sync_tpen_shared_openapi.yaml @@ -0,0 +1,50 @@ +name: Sync TPEN shared OpenAPI artifact + +on: + push: + branches: + - development + paths: + - openapi/components/tpen-services-shared-components.openapi.yaml + - .github/workflows/sync_tpen_shared_openapi.yaml + workflow_dispatch: + +permissions: + contents: read + +jobs: + sync-shared-openapi-artifact: + runs-on: ubuntu-latest + steps: + - name: Checkout TPEN-services + uses: actions/checkout@v4 + + - name: Checkout cubap/rerum_openapi + uses: actions/checkout@v4 + with: + repository: cubap/rerum_openapi + token: ${{ secrets.RERUM_OPENAPI_SYNC_TOKEN }} + path: rerum_openapi + + - name: Copy shared OpenAPI artifact into receiver repository + run: | + mkdir -p rerum_openapi/schemas/openapi + cp openapi/components/tpen-services-shared-components.openapi.yaml \ + rerum_openapi/schemas/openapi/tpen-services-shared-components.openapi.yaml + + - name: Create or update sync pull request + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ secrets.RERUM_OPENAPI_SYNC_TOKEN }} + path: rerum_openapi + base: main + branch: chore/sync-tpen-services-shared-components + commit-message: >- + chore(openapi): sync TPEN services shared components from + CenterForDigitalHumanities/TPEN-services@${{ github.sha }} + title: 'chore(openapi): sync TPEN services shared components' + body: | + Automated sync from CenterForDigitalHumanities/TPEN-services. + + Source: `openapi/components/tpen-services-shared-components.openapi.yaml` + Target: `schemas/openapi/tpen-services-shared-components.openapi.yaml` diff --git a/__tests__/mount.test.js b/__tests__/mount.test.js index 38dde54d..eb5b6051 100644 --- a/__tests__/mount.test.js +++ b/__tests__/mount.test.js @@ -343,4 +343,10 @@ describe('Check to see that critical repo files are present #exists_unit', () => expect(fs.existsSync(filePath+".gitignore")).toBeTruthy() expect(fs.existsSync(filePath+"package.json")).toBeTruthy() }) + + it('shared OpenAPI sync files', () => { + const filePath = './' + expect(fs.existsSync(filePath+"openapi/components/tpen-services-shared-components.openapi.yaml")).toBeTruthy() + expect(fs.existsSync(filePath+".github/workflows/sync_tpen_shared_openapi.yaml")).toBeTruthy() + }) }) diff --git a/openapi/components/tpen-services-shared-components.openapi.yaml b/openapi/components/tpen-services-shared-components.openapi.yaml new file mode 100644 index 00000000..ab19419c --- /dev/null +++ b/openapi/components/tpen-services-shared-components.openapi.yaml @@ -0,0 +1,5 @@ +openapi: 3.1.0 +info: + title: TPEN Services Shared OpenAPI Components + version: 1.0.0 +components: {} From 9e1ed9a918c8d23df4d3b7cef8fa0f840445e05b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 9 May 2026 01:57:52 +0000 Subject: [PATCH 4/6] fix: target development branch for openapi sync PRs Agent-Logs-Url: https://github.com/CenterForDigitalHumanities/TPEN-services/sessions/7492f37f-92a2-4dfe-8273-a5988b4741fc Co-authored-by: cubap <1119165+cubap@users.noreply.github.com> --- .github/workflows/sync_tpen_shared_openapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync_tpen_shared_openapi.yaml b/.github/workflows/sync_tpen_shared_openapi.yaml index 21125317..a67bf7ab 100644 --- a/.github/workflows/sync_tpen_shared_openapi.yaml +++ b/.github/workflows/sync_tpen_shared_openapi.yaml @@ -37,7 +37,7 @@ jobs: with: token: ${{ secrets.RERUM_OPENAPI_SYNC_TOKEN }} path: rerum_openapi - base: main + base: development branch: chore/sync-tpen-services-shared-components commit-message: >- chore(openapi): sync TPEN services shared components from From 3eb83b3f41b875fb2ed7f1a75665dcac08364032 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 15 May 2026 21:20:04 +0000 Subject: [PATCH 5/6] chore: align OpenAPI sync workflow with seam rollout conventions Agent-Logs-Url: https://github.com/CenterForDigitalHumanities/TPEN-services/sessions/ca5b71a2-fa7f-471c-aeef-887c2885556b Co-authored-by: cubap <1119165+cubap@users.noreply.github.com> --- .../workflows/sync_tpen_shared_openapi.yaml | 27 ++++++++--------- __tests__/openapi_sync_artifacts.test.js | 30 +++++++++++++++++++ ...en-services-shared-components.openapi.yaml | 11 +++++-- 3 files changed, 51 insertions(+), 17 deletions(-) create mode 100644 __tests__/openapi_sync_artifacts.test.js diff --git a/.github/workflows/sync_tpen_shared_openapi.yaml b/.github/workflows/sync_tpen_shared_openapi.yaml index a67bf7ab..408fb32f 100644 --- a/.github/workflows/sync_tpen_shared_openapi.yaml +++ b/.github/workflows/sync_tpen_shared_openapi.yaml @@ -1,4 +1,4 @@ -name: Sync TPEN shared OpenAPI artifact +name: Sync shared TPEN OpenAPI artifact on: push: @@ -6,7 +6,6 @@ on: - development paths: - openapi/components/tpen-services-shared-components.openapi.yaml - - .github/workflows/sync_tpen_shared_openapi.yaml workflow_dispatch: permissions: @@ -23,28 +22,28 @@ jobs: uses: actions/checkout@v4 with: repository: cubap/rerum_openapi - token: ${{ secrets.RERUM_OPENAPI_SYNC_TOKEN }} + token: ${{ secrets.OPENAPI }} path: rerum_openapi - name: Copy shared OpenAPI artifact into receiver repository run: | - mkdir -p rerum_openapi/schemas/openapi cp openapi/components/tpen-services-shared-components.openapi.yaml \ rerum_openapi/schemas/openapi/tpen-services-shared-components.openapi.yaml - name: Create or update sync pull request uses: peter-evans/create-pull-request@v7 with: - token: ${{ secrets.RERUM_OPENAPI_SYNC_TOKEN }} + token: ${{ secrets.OPENAPI }} path: rerum_openapi - base: development - branch: chore/sync-tpen-services-shared-components - commit-message: >- - chore(openapi): sync TPEN services shared components from - CenterForDigitalHumanities/TPEN-services@${{ github.sha }} - title: 'chore(openapi): sync TPEN services shared components' + branch: automation/sync-tpen-shared-openapi-artifact + delete-branch: true + commit-message: Sync shared TPEN OpenAPI artifact from TPEN-services + title: Sync shared TPEN OpenAPI artifact from TPEN-services body: | - Automated sync from CenterForDigitalHumanities/TPEN-services. + Automated sync from `${{ github.repository }}` at `${{ github.sha }}`. - Source: `openapi/components/tpen-services-shared-components.openapi.yaml` - Target: `schemas/openapi/tpen-services-shared-components.openapi.yaml` + Source: + - `openapi/components/tpen-services-shared-components.openapi.yaml` + + Target: + - `schemas/openapi/tpen-services-shared-components.openapi.yaml` diff --git a/__tests__/openapi_sync_artifacts.test.js b/__tests__/openapi_sync_artifacts.test.js new file mode 100644 index 00000000..777aaf94 --- /dev/null +++ b/__tests__/openapi_sync_artifacts.test.js @@ -0,0 +1,30 @@ +import fs from "fs" +import path from "path" +import { fileURLToPath } from "url" + +const __filename = fileURLToPath(import.meta.url) +const __dirname = path.dirname(__filename) +const repoRoot = path.resolve(__dirname, "..") + +describe("Shared OpenAPI artifact sync scaffolding #exists_unit", () => { + it("verifies provider artifact has expected OpenAPI baseline fields", () => { + const providerArtifactPath = path.join(repoRoot, "openapi/components/tpen-services-shared-components.openapi.yaml") + const providerArtifact = fs.readFileSync(providerArtifactPath, "utf8") + + expect(providerArtifact).toContain("openapi: 3.0.3") + expect(providerArtifact).toContain("title: TPEN Services Shared OpenAPI Components") + expect(providerArtifact).toContain("version: 0.1.0") + expect(providerArtifact).toContain("components:") + expect(providerArtifact).toContain("schemas: {}") + }) + + it("verifies the shared artifact sync workflow configuration", () => { + const workflowPath = path.join(repoRoot, ".github/workflows/sync_tpen_shared_openapi.yaml") + const workflow = fs.readFileSync(workflowPath, "utf8") + + expect(workflow).toContain("openapi/components/tpen-services-shared-components.openapi.yaml") + expect(workflow).toContain("repository: cubap/rerum_openapi") + expect(workflow).toContain("schemas/openapi/tpen-services-shared-components.openapi.yaml") + expect(workflow).toContain("secrets.OPENAPI") + }) +}) diff --git a/openapi/components/tpen-services-shared-components.openapi.yaml b/openapi/components/tpen-services-shared-components.openapi.yaml index ab19419c..8ab6868b 100644 --- a/openapi/components/tpen-services-shared-components.openapi.yaml +++ b/openapi/components/tpen-services-shared-components.openapi.yaml @@ -1,5 +1,10 @@ -openapi: 3.1.0 +openapi: 3.0.3 info: title: TPEN Services Shared OpenAPI Components - version: 1.0.0 -components: {} + version: 0.1.0 + description: Shared reusable OpenAPI components for TPEN services contracts. +x-upstream-provider: + name: TPEN-services + baseUrl: https://api.t-pen.org +components: + schemas: {} From eda7276a780002f0eef4576562e027a2341b5d4c Mon Sep 17 00:00:00 2001 From: Bryan Haberberger Date: Thu, 21 May 2026 13:18:44 -0500 Subject: [PATCH 6/6] Align sync files --- .../workflows/sync_tpen_shared_openapi.yaml | 43 +++++++++++-------- ...en-services-shared-components.openapi.yaml | 3 ++ 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/.github/workflows/sync_tpen_shared_openapi.yaml b/.github/workflows/sync_tpen_shared_openapi.yaml index 408fb32f..79d0e3b8 100644 --- a/.github/workflows/sync_tpen_shared_openapi.yaml +++ b/.github/workflows/sync_tpen_shared_openapi.yaml @@ -1,4 +1,4 @@ -name: Sync shared TPEN OpenAPI artifact +name: Sync TPEN-services shared OpenAPI artifact on: push: @@ -12,38 +12,43 @@ permissions: contents: read jobs: - sync-shared-openapi-artifact: + sync: + name: Sync TPEN-services shared OpenAPI artifact runs-on: ubuntu-latest steps: - name: Checkout TPEN-services uses: actions/checkout@v4 - - name: Checkout cubap/rerum_openapi + - name: Checkout receiver repository uses: actions/checkout@v4 with: repository: cubap/rerum_openapi + ref: main token: ${{ secrets.OPENAPI }} - path: rerum_openapi + path: receiver - - name: Copy shared OpenAPI artifact into receiver repository - run: | - cp openapi/components/tpen-services-shared-components.openapi.yaml \ - rerum_openapi/schemas/openapi/tpen-services-shared-components.openapi.yaml + # No `test -f` guard: the receiver target may not exist on the first + # sync; cp creates it. Once the receiver registry references this file, + # add `test -f receiver/schemas/openapi/tpen-services-shared-components.openapi.yaml` + # to catch retargeted copies. + + - name: Copy canonical shared artifact + run: cp openapi/components/tpen-services-shared-components.openapi.yaml receiver/schemas/openapi/tpen-services-shared-components.openapi.yaml - name: Create or update sync pull request - uses: peter-evans/create-pull-request@v7 + uses: peter-evans/create-pull-request@v8 with: token: ${{ secrets.OPENAPI }} - path: rerum_openapi - branch: automation/sync-tpen-shared-openapi-artifact + path: receiver + add-paths: schemas/openapi/tpen-services-shared-components.openapi.yaml + commit-message: "chore: sync TPEN-services shared OpenAPI artifact" + branch: sync/tpen-services-shared-openapi + base: main delete-branch: true - commit-message: Sync shared TPEN OpenAPI artifact from TPEN-services - title: Sync shared TPEN OpenAPI artifact from TPEN-services + title: "chore: sync TPEN-services shared OpenAPI artifact" body: | - Automated sync from `${{ github.repository }}` at `${{ github.sha }}`. - - Source: - - `openapi/components/tpen-services-shared-components.openapi.yaml` + Syncs the canonical TPEN-services shared OpenAPI artifact from CenterForDigitalHumanities/TPEN-services. - Target: - - `schemas/openapi/tpen-services-shared-components.openapi.yaml` + - Source commit: ${{ github.sha }} + - Source artifact: `openapi/components/tpen-services-shared-components.openapi.yaml` + - Target artifact: `schemas/openapi/tpen-services-shared-components.openapi.yaml` diff --git a/openapi/components/tpen-services-shared-components.openapi.yaml b/openapi/components/tpen-services-shared-components.openapi.yaml index 8ab6868b..c11dea10 100644 --- a/openapi/components/tpen-services-shared-components.openapi.yaml +++ b/openapi/components/tpen-services-shared-components.openapi.yaml @@ -3,6 +3,9 @@ info: title: TPEN Services Shared OpenAPI Components version: 0.1.0 description: Shared reusable OpenAPI components for TPEN services contracts. +externalDocs: + description: TPEN-services API reference + url: https://api.t-pen.org/API.html x-upstream-provider: name: TPEN-services baseUrl: https://api.t-pen.org