Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
98bfbc6
Bump path-to-regexp and express
dependabot[bot] Dec 5, 2024
864312a
Merge pull request #228 from CDLUC3/development
briri Mar 7, 2025
d286443
Merge pull request #342 from CDLUC3/stage
briri Jul 21, 2025
944fb78
Merge pull request #149 from CDLUC3/dependabot/npm_and_yarn/multi-6bc…
briri Jul 21, 2025
ae8fbe8
Bump form-data from 4.0.2 to 4.0.4
dependabot[bot] Jul 22, 2025
16a8091
Merge pull request #350 from CDLUC3/dependabot/npm_and_yarn/form-data…
briri Aug 6, 2025
fbb5637
Merge pull request #420 from CDLUC3/stage
briri Sep 8, 2025
fbec423
Merge pull request #421 from CDLUC3/development
briri Sep 8, 2025
355f806
added CONTRIBUTING and CODE_OF_CONDUCT files
briri Oct 8, 2025
a53e54e
update readme to include links to new contributing and code of conduc…
briri Oct 8, 2025
517c08a
added LICENSE and made some changes to CONTRIBUTING and CODE_OF_CONDUCT
briri Oct 14, 2025
98c501e
fix typos in code_of_conduct
briri Oct 14, 2025
6ef64db
Merge pull request #476 from CDLUC3/chore/conduct-contributing
briri Oct 14, 2025
7b3f254
fix ref to DCC
briri Oct 15, 2025
e6715d0
Merge pull request #480 from CDLUC3/chore/conduct-contributing
briri Oct 23, 2025
b1f841d
fix merge issues with main
briri Nov 3, 2025
9ab3dc5
Updated popularFunders resolver to return only 5 popular funders
jupiter007 Nov 5, 2025
ca9fedd
Merge pull request #503 from CDLUC3/feature/500/JS-return-only-5-top-…
jupiter007 Nov 5, 2025
9b4e983
Initial plan
Copilot Nov 6, 2025
4ccf578
Create Guidance models, schemas, resolvers and services
Copilot Nov 6, 2025
8e5d951
Add tests for Guidance models and fix linting errors
Copilot Nov 6, 2025
885bcd6
Improve logging for guidance without tags and fix test linting
Copilot Nov 6, 2025
b15f1ad
Add tests for VersionedGuidance, VersionedGuidanceGroup, and Tag guid…
Copilot Nov 7, 2025
d187db3
Adds guidanceGroups to affiliation possible output as related field
sfisher Nov 7, 2025
9b90e6d
Make guidance group find by affiliation (ROR)
sfisher Nov 7, 2025
aa1b7f9
Fixing the addGuidanceGroup mutation.
sfisher Nov 7, 2025
2806e2d
Fixing the mutation queries
sfisher Nov 8, 2025
f2d4402
Testing the guidanceGroup query/mutators.
sfisher Nov 8, 2025
bd0f8e1
Address code review feedback: static tableNames, multiple tagIds, val…
Copilot Nov 10, 2025
c7c51b9
Fixing guidance queries for permissions in GraphQL
sfisher Nov 12, 2025
305ecd9
Merge branch 'copilot/build-guidance-resolvers-schema' of github.com:…
sfisher Nov 12, 2025
df8e86a
Fix isDirty flag: default to false for new records and mark dirty on …
Copilot Nov 13, 2025
ff5f240
Add missing superadmin checks to guidanceGroup query and updateGuidan…
Copilot Nov 13, 2025
f9a8f0f
Adding to CHANGELOG.md
sfisher Nov 14, 2025
04330ba
Simplify authorization checks by leveraging hasPermissionOnGuidanceGr…
Copilot Nov 14, 2025
e5ccbce
Fix NULLs in table.
sfisher Nov 17, 2025
7b076da
Merge branch 'copilot/build-guidance-resolvers-schema' of github.com:…
sfisher Nov 17, 2025
fcc5209
Remove join to guidance tags when guidance is removed. Keep tag itse…
sfisher Nov 17, 2025
51ffc1e
Makes guidance more nuanced for viewing and allows all logged in to s…
sfisher Nov 17, 2025
d2b2c20
Removing tags where not used in constructors
sfisher Nov 17, 2025
dd351c7
Fixing affiliation guidance group display
sfisher Nov 17, 2025
b9f4a1c
Fix migration SQL syntax: remove invalid DEFAULT NOT NULL
Copilot Nov 17, 2025
f5716f0
Trying to fix permissions and fix linting and tests
sfisher Nov 18, 2025
2c54059
Add optionalSubset field to GuidanceGroup and VersionedGuidanceGroup
Copilot Nov 18, 2025
0593f56
Make optionalSubset field functional in add/update mutations and add …
Copilot Nov 18, 2025
113291c
update js-yaml version
briri Nov 18, 2025
5637402
Merge pull request #514 from CDLUC3/chore/update-deps
briri Nov 18, 2025
0727528
Merge pull request #504 from CDLUC3/copilot/build-guidance-resolvers-…
sfisher Nov 18, 2025
3600fa7
fix migrations for guidance
sfisher Nov 19, 2025
fcbace8
updated myProjects resolver to only return the current user's project…
briri Nov 19, 2025
bc534a6
add to changelog
sfisher Nov 19, 2025
6cc2756
Merge pull request #520 from CDLUC3/fix-migration-v-guidance
briri Nov 19, 2025
7b1ed34
Merge branch 'stage' of github.com:CDLUC3/dmsp_backend_prototype into…
briri Nov 19, 2025
7cdea2d
Merge branch 'stage' into chore/data-migration
briri Nov 19, 2025
26667bb
update package.json to not run tests that require a running DB by def…
briri Nov 19, 2025
dd618ce
Made updates to return versioned section tags as part of the plan que…
jupiter007 Nov 19, 2025
9f6e351
merged development into branch
jupiter007 Nov 20, 2025
3339307
Removed unused findVersionedSectionTagsBySectionId function and fixed…
jupiter007 Nov 20, 2025
989adf0
Fixed services integration versioning test due to template service an…
jupiter007 Nov 20, 2025
7adc657
removed .only from unit test so all tests can run
jupiter007 Nov 20, 2025
4beb51b
refactored data-migration process script and created new migration files
briri Nov 20, 2025
54bcde4
updated CHANGELOG
briri Nov 21, 2025
e4dcb06
update stored proc sql migration to use utf8mb4_0900_ai_ci
briri Nov 21, 2025
3235035
Merge pull request #523 from CDLUC3/chore/data-migration
briri Nov 21, 2025
128877a
Updated Plan query sql to not include a subquery for every section row
jupiter007 Nov 21, 2025
084f69e
Merge branch 'development' of github.com:CDLUC3/dmsp_backend_prototyp…
briri Nov 21, 2025
863fce5
Merge pull request #519 from CDLUC3/feature/separate-project-resolvers
briri Nov 21, 2025
bc55700
Updated sql query for Plan to be more efficient
jupiter007 Nov 21, 2025
1606866
Merge pull request #522 from CDLUC3/feature/521/JS-versionedSectionTa…
jupiter007 Nov 21, 2025
6b3d2f6
updates to dependencies
briri Nov 24, 2025
55a8e89
removed comment from relatedworks model tests
briri Nov 24, 2025
d476fd6
Merge pull request #530 from CDLUC3/chore-update-deps
briri Nov 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ echo "Ensuring build compiles ..."
npm run build

echo "Running Tests ..."
npm test
npm run test-no-db

echo "Running Trivy scans..."

Expand Down
20 changes: 18 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# DMP Tool Apollo Server Change Log

### Added
- Added a data migration SQL file to drop all existing tables and recreate with `utf8mb4_0900_ai_ci` collation and use of `INT UNSIGNED` for ids
- Added a `allProjects` resolver to return all projects relevant to the Admin
- Added a new `test-no-db` script to `package.json` to run all tests but the ones that need a running docker env
- Added a data migration SQL file to drop all existing tables and recreate with `utf8mb4_0900_ai_ci` collation and use of `INT UNSIGNED` for ids
- Added a data migration SQL file to create the stored procedures needed by the related works matching process
- Added seed SQL files for use in local dev environments
- Added models, resolvers, mutators for Guidance, GuidanceGroup, VersionedGuidance and versionedGuidanceGroup [#12]
- Added `AffiliationDepartments` model
- Added `TemplateLinks` and `VersionedTemplateLinks` models
- Added `slug` to the `Tag` schema

### Updated
- Updated dependencies: `@aws-sdk/client-dynamodb`, `@graphql-tools/merge`, `ts-jest` and `@eslint/js`
- Updated the `myProjects` resolver to only return the projects the user owns or collaborates on
- Updated husky precommit hook to run `npm run test-no-db`
- Updated the `data-migrations/process.sh` script so that you can pass a `local` argument which will run all migrations in the `local-only` subdirectory
- Bumped the node version in the Dockerfiles to 22.x
- Renamed local DB in `docker-compose.yaml` from `dmsp` to `dmptool`
- Updated `affiliationEmailDomains` to use the `affiliations.uri` as the FKey
Expand All @@ -17,8 +26,11 @@
- Updated `Tag` model to include new `slug` field
- Updated `User` model to include the new `oldPasswordHash` field

### Deleted
- Removed the `@types/eslint__js` dependency because `@eslint/jest` includes its own types now

============================================================================
prior to 2025-10-05
prior to 2025-10-21

### Added
- Added migration for the `guidance`-related tables [#483]
Expand All @@ -42,6 +54,7 @@ prior to 2025-10-05
- Added ability for `VersionedSections` `search` function to return only `bestPractice` sections, only sections without `bestPractice` or all sections[#436]
- Added resolver to handle resending of invite for project collaborators [#433]
- Added bash to AWS Dockerfile for session manager
- Added `CONTRIBUTING.md` and `CODE_OF_CONDUCT.md` files
- Added a data migration script to update `visibility` to `latestPublishVisibility` in `templates` table. [#405]
- Added code to update `latestPublishVisibility` whenever a `template` is published [#405]
- Added model/resolver for `PlanProgress` and nested `progress` in `Plan` resolver [#720]
Expand All @@ -58,6 +71,8 @@ prior to 2025-10-05
- added `publishedQuestion` resolver to `src/resolvers/versionedQuestion.ts`

### Updated
- Updated the `js-yaml` dependency
- Updated `popularFunders` resolver to return only 5 popular funders [#500]
- Upgrade `nodemailer` from `6.10.1` to `7.0.10` to address security vulnerability
- Updated `ORCID_REGEX` in `helper.ts` so that urls can be submitted without a the `www.` Also, added `stripORCIDIdentifierBaseURL` to just strip out all protocols and domains to extract the OrcidID [#251]
- Updated `OrcidAPI` to handle `404` errors so that we return null rather than throwing an error [#251]
Expand All @@ -80,6 +95,7 @@ prior to 2025-10-05
- changed `sections` resolver to `versionedSections` on the `src/resolvers/plan.ts` file and changed the reference for `PlanSearchResult.sections` to `versionedSections`

### Fixed
- Fixed migration error for versionedGuidance where can't be too strict since NULLs set for deleted parent Guidance. Related to [#12]
- Fixed breaking build by removing `NODE_ENV=production` before `npm ci` which was skipping devDependencies, but needed for the build process.
- `addSection` mutation resolver was not saving `tags`. Added code to add tags for new section [#445]
- Fixed issue where updating an answer, funding or members was not triggering the creation of a new PlanVersion
Expand Down
53 changes: 53 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## UC3 Community Values and Institutional Code of Conduct

This project is maintained by the [University of California Curation Center (UC3)](https://uc3.cdlib.org) at the California Digital Library, within the University of California Office of the President.
All contributors, maintainers, and participants are expected to follow not only this Contributor Covenant but also the [UC3 Code of Conduct](https://uc3.cdlib.org/code-of-conduct/), which reflects the University of California’s commitment to equity, diversity, inclusion, and respectful professional collaboration.

This repository is part of the [CDLUC3 GitHub organization](https://github.com/CDLUC3), and participation in its repositories constitutes agreement to uphold these community standards.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting UC3 leadership at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 3.0, available at [http://contributor-covenant.org/version/3/0][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/3/0/
97 changes: 97 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Contributing Guidelines

Thank you for your interest in contributing! 🎉
We welcome all contributions — from bug fixes and documentation improvements to major feature implementations.
Please take a few minutes to review this guide before submitting your contribution.

## How to Report Issues
- Use [GitHub Issues](https://github.com/CDLUC3/dmsp_backend_prototype/issues) for bugs and feature requests.
- Include as much detail as possible.

## Code of Conduct
Please review and follow our [Code of Conduct](CODE_OF_CONDUCT.md).

## License
By contributing, you agree that your contributions are licensed under the [MIT License](https://github.com/CDLUC3/dmsp_backend_prototype/blob/main/LICENSE).

---

## 🧭 How to Contribute

### 1. Fork the Repository
Start by forking this repository to your own GitHub account:

```bash
git clone https://github.com/CDLUC3/dmsp_backend_prototype.git
cd dmsp_backend_prototype
```

### 2. Create a Branch
Create a new branch for your feature or bug fix.
```bash
git checkout -b feature/your-feature-name
```

Please use the following naming convention:
- `feature/your-feature-name` for new features
- `bug/your-bug-description` for bug fixes
- `docs/your-documentation-update` for documentation changes (e.g. README, comments)
- `chore/your-chore-description` for maintenance tasks (e.g. updating dependencies)

### 3. Make Your Changes
Make your changes in your local repository. Please ensure that your code adheres to the project's coding standards and conventions.

For information on how to set up your development environment, please refer to the [README.md](README.md).

We use eslint for JavaScript/TypeScript linting. You can run the linter with:
```bash
npm run lint
```

We provide an .editorconfig file to help maintain consistent coding styles across different editors and IDEs. Please ensure your editor is configured to use it.
For formatting, we use Prettier. You can format your code with:
```bash
npm run format
```

We use a `CHANGELOG.md` file to document all notable changes made to the project. Please update this file with a brief description of your changes, following the existing format.

### 4. Test Your Changes
We use Jest for testing. Please write unit tests for your changes and ensure all tests pass before submitting!
```bash
npm run test
```

### 5. Commit Your Changes
Commit your changes with a clear and concise commit message with what you've done.
```bash
git add .
git commit -m "Add your commit message here"
```

Note that we have a `husky` precommit hook that will run linting and tests before allowing a commit. Please ensure that your code passes these checks.
If you are in the process of making changes and want to commit changes before you have completely finished, you can run the commit with `-n` to skip these precommit checks.

### 6. Make sure your branch is up to date
Before pushing your changes, make sure your branch is up to date with the main branch. From your branch run:
```bash
git pull origin main
```

### 7. Push Your Changes
Push your changes to your forked repository:
```bash
git push origin feature/your-feature-name
```

### 8. Create a Pull Request
Go to the original repository and create a pull request from your forked repository. Follow the template provided and include as much detail as possible including instructions for how to test the change if applicable.
Be sure to reference the issue number if your pull request addresses a specific issue!

### 9. Address Feedback
We may request changes or provide feedback on your pull request. Please address any feedback promptly to help us review and merge your changes.

We are a small team and may not be able to respond immediately, but we will do our best to review your contribution as soon as possible.

### 10. Celebrate!
Once your pull request is merged, celebrate your contribution to the project! 🎉
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 UC Curation Center (California Digital Library)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
18 changes: 3 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@
- [Conect to ECS instance](#connect-to-ecs-instance)
- [Environment variables](#environment-variables)
- [Routes](#routes)
- [Contributing](#contributing)
- [Contributors](#contributors)
- [License](#license)
- [Contributing Guidelines](CONTRIBUTING.md)
- [Code of Conduct](CODE_OF_CONDUCT.md)
- [Changelog](CHANGELOG.md)

## Introduction

Expand Down Expand Up @@ -624,19 +625,6 @@ If you are running elsewhere, you will need to either make a copy of the `.env.e
- `/apollo-authorize` - OAuth2 endpoint to allow a user to authorize the external system to access their data. Returns a short lived authorization code
- `apollo-token` - OAuth2 endpoint to exchange an authorization code for a long lived access token

## Contributing

1. Clone this repo
2. Create a new branch prefixing branch with `bug`, `chore` or `feature` based on type of update: `git checkout -b feature/your-feature`
3. Add your changes and add commit message: `git add .; git commit -m "added new feature`. A pre-commit is run with the commit which checks to make sure linting and test coverage pass before a commit goes through
4. Push your branch up to this repo: `git push --set-upstream origin feature/your-feature`
5. Open a Pull Request in github

## Contributors

- [Brian Riley](https://github.com/briri)
- [Juliet Shin](https://github.com/jupiter007)

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) for for details.
Loading
Loading