Skip to content

Development to Main Diff#431

Draft
thehabes wants to merge 293 commits intomainfrom
development
Draft

Development to Main Diff#431
thehabes wants to merge 293 commits intomainfrom
development

Conversation

@thehabes
Copy link
Member

No description provided.

cubap and others added 30 commits April 4, 2025 15:22
* 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
* Removing fileSystem from Github API

* Update ProjectFactory.mjs

---------

Co-authored-by: Bryan Haberberger <[email protected]>
* 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?
* 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
* 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

* existingEmail and existingName

* Changes to comments

* Update User.mjs
* 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 <[email protected]>
* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs

* Update index.mjs
* 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
* 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 <[email protected]>
* First pass at validating the xywh

* changes while reviewing
* 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.
* 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
* 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 <[email protected]>
* 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
* 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
* 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
* Fix smoke test for development.  Fix issue with bad usage of databaseTiny.find().

* Changes during review
* Initial plan

* Remove API.md and jsdom/dompurify/marked packages

Co-authored-by: thehabes <[email protected]>

* changes during review

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: thehabes <[email protected]>
Co-authored-by: Bryan Haberberger <[email protected]>
* Initial plan

* initial plan: eliminate redundant project data queries

Co-authored-by: thehabes <[email protected]>

* 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 <[email protected]>

* address code review: add Array.isArray guard in userHasAccess, add comment on loadAsUser error pattern

Co-authored-by: thehabes <[email protected]>

* no package lock changes

* changes during review

* changes during review

* Changes during review

* Changes during review

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: thehabes <[email protected]>
Co-authored-by: Bryan Haberberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants