From b088a97152d260f56be68445a2ed2998456807a0 Mon Sep 17 00:00:00 2001 From: tri2510 Date: Mon, 30 Jun 2025 23:00:48 +0700 Subject: [PATCH] Replace Creative Commons license with MIT and add headers --- .github/workflows/release-dev.yml | 8 + .github/workflows/retag-release-as-latest.yml | 8 + .licenseignore | 56 +++ .travis.yml | 8 + LICENSE | 407 +----------------- docker-compose.dev.yml | 8 + docker-compose.prod.yml | 8 + docker-compose.test.yml | 8 + docker-compose.yml | 8 + jest.config.js | 8 + kong/kong.yml | 8 + src/app.js | 8 + src/config/axios.js | 8 + src/config/config.js | 8 + src/config/enums.js | 8 + src/config/firebase.js | 8 + src/config/logger.js | 8 + src/config/morgan.js | 8 + src/config/passport.js | 8 + src/config/proxyHandler.js | 8 + src/config/roles.js | 8 + src/config/rolesV2.js | 8 + src/config/socket.js | 8 + src/config/tokens.js | 8 + src/controllers/api.controller.js | 8 + src/controllers/asset.controller.js | 8 + src/controllers/auth.controller.js | 8 + src/controllers/changeLog.controller.js | 8 + src/controllers/discussion.controller.js | 8 + src/controllers/extendedApi.controller.js | 8 + src/controllers/feedback.controller.js | 8 + src/controllers/index.js | 8 + src/controllers/instance.controller.js | 8 + .../instanceRelation.controller.js | 8 + src/controllers/issue.controller.js | 8 + src/controllers/model.controller.js | 8 + src/controllers/permission.controller.js | 8 + src/controllers/prototype.controller.js | 8 + src/controllers/relation.controller.js | 8 + src/controllers/schema.controller.js | 8 + src/controllers/search.controller.js | 8 + src/controllers/tag.controller.js | 8 + src/controllers/user.controller.js | 8 + src/decorators/FeedbackPrototypeDecorator.js | 8 + .../FeedbackPrototypeListDecorator.js | 8 + .../ParsedJsonPropertiesMongooseDecorator.js | 8 + ...rsedJsonPropertiesMongooseListDecorator.js | 8 + src/decorators/PermissionDecorator.js | 8 + src/decorators/PermissionListDecorator.js | 8 + src/decorators/PrototypeDecorator.js | 8 + src/decorators/PrototypeListDecorator.js | 8 + src/docs/components.yml | 8 + src/docs/swaggerDef.js | 8 + src/index.js | 8 + src/middlewares/auth.js | 8 + src/middlewares/error.js | 8 + src/middlewares/genaiPermission.js | 8 + src/middlewares/permission.js | 8 + src/middlewares/rateLimiter.js | 8 + src/middlewares/validate.js | 8 + src/models/api.model.js | 8 + src/models/asset.model.js | 8 + src/models/changeLog.model.js | 8 + src/models/discussion.model.js | 8 + src/models/extendedApi.model.js | 8 + src/models/feedback.model.js | 8 + src/models/index.js | 8 + src/models/instance.model.js | 8 + src/models/instanceRelation.model.js | 8 + src/models/issue.model.js | 8 + src/models/model.model.js | 8 + src/models/plugins/captureChange.plugin.js | 8 + src/models/plugins/index.js | 8 + src/models/plugins/paginate.plugin.js | 8 + src/models/plugins/toJSON.plugin.js | 8 + src/models/prototype.model.js | 8 + src/models/relation.model.js | 8 + src/models/role.model.js | 8 + src/models/schema.model.js | 8 + src/models/token.model.js | 8 + src/models/user.model.js | 8 + src/models/userRole.model.js | 8 + src/models/utils.model.js | 8 + src/routes/v2/api.route.js | 8 + src/routes/v2/asset.route.js | 8 + src/routes/v2/auth.route.js | 8 + src/routes/v2/changeLog.route.js | 8 + src/routes/v2/discussion.route.js | 8 + src/routes/v2/extendedApi.route.js | 8 + src/routes/v2/feedback.route.js | 8 + src/routes/v2/genai.route.js | 8 + src/routes/v2/homologation.route.js | 8 + src/routes/v2/index.js | 8 + src/routes/v2/instance.route.js | 8 + src/routes/v2/instanceRelation.route.js | 8 + src/routes/v2/issue.route.js | 8 + src/routes/v2/model.route.js | 8 + src/routes/v2/permission.route.js | 8 + src/routes/v2/prototype.route.js | 8 + src/routes/v2/relation.route.js | 8 + src/routes/v2/schema.route.js | 8 + src/routes/v2/search.route.js | 8 + src/routes/v2/user.route.js | 8 + src/scripts/assignAdmins.js | 8 + src/scripts/convertLogsCap.js | 8 + src/scripts/index.js | 8 + src/scripts/initializeRoles.js | 8 + src/scripts/migrate-api.js | 8 + src/scripts/setupScheduledCheck.js | 8 + src/services/api.service.js | 8 + src/services/asset.service.js | 8 + src/services/auth.service.js | 8 + src/services/changeLog.service.js | 8 + src/services/discussion.service.js | 8 + src/services/email.service.js | 8 + src/services/extendedApi.service.js | 8 + src/services/feedback.service.js | 8 + src/services/file.service.js | 8 + src/services/index.js | 8 + src/services/instance.service.js | 8 + src/services/instanceRelation.service.js | 8 + src/services/issue.service.js | 8 + src/services/listener.service.js | 8 + src/services/llm.service.js | 8 + src/services/log.service.js | 8 + src/services/model.service.js | 8 + src/services/permission.service.js | 8 + src/services/prototype.service.js | 8 + src/services/relation.service.js | 8 + src/services/schema.service.js | 8 + src/services/search.service.js | 8 + src/services/tag.service.js | 8 + src/services/token.service.js | 8 + src/services/user.service.js | 8 + src/typedefs/cacheDef.js | 8 + src/typedefs/index.js | 8 + src/typedefs/msGraph.js | 8 + src/utils/ApiError.js | 8 + src/utils/catchAsync.js | 8 + src/utils/emailTemplates.js | 8 + src/utils/image.js | 8 + src/utils/pick.js | 8 + src/utils/queryUtils.js | 8 + src/utils/sort.js | 8 + src/utils/textProcessing.js | 8 + src/validations/api.validation.js | 8 + src/validations/asset.validation.js | 8 + src/validations/auth.validation.js | 8 + src/validations/custom.validation.js | 8 + src/validations/discussion.validation.js | 8 + src/validations/email.validation.js | 8 + src/validations/extendedApi.validation.js | 8 + src/validations/feedback.validation.js | 8 + src/validations/index.js | 8 + src/validations/instance.validation.js | 8 + .../instanceRelation.validation.js | 8 + src/validations/issue.validation.js | 8 + src/validations/model.validation.js | 8 + src/validations/permission.validation.js | 8 + src/validations/prototype.validation.js | 8 + src/validations/relation.validation.js | 8 + src/validations/schema.validation.js | 8 + src/validations/search.validation.js | 8 + src/validations/tag.validation.js | 8 + src/validations/user.validation.js | 8 + start.sh | 8 + tests/fixtures/token.fixture.js | 8 + tests/fixtures/user.fixture.js | 8 + tests/integration/auth.test.js | 8 + tests/integration/docs.test.js | 8 + tests/integration/user.test.js | 8 + tests/unit/middlewares/error.test.js | 8 + .../models/plugins/paginate.plugin.test.js | 8 + .../unit/models/plugins/toJSON.plugin.test.js | 8 + tests/unit/models/user.model.test.js | 8 + tests/utils/setupTestDB.js | 8 + 176 files changed, 1469 insertions(+), 386 deletions(-) create mode 100644 .licenseignore diff --git a/.github/workflows/release-dev.yml b/.github/workflows/release-dev.yml index 1600add..ac1d04e 100644 --- a/.github/workflows/release-dev.yml +++ b/.github/workflows/release-dev.yml @@ -1,3 +1,11 @@ +# Copyright (c) 2025 Eclipse Foundation. +# +# This program and the accompanying materials are made available under the +# terms of the MIT License which is available at +# https://opensource.org/licenses/MIT. +# +# SPDX-License-Identifier: MIT + name: Release on Tag Push on: diff --git a/.github/workflows/retag-release-as-latest.yml b/.github/workflows/retag-release-as-latest.yml index 454b3d3..bd6e2c9 100644 --- a/.github/workflows/retag-release-as-latest.yml +++ b/.github/workflows/retag-release-as-latest.yml @@ -1,3 +1,11 @@ +# Copyright (c) 2025 Eclipse Foundation. +# +# This program and the accompanying materials are made available under the +# terms of the MIT License which is available at +# https://opensource.org/licenses/MIT. +# +# SPDX-License-Identifier: MIT + name: Retag Release Image as Latest on: diff --git a/.licenseignore b/.licenseignore new file mode 100644 index 0000000..c975ee0 --- /dev/null +++ b/.licenseignore @@ -0,0 +1,56 @@ +# Dependencies and package managers +node_modules/ +vendor/ +venv/ +.env/ +data/python-packages/ +service/src/app/ + +# Build outputs +dist/ +build/ +out/ +target/ +*.min.js +*.min.css + +# Third party code +third_party/ +external/ +libs/ + +# Generated files +*_generated.* +*.gen.* +*_pb2.py +*.pb.go + +# Documentation +*.md +LICENSE +NOTICE + +# Config files +.gitignore +.licenseignore +package-lock.json +yarn.lock +go.sum + +# Binary and media files +*.png +*.jpg +*.jpeg +*.gif +*.svg +*.ico +*.pdf +*.zip +*.tar.gz + +# Service-specific exclusions (for epam-service-connector) +service/LICENSE +service/service.tar.gz + +# Third party JavaScript libraries +public/js/highlight.pack.js \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 95064a5..a0476b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,11 @@ +# Copyright (c) 2025 Eclipse Foundation. +# +# This program and the accompanying materials are made available under the +# terms of the MIT License which is available at +# https://opensource.org/licenses/MIT. +# +# SPDX-License-Identifier: MIT + language: node_js node_js: - '12' diff --git a/LICENSE b/LICENSE index 3a42638..03bf655 100644 --- a/LICENSE +++ b/LICENSE @@ -1,386 +1,21 @@ -Attribution 4.0 International - -======================================================================= - -Creative Commons Corporation ("Creative Commons") is not a law firm and -does not provide legal services or legal advice. Distribution of -Creative Commons public licenses does not create a lawyer-client or -other relationship. Creative Commons makes its licenses and related -information available on an "as-is" basis. Creative Commons gives no -warranties regarding its licenses, any material licensed under their -terms and conditions, or any related information. Creative Commons -disclaims all liability for damages resulting from their use to the -fullest extent possible. - -Using Creative Commons Public Licenses - -Creative Commons public licenses provide a standard set of terms and -conditions that creators and other rights holders may use to share -original works of authorship and other material subject to copyright -and certain other rights specified in the public license below. The -following considerations are for informational purposes only, are not -exhaustive, and do not form part of our licenses. - - Considerations for licensors: Our public licenses are - intended for use by those authorized to give the public - permission to use material in ways otherwise restricted by - copyright and certain other rights. Our licenses are - irrevocable. Licensors should read and understand the terms - and conditions of the license they choose before applying it. - Licensors should also secure all rights necessary before - applying our licenses so that the public can reuse the - material as expected. Licensors should clearly mark any - material not subject to the license. This includes other CC- - licensed material, or material used under an exception or - limitation to copyright. More considerations for licensors: - wiki.creativecommons.org/Considerations_for_licensors - - Considerations for the public: By using one of our public - licenses, a licensor grants the public permission to use the - licensed material under specified terms and conditions. If - the licensor's permission is not necessary for any reason--for - example, because of any applicable exception or limitation to - copyright--then that use is not regulated by the license. Our - licenses grant only permissions under copyright and certain - other rights that a licensor has authority to grant. Use of - the licensed material may still be restricted for other - reasons, including because others have copyright or other - rights in the material. A licensor may make special requests, - such as asking that all changes be marked or described. - Although not required by our licenses, you are encouraged to - respect those requests where reasonable. More considerations - for the public: - wiki.creativecommons.org/Considerations_for_licensees - -======================================================================= - -Creative Commons Attribution 4.0 International Public License - -By exercising the Licensed Rights (defined below), You accept and agree -to be bound by the terms and conditions of this Creative Commons -Attribution 4.0 International Public License ("Public License"). To the -extent this Public License may be interpreted as a contract, You are -granted the Licensed Rights in consideration of Your acceptance of -these terms and conditions, and the Licensor grants You such rights in -consideration of benefits the Licensor receives from making the -Licensed Material available under these terms and conditions. - -Section 1 -- Definitions. - -a. Adapted Material means material subject to Copyright and Similar -Rights that is derived from or based upon the Licensed Material -and in which the Licensed Material is translated, altered, -arranged, transformed, or otherwise modified in a manner requiring -permission under the Copyright and Similar Rights held by the -Licensor. For purposes of this Public License, where the Licensed -Material is a musical work, performance, or sound recording, -Adapted Material is always produced where the Licensed Material is -synched in timed relation with a moving image. - -b. Adapter's License means the license You apply to Your Copyright -and Similar Rights in Your contributions to Adapted Material in -accordance with the terms and conditions of this Public License. - -c. Copyright and Similar Rights means copyright and/or similar rights -closely related to copyright including, without limitation, -performance, broadcast, sound recording, and Sui Generis Database -Rights, without regard to how the rights are labeled or -categorized. For purposes of this Public License, the rights -specified in Section 2(b)(1)-(2) are not Copyright and Similar -Rights. - -d. Effective Technological Measures means those measures that, in the -absence of proper authority, may not be circumvented under laws -fulfilling obligations under Article 11 of the WIPO Copyright -Treaty adopted on December 20, 1996, and/or similar international -agreements. - -e. Exceptions and Limitations means fair use, fair dealing, and/or -any other exception or limitation to Copyright and Similar Rights -that applies to Your use of the Licensed Material. - -f. Licensed Material means the artistic or literary work, database, -or other material to which the Licensor applied this Public -License. - -g. Licensed Rights means the rights granted to You subject to the -terms and conditions of this Public License, which are limited to -all Copyright and Similar Rights that apply to Your use of the -Licensed Material and that the Licensor has authority to license. - -h. Licensor means the individual(s) or entity(ies) granting rights -under this Public License. - -i. Share means to provide material to the public by any means or -process that requires permission under the Licensed Rights, such -as reproduction, public display, public performance, distribution, -dissemination, communication, or importation, and to make material -available to the public including in ways that members of the -public may access the material from a place and at a time -individually chosen by them. - -j. Sui Generis Database Rights means rights other than copyright -resulting from Directive 96/9/EC of the European Parliament and of -the Council of 11 March 1996 on the legal protection of databases, -as amended and/or succeeded, as well as other essentially -equivalent rights anywhere in the world. - -k. You means the individual or entity exercising the Licensed Rights -under this Public License. Your has a corresponding meaning. - -Section 2 -- Scope. - -a. License grant. - - 1. Subject to the terms and conditions of this Public License, - the Licensor hereby grants You a worldwide, royalty-free, - non-sublicensable, non-exclusive, irrevocable license to - exercise the Licensed Rights in the Licensed Material to: - - a. reproduce and Share the Licensed Material, in whole or - in part; and - - b. produce, reproduce, and Share Adapted Material. - - 2. Exceptions and Limitations. For the avoidance of doubt, where - Exceptions and Limitations apply to Your use, this Public - License does not apply, and You do not need to comply with - its terms and conditions. - - 3. Term. The term of this Public License is specified in Section - 6(a). - - 4. Media and formats; technical modifications allowed. The - Licensor authorizes You to exercise the Licensed Rights in - all media and formats whether now known or hereafter created, - and to make technical modifications necessary to do so. The - Licensor waives and/or agrees not to assert any right or - authority to forbid You from making technical modifications - necessary to exercise the Licensed Rights, including - technical modifications necessary to circumvent Effective - Technological Measures. For purposes of this Public License, - simply making modifications authorized by this Section 2(a) - (4) never produces Adapted Material. - - 5. Downstream recipients. - - a. Offer from the Licensor -- Licensed Material. Every - recipient of the Licensed Material automatically - receives an offer from the Licensor to exercise the - Licensed Rights under the terms and conditions of this - Public License. - - b. No downstream restrictions. You may not offer or impose - any additional or different terms or conditions on, or - apply any Effective Technological Measures to, the - Licensed Material if doing so restricts exercise of the - Licensed Rights by any recipient of the Licensed - Material. - - 6. No endorsement. Nothing in this Public License constitutes or - may be construed as permission to assert or imply that You - are, or that Your use of the Licensed Material is, connected - with, or sponsored, endorsed, or granted official status by, - the Licensor or others designated to receive attribution as - provided in Section 3(a)(1)(A)(i). - -b. Other rights. - - 1. Moral rights, such as the right of integrity, are not - licensed under this Public License, nor are publicity, - privacy, and/or other similar personality rights; however, to - the extent possible, the Licensor waives and/or agrees not to - assert any such rights held by the Licensor to the limited - extent necessary to allow You to exercise the Licensed - Rights, but not otherwise. - - 2. Patent and trademark rights are not licensed under this - Public License. - - 3. To the extent possible, the Licensor waives any right to - collect royalties from You for the exercise of the Licensed - Rights, whether directly or through a collecting society - under any voluntary or waivable statutory or compulsory - licensing scheme. In all other cases the Licensor expressly - reserves any right to collect such royalties. - -Section 3 -- License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the -following conditions. - -a. Attribution. - - 1. If You Share the Licensed Material (including in modified - form), You must: - - a. retain the following if it is supplied by the Licensor - with the Licensed Material: - - i. identification of the creator(s) of the Licensed - Material and any others designated to receive - attribution, in any reasonable manner requested by - the Licensor (including by pseudonym if - designated); - - ii. a copyright notice; - - iii. a notice that refers to this Public License; - - iv. a notice that refers to the disclaimer of - warranties; - - v. a URI or hyperlink to the Licensed Material to the - extent reasonably practicable; - - b. indicate if You modified the Licensed Material and - retain an indication of any previous modifications; and - - c. indicate the Licensed Material is licensed under this - Public License, and include the text of, or the URI or - hyperlink to, this Public License. - - 2. You may satisfy the conditions in Section 3(a)(1) in any - reasonable manner based on the medium, means, and context in - which You Share the Licensed Material. For example, it may be - reasonable to satisfy the conditions by providing a URI or - hyperlink to a resource that includes the required - information. - - 3. If requested by the Licensor, You must remove any of the - information required by Section 3(a)(1)(A) to the extent - reasonably practicable. - - 4. If You Share Adapted Material You produce, the Adapter's - License You apply must not prevent recipients of the Adapted - Material from complying with this Public License. - -Section 4 -- Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that -apply to Your use of the Licensed Material: - -a. for the avoidance of doubt, Section 2(a)(1) grants You the right -to extract, reuse, reproduce, and Share all or a substantial -portion of the contents of the database; - -b. if You include all or a substantial portion of the database -contents in a database in which You have Sui Generis Database -Rights, then the database in which You have Sui Generis Database -Rights (but not its individual contents) is Adapted Material; and - -c. You must comply with the conditions in Section 3(a) if You Share -all or a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not -replace Your obligations under this Public License where the Licensed -Rights include other Copyright and Similar Rights. - -Section 5 -- Disclaimer of Warranties and Limitation of Liability. - -a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE -EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS -AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF -ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, -IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, -WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, -ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT -KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT -ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - -b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE -TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, -NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, -INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, -COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR -USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN -ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR -DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR -IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - -c. The disclaimer of warranties and limitation of liability provided -above shall be interpreted in a manner that, to the extent -possible, most closely approximates an absolute disclaimer and -waiver of all liability. - -Section 6 -- Term and Termination. - -a. This Public License applies for the term of the Copyright and -Similar Rights licensed here. However, if You fail to comply with -this Public License, then Your rights under this Public License -terminate automatically. - -b. Where Your right to use the Licensed Material has terminated under -Section 6(a), it reinstates: - - 1. automatically as of the date the violation is cured, provided - it is cured within 30 days of Your discovery of the - violation; or - - 2. upon express reinstatement by the Licensor. - - For the avoidance of doubt, this Section 6(b) does not affect any - right the Licensor may have to seek remedies for Your violations - of this Public License. - -c. For the avoidance of doubt, the Licensor may also offer the -Licensed Material under separate terms or conditions or stop -distributing the Licensed Material at any time; however, doing so -will not terminate this Public License. - -d. Sections 1, 5, 6, 7, and 8 survive termination of this Public -License. - -Section 7 -- Other Terms and Conditions. - -a. The Licensor shall not be bound by any additional or different -terms or conditions communicated by You unless expressly agreed. - -b. Any arrangements, understandings, or agreements regarding the -Licensed Material not stated herein are separate from and -independent of the terms and conditions of this Public License. - -Section 8 -- Interpretation. - -a. For the avoidance of doubt, this Public License does not, and -shall not be interpreted to, reduce, limit, restrict, or impose -conditions on any use of the Licensed Material that could lawfully -be made without permission under this Public License. - -b. To the extent possible, if any provision of this Public License is -deemed unenforceable, it shall be automatically reformed to the -minimum extent necessary to make it enforceable. If the provision -cannot be reformed, it shall be severed from this Public License -without affecting the enforceability of the remaining terms and -conditions. - -c. No term or condition of this Public License will be waived and no -failure to comply consented to unless expressly agreed to by the -Licensor. - -d. Nothing in this Public License constitutes or may be interpreted -as a limitation upon, or waiver of, any privileges and immunities -that apply to the Licensor or You, including from the legal -processes of any jurisdiction or authority. - -======================================================================= - -Creative Commons is not a party to its public -licenses. Notwithstanding, Creative Commons may elect to apply one of -its public licenses to material it publishes and in those instances -will be considered the “Licensor.” The text of the Creative Commons -public licenses is dedicated to the public domain under the CC0 Public -Domain Dedication. Except for the limited purpose of indicating that -material is shared under a Creative Commons public license or as -otherwise permitted by the Creative Commons policies published at -creativecommons.org/policies, Creative Commons does not authorize the -use of the trademark "Creative Commons" or any other trademark or logo -of Creative Commons without its prior written consent including, -without limitation, in connection with any unauthorized modifications -to any of its public licenses or any other arrangements, -understandings, or agreements concerning use of licensed material. For -the avoidance of doubt, this paragraph does not form part of the -public licenses. - -Creative Commons may be contacted at creativecommons.org. +MIT License + +Copyright (c) 2025 Eclipse Foundation. + +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. \ No newline at end of file diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 8bd137f..ebc730d 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,3 +1,11 @@ +# Copyright (c) 2025 Eclipse Foundation. +# +# This program and the accompanying materials are made available under the +# terms of the MIT License which is available at +# https://opensource.org/licenses/MIT. +# +# SPDX-License-Identifier: MIT + services: playground-be: build: diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 11b000d..e57b818 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -1,3 +1,11 @@ +# Copyright (c) 2025 Eclipse Foundation. +# +# This program and the accompanying materials are made available under the +# terms of the MIT License which is available at +# https://opensource.org/licenses/MIT. +# +# SPDX-License-Identifier: MIT + services: playground-be: command: yarn start diff --git a/docker-compose.test.yml b/docker-compose.test.yml index 1d3b5f0..b80da22 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -1,3 +1,11 @@ +# Copyright (c) 2025 Eclipse Foundation. +# +# This program and the accompanying materials are made available under the +# terms of the MIT License which is available at +# https://opensource.org/licenses/MIT. +# +# SPDX-License-Identifier: MIT + services: playground-be: command: yarn test diff --git a/docker-compose.yml b/docker-compose.yml index a0f4dd6..49da610 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,11 @@ +# Copyright (c) 2025 Eclipse Foundation. +# +# This program and the accompanying materials are made available under the +# terms of the MIT License which is available at +# https://opensource.org/licenses/MIT. +# +# SPDX-License-Identifier: MIT + services: kong: platform: linux/amd64 diff --git a/jest.config.js b/jest.config.js index e844272..681b4f2 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + module.exports = { testEnvironment: 'node', testEnvironmentOptions: { diff --git a/kong/kong.yml b/kong/kong.yml index d8fb196..f80ae26 100755 --- a/kong/kong.yml +++ b/kong/kong.yml @@ -1,3 +1,11 @@ +# Copyright (c) 2025 Eclipse Foundation. +# +# This program and the accompanying materials are made available under the +# terms of the MIT License which is available at +# https://opensource.org/licenses/MIT. +# +# SPDX-License-Identifier: MIT + _format_version: '3.0' _transform: true diff --git a/src/app.js b/src/app.js index 41e5f27..176b833 100644 --- a/src/app.js +++ b/src/app.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const express = require('express'); const helmet = require('helmet'); const cookies = require('cookie-parser'); diff --git a/src/config/axios.js b/src/config/axios.js index 7e70279..8ed83b0 100644 --- a/src/config/axios.js +++ b/src/config/axios.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const { default: axios } = require('axios'); const config = require('./config'); diff --git a/src/config/config.js b/src/config/config.js index 42aea55..7c4b4a6 100644 --- a/src/config/config.js +++ b/src/config/config.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const dotenv = require('dotenv'); const path = require('path'); const Joi = require('joi'); diff --git a/src/config/enums.js b/src/config/enums.js index d47b355..93735b5 100644 --- a/src/config/enums.js +++ b/src/config/enums.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const visibilityTypes = { PUBLIC: 'public', PRIVATE: 'private', diff --git a/src/config/firebase.js b/src/config/firebase.js index bdfcfc6..54c1a4e 100644 --- a/src/config/firebase.js +++ b/src/config/firebase.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const { initializeApp, cert } = require('firebase-admin/app'); const { getAuth } = require('firebase-admin/auth'); const { getFirestore } = require('firebase-admin/firestore'); diff --git a/src/config/logger.js b/src/config/logger.js index bba9a7c..1bf30b4 100644 --- a/src/config/logger.js +++ b/src/config/logger.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const winston = require('winston'); const config = require('./config'); diff --git a/src/config/morgan.js b/src/config/morgan.js index 5239252..b8a3f3d 100644 --- a/src/config/morgan.js +++ b/src/config/morgan.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const morgan = require('morgan'); const config = require('./config'); const logger = require('./logger'); diff --git a/src/config/passport.js b/src/config/passport.js index 73feed0..fcfc4b6 100644 --- a/src/config/passport.js +++ b/src/config/passport.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const { Strategy: JwtStrategy, ExtractJwt } = require('passport-jwt'); const config = require('./config'); const { tokenTypes } = require('./tokens'); diff --git a/src/config/proxyHandler.js b/src/config/proxyHandler.js index bcfe521..2843f4b 100644 --- a/src/config/proxyHandler.js +++ b/src/config/proxyHandler.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const { createProxyMiddleware } = require('http-proxy-middleware'); const config = require('./config'); const httpStatus = require('http-status'); diff --git a/src/config/roles.js b/src/config/roles.js index 1f75b15..d468fbb 100644 --- a/src/config/roles.js +++ b/src/config/roles.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const allRoles = { user: ['getUsers'], admin: ['getUsers', 'manageUsers'], diff --git a/src/config/rolesV2.js b/src/config/rolesV2.js index b6b26fc..02dc97c 100644 --- a/src/config/rolesV2.js +++ b/src/config/rolesV2.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const { newEnforcer, Enforcer } = require('casbin'); const { default: MongooseAdapter } = require('casbin-mongoose-adapter'); const path = require('path'); diff --git a/src/config/socket.js b/src/config/socket.js index 0e6f87c..536cc93 100644 --- a/src/config/socket.js +++ b/src/config/socket.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const { Server } = require('socket.io'); const logger = require('./logger'); const ApiError = require('../utils/ApiError'); diff --git a/src/config/tokens.js b/src/config/tokens.js index 77a9976..bcf881d 100644 --- a/src/config/tokens.js +++ b/src/config/tokens.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const tokenTypes = { ACCESS: 'access', REFRESH: 'refresh', diff --git a/src/controllers/api.controller.js b/src/controllers/api.controller.js index 498268e..0641da3 100644 --- a/src/controllers/api.controller.js +++ b/src/controllers/api.controller.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const { apiService } = require('../services'); const catchAsync = require('../utils/catchAsync'); diff --git a/src/controllers/asset.controller.js b/src/controllers/asset.controller.js index 45bca37..bc876b9 100644 --- a/src/controllers/asset.controller.js +++ b/src/controllers/asset.controller.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const { assetService, tokenService, permissionService } = require('../services'); const ApiError = require('../utils/ApiError'); diff --git a/src/controllers/auth.controller.js b/src/controllers/auth.controller.js index c7cda23..c7b2f22 100644 --- a/src/controllers/auth.controller.js +++ b/src/controllers/auth.controller.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const catchAsync = require('../utils/catchAsync'); const { authService, userService, tokenService, emailService, logService, permissionService } = require('../services'); diff --git a/src/controllers/changeLog.controller.js b/src/controllers/changeLog.controller.js index db64cea..21a293b 100644 --- a/src/controllers/changeLog.controller.js +++ b/src/controllers/changeLog.controller.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const catchAsync = require('../utils/catchAsync'); const { changeLogService } = require('../services'); diff --git a/src/controllers/discussion.controller.js b/src/controllers/discussion.controller.js index 80a3661..3a913ee 100644 --- a/src/controllers/discussion.controller.js +++ b/src/controllers/discussion.controller.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const catchAsync = require('../utils/catchAsync'); const { discussionService } = require('../services'); diff --git a/src/controllers/extendedApi.controller.js b/src/controllers/extendedApi.controller.js index fefe6a5..fcf2cac 100644 --- a/src/controllers/extendedApi.controller.js +++ b/src/controllers/extendedApi.controller.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const catchAsync = require('../utils/catchAsync'); const { extendedApiService, permissionService } = require('../services'); diff --git a/src/controllers/feedback.controller.js b/src/controllers/feedback.controller.js index 6a87ace..22f75b4 100644 --- a/src/controllers/feedback.controller.js +++ b/src/controllers/feedback.controller.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const { feedbackService } = require('../services'); const catchAsync = require('../utils/catchAsync'); diff --git a/src/controllers/index.js b/src/controllers/index.js index 99e6cdb..30c6c47 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + module.exports.authController = require('./auth.controller'); module.exports.userController = require('./user.controller'); module.exports.tagController = require('./tag.controller'); diff --git a/src/controllers/instance.controller.js b/src/controllers/instance.controller.js index 28d3682..3e1f4d8 100644 --- a/src/controllers/instance.controller.js +++ b/src/controllers/instance.controller.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const pick = require('../utils/pick'); const ApiError = require('../utils/ApiError'); diff --git a/src/controllers/instanceRelation.controller.js b/src/controllers/instanceRelation.controller.js index 2861c33..2f8c98c 100644 --- a/src/controllers/instanceRelation.controller.js +++ b/src/controllers/instanceRelation.controller.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const pick = require('../utils/pick'); const ApiError = require('../utils/ApiError'); diff --git a/src/controllers/issue.controller.js b/src/controllers/issue.controller.js index 0fe7a57..4313884 100644 --- a/src/controllers/issue.controller.js +++ b/src/controllers/issue.controller.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const catchAsync = require('../utils/catchAsync'); const { issueService, extendedApiService } = require('../services'); diff --git a/src/controllers/model.controller.js b/src/controllers/model.controller.js index 4014e64..0bd6401 100644 --- a/src/controllers/model.controller.js +++ b/src/controllers/model.controller.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const { modelService, apiService, permissionService, extendedApiService } = require('../services'); const catchAsync = require('../utils/catchAsync'); diff --git a/src/controllers/permission.controller.js b/src/controllers/permission.controller.js index eb134e6..5666a71 100644 --- a/src/controllers/permission.controller.js +++ b/src/controllers/permission.controller.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const permissionService = require('../services/permission.service'); const catchAsync = require('../utils/catchAsync'); const pick = require('../utils/pick'); diff --git a/src/controllers/prototype.controller.js b/src/controllers/prototype.controller.js index 1bb9c2f..38e398b 100644 --- a/src/controllers/prototype.controller.js +++ b/src/controllers/prototype.controller.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const catchAsync = require('../utils/catchAsync'); const { prototypeService, permissionService } = require('../services'); diff --git a/src/controllers/relation.controller.js b/src/controllers/relation.controller.js index 54b7e8f..ccb24ab 100644 --- a/src/controllers/relation.controller.js +++ b/src/controllers/relation.controller.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const pick = require('../utils/pick'); const ApiError = require('../utils/ApiError'); diff --git a/src/controllers/schema.controller.js b/src/controllers/schema.controller.js index 84987c2..572f7c7 100644 --- a/src/controllers/schema.controller.js +++ b/src/controllers/schema.controller.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const pick = require('../utils/pick'); const catchAsync = require('../utils/catchAsync'); diff --git a/src/controllers/search.controller.js b/src/controllers/search.controller.js index b6565a5..8eb17f6 100644 --- a/src/controllers/search.controller.js +++ b/src/controllers/search.controller.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const { searchService } = require('../services'); const ApiError = require('../utils/ApiError'); diff --git a/src/controllers/tag.controller.js b/src/controllers/tag.controller.js index 854ec0a..3ec339f 100644 --- a/src/controllers/tag.controller.js +++ b/src/controllers/tag.controller.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const catchAsync = require('../utils/catchAsync'); const pick = require('../utils/pick'); const { tagService } = require('../services'); diff --git a/src/controllers/user.controller.js b/src/controllers/user.controller.js index 229875b..78e833f 100644 --- a/src/controllers/user.controller.js +++ b/src/controllers/user.controller.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const pick = require('../utils/pick'); const ApiError = require('../utils/ApiError'); diff --git a/src/decorators/FeedbackPrototypeDecorator.js b/src/decorators/FeedbackPrototypeDecorator.js index 57df931..f01c182 100644 --- a/src/decorators/FeedbackPrototypeDecorator.js +++ b/src/decorators/FeedbackPrototypeDecorator.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const PrototypeDecorator = require('./PrototypeDecorator'); const feedbackService = require('../services/feedback.service'); diff --git a/src/decorators/FeedbackPrototypeListDecorator.js b/src/decorators/FeedbackPrototypeListDecorator.js index 6bb163c..247da22 100644 --- a/src/decorators/FeedbackPrototypeListDecorator.js +++ b/src/decorators/FeedbackPrototypeListDecorator.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const PrototypeListDecorator = require('./PrototypeListDecorator'); const { feedbackService } = require('../services'); diff --git a/src/decorators/ParsedJsonPropertiesMongooseDecorator.js b/src/decorators/ParsedJsonPropertiesMongooseDecorator.js index 164b1a2..95e675d 100644 --- a/src/decorators/ParsedJsonPropertiesMongooseDecorator.js +++ b/src/decorators/ParsedJsonPropertiesMongooseDecorator.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const { Model } = require('mongoose'); /** diff --git a/src/decorators/ParsedJsonPropertiesMongooseListDecorator.js b/src/decorators/ParsedJsonPropertiesMongooseListDecorator.js index 11c9555..1ff10d8 100644 --- a/src/decorators/ParsedJsonPropertiesMongooseListDecorator.js +++ b/src/decorators/ParsedJsonPropertiesMongooseListDecorator.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + // ParsedJsonPropertiesMongooseDecorator that handles multiple fields. const ParsedJsonPropertiesMongooseDecorator = require('./ParsedJsonPropertiesMongooseDecorator'); diff --git a/src/decorators/PermissionDecorator.js b/src/decorators/PermissionDecorator.js index 408c1e3..ea1b9cd 100644 --- a/src/decorators/PermissionDecorator.js +++ b/src/decorators/PermissionDecorator.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const { PERMISSIONS_DESCRIPTION } = require('../config/roles'); class PermissionDecorator { diff --git a/src/decorators/PermissionListDecorator.js b/src/decorators/PermissionListDecorator.js index 5490cd1..65847e0 100644 --- a/src/decorators/PermissionListDecorator.js +++ b/src/decorators/PermissionListDecorator.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const PermissionDecorator = require('./PermissionDecorator'); class PermissionListDecorator { diff --git a/src/decorators/PrototypeDecorator.js b/src/decorators/PrototypeDecorator.js index fcc6897..d56db4b 100644 --- a/src/decorators/PrototypeDecorator.js +++ b/src/decorators/PrototypeDecorator.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + class PrototypeDecorator { constructor(prototype) { this.prototype = prototype; diff --git a/src/decorators/PrototypeListDecorator.js b/src/decorators/PrototypeListDecorator.js index c375734..f223df5 100644 --- a/src/decorators/PrototypeListDecorator.js +++ b/src/decorators/PrototypeListDecorator.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + class PrototypeListDecorator { constructor(prototypeList) { this.prototypeList = prototypeList; diff --git a/src/docs/components.yml b/src/docs/components.yml index 8778920..cd1b427 100644 --- a/src/docs/components.yml +++ b/src/docs/components.yml @@ -1,3 +1,11 @@ +# Copyright (c) 2025 Eclipse Foundation. +# +# This program and the accompanying materials are made available under the +# terms of the MIT License which is available at +# https://opensource.org/licenses/MIT. +# +# SPDX-License-Identifier: MIT + components: schemas: User: diff --git a/src/docs/swaggerDef.js b/src/docs/swaggerDef.js index c1e1c1a..13b34da 100644 --- a/src/docs/swaggerDef.js +++ b/src/docs/swaggerDef.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const { version } = require('../../package.json'); const config = require('../config/config'); diff --git a/src/index.js b/src/index.js index f94595e..d18d468 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const app = require('./app'); const config = require('./config/config'); diff --git a/src/middlewares/auth.js b/src/middlewares/auth.js index 560b114..52cc0c0 100644 --- a/src/middlewares/auth.js +++ b/src/middlewares/auth.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const ApiError = require('../utils/ApiError'); const config = require('../config/config'); diff --git a/src/middlewares/error.js b/src/middlewares/error.js index df14e91..b3a746c 100644 --- a/src/middlewares/error.js +++ b/src/middlewares/error.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const httpStatus = require('http-status'); const config = require('../config/config'); diff --git a/src/middlewares/genaiPermission.js b/src/middlewares/genaiPermission.js index dc724ae..03a3b42 100644 --- a/src/middlewares/genaiPermission.js +++ b/src/middlewares/genaiPermission.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const { permissionService } = require('../services'); const { PERMISSIONS } = require('../config/roles'); diff --git a/src/middlewares/permission.js b/src/middlewares/permission.js index ad44fc8..f63f151 100644 --- a/src/middlewares/permission.js +++ b/src/middlewares/permission.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const { permissionService } = require('../services'); const ApiError = require('../utils/ApiError'); diff --git a/src/middlewares/rateLimiter.js b/src/middlewares/rateLimiter.js index 43804c0..e6930c3 100644 --- a/src/middlewares/rateLimiter.js +++ b/src/middlewares/rateLimiter.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const rateLimit = require('express-rate-limit'); const authLimiter = rateLimit({ diff --git a/src/middlewares/validate.js b/src/middlewares/validate.js index 1407954..d71de77 100644 --- a/src/middlewares/validate.js +++ b/src/middlewares/validate.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Joi = require('joi'); const httpStatus = require('http-status'); const pick = require('../utils/pick'); diff --git a/src/models/api.model.js b/src/models/api.model.js index 37237ee..57082d2 100644 --- a/src/models/api.model.js +++ b/src/models/api.model.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const { toJSON, paginate } = require('./plugins'); diff --git a/src/models/asset.model.js b/src/models/asset.model.js index c7ae747..976b3e1 100644 --- a/src/models/asset.model.js +++ b/src/models/asset.model.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const { toJSON, paginate } = require('./plugins'); diff --git a/src/models/changeLog.model.js b/src/models/changeLog.model.js index 979f17e..7ff6153 100644 --- a/src/models/changeLog.model.js +++ b/src/models/changeLog.model.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const { toJSON, paginate } = require('./plugins'); diff --git a/src/models/discussion.model.js b/src/models/discussion.model.js index 938e61e..2ae3efc 100644 --- a/src/models/discussion.model.js +++ b/src/models/discussion.model.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const { toJSON, paginate } = require('./plugins'); diff --git a/src/models/extendedApi.model.js b/src/models/extendedApi.model.js index 6707ec3..d39efc1 100644 --- a/src/models/extendedApi.model.js +++ b/src/models/extendedApi.model.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const { toJSON, paginate, captureChange } = require('./plugins'); diff --git a/src/models/feedback.model.js b/src/models/feedback.model.js index 0c79f14..f1ff31c 100644 --- a/src/models/feedback.model.js +++ b/src/models/feedback.model.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const { toJSON, paginate } = require('./plugins'); diff --git a/src/models/index.js b/src/models/index.js index adf1c52..070883b 100644 --- a/src/models/index.js +++ b/src/models/index.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + module.exports.Token = require('./token.model'); module.exports.User = require('./user.model'); module.exports.Model = require('./model.model'); diff --git a/src/models/instance.model.js b/src/models/instance.model.js index 49a0589..2246d49 100644 --- a/src/models/instance.model.js +++ b/src/models/instance.model.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const { toJSON, paginate } = require('./plugins'); const InstanceRelation = require('./instanceRelation.model'); diff --git a/src/models/instanceRelation.model.js b/src/models/instanceRelation.model.js index 9955763..9c81617 100644 --- a/src/models/instanceRelation.model.js +++ b/src/models/instanceRelation.model.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const { toJSON, paginate } = require('./plugins'); diff --git a/src/models/issue.model.js b/src/models/issue.model.js index 94490dc..a5ac308 100644 --- a/src/models/issue.model.js +++ b/src/models/issue.model.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const { toJSON, paginate } = require('./plugins'); diff --git a/src/models/model.model.js b/src/models/model.model.js index abf0db9..1b2719b 100644 --- a/src/models/model.model.js +++ b/src/models/model.model.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const { toJSON, paginate, captureChange } = require('./plugins'); const { visibilityTypes } = require('../config/enums'); diff --git a/src/models/plugins/captureChange.plugin.js b/src/models/plugins/captureChange.plugin.js index 86c6d95..637f570 100644 --- a/src/models/plugins/captureChange.plugin.js +++ b/src/models/plugins/captureChange.plugin.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const _ = require('lodash'); const ChangeLog = require('../changeLog.model'); const logger = require('../../config/logger'); diff --git a/src/models/plugins/index.js b/src/models/plugins/index.js index 6c7a126..e685f35 100644 --- a/src/models/plugins/index.js +++ b/src/models/plugins/index.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + module.exports.toJSON = require('./toJSON.plugin'); module.exports.paginate = require('./paginate.plugin'); module.exports.captureChange = require('./captureChange.plugin'); diff --git a/src/models/plugins/paginate.plugin.js b/src/models/plugins/paginate.plugin.js index 4d95aae..36b5a47 100644 --- a/src/models/plugins/paginate.plugin.js +++ b/src/models/plugins/paginate.plugin.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + /* eslint-disable no-param-reassign */ const config = require('../../config/config'); diff --git a/src/models/plugins/toJSON.plugin.js b/src/models/plugins/toJSON.plugin.js index 97a7df2..69e4973 100644 --- a/src/models/plugins/toJSON.plugin.js +++ b/src/models/plugins/toJSON.plugin.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + /* eslint-disable no-param-reassign */ /** diff --git a/src/models/prototype.model.js b/src/models/prototype.model.js index a77448f..470cf87 100644 --- a/src/models/prototype.model.js +++ b/src/models/prototype.model.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const { toJSON, paginate, captureChange } = require('./plugins'); const { stateTypes } = require('../config/enums'); diff --git a/src/models/relation.model.js b/src/models/relation.model.js index 5a0b03a..4351828 100644 --- a/src/models/relation.model.js +++ b/src/models/relation.model.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + // models/relation.model.js const mongoose = require('mongoose'); const { toJSON, paginate } = require('./plugins'); diff --git a/src/models/role.model.js b/src/models/role.model.js index 279eb57..bf02403 100644 --- a/src/models/role.model.js +++ b/src/models/role.model.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const { ROLES_ENUM } = require('../config/roles'); const { toJSON } = require('./plugins'); diff --git a/src/models/schema.model.js b/src/models/schema.model.js index 3d72b8f..219188b 100644 --- a/src/models/schema.model.js +++ b/src/models/schema.model.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const { toJSON, paginate } = require('./plugins'); const Relation = require('./relation.model'); diff --git a/src/models/token.model.js b/src/models/token.model.js index 9ff35e2..3b6288a 100644 --- a/src/models/token.model.js +++ b/src/models/token.model.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const { toJSON } = require('./plugins'); const { tokenTypes } = require('../config/tokens'); diff --git a/src/models/user.model.js b/src/models/user.model.js index d0a2d10..0021582 100644 --- a/src/models/user.model.js +++ b/src/models/user.model.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const validator = require('validator'); const bcrypt = require('bcryptjs'); diff --git a/src/models/userRole.model.js b/src/models/userRole.model.js index d98dfd9..2f008f3 100644 --- a/src/models/userRole.model.js +++ b/src/models/userRole.model.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const userRoleSchema = new mongoose.Schema({ diff --git a/src/models/utils.model.js b/src/models/utils.model.js index 38f1ee8..09dec78 100644 --- a/src/models/utils.model.js +++ b/src/models/utils.model.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const timestamp = mongoose.Schema( diff --git a/src/routes/v2/api.route.js b/src/routes/v2/api.route.js index b0874c8..3e91555 100644 --- a/src/routes/v2/api.route.js +++ b/src/routes/v2/api.route.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const express = require('express'); const auth = require('../../middlewares/auth'); const validate = require('../../middlewares/validate'); diff --git a/src/routes/v2/asset.route.js b/src/routes/v2/asset.route.js index 0987599..3efc18c 100644 --- a/src/routes/v2/asset.route.js +++ b/src/routes/v2/asset.route.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const express = require('express'); const auth = require('../../middlewares/auth'); const validate = require('../../middlewares/validate'); diff --git a/src/routes/v2/auth.route.js b/src/routes/v2/auth.route.js index 3155c38..b389cee 100644 --- a/src/routes/v2/auth.route.js +++ b/src/routes/v2/auth.route.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const express = require('express'); const validate = require('../../middlewares/validate'); const authValidation = require('../../validations/auth.validation'); diff --git a/src/routes/v2/changeLog.route.js b/src/routes/v2/changeLog.route.js index 7146d6c..7483003 100644 --- a/src/routes/v2/changeLog.route.js +++ b/src/routes/v2/changeLog.route.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const config = require('../../config/config'); const { PERMISSIONS } = require('../../config/roles'); const { changeLogController } = require('../../controllers'); diff --git a/src/routes/v2/discussion.route.js b/src/routes/v2/discussion.route.js index a1a86cf..0b7a389 100644 --- a/src/routes/v2/discussion.route.js +++ b/src/routes/v2/discussion.route.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const express = require('express'); const validate = require('../../middlewares/validate'); const { discussionValidation } = require('../../validations'); diff --git a/src/routes/v2/extendedApi.route.js b/src/routes/v2/extendedApi.route.js index c56ba67..9c24b99 100644 --- a/src/routes/v2/extendedApi.route.js +++ b/src/routes/v2/extendedApi.route.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const express = require('express'); const auth = require('../../middlewares/auth'); const validate = require('../../middlewares/validate'); diff --git a/src/routes/v2/feedback.route.js b/src/routes/v2/feedback.route.js index c66e704..a7918fa 100644 --- a/src/routes/v2/feedback.route.js +++ b/src/routes/v2/feedback.route.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const express = require('express'); const validate = require('../../middlewares/validate'); const auth = require('../../middlewares/auth'); diff --git a/src/routes/v2/genai.route.js b/src/routes/v2/genai.route.js index 38b23a1..82b6f83 100644 --- a/src/routes/v2/genai.route.js +++ b/src/routes/v2/genai.route.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const { createProxyMiddleware, fixRequestBody } = require('http-proxy-middleware'); const config = require('../../config/config'); const { proxyHandler } = require('../../config/proxyHandler'); diff --git a/src/routes/v2/homologation.route.js b/src/routes/v2/homologation.route.js index 08ad0eb..dfd8f78 100644 --- a/src/routes/v2/homologation.route.js +++ b/src/routes/v2/homologation.route.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const express = require('express'); const config = require('../../config/config'); const auth = require('../../middlewares/auth'); diff --git a/src/routes/v2/index.js b/src/routes/v2/index.js index 32a7dea..96e918d 100644 --- a/src/routes/v2/index.js +++ b/src/routes/v2/index.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const express = require('express'); const authRoute = require('./auth.route'); const userRoute = require('./user.route'); diff --git a/src/routes/v2/instance.route.js b/src/routes/v2/instance.route.js index 0a4eae2..b325be8 100644 --- a/src/routes/v2/instance.route.js +++ b/src/routes/v2/instance.route.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const express = require('express'); const validate = require('../../middlewares/validate'); const auth = require('../../middlewares/auth'); diff --git a/src/routes/v2/instanceRelation.route.js b/src/routes/v2/instanceRelation.route.js index 46abfd4..e2e6b3a 100644 --- a/src/routes/v2/instanceRelation.route.js +++ b/src/routes/v2/instanceRelation.route.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const express = require('express'); const validate = require('../../middlewares/validate'); const auth = require('../../middlewares/auth'); diff --git a/src/routes/v2/issue.route.js b/src/routes/v2/issue.route.js index 55c4cdf..a0ba272 100644 --- a/src/routes/v2/issue.route.js +++ b/src/routes/v2/issue.route.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const express = require('express'); const validate = require('../../middlewares/validate'); const issueValidation = require('../../validations/issue.validation'); diff --git a/src/routes/v2/model.route.js b/src/routes/v2/model.route.js index b6d712d..921b52d 100644 --- a/src/routes/v2/model.route.js +++ b/src/routes/v2/model.route.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const express = require('express'); const validate = require('../../middlewares/validate'); const modelValidation = require('../../validations/model.validation'); diff --git a/src/routes/v2/permission.route.js b/src/routes/v2/permission.route.js index 34c429a..4d6a44b 100644 --- a/src/routes/v2/permission.route.js +++ b/src/routes/v2/permission.route.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const express = require('express'); const router = express.Router(); diff --git a/src/routes/v2/prototype.route.js b/src/routes/v2/prototype.route.js index f6add83..7eed1f2 100644 --- a/src/routes/v2/prototype.route.js +++ b/src/routes/v2/prototype.route.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const express = require('express'); const auth = require('../../middlewares/auth'); const validate = require('../../middlewares/validate'); diff --git a/src/routes/v2/relation.route.js b/src/routes/v2/relation.route.js index bef8d94..84d9da4 100644 --- a/src/routes/v2/relation.route.js +++ b/src/routes/v2/relation.route.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const express = require('express'); const validate = require('../../middlewares/validate'); const auth = require('../../middlewares/auth'); diff --git a/src/routes/v2/schema.route.js b/src/routes/v2/schema.route.js index 1a7b2c3..c713b85 100644 --- a/src/routes/v2/schema.route.js +++ b/src/routes/v2/schema.route.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const express = require('express'); const validate = require('../../middlewares/validate'); const auth = require('../../middlewares/auth'); diff --git a/src/routes/v2/search.route.js b/src/routes/v2/search.route.js index 8d868ac..30e26b6 100644 --- a/src/routes/v2/search.route.js +++ b/src/routes/v2/search.route.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const express = require('express'); const { searchController } = require('../../controllers'); const { searchValidation } = require('../../validations'); diff --git a/src/routes/v2/user.route.js b/src/routes/v2/user.route.js index 0dc3d6c..fdbc0cd 100644 --- a/src/routes/v2/user.route.js +++ b/src/routes/v2/user.route.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const express = require('express'); const auth = require('../../middlewares/auth'); const validate = require('../../middlewares/validate'); diff --git a/src/scripts/assignAdmins.js b/src/scripts/assignAdmins.js index 437b306..9416792 100644 --- a/src/scripts/assignAdmins.js +++ b/src/scripts/assignAdmins.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const config = require('../config/config'); const logger = require('../config/logger'); const { Role } = require('../models'); diff --git a/src/scripts/convertLogsCap.js b/src/scripts/convertLogsCap.js index d4eda67..92ff396 100644 --- a/src/scripts/convertLogsCap.js +++ b/src/scripts/convertLogsCap.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const logger = require('../config/logger'); const config = require('../config/config'); diff --git a/src/scripts/index.js b/src/scripts/index.js index 120605c..9f43bab 100644 --- a/src/scripts/index.js +++ b/src/scripts/index.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + module.exports.assignAdmins = require('./assignAdmins'); module.exports.setupScheduledCheck = require('./setupScheduledCheck'); module.exports.convertLogsCap = require('./convertLogsCap'); diff --git a/src/scripts/initializeRoles.js b/src/scripts/initializeRoles.js index cecd8bb..af6e9e1 100644 --- a/src/scripts/initializeRoles.js +++ b/src/scripts/initializeRoles.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + /* eslint-disable no-await-in-loop */ const { ROLES } = require('../config/roles'); const Role = require('../models/role.model'); diff --git a/src/scripts/migrate-api.js b/src/scripts/migrate-api.js index 44b8688..33fb06d 100644 --- a/src/scripts/migrate-api.js +++ b/src/scripts/migrate-api.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Client = require('mongodb').MongoClient; const connect = async (url) => { diff --git a/src/scripts/setupScheduledCheck.js b/src/scripts/setupScheduledCheck.js index 38d9f27..204d56e 100644 --- a/src/scripts/setupScheduledCheck.js +++ b/src/scripts/setupScheduledCheck.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const axios = require('axios'); const fs = require('fs'); const path = require('path'); diff --git a/src/services/api.service.js b/src/services/api.service.js index 0549975..67eb5c6 100644 --- a/src/services/api.service.js +++ b/src/services/api.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const { userService } = require('.'); const { Api, Model, ExtendedApi } = require('../models'); diff --git a/src/services/asset.service.js b/src/services/asset.service.js index 803e4e9..2477847 100644 --- a/src/services/asset.service.js +++ b/src/services/asset.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const permissionService = require('./permission.service'); const { PERMISSIONS, RESOURCES } = require('../config/roles'); const { Role } = require('../models'); diff --git a/src/services/auth.service.js b/src/services/auth.service.js index 97875c1..2bf0775 100644 --- a/src/services/auth.service.js +++ b/src/services/auth.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const axios = require('axios'); const httpStatus = require('http-status'); const tokenService = require('./token.service'); diff --git a/src/services/changeLog.service.js b/src/services/changeLog.service.js index 7f6b4c7..3f6c195 100644 --- a/src/services/changeLog.service.js +++ b/src/services/changeLog.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const ChangeLog = require('../models/changeLog.model'); /** diff --git a/src/services/discussion.service.js b/src/services/discussion.service.js index 30e5057..a11028c 100644 --- a/src/services/discussion.service.js +++ b/src/services/discussion.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const Discussion = require('../models/discussion.model'); const ApiError = require('../utils/ApiError'); diff --git a/src/services/email.service.js b/src/services/email.service.js index a0be0e6..cb376a0 100644 --- a/src/services/email.service.js +++ b/src/services/email.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const { default: axios } = require('axios'); const config = require('../config/config'); const { resetPasswordTemplate } = require('../utils/emailTemplates'); diff --git a/src/services/extendedApi.service.js b/src/services/extendedApi.service.js index d92261e..f240000 100644 --- a/src/services/extendedApi.service.js +++ b/src/services/extendedApi.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const { ExtendedApi } = require('../models'); const ApiError = require('../utils/ApiError'); diff --git a/src/services/feedback.service.js b/src/services/feedback.service.js index c02c92f..6780478 100644 --- a/src/services/feedback.service.js +++ b/src/services/feedback.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const Feedback = require('../models/feedback.model'); const ApiError = require('../utils/ApiError'); diff --git a/src/services/file.service.js b/src/services/file.service.js index afd72a5..c98cf5b 100644 --- a/src/services/file.service.js +++ b/src/services/file.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const axios = require('axios'); const ApiError = require('../utils/ApiError'); const httpStatus = require('http-status'); diff --git a/src/services/index.js b/src/services/index.js index 9faa1cc..c19e61b 100644 --- a/src/services/index.js +++ b/src/services/index.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + module.exports.authService = require('./auth.service'); module.exports.emailService = require('./email.service'); module.exports.tokenService = require('./token.service'); diff --git a/src/services/instance.service.js b/src/services/instance.service.js index 4b3586d..d412d6b 100644 --- a/src/services/instance.service.js +++ b/src/services/instance.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const { Instance, Schema } = require('../models'); const ApiError = require('../utils/ApiError'); diff --git a/src/services/instanceRelation.service.js b/src/services/instanceRelation.service.js index 81f1660..0616ccf 100644 --- a/src/services/instanceRelation.service.js +++ b/src/services/instanceRelation.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const { InstanceRelation, Relation, Instance } = require('../models'); const ApiError = require('../utils/ApiError'); diff --git a/src/services/issue.service.js b/src/services/issue.service.js index e11c102..0d1b94b 100644 --- a/src/services/issue.service.js +++ b/src/services/issue.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const { default: axios } = require('axios'); const { Issue } = require('../models'); const logger = require('../config/logger'); diff --git a/src/services/listener.service.js b/src/services/listener.service.js index eec861b..9485b0a 100644 --- a/src/services/listener.service.js +++ b/src/services/listener.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const { getIO } = require('../config/socket'); const findSocketByUser = (userId) => { diff --git a/src/services/llm.service.js b/src/services/llm.service.js index abaa84b..31ce415 100644 --- a/src/services/llm.service.js +++ b/src/services/llm.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const { BedrockRuntimeClient } = require('@aws-sdk/client-bedrock-runtime'); const { InvokeModelCommand, InvokeModelWithResponseStreamCommand } = require('@aws-sdk/client-bedrock-runtime'); const { createParser } = require('eventsource-parser'); diff --git a/src/services/log.service.js b/src/services/log.service.js index 171ed24..e3b1df1 100644 --- a/src/services/log.service.js +++ b/src/services/log.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const { logAxios } = require('../config/axios'); /** diff --git a/src/services/model.service.js b/src/services/model.service.js index 696f16f..97f0917 100644 --- a/src/services/model.service.js +++ b/src/services/model.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const { userService } = require('.'); const prototypeService = require('./prototype.service'); diff --git a/src/services/permission.service.js b/src/services/permission.service.js index 79e816e..1889b0c 100644 --- a/src/services/permission.service.js +++ b/src/services/permission.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const { UserRole, Model, Prototype, Role, Asset } = require('../models'); const ApiError = require('../utils/ApiError'); diff --git a/src/services/prototype.service.js b/src/services/prototype.service.js index e533395..1499ced 100644 --- a/src/services/prototype.service.js +++ b/src/services/prototype.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const { Prototype } = require('../models'); const ApiError = require('../utils/ApiError'); diff --git a/src/services/relation.service.js b/src/services/relation.service.js index ba30d4a..aad2b61 100644 --- a/src/services/relation.service.js +++ b/src/services/relation.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const { Relation, Schema } = require('../models'); const ApiError = require('../utils/ApiError'); diff --git a/src/services/schema.service.js b/src/services/schema.service.js index 7fccc63..ac226bb 100644 --- a/src/services/schema.service.js +++ b/src/services/schema.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const { Schema } = require('../models'); const ApiError = require('../utils/ApiError'); diff --git a/src/services/search.service.js b/src/services/search.service.js index 0f57486..f2379e3 100644 --- a/src/services/search.service.js +++ b/src/services/search.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + /* eslint-disable security/detect-non-literal-regexp */ const mongoose = require('mongoose'); const { modelService } = require('.'); diff --git a/src/services/tag.service.js b/src/services/tag.service.js index ff7c64a..9e80cf1 100644 --- a/src/services/tag.service.js +++ b/src/services/tag.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const { db } = require('../config/firebase'); /** diff --git a/src/services/token.service.js b/src/services/token.service.js index fc754ad..6103269 100644 --- a/src/services/token.service.js +++ b/src/services/token.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const jwt = require('jsonwebtoken'); const moment = require('moment'); const httpStatus = require('http-status'); diff --git a/src/services/user.service.js b/src/services/user.service.js index 1ee016f..0b2d4bf 100644 --- a/src/services/user.service.js +++ b/src/services/user.service.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const httpStatus = require('http-status'); const { User } = require('../models'); const ApiError = require('../utils/ApiError'); diff --git a/src/typedefs/cacheDef.js b/src/typedefs/cacheDef.js index 74269f3..a8b3695 100644 --- a/src/typedefs/cacheDef.js +++ b/src/typedefs/cacheDef.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + /** * @typedef CacheEntity * @property referenceId: string; diff --git a/src/typedefs/index.js b/src/typedefs/index.js index b204b09..a052bb6 100644 --- a/src/typedefs/index.js +++ b/src/typedefs/index.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + /** * @typedef ExtendedApi * @property apiName: string diff --git a/src/typedefs/msGraph.js b/src/typedefs/msGraph.js index cf00a57..dbee98f 100644 --- a/src/typedefs/msGraph.js +++ b/src/typedefs/msGraph.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + /** * @typedef MSGraph * @property displayName: string; diff --git a/src/utils/ApiError.js b/src/utils/ApiError.js index 2494c1f..f886140 100644 --- a/src/utils/ApiError.js +++ b/src/utils/ApiError.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + class ApiError extends Error { constructor(statusCode, message, isOperational = true, stack = '') { super(message); diff --git a/src/utils/catchAsync.js b/src/utils/catchAsync.js index 387efc6..b24cff8 100644 --- a/src/utils/catchAsync.js +++ b/src/utils/catchAsync.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const catchAsync = (fn) => (req, res, next) => { Promise.resolve(fn(req, res, next)).catch((err) => next(err)); }; diff --git a/src/utils/emailTemplates.js b/src/utils/emailTemplates.js index e0973ea..9663343 100644 --- a/src/utils/emailTemplates.js +++ b/src/utils/emailTemplates.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + /** * * @param {string} fullName diff --git a/src/utils/image.js b/src/utils/image.js index 03d1f22..54b9017 100644 --- a/src/utils/image.js +++ b/src/utils/image.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Jimp = require('jimp'); const logger = require('../config/logger'); diff --git a/src/utils/pick.js b/src/utils/pick.js index e4b13c2..63205c1 100644 --- a/src/utils/pick.js +++ b/src/utils/pick.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + /** * Create an object composed of the picked object properties * @param {Object} object diff --git a/src/utils/queryUtils.js b/src/utils/queryUtils.js index 23ce260..243701c 100644 --- a/src/utils/queryUtils.js +++ b/src/utils/queryUtils.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const { escapeRegExp } = require('lodash'); /** diff --git a/src/utils/sort.js b/src/utils/sort.js index a5e37d4..0dd8255 100644 --- a/src/utils/sort.js +++ b/src/utils/sort.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const sortObject = (obj) => { return Object.keys(obj) .sort() diff --git a/src/utils/textProcessing.js b/src/utils/textProcessing.js index 4bfb745..040d467 100644 --- a/src/utils/textProcessing.js +++ b/src/utils/textProcessing.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const slugify = (str) => str .toLowerCase() diff --git a/src/validations/api.validation.js b/src/validations/api.validation.js index be0edfe..73f836e 100644 --- a/src/validations/api.validation.js +++ b/src/validations/api.validation.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Joi = require('joi'); const { objectId, jsonString } = require('./custom.validation'); diff --git a/src/validations/asset.validation.js b/src/validations/asset.validation.js index 23463f0..4ca9657 100644 --- a/src/validations/asset.validation.js +++ b/src/validations/asset.validation.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Joi = require('joi'); const { objectId, objectIdList } = require('./custom.validation'); const { PERMISSIONS } = require('../config/roles'); diff --git a/src/validations/auth.validation.js b/src/validations/auth.validation.js index a107a6e..a2777a8 100644 --- a/src/validations/auth.validation.js +++ b/src/validations/auth.validation.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Joi = require('joi'); const { password } = require('./custom.validation'); diff --git a/src/validations/custom.validation.js b/src/validations/custom.validation.js index 8c34ff7..c80103f 100644 --- a/src/validations/custom.validation.js +++ b/src/validations/custom.validation.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const { slugify } = require('../utils/textProcessing'); const objectId = (value, helpers) => { diff --git a/src/validations/discussion.validation.js b/src/validations/discussion.validation.js index 5315e98..46f69fd 100644 --- a/src/validations/discussion.validation.js +++ b/src/validations/discussion.validation.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Joi = require('joi'); const { objectId } = require('./custom.validation'); const { populate } = require('../models/token.model'); diff --git a/src/validations/email.validation.js b/src/validations/email.validation.js index 9e0619d..5b6d958 100644 --- a/src/validations/email.validation.js +++ b/src/validations/email.validation.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Joi = require('joi'); const sendEmail = { diff --git a/src/validations/extendedApi.validation.js b/src/validations/extendedApi.validation.js index 2c82af6..5a7bdd8 100644 --- a/src/validations/extendedApi.validation.js +++ b/src/validations/extendedApi.validation.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Joi = require('joi'); const { objectId } = require('./custom.validation'); diff --git a/src/validations/feedback.validation.js b/src/validations/feedback.validation.js index 1dc5851..200d03f 100644 --- a/src/validations/feedback.validation.js +++ b/src/validations/feedback.validation.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Joi = require('joi'); const { objectId } = require('./custom.validation'); diff --git a/src/validations/index.js b/src/validations/index.js index 5ca05d9..2355619 100644 --- a/src/validations/index.js +++ b/src/validations/index.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + module.exports.authValidation = require('./auth.validation'); module.exports.userValidation = require('./user.validation'); module.exports.modelValidation = require('./model.validation'); diff --git a/src/validations/instance.validation.js b/src/validations/instance.validation.js index 94253df..bf9c75a 100644 --- a/src/validations/instance.validation.js +++ b/src/validations/instance.validation.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Joi = require('joi'); const { objectId } = require('./custom.validation'); diff --git a/src/validations/instanceRelation.validation.js b/src/validations/instanceRelation.validation.js index aa99d9c..879a944 100644 --- a/src/validations/instanceRelation.validation.js +++ b/src/validations/instanceRelation.validation.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Joi = require('joi'); const { objectId } = require('./custom.validation'); diff --git a/src/validations/issue.validation.js b/src/validations/issue.validation.js index b45d137..6821962 100644 --- a/src/validations/issue.validation.js +++ b/src/validations/issue.validation.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Joi = require('joi'); const { objectId } = require('./custom.validation'); diff --git a/src/validations/model.validation.js b/src/validations/model.validation.js index 9ff13f4..bb3328d 100644 --- a/src/validations/model.validation.js +++ b/src/validations/model.validation.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Joi = require('joi'); const { visibilityTypes } = require('../config/enums'); const { jsonString, slug, objectId } = require('./custom.validation'); diff --git a/src/validations/permission.validation.js b/src/validations/permission.validation.js index 07d5e7a..fc315b2 100644 --- a/src/validations/permission.validation.js +++ b/src/validations/permission.validation.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Joi = require('joi'); const { objectId } = require('./custom.validation'); diff --git a/src/validations/prototype.validation.js b/src/validations/prototype.validation.js index 2760ddb..cdadbe2 100644 --- a/src/validations/prototype.validation.js +++ b/src/validations/prototype.validation.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Joi = require('joi'); const { stateTypes } = require('../config/enums'); const { objectId, jsonString, slug } = require('./custom.validation'); diff --git a/src/validations/relation.validation.js b/src/validations/relation.validation.js index 748c818..bcfd076 100644 --- a/src/validations/relation.validation.js +++ b/src/validations/relation.validation.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Joi = require('joi'); const { objectId } = require('./custom.validation'); diff --git a/src/validations/schema.validation.js b/src/validations/schema.validation.js index 4adc68f..e71f930 100644 --- a/src/validations/schema.validation.js +++ b/src/validations/schema.validation.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Joi = require('joi'); const { objectId } = require('./custom.validation'); diff --git a/src/validations/search.validation.js b/src/validations/search.validation.js index 727ac82..ea2295e 100644 --- a/src/validations/search.validation.js +++ b/src/validations/search.validation.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Joi = require('joi'); const search = { diff --git a/src/validations/tag.validation.js b/src/validations/tag.validation.js index b660398..165ed46 100644 --- a/src/validations/tag.validation.js +++ b/src/validations/tag.validation.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Joi = require('joi'); const listTagCategories = { diff --git a/src/validations/user.validation.js b/src/validations/user.validation.js index dfdd5d5..9cd0545 100644 --- a/src/validations/user.validation.js +++ b/src/validations/user.validation.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const Joi = require('joi'); const { password, objectId } = require('./custom.validation'); const { roles } = require('../config/roles'); diff --git a/start.sh b/start.sh index 23573d6..086bec0 100755 --- a/start.sh +++ b/start.sh @@ -1,3 +1,11 @@ +# Copyright (c) 2025 Eclipse Foundation. +# +# This program and the accompanying materials are made available under the +# terms of the MIT License which is available at +# https://opensource.org/licenses/MIT. +# +# SPDX-License-Identifier: MIT + #!/bin/bash # Load environment variables from .env file diff --git a/tests/fixtures/token.fixture.js b/tests/fixtures/token.fixture.js index 262a9c3..955022f 100644 --- a/tests/fixtures/token.fixture.js +++ b/tests/fixtures/token.fixture.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const moment = require('moment'); const config = require('../../src/config/config'); const { tokenTypes } = require('../../src/config/tokens'); diff --git a/tests/fixtures/user.fixture.js b/tests/fixtures/user.fixture.js index ba98026..8426abc 100644 --- a/tests/fixtures/user.fixture.js +++ b/tests/fixtures/user.fixture.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const bcrypt = require('bcryptjs'); const faker = require('faker'); diff --git a/tests/integration/auth.test.js b/tests/integration/auth.test.js index 04748e5..d00c81f 100644 --- a/tests/integration/auth.test.js +++ b/tests/integration/auth.test.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const request = require('supertest'); const faker = require('faker'); const httpStatus = require('http-status'); diff --git a/tests/integration/docs.test.js b/tests/integration/docs.test.js index 7df9513..5694524 100644 --- a/tests/integration/docs.test.js +++ b/tests/integration/docs.test.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const request = require('supertest'); const httpStatus = require('http-status'); const app = require('../../src/app'); diff --git a/tests/integration/user.test.js b/tests/integration/user.test.js index 279e4ef..1f780e4 100644 --- a/tests/integration/user.test.js +++ b/tests/integration/user.test.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const request = require('supertest'); const faker = require('faker'); const httpStatus = require('http-status'); diff --git a/tests/unit/middlewares/error.test.js b/tests/unit/middlewares/error.test.js index c17a7d4..37a7671 100644 --- a/tests/unit/middlewares/error.test.js +++ b/tests/unit/middlewares/error.test.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const httpStatus = require('http-status'); const httpMocks = require('node-mocks-http'); diff --git a/tests/unit/models/plugins/paginate.plugin.test.js b/tests/unit/models/plugins/paginate.plugin.test.js index b6af0df..8c4cbb1 100644 --- a/tests/unit/models/plugins/paginate.plugin.test.js +++ b/tests/unit/models/plugins/paginate.plugin.test.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const setupTestDB = require('../../../utils/setupTestDB'); const paginate = require('../../../../src/models/plugins/paginate.plugin'); diff --git a/tests/unit/models/plugins/toJSON.plugin.test.js b/tests/unit/models/plugins/toJSON.plugin.test.js index 7931828..5e4fa91 100644 --- a/tests/unit/models/plugins/toJSON.plugin.test.js +++ b/tests/unit/models/plugins/toJSON.plugin.test.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const { toJSON } = require('../../../../src/models/plugins'); diff --git a/tests/unit/models/user.model.test.js b/tests/unit/models/user.model.test.js index 8045d0e..cce15f4 100644 --- a/tests/unit/models/user.model.test.js +++ b/tests/unit/models/user.model.test.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const faker = require('faker'); const { User } = require('../../../src/models'); diff --git a/tests/utils/setupTestDB.js b/tests/utils/setupTestDB.js index 77b786a..5befe2d 100644 --- a/tests/utils/setupTestDB.js +++ b/tests/utils/setupTestDB.js @@ -1,3 +1,11 @@ +// Copyright (c) 2025 Eclipse Foundation. +// +// This program and the accompanying materials are made available under the +// terms of the MIT License which is available at +// https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: MIT + const mongoose = require('mongoose'); const config = require('../../src/config/config');