diff --git a/LICENSE b/LICENSE index 57f668d..fffca16 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,214 @@ -MIT License +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor + be liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + + +Additional License Condition – Commons Clause + +The Licensed Work is provided under the terms of this license and is also +subject to the following additional condition ("Commons Clause"): + +"License Condition v1.0": + +The Licensed Work and its derivative works may not be used by any person or +organization to Sell the Licensed Work (as defined below). + +"Sell" or "Selling" means practicing any or all of the rights granted to you +under the License to provide to third parties, for a fee or other consideration +(including without limitation fees for hosting or consulting/support services +related to the Software), a product or service whose value derives, entirely or +substantially, from the functionality of the Licensed Work. + +A non-exhaustive list of activities considered "Selling" includes: +- Using the Licensed Work to provide paid hosted services or managed services +- Distributing the Licensed Work as part of a commercial product or service + for which a fee is charged primarily for the value of the Licensed Work + +This restriction does not apply to the use of the Licensed Work for internal +business purposes or non-commercial use. + + +Attribution and Naming Clause + +Any derivative work based on this software must include clear and visible +attribution to the original project "Fredy" and its author(s). +Derivative works may not be distributed, published, or presented under a +different name or branding without the explicit written permission of the +original copyright holder. + Copyright (c) 2025 Christian Kellner - -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. +Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause diff --git a/copyright.js b/copyright.js new file mode 100644 index 0000000..4585632 --- /dev/null +++ b/copyright.js @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + +import fs from 'fs/promises'; +import path from 'path'; + +const COPYRIGHT = `/* + * Copyright (c) ${new Date().getFullYear()} by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + +`; + +async function getAllFiles(dir = '.') { + const entries = await fs.readdir(dir, { withFileTypes: true }); + let files = []; + for (let entry of entries) { + const fullPath = path.join(dir, entry.name); + if (entry.isDirectory()) { + if (entry.name === 'node_modules' || entry.name.startsWith('.')) continue; + files = files.concat(await getAllFiles(fullPath)); + } else if (fullPath.endsWith('.js') || fullPath.endsWith('.jsx')) { + files.push(fullPath); + } + } + return files; +} + +/* eslint-disable no-console */ +async function addCopyright(files) { + for (let file of files) { + try { + let content = await fs.readFile(file, 'utf8'); + if (!content.startsWith(COPYRIGHT)) { + await fs.writeFile(file, COPYRIGHT + content); + console.log(`Added copyright to ${file}`); + } + } catch (err) { + console.error(`Error processing ${file}: ${err}`); + } + } +} +/* eslint-enable no-console */ + +const filesToProcess = process.argv.length > 2 ? process.argv.slice(2) : await getAllFiles(); +await addCopyright(filesToProcess); diff --git a/eslint.config.js b/eslint.config.js index 9114827..a008ba1 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + // eslint.config.js import js from '@eslint/js'; import prettier from 'eslint-config-prettier'; diff --git a/index.js b/index.js index b24062d..4b8f42a 100755 --- a/index.js +++ b/index.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import fs from 'fs'; import path from 'path'; import { checkIfConfigIsAccessible, getProviders, refreshConfig } from './lib/utils.js'; diff --git a/lib/FredyPipeline.js b/lib/FredyPipeline.js index eb20168..c450eb2 100755 --- a/lib/FredyPipeline.js +++ b/lib/FredyPipeline.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { NoNewListingsWarning } from './errors.js'; import { storeListings, getKnownListingHashesForJobAndProvider } from './services/storage/listingsStorage.js'; import * as notify from './notification/notify.js'; diff --git a/lib/api/api.js b/lib/api/api.js index da65b16..24b28df 100644 --- a/lib/api/api.js +++ b/lib/api/api.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { notificationAdapterRouter } from './routes/notificationAdapterRouter.js'; import { authInterceptor, cookieSession, adminInterceptor } from './security.js'; import { generalSettingsRouter } from './routes/generalSettingsRoute.js'; diff --git a/lib/api/routes/analyticsRouter.js b/lib/api/routes/analyticsRouter.js index 6d95b7a..1dfe7cc 100644 --- a/lib/api/routes/analyticsRouter.js +++ b/lib/api/routes/analyticsRouter.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import restana from 'restana'; import * as listingStorage from '../../services/storage/listingsStorage.js'; const service = restana(); diff --git a/lib/api/routes/demoRouter.js b/lib/api/routes/demoRouter.js index 80e85b1..f9868e3 100644 --- a/lib/api/routes/demoRouter.js +++ b/lib/api/routes/demoRouter.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import restana from 'restana'; import { getSettings } from '../../services/storage/settingsStorage.js'; const service = restana(); diff --git a/lib/api/routes/featureRouter.js b/lib/api/routes/featureRouter.js index 2dbeba2..32d7b8c 100644 --- a/lib/api/routes/featureRouter.js +++ b/lib/api/routes/featureRouter.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import restana from 'restana'; import getFeatures from '../../features.js'; const service = restana(); diff --git a/lib/api/routes/generalSettingsRoute.js b/lib/api/routes/generalSettingsRoute.js index ef41115..e3c43df 100644 --- a/lib/api/routes/generalSettingsRoute.js +++ b/lib/api/routes/generalSettingsRoute.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import restana from 'restana'; import { getDirName } from '../../utils.js'; import fs from 'fs'; diff --git a/lib/api/routes/jobRouter.js b/lib/api/routes/jobRouter.js index 98e9bd7..b05d17b 100644 --- a/lib/api/routes/jobRouter.js +++ b/lib/api/routes/jobRouter.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import restana from 'restana'; import * as jobStorage from '../../services/storage/jobStorage.js'; import * as userStorage from '../../services/storage/userStorage.js'; diff --git a/lib/api/routes/listingsRouter.js b/lib/api/routes/listingsRouter.js index bf48f03..966be16 100644 --- a/lib/api/routes/listingsRouter.js +++ b/lib/api/routes/listingsRouter.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import restana from 'restana'; import * as listingStorage from '../../services/storage/listingsStorage.js'; import * as watchListStorage from '../../services/storage/watchListStorage.js'; diff --git a/lib/api/routes/loginRoute.js b/lib/api/routes/loginRoute.js index 16293cc..8d18888 100644 --- a/lib/api/routes/loginRoute.js +++ b/lib/api/routes/loginRoute.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import restana from 'restana'; import * as userStorage from '../../services/storage/userStorage.js'; import * as hasher from '../../services/security/hash.js'; diff --git a/lib/api/routes/notificationAdapterRouter.js b/lib/api/routes/notificationAdapterRouter.js index afcf205..a095795 100644 --- a/lib/api/routes/notificationAdapterRouter.js +++ b/lib/api/routes/notificationAdapterRouter.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import fs from 'fs'; import restana from 'restana'; const service = restana(); diff --git a/lib/api/routes/providerRouter.js b/lib/api/routes/providerRouter.js index 0ac5318..6ab4f51 100644 --- a/lib/api/routes/providerRouter.js +++ b/lib/api/routes/providerRouter.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import fs from 'fs'; import restana from 'restana'; const service = restana(); diff --git a/lib/api/routes/userRoute.js b/lib/api/routes/userRoute.js index c73d928..bd54526 100644 --- a/lib/api/routes/userRoute.js +++ b/lib/api/routes/userRoute.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import restana from 'restana'; import * as userStorage from '../../services/storage/userStorage.js'; import * as jobStorage from '../../services/storage/jobStorage.js'; diff --git a/lib/api/routes/versionRouter.js b/lib/api/routes/versionRouter.js index 9810fbc..c3db9c5 100644 --- a/lib/api/routes/versionRouter.js +++ b/lib/api/routes/versionRouter.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import restana from 'restana'; import fetch from 'node-fetch'; import { getPackageVersion } from '../../utils.js'; diff --git a/lib/api/security.js b/lib/api/security.js index f69c02d..28e5f82 100644 --- a/lib/api/security.js +++ b/lib/api/security.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import * as userStorage from '../services/storage/userStorage.js'; import cookieSession from 'cookie-session'; import { nanoid } from 'nanoid'; diff --git a/lib/defaultConfig.js b/lib/defaultConfig.js index e4a7ac0..9f470fa 100644 --- a/lib/defaultConfig.js +++ b/lib/defaultConfig.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + export const DEFAULT_CONFIG = { // Default path for sqlite storage directory. Interpreted relative to project root. sqlitepath: '/db', diff --git a/lib/errors.js b/lib/errors.js index 04afe8c..54d06ea 100755 --- a/lib/errors.js +++ b/lib/errors.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + class ExtendableError extends Error { constructor(message) { super(message); diff --git a/lib/features.js b/lib/features.js index fa3785e..f4b64a5 100644 --- a/lib/features.js +++ b/lib/features.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + const FEATURES = { WATCHLIST_MANAGEMENT: false, }; diff --git a/lib/notification/adapter/apprise.js b/lib/notification/adapter/apprise.js index 78e8b74..357a822 100644 --- a/lib/notification/adapter/apprise.js +++ b/lib/notification/adapter/apprise.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { markdown2Html } from '../../services/markdown.js'; import { getJob } from '../../services/storage/jobStorage.js'; import fetch from 'node-fetch'; diff --git a/lib/notification/adapter/console.js b/lib/notification/adapter/console.js index 4f2a493..d851012 100755 --- a/lib/notification/adapter/console.js +++ b/lib/notification/adapter/console.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { markdown2Html } from '../../services/markdown.js'; export const send = ({ serviceName, newListings, jobKey }) => { diff --git a/lib/notification/adapter/discord_webhook.js b/lib/notification/adapter/discord_webhook.js index dc561c5..b277a9f 100644 --- a/lib/notification/adapter/discord_webhook.js +++ b/lib/notification/adapter/discord_webhook.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import fetch from 'node-fetch'; import { getJob } from '../../services/storage/jobStorage.js'; import { markdown2Html } from '../../services/markdown.js'; diff --git a/lib/notification/adapter/http.js b/lib/notification/adapter/http.js index 29a3ca1..19ca320 100644 --- a/lib/notification/adapter/http.js +++ b/lib/notification/adapter/http.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { markdown2Html } from '../../services/markdown.js'; const mapListing = (listing) => ({ diff --git a/lib/notification/adapter/mailJet.js b/lib/notification/adapter/mailJet.js index 7c57845..c13f465 100755 --- a/lib/notification/adapter/mailJet.js +++ b/lib/notification/adapter/mailJet.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import mailjet from 'node-mailjet'; import path from 'path'; import fs from 'fs'; diff --git a/lib/notification/adapter/mattermost.js b/lib/notification/adapter/mattermost.js index 8eb7fbe..164860e 100644 --- a/lib/notification/adapter/mattermost.js +++ b/lib/notification/adapter/mattermost.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { markdown2Html } from '../../services/markdown.js'; import { getJob } from '../../services/storage/jobStorage.js'; import fetch from 'node-fetch'; diff --git a/lib/notification/adapter/ntfy.js b/lib/notification/adapter/ntfy.js index 8a45bd0..1ed396b 100644 --- a/lib/notification/adapter/ntfy.js +++ b/lib/notification/adapter/ntfy.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { markdown2Html } from '../../services/markdown.js'; import { getJob } from '../../services/storage/jobStorage.js'; import fetch from 'node-fetch'; diff --git a/lib/notification/adapter/pushover.js b/lib/notification/adapter/pushover.js index a90fc70..6724886 100644 --- a/lib/notification/adapter/pushover.js +++ b/lib/notification/adapter/pushover.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { markdown2Html } from '../../services/markdown.js'; import { getJob } from '../../services/storage/jobStorage.js'; import fetch from 'node-fetch'; diff --git a/lib/notification/adapter/sendGrid.js b/lib/notification/adapter/sendGrid.js index 8c393fe..207fe05 100755 --- a/lib/notification/adapter/sendGrid.js +++ b/lib/notification/adapter/sendGrid.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import sgMail from '@sendgrid/mail'; import { markdown2Html } from '../../services/markdown.js'; import { normalizeImageUrl } from '../../utils.js'; diff --git a/lib/notification/adapter/slack.js b/lib/notification/adapter/slack.js index 2e60e0f..307f02b 100755 --- a/lib/notification/adapter/slack.js +++ b/lib/notification/adapter/slack.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import Slack from 'slack'; import { markdown2Html } from '../../services/markdown.js'; import { normalizeImageUrl } from '../../utils.js'; diff --git a/lib/notification/adapter/slack_with_webhooks.js b/lib/notification/adapter/slack_with_webhooks.js index 9d66b24..cccee02 100755 --- a/lib/notification/adapter/slack_with_webhooks.js +++ b/lib/notification/adapter/slack_with_webhooks.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import fetch from 'node-fetch'; import { markdown2Html } from '../../services/markdown.js'; import { normalizeImageUrl } from '../../utils.js'; diff --git a/lib/notification/adapter/sqlite.js b/lib/notification/adapter/sqlite.js index 12c40a2..d946a8f 100644 --- a/lib/notification/adapter/sqlite.js +++ b/lib/notification/adapter/sqlite.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { markdown2Html } from '../../services/markdown.js'; import Database from 'better-sqlite3'; import path from 'path'; diff --git a/lib/notification/adapter/telegram.js b/lib/notification/adapter/telegram.js index 1edd597..acda8f9 100644 --- a/lib/notification/adapter/telegram.js +++ b/lib/notification/adapter/telegram.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { markdown2Html } from '../../services/markdown.js'; import { getJob } from '../../services/storage/jobStorage.js'; import fetch from 'node-fetch'; diff --git a/lib/notification/notify.js b/lib/notification/notify.js index 5fcfec1..4e9e73f 100755 --- a/lib/notification/notify.js +++ b/lib/notification/notify.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import fs from 'fs'; const path = './adapter'; diff --git a/lib/provider/einsAImmobilien.js b/lib/provider/einsAImmobilien.js index eabe299..ef2cbff 100755 --- a/lib/provider/einsAImmobilien.js +++ b/lib/provider/einsAImmobilien.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { buildHash, isOneOf } from '../utils.js'; import checkIfListingIsActive from '../services/listings/listingActiveTester.js'; let appliedBlackList = []; diff --git a/lib/provider/immobilienDe.js b/lib/provider/immobilienDe.js index ba39412..0233fdb 100644 --- a/lib/provider/immobilienDe.js +++ b/lib/provider/immobilienDe.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { buildHash, isOneOf } from '../utils.js'; import checkIfListingIsActive from '../services/listings/listingActiveTester.js'; diff --git a/lib/provider/immonet.js b/lib/provider/immonet.js index c775ca0..9ac2b30 100755 --- a/lib/provider/immonet.js +++ b/lib/provider/immonet.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { isOneOf, buildHash } from '../utils.js'; import checkIfListingIsActive from '../services/listings/listingActiveTester.js'; let appliedBlackList = []; diff --git a/lib/provider/immoscout.js b/lib/provider/immoscout.js index 58e1e3b..8fea52e 100644 --- a/lib/provider/immoscout.js +++ b/lib/provider/immoscout.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + /** * ImmoScout provider using the mobile API to retrieve listings. * diff --git a/lib/provider/immoswp.js b/lib/provider/immoswp.js index 5c911d1..ca8a5e4 100755 --- a/lib/provider/immoswp.js +++ b/lib/provider/immoswp.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { isOneOf, buildHash } from '../utils.js'; import checkIfListingIsActive from '../services/listings/listingActiveTester.js'; diff --git a/lib/provider/immowelt.js b/lib/provider/immowelt.js index 027b5a6..3c8d728 100755 --- a/lib/provider/immowelt.js +++ b/lib/provider/immowelt.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { buildHash, isOneOf } from '../utils.js'; import checkIfListingIsActive from '../services/listings/listingActiveTester.js'; diff --git a/lib/provider/kleinanzeigen.js b/lib/provider/kleinanzeigen.js index e322c5b..6b7f1dd 100755 --- a/lib/provider/kleinanzeigen.js +++ b/lib/provider/kleinanzeigen.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { buildHash, isOneOf } from '../utils.js'; import checkIfListingIsActive from '../services/listings/listingActiveTester.js'; diff --git a/lib/provider/mcMakler.js b/lib/provider/mcMakler.js index dca27a6..16c3d4f 100755 --- a/lib/provider/mcMakler.js +++ b/lib/provider/mcMakler.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { isOneOf, buildHash } from '../utils.js'; import checkIfListingIsActive from '../services/listings/listingActiveTester.js'; let appliedBlackList = []; diff --git a/lib/provider/neubauKompass.js b/lib/provider/neubauKompass.js index de4808f..5eb4f4c 100755 --- a/lib/provider/neubauKompass.js +++ b/lib/provider/neubauKompass.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { isOneOf, buildHash } from '../utils.js'; import checkIfListingIsActive from '../services/listings/listingActiveTester.js'; diff --git a/lib/provider/ohneMakler.js b/lib/provider/ohneMakler.js index e06bdda..68ac6b4 100755 --- a/lib/provider/ohneMakler.js +++ b/lib/provider/ohneMakler.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { isOneOf, buildHash } from '../utils.js'; import checkIfListingIsActive from '../services/listings/listingActiveTester.js'; let appliedBlackList = []; diff --git a/lib/provider/regionalimmobilien24.js b/lib/provider/regionalimmobilien24.js index 3e78ca4..f34554c 100755 --- a/lib/provider/regionalimmobilien24.js +++ b/lib/provider/regionalimmobilien24.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { isOneOf, buildHash } from '../utils.js'; import checkIfListingIsActive from '../services/listings/listingActiveTester.js'; let appliedBlackList = []; diff --git a/lib/provider/sparkasse.js b/lib/provider/sparkasse.js index 2a5627e..93f4bbd 100755 --- a/lib/provider/sparkasse.js +++ b/lib/provider/sparkasse.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { isOneOf, buildHash } from '../utils.js'; import checkIfListingIsActive from '../services/listings/listingActiveTester.js'; let appliedBlackList = []; diff --git a/lib/provider/wgGesucht.js b/lib/provider/wgGesucht.js index f0d441a..dbeb274 100755 --- a/lib/provider/wgGesucht.js +++ b/lib/provider/wgGesucht.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { isOneOf, buildHash } from '../utils.js'; import checkIfListingIsActive from '../services/listings/listingActiveTester.js'; diff --git a/lib/services/crons/demoCleanup-cron.js b/lib/services/crons/demoCleanup-cron.js index 46e7796..2f2033e 100644 --- a/lib/services/crons/demoCleanup-cron.js +++ b/lib/services/crons/demoCleanup-cron.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { removeJobsByUserId } from '../storage/jobStorage.js'; import { getUsers } from '../storage/userStorage.js'; import logger from '../logger.js'; diff --git a/lib/services/crons/listing-alive-cron.js b/lib/services/crons/listing-alive-cron.js index 60dd5d9..9c879ef 100644 --- a/lib/services/crons/listing-alive-cron.js +++ b/lib/services/crons/listing-alive-cron.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import cron from 'node-cron'; import runActiveChecker from '../listings/listingActiveService.js'; diff --git a/lib/services/crons/tracker-cron.js b/lib/services/crons/tracker-cron.js index 4200df7..c142a12 100644 --- a/lib/services/crons/tracker-cron.js +++ b/lib/services/crons/tracker-cron.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import cron from 'node-cron'; import { inDevMode } from '../../utils.js'; import { trackMainEvent } from '../tracking/Tracker.js'; diff --git a/lib/services/events/event-bus.js b/lib/services/events/event-bus.js index e56852b..9bad604 100644 --- a/lib/services/events/event-bus.js +++ b/lib/services/events/event-bus.js @@ -1,2 +1,7 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { EventEmitter } from 'node:events'; export const bus = new EventEmitter(); diff --git a/lib/services/extractor/botPrevention.js b/lib/services/extractor/botPrevention.js index 3990405..4383076 100644 --- a/lib/services/extractor/botPrevention.js +++ b/lib/services/extractor/botPrevention.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { DEFAULT_HEADER } from './utils.js'; // Helper to safely coerce numbers diff --git a/lib/services/extractor/extractor.js b/lib/services/extractor/extractor.js index b881141..e2b1c97 100644 --- a/lib/services/extractor/extractor.js +++ b/lib/services/extractor/extractor.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { setDebug } from './utils.js'; import puppeteerExtractor from './puppeteerExtractor.js'; import { loadParser, parse } from './parser/parser.js'; diff --git a/lib/services/extractor/parser/parser.js b/lib/services/extractor/parser/parser.js index 0666ac6..98d3bdd 100644 --- a/lib/services/extractor/parser/parser.js +++ b/lib/services/extractor/parser/parser.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import * as cheerio from 'cheerio'; import logger from '../../logger.js'; diff --git a/lib/services/extractor/puppeteerExtractor.js b/lib/services/extractor/puppeteerExtractor.js index 1d8e1a0..62e73ca 100644 --- a/lib/services/extractor/puppeteerExtractor.js +++ b/lib/services/extractor/puppeteerExtractor.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import puppeteer from 'puppeteer-extra'; import StealthPlugin from 'puppeteer-extra-plugin-stealth'; import { debug, botDetected } from './utils.js'; diff --git a/lib/services/extractor/utils.js b/lib/services/extractor/utils.js index af42f8d..46bb484 100644 --- a/lib/services/extractor/utils.js +++ b/lib/services/extractor/utils.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import logger from '../logger.js'; let debuggingOn = false; diff --git a/lib/services/immoscout/immoscout-web-translator.js b/lib/services/immoscout/immoscout-web-translator.js index ec28957..0baba6f 100644 --- a/lib/services/immoscout/immoscout-web-translator.js +++ b/lib/services/immoscout/immoscout-web-translator.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + /* Rent a flat Web: diff --git a/lib/services/listings/listingActiveService.js b/lib/services/listings/listingActiveService.js index 23c56bb..95b830b 100644 --- a/lib/services/listings/listingActiveService.js +++ b/lib/services/listings/listingActiveService.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { deactivateListings, getActiveOrUnknownListings } from '../storage/listingsStorage.js'; import { getProviders } from '../../utils.js'; import logger from '../../services/logger.js'; diff --git a/lib/services/listings/listingActiveTester.js b/lib/services/listings/listingActiveTester.js index 148c925..e91c3fe 100644 --- a/lib/services/listings/listingActiveTester.js +++ b/lib/services/listings/listingActiveTester.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import fetch from 'node-fetch'; import { randomBetween, sleep } from '../../utils.js'; diff --git a/lib/services/logger.js b/lib/services/logger.js index b60aafe..9fd3799 100644 --- a/lib/services/logger.js +++ b/lib/services/logger.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + const COLORS = { debug: '\x1b[36m', info: '\x1b[32m', diff --git a/lib/services/markdown.js b/lib/services/markdown.js index 788ece5..f14c4b0 100644 --- a/lib/services/markdown.js +++ b/lib/services/markdown.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import fs from 'fs'; export function markdown2Html(filePath) { return fs.readFileSync(filePath, 'utf8'); diff --git a/lib/services/queryStringMutator.js b/lib/services/queryStringMutator.js index ddbae60..cfceff4 100644 --- a/lib/services/queryStringMutator.js +++ b/lib/services/queryStringMutator.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import queryString from 'query-string'; export default (_url, sortByDateParam) => { //if no mutation is necessary, just return the original url diff --git a/lib/services/security/hash.js b/lib/services/security/hash.js index ca07ad4..a60884b 100644 --- a/lib/services/security/hash.js +++ b/lib/services/security/hash.js @@ -1,2 +1,7 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import crypto from 'crypto'; export const hash = (x) => crypto.createHash('sha256').update(x, 'utf8').digest('hex'); diff --git a/lib/services/similarity-check/similarityCache.js b/lib/services/similarity-check/similarityCache.js index ac715fb..93e083b 100644 --- a/lib/services/similarity-check/similarityCache.js +++ b/lib/services/similarity-check/similarityCache.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + /** * Similarity cache * diff --git a/lib/services/storage/SqliteConnection.js b/lib/services/storage/SqliteConnection.js index 1f6c9cb..0eb1f90 100644 --- a/lib/services/storage/SqliteConnection.js +++ b/lib/services/storage/SqliteConnection.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import fs from 'fs'; import path from 'path'; import Database from 'better-sqlite3'; diff --git a/lib/services/storage/jobStorage.js b/lib/services/storage/jobStorage.js index cfd6549..e2a662c 100644 --- a/lib/services/storage/jobStorage.js +++ b/lib/services/storage/jobStorage.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { nanoid } from 'nanoid'; import SqliteConnection from './SqliteConnection.js'; import logger from '../logger.js'; diff --git a/lib/services/storage/listingsStorage.js b/lib/services/storage/listingsStorage.js index fef1ca6..703e281 100755 --- a/lib/services/storage/listingsStorage.js +++ b/lib/services/storage/listingsStorage.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { nullOrEmpty } from '../../utils.js'; import SqliteConnection from './SqliteConnection.js'; import { nanoid } from 'nanoid'; diff --git a/lib/services/storage/migrations/migrate.js b/lib/services/storage/migrations/migrate.js index ab7356d..0b5281d 100644 --- a/lib/services/storage/migrations/migrate.js +++ b/lib/services/storage/migrations/migrate.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + /** * Migration Runner for better-sqlite3 * I know there are external libs out there, but diff --git a/lib/services/storage/migrations/sql/0.init.js b/lib/services/storage/migrations/sql/0.init.js index 63a7072..24b6339 100644 --- a/lib/services/storage/migrations/sql/0.init.js +++ b/lib/services/storage/migrations/sql/0.init.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + // Initial migration: creates schema_migrations table used by the migration runner. // export function up(db) { diff --git a/lib/services/storage/migrations/sql/1.create-fredy-base-structure.js b/lib/services/storage/migrations/sql/1.create-fredy-base-structure.js index 5d30371..6d3db35 100644 --- a/lib/services/storage/migrations/sql/1.create-fredy-base-structure.js +++ b/lib/services/storage/migrations/sql/1.create-fredy-base-structure.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + // Migration: Create fredy's base structure (users, jobs and listings) import initial // data from JSON files if present. (This applies only for jobs and users, for the old jobListingData, // I cannot migrate the data as the new format is totally different. diff --git a/lib/services/storage/migrations/sql/2.active-flag-for-listings.js b/lib/services/storage/migrations/sql/2.active-flag-for-listings.js index 521c467..8f6dd87 100644 --- a/lib/services/storage/migrations/sql/2.active-flag-for-listings.js +++ b/lib/services/storage/migrations/sql/2.active-flag-for-listings.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + // Migration: there needs to be a unique index on job_id and hash as only // this makes the listing indeed unique diff --git a/lib/services/storage/migrations/sql/2.new-indexes-for-listings.js b/lib/services/storage/migrations/sql/2.new-indexes-for-listings.js index 19b2fac..dd27d29 100644 --- a/lib/services/storage/migrations/sql/2.new-indexes-for-listings.js +++ b/lib/services/storage/migrations/sql/2.new-indexes-for-listings.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + // Migration: there needs to be a unique index on job_id and hash as only // this makes the listing indeed unique diff --git a/lib/services/storage/migrations/sql/3.changeset-for-listings.js b/lib/services/storage/migrations/sql/3.changeset-for-listings.js index 9fd35ac..7575df8 100644 --- a/lib/services/storage/migrations/sql/3.changeset-for-listings.js +++ b/lib/services/storage/migrations/sql/3.changeset-for-listings.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + // Migration: Adding a changeset field to the listings table in preparation for // a price watch feature diff --git a/lib/services/storage/migrations/sql/4.watch-list.js b/lib/services/storage/migrations/sql/4.watch-list.js index 1ccda28..ece00ef 100644 --- a/lib/services/storage/migrations/sql/4.watch-list.js +++ b/lib/services/storage/migrations/sql/4.watch-list.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + // Migration: Adding a new table to store if somebody "watches" (a.k.a favorite) a listing export function up(db) { diff --git a/lib/services/storage/migrations/sql/5.job-sharing.js b/lib/services/storage/migrations/sql/5.job-sharing.js index 7b6e16d..423d783 100644 --- a/lib/services/storage/migrations/sql/5.job-sharing.js +++ b/lib/services/storage/migrations/sql/5.job-sharing.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + // Migration: Adding a new table to store if somebody shared a job with someone export function up(db) { diff --git a/lib/services/storage/migrations/sql/6.settings.js b/lib/services/storage/migrations/sql/6.settings.js index d1c4a01..1f7af82 100644 --- a/lib/services/storage/migrations/sql/6.settings.js +++ b/lib/services/storage/migrations/sql/6.settings.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + // Migration: Adding a settings table to store important (config) settings instead of using config file import fs from 'fs'; import path from 'path'; diff --git a/lib/services/storage/settingsStorage.js b/lib/services/storage/settingsStorage.js index 1fba219..c0798c0 100644 --- a/lib/services/storage/settingsStorage.js +++ b/lib/services/storage/settingsStorage.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { nanoid } from 'nanoid'; import SqliteConnection from './SqliteConnection.js'; import { fromJson, readConfigFromStorage, toJson } from '../../utils.js'; diff --git a/lib/services/storage/userStorage.js b/lib/services/storage/userStorage.js index 626eae3..c80f15c 100644 --- a/lib/services/storage/userStorage.js +++ b/lib/services/storage/userStorage.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import * as hasher from '../security/hash.js'; import { nanoid } from 'nanoid'; import SqliteConnection from './SqliteConnection.js'; diff --git a/lib/services/storage/watchListStorage.js b/lib/services/storage/watchListStorage.js index 49d4f30..67a16e1 100644 --- a/lib/services/storage/watchListStorage.js +++ b/lib/services/storage/watchListStorage.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import SqliteConnection from './SqliteConnection.js'; import { nanoid } from 'nanoid'; diff --git a/lib/services/tracking/Tracker.js b/lib/services/tracking/Tracker.js index bc4bb59..8284300 100644 --- a/lib/services/tracking/Tracker.js +++ b/lib/services/tracking/Tracker.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { getJobs } from '../storage/jobStorage.js'; import { getUniqueId } from './uniqueId.js'; import { getPackageVersion, inDevMode } from '../../utils.js'; diff --git a/lib/services/tracking/uniqueId.js b/lib/services/tracking/uniqueId.js index e2228d6..8f2e768 100644 --- a/lib/services/tracking/uniqueId.js +++ b/lib/services/tracking/uniqueId.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { hostname, arch, cpus, platform } from 'os'; import { createHash } from 'crypto'; diff --git a/lib/utils.js b/lib/utils.js index f6d1fca..f9cc2fb 100755 --- a/lib/utils.js +++ b/lib/utils.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { dirname } from 'node:path'; import path from 'node:path'; import { fileURLToPath, pathToFileURL } from 'node:url'; diff --git a/package.json b/package.json index 573e3f7..0ec1c5a 100755 --- a/package.json +++ b/package.json @@ -16,13 +16,15 @@ "lint": "eslint .", "lint:fix": "yarn lint --fix", "migratedb": "node lib/services/storage/migrations/migrate.js", - "migratedb:overwrite": "x-var MIGRATION_ALLOW_CHECKSUM_UPDATE=true node lib/services/storage/migrations/migrate.js" + "migratedb:overwrite": "x-var MIGRATION_ALLOW_CHECKSUM_UPDATE=true node lib/services/storage/migrations/migrate.js", + "copyright": "node ./copyright.js" }, "type": "module", "lint-staged": { "*.{js,jsx}": [ "yarn lint", - "yarn format" + "yarn format", + "yarn copyright" ] }, "main": "index.js", @@ -45,7 +47,7 @@ "bugs": { "url": "https://github.com/orangecoding/fredy/issues" }, - "license": "MIT", + "license": "Apache-2.0", "engines": { "node": ">=22.0.0", "npm": ">=7.0.0" diff --git a/test/db/migrations/migrate.test.js b/test/db/migrations/migrate.test.js index 24a80b5..51d087d 100644 --- a/test/db/migrations/migrate.test.js +++ b/test/db/migrations/migrate.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { expect } from 'chai'; import esmock from 'esmock'; diff --git a/test/mocks/mockNotification.js b/test/mocks/mockNotification.js index 72b4e95..94750e7 100644 --- a/test/mocks/mockNotification.js +++ b/test/mocks/mockNotification.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + let tmpStore = {}; export const send = (serviceName, payload) => { diff --git a/test/mocks/mockStore.js b/test/mocks/mockStore.js index e896b88..8e30cc2 100644 --- a/test/mocks/mockStore.js +++ b/test/mocks/mockStore.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + const db = {}; export const storeListings = (jobKey, providerId, listings) => { if (!Array.isArray(listings)) throw Error('Not a valid array'); diff --git a/test/provider/einsAImmobilien.test.js b/test/provider/einsAImmobilien.test.js index ad6933a..04879fe 100644 --- a/test/provider/einsAImmobilien.test.js +++ b/test/provider/einsAImmobilien.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import * as similarityCache from '../../lib/services/similarity-check/similarityCache.js'; import { get } from '../mocks/mockNotification.js'; import { providerConfig, mockFredy } from '../utils.js'; diff --git a/test/provider/immobilienDe.test.js b/test/provider/immobilienDe.test.js index 887a06a..f86102a 100644 --- a/test/provider/immobilienDe.test.js +++ b/test/provider/immobilienDe.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import * as similarityCache from '../../lib/services/similarity-check/similarityCache.js'; import { get } from '../mocks/mockNotification.js'; import { providerConfig, mockFredy } from '../utils.js'; diff --git a/test/provider/immonet.test.js b/test/provider/immonet.test.js index 5350360..150c89f 100644 --- a/test/provider/immonet.test.js +++ b/test/provider/immonet.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import * as similarityCache from '../../lib/services/similarity-check/similarityCache.js'; import { get } from '../mocks/mockNotification.js'; import { mockFredy, providerConfig } from '../utils.js'; diff --git a/test/provider/immoscout.test.js b/test/provider/immoscout.test.js index 322ebc3..ac147d6 100644 --- a/test/provider/immoscout.test.js +++ b/test/provider/immoscout.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { expect } from 'chai'; import * as similarityCache from '../../lib/services/similarity-check/similarityCache.js'; import { mockFredy, providerConfig } from '../utils.js'; diff --git a/test/provider/immoswp.test.js b/test/provider/immoswp.test.js index f0f987c..a08a727 100644 --- a/test/provider/immoswp.test.js +++ b/test/provider/immoswp.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import * as similarityCache from '../../lib/services/similarity-check/similarityCache.js'; import { get } from '../mocks/mockNotification.js'; import { mockFredy, providerConfig } from '../utils.js'; diff --git a/test/provider/immowelt.test.js b/test/provider/immowelt.test.js index 2285b71..d60f138 100644 --- a/test/provider/immowelt.test.js +++ b/test/provider/immowelt.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import * as similarityCache from '../../lib/services/similarity-check/similarityCache.js'; import { get } from '../mocks/mockNotification.js'; import { mockFredy, providerConfig } from '../utils.js'; diff --git a/test/provider/kleinanzeigen.test.js b/test/provider/kleinanzeigen.test.js index c228790..94a86b6 100644 --- a/test/provider/kleinanzeigen.test.js +++ b/test/provider/kleinanzeigen.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import * as similarityCache from '../../lib/services/similarity-check/similarityCache.js'; import { get } from '../mocks/mockNotification.js'; import { mockFredy, providerConfig } from '../utils.js'; diff --git a/test/provider/mcMakler.test.js b/test/provider/mcMakler.test.js index b48c40d..52548b8 100644 --- a/test/provider/mcMakler.test.js +++ b/test/provider/mcMakler.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import * as similarityCache from '../../lib/services/similarity-check/similarityCache.js'; import { get } from '../mocks/mockNotification.js'; import { mockFredy, providerConfig } from '../utils.js'; diff --git a/test/provider/neubauKompass.test.js b/test/provider/neubauKompass.test.js index 5e5a445..6ebcc1e 100644 --- a/test/provider/neubauKompass.test.js +++ b/test/provider/neubauKompass.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import * as similarityCache from '../../lib/services/similarity-check/similarityCache.js'; import { get } from '../mocks/mockNotification.js'; import { mockFredy, providerConfig } from '../utils.js'; diff --git a/test/provider/ohneMakler.test.js b/test/provider/ohneMakler.test.js index e469e73..16d3043 100644 --- a/test/provider/ohneMakler.test.js +++ b/test/provider/ohneMakler.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import * as similarityCache from '../../lib/services/similarity-check/similarityCache.js'; import { get } from '../mocks/mockNotification.js'; import { mockFredy, providerConfig } from '../utils.js'; diff --git a/test/provider/regionalimmobilien24.test.js b/test/provider/regionalimmobilien24.test.js index 6dafb08..50fe37f 100644 --- a/test/provider/regionalimmobilien24.test.js +++ b/test/provider/regionalimmobilien24.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import * as similarityCache from '../../lib/services/similarity-check/similarityCache.js'; import { get } from '../mocks/mockNotification.js'; import { mockFredy, providerConfig } from '../utils.js'; diff --git a/test/provider/sparkasse.test.js b/test/provider/sparkasse.test.js index 0b16c3c..2217052 100644 --- a/test/provider/sparkasse.test.js +++ b/test/provider/sparkasse.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import * as similarityCache from '../../lib/services/similarity-check/similarityCache.js'; import { get } from '../mocks/mockNotification.js'; import { mockFredy, providerConfig } from '../utils.js'; diff --git a/test/provider/utils.test.js b/test/provider/utils.test.js index 15fb16c..da702be 100644 --- a/test/provider/utils.test.js +++ b/test/provider/utils.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { isOneOf, duringWorkingHoursOrNotSet } from '../../lib/utils.js'; import assert from 'assert'; import { expect } from 'chai'; diff --git a/test/provider/wgGesucht.test.js b/test/provider/wgGesucht.test.js index 4bde924..96978c9 100644 --- a/test/provider/wgGesucht.test.js +++ b/test/provider/wgGesucht.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import * as similarityCache from '../../lib/services/similarity-check/similarityCache.js'; import { get } from '../mocks/mockNotification.js'; import { mockFredy, providerConfig } from '../utils.js'; diff --git a/test/queryStringMutator/queryStringMutator.test.js b/test/queryStringMutator/queryStringMutator.test.js index 0fce449..347f897 100644 --- a/test/queryStringMutator/queryStringMutator.test.js +++ b/test/queryStringMutator/queryStringMutator.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import fs from 'fs'; import { expect } from 'chai'; import { readFile } from 'fs/promises'; diff --git a/test/services/extractor/botPrevention.test.js b/test/services/extractor/botPrevention.test.js index 6ff70d7..59a6431 100644 --- a/test/services/extractor/botPrevention.test.js +++ b/test/services/extractor/botPrevention.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { describe, it } from 'mocha'; import { expect } from 'chai'; diff --git a/test/services/immoscout/immoscout-web-translator.test.js b/test/services/immoscout/immoscout-web-translator.test.js index e680236..8c784bb 100644 --- a/test/services/immoscout/immoscout-web-translator.test.js +++ b/test/services/immoscout/immoscout-web-translator.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { convertWebToMobile } from '../../../lib/services/immoscout/immoscout-web-translator.js'; import { expect } from 'chai'; import { readFile } from 'fs/promises'; diff --git a/test/similarity/similarityCache.test.js b/test/similarity/similarityCache.test.js index 100ea1c..2f8e579 100644 --- a/test/similarity/similarityCache.test.js +++ b/test/similarity/similarityCache.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { expect } from 'chai'; import esmock from 'esmock'; diff --git a/test/storage/SqliteConnection.test.js b/test/storage/SqliteConnection.test.js index 0e54dd0..8aa995d 100644 --- a/test/storage/SqliteConnection.test.js +++ b/test/storage/SqliteConnection.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { expect } from 'chai'; import esmock from 'esmock'; diff --git a/test/utils.js b/test/utils.js index aa6d086..fb82257 100644 --- a/test/utils.js +++ b/test/utils.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { readFile } from 'fs/promises'; import esmock from 'esmock'; import * as mockStore from './mocks/mockStore.js'; diff --git a/test/utils/utils.test.js b/test/utils/utils.test.js index 151042b..01895d9 100644 --- a/test/utils/utils.test.js +++ b/test/utils/utils.test.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { expect } from 'chai'; import { buildHash } from '../../lib/utils.js'; diff --git a/ui/src/App.jsx b/ui/src/App.jsx index 423433d..f7370c7 100644 --- a/ui/src/App.jsx +++ b/ui/src/App.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React, { useEffect } from 'react'; import InsufficientPermission from './components/permission/InsufficientPermission'; diff --git a/ui/src/Index.jsx b/ui/src/Index.jsx index 2cfb723..7aa3466 100644 --- a/ui/src/Index.jsx +++ b/ui/src/Index.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import { HashRouter } from 'react-router-dom'; diff --git a/ui/src/components/footer/FredyFooter.jsx b/ui/src/components/footer/FredyFooter.jsx index a5589ed..fea6908 100644 --- a/ui/src/components/footer/FredyFooter.jsx +++ b/ui/src/components/footer/FredyFooter.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import './FredyFooter.less'; import { useSelector } from '../../services/state/store.js'; diff --git a/ui/src/components/headline/Headline.jsx b/ui/src/components/headline/Headline.jsx index c591f5c..b00d98d 100644 --- a/ui/src/components/headline/Headline.jsx +++ b/ui/src/components/headline/Headline.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import { Typography } from '@douyinfe/semi-ui'; diff --git a/ui/src/components/logo/Logo.jsx b/ui/src/components/logo/Logo.jsx index f2ae5fb..2baef35 100644 --- a/ui/src/components/logo/Logo.jsx +++ b/ui/src/components/logo/Logo.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import logo from '../../assets/logo.png'; import logoWhite from '../../assets/logo_white.png'; diff --git a/ui/src/components/logout/Logout.jsx b/ui/src/components/logout/Logout.jsx index 04908dd..ac8df47 100644 --- a/ui/src/components/logout/Logout.jsx +++ b/ui/src/components/logout/Logout.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import { Button } from '@douyinfe/semi-ui'; import { xhrPost } from '../../services/xhr'; diff --git a/ui/src/components/navigation/Navigation.jsx b/ui/src/components/navigation/Navigation.jsx index 24f3266..74a3f55 100644 --- a/ui/src/components/navigation/Navigation.jsx +++ b/ui/src/components/navigation/Navigation.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import { Nav } from '@douyinfe/semi-ui'; import { IconStar, IconSetting, IconTerminal } from '@douyinfe/semi-icons'; diff --git a/ui/src/components/permission/InsufficientPermission.jsx b/ui/src/components/permission/InsufficientPermission.jsx index 5b78f4d..6d9d589 100644 --- a/ui/src/components/permission/InsufficientPermission.jsx +++ b/ui/src/components/permission/InsufficientPermission.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import insufficientPermission from '../../assets/insufficient_permission.png'; diff --git a/ui/src/components/permission/PermissionAwareRoute.jsx b/ui/src/components/permission/PermissionAwareRoute.jsx index 08829d3..6d68068 100644 --- a/ui/src/components/permission/PermissionAwareRoute.jsx +++ b/ui/src/components/permission/PermissionAwareRoute.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import { Navigate } from 'react-router-dom'; diff --git a/ui/src/components/placeholder/Placeholder.jsx b/ui/src/components/placeholder/Placeholder.jsx index f7232b4..7e02a84 100644 --- a/ui/src/components/placeholder/Placeholder.jsx +++ b/ui/src/components/placeholder/Placeholder.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import './Placeholder.less'; diff --git a/ui/src/components/segment/SegmentPart.jsx b/ui/src/components/segment/SegmentPart.jsx index 23bce66..aa17dfd 100644 --- a/ui/src/components/segment/SegmentPart.jsx +++ b/ui/src/components/segment/SegmentPart.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import { Card } from '@douyinfe/semi-ui'; diff --git a/ui/src/components/table/JobTable.jsx b/ui/src/components/table/JobTable.jsx index df57539..94ba335 100644 --- a/ui/src/components/table/JobTable.jsx +++ b/ui/src/components/table/JobTable.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import { Button, Empty, Table, Switch, Popover } from '@douyinfe/semi-ui'; diff --git a/ui/src/components/table/NotificationAdapterTable.jsx b/ui/src/components/table/NotificationAdapterTable.jsx index 7d23ad4..57c9043 100644 --- a/ui/src/components/table/NotificationAdapterTable.jsx +++ b/ui/src/components/table/NotificationAdapterTable.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import { Empty, Table, Button } from '@douyinfe/semi-ui'; diff --git a/ui/src/components/table/ProviderTable.jsx b/ui/src/components/table/ProviderTable.jsx index efe1d46..9dad2bf 100644 --- a/ui/src/components/table/ProviderTable.jsx +++ b/ui/src/components/table/ProviderTable.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import { Empty, Table, Button } from '@douyinfe/semi-ui'; diff --git a/ui/src/components/table/UserTable.jsx b/ui/src/components/table/UserTable.jsx index a37a3ba..1baf20d 100644 --- a/ui/src/components/table/UserTable.jsx +++ b/ui/src/components/table/UserTable.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import { IllustrationNoResult, IllustrationNoResultDark } from '@douyinfe/semi-illustrations'; diff --git a/ui/src/components/table/listings/ListingsTable.jsx b/ui/src/components/table/listings/ListingsTable.jsx index f29f6cc..5149e6b 100644 --- a/ui/src/components/table/listings/ListingsTable.jsx +++ b/ui/src/components/table/listings/ListingsTable.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React, { useState, useEffect, useMemo } from 'react'; import { Table, diff --git a/ui/src/components/tracking/TrackingModal.jsx b/ui/src/components/tracking/TrackingModal.jsx index 7ec8460..ff2f02d 100644 --- a/ui/src/components/tracking/TrackingModal.jsx +++ b/ui/src/components/tracking/TrackingModal.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import { Modal } from '@douyinfe/semi-ui'; import Logo from '../logo/Logo.jsx'; diff --git a/ui/src/components/version/VersionBanner.jsx b/ui/src/components/version/VersionBanner.jsx index 2cd00ea..bcaf98e 100644 --- a/ui/src/components/version/VersionBanner.jsx +++ b/ui/src/components/version/VersionBanner.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import { Collapse, Descriptions } from '@douyinfe/semi-ui'; import { useSelector } from '../../services/state/store.js'; diff --git a/ui/src/hooks/featureHook.js b/ui/src/hooks/featureHook.js index 4c01b6a..ba81b96 100644 --- a/ui/src/hooks/featureHook.js +++ b/ui/src/hooks/featureHook.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { useSelector } from '../services/state/store.js'; export function useFeature(name) { diff --git a/ui/src/hooks/screenWidth.js b/ui/src/hooks/screenWidth.js index 3521a35..f0bd83c 100644 --- a/ui/src/hooks/screenWidth.js +++ b/ui/src/hooks/screenWidth.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import { useState, useEffect } from 'react'; export function useScreenWidth() { diff --git a/ui/src/services/developmentMode.js b/ui/src/services/developmentMode.js index 5074c63..367a692 100644 --- a/ui/src/services/developmentMode.js +++ b/ui/src/services/developmentMode.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + export default function isDevelopmentMode() { const inDevMode = import.meta.env.MODE; return inDevMode != null && inDevMode === 'development'; diff --git a/ui/src/services/state/store.js b/ui/src/services/state/store.js index 3d2fd81..5060f73 100644 --- a/ui/src/services/state/store.js +++ b/ui/src/services/state/store.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + /** * Zustand store for Fredy ui state. */ diff --git a/ui/src/services/time/timeService.js b/ui/src/services/time/timeService.js index 7f3b29d..9f844ed 100644 --- a/ui/src/services/time/timeService.js +++ b/ui/src/services/time/timeService.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + export function format(ts, showSeconds = true) { return new Intl.DateTimeFormat('default', { year: 'numeric', diff --git a/ui/src/services/transformer/notificationAdapterTransformer.js b/ui/src/services/transformer/notificationAdapterTransformer.js index b12cb76..e4af8d9 100644 --- a/ui/src/services/transformer/notificationAdapterTransformer.js +++ b/ui/src/services/transformer/notificationAdapterTransformer.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + export function transform({ id, name, fields }) { const fieldValues = {}; Object.keys(fields).map((key) => { diff --git a/ui/src/services/transformer/providerTransformer.js b/ui/src/services/transformer/providerTransformer.js index 76c6076..033c9c7 100644 --- a/ui/src/services/transformer/providerTransformer.js +++ b/ui/src/services/transformer/providerTransformer.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + export function transform({ name, id, enabled, url }) { return { name, diff --git a/ui/src/services/xhr.js b/ui/src/services/xhr.js index 71a4e8b..57aef6d 100644 --- a/ui/src/services/xhr.js +++ b/ui/src/services/xhr.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + /** * post something to our backend. * diff --git a/ui/src/views/generalSettings/GeneralSettings.jsx b/ui/src/views/generalSettings/GeneralSettings.jsx index c6bc6c2..41407a3 100644 --- a/ui/src/views/generalSettings/GeneralSettings.jsx +++ b/ui/src/views/generalSettings/GeneralSettings.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import { useActions, useSelector } from '../../services/state/store'; diff --git a/ui/src/views/jobs/Jobs.jsx b/ui/src/views/jobs/Jobs.jsx index a663b10..59719ac 100644 --- a/ui/src/views/jobs/Jobs.jsx +++ b/ui/src/views/jobs/Jobs.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import JobTable from '../../components/table/JobTable'; diff --git a/ui/src/views/jobs/ProcessingTimes.jsx b/ui/src/views/jobs/ProcessingTimes.jsx index 044d0b8..ad0ee4d 100644 --- a/ui/src/views/jobs/ProcessingTimes.jsx +++ b/ui/src/views/jobs/ProcessingTimes.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import { format } from '../../services/time/timeService'; import { Button, Card, Col, Row, Toast } from '@douyinfe/semi-ui'; diff --git a/ui/src/views/jobs/insights/JobInsight.jsx b/ui/src/views/jobs/insights/JobInsight.jsx index 51ea715..f00b1e7 100644 --- a/ui/src/views/jobs/insights/JobInsight.jsx +++ b/ui/src/views/jobs/insights/JobInsight.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import { roundToHour } from '../../../services/time/timeService'; diff --git a/ui/src/views/jobs/insights/Linechart.jsx b/ui/src/views/jobs/insights/Linechart.jsx index 3eac812..10e6036 100644 --- a/ui/src/views/jobs/insights/Linechart.jsx +++ b/ui/src/views/jobs/insights/Linechart.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import Placeholder from '../../../components/placeholder/Placeholder'; diff --git a/ui/src/views/jobs/mutation/JobMutation.jsx b/ui/src/views/jobs/mutation/JobMutation.jsx index 773e775..615af64 100644 --- a/ui/src/views/jobs/mutation/JobMutation.jsx +++ b/ui/src/views/jobs/mutation/JobMutation.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React, { Fragment, useState } from 'react'; import NotificationAdapterMutator from './components/notificationAdapter/NotificationAdapterMutator'; diff --git a/ui/src/views/jobs/mutation/components/notificationAdapter/NotificationAdapterMutator.jsx b/ui/src/views/jobs/mutation/components/notificationAdapter/NotificationAdapterMutator.jsx index 5e9e1c9..0003878 100644 --- a/ui/src/views/jobs/mutation/components/notificationAdapter/NotificationAdapterMutator.jsx +++ b/ui/src/views/jobs/mutation/components/notificationAdapter/NotificationAdapterMutator.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React, { useState } from 'react'; import { transform } from '../../../../../services/transformer/notificationAdapterTransformer'; diff --git a/ui/src/views/jobs/mutation/components/notificationAdapter/NotificationHelpDisplay.jsx b/ui/src/views/jobs/mutation/components/notificationAdapter/NotificationHelpDisplay.jsx index 6644104..531b7d3 100644 --- a/ui/src/views/jobs/mutation/components/notificationAdapter/NotificationHelpDisplay.jsx +++ b/ui/src/views/jobs/mutation/components/notificationAdapter/NotificationHelpDisplay.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import { Banner, MarkdownRender } from '@douyinfe/semi-ui'; diff --git a/ui/src/views/jobs/mutation/components/provider/ProviderMutator.jsx b/ui/src/views/jobs/mutation/components/provider/ProviderMutator.jsx index f286f98..8726713 100644 --- a/ui/src/views/jobs/mutation/components/provider/ProviderMutator.jsx +++ b/ui/src/views/jobs/mutation/components/provider/ProviderMutator.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React, { useState, useEffect } from 'react'; import { Banner, Modal, Select, Input } from '@douyinfe/semi-ui'; diff --git a/ui/src/views/listings/Listings.jsx b/ui/src/views/listings/Listings.jsx index 98d732d..8ed479d 100644 --- a/ui/src/views/listings/Listings.jsx +++ b/ui/src/views/listings/Listings.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import ListingsTable from '../../components/table/listings/ListingsTable.jsx'; diff --git a/ui/src/views/listings/management/WatchlistManagement.jsx b/ui/src/views/listings/management/WatchlistManagement.jsx index b80820f..a1628d8 100644 --- a/ui/src/views/listings/management/WatchlistManagement.jsx +++ b/ui/src/views/listings/management/WatchlistManagement.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React, { useState } from 'react'; import { IconHorn } from '@douyinfe/semi-icons'; import { SegmentPart } from '../../../components/segment/SegmentPart.jsx'; diff --git a/ui/src/views/login/Login.jsx b/ui/src/views/login/Login.jsx index 79abe69..3d3137d 100644 --- a/ui/src/views/login/Login.jsx +++ b/ui/src/views/login/Login.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React, { useEffect } from 'react'; import cityBackground from '../../assets/city_background.jpg'; diff --git a/ui/src/views/user/UserRemovalModal.jsx b/ui/src/views/user/UserRemovalModal.jsx index e23d52d..ef5e3d7 100644 --- a/ui/src/views/user/UserRemovalModal.jsx +++ b/ui/src/views/user/UserRemovalModal.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import { Modal } from '@douyinfe/semi-ui'; const UserRemovalModal = function UserRemovalModal({ onOk, onCancel }) { diff --git a/ui/src/views/user/Users.jsx b/ui/src/views/user/Users.jsx index 935710f..7030497 100644 --- a/ui/src/views/user/Users.jsx +++ b/ui/src/views/user/Users.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import { Toast } from '@douyinfe/semi-ui'; diff --git a/ui/src/views/user/mutation/UserMutator.jsx b/ui/src/views/user/mutation/UserMutator.jsx index 68c0383..3b99601 100644 --- a/ui/src/views/user/mutation/UserMutator.jsx +++ b/ui/src/views/user/mutation/UserMutator.jsx @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import React from 'react'; import { xhrGet, xhrPost } from '../../../services/xhr'; diff --git a/vite.config.js b/vite.config.js index 9bbcf07..27f8409 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2025 by Christian Kellner. + * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause + */ + import react from '@vitejs/plugin-react'; import { defineConfig } from 'vite'; // https://vitejs.dev/config/