Переглянути джерело

dev(license-headers): fix excludes list

KernelDeimos 10 місяців тому
батько
коміт
6728dd2571

+ 19 - 0
experiments/x86emu/www/js/Instance.mjs

@@ -1,3 +1,22 @@
+/*
+ * Copyright (C) 2024 Puter Technologies Inc.
+ * 
+ * This file is part of Puter.
+ * 
+ * Puter is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 import { V86 } from "./V86Wrapper.mjs";
 /**
  * Class representing an Instance of an emulator machine.

+ 19 - 0
experiments/x86emu/www/js/InstanceManager.mjs

@@ -1,3 +1,22 @@
+/*
+ * Copyright (C) 2024 Puter Technologies Inc.
+ * 
+ * This file is part of Puter.
+ * 
+ * Puter is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 import Instance from "./Instance.mjs"
 
 /**

+ 19 - 0
experiments/x86emu/www/js/V86Wrapper.mjs

@@ -1,3 +1,22 @@
+/*
+ * Copyright (C) 2024 Puter Technologies Inc.
+ * 
+ * This file is part of Puter.
+ * 
+ * Puter is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 let V86;
 
 if (typeof window !== 'undefined') {

+ 19 - 0
experiments/x86emu/www/main.js

@@ -1,3 +1,22 @@
+/*
+ * Copyright (C) 2024 Puter Technologies Inc.
+ * 
+ * This file is part of Puter.
+ * 
+ * Puter is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #!/usr/bin/env node
 /*
  * Copyright (C) 2024 Puter Technologies Inc.

+ 19 - 0
src/backend/src/services/ParameterService.js

@@ -1,3 +1,22 @@
+/*
+ * Copyright (C) 2024 Puter Technologies Inc.
+ * 
+ * This file is part of Puter.
+ * 
+ * Puter is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 const BaseService = require("./BaseService");
 
 /*

+ 19 - 0
src/backend/src/services/information/InformationService.js

@@ -1,3 +1,22 @@
+/*
+ * Copyright (C) 2024 Puter Technologies Inc.
+ * 
+ * This file is part of Puter.
+ * 
+ * Puter is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 const BaseService = require("../BaseService");
 
 /*

+ 20 - 1
tools/comment-parser/main.js

@@ -1,3 +1,22 @@
+/*
+ * Copyright (C) 2024 Puter Technologies Inc.
+ * 
+ * This file is part of Puter.
+ * 
+ * Puter is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 const lib = {};
 lib.dedent_lines = lines => {
     // If any lines are just spaces, remove the spaces
@@ -311,7 +330,7 @@ const CommentParser = () => {
                     break;
                 }
             }
-            console.log('comment?', comment);
+            // console.log('comment?', comment);
             if ( ! comment ) break;
             results.push(comment);
         }

+ 19 - 0
tools/comment-parser/test/test.js

@@ -1,3 +1,22 @@
+/*
+ * Copyright (C) 2024 Puter Technologies Inc.
+ * 
+ * This file is part of Puter.
+ * 
+ * Puter is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 const {
     StringStream,
     LinesCommentParser,

+ 6 - 1
tools/file-walker/test.js

@@ -31,10 +31,15 @@ const EXCLUDE_LISTS = {
         /^src\/dev-center\/js/,
         /src\/backend\/src\/public\/assets/,
         /^src\/gui\/src\/lib/,
-        /^src\/puter\.js/,
+        /^eslint\.config\.js$/,
     ]
 };
 
+EXCLUDE_LISTS.NOT_AGPL = [
+    ...EXCLUDE_LISTS.NOT_SOURCE,
+    /^src\/puter-js/,
+];
+
 const hl_readdir = async path => {
     const names = await fs.promises.readdir(path);
     const entries = [];

+ 5 - 5
tools/license-headers/main.js

@@ -123,7 +123,7 @@ const LicenseChecker = ({
             }
         }
         
-        console.log('headers', headers);
+        // console.log('headers', headers);
 
         const combined = headers_lines.slice(top, bottom).flat();
         const combined_txt = combined.join('\n');
@@ -165,7 +165,7 @@ const license_check_test = async ({ options }) => {
     });
     
     const walk_iterator = walk({
-        excludes: EXCLUDE_LISTS.NOT_SOURCE,
+        excludes: EXCLUDE_LISTS.NOT_AGPL,
     }, path_.join(__dirname, '../..'));
     for await ( const value of walk_iterator ) {
         if ( value.is_dir ) continue;
@@ -216,7 +216,7 @@ const cmd_check_fn = async () => {
     };
     
     const walk_iterator = walk({
-        excludes: EXCLUDE_LISTS.NOT_SOURCE,
+        excludes: EXCLUDE_LISTS.NOT_AGPL,
     }, path_.join(__dirname, '../..'));
     for await ( const value of walk_iterator ) {
         if ( value.is_dir ) continue;
@@ -355,7 +355,7 @@ const cmd_sync_fn = async () => {
     };
     
     const walk_iterator = walk({
-        excludes: EXCLUDE_LISTS.NOT_SOURCE,
+        excludes: EXCLUDE_LISTS.NOT_AGPL,
     }, '.');
     for await ( const value of walk_iterator ) {
         if ( value.is_dir ) continue;
@@ -378,7 +378,7 @@ const cmd_sync_fn = async () => {
             continue;
         }
         if ( ! diff_info.has_header ) {
-            if ( false ) fs.writeFileSync(
+            fs.writeFileSync(
                 value.path,
                 comment_parser.output_comment({
                     style: 'block',