aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--clientapi/auth/authtypes/flow.go13
-rw-r--r--clientapi/httputil/parse.go10
-rw-r--r--clientapi/routing/sendtodevice.go10
-rw-r--r--clientapi/routing/sendtyping.go10
-rw-r--r--clientapi/routing/whoami.go10
-rw-r--r--clientapi/userutil/userutil.go10
-rw-r--r--clientapi/userutil/userutil_test.go10
-rw-r--r--federationapi/routing/devices.go10
-rw-r--r--federationapi/routing/eventauth.go10
-rw-r--r--federationapi/routing/leave.go10
-rw-r--r--federationapi/routing/missingevents.go10
-rw-r--r--federationapi/routing/state.go10
-rw-r--r--internal/transactions/transactions.go10
-rw-r--r--internal/transactions/transactions_test.go10
-rw-r--r--roomserver/auth/auth.go10
-rw-r--r--test/slice.go10
-rwxr-xr-xtest/wasm/index.js78
17 files changed, 36 insertions, 205 deletions
diff --git a/clientapi/auth/authtypes/flow.go b/clientapi/auth/authtypes/flow.go
index 7388a5eb..3dc1bba6 100644
--- a/clientapi/auth/authtypes/flow.go
+++ b/clientapi/auth/authtypes/flow.go
@@ -1,16 +1,5 @@
-// Copyright Andrew Morgan <andrew@amorgan.xyz>
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
// Copyright 2024 New Vector Ltd.
+// Copyright 2017 Andrew Morgan <andrew@amorgan.xyz>
//
// SPDX-License-Identifier: AGPL-3.0-only
// Please see LICENSE in the repository root for full details.
diff --git a/clientapi/httputil/parse.go b/clientapi/httputil/parse.go
index f6ac7caa..4eb7fb05 100644
--- a/clientapi/httputil/parse.go
+++ b/clientapi/httputil/parse.go
@@ -1,13 +1,3 @@
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
// Copyright 2024 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only
diff --git a/clientapi/routing/sendtodevice.go b/clientapi/routing/sendtodevice.go
index 11f36cd4..3b6a65f5 100644
--- a/clientapi/routing/sendtodevice.go
+++ b/clientapi/routing/sendtodevice.go
@@ -1,13 +1,3 @@
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
// Copyright 2024 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only
diff --git a/clientapi/routing/sendtyping.go b/clientapi/routing/sendtyping.go
index 1d2a53f4..09d9c048 100644
--- a/clientapi/routing/sendtyping.go
+++ b/clientapi/routing/sendtyping.go
@@ -1,13 +1,3 @@
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
// Copyright 2024 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only
diff --git a/clientapi/routing/whoami.go b/clientapi/routing/whoami.go
index 041f4749..80f58e87 100644
--- a/clientapi/routing/whoami.go
+++ b/clientapi/routing/whoami.go
@@ -1,13 +1,3 @@
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
// Copyright 2024 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only
diff --git a/clientapi/userutil/userutil.go b/clientapi/userutil/userutil.go
index aa8623b3..e271936a 100644
--- a/clientapi/userutil/userutil.go
+++ b/clientapi/userutil/userutil.go
@@ -1,13 +1,3 @@
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
// Copyright 2024 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only
diff --git a/clientapi/userutil/userutil_test.go b/clientapi/userutil/userutil_test.go
index b68d574a..743280ff 100644
--- a/clientapi/userutil/userutil_test.go
+++ b/clientapi/userutil/userutil_test.go
@@ -1,13 +1,3 @@
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
// Copyright 2024 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only
diff --git a/federationapi/routing/devices.go b/federationapi/routing/devices.go
index 5e2fc52e..ec1c4253 100644
--- a/federationapi/routing/devices.go
+++ b/federationapi/routing/devices.go
@@ -1,13 +1,3 @@
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
// Copyright 2024 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only
diff --git a/federationapi/routing/eventauth.go b/federationapi/routing/eventauth.go
index 18cb42d6..df81b53e 100644
--- a/federationapi/routing/eventauth.go
+++ b/federationapi/routing/eventauth.go
@@ -1,13 +1,3 @@
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
// Copyright 2024 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only
diff --git a/federationapi/routing/leave.go b/federationapi/routing/leave.go
index 89df7d80..76a5564b 100644
--- a/federationapi/routing/leave.go
+++ b/federationapi/routing/leave.go
@@ -1,13 +1,3 @@
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
// Copyright 2024 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only
diff --git a/federationapi/routing/missingevents.go b/federationapi/routing/missingevents.go
index 1bd3b8f6..aa4fa0f3 100644
--- a/federationapi/routing/missingevents.go
+++ b/federationapi/routing/missingevents.go
@@ -1,13 +1,3 @@
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
// Copyright 2024 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only
diff --git a/federationapi/routing/state.go b/federationapi/routing/state.go
index d9aa9f9f..d24df092 100644
--- a/federationapi/routing/state.go
+++ b/federationapi/routing/state.go
@@ -1,13 +1,3 @@
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
// Copyright 2024 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only
diff --git a/internal/transactions/transactions.go b/internal/transactions/transactions.go
index 479ade7b..3796b5f8 100644
--- a/internal/transactions/transactions.go
+++ b/internal/transactions/transactions.go
@@ -1,13 +1,3 @@
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
// Copyright 2024 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only
diff --git a/internal/transactions/transactions_test.go b/internal/transactions/transactions_test.go
index e11f79c8..cc12c78f 100644
--- a/internal/transactions/transactions_test.go
+++ b/internal/transactions/transactions_test.go
@@ -1,13 +1,3 @@
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
// Copyright 2024 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only
diff --git a/roomserver/auth/auth.go b/roomserver/auth/auth.go
index e605074f..5971185c 100644
--- a/roomserver/auth/auth.go
+++ b/roomserver/auth/auth.go
@@ -1,13 +1,3 @@
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
// Copyright 2024 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only
diff --git a/test/slice.go b/test/slice.go
index 8a0917d9..f73326e0 100644
--- a/test/slice.go
+++ b/test/slice.go
@@ -1,13 +1,3 @@
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
// Copyright 2024 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only
diff --git a/test/wasm/index.js b/test/wasm/index.js
index fce5753c..24d8d7fb 100755
--- a/test/wasm/index.js
+++ b/test/wasm/index.js
@@ -1,52 +1,44 @@
#!/usr/bin/env node
/*
+Copyright 2024 New Vector Ltd.
Copyright 2021 The Matrix.org Foundation C.I.C.
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+SPDX-License-Identifier: AGPL-3.0-only
+Please see LICENSE in the repository root for full details.
*/
-const fs = require('fs');
-const path = require('path');
-const childProcess = require('child_process');
-
-(async function() {
- // sql.js
- const initSqlJs = require('sql.js');
- await initSqlJs().then(SQL => {
- global._go_sqlite = SQL;
- console.log("Loaded sqlite")
- });
- // dendritejs expects to write to `/idb` so we create that here
- // Since this is testing only, we use the default in-memory FS
- global._go_sqlite.FS.mkdir("/idb");
-
- // WebSocket
- const WebSocket = require('isomorphic-ws');
- global.WebSocket = WebSocket;
-
- // Load the generic Go Wasm exec helper inline to trigger built-in run call
- // This approach avoids copying `wasm_exec.js` into the repo, which is nice
- // to aim for since it can differ between Go versions.
- const goRoot = await new Promise((resolve, reject) => {
- childProcess.execFile('go', ['env', 'GOROOT'], (err, out) => {
- if (err) {
- reject("Can't find go");
- }
- resolve(out.trim());
- });
+const fs = require("fs");
+const path = require("path");
+const childProcess = require("child_process");
+
+(async function () {
+ // sql.js
+ const initSqlJs = require("sql.js");
+ await initSqlJs().then((SQL) => {
+ global._go_sqlite = SQL;
+ console.log("Loaded sqlite");
+ });
+ // dendritejs expects to write to `/idb` so we create that here
+ // Since this is testing only, we use the default in-memory FS
+ global._go_sqlite.FS.mkdir("/idb");
+
+ // WebSocket
+ const WebSocket = require("isomorphic-ws");
+ global.WebSocket = WebSocket;
+
+ // Load the generic Go Wasm exec helper inline to trigger built-in run call
+ // This approach avoids copying `wasm_exec.js` into the repo, which is nice
+ // to aim for since it can differ between Go versions.
+ const goRoot = await new Promise((resolve, reject) => {
+ childProcess.execFile("go", ["env", "GOROOT"], (err, out) => {
+ if (err) {
+ reject("Can't find go");
+ }
+ resolve(out.trim());
});
- const execPath = path.join(goRoot, 'misc/wasm/wasm_exec.js');
- const execCode = fs.readFileSync(execPath, 'utf8');
- eval(execCode);
+ });
+ const execPath = path.join(goRoot, "misc/wasm/wasm_exec.js");
+ const execCode = fs.readFileSync(execPath, "utf8");
+ eval(execCode);
})();