diff --git a/fixcopyright.rkt b/fixcopyright.rkt new file mode 100755 index 0000000..0ef4c93 --- /dev/null +++ b/fixcopyright.rkt @@ -0,0 +1,147 @@ +#!/usr/bin/env racket +#lang racket +;;; SPDX-License-Identifier: LGPL-3.0-or-later +;;; SPDX-FileCopyrightText: Copyright © 2021 Tony Garnock-Jones + +(require file/glob) +(require racket/date) + +(define ((re p) i) (regexp-match p i)) +(define ((re? p) i) (regexp-match? p i)) +(define ((s p ins) i) (regexp-replace p i ins)) + +(define this-year (number->string (date-year (current-date)))) + +(define (get-git-config key) + (string-trim (with-output-to-string + (lambda () (system* "/usr/bin/env" "git" "config" "--get" key))))) + +(define (is-tracked? f) + (call-with-output-file "/dev/null" #:exists 'append + (lambda (sink) + (parameterize ((current-error-port sink) + (current-output-port sink)) + (system* "/usr/bin/env" "git" "ls-files" "--error-unmatch" f))))) + +(define user-name (get-git-config "user.name")) +(define user-email (get-git-config "user.email")) + +(define user (format "~a <~a>" user-name user-email)) + +(define (make-copyright who low [hi #f]) + (if (and hi (not (string=? low hi))) + (format "Copyright © ~a-~a ~a" low hi who) + (format "Copyright © ~a ~a" low who))) + +(define total-file-count 0) +(define total-changed-files 0) +(define dry-run? #f) +(define modify-untracked? #f) + +(define (fix-files #:file-type-name file-type-name + #:file-pattern file-pattern + #:front-matter-re [front-matter-re #f] + #:leading-comment-re leading-comment-re + #:comment-prefix comment-prefix + #:file-filter [file-filter (lambda (x) #t)]) + (define matched-files (filter file-filter (glob file-pattern))) + (define file-count (length matched-files)) + (define changed-files 0) + (for [(file-number (in-naturals)) + (f (in-list matched-files))] + (printf "~a [~a/~a] ~a ..." file-type-name file-number file-count f) + (flush-output) + (define all-lines (file->lines f)) + (define-values (front-matter head tail) + (let*-values (((lines) all-lines) + ((front-matter lines) (if front-matter-re + (splitf-at lines (re? front-matter-re)) + (values '() lines))) + ((head tail) (splitf-at lines (re? leading-comment-re)))) + (values front-matter head tail))) + (let* ((head (map (s leading-comment-re "") head)) + (head (map (lambda (l) + (match (regexp-match "^([^:]+): (.*)$" l) + [(list _ k v) (list k v)] + [#f (list #f l)])) + head)) + (head (if (assoc "SPDX-FileCopyrightText" head) + head + (cons (list "SPDX-FileCopyrightText" (make-copyright user this-year)) head))) + (head (if (assoc "SPDX-License-Identifier" head) + head + (cons (list "SPDX-License-Identifier" "GPL-3.0-or-later") head))) + (head (map (lambda (l) + (match l + [(list "SPDX-FileCopyrightText" + (and (regexp (regexp-quote user-name)) + (regexp #px"(\\d{4})-\\d{4}" (list _ low)))) + (list "SPDX-FileCopyrightText" + (make-copyright user low this-year))] + [(list "SPDX-FileCopyrightText" + (and (regexp (regexp-quote user-name)) + (regexp #px"\\d{4}" (list low)))) + (list "SPDX-FileCopyrightText" + (make-copyright user low this-year))] + [_ l])) + head)) + (head (map (lambda (l) + (if (string=? (cadr l) "") + (string-trim comment-prefix) + (string-append comment-prefix + (match l + [(list #f v) v] + [(list k v) (format "~a: ~a" k v)])))) + head)) + (new-lines `(,@front-matter + ,@head + "" + ,@(dropf tail (lambda (l) (string=? (string-trim l) ""))))) + (would-change-if-written? (not (equal? all-lines new-lines))) + (write-needed? (and would-change-if-written? (or modify-untracked? (is-tracked? f))))) + (when (and write-needed? (not dry-run?)) + (call-with-atomic-output-file + f + (lambda (port _tmp-path) + (for [(l front-matter)] (displayln l port)) + (for [(l head)] (displayln l port)) + (newline port) + (for [(l (dropf tail (lambda (l) (string=? (string-trim l) ""))))] (displayln l port))))) + (if write-needed? + (begin (set! changed-files (+ changed-files 1)) + (printf "\e[41mchanged\e[0m\n")) + (printf "\r\e[K")))) + (when (positive? changed-files) + (printf "~a [~a total files, ~a changed]\n" file-type-name file-count changed-files)) + (set! total-file-count (+ total-file-count file-count)) + (set! total-changed-files (+ total-changed-files changed-files))) + +(command-line #:once-each + [("-n" "--dry-run") "Do not write back changes to files" + (set! dry-run? #t)] + [("--modify-untracked") "Modify files not tracked by git as well as those that are" + (set! modify-untracked? #t)]) + +(void (fix-files #:file-type-name "TypeScript" + #:file-pattern "packages/**.ts" + #:front-matter-re #px"^#" + #:leading-comment-re #px"^//+ *" + #:comment-prefix "/// ")) +(void (fix-files #:file-type-name "JavaScript" + #:file-pattern "packages/**.js" + #:front-matter-re #px"^#" + #:leading-comment-re #px"^//+ *" + #:comment-prefix "/// ")) + +(printf "fixcopyright: ~a files examined, ~a ~a\n" + total-file-count + total-changed-files + (if dry-run? + (if (zero? total-changed-files) + "changes are needed" + "files need to be updated") + (if (zero? total-changed-files) + "changes were needed" + "files were updated"))) + +(exit (if (positive? total-changed-files) 1 0)) diff --git a/packages/compiler/rollup.config.js b/packages/compiler/rollup.config.js index b6e123e..bfef903 100644 --- a/packages/compiler/rollup.config.js +++ b/packages/compiler/rollup.config.js @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import { SyndicateRollup } from '../../rollup.js'; const r = new SyndicateRollup('syndicate-compiler', { globalName: 'SyndicateCompiler' }); export default [ diff --git a/packages/compiler/src/compiler/codegen.ts b/packages/compiler/src/compiler/codegen.ts index 816f1c9..7c09a6e 100644 --- a/packages/compiler/src/compiler/codegen.ts +++ b/packages/compiler/src/compiler/codegen.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import { isToken, isTokenType, replace, commaJoin, startPos, fixPos, joinItems, laxRead, itemText, match, diff --git a/packages/compiler/src/compiler/grammar.ts b/packages/compiler/src/compiler/grammar.ts index 9478c45..f3ce606 100644 --- a/packages/compiler/src/compiler/grammar.ts +++ b/packages/compiler/src/compiler/grammar.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import { TokenType, Token, Items, Pattern, diff --git a/packages/compiler/src/compiler/index.ts b/packages/compiler/src/compiler/index.ts index d9c7045..99dac1b 100644 --- a/packages/compiler/src/compiler/index.ts +++ b/packages/compiler/src/compiler/index.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + export * as Grammar from './grammar.js'; export * as Internals from './internals.js'; export * as Codegen from './codegen.js'; diff --git a/packages/compiler/src/compiler/internals.ts b/packages/compiler/src/compiler/internals.ts index e5c0fc8..64b2e01 100644 --- a/packages/compiler/src/compiler/internals.ts +++ b/packages/compiler/src/compiler/internals.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + export const BootProc = '__SYNDICATE__bootProc'; // Keep these definitions in sync with api.ts from the core package diff --git a/packages/compiler/src/index.ts b/packages/compiler/src/index.ts index ac1519c..021dcac 100644 --- a/packages/compiler/src/index.ts +++ b/packages/compiler/src/index.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/compiler, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones export * as Syntax from './syntax/index.js'; export * from './compiler/index.js'; diff --git a/packages/compiler/src/syntax/codewriter.ts b/packages/compiler/src/syntax/codewriter.ts index c63b916..5ce665f 100644 --- a/packages/compiler/src/syntax/codewriter.ts +++ b/packages/compiler/src/syntax/codewriter.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import { Token, TokenType, Item, Items, isGroup } from './tokens.js'; import { Pos, startPos, advancePos } from './position.js'; import { vlqEncode } from './vlq.js'; diff --git a/packages/compiler/src/syntax/index.ts b/packages/compiler/src/syntax/index.ts index db10f2c..0e577b1 100644 --- a/packages/compiler/src/syntax/index.ts +++ b/packages/compiler/src/syntax/index.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + export * from './codewriter.js'; export * from './list.js'; export * from './matcher.js'; diff --git a/packages/compiler/src/syntax/list.ts b/packages/compiler/src/syntax/list.ts index 9ecac2a..e4ce0be 100644 --- a/packages/compiler/src/syntax/list.ts +++ b/packages/compiler/src/syntax/list.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + export interface List extends Iterable { item: T | null; next: List | null; diff --git a/packages/compiler/src/syntax/matcher.ts b/packages/compiler/src/syntax/matcher.ts index 4620618..d060261 100644 --- a/packages/compiler/src/syntax/matcher.ts +++ b/packages/compiler/src/syntax/matcher.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import { Token, TokenType, Items, Item, isGroup, isToken, isSpace, isTokenType, diff --git a/packages/compiler/src/syntax/position.ts b/packages/compiler/src/syntax/position.ts index 8706ab7..29c488c 100644 --- a/packages/compiler/src/syntax/position.ts +++ b/packages/compiler/src/syntax/position.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + export interface Pos { line: number; column: number; diff --git a/packages/compiler/src/syntax/reader.ts b/packages/compiler/src/syntax/reader.ts index a7cfee9..115d319 100644 --- a/packages/compiler/src/syntax/reader.ts +++ b/packages/compiler/src/syntax/reader.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import { TokenType, Token, Group, GroupInProgress, Item, Items, finishGroup } from './tokens.js'; import { Pos, startPos } from './position.js'; import { Scanner, StringScanner } from './scanner.js'; diff --git a/packages/compiler/src/syntax/scanner.ts b/packages/compiler/src/syntax/scanner.ts index da2aadf..19c0b9d 100644 --- a/packages/compiler/src/syntax/scanner.ts +++ b/packages/compiler/src/syntax/scanner.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import { TokenType, Token, Item, GroupInProgress } from './tokens.js'; import { Pos, advancePos } from './position.js'; diff --git a/packages/compiler/src/syntax/span.ts b/packages/compiler/src/syntax/span.ts index d2dcdd5..6177ec3 100644 --- a/packages/compiler/src/syntax/span.ts +++ b/packages/compiler/src/syntax/span.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + export class SpanResult { readonly searchTarget: number; readonly start: number; diff --git a/packages/compiler/src/syntax/template.ts b/packages/compiler/src/syntax/template.ts index d5e8816..987ef6e 100644 --- a/packages/compiler/src/syntax/template.ts +++ b/packages/compiler/src/syntax/template.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import { Items } from './tokens.js'; import { Pos, startPos } from './position.js'; import { laxRead, LaxReadOptions } from './reader.js'; diff --git a/packages/compiler/src/syntax/tokens.ts b/packages/compiler/src/syntax/tokens.ts index 9d26c22..fa0a5c0 100644 --- a/packages/compiler/src/syntax/tokens.ts +++ b/packages/compiler/src/syntax/tokens.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import { Pos } from './position.js'; export enum TokenType { diff --git a/packages/compiler/src/syntax/vlq.ts b/packages/compiler/src/syntax/vlq.ts index fbcfe98..7c3b0dc 100644 --- a/packages/compiler/src/syntax/vlq.ts +++ b/packages/compiler/src/syntax/vlq.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + const alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; const inverse_alphabet = new Map(Object.entries(alphabet).map(([i,c])=>[c,parseInt(i)])); diff --git a/packages/core/examples/box-and-client.js b/packages/core/examples/box-and-client.js old mode 100755 new mode 100644 index 8b800a8..9e432ce --- a/packages/core/examples/box-and-client.js +++ b/packages/core/examples/box-and-client.js @@ -1,21 +1,6 @@ #!/usr/bin/env node -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones const { bootModule, Dataspace, Skeleton, Ground, Record, Discard, Capture, Observe } = require('..'); const __ = Discard._instance; diff --git a/packages/core/examples/box-and-client.ts b/packages/core/examples/box-and-client.ts old mode 100755 new mode 100644 index 80d2aa6..79a47fd --- a/packages/core/examples/box-and-client.ts +++ b/packages/core/examples/box-and-client.ts @@ -1,21 +1,6 @@ #!/usr/bin/env -S npx ts-node -O '{"module": "commonjs"}' -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { bootModule, Skeleton, Record, Discard, Capture, Observe, Facet, Value } from '..'; const __ = Discard._instance; diff --git a/packages/core/jest.config.ts b/packages/core/jest.config.ts index c97cd07..dd2389d 100644 --- a/packages/core/jest.config.ts +++ b/packages/core/jest.config.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import 'preserves'; export default { diff --git a/packages/core/rollup.config.js b/packages/core/rollup.config.js index 15be0d6..e909e75 100644 --- a/packages/core/rollup.config.js +++ b/packages/core/rollup.config.js @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import { SyndicateRollup } from '../../rollup.js'; const r = new SyndicateRollup('syndicate', { globalName: 'Syndicate' }); export default [ diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 978be87..bf12a01 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones export * from '@preserves/core'; diff --git a/packages/core/src/runtime/actor.ts b/packages/core/src/runtime/actor.ts index 6653203..4ee4cba 100644 --- a/packages/core/src/runtime/actor.ts +++ b/packages/core/src/runtime/actor.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { IdentitySet, Value } from '@preserves/core'; import { Attenuation, runRewrites } from './rewrite.js'; diff --git a/packages/core/src/runtime/api.ts b/packages/core/src/runtime/api.ts index 251d981..78964a7 100644 --- a/packages/core/src/runtime/api.ts +++ b/packages/core/src/runtime/api.ts @@ -1,5 +1,8 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + // Keep these definitions in sync with internals.ts from the compiler package -// + export type NonEmptySkeleton = { shape: Shape, members: Skeleton[] }; export type Skeleton = null | NonEmptySkeleton; export type Path = Array; diff --git a/packages/core/src/runtime/bag.ts b/packages/core/src/runtime/bag.ts index d8508a1..24f41e1 100644 --- a/packages/core/src/runtime/bag.ts +++ b/packages/core/src/runtime/bag.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones // Bags and Deltas (which are Bags where item-counts can be negative). diff --git a/packages/core/src/runtime/dataflow.ts b/packages/core/src/runtime/dataflow.ts index 8b99e04..23eea29 100644 --- a/packages/core/src/runtime/dataflow.ts +++ b/packages/core/src/runtime/dataflow.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones // Property-based "dataflow" diff --git a/packages/core/src/runtime/dataspace.ts b/packages/core/src/runtime/dataspace.ts index 1b59e3d..8538ded 100644 --- a/packages/core/src/runtime/dataspace.ts +++ b/packages/core/src/runtime/dataspace.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { Value, is, Set } from '@preserves/core'; diff --git a/packages/core/src/runtime/idcoll.ts b/packages/core/src/runtime/idcoll.ts index 79df2fb..77eb33a 100644 --- a/packages/core/src/runtime/idcoll.ts +++ b/packages/core/src/runtime/idcoll.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones // Convenient alias for the JS-native Set and Map types. diff --git a/packages/core/src/runtime/mapset.ts b/packages/core/src/runtime/mapset.ts index 41e9649..f222df9 100644 --- a/packages/core/src/runtime/mapset.ts +++ b/packages/core/src/runtime/mapset.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones // Utilities for Maps of Sets diff --git a/packages/core/src/runtime/pattern.ts b/packages/core/src/runtime/pattern.ts index 16c9efe..e0e005a 100644 --- a/packages/core/src/runtime/pattern.ts +++ b/packages/core/src/runtime/pattern.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones use crate::schemas::dataspace_patterns::*; diff --git a/packages/core/src/runtime/randomid.ts b/packages/core/src/runtime/randomid.ts index ed6aa9e..7972d49 100644 --- a/packages/core/src/runtime/randomid.ts +++ b/packages/core/src/runtime/randomid.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { Bytes } from '@preserves/core'; import * as node_crypto from 'crypto'; diff --git a/packages/core/src/runtime/rewrite.ts b/packages/core/src/runtime/rewrite.ts index 488552f..f45c2bc 100644 --- a/packages/core/src/runtime/rewrite.ts +++ b/packages/core/src/runtime/rewrite.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import type { Assertion, Handle, Ref, Turn } from "./actor.js"; import { Bytes, Dictionary, DoubleFloat, embed, IdentityMap, is, isEmbedded, Record, SingleFloat, Tuple } from "@preserves/core"; diff --git a/packages/core/src/runtime/skeleton.ts b/packages/core/src/runtime/skeleton.ts index 49b2efe..e3d4c6b 100644 --- a/packages/core/src/runtime/skeleton.ts +++ b/packages/core/src/runtime/skeleton.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { IdentitySet } from './idcoll.js'; import { is, Value, Record, Set, Dictionary, canonicalString, RecordConstructorInfo, GenericEmbedded } from '@preserves/core'; diff --git a/packages/core/src/runtime/stack.ts b/packages/core/src/runtime/stack.ts index 6ec3f2b..de4e50c 100644 --- a/packages/core/src/runtime/stack.ts +++ b/packages/core/src/runtime/stack.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones export type NonEmptyStack = { item: T, rest: Stack }; export type Stack = null | NonEmptyStack; diff --git a/packages/core/src/runtime/task.ts b/packages/core/src/runtime/task.ts index bc36de1..245059e 100644 --- a/packages/core/src/runtime/task.ts +++ b/packages/core/src/runtime/task.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones const LIMIT = 25000; diff --git a/packages/core/src/transport/cryptography.ts b/packages/core/src/transport/cryptography.ts index 50e5271..144372b 100644 --- a/packages/core/src/transport/cryptography.ts +++ b/packages/core/src/transport/cryptography.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { Bytes, underlying } from '@preserves/core'; import * as node_crypto from 'crypto'; diff --git a/packages/core/src/transport/protocol.ts b/packages/core/src/transport/protocol.ts index 76e6dca..5cf9182 100644 --- a/packages/core/src/transport/protocol.ts +++ b/packages/core/src/transport/protocol.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import * as S from '../gen/sturdy.js'; import { Oid } from '../gen/protocol.js'; diff --git a/packages/core/src/transport/relay.ts b/packages/core/src/transport/relay.ts index 1cdc13c..4ada25a 100644 --- a/packages/core/src/transport/relay.ts +++ b/packages/core/src/transport/relay.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { Actor, Assertion, Entity, Facet, Handle, Ref, Turn } from '../runtime/actor.js'; import { BytesLike, Decoder, Dictionary, embed, encode, IdentityMap, mapEmbeddeds, underlying, Value } from '@preserves/core'; diff --git a/packages/core/src/transport/sturdy.ts b/packages/core/src/transport/sturdy.ts index 84018bb..abb9e8d 100644 --- a/packages/core/src/transport/sturdy.ts +++ b/packages/core/src/transport/sturdy.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones // Basically Macaroons [1] in a Dataspace context // diff --git a/packages/core/stubs/crypto.js b/packages/core/stubs/crypto.js index 03f52d6..cb0c723 100644 --- a/packages/core/stubs/crypto.js +++ b/packages/core/stubs/crypto.js @@ -1 +1,4 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + export const randomBytes = void 0; diff --git a/packages/core/test/bag.test.ts b/packages/core/test/bag.test.ts index d1add0a..e9ea8c6 100644 --- a/packages/core/test/bag.test.ts +++ b/packages/core/test/bag.test.ts @@ -1,21 +1,7 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + "use strict"; -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2018 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- const assert = require('assert'); const Immutable = require('immutable'); diff --git a/packages/core/test/dataflow.test.ts b/packages/core/test/dataflow.test.ts index e6bad31..69d231a 100644 --- a/packages/core/test/dataflow.test.ts +++ b/packages/core/test/dataflow.test.ts @@ -1,21 +1,7 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + "use strict"; -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2018 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- const assert = require('assert'); var Immutable = require('immutable'); diff --git a/packages/core/test/dataspace.test.ts b/packages/core/test/dataspace.test.ts index 9b65112..fe4328f 100644 --- a/packages/core/test/dataspace.test.ts +++ b/packages/core/test/dataspace.test.ts @@ -1,21 +1,7 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + "use strict"; -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2018 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- const Immutable = require('immutable'); diff --git a/packages/core/test/skeleton.test.ts b/packages/core/test/skeleton.test.ts index f2db79b..7809020 100644 --- a/packages/core/test/skeleton.test.ts +++ b/packages/core/test/skeleton.test.ts @@ -1,21 +1,7 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + "use strict"; -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2018 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- const assert = require('assert'); const Immutable = require('immutable'); diff --git a/packages/html/examples/flappy-bird/rollup.config.js b/packages/html/examples/flappy-bird/rollup.config.js index 673757f..1a9b836 100644 --- a/packages/html/examples/flappy-bird/rollup.config.js +++ b/packages/html/examples/flappy-bird/rollup.config.js @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import sourcemaps from 'rollup-plugin-sourcemaps'; export default { diff --git a/packages/html/examples/flappy-bird/src/index.ts b/packages/html/examples/flappy-bird/src/index.ts index 037d759..4bf7d20 100644 --- a/packages/html/examples/flappy-bird/src/index.ts +++ b/packages/html/examples/flappy-bird/src/index.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/flappy-bird-demo -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { $QuitDataspace, Double, Facet, Inbound, Outbound, floatValue } from '@syndicate-lang/core'; activate import { WindowEvent, template, Anchor } from '@syndicate-lang/html'; diff --git a/packages/html/examples/table/rollup.config.js b/packages/html/examples/table/rollup.config.js index 156b55c..9505c1e 100644 --- a/packages/html/examples/table/rollup.config.js +++ b/packages/html/examples/table/rollup.config.js @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import sourcemaps from 'rollup-plugin-sourcemaps'; export default { diff --git a/packages/html/examples/table/src/index.ts b/packages/html/examples/table/src/index.ts index 8ceb685..bda1b2e 100644 --- a/packages/html/examples/table/src/index.ts +++ b/packages/html/examples/table/src/index.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { Embedded, Value } from '@syndicate-lang/core'; activate import { UIEvent, GlobalEvent, HtmlFragments, template, Anchor } from '@syndicate-lang/html'; diff --git a/packages/html/rollup.config.js b/packages/html/rollup.config.js index 1c6ce1b..9996d74 100644 --- a/packages/html/rollup.config.js +++ b/packages/html/rollup.config.js @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import { SyndicateRollup } from '../../rollup.js'; const r = new SyndicateRollup('syndicate-html', { globalName: 'SyndicateHtml' }); export default [ diff --git a/packages/html/src/html.ts b/packages/html/src/html.ts index 4416b00..2575c52 100644 --- a/packages/html/src/html.ts +++ b/packages/html/src/html.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/html, Browser-based UI for Syndicate -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones let nextId = 1; diff --git a/packages/html/src/index.ts b/packages/html/src/index.ts index 6952830..2f8e46d 100644 --- a/packages/html/src/index.ts +++ b/packages/html/src/index.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/html, Browser-based UI for Syndicate -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { randomId, Facet, Observe, FlexMap, Value, embed, Embedded } from "@syndicate-lang/core"; diff --git a/packages/html/src/protocol.ts b/packages/html/src/protocol.ts index 48e67a9..8feee0c 100644 --- a/packages/html/src/protocol.ts +++ b/packages/html/src/protocol.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/html, Browser-based UI for Syndicate -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones // Message. Interest in this causes event listeners to be added for // the given eventType to all nodes matching the given selector *at diff --git a/packages/syndicatec/bin/syndicate-maptool.js b/packages/syndicatec/bin/syndicate-maptool.js old mode 100755 new mode 100644 index e5d2e50..b1c3554 --- a/packages/syndicatec/bin/syndicate-maptool.js +++ b/packages/syndicatec/bin/syndicate-maptool.js @@ -1,4 +1,7 @@ #!/usr/bin/env node +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + try { require('../lib/maptool.js').main(process.argv.slice(2)); } catch (e) { diff --git a/packages/syndicatec/bin/syndicatec.js b/packages/syndicatec/bin/syndicatec.js old mode 100755 new mode 100644 index 2feaf3c..55a2531 --- a/packages/syndicatec/bin/syndicatec.js +++ b/packages/syndicatec/bin/syndicatec.js @@ -1,4 +1,7 @@ #!/usr/bin/env node +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + try { require('../lib/cli.js').main(process.argv.slice(2)); } catch (e) { diff --git a/packages/syndicatec/examples/javascript/rollup.config.js b/packages/syndicatec/examples/javascript/rollup.config.js index 1924b9f..f08a99a 100644 --- a/packages/syndicatec/examples/javascript/rollup.config.js +++ b/packages/syndicatec/examples/javascript/rollup.config.js @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import sourcemaps from 'rollup-plugin-sourcemaps'; export default { diff --git a/packages/syndicatec/examples/javascript/src/box.js b/packages/syndicatec/examples/javascript/src/box.js index db8cc45..388f204 100644 --- a/packages/syndicatec/examples/javascript/src/box.js +++ b/packages/syndicatec/examples/javascript/src/box.js @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { BoxState, SetBox, N } from './protocol.js'; diff --git a/packages/syndicatec/examples/javascript/src/client.js b/packages/syndicatec/examples/javascript/src/client.js index da07a67..c7dac47 100644 --- a/packages/syndicatec/examples/javascript/src/client.js +++ b/packages/syndicatec/examples/javascript/src/client.js @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { BoxState, SetBox } from './protocol.js'; diff --git a/packages/syndicatec/examples/javascript/src/index.js b/packages/syndicatec/examples/javascript/src/index.js index fd820e5..a8acd7a 100644 --- a/packages/syndicatec/examples/javascript/src/index.js +++ b/packages/syndicatec/examples/javascript/src/index.js @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { N } from './protocol.js'; activate import './box.js'; diff --git a/packages/syndicatec/examples/javascript/src/protocol.js b/packages/syndicatec/examples/javascript/src/protocol.js index ae85661..551aeba 100644 --- a/packages/syndicatec/examples/javascript/src/protocol.js +++ b/packages/syndicatec/examples/javascript/src/protocol.js @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones export assertion type BoxState(value); export message type SetBox(newValue); diff --git a/packages/syndicatec/examples/typescript/rollup.config.js b/packages/syndicatec/examples/typescript/rollup.config.js index 1924b9f..f08a99a 100644 --- a/packages/syndicatec/examples/typescript/rollup.config.js +++ b/packages/syndicatec/examples/typescript/rollup.config.js @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import sourcemaps from 'rollup-plugin-sourcemaps'; export default { diff --git a/packages/syndicatec/examples/typescript/src/box.ts b/packages/syndicatec/examples/typescript/src/box.ts index 959912c..0df308e 100644 --- a/packages/syndicatec/examples/typescript/src/box.ts +++ b/packages/syndicatec/examples/typescript/src/box.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { BoxState, SetBox, N } from './protocol.js'; diff --git a/packages/syndicatec/examples/typescript/src/client.ts b/packages/syndicatec/examples/typescript/src/client.ts index 848e30c..b1765d1 100644 --- a/packages/syndicatec/examples/typescript/src/client.ts +++ b/packages/syndicatec/examples/typescript/src/client.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { BoxState, SetBox } from './protocol.js'; diff --git a/packages/syndicatec/examples/typescript/src/index.ts b/packages/syndicatec/examples/typescript/src/index.ts index b420852..ae242bd 100644 --- a/packages/syndicatec/examples/typescript/src/index.ts +++ b/packages/syndicatec/examples/typescript/src/index.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { N } from './protocol.js'; activate import './box.js'; diff --git a/packages/syndicatec/examples/typescript/src/protocol.ts b/packages/syndicatec/examples/typescript/src/protocol.ts index ae85661..551aeba 100644 --- a/packages/syndicatec/examples/typescript/src/protocol.ts +++ b/packages/syndicatec/examples/typescript/src/protocol.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones export assertion type BoxState(value); export message type SetBox(newValue); diff --git a/packages/syndicatec/src/cli.ts b/packages/syndicatec/src/cli.ts index 9015931..9a02bd9 100644 --- a/packages/syndicatec/src/cli.ts +++ b/packages/syndicatec/src/cli.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import yargs from 'yargs/yargs'; import fs from 'fs'; diff --git a/packages/syndicatec/src/maptool.ts b/packages/syndicatec/src/maptool.ts index c889771..543828e 100644 --- a/packages/syndicatec/src/maptool.ts +++ b/packages/syndicatec/src/maptool.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import fs from 'fs'; import { SourceMap } from '@syndicate-lang/compiler/lib/syntax/index.js'; import { Syntax } from '@syndicate-lang/compiler'; diff --git a/packages/syndicatec/src/util.ts b/packages/syndicatec/src/util.ts index 5e38ef5..e3ff53c 100644 --- a/packages/syndicatec/src/util.ts +++ b/packages/syndicatec/src/util.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + export function dataURL(s: string): string { return `data:application/json;base64,${Buffer.from(s).toString('base64')}`; } diff --git a/packages/timer/rollup.config.js b/packages/timer/rollup.config.js index 111d1f2..ab949a7 100644 --- a/packages/timer/rollup.config.js +++ b/packages/timer/rollup.config.js @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import { SyndicateRollup } from '../../rollup.js'; const r = new SyndicateRollup('syndicate-timer', { globalName: 'SyndicateTimer' }); export default [ diff --git a/packages/timer/src/index.ts b/packages/timer/src/index.ts index 6a1f536..2db5c11 100644 --- a/packages/timer/src/index.ts +++ b/packages/timer/src/index.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/driver-timer, a Syndicate driver for time-related events. -// Copyright (C) 2016-2018 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { preserves, Observe, Dataspace, floatValue, Facet } from "@syndicate-lang/core"; diff --git a/packages/ts-plugin/examples/typescript/rollup.config.js b/packages/ts-plugin/examples/typescript/rollup.config.js index f49ed2a..7087c00 100644 --- a/packages/ts-plugin/examples/typescript/rollup.config.js +++ b/packages/ts-plugin/examples/typescript/rollup.config.js @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import sourcemaps from 'rollup-plugin-sourcemaps'; export default { diff --git a/packages/ts-plugin/examples/typescript/src/box.ts b/packages/ts-plugin/examples/typescript/src/box.ts index 959912c..0df308e 100644 --- a/packages/ts-plugin/examples/typescript/src/box.ts +++ b/packages/ts-plugin/examples/typescript/src/box.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { BoxState, SetBox, N } from './protocol.js'; diff --git a/packages/ts-plugin/examples/typescript/src/client.ts b/packages/ts-plugin/examples/typescript/src/client.ts index 848e30c..b1765d1 100644 --- a/packages/ts-plugin/examples/typescript/src/client.ts +++ b/packages/ts-plugin/examples/typescript/src/client.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { BoxState, SetBox } from './protocol.js'; diff --git a/packages/ts-plugin/examples/typescript/src/index.ts b/packages/ts-plugin/examples/typescript/src/index.ts index b420852..ae242bd 100644 --- a/packages/ts-plugin/examples/typescript/src/index.ts +++ b/packages/ts-plugin/examples/typescript/src/index.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { N } from './protocol.js'; activate import './box.js'; diff --git a/packages/ts-plugin/examples/typescript/src/protocol.ts b/packages/ts-plugin/examples/typescript/src/protocol.ts index ae85661..551aeba 100644 --- a/packages/ts-plugin/examples/typescript/src/protocol.ts +++ b/packages/ts-plugin/examples/typescript/src/protocol.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones export assertion type BoxState(value); export message type SetBox(newValue); diff --git a/packages/ts-plugin/src/index.ts b/packages/ts-plugin/src/index.ts index cb0b761..7a3c269 100644 --- a/packages/ts-plugin/src/index.ts +++ b/packages/ts-plugin/src/index.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import { compile, Syntax } from '@syndicate-lang/compiler'; import tslib from 'typescript/lib/tsserverlibrary'; import crypto from 'crypto'; diff --git a/packages/tsc/bin/syndicate-tsc.js b/packages/tsc/bin/syndicate-tsc.js old mode 100755 new mode 100644 index bb8e43f..b1d62ab --- a/packages/tsc/bin/syndicate-tsc.js +++ b/packages/tsc/bin/syndicate-tsc.js @@ -1,4 +1,7 @@ #!/usr/bin/env node +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + try { require('../lib/tsc.js').main(process.argv.slice(2)); } catch (e) { diff --git a/packages/tsc/examples/typescript/rollup.config.js b/packages/tsc/examples/typescript/rollup.config.js index 1924b9f..f08a99a 100644 --- a/packages/tsc/examples/typescript/rollup.config.js +++ b/packages/tsc/examples/typescript/rollup.config.js @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import sourcemaps from 'rollup-plugin-sourcemaps'; export default { diff --git a/packages/tsc/examples/typescript/src/box.ts b/packages/tsc/examples/typescript/src/box.ts index 959912c..0df308e 100644 --- a/packages/tsc/examples/typescript/src/box.ts +++ b/packages/tsc/examples/typescript/src/box.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { BoxState, SetBox, N } from './protocol.js'; diff --git a/packages/tsc/examples/typescript/src/client.ts b/packages/tsc/examples/typescript/src/client.ts index 848e30c..b1765d1 100644 --- a/packages/tsc/examples/typescript/src/client.ts +++ b/packages/tsc/examples/typescript/src/client.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { BoxState, SetBox } from './protocol.js'; diff --git a/packages/tsc/examples/typescript/src/index.ts b/packages/tsc/examples/typescript/src/index.ts index b420852..ae242bd 100644 --- a/packages/tsc/examples/typescript/src/index.ts +++ b/packages/tsc/examples/typescript/src/index.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones import { N } from './protocol.js'; activate import './box.js'; diff --git a/packages/tsc/examples/typescript/src/protocol.ts b/packages/tsc/examples/typescript/src/protocol.ts index ae85661..551aeba 100644 --- a/packages/tsc/examples/typescript/src/protocol.ts +++ b/packages/tsc/examples/typescript/src/protocol.ts @@ -1,20 +1,5 @@ -//--------------------------------------------------------------------------- -// @syndicate-lang/core, an implementation of Syndicate dataspaces for JS. -// Copyright (C) 2016-2021 Tony Garnock-Jones -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -//--------------------------------------------------------------------------- +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones export assertion type BoxState(value); export message type SetBox(newValue); diff --git a/packages/tsc/src/tsc.ts b/packages/tsc/src/tsc.ts index d948525..aeb7067 100644 --- a/packages/tsc/src/tsc.ts +++ b/packages/tsc/src/tsc.ts @@ -1,3 +1,6 @@ +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones + import yargs from 'yargs/yargs'; import ts from 'typescript';