Replaces LICENSE (GPLv3 -> AGPLv3) and prepends `SPDX-License-Identifier: AGPL-3.0-or-later` to every source file across decnet/, decnet_web/, tests/, scripts/, and tools/. Rationale: closes the GPLv3 ASP loophole so any party operating a modified DECNET as a network service must offer their modified source. Personal copyright (Samuel Paschuan) + inbound=outbound contributions make a future unilateral relicense infeasible. - LICENSE: full AGPL-3.0 text (gnu.org/licenses/agpl-3.0.txt) - COPYRIGHT: project copyright notice - tools/add_spdx_headers.py: idempotent header injector (shebang- and PEP 263-aware) Touches 1565 source files (.py, .ts, .tsx, .js, .jsx, .css, .sh). No behavior change; comments only.
20 lines
687 B
JavaScript
20 lines
687 B
JavaScript
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
// Node helper invoked by decnet.canary.obfuscator.
|
|
// Reads {code, options} JSON from stdin, writes obfuscated JS to stdout.
|
|
// Kept dependency-light on purpose: only javascript-obfuscator.
|
|
const JsObf = require('javascript-obfuscator');
|
|
|
|
let raw = '';
|
|
process.stdin.setEncoding('utf8');
|
|
process.stdin.on('data', (chunk) => { raw += chunk; });
|
|
process.stdin.on('end', () => {
|
|
try {
|
|
const { code, options } = JSON.parse(raw);
|
|
const result = JsObf.obfuscate(code, options || {});
|
|
process.stdout.write(result.getObfuscatedCode());
|
|
} catch (e) {
|
|
process.stderr.write(String(e && e.stack || e));
|
|
process.exit(2);
|
|
}
|
|
});
|